/* Lyzer Canal de Denúncias
   Based on Lyzer Desk Booking styles.css (dark theme, perform topbar, panels, tables, flash, auth page).
   Desk-map rules removed; public-page, form, stepper, timeline and case components added.
   Inter is self-hosted: public pages must not call Google Fonts (it would leak visitor IPs). */

@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/inter-latin-700-normal.woff2') format('woff2'); }

/* ========================
   DARK THEME VARIABLES
   ======================== */
:root {
  --bg: #1f2526;
  --card: #272e2f;
  --card-solid: #272e2f;
  --surface-2: #2e3637;
  --surface-3: #374142;
  --text: #ffffff;
  --text-body: rgba(255, 255, 255, 0.82);
  --muted: rgba(255, 255, 255, 0.60);
  --text-muted: rgba(255, 255, 255, 0.35);
  --border: rgba(212, 223, 213, 0.18);
  --border-subtle: rgba(212, 223, 213, 0.10);
  --border-strong: rgba(212, 223, 213, 0.30);
  --primary: #ff6737;
  --primary-soft: rgba(255, 103, 55, 0.12);
  --primary-hover: #e8542a;
  --violet: #b78af8;
  --violet-soft: rgba(183, 138, 248, 0.12);
  --success: #4ade80;
  --success-soft: rgba(74, 222, 128, 0.10);
  --warning: #facc15;
  --warning-soft: rgba(250, 204, 21, 0.12);
  --danger: #f87171;
  --danger-dark: #ef4444;
  --danger-soft: rgba(248, 113, 113, 0.12);
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.30);
  --radius-sm: 8px;
  --radius: 12px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}
a { color: var(--primary); text-decoration: none; cursor: pointer; }
a:hover { color: var(--primary-hover); }
button, input, select, textarea { font: inherit; }
h1, h2, h3, h4 { font-family: var(--font); letter-spacing: -0.02em; line-height: 1.2; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--primary); color: #fff; padding: 8px 12px; border-radius: var(--radius-sm); }
.skip-link:focus { left: 8px; color: #fff; }

/* ========================
   BUTTONS
   ======================== */
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--primary);
  color: white;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  min-height: 40px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
button:hover, .btn:hover { color: white; transform: translateY(-1px); box-shadow: 0 8px 18px rgba(255, 103, 55, 0.28); }
button:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
button.danger, .btn.danger { background: var(--danger-dark); }
button.danger:hover, .btn.danger:hover { box-shadow: 0 8px 18px rgba(239, 68, 68, 0.28); }
.secondary-btn, .btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}
.secondary-btn:hover, .btn-secondary:hover { color: var(--text); background: var(--surface-3); border-color: var(--border-strong); box-shadow: none; transform: none; }
.btn-lg { min-height: 48px; padding: 12px 22px; font-size: 15px; }
.btn-small { min-height: 32px; padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; }
.link-button {
  background: transparent; color: var(--primary); border: 0; padding: 0; min-height: 0;
  font-weight: 500; font-size: inherit;
}
.link-button:hover { background: transparent; color: var(--primary-hover); box-shadow: none; transform: none; text-decoration: underline; }

/* ========================
   FORMS
   ======================== */
input[type="text"], input[type="email"], input[type="tel"], input[type="search"], input[type="password"],
input[type="datetime-local"], input[type="date"], input[type="number"], select, textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-top: 6px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 15px;
}
input::placeholder, textarea::placeholder { color: var(--text-muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: rgba(255, 103, 55, 0.6); box-shadow: 0 0 0 3px rgba(255, 103, 55, 0.15); }
textarea { resize: vertical; min-height: 120px; line-height: 1.55; }
select { cursor: pointer; }
input[type="file"] {
  width: 100%; margin-top: 6px; padding: 10px; color: var(--muted);
  border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-2);
}
input[type="file"]::file-selector-button {
  font: inherit; font-weight: 600; font-size: 13px; margin-right: 12px; padding: 6px 12px;
  border-radius: 6px; border: 1px solid var(--border); background: var(--surface-3); color: var(--text); cursor: pointer;
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--primary); width: 18px; height: 18px; margin: 0; flex: 0 0 auto; }
label { font-weight: 500; font-size: 13px; color: var(--muted); }
.form-stack { display: grid; gap: 16px; }
.field { display: grid; gap: 0; }
.field-label { font-size: 14px; font-weight: 600; color: var(--text); }
.field-optional { font-weight: 400; color: var(--text-muted); }
.field-help { margin: 6px 0 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.field-error { margin: 6px 0 0; font-size: 13px; color: var(--danger); font-weight: 500; }
.field-counter { font-size: 12px; color: var(--text-muted); text-align: right; margin-top: 4px; }
.choice-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.choice-pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; min-height: 44px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2);
  color: var(--text); font-size: 14px; cursor: pointer;
}
.choice-pill:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.check-row {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2);
  color: var(--text-body); font-size: 14px; font-weight: 400; cursor: pointer; line-height: 1.5;
}
.check-row input { margin-top: 2px; }
.check-row:has(input:checked) { border-color: rgba(255, 103, 55, 0.45); }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.small { font-size: 13px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.eyebrow {
  margin: 0 0 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-muted);
}

/* ========================
   FLASH
   ======================== */
.flash { padding: 14px 16px; border-radius: 10px; font-weight: 600; font-size: 14px; }
.flash-error { background: var(--danger-soft); color: var(--danger); border: 1px solid rgba(248, 113, 113, 0.20); }
.flash-success { background: var(--success-soft); color: var(--success); border: 1px solid rgba(74, 222, 128, 0.18); }
.flash-warning { background: var(--warning-soft); color: var(--warning); border: 1px solid rgba(250, 204, 21, 0.22); }
.flash-info { background: var(--violet-soft); color: var(--violet); border: 1px solid rgba(183, 138, 248, 0.22); }
.flash ul { margin: 6px 0 0; padding-left: 18px; font-weight: 500; }

/* ========================
   PANELS, CARDS, STATS
   ======================== */
.panel, .side-card, .hero-card {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.15s;
}
.panel:hover { border-color: var(--border-strong); }
.panel > h2, .panel-header-row h2, .side-card h3 {
  margin: 0 0 12px; font-size: 15px; font-weight: 600; color: var(--text); letter-spacing: -0.01em;
}
.panel-header-row { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; margin-bottom: 14px; flex-wrap: wrap; }
.panel-header-row h2 { margin: 0; }
.panel-copy, .admin-copy { color: var(--muted); margin: 0 0 12px; font-size: 13px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stats-grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.stat-card {
  border-radius: 10px; padding: 16px; background: var(--surface-2); border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 8px; color: var(--text);
}
.stat-card span { color: var(--muted); font-size: 12px; line-height: 1.35; }
.stat-card strong { font-size: 26px; font-weight: 600; }
a.stat-card:hover { border-color: var(--border-strong); color: var(--text); }
.stat-card-primary { background: linear-gradient(135deg, #ff6737, #e8542a); color: white; border-color: rgba(255, 103, 55, 0.30); }
.stat-card-primary span { color: rgba(255, 255, 255, 0.78); }
.stat-card-warn { background: var(--warning-soft); border-color: rgba(250, 204, 21, 0.25); color: var(--warning); }
.stat-card-warn span { color: rgba(250, 204, 21, 0.75); }
.stat-card-danger { background: var(--danger-soft); border-color: rgba(248, 113, 113, 0.25); color: var(--danger); }
.stat-card-danger span { color: rgba(248, 113, 113, 0.75); }

/* ========================
   BADGES
   ======================== */
.badge, .meta-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-weight: 600; font-size: 12px; line-height: 1.5; white-space: nowrap;
  background: var(--surface-3); color: var(--muted); border: 1px solid var(--border);
}
.badge-received { background: var(--violet-soft); color: var(--violet); border-color: rgba(183, 138, 248, 0.25); }
.badge-under_analysis { background: rgba(96, 165, 250, 0.12); color: #93c5fd; border-color: rgba(96, 165, 250, 0.25); }
.badge-measures_proposed { background: var(--primary-soft); color: var(--primary); border-color: rgba(255, 103, 55, 0.25); }
.badge-measures_applied { background: var(--success-soft); color: var(--success); border-color: rgba(74, 222, 128, 0.22); }
.badge-closed { background: var(--surface-3); color: var(--muted); }
.badge-ok { background: var(--success-soft); color: var(--success); border-color: rgba(74, 222, 128, 0.22); }
.badge-warn { background: var(--warning-soft); color: var(--warning); border-color: rgba(250, 204, 21, 0.25); }
.badge-overdue, .badge-danger { background: var(--danger-soft); color: var(--danger); border-color: rgba(248, 113, 113, 0.25); }
.badge-done { background: var(--surface-3); color: var(--muted); }
.badge-info { background: var(--violet-soft); color: var(--violet); border-color: rgba(183, 138, 248, 0.25); }
.count-dot {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700;
}

/* ========================
   TABLES
   ======================== */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; background: var(--card); }
th, td { text-align: left; border-bottom: 1px solid var(--border); padding: 12px 14px; vertical-align: top; }
th {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted);
  background: var(--surface-2); font-weight: 600; white-space: nowrap;
}
td { background: var(--card); font-size: 13px; }
tr:last-child td { border-bottom: none; }
tr.row-link:hover td { background: var(--surface-2); }
td.nowrap, th.nowrap { white-space: nowrap; }
.empty-row td { text-align: center; color: var(--muted); padding: 28px; }

/* ========================
   PERFORM TOPBAR (back office)
   ======================== */
.perform-topbar {
  position: sticky; top: 0; z-index: 20; padding: 14px 22px;
  background: var(--card); border-bottom: 1px solid var(--border); backdrop-filter: blur(14px);
}
.perform-topbar-inner { max-width: 1320px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.perform-topbar-brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.perform-topbar-brand:hover { color: var(--text); }
.perform-topbar-brand-name { font-size: 15px; font-weight: 600; color: var(--text); letter-spacing: -0.01em; }
.perform-topbar-nav { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.btn-link {
  display: inline-flex; align-items: center; min-height: 0; color: var(--muted); background: transparent;
  padding: 6px 0; border-radius: 0; border: none; border-bottom: 2px solid transparent;
  font-weight: 500; font-size: 13px; text-decoration: none; transition: color 0.10s ease, border-color 0.10s ease; cursor: pointer;
}
.btn-link:hover { color: var(--text); background: transparent; box-shadow: none; transform: none; }
.btn-link.active-link { color: var(--text); border-bottom-color: var(--primary); }
.account-menu { position: relative; }
.account-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0; background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--shadow); min-width: 200px; z-index: 100; overflow: hidden;
}
.account-dropdown-meta { padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.account-dropdown-meta strong { display: block; color: var(--text); font-size: 13px; }
.account-dropdown-item {
  display: block; width: 100%; padding: 10px 14px; color: var(--text); font-weight: 500; font-size: 13px;
  text-decoration: none; transition: background 0.10s; background: transparent; border: 0; border-radius: 0; text-align: left; min-height: 0;
}
.account-dropdown-item:hover { background: var(--surface-2); color: var(--text); box-shadow: none; transform: none; }
.account-dropdown-item-danger, .account-dropdown-item-danger:hover { color: var(--danger); }

/* ========================
   BACK OFFICE LAYOUT
   ======================== */
.container { max-width: 1320px; margin: 28px auto; padding: 0 20px 28px; }
.dashboard-shell { display: grid; gap: 18px; }
.page-title-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-title-row h1 { margin: 0; font-size: 22px; font-weight: 600; }
.page-title-row p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.filters-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 10px; align-items: end; }
.filters-form label { display: grid; }
.filters-form .filter-actions { display: flex; gap: 8px; }
.case-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(320px, 1fr); gap: 18px; align-items: start; }
.case-column { display: grid; gap: 18px; align-content: start; min-width: 0; }
.case-header { display: grid; gap: 14px; }
.case-header-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.case-code { margin: 0; font-family: var(--mono); font-size: 22px; font-weight: 600; letter-spacing: 0.02em; }
.meta-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.kv { display: grid; gap: 4px; padding: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; }
.kv span { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); font-weight: 600; }
.kv strong { font-size: 14px; font-weight: 600; }
.kv small { color: var(--muted); font-size: 12px; }
.prose-block {
  white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 16px; font-size: 14px; line-height: 1.6; color: var(--text-body); margin: 0;
}
.detail-list { display: grid; gap: 14px; margin: 0; }
.detail-list dt { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); font-weight: 600; margin-bottom: 6px; }
.detail-list dd { margin: 0; }
.attachment-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.attachment-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); font-size: 13px; }
.attachment-list form { margin: 0; }
.inline-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.inline-form label { flex: 1 1 180px; }
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.danger-zone { border-color: rgba(248, 113, 113, 0.30); }
.danger-zone:hover { border-color: rgba(248, 113, 113, 0.45); }
.danger-zone h2 { color: var(--danger); }
.audit-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; max-height: 360px; overflow-y: auto; }
.audit-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border-subtle); font-size: 12px; color: var(--muted); }
.audit-list li:last-child { border-bottom: none; }
.audit-list code { color: var(--text); font-family: var(--mono); font-size: 12px; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.secret-box {
  display: grid; gap: 14px; padding: 20px; border-radius: var(--radius); background: var(--surface-2);
  border: 1px solid rgba(255, 103, 55, 0.35);
}
.identity-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }

/* Conversation thread (shared by back office and tracking page) */
.thread { display: grid; gap: 12px; }
.message {
  display: grid; gap: 8px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface-2); max-width: 92%;
}
.message-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.message-meta strong { color: var(--text); font-weight: 600; }
.message-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.6; color: var(--text-body); margin: 0; }
.message-from-reporter { justify-self: end; background: rgba(255, 103, 55, 0.08); border-color: rgba(255, 103, 55, 0.25); }
.message-to-reporter { justify-self: start; }
.message-note { max-width: 100%; background: var(--violet-soft); border-color: rgba(183, 138, 248, 0.25); }
.message-flagged { border-color: rgba(250, 204, 21, 0.45); }
.message .attachment-list li { background: rgba(0, 0, 0, 0.12); }

/* ========================
   AUTH PAGE (from Desk Booking, light variables scoped to the page)
   ======================== */
.perform-auth-page {
  --bg: #f5f7fa;
  --card: rgba(255, 255, 255, 0.92);
  --text: #1f2937;
  --muted: #6b7280;
  --border: rgba(207, 216, 232, 0.92);
  --primary: #ff6737;
  --primary-soft: #fff0eb;
  --shadow: 0 18px 42px rgba(28, 36, 53, 0.10);
  --rhino-200: #cfd8e8;
  --rhino-700: #344a70;
  --rhino-950: #1c2435;
  min-height: 100vh;
  color: var(--text);
  background: linear-gradient(90deg, #f9d2c2 0%, #f7c5b0 43%, #f5f7fa 43%, #f5f7fa 100%);
}
.perform-auth-page .flash-error { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.perform-auth-page .flash-success { background: #dcfce7; color: #15803d; border-color: #bbf7d0; }
.perform-auth-page .flash-info { background: #f3e8ff; color: #6b21a8; border-color: #e9d5ff; }
.perform-auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, 0.95fr) minmax(420px, 1.05fr); }
.perform-auth-visual { position: relative; overflow: hidden; padding: 64px 52px; display: flex; align-items: center; justify-content: center; }
.perform-auth-visual-layer { position: absolute; background: rgba(255, 255, 255, 0.28); pointer-events: none; }
.perform-auth-visual .layer-one { width: 78%; height: 68%; transform: rotate(-8deg); left: 4%; top: 10%; }
.perform-auth-visual .layer-two { width: 62%; height: 120%; transform: rotate(20deg); right: 18%; top: -16%; background: rgba(255, 255, 255, 0.36); }
.perform-auth-visual-content { position: relative; z-index: 1; width: min(420px, 100%); display: grid; gap: 28px; }
.perform-auth-copy { display: grid; gap: 12px; }
.perform-auth-kicker { margin: 0; color: var(--rhino-700); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.perform-auth-copy h1 { margin: 0; font-size: clamp(30px, 4vw, 44px); line-height: 1.05; color: var(--rhino-950); }
.perform-auth-copy p { margin: 0; font-size: 16px; line-height: 1.6; color: rgba(28, 36, 53, 0.82); }
.perform-auth-status-stack { display: grid; gap: 12px; max-width: 320px; }
.perform-auth-status-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.55); border-radius: 10px; padding: 12px 14px; box-shadow: 0 10px 22px rgba(28, 36, 53, 0.06);
}
.perform-auth-status-card span { font-size: 12px; color: var(--muted); }
.perform-auth-status-card strong { font-size: 13px; color: var(--rhino-950); }
.perform-auth-form-panel { display: flex; align-items: center; justify-content: center; background: #f7f8fb; border-top-left-radius: 28px; border-bottom-left-radius: 28px; }
.perform-auth-form-wrap { width: min(420px, calc(100% - 48px)); display: grid; gap: 22px; }
.perform-auth-brand { display: grid; justify-items: center; gap: 14px; text-align: center; }
.perform-auth-brand h2 { margin: 0; font-size: 28px; color: var(--rhino-950); }
.perform-auth-brand p { margin: 6px 0 0; color: var(--muted); }
.perform-auth-form { display: grid; gap: 16px; }
.perform-auth-form label { font-size: 13px; font-weight: 500; color: var(--muted); }
.perform-auth-form input { height: 44px; margin-top: 7px; border-radius: 8px; border-color: var(--rhino-200); background: white; color: #1f2937; }
.perform-primary-btn { margin-top: 6px; height: 44px; border-radius: 6px; background: linear-gradient(135deg, #ff6a00, #f97316); box-shadow: none; width: 100%; }
.perform-primary-btn:hover { box-shadow: 0 10px 18px rgba(249, 115, 22, 0.22); transform: none; }
.perform-auth-footer { display: grid; gap: 8px; text-align: center; }
.perform-auth-footer p { margin: 0; }

/* ========================
   PUBLIC PAGES (Portuguese, reporter-facing)
   ======================== */
.public-page { font-size: 16px; min-height: 100vh; display: flex; flex-direction: column; }
.public-shell { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 20px; }
.public-header { border-bottom: 1px solid var(--border-subtle); }
.public-header-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 18px; padding-bottom: 18px; flex-wrap: wrap; }
.brand-lockup { display: inline-flex; align-items: center; gap: 12px; color: var(--text); }
.brand-lockup:hover { color: var(--text); }
.brand-lockup-text { display: grid; line-height: 1.15; }
.brand-lockup-text strong { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.brand-lockup-text span { font-size: 12px; color: var(--muted); font-weight: 500; }
.public-nav { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.public-nav a { color: var(--muted); font-size: 14px; font-weight: 500; }
.public-nav a:hover, .public-nav a[aria-current="page"] { color: var(--text); }
.public-main { flex: 1; padding-top: 40px; padding-bottom: 64px; }
.public-main > * + * { margin-top: 40px; }
.hero { padding-top: 12px; }
.hero h1 { margin: 0 0 20px; font-size: clamp(32px, 6vw, 44px); font-weight: 700; letter-spacing: -0.03em; }
.hero .lead { font-size: 17px; line-height: 1.7; color: var(--text-body); margin: 0 0 14px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.page-heading h1 { margin: 0 0 12px; font-size: clamp(28px, 5vw, 36px); font-weight: 700; letter-spacing: -0.03em; }
.page-heading p { margin: 0; color: var(--text-body); line-height: 1.7; }
.content-section { scroll-margin-top: 20px; }
.content-section h2 { margin: 0 0 14px; font-size: 21px; font-weight: 600; }
.content-section h3 { margin: 22px 0 8px; font-size: 16px; font-weight: 600; }
.content-section p, .content-section li { color: var(--text-body); line-height: 1.7; }
.content-section p { margin: 0 0 12px; }
.content-section ul, .content-section ol { margin: 0 0 12px; padding-left: 22px; }
.content-section li + li { margin-top: 6px; }
.content-section ul ul { margin-top: 6px; }
.section-divider { border: none; border-top: 1px solid var(--border-subtle); margin: 0; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; }
.toc a {
  display: inline-flex; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--muted); font-size: 13px; font-weight: 500;
}
.toc a:hover { color: var(--text); border-color: var(--border-strong); }
.info-card { border: 1px solid var(--border); background: var(--card); border-radius: var(--radius); padding: 20px 22px; }
.info-card > :last-child { margin-bottom: 0; }
.content-section > .info-card { margin: 0 0 12px; }
.notice { border-left: 3px solid var(--violet); }
.notice-warning { border-left-color: var(--warning); }
.notice-primary { border-left-color: var(--primary); }
.people-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.person-card { border: 1px solid var(--border); background: var(--card); border-radius: var(--radius); padding: 16px; }
.person-card strong { display: block; font-size: 15px; }
.person-card span { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }
.deadline-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0 18px; }
.deadline-card { border: 1px solid var(--border); background: var(--card); border-radius: var(--radius); padding: 16px; display: grid; gap: 6px; align-content: start; }
.deadline-card strong { font-size: 26px; font-weight: 700; color: var(--primary); letter-spacing: -0.02em; }
.deadline-card span { font-size: 13px; color: var(--muted); line-height: 1.45; }
.public-footer { border-top: 1px solid var(--border-subtle); color: var(--muted); font-size: 13px; }
.public-footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 24px; padding-bottom: 32px; flex-wrap: wrap; }
.public-footer a { color: var(--muted); }
.public-footer a:hover { color: var(--text); }

/* Report form */
.report-form { display: grid; gap: 18px; }
.form-card { border: 1px solid var(--border); background: var(--card); border-radius: var(--radius); padding: 22px; display: grid; gap: 18px; min-width: 0; }
fieldset.form-card { margin: 0; }
.report-form > .form-card, .report-form > .disclosure { margin-top: 0; }
.form-card legend { float: left; width: 100%; padding: 0; margin: 0; }
.form-card legend + * { clear: both; }
.form-card-title { display: flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 600; color: var(--text); }
.step-number {
  display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary); font-size: 13px; font-weight: 700; flex: 0 0 auto;
}
.form-card-intro { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.disclosure { border: 1px solid var(--border); background: var(--card); border-radius: var(--radius); }
.disclosure > summary {
  list-style: none; cursor: pointer; padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 17px; font-weight: 600;
}
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary::after { content: '+'; font-size: 22px; font-weight: 400; color: var(--muted); line-height: 1; }
.disclosure[open] > summary::after { content: '\2212'; }
.disclosure-body { padding: 0 22px 22px; display: grid; gap: 16px; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-submit { display: grid; gap: 12px; }

/* Confirmation */
.secret-panel { border: 1px solid rgba(255, 103, 55, 0.4); background: linear-gradient(180deg, rgba(255, 103, 55, 0.08), rgba(255, 103, 55, 0.02)); border-radius: var(--radius); padding: 24px; display: grid; gap: 20px; }
.secret-item { display: grid; gap: 8px; }
.secret-item-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; }
.secret-value-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.secret-value {
  font-family: var(--mono); font-size: clamp(20px, 5vw, 30px); font-weight: 600; letter-spacing: 0.04em; color: var(--text);
  background: rgba(0, 0, 0, 0.22); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; overflow-wrap: anywhere;
  user-select: all;
}
.secret-value-key { font-size: clamp(16px, 4.2vw, 24px); }

/* Tracking stepper: 5 dots on a line, completed orange, current pulsing, future muted */
.stepper { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: relative; }
.stepper li { position: relative; display: grid; justify-items: center; gap: 10px; text-align: center; padding: 0 4px; }
.stepper li::before {
  content: ''; position: absolute; top: 9px; left: calc(-50% + 12px); right: calc(50% + 12px); height: 2px; background: var(--border);
}
.stepper li:first-child::before { display: none; }
.stepper li.is-done::before, .stepper li.is-current::before { background: var(--primary); }
.step-dot { width: 20px; height: 20px; border-radius: 999px; border: 2px solid var(--border-strong); background: var(--bg); position: relative; z-index: 1; }
.stepper li.is-done .step-dot { background: var(--primary); border-color: var(--primary); }
.stepper li.is-current .step-dot { background: var(--primary); border-color: var(--primary); animation: pulse-orange 2s infinite; }
.step-label { font-size: 13px; font-weight: 600; color: var(--muted); line-height: 1.3; }
.stepper li.is-done .step-label, .stepper li.is-current .step-label { color: var(--text); }
.step-date { font-size: 12px; color: var(--text-muted); }
@keyframes pulse-orange {
  0% { box-shadow: 0 0 0 0 rgba(255, 103, 55, 0.45); }
  70% { box-shadow: 0 0 0 10px rgba(255, 103, 55, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 103, 55, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .stepper li.is-current .step-dot { animation: none; box-shadow: 0 0 0 4px rgba(255, 103, 55, 0.3); }
  html { scroll-behavior: auto; }
}

/* Error page */
.error-shell { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 40px 20px; }
.error-shell h1 { font-size: 28px; margin: 0 0 12px; }
.error-shell p { color: var(--muted); margin: 0 0 20px; }

/* ========================
   RESPONSIVE
   ======================== */
@media (max-width: 1180px) {
  .perform-auth-shell { grid-template-columns: 1fr; }
  .perform-auth-form-panel { border-radius: 0; padding: 48px 0 64px; }
  .perform-topbar-inner { flex-direction: column; align-items: flex-start; }
  .stats-grid-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .case-layout { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .perform-auth-visual { min-height: 320px; padding: 48px 28px; }
  .filters-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .perform-auth-page { background: #f7c5b0; }
  .perform-auth-form-wrap { width: min(100%, calc(100% - 32px)); }
  .perform-topbar { padding: 12px; }
  .container { padding: 0 12px 18px; margin-top: 18px; }
  .panel, .side-card, .hero-card { padding: 16px; }
  .stats-grid, .stats-grid-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters-form { grid-template-columns: 1fr; }
  .people-grid, .deadline-grid, .two-col { grid-template-columns: 1fr; }
  .form-card { padding: 18px 16px; }
  .disclosure > summary { padding: 16px; }
  .disclosure-body { padding: 0 16px 16px; }
  .message { max-width: 100%; }
  .public-main { padding-top: 28px; }
  .stepper { grid-template-columns: 1fr; gap: 14px; }
  .stepper li { grid-template-columns: 20px 1fr; justify-items: start; text-align: left; column-gap: 12px; row-gap: 2px; padding: 0; }
  .stepper li::before { top: -14px; bottom: auto; left: 9px; right: auto; width: 2px; height: 14px; }
  .step-dot { grid-row: span 2; }
}
