/* =====================================================================
   CLIENTE NOTA 10 — Design system
   ===================================================================== */
:root {
  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;

  --bg: #f5f6fb;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --border: #e6e8f0;
  --border-strong: #d5d9e5;

  --text: #0f172a;
  --text-2: #475569;
  --muted: #8a94a8;

  --primary: #4f46e5;
  --primary-600: #4338ca;
  --primary-50: #eef2ff;
  --primary-100: #e0e7ff;
  --accent: #0ea5a4;

  --sim: #4f46e5;
  --nao: #d9dce6;

  --ok: #15803d;      --ok-bg: #e8f7ee;
  --warn: #b45309;    --warn-bg: #fdf3e2;
  --danger: #c62828;  --danger-bg: #fdecec;
  --info: #0369a1;    --info-bg: #e6f4fb;

  --side-1: #0d0b2b;
  --side-2: #1b1854;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, .18);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.01em; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }

/* ---------------------------------------------------------------- botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer; font-weight: 600; font-size: 13.5px;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .05s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 14px rgba(79, 70, 229, .28); }
.btn-primary:hover:not(:disabled) { background: var(--primary-600); }
.btn-ghost { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); border-color: #c4c9d8; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn-icon { width: 36px; height: 36px; padding: 0; }

/* ---------------------------------------------------------------- formulários */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.input, .select {
  height: 42px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface);
  outline: none; transition: border-color .15s, box-shadow .15s; width: 100%;
}
.input:focus, .select:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(79, 70, 229, .14); }
.input-icon { position: relative; }
.input-icon svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.input-icon .input { padding-left: 40px; }
.input-icon .toggle-pass { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; cursor: pointer; color: var(--muted); padding: 6px; display: flex; }
.input-icon .toggle-pass svg { position: static; transform: none; pointer-events: auto; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.check input { width: 16px; height: 16px; accent-color: var(--primary); }

/* ---------------------------------------------------------------- alertas */
.alert { padding: 11px 14px; border-radius: var(--radius-sm); font-size: 13px; display: flex; gap: 10px; align-items: flex-start; }
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.alert-erro { background: var(--danger-bg); color: var(--danger); }
.alert-ok { background: var(--ok-bg); color: var(--ok); }
.alert-warn { background: var(--warn-bg); color: var(--warn); }
.alert-info { background: var(--info-bg); color: var(--info); }

/* =====================================================================
   LOGIN
   ===================================================================== */
.login {
  min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr;
  background: var(--surface);
}
.login-hero {
  position: relative; overflow: hidden; color: #fff; padding: 48px 56px;
  display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(900px 500px at 10% 10%, rgba(99, 102, 241, .55), transparent 60%),
    radial-gradient(700px 500px at 90% 90%, rgba(14, 165, 164, .45), transparent 60%),
    linear-gradient(135deg, #0d0b2b 0%, #1e1a5e 55%, #13294b 100%);
}
.login-hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%);
}
.login-hero > * { position: relative; z-index: 1; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 42px; height: 42px; flex: none; }
.brand-name { font-weight: 800; font-size: 18px; letter-spacing: -.02em; line-height: 1.1; }
.brand-sub { font-size: 11.5px; opacity: .7; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
.hero-copy h1 { font-size: 40px; line-height: 1.12; font-weight: 800; letter-spacing: -.03em; max-width: 520px; }
.hero-copy h1 span { background: linear-gradient(90deg, #a5b4fc, #5eead4); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-copy p { font-size: 16px; opacity: .78; max-width: 460px; margin: 18px 0 0; }
.hero-cards { display: flex; gap: 14px; flex-wrap: wrap; }
.glass {
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(10px); border-radius: 16px; padding: 16px 18px; min-width: 150px;
}
.glass .g-label { font-size: 12px; opacity: .7; }
.glass .g-value { font-size: 22px; font-weight: 800; margin-top: 2px; }
.glass .g-bar { height: 6px; border-radius: 6px; background: rgba(255,255,255,.15); margin-top: 10px; overflow: hidden; }
.glass .g-bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #818cf8, #2dd4bf); }
.hero-foot { font-size: 12px; opacity: .55; }

.login-panel { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.login-card { width: 100%; max-width: 400px; }
.login-card h2 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.login-card .sub { color: var(--text-2); margin: 6px 0 28px; }
.login-card .alert { margin-bottom: 16px; }
.login-card .btn-block { height: 46px; font-size: 14.5px; margin-top: 6px; }
.login-mobile-brand { display: none; margin-bottom: 28px; color: var(--text); }
.login-perfis { margin-top: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.perfil-chip { border: 1px solid var(--border); border-radius: 12px; padding: 12px; font-size: 12px; color: var(--text-2); }
.perfil-chip strong { display: block; color: var(--text); font-size: 13px; margin-bottom: 2px; }

@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .login-mobile-brand { display: flex; }
}

/* =====================================================================
   SHELL DA APLICAÇÃO
   ===================================================================== */
.shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--side-1), var(--side-2)); color: #c7c9e8; padding: 22px 14px;
}
.sidebar .brand { padding: 0 8px 22px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 14px; }
.nav-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: #7f82b5; padding: 14px 12px 6px; font-weight: 700; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: #c7c9e8; font-weight: 500; transition: background .15s, color .15s; margin-bottom: 2px;
}
.nav a svg { width: 19px; height: 19px; opacity: .85; }
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a.active { background: rgba(129, 140, 248, .18); color: #fff; box-shadow: inset 3px 0 0 #818cf8; }
.sidebar-foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,.08); padding-top: 14px; }
.user-card { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; }
.avatar {
  width: 36px; height: 36px; border-radius: 10px; flex: none; display: grid; place-items: center;
  font-weight: 700; color: #fff; background: linear-gradient(135deg, #6366f1, #0ea5a4);
}
.user-card .u-name { color: #fff; font-weight: 600; font-size: 13px; line-height: 1.2; }
.user-card .u-role { font-size: 11.5px; color: #9ea1d1; }
.user-actions { display: flex; gap: 6px; margin-top: 8px; }
.user-actions button {
  flex: 1; height: 34px; border-radius: 9px; border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04); color: #d6d8f3; cursor: pointer; font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.user-actions button:hover { background: rgba(255,255,255,.1); }
.user-actions svg { width: 15px; height: 15px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px;
  padding: 16px 32px; background: rgba(245, 246, 251, .85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar h1 { font-size: 20px; font-weight: 750; }
.topbar .crumb { font-size: 12.5px; color: var(--muted); }
.topbar .spacer { flex: 1; }
.menu-btn { display: none; }
.content { padding: 28px 32px 48px; max-width: 1400px; width: 100%; }

@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 50; width: 260px; left: 0; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .menu-btn { display: inline-flex; }
  .topbar, .content { padding-left: 16px; padding-right: 16px; }
}

/* ---------------------------------------------------------------- cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 22px; }
.card-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.card-head h3 { font-size: 15px; font-weight: 700; }
.card-head .desc { font-size: 12.5px; color: var(--muted); }
.card-head .spacer { flex: 1; }
.grid { display: grid; gap: 18px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-2, .grid-3-1 { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .grid-4 { grid-template-columns: 1fr; } }
.stack { display: flex; flex-direction: column; gap: 18px; }

/* KPI */
.kpi { padding: 20px 22px; position: relative; overflow: hidden; }
.kpi .k-top { display: flex; align-items: center; justify-content: space-between; }
.kpi .k-label { font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.kpi .k-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); }
.kpi .k-icon svg { width: 19px; height: 19px; }
.kpi .k-value { font-size: 30px; font-weight: 800; letter-spacing: -.03em; margin-top: 10px; line-height: 1.1; }
.kpi .k-foot { font-size: 12px; color: var(--muted); margin-top: 6px; }
.kpi.highlight { background: linear-gradient(135deg, #4f46e5, #3730a3 60%, #0f766e); color: #fff; border: 0; }
.kpi.highlight .k-label, .kpi.highlight .k-foot { color: rgba(255,255,255,.8); }
.kpi.highlight .k-icon { background: rgba(255,255,255,.15); color: #fff; }
.progress { height: 6px; border-radius: 6px; background: rgba(255,255,255,.22); margin-top: 12px; overflow: hidden; }
.progress i { display: block; height: 100%; background: #fff; border-radius: 6px; }

/* ---------------------------------------------------------------- gráficos de barras */
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.bars { padding: 10px 22px 18px; }
.bar-row { display: grid; grid-template-columns: minmax(120px, 210px) 1fr 104px; align-items: center; gap: 14px; padding: 7px 0; border-radius: 8px; }
.bar-row:hover { background: var(--surface-2); }
.bar-row .b-label { font-size: 12.5px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .b-label small { display: block; color: var(--muted); font-weight: 500; font-size: 11px; }
.bar-track { height: 14px; display: flex; gap: 2px; }
.bar-seg { height: 100%; min-width: 0; }
.bar-seg:first-child { border-radius: 4px 0 0 4px; }
.bar-seg:last-child { border-radius: 0 4px 4px 0; }
.bar-seg:only-child { border-radius: 4px; }
.bar-seg.sim { background: var(--sim); }
.bar-seg.nao { background: var(--nao); }
.bar-row .b-value { font-size: 12.5px; color: var(--text-2); text-align: right; font-variant-numeric: tabular-nums; }
.bar-row .b-value strong { color: var(--text); }
.bars-more { padding: 0 22px 18px; }
.bars-wide .bar-row { grid-template-columns: minmax(160px, 380px) 1fr 104px; }
@media (max-width: 640px) { .bar-row, .bars-wide .bar-row { grid-template-columns: 1fr 72px; } .bar-row .bar-track { grid-column: 1 / -1; grid-row: 2; } }

.tooltip {
  position: fixed; z-index: 100; pointer-events: none; background: #0f172a; color: #fff;
  padding: 9px 12px; border-radius: 10px; font-size: 12px; box-shadow: var(--shadow-lg); max-width: 320px;
}
.tooltip b { display: block; font-size: 12.5px; margin-bottom: 4px; }
.tooltip .t-row { display: flex; align-items: center; gap: 8px; color: #cbd5e1; }
.tooltip .t-row i { width: 8px; height: 8px; border-radius: 2px; }
.tooltip .t-row strong { color: #fff; margin-left: auto; padding-left: 12px; }

/* ---------------------------------------------------------------- tabelas */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 16px 22px; border-bottom: 1px solid var(--border); }
.toolbar .input, .toolbar .select { height: 38px; width: auto; }
.toolbar .search { flex: 1; min-width: 220px; }
.toolbar .search .input { width: 100%; }
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
  font-weight: 700; padding: 11px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr.click { cursor: pointer; }
.table tbody tr.click:hover td { background: #fafbff; }
.table .desc-cell { max-width: 460px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { padding: 48px 22px; text-align: center; color: var(--muted); }
.empty svg { width: 42px; height: 42px; color: #c3c8d6; margin-bottom: 8px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-2); flex-wrap: wrap; }
.pager .pg-btns { display: flex; gap: 6px; }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.badge svg { width: 13px; height: 13px; }
.badge-sim { background: var(--primary-50); color: var(--primary-600); }
.badge-nao { background: #f1f2f6; color: #5b6478; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-erro { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-admin { background: #f3e8ff; color: #7e22ce; }

/* mini barra em tabela */
.mini { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.mini .mini-track { flex: 1; height: 8px; border-radius: 4px; background: var(--nao); overflow: hidden; }
.mini .mini-track i { display: block; height: 100%; background: var(--sim); border-radius: 4px; }
.mini span { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; }

/* switch */
.switch { position: relative; width: 40px; height: 22px; display: inline-block; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #cfd4e0; border-radius: 22px; transition: .15s; cursor: pointer; }
.switch span::before { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::before { transform: translateX(18px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 4px rgba(79, 70, 229, .2); }

/* tabs */
.tabs { display: inline-flex; gap: 4px; padding: 4px; background: #eceef5; border-radius: 12px; margin-bottom: 18px; }
.tabs a { padding: 8px 16px; border-radius: 9px; color: var(--text-2); font-weight: 600; font-size: 13px; }
.tabs a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ---------------------------------------------------------------- upload */
.dropzone {
  border: 2px dashed #c9cee0; border-radius: 16px; padding: 42px 24px; text-align: center; cursor: pointer;
  background: linear-gradient(180deg, #fbfbff, #f5f6fd); transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--primary); background: var(--primary-50); }
.dropzone .dz-icon { width: 58px; height: 58px; margin: 0 auto 14px; border-radius: 16px; display: grid; place-items: center; background: var(--surface); color: var(--primary); box-shadow: var(--shadow); }
.dropzone .dz-icon svg { width: 28px; height: 28px; }
.dropzone h3 { font-size: 16px; }
.dropzone p { color: var(--text-2); margin: 6px 0 0; font-size: 13px; }
.file-chosen { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; margin-top: 16px; background: var(--surface-2); }
.file-chosen .f-icon { width: 40px; height: 40px; border-radius: 10px; background: #e7f6ee; color: #15803d; display: grid; place-items: center; flex: none; }
.file-chosen .f-icon svg { width: 22px; height: 22px; }
.file-chosen .f-name { font-weight: 600; word-break: break-all; }
.file-chosen .f-size { font-size: 12px; color: var(--muted); }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
@media (max-width: 640px) { .modes { grid-template-columns: 1fr; } }
.mode { border: 1.5px solid var(--border); border-radius: 12px; padding: 14px 16px; cursor: pointer; display: flex; gap: 12px; align-items: flex-start; transition: border-color .15s, background .15s; }
.mode input { margin-top: 3px; accent-color: var(--primary); }
.mode strong { display: block; font-size: 13.5px; }
.mode span { font-size: 12.5px; color: var(--text-2); }
.mode:has(input:checked) { border-color: var(--primary); background: var(--primary-50); }
.mode.disabled { opacity: .5; cursor: not-allowed; }
.progress-bar { height: 8px; border-radius: 8px; background: #e7e9f2; overflow: hidden; margin-top: 16px; }
.progress-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width .2s; }
.progress-bar.indeterminate i { width: 35%; animation: indet 1.2s infinite ease-in-out; }
@keyframes indet { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }

.layout-cols { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; font-size: 12.5px; }
.layout-cols div { padding: 9px 12px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--border); }
.layout-cols div:nth-child(odd) { border-right: 1px solid var(--border); }
.layout-cols div:nth-last-child(-n+2) { border-bottom: 0; }
.layout-cols b { width: 24px; height: 24px; flex: none; border-radius: 7px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); font-size: 11.5px; }
.steps { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 13px; }
.steps li { margin-bottom: 8px; }

/* resultado */
.result-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.r-tile { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: var(--surface); }
.r-tile .r-label { font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.r-tile .r-label svg { width: 15px; height: 15px; }
.r-tile .r-value { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.r-tile.t-ok .r-label { color: var(--ok); }
.r-tile.t-warn .r-label { color: var(--warn); }
.r-tile.t-info .r-label { color: var(--info); }
.r-tile.t-erro .r-label { color: var(--danger); }
.result-hero { display: flex; align-items: center; gap: 16px; padding: 22px; border-bottom: 1px solid var(--border); }
.result-hero .rh-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--ok-bg); color: var(--ok); flex: none; }
.result-hero .rh-icon svg { width: 26px; height: 26px; }
.avisos details { border: 1px solid var(--border); border-radius: 10px; margin-top: 10px; background: var(--warn-bg); }
.avisos summary { padding: 10px 14px; cursor: pointer; font-weight: 600; color: var(--warn); font-size: 13px; }
.avisos .av-body { padding: 0 14px 12px; font-size: 12.5px; color: #6b4a12; }

/* ---------------------------------------------------------------- modal / drawer */
.overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); backdrop-filter: blur(2px); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .15s; }
.modal { width: 100%; max-width: 460px; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); animation: pop .18s; max-height: calc(100vh - 32px); overflow: auto; }
.modal-head { padding: 20px 22px 0; display: flex; align-items: center; justify-content: space-between; }
.modal-head h3 { font-size: 17px; }
.modal-body { padding: 18px 22px; }
.modal-foot { padding: 0 22px 20px; display: flex; justify-content: flex-end; gap: 10px; }
.drawer-overlay { justify-content: flex-end; padding: 0; }
.drawer { width: 100%; max-width: 560px; height: 100%; background: var(--surface); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slide .2s; }
.drawer-head { padding: 22px 24px; border-bottom: 1px solid var(--border); display: flex; gap: 12px; align-items: flex-start; }
.drawer-head .d-title { flex: 1; min-width: 0; }
.drawer-head h3 { font-size: 16px; }
.drawer-body { overflow: auto; flex: 1; }
.item-line { display: flex; align-items: center; gap: 12px; padding: 12px 24px; border-bottom: 1px solid var(--border); }
.item-line .il-text { flex: 1; min-width: 0; }
.item-line .il-text div { font-weight: 600; font-size: 13px; }
.item-line .il-text small { color: var(--muted); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.close-x { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 6px; border-radius: 8px; display: flex; }
.close-x:hover { background: var(--surface-2); color: var(--text); }
.close-x svg { width: 20px; height: 20px; }

/* toast */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { min-width: 260px; max-width: 380px; padding: 12px 16px; border-radius: 12px; background: #0f172a; color: #fff; box-shadow: var(--shadow-lg); font-size: 13px; display: flex; gap: 10px; align-items: center; animation: pop .2s; }
.toast svg { width: 18px; height: 18px; flex: none; }
.toast.ok svg { color: #4ade80; }
.toast.erro svg { color: #f87171; }

/* loader */
.spinner { width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.spinner.dark { border-color: #d7dbe7; border-top-color: var(--primary); }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { padding: 60px; display: flex; justify-content: center; }
.skeleton { background: linear-gradient(90deg, #eef0f6 25%, #f6f7fb 50%, #eef0f6 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; }
@keyframes sk { to { background-position: -200% 0; } }

.section-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.section-title h2 { font-size: 16px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
