/* ── License-server design system ── */
/* Default (:root) é o modo escuro minimalista (espelho neutro do print
   claro). [data-theme="light"] é a paleta clara do design system de print. */
:root {
    /* brand — no dark invertido para branco, o CTA continua legívelSobre o fundo preto */
    --brand: #FAFAFA;
    --brand-hover: #FFFFFF;
    --brand-light: rgba(255,255,255,.10);
    --brand-dim: rgba(255,255,255,.06);
    /* dark neutral palette */
    --bg: #0E0E0E;
    --bg-2: #131313;
    --surface: #181818;
    --surface-2: #1F1F1F;
    --surface-3: #2A2A2A;
    --text: #F5F5F5;
    --text-soft: #9A9A9A;
    --text-faint: #6B6B6B;
    --border: rgba(255,255,255,.08);
    --border-soft: rgba(255,255,255,.04);
    --border-strong: rgba(255,255,255,.18);
    /* status */
    --success: #6dbb8a; --success-light: rgba(109,187,138,.10); --success-border: rgba(109,187,138,.22);
    --danger: #e07a72; --danger-light: rgba(224,122,114,.10); --danger-border: rgba(224,122,114,.22);
    --warning: #d4a84b; --warning-light: rgba(212,168,75,.10); --warning-border: rgba(212,168,75,.22);
    --info: #7aaedb; --info-light: rgba(122,174,219,.10); --info-border: rgba(122,174,219,.22);
    /* sidebar */
    --sidebar-bg: #131313;
    --sidebar-fg: #8B8B8B;
    --sidebar-fg-active: #F5F5F5;
    --sidebar-border: rgba(255,255,255,.06);
    --sidebar-hover: rgba(255,255,255,.04);
    --sidebar-selected: rgba(255,255,255,.08);
    /* radii */
    --radius-sm: 5px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 999px;
    /* neutral dark shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,.5);
    --shadow: 0 2px 8px rgba(0,0,0,.55);
    --shadow-lg: 0 12px 40px rgba(0,0,0,.75), 0 4px 12px rgba(0,0,0,.5);
    --shadow-inset: inset 0 1px 0 rgba(255,255,255,.04), inset 0 -1px 0 rgba(0,0,0,.2);
    --focus-ring: 0 0 0 3px rgba(255,255,255,.10);
    --brand-glow: rgba(255,255,255,.18);
    --radius-card: 26px;
    --font: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
}
/* ── Light paper mode (do print de referência) ── */
[data-theme="light"] {
    /* brand — preto #111 no modo claro, conforme o print */
    --brand: #111111;
    --brand-hover: #222222;
    --brand-light: rgba(0,0,0,.05);
    --brand-dim: rgba(0,0,0,.03);
    /* neutral light palette */
    --bg: #FFFFFF;
    --bg-2: #FFFFFF;
    --surface: #FFFFFF;
    --surface-2: #F7F7F8;
    --surface-3: #ECECEC;
    --text: #111111;
    --text-soft: #666666;
    --text-faint: #8B8B8B;
    --border: #E5E5E5;
    --border-soft: #EAEAEA;
    --border-strong: #CFCFCF;
    /* status adjusted for light */
    --success: #3a8a58; --success-light: rgba(58,138,88,.10); --success-border: rgba(58,138,88,.22);
    --danger: #c8362f; --danger-light: rgba(200,54,47,.08); --danger-border: rgba(200,54,47,.20);
    --warning: #9a6e10; --warning-light: rgba(154,110,16,.10); --warning-border: rgba(154,110,16,.22);
    --info: #3a72a8; --info-light: rgba(58,114,168,.10); --info-border: rgba(58,114,168,.22);
    /* sidebar */
    --sidebar-bg: #F7F7F8;
    --sidebar-fg: #666666;
    --sidebar-fg-active: #111111;
    --sidebar-border: #E5E5E5;
    --sidebar-hover: #F1F1F1;
    --sidebar-selected: #ECECEC;
    /* light shadows — muito suaves, conforme o print */
    --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
    --shadow: 0 2px 8px rgba(0,0,0,.06);
    --shadow-lg: 0 12px 40px rgba(0,0,0,.10), 0 4px 12px rgba(0,0,0,.05);
    --shadow-inset: inset 0 1px 0 rgba(255,255,255,.7), inset 0 -1px 0 rgba(0,0,0,.04);
    --focus-ring: 0 0 0 3px rgba(0,0,0,.05);
    --brand-glow: rgba(0,0,0,.20);
    --radius-card: 26px;
}
/* ── Theme toggle button ── */
.theme-toggle-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border);
    background: transparent; color: var(--text-soft); cursor: pointer;
    transition: all .15s ease; font-size: 18px;
}
.theme-toggle-btn:hover { background: var(--brand-light); color: var(--brand); border-color: var(--brand-light); }
.theme-toggle-btn .icon-sun { display: none; }
.theme-toggle-btn .icon-moon { display: block; }
[data-theme="light"] .theme-toggle-btn .icon-sun { display: block; }
[data-theme="light"] .theme-toggle-btn .icon-moon { display: none; }
* { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Scrollbar global ── */
html { scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
html::-webkit-scrollbar { width: 7px; }
html::-webkit-scrollbar-track { background: transparent; }
html::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 4px; }
html::-webkit-scrollbar-thumb:hover { background: var(--brand); }

* { scrollbar-width: inherit; }
*::-webkit-scrollbar { width: 6px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 3px; }
*::-webkit-scrollbar-thumb:hover { background: var(--brand); }

body {
    font-family: var(--font);
    color: var(--text);
    background-color: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    display: flex; flex-direction: column; min-height: 100vh;
}
.topbar { flex-shrink: 0; }
.home, .p-wrap { flex: 1; overflow-y: auto; }
h1, h2, h3, h4 { font-family: var(--font); font-weight: 600; letter-spacing: 0.01em; }
a { color: var(--text); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--font-mono); font-size: 0.9em; }

/* ── Topbar ── */
.topbar {
    position: sticky; top: 0; z-index: 50;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}
.topbar .inner {
    max-width: 1180px; margin: 0 auto; padding: 0 22px;
    display: flex; align-items: center; gap: 16px; height: 66px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.seal {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 8px;
    background: linear-gradient(160deg, var(--brand), var(--brand-hover));
    color: #fff;
    font-family: var(--font); font-size: 20px; font-weight: 700;
    flex-shrink: 0;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand .title { font-family: var(--font); font-size: 20px; font-weight: 700; color: var(--text); line-height: 1.25; }
.brand .sub { font-size: 11px; color: var(--text-faint); letter-spacing: 0.16em; text-transform: uppercase; line-height: 1.2; }
.spacer { flex: 1; }
.topbar nav { display: flex; align-items: center; gap: 4px; }
.topbar nav a {
    color: var(--text-soft); font-size: 14px; padding: 6px 14px;
    border-radius: 8px; transition: all 0.12s;
    display: inline-flex; align-items: center; gap: 6px;
}
.topbar nav a i { display: inline-block; line-height: 1; margin-top: -1.5px; }
.topbar nav a:hover { color: var(--text); background: var(--brand-light); text-decoration: none; }
.theme-toggle {
    background: none; border: none; cursor: pointer;
    font-size: 18px; padding: 6px 10px; border-radius: 8px;
    color: var(--text-faint); transition: all 0.15s;
    line-height: 1;
}
.theme-toggle:hover { color: var(--text); background: var(--brand-light); }
.btn-signin {
    display: inline-flex; align-items: center; gap: 7px;
    background: linear-gradient(160deg, var(--brand), var(--brand-hover));
    color: #fff !important; padding: 8px 18px !important;
    border-radius: 8px !important; font-weight: 600; font-size: 13px !important;
    text-decoration: none; transition: all .15s ease;
}
.btn-signin i { font-size: 17px; line-height: 1; }
.btn-signin:hover,
.topbar nav a.btn-signin:hover {
    background: linear-gradient(160deg, var(--brand-hover), var(--brand)) !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--brand-glow, rgba(217,119,87,.35)) !important;
    filter: brightness(1.08);
    text-decoration: none;
}

/* ── Container ── */
.container { max-width: 1180px; margin: 0 auto; padding: 0 22px; }
.muted { color: var(--text-soft); }
.faint { color: var(--text-faint); }
.text-center { text-align: center; }
.mt { margin-top: 16px; }
.mt-lg { margin-top: 48px; }
.mb { margin-bottom: 16px; }
.flex { display: flex; }
.flex.between { justify-content: space-between; }
.flex.center { justify-content: center; }
.flex.col { flex-direction: column; }
.gap-2 { gap: 12px; }
.gap-3 { gap: 20px; }

/* ── Cards ── */
.card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-card); box-shadow: var(--shadow); padding: 22px;
    transition: box-shadow 0.2s;
}
.card:hover { box-shadow: var(--shadow-lg); }
.card.framed { position: relative; }
.card.framed::before {
    content: ""; position: absolute; inset: 7px;
    border: 1px solid var(--border-soft);
    border-radius: calc(var(--radius-card) - 6px); pointer-events: none;
}

/* ── Grid ── */
.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) {
    .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; }
}

/* ── Section title ── */
.sec-title { display: flex; align-items: center; gap: 12px; margin: 0 0 20px; }
.sec-title h2, .sec-title h3 { margin: 0; }
.sec-title .rule { flex: 1; height: 1px; background: linear-gradient(90deg, var(--border), transparent); }

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: var(--font); font-size: 14px; font-weight: 500; cursor: pointer;
    padding: 10px 18px; border-radius: var(--radius); border: 1px solid var(--border);
    background: var(--surface-2); color: var(--text); transition: all .15s ease;
    text-decoration: none;
}
.btn i { font-size: 18px; line-height: 1; }
.btn:hover { background: var(--surface-3); border-color: var(--border-strong); transform: translateY(-1px); text-decoration: none; }
.btn.primary {
    background: linear-gradient(160deg, var(--brand), var(--brand-hover));
    color: #fff; border-color: transparent;
}
.btn.primary:hover { background: linear-gradient(160deg, var(--brand-hover), var(--brand)); box-shadow: 0 6px 18px var(--brand-glow, rgba(217,119,87,.35)); color: #fff; }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }

/* ── Forms ── */
label { display: block; font-size: 13px; color: var(--text-soft); margin: 0 0 6px; }
input, select, textarea {
    width: 100%; font-family: var(--font); font-size: 14px; color: var(--text);
    padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--surface-2); outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: var(--focus-ring); }
.field { margin-bottom: 14px; }

/* ── Pills ── */
.pill {
    display: inline-block; padding: 3px 11px; border-radius: 99px;
    font-size: 12px; font-weight: 500;
    background: var(--surface-2); border: 1px solid var(--border);
    color: var(--text-soft); transition: all 0.12s;
}
.pill:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-light); }
.pill.green { border-color: var(--success-border); color: var(--success); background: var(--success-light); }
.pill.gold { border-color: rgba(200,169,110,.3); color: var(--brand); background: var(--brand-light); }
.pill.bronze { border-color: var(--brand-dim); color: var(--brand); background: var(--brand-dim); }

/* ── Model cards ── */
.model-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-card); box-shadow: var(--shadow);
    padding: 22px; display: flex; flex-direction: column;
    max-height: 380px; overflow: hidden;
}
.model-card-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; padding-bottom: 14px; margin-bottom: 14px;
    border-bottom: 1px solid var(--border-soft); flex-shrink: 0;
}
.model-card-head h3 { margin: 0; font-size: 17px; }
.model-card-body {
    flex: 1; overflow-y: auto; overflow-x: hidden;
    display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start;
    padding-right: 4px;
}

/* ── Footer ── */
.footer { padding: 0; text-align: center; border-top: 1px solid var(--border); margin-top: auto; }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 0 22px; }
.footer .fgrid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; padding: 36px 0 28px; text-align: left; }
.footer .fgrid a { color: var(--text-soft); font-size: 13px; }
.footer .fgrid a:hover { color: var(--text); }
.footer .fgrid h4 { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); margin: 0 0 14px; }
.footer .fgrid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer .fgrid ul li { font-size: 13px; color: var(--text-soft); }
.footer .f-brand-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer .f-seal { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 7px; background: linear-gradient(160deg, var(--brand), var(--brand-hover)); color: #fff; font-size: 14px; font-weight: 700; flex-shrink: 0; }
.footer .f-brand-name { font-size: 16px; font-weight: 700; color: var(--text); line-height: 1.3; }
.footer .f-brand-sub { font-size: 10px; color: var(--text-faint); letter-spacing: 0.12em; text-transform: uppercase; line-height: 1.3; }
.footer .f-desc { font-size: 13px; color: var(--text-soft); line-height: 1.6; max-width: 240px; margin: 0; }
.footer .f-mono { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); }
.footer .fbot { border-top: 1px solid var(--border); padding: 18px 0; display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px; font-size: 12px; color: var(--text-faint); }

@media (max-width: 768px) {
    .topbar .inner { padding: 0 14px; height: 56px; }
    .topbar nav a { padding: 4px 8px; font-size: 13px; }
    .brand .title { font-size: 17px; }
    .seal { width: 36px; height: 36px; font-size: 17px; }
    .container { padding: 0 14px; }
}
