/* Hirelly — vanilla CSS3
   Palette: accent #0052CC · surfaces #FFFFFF / #F4F5F7
            dark #172B4D · input borders #6C757D           */

:root {
  --accent: #0052cc;
  --accent-dark: #003d99;
  --accent-soft: #e6effc;
  --surface: #ffffff;
  --canvas: #f4f5f7;
  --ink: #172b4d;
  --ink-muted: #5e6c84;
  --border: #6c757d;
  --border-soft: #dfe1e6;
  --success: #1c7c4a;
  --success-soft: #e3f5ea;
  --danger: #b3251e;
  --danger-soft: #fdeae9;
  --warn: #a15c00;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(23, 43, 77, 0.12), 0 0 1px rgba(23, 43, 77, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header / footer ---------- */

.site-header {
  background: var(--ink);
  color: #fff;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 60px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: var(--accent);
  font-size: 1rem;
}

.brand-tagline {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
}

/* ---------- Signed-in user nav ---------- */

.user-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

/* Contador de cota no cabeçalho. Segue o mesmo formato de pílula do
   .user-chip para não brigar com a barra, e fica âmbar/vermelho conforme a
   cota aperta — a cor é reforço, o número continua legível sem ela. */
.quota-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}

.quota-chip:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.quota-chip strong {
  font-size: 0.95rem;
  font-weight: 700;
}

.quota-chip-label {
  opacity: 0.85;
}

.quota-chip-empty {
  background: rgba(220, 38, 38, 0.25);
}

.quota-chip-empty:hover {
  background: rgba(220, 38, 38, 0.38);
}

/* Numa tela estreita a barra já está disputada; o rótulo sai e fica o
   número, que é a informação que importa. */
@media (max-width: 620px) {
  .quota-chip-label {
    display: none;
  }
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
  transition: background-color 0.15s ease;
}

.user-chip:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.user-avatar {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.user-name {
  max-width: 20ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-form {
  margin: 0;
}

.btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.9);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.site-footer {
  margin-top: 48px;
  padding: 24px 0 40px;
  border-top: 1px solid var(--border-soft);
  color: var(--ink-muted);
  font-size: 0.85rem;
}

.site-footer p {
  margin: 0;
}

main.container {
  padding-top: 32px;
}

/* ---------- Typography ---------- */

h1 {
  margin: 0 0 8px;
  font-size: 1.75rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h2 {
  margin: 0 0 12px;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.hero {
  margin-bottom: 24px;
}

.hero p {
  margin: 0;
  max-width: 60ch;
  color: var(--ink-muted);
}

.hint {
  margin: 6px 0 0;
  color: var(--ink-muted);
  font-size: 0.82rem;
}

.hint.hint-error {
  color: var(--danger);
  font-weight: 600;
}

.empty {
  margin: 0;
  color: var(--ink-muted);
}

.breadcrumb {
  margin: 0 0 16px;
}

.breadcrumb a,
a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-dark);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Cards ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 24px;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

/* ---------- Flash messages ---------- */

.flashes {
  margin-bottom: 20px;
}

.flash {
  padding: 12px 16px;
  border-radius: var(--radius);
  border-left: 4px solid;
  margin-bottom: 10px;
  font-size: 0.92rem;
}

.flash-error {
  background: var(--danger-soft);
  border-color: var(--danger);
  color: #7d1a15;
}

.flash-success {
  background: var(--success-soft);
  border-color: var(--success);
  color: #14562f;
}

.flash-message {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: #103a80;
}

/* ---------- Forms ---------- */

.field {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.9rem;
}

input[type="text"],
input[type="file"],
textarea {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea {
  resize: vertical;
  min-height: 140px;
}

input[type="text"]:focus,
input[type="file"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.18);
}

input[type="file"] {
  padding: 8px 10px;
  background: var(--canvas);
  cursor: pointer;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 10px 18px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-dark);
  color: #fff;
}

.btn-danger {
  background: var(--surface);
  border-color: var(--danger);
  color: var(--danger);
}

.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

.btn-sm {
  padding: 5px 11px;
  font-size: 0.82rem;
}

.btn[aria-disabled="true"],
.btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

/* ---------- History table ---------- */

.history h2 {
  margin-bottom: 14px;
}

table.analyses {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 0.92rem;
}

table.analyses th,
table.analyses td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}

table.analyses thead th {
  background: var(--canvas);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

table.analyses tbody tr:last-child td {
  border-bottom: none;
}

.row-actions {
  text-align: right;
  white-space: nowrap;
}

.row-actions form {
  display: inline;
}

/* ---------- Scores ---------- */

.score-chip {
  display: inline-block;
  min-width: 40px;
  padding: 3px 9px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  text-align: center;
}

.score-chip.score-high {
  background: var(--success-soft);
  color: var(--success);
}

.score-chip.score-mid {
  background: #fff4e5;
  color: var(--warn);
}

.score-chip.score-low {
  background: var(--danger-soft);
  color: var(--danger);
}

.result-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.result-role {
  margin: 0 0 4px;
  font-weight: 600;
  color: var(--accent);
}

.result-email,
.result-meta {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.87rem;
}

.score-block {
  display: grid;
  place-items: center;
  gap: 2px;
  min-width: 132px;
  padding: 16px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  background: var(--canvas);
}

.score-block .score-value {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}

.score-block .score-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.score-block.score-high {
  background: var(--success-soft);
  border-color: #bfe4cd;
  color: var(--success);
}

.score-block.score-mid {
  background: #fff4e5;
  border-color: #f4dcb8;
  color: var(--warn);
}

.score-block.score-low {
  background: var(--danger-soft);
  border-color: #f2c6c3;
  color: var(--danger);
}

.summary-text {
  margin: 0;
  white-space: pre-line;
}

/* ---------- Lists ---------- */

.list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.list li {
  position: relative;
  padding: 6px 0 6px 24px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.93rem;
}

.list li:last-child {
  border-bottom: none;
}

.list li::before {
  position: absolute;
  left: 2px;
  font-weight: 700;
}

.list-positive li::before {
  content: "+";
  color: var(--success);
}

.list-negative li::before {
  content: "\2212"; /* minus sign */
  color: var(--danger);
}

/* ---------- Danger zone ---------- */

.danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  border-color: #f2c6c3;
}

.danger-zone h2 {
  color: var(--danger);
}

.danger-zone p {
  margin: 0;
  max-width: 56ch;
  color: var(--ink-muted);
  font-size: 0.88rem;
}

/* ---------- Auth screens ---------- */

.auth-card {
  max-width: 420px;
  margin: 32px auto 24px;
}

.auth-intro {
  margin: 0 0 22px;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.auth-form .field:last-of-type {
  margin-bottom: 22px;
}

.btn-block {
  display: block;
  width: 100%;
}

.auth-alt {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
  text-align: center;
  font-size: 0.88rem;
  color: var(--ink-muted);
}

.optional {
  font-weight: 400;
  color: var(--ink-muted);
}

input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="email"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.18);
}

.hint.hint-ok {
  color: var(--success);
  font-weight: 600;
}

/* ---------- Account page ---------- */

.account-details {
  display: grid;
  grid-template-columns: minmax(120px, max-content) 1fr;
  gap: 8px 20px;
  margin: 0;
  font-size: 0.92rem;
}

.account-details dt {
  color: var(--ink-muted);
  font-weight: 600;
}

.account-details dd {
  margin: 0;
}

/* ---------- Error page ---------- */

.error-card {
  text-align: center;
  padding: 48px 24px;
}

.error-code {
  margin: 0 0 8px;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  color: var(--border-soft);
  letter-spacing: -0.03em;
}

.error-message {
  margin: 0 0 24px;
  color: var(--ink-muted);
}

/* ---------- Small screens ---------- */

@media (max-width: 640px) {
  h1 {
    font-size: 1.45rem;
  }

  .card {
    padding: 18px;
  }

  table.analyses {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .score-block {
    width: 100%;
  }
}

/* ==========================================================================
   Navegação, site público e área logada (adicionado com as duas áreas)
   ========================================================================== */

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: 8px;
  flex-wrap: wrap;
}

.main-nav a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover {
  color: #fff;
  border-bottom-color: var(--accent);
}

.header-inner {
  gap: 20px;
}

/* ---------- Botões extras ---------- */

.btn-outline {
  background: transparent;
  border-color: var(--accent);
  color: var(--accent);
}

.btn-outline:hover {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.btn-lg {
  padding: 13px 26px;
  font-size: 1rem;
}

/* ---------- Seções ---------- */

.section {
  padding: 56px 0;
}

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}

.section-title {
  margin: 0 0 10px;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}

.section-lead {
  margin: 0 0 32px;
  max-width: 62ch;
  color: var(--ink-muted);
  font-size: 1.02rem;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- Hero público ---------- */

.hero-public {
  padding: 72px 0 64px;
  background: linear-gradient(180deg, #fff 0%, var(--canvas) 100%);
  border-bottom: 1px solid var(--border-soft);
}

.hero-public h1 {
  max-width: 22ch;
  font-size: clamp(1.9rem, 4.4vw, 2.9rem);
  line-height: 1.12;
}

.hero-lead {
  max-width: 58ch;
  margin: 14px 0 28px;
  font-size: 1.1rem;
  color: var(--ink-muted);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-fineprint {
  margin: 18px 0 0;
  font-size: 0.86rem;
  color: var(--ink-muted);
}

/* ---------- Cartões de funcionalidade ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.section-alt .feature-card {
  background: var(--canvas);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 14px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.95rem;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 1.06rem;
}

.feature-card p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.93rem;
}

/* ---------- Passos ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  padding-top: 14px;
  border-top: 3px solid var(--accent);
}

.step-number {
  display: block;
  margin-bottom: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.steps h3 {
  margin: 0 0 6px;
  font-size: 1.02rem;
}

.steps p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

/* ---------- Lista com check ---------- */

.check-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.check-list li {
  position: relative;
  padding-left: 30px;
  font-size: 0.95rem;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: -1px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
  font-size: 0.72rem;
  font-weight: 700;
}

.two-col-wide {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  align-items: start;
}

/* ---------- Faixa de CTA ---------- */

.cta-band {
  padding: 56px 0;
  background: var(--ink);
  color: #fff;
  text-align: center;
}

.cta-band h2 {
  margin: 0 0 10px;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}

.cta-band p {
  margin: 0 auto 24px;
  max-width: 52ch;
  color: rgba(255, 255, 255, 0.78);
}

/* ---------- Planos ---------- */

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
  align-items: start;
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow);
}

.plan-featured {
  border-color: var(--accent);
  border-width: 2px;
  box-shadow: 0 6px 20px rgba(0, 82, 204, 0.13);
}

.plan-badge {
  position: absolute;
  top: -12px;
  left: 24px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.plan-name {
  margin: 0 0 6px;
  font-size: 1.18rem;
}

.plan-price {
  margin: 0 0 4px;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.plan-price-value {
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.plan-price-suffix {
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.plan-tagline {
  margin: 0 0 18px;
  color: var(--ink-muted);
  font-size: 0.88rem;
  min-height: 2.6em;
}

.plan-features {
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
  flex: 1;
}

.plan-features li {
  position: relative;
  padding-left: 24px;
  font-size: 0.9rem;
}

.plan-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}

.pricing-note {
  margin: 26px 0 0;
  font-size: 0.86rem;
  color: var(--ink-muted);
}

/* ---------- FAQ ---------- */

.faq {
  display: grid;
  gap: 10px;
  max-width: 72ch;
}

.faq details {
  background: var(--canvas);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 14px 18px;
}

.section-alt .faq details {
  background: var(--canvas);
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
}

.faq summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.faq p {
  margin: 10px 0 0;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

/* ---------- Texto corrido ---------- */

.prose {
  max-width: 72ch;
}

.prose h2 {
  margin: 34px 0 10px;
  font-size: 1.2rem;
}

.prose p {
  margin: 0 0 14px;
  color: var(--ink-muted);
}

/* ---------- Cabeçalho do painel ---------- */

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.panel-head h1 {
  margin: 0 0 4px;
  font-size: 1.55rem;
}

.panel-sub {
  margin: 0;
  color: var(--ink-muted);
}

.plan-pill {
  display: grid;
  gap: 2px;
  padding: 12px 18px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 0.85rem;
}

.plan-pill-name {
  font-weight: 700;
}

.plan-pill-usage {
  color: var(--ink-muted);
}

.plan-pill-link {
  margin-top: 4px;
  font-size: 0.84rem;
}

/* ---------- Cartões de ação ---------- */

.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-bottom: 34px;
}

.action-card {
  display: block;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.action-card:hover {
  border-color: var(--accent);
  color: inherit;
  transform: translateY(-2px);
}

.action-card-static,
.action-card-static:hover {
  border-color: var(--border-soft);
  transform: none;
  cursor: default;
}

.action-card h2 {
  margin: 0 0 8px;
  font-size: 1.08rem;
}

.action-card p {
  margin: 0 0 14px;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.action-cta {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
}

.action-cta-quiet {
  color: var(--ink-muted);
}

/* ---------- Aviso de cota ---------- */

.quota-banner {
  margin-bottom: 22px;
  padding: 13px 18px;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: #103a80;
  font-size: 0.92rem;
}

.quota-banner.quota-empty {
  border-left-color: var(--warn);
  background: #fff4e5;
  color: #7a4600;
}

/* ---------- Tabelas de dados ---------- */

table.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 0.92rem;
  margin-bottom: 8px;
}

table.data-table th,
table.data-table td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}

table.data-table thead th {
  background: var(--canvas);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

table.data-table tbody tr:last-child td {
  border-bottom: none;
}

.cell-truncate {
  max-width: 30ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history + .history {
  margin-top: 34px;
}

/* ---------- Etiquetas de palavras-chave ---------- */

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 500;
}

.tag-list-missing li {
  background: var(--danger-soft);
  color: #7d1a15;
}

.tag-list-present li {
  background: var(--success-soft);
  color: #14562f;
}

/* ---------- Lista numerada ---------- */

.numbered-list {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 10px;
}

.numbered-list li {
  font-size: 0.94rem;
  padding-left: 4px;
}

.numbered-list li::marker {
  color: var(--accent);
  font-weight: 700;
}

/* ---------- Bloco copiável ---------- */

.copy-block {
  position: relative;
  background: var(--canvas);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 16px 16px 14px;
}

.copy-text {
  margin: 0 0 12px;
  font: inherit;
  font-size: 0.93rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------- Upsell ---------- */

.upsell {
  border-style: dashed;
  border-color: var(--accent);
  background: var(--accent-soft);
}

.upsell h2 {
  color: var(--accent-dark);
}

.upsell p {
  margin: 0 0 16px;
  color: #103a80;
  font-size: 0.93rem;
}

/* ---------- Escolha de perfil no cadastro ---------- */

.role-field {
  margin: 0 0 22px;
  padding: 0;
  border: none;
}

.role-field legend {
  padding: 0;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 0.9rem;
}

.role-option {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 9px;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 400;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.role-option:hover {
  border-color: var(--accent);
}

.role-option input {
  margin-top: 3px;
  accent-color: var(--accent);
}

.role-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.role-option strong {
  display: block;
  font-size: 0.93rem;
}

.role-option small {
  color: var(--ink-muted);
  font-size: 0.84rem;
}

/* ---------- Formulários diversos ---------- */

select {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
}

select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.18);
}

.inline-form .field {
  max-width: 420px;
}

.inline-link {
  margin-left: 6px;
  font-size: 0.86rem;
}

.auth-alt-quiet {
  margin: 10px 0 0;
  text-align: center;
  font-size: 0.85rem;
}

/* ---------- Rodapé ---------- */

.footer-inner {
  display: grid;
  gap: 14px;
}

.footer-brand {
  margin: 0;
  font-weight: 700;
  color: var(--ink);
}

.footer-note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 0.88rem;
}

.footer-privacy {
  max-width: 70ch;
}

/* ---------- Erros ---------- */

.error-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Telas pequenas ---------- */

@media (max-width: 760px) {
  .header-inner {
    gap: 12px;
  }

  .main-nav {
    order: 3;
    width: 100%;
    gap: 14px;
    margin-left: 0;
    padding-bottom: 8px;
  }

  .user-nav {
    margin-left: auto;
  }

  .section {
    padding: 40px 0;
  }

  .hero-public {
    padding: 48px 0 44px;
  }

  table.data-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .plan-tagline {
    min-height: 0;
  }
}

/* ---------- Banner de verificação de e-mail ---------- */

.verify-banner strong {
  display: block;
  margin-bottom: 4px;
}

.verify-resend-form {
  margin-top: 10px;
}

/* ---------- Trilha de auditoria ---------- */

.audit-sensitive td {
  background: #fffaf3;
}

.audit-sensitive td:first-child {
  box-shadow: inset 3px 0 0 var(--warn);
}

.audit-you {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 700;
}

.audit-unknown {
  color: var(--ink-muted);
  font-style: italic;
}

.audit-detail {
  display: block;
  color: var(--ink-muted);
  font-size: 0.82rem;
}

.audit-ip {
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
  font-size: 0.85rem;
}

/* ---------- Aviso de retenção ---------- */

.expiry-warning {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: #fff4e5;
  color: var(--warn);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.expiry-ok {
  color: var(--border-soft);
}

/* ---------- Zona de perigo empilhada (excluir conta) ---------- */

.danger-zone-stacked {
  display: block;
}

.danger-zone-stacked p {
  max-width: 70ch;
  margin-bottom: 10px;
}

.danger-zone-stacked form {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #f2c6c3;
  max-width: 420px;
}

/* ---------- Alerta de integridade (injeção de prompt) ---------- */

.integrity-alert {
  margin-bottom: 24px;
  padding: 18px 22px;
  border: 2px solid var(--warn);
  border-left-width: 6px;
  border-radius: var(--radius);
  background: #fff8ec;
}

.integrity-alert h2 {
  margin: 0 0 8px;
  color: #7a4600;
  font-size: 1.05rem;
}

.integrity-alert p {
  margin: 0 0 8px;
  color: #7a4600;
  font-size: 0.92rem;
}

.integrity-alert p:last-child {
  margin-bottom: 0;
}

.integrity-detail {
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(161, 92, 0, 0.1);
  font-size: 0.85rem !important;
  word-break: break-word;
}

.integrity-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #fff4e5;
  color: var(--warn);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ---------- Verificação em duas etapas ---------- */

.code-input {
  font-size: 1.3rem;
  letter-spacing: 0.25em;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.mfa-setup {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: start;
  margin: 20px 0 24px;
}

.mfa-qr svg {
  width: 180px;
  height: 180px;
  display: block;
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 8px;
}

.recovery-card {
  border-color: var(--warn);
  border-width: 2px;
  background: #fff8ec;
}

.recovery-codes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.recovery-codes li {
  padding: 9px 12px;
  border: 1px solid #f0d9b5;
  border-radius: 6px;
  background: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-align: center;
}

@media (max-width: 640px) {
  .mfa-setup {
    grid-template-columns: 1fr;
  }
}

/* Plano ainda sem forma de contratar: parece rótulo, não botão clicável. */
.plan-soon {
  cursor: default;
  opacity: 0.75;
  border-style: dashed;
}
