/* Central Nohora — design tokens e componentes */
:root {
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --bg: #f6f7fb; --surface: #ffffff; --surface-2: #f9fafc; --sunken: #eef0f6;
  --border: #e4e7ef; --border-strong: #d3d8e4;
  --text: #0f172a; --text-2: #475569; --text-3: #8591a5;
  --brand: #4338ca; --brand-2: #4f46e5; --brand-soft: #eef0ff; --brand-ink: #3730a3;
  --accent: #f59e0b; --accent-soft: #fff6e5;
  --green: #047857; --green-soft: #e7f7ef; --red: #b91c1c; --red-soft: #fdecec;
  --amber: #b45309; --amber-soft: #fff4e0; --blue: #1d4ed8; --blue-soft: #e8efff;
  --gray: #475569; --gray-soft: #eef1f5; --indigo-soft: #ecebff;
  --radius: 12px; --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 16px rgba(15, 23, 42, .05);
  --shadow-lg: 0 10px 40px rgba(15, 23, 42, .18);
  --focus: 0 0 0 3px rgba(79, 70, 229, .35);
  --sidebar: #11132a; --sidebar-text: #b9bdd6; --sidebar-hover: rgba(255,255,255,.06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d17; --surface: #131627; --surface-2: #171a2e; --sunken: #0f1121;
    --border: #252a42; --border-strong: #343a58;
    --text: #e8eaf4; --text-2: #a5abc4; --text-3: #6f7694;
    --brand: #6d68f5; --brand-2: #8079ff; --brand-soft: #1d1f45; --brand-ink: #b8b5ff;
    --accent-soft: #2b2113;
    --green: #4ade80; --green-soft: #10291d; --red: #f87171; --red-soft: #321417;
    --amber: #fbbf24; --amber-soft: #2d2210; --blue: #8ab4ff; --blue-soft: #142041;
    --gray: #a5abc4; --gray-soft: #1d2135; --indigo-soft: #1f1f4a;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25); --shadow-lg: 0 10px 40px rgba(0,0,0,.6);
    --sidebar: #0a0c18; --sidebar-text: #9aa0bf;
    color-scheme: dark;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
body.no-scroll { overflow: hidden; }
a { color: var(--brand-2); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.01em; }
h1 { font-size: 23px; font-weight: 650; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-size: .92em; }
.num, .kpi-v, td.r { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); } .small { font-size: 13px; } .strong { font-weight: 600; color: var(--text); }
.t-bad { color: var(--red) !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
.ic { flex: none; }
.boot { display: grid; place-items: center; height: 100vh; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- botões ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 550; cursor: pointer; white-space: nowrap; box-shadow: var(--shadow-sm);
  transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { background: var(--surface-2); border-color: var(--text-3); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(67,56,202,.3), inset 0 1px 0 rgba(255,255,255,.12); }
.btn.primary:hover { background: var(--brand-2); }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.ghost { background: transparent; box-shadow: none; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--sunken); color: var(--text); }
.btn.ghost.danger { color: var(--red); background: transparent; } .btn.ghost.danger:hover { background: var(--red-soft); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; justify-content: center; height: 42px; }
.btn.loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.loading::after { content: ""; position: absolute; inset: 0; margin: auto; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; animation: spin .7s linear infinite; }
.btn:not(.primary):not(.danger).loading::after { border-color: var(--border); border-top-color: var(--brand); }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent; color: var(--text-2); cursor: pointer; }
.icon-btn:hover { background: var(--sunken); color: var(--text); }
.icon-btn.danger:hover { background: var(--red-soft); color: var(--red); }
.icon-btn.xs { width: 24px; height: 24px; }
.linkish { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-align: left; color: var(--text); }
.linkish:hover { color: var(--brand-2); text-decoration: underline; }
.btns { display: flex; gap: 8px; align-items: center; } .btns.wrap { flex-wrap: wrap; margin: 16px 0; } .btns.sm { margin-top: 10px; gap: 4px; flex-wrap: wrap; }
.link { font-size: 13px; font-weight: 550; display: inline-flex; align-items: center; gap: 4px; }

/* ---------- layout ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 244px; background: var(--sidebar); color: var(--sidebar-text); display: flex; flex-direction: column; padding: 18px 12px; z-index: 40;
  background-image: radial-gradient(120% 60% at 0% 0%, rgba(99,102,241,.22), transparent 60%); }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; }
.brand b { display: block; color: #fff; font-size: 15px; line-height: 1.1; } .brand span { font-size: 12px; color: #f5b54a; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
.brand.big b { color: var(--text); font-size: 17px; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.nav-link { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px; color: var(--sidebar-text); font-weight: 500; position: relative; }
.nav-link:hover { background: var(--sidebar-hover); color: #fff; text-decoration: none; }
.nav-link.active { background: rgba(129,140,248,.16); color: #fff; }
.nav-link.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.side-foot { margin-top: auto; padding: 10px 12px; color: #5e6488; font-size: 12px; }
.content { flex: 1; margin-left: 244px; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 28px;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.crumb { flex: 1; min-width: 0; display: flex; gap: 8px; align-items: center; color: var(--text-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb span:last-child { color: var(--text); font-weight: 550; } .crumb .sep { color: var(--text-3); } .crumb a { color: var(--text-2); }
.user { display: flex; align-items: center; gap: 10px; }
.user-meta { display: flex; flex-direction: column; line-height: 1.2; } .user-meta b { font-size: 13px; } .user-meta span { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 650; color: var(--brand-ink); background: var(--brand-soft); border: 1px solid var(--border); }
.avatar.lg { width: 52px; height: 52px; font-size: 20px; border-radius: 14px; background: linear-gradient(135deg, var(--brand), #7c3aed); color: #fff; border: 0; }
main { padding: 26px 28px 60px; max-width: 1360px; width: 100%; outline: none; }
main > * + * { margin-top: 18px; }
.only-mobile { display: none; }
.scrim { display: none; }
.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-h p { margin-top: 4px; }
.hero-id { display: flex; gap: 14px; align-items: center; }
.eyebrow { font-size: 12px; color: var(--brand-2); font-weight: 600; letter-spacing: .04em; margin-bottom: 2px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 13px; font-weight: 500; }
.sec { font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .09em; color: var(--text-3); }
h4.sec { margin: 18px 0 8px; }
.sec-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
section + section { margin-top: 22px; }
.grid-2 > section + section, .grid-3 > section + section, .kanban > section + section { margin-top: 0; }

/* ---------- cards / kpis ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); }
.card.flush { padding: 0; overflow: hidden; }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-h.pad { padding: 14px 18px 0; }
.pad { padding: 4px 0; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpis.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); position: relative; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
a.kpi:hover { text-decoration: none; border-color: var(--border-strong); box-shadow: var(--shadow); }
.kpi-l { font-size: 12px; color: var(--text-2); font-weight: 550; }
.kpi-v { font-size: 24px; font-weight: 650; letter-spacing: -.02em; } .kpi-v small { font-size: 15px; color: var(--text-3); font-weight: 500; }
.kpi-s { font-size: 12px; color: var(--text-3); }
.kpi::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: transparent; }
.kpi.kpi-brand { background: linear-gradient(140deg, var(--brand) 0%, #5b3fd6 100%); border-color: transparent; color: #fff; }
.kpi.kpi-brand .kpi-l, .kpi.kpi-brand .kpi-s { color: rgba(255,255,255,.78); }
.kpi.good::after { background: var(--green); } .kpi.bad::after { background: var(--red); } .kpi.warn::after { background: var(--accent); }
.kpi.bad .kpi-v { color: var(--red); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } .grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-ops { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px; align-items: start; }
.grid-ops section + section { margin-top: 0; }
.mini-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mini-kpis.four { grid-template-columns: repeat(4, 1fr); }
.mini-kpis > div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.mini-kpis span { font-size: 12px; color: var(--text-2); } .mini-kpis b { font-size: 18px; font-weight: 650; }
.mini-kpis .good b { color: var(--green); } .mini-kpis .bad b { color: var(--red); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.stack-bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; gap: 2px; background: var(--sunken); }
.stack-bar span { min-width: 6px; }
.legend { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--text-2); }
.legend li { display: flex; align-items: center; gap: 7px; } .legend i { width: 9px; height: 9px; border-radius: 3px; } .legend b { color: var(--text); font-variant-numeric: tabular-nums; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.rows li:first-child { border-top: 0; }
.rows.card li { padding: 12px 0; } .rows.card { padding: 4px 18px; }
.rows b { font-weight: 600; display: block; } .rows small { display: block; color: var(--text-3); font-size: 12.5px; }
.rows .r { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: none; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 12px; padding: 8px 0; position: relative; }
.timeline li:not(:last-child)::before { content: ""; position: absolute; left: 4px; top: 22px; bottom: -6px; width: 1px; background: var(--border); }
.timeline .dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--brand-soft); border: 2px solid var(--brand-2); margin-top: 6px; }
.timeline b { font-weight: 550; display: block; } .timeline small { display: block; color: var(--text-3); font-size: 12.5px; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; }
.dl dt { color: var(--text-3); font-size: 13px; } .dl dd { margin: 0; overflow-wrap: anywhere; }
.obs { margin-top: 14px; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; white-space: pre-wrap; color: var(--text-2); }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 10px; background: var(--sunken); border: 1px dashed var(--border-strong); color: var(--text-2); font-size: 13px; }
.notice.warn { background: var(--accent-soft); border-color: var(--accent); color: var(--amber); }
.notice .ic { margin-top: 2px; }
.welcome { padding: 40px 18px; background: radial-gradient(80% 120% at 50% 0%, var(--brand-soft), var(--surface) 70%); }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; line-height: 18px; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.tone-green { background: var(--green-soft); color: var(--green); } .tone-red { background: var(--red-soft); color: var(--red); }
.tone-amber { background: var(--amber-soft); color: var(--amber); } .tone-blue { background: var(--blue-soft); color: var(--blue); }
.tone-gray { background: var(--gray-soft); color: var(--gray); } .tone-indigo { background: var(--indigo-soft); color: var(--brand-ink); }
.tone-indigo::before { display: none; }
.tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 5px; background: var(--sunken); color: var(--text-2); border: 1px solid var(--border); letter-spacing: .02em; }

/* ---------- filtros / tabs ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters select, .filters input:not([type=search]), .inline input { height: 36px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); border-radius: 9px; padding: 0 10px; font: inherit; }
.search { flex: 1 1 260px; max-width: 420px; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 1px solid var(--border-strong); background: var(--surface); border-radius: 9px; color: var(--text-3); }
.search:focus-within { box-shadow: var(--focus); border-color: var(--brand-2); }
.search input { border: 0; outline: 0; background: transparent; font: inherit; color: var(--text); flex: 1; min-width: 0; height: 100%; }
.search input:focus-visible { box-shadow: none; }
.inline { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tab { border: 0; background: none; font: inherit; font-weight: 550; color: var(--text-2); padding: 10px 14px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: 7px; align-items: center; white-space: nowrap; }
.tab:hover { color: var(--text); } .tab.on { color: var(--brand-2); border-bottom-color: var(--brand-2); }
.tab .cnt, .kcol .cnt { font-size: 11px; font-weight: 650; background: var(--sunken); color: var(--text-2); padding: 0 7px; border-radius: 99px; line-height: 18px; }

/* ---------- tabelas ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 11.5px; font-weight: 650; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table tfoot td { background: var(--surface-2); border-top: 1px solid var(--border); border-bottom: 0; }
.table .r { text-align: right; } .table .act { width: 1%; white-space: nowrap; text-align: right; }
.table .sub { display: block; color: var(--text-3); font-size: 12px; }
.table tr.clickable { cursor: pointer; } .table tr.dim td { opacity: .6; }
.table .exp-row td { background: var(--sunken) !important; }
.table tr.open .icon-btn .ic { transform: rotate(90deg); }
.diff { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .diff h4.sec { margin: 4px 0 6px; }
.json { margin: 0; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; font-family: var(--mono); font-size: 12px; max-height: 320px; overflow: auto; white-space: pre-wrap; word-break: break-word; }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-top: 1px solid var(--border); font-size: 13px; gap: 8px; }
.pager > div { display: flex; gap: 4px; }

/* ---------- estados ---------- */
.empty { text-align: center; padding: 48px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty h3 { font-size: 16px; font-weight: 600; } .empty p { color: var(--text-2); max-width: 420px; }
.empty .btn { margin-top: 10px; }
.empty-ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; color: var(--brand-2); background: var(--brand-soft); margin-bottom: 6px; box-shadow: inset 0 0 0 1px var(--border); }
.empty.error .empty-ic { color: var(--red); background: var(--red-soft); }
.empty.sm { padding: 26px 16px; border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface); }
.skeleton-wrap { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.sk-row { display: flex; gap: 16px; } .sk { height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--sunken), var(--border), var(--sunken)); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- formulários / modal ---------- */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field .lbl { font-size: 12.5px; font-weight: 600; color: var(--text-2); } .req { color: var(--red); font-style: normal; margin-left: 2px; }
.field input:not([type=checkbox]), .field select, .field textarea, .prefix { width: 100%; min-height: 38px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); border-radius: 9px; padding: 8px 11px; font: inherit; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .prefix:focus-within, .filters select:focus, .filters input:focus { outline: none; border-color: var(--brand-2); box-shadow: var(--focus); }
.prefix { display: flex; align-items: center; gap: 8px; padding: 0 0 0 11px; } .prefix span { color: var(--text-3); font-size: 13px; }
.prefix input { border: 0 !important; box-shadow: none !important; padding-left: 0 !important; font-variant-numeric: tabular-nums; }
.field.invalid input, .field.invalid select, .field.invalid textarea, .field.invalid .prefix { border-color: var(--red); }
.field .err { color: var(--red); font-size: 12px; min-height: 0; } .field .err:empty { display: none; }
.field .hint { color: var(--text-3); font-size: 12px; }
.field.check { flex-direction: row; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 22px; } .field.check .hint { width: 100%; }
.field input[type=checkbox], .chk input { width: 16px; height: 16px; accent-color: var(--brand); }
.multi { display: flex; gap: 16px; flex-wrap: wrap; padding: 6px 0; } .chk { display: inline-flex; gap: 6px; align-items: center; font-family: var(--mono); font-size: 13px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; } .form-grid .full { grid-column: 1 / -1; }
.form-err { padding: 10px 12px; border-radius: 9px; background: var(--red-soft); color: var(--red); font-size: 13px; margin-top: 12px; }
.form-grid .form-err { margin-top: 0; }
.intro { margin-bottom: 14px; font-size: 13px; }
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(10, 12, 28, .45); display: grid; place-items: center; padding: 20px; opacity: 0; transition: opacity .16s; backdrop-filter: blur(2px); }
.overlay.in { opacity: 1; }
.modal { width: 100%; max-width: 520px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); transform: translateY(8px) scale(.98); transition: transform .16s; }
.overlay.in .modal { transform: none; }
.modal.sm { max-width: 420px; } .modal.lg { max-width: 720px; }
.modal-h { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-h h2 { font-size: 16px; font-weight: 650; }
.modal-b { padding: 20px; overflow-y: auto; }
.modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 14px 14px; }
.overlay.side { place-items: stretch end; padding: 0; }
.overlay.side .modal { max-width: 560px; height: 100vh; max-height: 100vh; border-radius: 0; transform: translateX(30px); }
.overlay.side.in .modal { transform: none; }
.confirm-msg { color: var(--text-2); margin-bottom: 14px; }
.det-h { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 16px; } .det-h h3 { font-size: 18px; font-weight: 650; }
.det-h + .mini-kpis { margin-bottom: 16px; }
.token-box { display: flex; gap: 8px; align-items: center; margin-top: 14px; } .token-box code { flex: 1; padding: 10px 12px; background: var(--sunken); border-radius: 8px; border: 1px solid var(--border); word-break: break-all; user-select: all; }

/* ---------- toasts ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 10px; align-items: center; max-width: 380px; padding: 11px 14px; border-radius: 10px; background: #12142a; color: #f1f2fb; box-shadow: var(--shadow-lg); font-size: 13.5px; transform: translateY(10px); opacity: 0; transition: all .25s; }
.toast.in { transform: none; opacity: 1; } .toast.ok .ic { color: #4ade80; } .toast.erro { background: #3a1114; } .toast.erro .ic { color: #fca5a5; }

/* ---------- login ---------- */
.login { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.login-art { position: relative; overflow: hidden; background: #11132a; color: #fff; display: flex; align-items: flex-end; padding: 56px; }
.art-grid { position: absolute; inset: 0; background-image: radial-gradient(70% 60% at 20% 10%, rgba(99,102,241,.55), transparent 60%), radial-gradient(50% 40% at 90% 90%, rgba(245,158,11,.25), transparent 70%),
  linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: auto, auto, 36px 36px, 36px 36px; }
.art-copy { position: relative; max-width: 420px; } .art-copy h1 { font-size: 34px; margin: 18px 0 10px; letter-spacing: -.03em; } .art-copy p { color: #c3c6e0; font-size: 16px; }
.login-card { display: grid; place-items: center; padding: 32px 20px; background: var(--surface); }
.login-card form { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 14px; }
.login-card h2 { font-size: 22px; font-weight: 650; } .login-card .brand { padding: 0 0 12px; }

/* ---------- kanban ---------- */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.kcol { background: var(--sunken); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 230px); }
.kcol header { display: flex; align-items: center; gap: 8px; padding: 12px 14px 8px; } .kcol header i { width: 10px; height: 10px; border-radius: 3px; }
.kcol h3 { font-size: 13px; font-weight: 650; flex: 1; }
.kdrop { padding: 4px 10px 12px; display: flex; flex-direction: column; gap: 8px; min-height: 80px; overflow-y: auto; border-radius: 0 0 var(--radius) var(--radius); transition: background .15s; }
.kdrop.over { background: color-mix(in srgb, var(--brand-2) 8%, transparent); }
.kempty { text-align: center; color: var(--text-3); font-size: 12px; padding: 18px 0; border: 1px dashed var(--border-strong); border-radius: 10px; }
.kph { height: 4px; border-radius: 4px; background: var(--brand-2); }
.kcard { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; box-shadow: var(--shadow-sm); cursor: grab; display: flex; flex-direction: column; gap: 6px; }
.kcard:hover { border-color: var(--border-strong); box-shadow: var(--shadow); } .kcard.dragging { opacity: .4; }
.kcard-top { display: flex; justify-content: space-between; align-items: center; }
.ktitle { background: none; border: 0; padding: 0; text-align: left; font: inherit; font-weight: 600; color: var(--text); cursor: pointer; line-height: 1.35; }
.ktitle:hover { color: var(--brand-2); } .kcli { color: var(--text-2); font-size: 12px; }
.kmeta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.kmeta .due { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; } .kmeta .due.late { color: var(--red); font-weight: 600; }
.who { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 700; background: var(--brand-soft); color: var(--brand-ink); }
.prio { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 1px 7px; border-radius: 5px; }
.p-baixa { background: var(--gray-soft); color: var(--gray); } .p-media { background: var(--blue-soft); color: var(--blue); }
.p-alta { background: var(--amber-soft); color: var(--amber); } .p-urgente { background: var(--red-soft); color: var(--red); }
.move-list { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.move-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); font: inherit; color: var(--text); cursor: pointer; text-align: left; }
.move-opt:hover { border-color: var(--brand-2); } .move-opt.cur { background: var(--brand-soft); } .move-opt i { width: 10px; height: 10px; border-radius: 3px; } .move-opt small { margin-left: auto; color: var(--text-3); }

/* ---------- outros ---------- */
.cards-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.contact { display: flex; justify-content: space-between; gap: 10px; } .contact small { display: block; color: var(--text-3); font-size: 12.5px; }
.row-act { display: flex; gap: 2px; flex: none; }
.prov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.prov { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; } .prov-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.prov.dim { opacity: .6; }
.alert-list { display: flex; flex-direction: column; gap: 10px; }
.alert { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; border-left: 3px solid var(--border-strong); }
.alert.sev-critico { border-left-color: var(--red); } .alert.sev-aviso { border-left-color: var(--accent); } .alert.sev-info { border-left-color: var(--blue); }
.alert-h { display: flex; gap: 6px; align-items: center; } .alert-h small { margin-left: auto; }

/* ---------- responsivo ---------- */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: 1fr; } .grid-ops { grid-template-columns: 1fr; }
  .grid-ops section + section { margin-top: 22px; }
}
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); transition: transform .22s; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; background: rgba(10,12,28,.45); z-index: 35; opacity: 0; pointer-events: none; transition: opacity .2s; }
  .scrim.show { opacity: 1; pointer-events: auto; }
  .content { margin-left: 0; } .only-mobile { display: inline-grid; }
  .topbar { padding: 0 16px; } main { padding: 20px 16px 48px; }
  .user-meta { display: none; }
  .grid-2 { grid-template-columns: 1fr; } .login { grid-template-columns: 1fr; } .login-art { display: none; }
  .mini-kpis.four { grid-template-columns: repeat(2, 1fr); }
  /* tabelas viram cartões */
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td, .table tfoot { display: block; width: 100%; }
  .table tbody tr { border-bottom: 1px solid var(--border); padding: 10px 14px; position: relative; }
  .table td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .table td[data-l]::before { content: attr(data-l); color: var(--text-3); font-size: 12px; text-align: left; flex: none; }
  .table td:not([data-l]) { justify-content: flex-end; }
  .table td.act { width: 100%; }
  .table .sub { text-align: right; }
  .table tr.exp-row td { display: block; text-align: left; } .diff { grid-template-columns: 1fr; }
  .table tbody tr:hover td { background: transparent; }
}
@media (max-width: 560px) {
  .kpis, .kpis.three { grid-template-columns: 1fr 1fr; gap: 10px; } .kpi { padding: 12px 14px; } .kpi-v { font-size: 19px; }
  .form-grid { grid-template-columns: 1fr; } .field.check { padding-top: 0; }
  .mini-kpis, .mini-kpis.three { grid-template-columns: 1fr; }
  .page-h .btns { width: 100%; } .page-h > .btn { width: 100%; justify-content: center; }
  .search { max-width: none; flex-basis: 100%; } .filters select, .filters input { flex: 1 1 140px; min-width: 0; }
  .overlay { padding: 0; place-items: end stretch; } .modal { max-height: 92vh; border-radius: 14px 14px 0 0; max-width: none !important; }
  .modal-f { border-radius: 0; }
  .kanban { grid-auto-columns: 86%; }
  .toasts { left: 16px; right: 16px; } .toast { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
