/* ==========================================================================
   Transcrevo — design system
   Tokens → base → componentes → shell → páginas
   ========================================================================== */

:root {
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

    --bg: #f5f6fb;
    --surface: #ffffff;
    --surface-2: #f1f3f9;
    --surface-3: #e9ecf5;
    --border: #e4e7f0;
    --border-strong: #cfd4e4;
    --text: #12141f;
    --text-2: #555b72;
    --text-3: #8a90a6;

    --brand: #4f46e5;
    --brand-600: #4338ca;
    --brand-500: #6366f1;
    --brand-soft: #eef0ff;
    --brand-soft-2: #e0e4ff;
    --violet: #7c3aed;
    --grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --grad-soft: linear-gradient(135deg, rgba(79,70,229,.10), rgba(124,58,237,.10));

    --ok: #059669;       --ok-soft: #e3f7ee;
    --warn: #b45309;     --warn-soft: #fdf1dc;
    --danger: #dc2626;   --danger-soft: #fde8e8;
    --info: #0369a1;     --info-soft: #e0f1fb;

    /* séries dos gráficos (paleta validada: azul, laranja, água, violeta) */
    --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #6250d6;
    --grid: #e6e8f0;

    --r-sm: 8px; --r: 12px; --r-lg: 18px; --r-xl: 24px;
    --shadow-sm: 0 1px 2px rgba(18,20,31,.05);
    --shadow: 0 1px 3px rgba(18,20,31,.06), 0 6px 18px -6px rgba(18,20,31,.08);
    --shadow-lg: 0 18px 50px -12px rgba(30,27,75,.22);
    --ring: 0 0 0 3px rgba(99,102,241,.28);

    --sb-w: 264px;
    --sb-w-collapsed: 76px;
    --topbar-h: 64px;
    color-scheme: light;
}

:root[data-theme="dark"] {
    --bg: #0c0e19;
    --surface: #141727;
    --surface-2: #1a1e33;
    --surface-3: #232843;
    --border: #262b45;
    --border-strong: #353b5c;
    --text: #eceefb;
    --text-2: #a7adc7;
    --text-3: #7c829f;

    --brand: #818cf8;
    --brand-600: #a5b4fc;
    --brand-500: #818cf8;
    --brand-soft: rgba(129,140,248,.14);
    --brand-soft-2: rgba(129,140,248,.24);
    --grad: linear-gradient(135deg, #6366f1 0%, #9333ea 100%);

    --ok: #34d399;       --ok-soft: rgba(52,211,153,.14);
    --warn: #fbbf24;     --warn-soft: rgba(251,191,36,.14);
    --danger: #f87171;   --danger-soft: rgba(248,113,113,.15);
    --info: #38bdf8;     --info-soft: rgba(56,189,248,.14);

    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #9085e9;
    --grid: #262b45;

    --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
    --shadow: 0 1px 3px rgba(0,0,0,.35), 0 8px 24px -8px rgba(0,0,0,.45);
    --shadow-lg: 0 20px 60px -12px rgba(0,0,0,.6);
    color-scheme: dark;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55;
    color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.02em; font-weight: 700; }
p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { display: block; max-width: 100%; }
.icon { flex: none; }
button { font: inherit; color: inherit; cursor: pointer; }
code { font-family: var(--mono); font-size: .85em; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }
:focus-visible { outline: none; box-shadow: var(--ring); }
::selection { background: rgba(99,102,241,.25); }
.muted { color: var(--text-2); } .faint { color: var(--text-3); }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.hide-sm { } .only-mobile { display: none !important; }
.hide, [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.text-right { text-align: right; } .text-center { text-align: center; }
.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mt-3{margin-top:24px}.mb-2{margin-bottom:16px}.mb-3{margin-bottom:24px}
.flex { display: flex; } .items-center { align-items: center; } .gap-1{gap:8px}.gap-2{gap:16px} .between { justify-content: space-between; } .wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scroll-x { overflow-x: auto; }

/* ---------------------------------------------------------------- buttons */
.btn {
    --b-bg: var(--surface); --b-fg: var(--text); --b-bd: var(--border-strong);
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 18px; min-height: 42px; border-radius: 11px; font-weight: 600; font-size: 14.5px;
    background: var(--b-bg); color: var(--b-fg); border: 1px solid var(--b-bd);
    transition: transform .12s ease, box-shadow .15s ease, background .15s, border-color .15s, filter .15s;
    text-decoration: none !important; white-space: nowrap; user-select: none;
}
.btn:hover { --b-bd: var(--brand-500); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }
.btn-primary { --b-bg: var(--brand); --b-fg: #fff; --b-bd: transparent; background: var(--grad); box-shadow: 0 6px 16px -6px rgba(79,70,229,.6); }
.btn-primary:hover { --b-bd: transparent; filter: brightness(1.07); box-shadow: 0 10px 22px -8px rgba(79,70,229,.7); }
.btn-secondary { --b-bg: var(--surface); }
.btn-ghost { --b-bg: transparent; --b-bd: transparent; --b-fg: var(--text-2); }
.btn-ghost:hover { --b-bg: var(--surface-2); --b-bd: transparent; --b-fg: var(--text); box-shadow: none; }
.btn-danger { --b-bg: var(--danger); --b-fg: #fff; --b-bd: transparent; }
.btn-danger:hover { --b-bd: transparent; filter: brightness(1.08); }
.btn-danger-soft { --b-bg: var(--danger-soft); --b-fg: var(--danger); --b-bd: transparent; }
.btn-ok { --b-bg: var(--ok); --b-fg: #fff; --b-bd: transparent; }
.btn-ok:hover { --b-bd: transparent; filter: brightness(1.08); }
.btn-light { --b-bg: rgba(255,255,255,.95); --b-fg: #3730a3; --b-bd: transparent; }
.btn-sm { padding: 6px 12px; min-height: 34px; font-size: 13px; border-radius: 9px; gap: 6px; }
.btn-lg { padding: 13px 24px; min-height: 50px; font-size: 16px; border-radius: 13px; }
.btn-block { width: 100%; }
.icon-btn {
    display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 11px;
    background: transparent; border: 1px solid transparent; color: var(--text-2); transition: .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 9px; }
.icon-btn.fav.on { color: #f59e0b; } .icon-btn.fav.on svg { fill: #f59e0b; }
.icon-btn.danger:hover { background: var(--danger-soft); color: var(--danger); }

/* ------------------------------------------------------------------ forms */
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > label, .label, .label-row label { font-size: 13.5px; font-weight: 600; color: var(--text); }
.label-row { display: flex; justify-content: space-between; align-items: baseline; }
.link-sm { font-size: 13px; font-weight: 600; }
.hint { font-size: 12.5px; color: var(--text-3); }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], input[type=date], input[type=search], input[type=tel], select, textarea, input:not([type]) {
    width: 100%; padding: 11px 14px; min-height: 44px; font: inherit; font-size: 15px; color: var(--text);
    background: var(--surface); border: 1px solid var(--border-strong); border-radius: 11px; transition: border-color .15s, box-shadow .15s, background .15s;
}
textarea { min-height: 90px; resize: vertical; }
input[type=date] { min-width: 0; }
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:hover, select:hover, textarea:hover { border-color: var(--text-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-500); box-shadow: var(--ring); }
input[readonly] { background: var(--surface-2); color: var(--text-2); }
input.is-invalid { border-color: var(--danger); } input.is-invalid:focus { box-shadow: 0 0 0 3px rgba(220,38,38,.2); }
select { appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a90a6' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.field-error { display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--danger); font-weight: 500; }
.input-icon { position: relative; }
.input-icon > .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.input-icon > input { padding-left: 42px; }
.input-icon > input:focus ~ .icon, .input-icon:focus-within > .icon { color: var(--brand); }
.input-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; display: grid; place-items: center; border: 0; background: none; color: var(--text-3); border-radius: 8px; }
.input-eye:hover { color: var(--text); background: var(--surface-2); }
.input-icon > input[data-strength], .input-icon > input[type=password] { padding-right: 46px; }
.input-suffix { position: relative; } .input-suffix input { padding-right: 56px; } .input-suffix span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 13px; pointer-events: none; }
.input-prefix { position: relative; } .input-prefix input { padding-left: 42px; } .input-prefix span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 14px; font-weight: 600; pointer-events: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-grid .span-2 { grid-column: span 2; }
.form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding-top: 4px; }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-2); cursor: pointer; line-height: 1.45; }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check-box { flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 6px; border: 1.5px solid var(--border-strong); background: var(--surface); display: grid; place-items: center; color: transparent; transition: .15s; }
.check input:checked + .check-box { background: var(--brand); border-color: var(--brand); color: #fff; }
.check input:focus-visible + .check-box { box-shadow: var(--ring); }

.switch { position: relative; display: inline-flex; width: 44px; height: 26px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--border-strong); transition: .2s; }
.switch i::after { content: ''; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: .2s; }
.switch input:checked + i { background: var(--brand); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { box-shadow: var(--ring); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.switch-row:last-child { border-bottom: 0; }
.switch-row strong { display: block; font-size: 14.5px; } .switch-row small { color: var(--text-2); font-size: 13px; }

.pw-meter { display: flex; gap: 5px; align-items: center; margin-top: 2px; }
.pw-meter span { flex: 1; height: 5px; border-radius: 9px; background: var(--surface-3); transition: background .2s; }
.pw-meter em { font-style: normal; font-size: 12px; color: var(--text-3); min-width: 56px; text-align: right; }
.pw-meter[data-level="1"] span:nth-child(-n+1) { background: #ef4444; }
.pw-meter[data-level="2"] span:nth-child(-n+2) { background: #f59e0b; }
.pw-meter[data-level="3"] span:nth-child(-n+3) { background: #84cc16; }
.pw-meter[data-level="4"] span:nth-child(-n+4) { background: #10b981; }

.seg { display: inline-flex; padding: 4px; background: var(--surface-2); border-radius: 12px; gap: 2px; }
.seg a, .seg button { padding: 7px 16px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--text-2); border: 0; background: none; text-decoration: none !important; display: inline-flex; align-items: center; gap: 6px; }
.seg .active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.seg em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--ok); background: var(--ok-soft); padding: 2px 7px; border-radius: 99px; }

/* ----------------------------------------------------------------- badges */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; line-height: 1.5; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.no-dot::before { display: none; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-brand { background: var(--brand-soft); color: var(--brand); }
.badge.pulse::before { animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .25; transform: scale(.8); } }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 99px; font-size: 13px; font-weight: 600; background: var(--brand-soft); color: var(--brand); }
.pill-glass { background: rgba(255,255,255,.14); color: #fff; backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.22); }

/* ------------------------------------------------------------------ cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.card-pad { padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.card-head h3 { font-size: 16px; } .card-head p { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.card-body { padding: 22px; }
.card-foot { padding: 14px 22px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.card.hover { transition: transform .15s, box-shadow .15s, border-color .15s; }
.card.hover:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--brand-500); }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.empty { text-align: center; padding: 56px 20px; color: var(--text-2); }
.empty .empty-ico { width: 64px; height: 64px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 20px; background: var(--brand-soft); color: var(--brand); }
.empty h3 { color: var(--text); font-size: 17px; margin-bottom: 4px; }
.empty .btn { margin-top: 16px; }

.alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r); font-size: 14px; align-items: flex-start; border: 1px solid transparent; }
.alert .icon { margin-top: 1px; }
.alert-info { background: var(--info-soft); color: var(--info); } .alert-warn { background: var(--warn-soft); color: var(--warn); }
.alert-danger { background: var(--danger-soft); color: var(--danger); } .alert-ok { background: var(--ok-soft); color: var(--ok); }
.alert a { font-weight: 700; text-decoration: underline; }
.alert strong { color: inherit; }

/* ----------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table th a { color: inherit; display: inline-flex; align-items: center; gap: 4px; }
.table th:first-child { border-top-left-radius: 0; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .col-check { width: 44px; padding-right: 0; }
.table .col-actions { text-align: right; white-space: nowrap; width: 1%; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.cell-user { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cell-user strong { display: block; font-weight: 600; } .cell-user small { color: var(--text-3); font-size: 12.5px; }
.cell-title { display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--text); font-weight: 600; text-decoration: none !important; }
.cell-title:hover { color: var(--brand); }
.file-ico { flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.file-ico.mic { background: var(--danger-soft); color: var(--danger); } .file-ico.meeting { background: var(--info-soft); color: var(--info); } .file-ico.url { background: var(--ok-soft); color: var(--ok); }

.avatar { flex: none; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 700; font-size: 13px; letter-spacing: .02em; }
.avatar.lg { width: 72px; height: 72px; font-size: 24px; } .avatar.md { width: 44px; height: 44px; font-size: 15px; }

.pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.pagination-info { font-size: 13px; color: var(--text-2); }
.pagination-links { display: flex; gap: 4px; }
.page-btn { min-width: 34px; height: 34px; padding: 0 8px; display: inline-grid; place-items: center; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: var(--text-2); text-decoration: none !important; }
a.page-btn:hover { background: var(--surface-2); color: var(--text); }
.page-btn.active { background: var(--brand); color: #fff; } .page-btn.disabled { opacity: .35; }

.progress { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 99px; background: var(--grad); transition: width .6s cubic-bezier(.2,.8,.2,1); }
.progress.warn > span { background: linear-gradient(90deg, #f59e0b, #ef4444); }
.progress.thin { height: 5px; }

/* --------------------------------------------------------- dropdown/modal */
.dropdown { position: relative; }
.dropdown-menu { position: absolute; top: calc(100% + 8px); min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 60; display: none; animation: pop .14s ease-out; }
.dropdown-menu.right { right: 0; } .dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a, .dropdown-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 9px; border: 0; background: none; font-size: 14px; font-weight: 500; color: var(--text); text-align: left; text-decoration: none !important; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--surface-2); }
.dropdown-menu .danger { color: var(--danger); } .dropdown-menu .danger:hover { background: var(--danger-soft); }
.dropdown-menu hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; }
.dropdown-head { padding: 10px 12px 8px; border-bottom: 1px solid var(--border); margin-bottom: 6px; } .dropdown-head strong { display: block; font-size: 14px; } .dropdown-head small { color: var(--text-3); font-size: 12.5px; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }

.modal-backdrop { position: fixed; inset: 0; background: rgba(10,12,28,.55); backdrop-filter: blur(4px); display: none; place-items: center; z-index: 100; padding: 20px; }
.modal-backdrop.open { display: grid; animation: fade .15s; }
.modal { width: 100%; max-width: 440px; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 26px; animation: pop .18s ease-out; max-height: 92vh; overflow: auto; }
.modal.lg { max-width: 620px; }
.modal h3 { font-size: 18px; margin-bottom: 8px; } .modal p { color: var(--text-2); font-size: 14.5px; }
.modal-ico { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; margin-bottom: 14px; background: var(--danger-soft); color: var(--danger); }
.modal-ico.brand { background: var(--brand-soft); color: var(--brand); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
@keyframes fade { from { opacity: 0; } }

.toasts { position: fixed; top: 18px; right: 18px; display: grid; gap: 10px; z-index: 200; width: min(380px, calc(100vw - 36px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--brand); border-radius: 14px; padding: 13px 14px; box-shadow: var(--shadow-lg); font-size: 14px; animation: slideIn .25s cubic-bezier(.2,.9,.3,1.2); }
.toast.out { opacity: 0; transform: translateX(20px); transition: .25s; }
.toast.success { border-left-color: var(--ok); } .toast.success > .icon { color: var(--ok); }
.toast.error { border-left-color: var(--danger); } .toast.error > .icon { color: var(--danger); }
.toast.info > .icon { color: var(--brand); }
.toast span { flex: 1; padding-top: 1px; } .toast button { border: 0; background: none; color: var(--text-3); padding: 0; }
@keyframes slideIn { from { opacity: 0; transform: translateX(40px); } }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tabs a, .tabs button { padding: 12px 16px; font-weight: 600; font-size: 14.5px; color: var(--text-2); background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none !important; display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; }
.tabs a:hover, .tabs button:hover { color: var(--text); }
.tabs .active { color: var(--brand); border-bottom-color: var(--brand); }

/* --------------------------------------------------------------- app shell */
.sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--sb-w); z-index: 50; display: flex; flex-direction: column;
    background: var(--surface); border-right: 1px solid var(--border); transition: width .22s cubic-bezier(.4,0,.2,1), transform .25s;
}
.sb-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 16px 12px 20px; height: var(--topbar-h); flex: none; }
.logo { display: inline-flex; align-items: center; gap: 11px; color: var(--text); font-weight: 800; font-size: 19px; letter-spacing: -.03em; }
.logo-mark { display: block; flex: none; border-radius: 10px; box-shadow: 0 6px 14px -4px rgba(99,102,241,.55); } .logo-text { white-space: nowrap; }
.sb-logo { text-decoration: none !important; }
.sb-collapse { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text-3); transition: .15s; }
.sb-collapse:hover { color: var(--text); border-color: var(--border-strong); }
.sb-badge { margin: 0 16px 6px; padding: 7px 12px; border-radius: 10px; background: var(--grad); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; display: flex; gap: 8px; align-items: center; }
.sb-nav { flex: 1; overflow-y: auto; padding: 8px 12px 12px; scrollbar-width: thin; }
.sb-group { font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--text-3); padding: 16px 12px 6px; white-space: nowrap; overflow: hidden; }
.sb-link { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin-bottom: 2px; border-radius: 11px; color: var(--text-2); font-weight: 600; font-size: 14.5px; text-decoration: none !important; transition: background .15s, color .15s; white-space: nowrap; }
.sb-link span { overflow: hidden; text-overflow: ellipsis; }
.sb-link:hover { background: var(--surface-2); color: var(--text); }
.sb-link.active { background: var(--brand-soft); color: var(--brand); }
.sb-link.active::before { content: ''; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: var(--brand); }
.sb-count { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 99px; background: var(--danger); color: #fff; }
.sb-foot { padding: 12px; border-top: 1px solid var(--border); flex: none; }
.sb-usage { display: block; padding: 14px; border-radius: 14px; background: var(--grad-soft); border: 1px solid var(--brand-soft-2); text-decoration: none !important; color: var(--text); }
.sb-usage-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 9px; font-size: 13px; }
.sb-usage-plan { font-weight: 800; color: var(--brand); } .sb-usage-num { color: var(--text-2); font-size: 12.5px; }
.sb-usage-cta { display: inline-flex; gap: 6px; align-items: center; margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--brand); }
.sb-backdrop { position: fixed; inset: 0; background: rgba(10,12,28,.5); z-index: 45; display: none; backdrop-filter: blur(2px); }

.main { margin-left: var(--sb-w); min-height: 100vh; transition: margin .22s cubic-bezier(.4,0,.2,1); display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: var(--topbar-h); display: flex; align-items: center; gap: 12px; padding: 0 28px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid transparent; }
.topbar-title { flex: 1; min-width: 0; font-size: 13.5px; color: var(--text-3); font-weight: 500; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.topbar-title a { color: var(--text-2); } .topbar-actions { display: flex; align-items: center; gap: 8px; }
.theme-sun, .theme-moon { place-items: center; }
.theme-sun { display: grid; } .theme-moon { display: none; }
[data-theme="dark"] .theme-sun { display: none; } [data-theme="dark"] .theme-moon { display: grid; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); transition: .15s; }
.user-chip:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.user-chip-text { display: grid; line-height: 1.2; text-align: left; } .user-chip-text strong { font-size: 13.5px; } .user-chip-text small { font-size: 11.5px; color: var(--text-3); }
.page { padding: 8px 28px 56px; width: 100%; max-width: 1360px; margin: 0 auto; flex: 1; animation: rise .35s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.announcement { margin: 0 28px 4px; padding: 10px 16px; border-radius: 12px; background: var(--grad); color: #fff; font-size: 14px; font-weight: 500; display: flex; gap: 10px; align-items: center; }
.impersonate-bar { position: sticky; top: 0; z-index: 90; background: #f59e0b; color: #451a03; padding: 8px 16px; display: flex; gap: 10px; align-items: center; justify-content: center; font-size: 14px; flex-wrap: wrap; }
.impersonate-bar form { display: inline; }
body.is-admin .sb-badge { background: linear-gradient(135deg, #0f172a, #312e81); }

.sb-collapsed .sidebar { width: var(--sb-w-collapsed); }
.sb-collapsed .main { margin-left: var(--sb-w-collapsed); }
.sb-collapsed .logo-text, .sb-collapsed .sb-link span, .sb-collapsed .sb-usage, .sb-collapsed .sb-badge span, .sb-collapsed .sb-count { display: none; }
.sb-collapsed .sb-group { font-size: 0; padding: 10px 0 4px; border-top: 1px solid var(--border); margin: 8px 8px 0; } .sb-collapsed .sb-group:first-child { border: 0; }
.sb-collapsed .sb-link { justify-content: center; padding: 11px 0; } .sb-collapsed .sb-head { padding: 18px 0 12px; flex-direction: column; gap: 14px; height: auto; }
.sb-collapsed .sb-collapse { transform: rotate(180deg); } .sb-collapsed .sb-badge { justify-content: center; margin: 0 12px 6px; padding: 7px; }
.sb-collapsed .sb-link.active::before { left: -12px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 14px 0 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; } .page-head p { color: var(--text-2); margin-top: 4px; } .page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.breadcrumb { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--text-3); margin-bottom: 6px; } .breadcrumb a { color: var(--text-2); }

/* ------------------------------------------------------------------- auth */
.auth-body { background: var(--bg); min-height: 100vh; }
.auth-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); min-height: 100vh; }
.auth-panel { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px 30px; gap: 26px; }
.auth-logo { text-decoration: none !important; }
.auth-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 36px; box-shadow: var(--shadow); }
.auth-head { margin-bottom: 26px; } .auth-head h1 { font-size: 26px; margin-bottom: 6px; } .auth-head p { color: var(--text-2); }
.auth-switch { text-align: center; margin-top: 22px; font-size: 14.5px; color: var(--text-2); } .auth-switch a { font-weight: 700; display: inline-flex; gap: 4px; align-items: center; }
.auth-foot { font-size: 13px; color: var(--text-3); } .auth-theme { position: absolute; top: 18px; right: 18px; }
.auth-art { position: relative; overflow: hidden; background: radial-gradient(1200px 600px at 100% 0%, #7c3aed 0%, transparent 60%), radial-gradient(900px 500px at 0% 100%, #2563eb 0%, transparent 55%), linear-gradient(160deg, #312e81 0%, #1e1b4b 100%); color: #fff; display: flex; align-items: center; padding: 56px; }
.auth-art::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.12) 1px, transparent 1px); background-size: 26px 26px; mask-image: linear-gradient(120deg, transparent 20%, #000 80%); }
.auth-art-inner { position: relative; max-width: 480px; display: grid; gap: 20px; }
.auth-art h2 { font-size: 42px; line-height: 1.08; letter-spacing: -.035em; } .auth-art h2 em { font-style: normal; background: linear-gradient(90deg, #a5b4fc, #f0abfc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-art p { color: rgba(255,255,255,.78); font-size: 16.5px; }
.auth-points { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; font-size: 14.5px; color: rgba(255,255,255,.88); } .auth-points li { display: flex; gap: 10px; align-items: center; } .auth-points .icon { color: #86efac; }
.chat-demo { display: grid; gap: 10px; margin: 8px 0; }
.bubble { max-width: 88%; padding: 12px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; box-shadow: 0 10px 30px -10px rgba(0,0,0,.45); }
.bubble.in { background: #fff; color: #1f2430; border-bottom-left-radius: 4px; display: flex; align-items: center; gap: 10px; width: 270px; }
.bubble.in .icon { color: #4f46e5; } .bubble.in small { color: #8a90a6; font-size: 12px; }
.bubble.out { background: rgba(255,255,255,.12); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,.2); border-bottom-right-radius: 4px; margin-left: auto; }
.bubble-tag { display: flex; gap: 5px; align-items: center; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #c4b5fd; margin-bottom: 4px; }
.wavebar { display: flex; align-items: center; gap: 3px; flex: 1; height: 24px; } .wavebar i { flex: 1; border-radius: 3px; background: #c7d2fe; height: 40%; animation: wb 1.3s ease-in-out infinite; }
.wavebar i:nth-child(3n) { height: 85%; animation-delay: .15s; } .wavebar i:nth-child(3n+1) { height: 55%; animation-delay: .3s; } .wavebar i:nth-child(5n) { height: 100%; animation-delay: .45s; } .wavebar i:nth-child(7n) { height: 30%; }
@keyframes wb { 50% { transform: scaleY(.55); } }

.state-ok { text-align: center; display: grid; gap: 14px; } .state-ok h1 { font-size: 24px; } .state-ok p { color: var(--text-2); }
.state-icon { width: 64px; height: 64px; margin: 0 auto; display: grid; place-items: center; border-radius: 20px; background: var(--ok-soft); color: var(--ok); }
.dev-box { margin-top: 22px; padding: 14px; border: 1px dashed var(--border-strong); border-radius: 14px; background: var(--surface-2); font-size: 13px; color: var(--text-2); display: grid; gap: 8px; text-align: left; }
.dev-box strong { display: flex; align-items: center; gap: 6px; color: var(--text); font-size: 13px; } .dev-box-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ------------------------------------------------------- painel do cliente */
.hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; padding: 14px 0 22px; }
.hello h1 { font-size: 28px; } .hello p { color: var(--text-2); margin-top: 4px; } .hello p::first-letter { text-transform: uppercase; }
.stat-pills { display: flex; gap: 12px; flex-wrap: wrap; }
.stat-pill { min-width: 128px; padding: 12px 18px; border-radius: 14px; text-align: center; border: 1px solid transparent; }
.stat-pill small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; } .stat-pill b { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat-pill.blue { background: var(--info-soft); color: var(--info); } .stat-pill.green { background: var(--ok-soft); color: var(--ok); } .stat-pill.amber { background: var(--warn-soft); color: var(--warn); } .stat-pill.violet { background: var(--brand-soft); color: var(--brand); }

.actions-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.action-card { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); text-decoration: none !important; color: var(--text); transition: transform .18s, box-shadow .18s, border-color .18s; overflow: hidden; min-height: 190px; }
.action-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--brand-500); }
.action-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; }
.action-card h3 { font-size: 17px; } .action-card p { font-size: 13.5px; color: var(--text-2); line-height: 1.5; }
.action-card .go { position: absolute; top: 22px; right: 20px; color: var(--text-3); transition: .18s; } .action-card:hover .go { color: var(--brand); transform: translateX(3px); }
.action-card.primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 16px 36px -14px rgba(79,70,229,.7); }
.action-card.primary p { color: rgba(255,255,255,.85); } .action-card.primary .go { color: rgba(255,255,255,.8); } .action-card.primary .action-ico { background: rgba(255,255,255,.2); color: #fff; }
.action-card.primary::after { content: ''; position: absolute; width: 180px; height: 180px; right: -50px; bottom: -70px; border-radius: 50%; background: rgba(255,255,255,.1); }
.ic-red { background: var(--danger-soft); color: var(--danger); } .ic-green { background: var(--ok-soft); color: var(--ok); } .ic-blue { background: var(--info-soft); color: var(--info); } .ic-violet { background: var(--brand-soft); color: var(--brand); } .ic-amber { background: var(--warn-soft); color: var(--warn); }
.usage-row { display: grid; gap: 8px; } .usage-row + .usage-row { margin-top: 20px; }
.usage-label { display: flex; justify-content: space-between; align-items: center; font-size: 14px; } .usage-label span:first-child { display: flex; gap: 8px; align-items: center; color: var(--text-2); } .usage-label b { font-variant-numeric: tabular-nums; }

/* nova transcrição */
.tabs-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.tab-pill { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 12px; font-weight: 600; font-size: 14.5px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); transition: .15s; }
.tab-pill:hover { border-color: var(--brand-500); color: var(--text); } .tab-pill.active { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 8px 18px -8px rgba(79,70,229,.7); }
.tab-panel { display: none; } .tab-panel.active { display: block; animation: rise .25s ease-out; }
.dropzone { display: block; position: relative; border: 2px dashed var(--border-strong); border-radius: var(--r-xl); padding: 54px 24px; text-align: center; background: var(--surface); transition: .2s; cursor: pointer; }
.dropzone:hover, .dropzone.drag { border-color: var(--brand); background: var(--brand-soft); }
.dropzone.drag { transform: scale(1.01); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dz-ico { width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 22px; background: var(--grad); color: #fff; display: grid; place-items: center; box-shadow: 0 14px 30px -10px rgba(79,70,229,.7); animation: float 3s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-6px); } }
.dropzone h3 { font-size: 20px; margin-bottom: 6px; } .dropzone p { color: var(--text-2); }
.formats { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 18px; }
.formats span { font-family: var(--mono); font-size: 11.5px; padding: 3px 9px; border-radius: 7px; background: var(--surface-2); color: var(--text-2); }
.queue { display: grid; gap: 10px; margin-top: 18px; }
.queue-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); animation: rise .25s; }
.queue-item .q-main { flex: 1; min-width: 0; } .queue-item strong { display: block; font-size: 14.5px; } .queue-item small { color: var(--text-3); font-size: 12.5px; }
.queue-item .progress { margin-top: 8px; } .queue-item.err small { color: var(--danger); } .queue-item.done .progress > span { background: var(--ok); }
.recorder { text-align: center; padding: 40px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); }
.rec-btn { position: relative; width: 96px; height: 96px; border-radius: 50%; border: 0; background: linear-gradient(135deg, #ef4444, #f97316); color: #fff; display: grid; place-items: center; margin: 0 auto 18px; box-shadow: 0 14px 34px -10px rgba(239,68,68,.75); transition: transform .15s; }
.rec-btn:hover { transform: scale(1.05); } .rec-btn.on::before, .rec-btn.on::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #ef4444; animation: ring 1.6s infinite; } .rec-btn.on::after { animation-delay: .8s; }
@keyframes ring { from { transform: scale(1); opacity: .8; } to { transform: scale(1.7); opacity: 0; } }
.rec-time { font-family: var(--mono); font-size: 40px; font-weight: 500; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.rec-canvas { width: 100%; max-width: 520px; height: 64px; margin: 14px auto; display: block; }
.rec-tip { color: var(--text-2); font-size: 14px; max-width: 460px; margin: 0 auto; }
.rec-preview { margin-top: 18px; display: none; gap: 12px; justify-content: center; flex-wrap: wrap; align-items: center; } .rec-preview.show { display: flex; }
.rec-preview audio { height: 40px; max-width: 100%; }
.url-box { padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); }
.sources { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; } .sources span { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--text-2); padding: 6px 12px; background: var(--surface-2); border-radius: 99px; }

/* arquivos */
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.search-box { position: relative; flex: 1; min-width: 220px; } .search-box > .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.search-box input { padding-left: 42px; background: var(--surface-2); border-color: transparent; } .search-box input:focus { background: var(--surface); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip { padding: 7px 14px; border-radius: 99px; font-size: 13.5px; font-weight: 600; background: var(--surface-2); color: var(--text-2); text-decoration: none !important; border: 1px solid transparent; transition: .15s; display: inline-flex; gap: 6px; align-items: center; }
.chip:hover { color: var(--text); border-color: var(--border-strong); } .chip.active { background: var(--brand); color: #fff; }
.bulk-bar { display: none; align-items: center; gap: 12px; padding: 10px 18px; background: var(--brand-soft); color: var(--brand); font-weight: 600; font-size: 14px; border-bottom: 1px solid var(--brand-soft-2); } .bulk-bar.show { display: flex; }
.status-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13.5px; }
.st-ok { color: var(--ok); } .st-run { color: var(--info); } .st-err { color: var(--danger); } .st-wait { color: var(--warn); }
.spin { animation: spin 1s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } }

/* visualizador da transcrição */
.viewer { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.player { position: sticky; top: calc(var(--topbar-h) + 6px); z-index: 20; padding: 16px 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.player-row { display: flex; align-items: center; gap: 14px; }
.play-btn { flex: none; width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--grad); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 22px -8px rgba(79,70,229,.7); transition: transform .12s; } .play-btn:hover { transform: scale(1.06); }
.wave { position: relative; flex: 1; height: 54px; cursor: pointer; min-width: 0; } .wave canvas { width: 100%; height: 100%; display: block; }
.time { font-family: var(--mono); font-size: 13px; color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.speed-btn { min-width: 52px; }
.transcript { padding: 8px 10px 20px; }
.seg-row { display: grid; grid-template-columns: 62px 1fr; gap: 12px; padding: 10px 14px; border-radius: 12px; transition: background .15s; cursor: pointer; border-left: 3px solid transparent; }
.seg-row:hover { background: var(--surface-2); } .seg-row.active { background: var(--brand-soft); border-left-color: var(--brand); }
.seg-ts { font-family: var(--mono); font-size: 12.5px; color: var(--brand); font-weight: 500; padding-top: 3px; }
.seg-text { outline: none; line-height: 1.7; font-size: 15.5px; border-radius: 6px; } .seg-text:focus { background: var(--surface); box-shadow: 0 0 0 2px var(--brand-500); padding: 0 6px; }
.seg-text mark, mark.hl { background: #fde68a; color: #1f2430; border-radius: 3px; padding: 0 1px; }
.edit-on .seg-text { cursor: text; }
.summary-card { background: var(--grad-soft); border: 1px solid var(--brand-soft-2); border-radius: var(--r-lg); padding: 20px; }
.summary-card h4 { display: flex; gap: 8px; align-items: center; color: var(--brand); font-size: 14px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.highlights { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; } .highlights li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; } .highlights .icon { color: var(--ok); margin-top: 2px; }
.meta-list { display: grid; gap: 14px; margin: 0; } .meta-list > div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; } .meta-list dt { color: var(--text-2); } .meta-list dd { margin: 0; font-weight: 600; text-align: right; }
.export-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.export-btn { display: grid; place-items: center; gap: 2px; padding: 12px 6px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font-weight: 700; font-size: 12.5px; color: var(--text); text-decoration: none !important; position: relative; transition: .15s; }
.export-btn:hover { border-color: var(--brand-500); background: var(--brand-soft); color: var(--brand); transform: translateY(-1px); }
.export-btn.locked { opacity: .55; } .export-btn.locked::after { content: ''; position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }
.processing { text-align: center; padding: 70px 20px; } .processing .loader { width: 74px; height: 74px; margin: 0 auto 20px; border-radius: 50%; border: 5px solid var(--brand-soft-2); border-top-color: var(--brand); animation: spin 1s linear infinite; }
.processing h2 { font-size: 22px; margin-bottom: 6px; } .processing p { color: var(--text-2); }
.demo-note { display: flex; gap: 10px; align-items: center; font-size: 13px; padding: 10px 14px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); margin-bottom: 14px; }

/* planos */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 20px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); transition: transform .18s, box-shadow .18s; }
.plan:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.plan.featured { border: 2px solid var(--brand); box-shadow: 0 24px 50px -22px rgba(79,70,229,.55); background: linear-gradient(180deg, var(--brand-soft), var(--surface) 30%); }
.plan.current { outline: 2px solid var(--ok); outline-offset: 2px; }
.plan-flag { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); padding: 4px 14px; border-radius: 99px; background: var(--grad); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.plan h3 { font-size: 22px; } .plan .tagline { color: var(--text-2); font-size: 14px; margin: 4px 0 18px; min-height: 42px; }
.price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 4px; } .price b { font-size: 44px; font-weight: 800; letter-spacing: -.04em; line-height: 1; } .price small { color: var(--text-2); font-size: 14px; }
.price-note { font-size: 13px; color: var(--ok); font-weight: 600; min-height: 20px; margin-bottom: 20px; }
.plan ul { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 11px; flex: 1; } .plan li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; } .plan li .icon { color: var(--ok); margin-top: 2px; }
.checkout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.pay-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pay-method { position: relative; } .pay-method input { position: absolute; opacity: 0; } .pay-method span { display: grid; place-items: center; gap: 6px; padding: 16px 8px; border: 1.5px solid var(--border); border-radius: 14px; font-weight: 600; font-size: 14px; cursor: pointer; transition: .15s; background: var(--surface); }
.pay-method input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); } .pay-method input:focus-visible + span { box-shadow: var(--ring); }
.summary-line { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14.5px; } .summary-line.total { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 16px; font-size: 18px; font-weight: 800; }
.summary-line .disc { color: var(--ok); font-weight: 600; }

/* configurações (cliente) */
.settings-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start; }
.settings-nav { position: sticky; top: calc(var(--topbar-h) + 8px); padding: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.settings-nav .sn-title { padding: 10px 12px 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.settings-nav a { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; color: var(--text-2); font-weight: 600; font-size: 14.5px; text-decoration: none !important; } .settings-nav a:hover { background: var(--surface-2); color: var(--text); } .settings-nav a.active { background: var(--brand-soft); color: var(--brand); }
.section-title { margin-bottom: 18px; } .section-title h2 { font-size: 22px; } .section-title p { color: var(--text-2); margin-top: 4px; }
.plan-banner { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 28px; color: #fff; background: var(--grad); display: grid; gap: 10px; }
.plan-banner::after { content: ''; position: absolute; right: -40px; top: -60px; width: 240px; height: 240px; border-radius: 50%; background: rgba(255,255,255,.12); }
.plan-banner h3 { font-size: 22px; } .plan-banner p { color: rgba(255,255,255,.85); max-width: 480px; } .plan-banner ul { list-style: none; padding: 0; margin: 6px 0 8px; display: grid; gap: 7px; font-size: 14.5px; } .plan-banner li { display: flex; gap: 8px; align-items: center; } .plan-banner .btn { justify-self: start; position: relative; z-index: 1; }
.danger-zone { border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--border)); }
.faq details { border-bottom: 1px solid var(--border); padding: 4px 0; } .faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; } .faq summary::-webkit-details-marker { display: none; } .faq summary::after { content: '+'; font-size: 22px; color: var(--text-3); transition: transform .2s; } .faq details[open] summary::after { transform: rotate(45deg); } .faq details p { color: var(--text-2); padding: 0 0 16px; font-size: 14.5px; }

/* ------------------------------------------------------------ super admin */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { position: relative; padding: 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); overflow: hidden; transition: transform .15s, box-shadow .15s; }
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; } .kpi-label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.kpi-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; }
.kpi-value { font-size: 30px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12.5px; color: var(--text-3); }
.delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; padding: 2px 8px; border-radius: 99px; font-size: 12px; } .delta.up { background: var(--ok-soft); color: var(--ok); } .delta.down { background: var(--danger-soft); color: var(--danger); } .delta.flat { background: var(--surface-2); color: var(--text-2); }
.kpi.hero { background: var(--grad); color: #fff; border: 0; box-shadow: 0 18px 40px -16px rgba(79,70,229,.7); } .kpi.hero .kpi-label, .kpi.hero .kpi-foot { color: rgba(255,255,255,.8); } .kpi.hero .kpi-ico { background: rgba(255,255,255,.2); color: #fff; } .kpi.hero .delta { background: rgba(255,255,255,.22); color: #fff; }
.chart-card .card-head { padding-bottom: 12px; border: 0; } .chart-body { padding: 0 22px 20px; position: relative; }
.chart { position: relative; width: 100%; } .chart svg { overflow: visible; width: 100%; height: auto; display: block; }
.chart text { font-family: var(--font); fill: var(--text-3); font-size: 11.5px; }
.chart .grid-line { stroke: var(--grid); stroke-width: 1; } .chart .axis-line { stroke: var(--border-strong); }
.chart .bar { transition: opacity .15s; } .chart.has-hover .bar:not(.hot) { opacity: .45; }
.chart-tip { position: absolute; z-index: 5; pointer-events: none; padding: 9px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); font-size: 12.5px; opacity: 0; transition: opacity .1s; white-space: nowrap; }
.chart-tip.show { opacity: 1; } .chart-tip b { display: block; font-size: 14px; color: var(--text); } .chart-tip span { color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); } .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.donut-wrap { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; justify-content: center; } .donut-wrap .chart { width: 170px; flex: none; }
.donut-legend { display: grid; gap: 10px; flex: 1; min-width: 160px; } .donut-legend div { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; align-items: center; } .donut-legend span { display: flex; align-items: center; gap: 8px; color: var(--text-2); } .donut-legend i { width: 10px; height: 10px; border-radius: 3px; } .donut-legend b { font-variant-numeric: tabular-nums; }
.list-plain { list-style: none; margin: 0; padding: 0; } .list-plain li { display: flex; align-items: center; gap: 12px; padding: 12px 22px; border-bottom: 1px solid var(--border); } .list-plain li:last-child { border: 0; }
.list-plain .grow strong { display: block; font-size: 14px; font-weight: 600; } .list-plain .grow small { color: var(--text-3); font-size: 12.5px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--border); } .filters select, .filters input[type=date] { width: auto; min-height: 40px; padding-top: 8px; padding-bottom: 8px; }
.mini-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; } .mini-stat { padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); } .mini-stat small { color: var(--text-2); font-size: 12.5px; font-weight: 600; display: block; } .mini-stat b { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.profile-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.check-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; } .check-grid .check { padding: 10px 12px; border: 1px solid var(--border); border-radius: 11px; } .check-grid .check:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.plan-admin-card { display: flex; flex-direction: column; gap: 14px; padding: 22px; }
.plan-admin-card.off { opacity: .6; }
.admin-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.stat-line { display: flex; justify-content: space-between; font-size: 14px; padding: 7px 0; border-bottom: 1px dashed var(--border); } .stat-line:last-child { border: 0; } .stat-line span { color: var(--text-2); }
.secret-note { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--ok); }

/* ---------------------------------------------------------------- responsivo */
@media (max-width: 1240px) {
    .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .actions-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .viewer { grid-template-columns: minmax(0, 1fr); }
    .grid-main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
    .only-mobile { display: inline-grid !important; }
    .sidebar { transform: translateX(-100%); width: 280px !important; box-shadow: var(--shadow-lg); }
    body.sb-open .sidebar { transform: none; } body.sb-open .sb-backdrop { display: block; }
    .main, .sb-collapsed .main { margin-left: 0; }
    .sb-collapsed .logo-text, .sb-collapsed .sb-link span, .sb-collapsed .sb-usage, .sb-collapsed .sb-count { display: revert; }
    .sb-collapsed .sb-link { justify-content: flex-start; padding: 10px 12px; } .sb-collapse { display: none; }
    .topbar { padding: 0 16px; } .page { padding: 4px 16px 48px; } .announcement { margin: 0 16px 4px; }
    .user-chip-text { display: none; } .user-chip { padding-right: 6px; }
    .auth-wrap { grid-template-columns: 1fr; } .auth-art { display: none; }
    .settings-layout, .checkout { grid-template-columns: minmax(0, 1fr); } .settings-nav { position: static; display: flex; overflow-x: auto; gap: 4px; padding: 6px; } .settings-nav .sn-title { display: none; } .settings-nav a { white-space: nowrap; }
    .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hide-sm { display: none !important; }
}
@media (max-width: 640px) {
    body { font-size: 14.5px; }
    .page-head h1, .hello h1 { font-size: 22px; }
    .actions-grid, .kpi-grid, .grid-2, .grid-3, .grid-4, .form-grid { grid-template-columns: minmax(0, 1fr); }
    .form-grid .span-2 { grid-column: auto; }
    .stat-pills { width: 100%; } .stat-pill { flex: 1; min-width: 100px; padding: 10px; } .stat-pill b { font-size: 20px; }
    .auth-card { padding: 26px 20px; border-radius: 20px; } .card-pad, .card-body { padding: 18px; } .card-head { padding: 16px 18px; }
    .player-row { flex-wrap: wrap; } .wave { flex-basis: 100%; order: 3; }
    .seg-row { grid-template-columns: 50px 1fr; padding: 10px 8px; gap: 8px; }
    .price b { font-size: 38px; } .pay-methods { grid-template-columns: 1fr; } .check-grid { grid-template-columns: 1fr 1fr; }
    .toasts { top: 10px; right: 10px; left: 10px; width: auto; } .rec-time { font-size: 34px; }
    .pagination { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
