/* =====================================================================
   GeekHost UI — camada visual compartilhada (painel do cliente + admin)
   Carregar POR ÚLTIMO. Define os tokens de cor (claro/escuro), animações,
   componentes modernos e a responsividade das tabelas.
   Tema: <html data-theme="light|dark"> definido por assets/js/theme.js.
   ===================================================================== */

:root {
    color-scheme: light;
    --gh-green: #01e04f;
    --gh-green-2: #00c2a8;
    --gh-green-dark: #078a3a;
    --gh-green-soft: rgba(1, 224, 79, .12);
    --gh-on-green: #06210f;
    --gh-bg: #f3f6f9;
    --gh-card: #ffffff;
    --gh-surface-2: #f6f8fb;
    --gh-ink: #0f172a;
    --gh-muted: #5b6779;
    --gh-line: #e4e9f0;
    --gh-line-strong: #cfd7e1;
    --gh-ok: #0a8f3c;
    --gh-ok-soft: #e8f8ee;
    --gh-ok-line: #b6e9c6;
    --gh-danger: #dc2626;
    --gh-danger-soft: #fef2f2;
    --gh-danger-line: #fecaca;
    --gh-danger-ink: #991b1b;
    --gh-warn: #d97706;
    --gh-warn-soft: #fff7ed;
    --gh-warn-line: #fed7aa;
    --gh-warn-ink: #9a3412;
    --gh-info: #2563eb;
    --gh-info-soft: #eff6ff;
    --gh-sidebar: #0b1016;
    --gh-sidebar-text: #b9c3cf;
    --gh-topbar: rgba(255, 255, 255, .78);
    --gh-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
    --gh-shadow-lg: 0 24px 60px rgba(15, 23, 42, .16);
    --gh-ring: 0 0 0 3px rgba(1, 224, 79, .35);
    --gh-radius: 16px;
    --gh-radius-sm: 10px;
    --gh-ease: cubic-bezier(.2, .8, .2, 1);
    --chart-1: #01c94a;
    --chart-2: #2563eb;
    --chart-3: #f59e0b;
    --chart-4: #a855f7;
    --chart-5: #ef4444;
    --chart-6: #14b8a6;
    --chart-grid: #e8edf3;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --gh-green-dark: #3fe07d;
    --gh-green-soft: rgba(1, 224, 79, .14);
    --gh-bg: #0a0e13;
    --gh-card: #11171f;
    --gh-surface-2: #161e28;
    --gh-ink: #e7edf4;
    --gh-muted: #94a3b5;
    --gh-line: #222c38;
    --gh-line-strong: #334050;
    --gh-ok: #3fe07d;
    --gh-ok-soft: rgba(63, 224, 125, .12);
    --gh-ok-line: rgba(63, 224, 125, .32);
    --gh-danger: #f87171;
    --gh-danger-soft: rgba(248, 113, 113, .12);
    --gh-danger-line: rgba(248, 113, 113, .35);
    --gh-danger-ink: #fca5a5;
    --gh-warn: #fbbf24;
    --gh-warn-soft: rgba(251, 191, 36, .12);
    --gh-warn-line: rgba(251, 191, 36, .32);
    --gh-warn-ink: #fcd34d;
    --gh-info: #60a5fa;
    --gh-info-soft: rgba(96, 165, 250, .12);
    --gh-sidebar: #06090d;
    --gh-sidebar-text: #a8b3c0;
    --gh-topbar: rgba(10, 14, 19, .72);
    --gh-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
    --gh-shadow-lg: 0 30px 70px rgba(0, 0, 0, .55);
    --chart-grid: #1f2a36;
}

/* ---------- base ---------- */
html { -webkit-text-size-adjust: 100%; }
body.panel-body,
body.admin-body {
    background:
        radial-gradient(1100px 520px at 100% -10%, rgba(0, 194, 168, .08), transparent 60%),
        radial-gradient(900px 480px at -10% -20%, rgba(1, 224, 79, .10), transparent 60%),
        var(--gh-bg);
    background-attachment: fixed;
    color: var(--gh-ink);
    transition: background-color .3s var(--gh-ease), color .3s var(--gh-ease);
}
html[data-theme="dark"] body.panel-body,
html[data-theme="dark"] body.admin-body {
    background:
        radial-gradient(1100px 520px at 100% -10%, rgba(0, 194, 168, .07), transparent 60%),
        radial-gradient(900px 480px at -10% -20%, rgba(1, 224, 79, .08), transparent 60%),
        var(--gh-bg);
}
::selection { background: rgba(1, 224, 79, .28); }
:focus-visible { outline: none; box-shadow: var(--gh-ring); border-radius: 8px; }

/* Native controls follow the theme */
.panel-body input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
.panel-body select,
.panel-body textarea,
.admin-body input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
.admin-body select,
.admin-body textarea {
    background-color: var(--gh-card);
    color: var(--gh-ink);
    border-color: var(--gh-line);
    transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.panel-body input:focus,
.panel-body select:focus,
.panel-body textarea:focus,
.admin-body input:focus,
.admin-body select:focus,
.admin-body textarea:focus {
    outline: none;
    border-color: var(--gh-green);
    box-shadow: var(--gh-ring);
}
.panel-body input::placeholder,
.admin-body input::placeholder,
.panel-body textarea::placeholder,
.admin-body textarea::placeholder { color: var(--gh-muted); opacity: .8; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--gh-green); }

/* ---------- animações ---------- */
@keyframes gh-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes gh-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes gh-pop { 0% { transform: scale(.96); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes gh-shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
@keyframes gh-pulse-ring { 0% { box-shadow: 0 0 0 0 rgba(1, 224, 79, .45); } 100% { box-shadow: 0 0 0 12px rgba(1, 224, 79, 0); } }
@keyframes gh-draw { from { stroke-dashoffset: var(--len, 1200); } to { stroke-dashoffset: 0; } }
@keyframes gh-grow-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes gh-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

.panel-main > *,
.admin-main > * { animation: gh-rise .45s var(--gh-ease) both; }
.panel-main > *:nth-child(2), .admin-main > *:nth-child(2) { animation-delay: .04s; }
.panel-main > *:nth-child(3), .admin-main > *:nth-child(3) { animation-delay: .08s; }
.panel-main > *:nth-child(4), .admin-main > *:nth-child(4) { animation-delay: .12s; }
.panel-main > *:nth-child(5), .admin-main > *:nth-child(5) { animation-delay: .16s; }
.panel-main > *:nth-child(n+6), .admin-main > *:nth-child(n+6) { animation-delay: .2s; }
.gh-skeleton {
    border-radius: 8px; min-height: 14px;
    background: linear-gradient(90deg, var(--gh-surface-2) 0, var(--gh-line) 40%, var(--gh-surface-2) 80%);
    background-size: 800px 100%; animation: gh-shimmer 1.3s linear infinite;
}

/* ---------- cartões ---------- */
.gh-card, .admin-card, .admin-kpi, .home-kpi, .invoice-kpi, .site-card, .home-quick, .ns-card,
.wallet-form-card, .profile-panel, .profile-summary, .support-ticket-item {
    background: var(--gh-card);
    border: 1px solid var(--gh-line);
    box-shadow: var(--gh-shadow);
    transition: transform .25s var(--gh-ease), box-shadow .25s var(--gh-ease), border-color .25s, background-color .3s;
}
.gh-card, .admin-card { border-radius: var(--gh-radius); }
.admin-card { border-top: 1px solid var(--gh-line) !important; position: relative; overflow: hidden; }
.admin-kpi, .home-kpi, .invoice-kpi, .site-card, .home-quick { border-radius: var(--gh-radius); }
.admin-kpi:hover, .home-kpi:hover, .invoice-kpi:hover, .site-card:hover, .home-quick:hover {
    transform: translateY(-3px);
    box-shadow: var(--gh-shadow-lg);
    border-color: var(--gh-line-strong);
}
.admin-kpi { position: relative; overflow: hidden; }
.admin-kpi::after {
    content: ""; position: absolute; inset: auto -30% -60% auto; width: 140px; height: 140px; border-radius: 50%;
    background: radial-gradient(circle, var(--gh-green-soft), transparent 70%); pointer-events: none;
}
.admin-kpi.is-danger::after { background: radial-gradient(circle, var(--gh-danger-soft), transparent 70%); }

/* ---------- botões ---------- */
.gh-btn, .button, .admin-btn-sm, .admin-row-actions button, .admin-row-actions a, .admin-inline button {
    transition: transform .15s var(--gh-ease), box-shadow .2s, background-color .2s, border-color .2s, color .2s;
    background-color: var(--gh-card);
    color: var(--gh-ink);
    border-color: var(--gh-line);
}
.gh-btn:hover, .admin-btn-sm:hover, .admin-row-actions button:hover, .admin-row-actions a:hover, .admin-inline button:hover {
    border-color: var(--gh-line-strong); background-color: var(--gh-surface-2);
}
.gh-btn:active, .admin-btn-sm:active, .admin-row-actions button:active { transform: scale(.97); }
.gh-btn-primary, .admin-btn-sm.is-primary, .admin-inline button.is-primary, .button-lime {
    background: linear-gradient(135deg, #22ee6e, var(--gh-green)) !important;
    border-color: transparent !important;
    color: var(--gh-on-green) !important;
    box-shadow: 0 6px 18px rgba(1, 224, 79, .28);
}
.gh-btn-primary:hover, .admin-btn-sm.is-primary:hover, .admin-inline button.is-primary:hover {
    box-shadow: 0 10px 26px rgba(1, 224, 79, .38); transform: translateY(-1px);
}
.gh-btn-danger, .admin-btn-sm.is-danger, .admin-inline button.is-danger, .admin-row-actions button.is-danger, .gh-btn.gh-btn-danger {
    color: var(--gh-danger) !important; border-color: var(--gh-danger-line) !important; background: var(--gh-danger-soft) !important;
}
.gh-btn-dark, .button-dark { background: var(--gh-ink) !important; color: var(--gh-card) !important; border-color: var(--gh-ink) !important; }
button[disabled], .gh-btn[disabled] { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ---------- badges / alertas ---------- */
.admin-badge, .gh-badge, .panel-badge { letter-spacing: .01em; }
.admin-badge { background: var(--gh-surface-2); color: var(--gh-muted); border: 1px solid var(--gh-line); }
.admin-badge.is-ok, .gh-badge-ok { background: var(--gh-ok-soft) !important; color: var(--gh-ok) !important; border-color: var(--gh-ok-line) !important; }
.admin-badge.is-warn, .gh-badge-warn { background: var(--gh-warn-soft) !important; color: var(--gh-warn-ink) !important; border-color: var(--gh-warn-line) !important; }
.admin-badge.is-danger, .gh-badge-danger { background: var(--gh-danger-soft) !important; color: var(--gh-danger-ink) !important; border-color: var(--gh-danger-line) !important; }
.gh-alert { background: var(--gh-card); border: 1px solid var(--gh-line); color: var(--gh-ink); animation: gh-pop .35s var(--gh-ease) both; border-radius: 14px; }
.gh-alert-danger { background: var(--gh-danger-soft) !important; color: var(--gh-danger-ink) !important; border-color: var(--gh-danger-line) !important; }
.gh-alert-ok { background: var(--gh-ok-soft) !important; color: var(--gh-ok) !important; border-color: var(--gh-ok-line) !important; }
.gh-alert-warn { background: var(--gh-warn-soft) !important; color: var(--gh-warn-ink) !important; border-color: var(--gh-warn-line) !important; }

/* ---------- tabelas ---------- */
.admin-table, .gh-table, .panel-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.admin-table th, .gh-table th, .panel-table th {
    background: var(--gh-surface-2); color: var(--gh-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
    border-bottom: 1px solid var(--gh-line);
}
.admin-table th:first-child, .gh-table th:first-child, .panel-table th:first-child { border-top-left-radius: 10px; }
.admin-table th:last-child, .gh-table th:last-child, .panel-table th:last-child { border-top-right-radius: 10px; }
.admin-table td, .gh-table td, .panel-table td { border-bottom: 1px solid var(--gh-line); }
.admin-table tbody tr, .gh-table tbody tr, .panel-table tbody tr { transition: background-color .15s; }
.admin-table tbody tr:hover, .gh-table tbody tr:hover, .panel-table tbody tr:hover { background: var(--gh-surface-2); }
.admin-table-wrap, .gh-table-wrap, .panel-table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Celular: cada linha vira um cartão (rótulos vêm do <th> via responsive-tables.js) */
@media (max-width: 760px) {
    table.is-stack thead { display: none; }
    table.is-stack, table.is-stack tbody, table.is-stack tr, table.is-stack td { display: block; width: 100%; }
    table.is-stack tr {
        background: var(--gh-card); border: 1px solid var(--gh-line); border-radius: 14px;
        padding: 6px 12px; margin: 0 0 10px; box-shadow: var(--gh-shadow);
    }
    table.is-stack tbody tr:hover { background: var(--gh-card); }
    table.is-stack td {
        display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; text-align: right;
        border-bottom: 1px dashed var(--gh-line); padding: 9px 0 !important; min-height: 0;
    }
    table.is-stack td:last-child { border-bottom: 0; }
    table.is-stack td::before {
        content: attr(data-label); flex: 0 0 38%; text-align: left; color: var(--gh-muted);
        font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding-top: 2px;
    }
    table.is-stack td[data-label=""]::before { display: none; }
    table.is-stack td[data-label=""] { justify-content: flex-start; text-align: left; }
    table.is-stack td > * { max-width: 100%; }
    table.is-stack td .admin-row-actions, table.is-stack td form { justify-content: flex-end; }
    table.is-stack td.admin-empty { display: block; text-align: center; }
    table.is-stack td.admin-empty::before { display: none; }
}

/* ---------- botão de tema ---------- */
.gh-theme-toggle {
    position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; flex: 0 0 auto;
    border-radius: 12px; border: 1px solid var(--gh-line); background: var(--gh-card); color: var(--gh-ink);
    cursor: pointer; overflow: hidden; transition: background-color .2s, border-color .2s, transform .15s;
}
.gh-theme-toggle:hover { background: var(--gh-surface-2); }
.gh-theme-toggle:active { transform: scale(.94); }
.gh-theme-toggle svg { width: 19px; height: 19px; position: absolute; transition: transform .45s var(--gh-ease), opacity .3s; }
.gh-theme-toggle .gh-sun { transform: rotate(90deg) scale(0); opacity: 0; }
html[data-theme="dark"] .gh-theme-toggle .gh-sun { transform: none; opacity: 1; }
html[data-theme="dark"] .gh-theme-toggle .gh-moon { transform: rotate(-90deg) scale(0); opacity: 0; }

/* Lucide indisponível: não deixar caixas vazias */
i[data-lucide]:empty { display: none; }

/* =====================================================================
   PAINEL DO CLIENTE
   ===================================================================== */
.panel-sidebar {
    background:
        radial-gradient(420px 260px at 0% 0%, rgba(1, 224, 79, .16), transparent 70%),
        linear-gradient(180deg, #0f161e, var(--gh-sidebar)) !important;
    border-right: 1px solid rgba(255, 255, 255, .05);
}
.panel-sidebar-nav a { position: relative; transition: background-color .2s, color .2s, padding .2s; }
.panel-sidebar-nav a:hover { padding-left: 18px; }
.panel-sidebar-nav a.is-active {
    background: linear-gradient(90deg, rgba(1, 224, 79, .22), rgba(1, 224, 79, .04)) !important;
    color: #fff !important;
}
.panel-sidebar-nav a.is-active::before {
    content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 4px; border-radius: 4px;
    background: var(--gh-green); box-shadow: 0 0 12px var(--gh-green);
}
.panel-topbar {
    position: sticky; top: 0; z-index: 30;
    background: var(--gh-topbar) !important;
    -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--gh-line) !important;
}
.panel-search input, .panel-icon-btn, .panel-notify, .panel-account-btn, .panel-mobile-toggle {
    background: var(--gh-card) !important; color: var(--gh-ink) !important; border-color: var(--gh-line) !important;
}
.panel-account-dropdown, .panel-notify-menu, .panel-search-results {
    background: var(--gh-card) !important; border: 1px solid var(--gh-line) !important; box-shadow: var(--gh-shadow-lg) !important;
    animation: gh-pop .2s var(--gh-ease) both;
}
.panel-account-dropdown a:hover { background: var(--gh-surface-2); }
.panel-page-title { letter-spacing: -.02em; }
.panel-eyebrow { color: var(--gh-green-dark) !important; }
.home-hero-banner { position: relative; overflow: hidden; border-color: var(--gh-line) !important; }
html[data-theme="dark"] .home-hero-banner {
    background: linear-gradient(135deg, #0f1d16 0%, #0d141c 60%, #0b1118 100%) !important;
}
html[data-theme="dark"] .home-hero-banner-img { opacity: .18; mix-blend-mode: screen; }
html[data-theme="dark"] .home-hero-pills span,
html[data-theme="dark"] .home-hero-pills li { background: rgba(255, 255, 255, .06) !important; color: var(--gh-ink) !important; border-color: var(--gh-line) !important; }
.home-kpi-icon, .home-quick-icon, .invoice-kpi-icon, .home-service-icon {
    background: var(--gh-green-soft) !important; color: var(--gh-green-dark) !important; border-radius: 12px;
}
.home-quick { cursor: pointer; }
.home-quick:hover .home-quick-icon { animation: gh-pulse-ring 1s ease-out; }
.panel-main-auth { background: var(--gh-card); }
html[data-theme="dark"] .wallet-card-preview { box-shadow: 0 20px 50px rgba(0, 0, 0, .6); }
.invoice-drawer-panel, .gh-modal-panel, .billing-dialog { background: var(--gh-card) !important; color: var(--gh-ink) !important; }
.support-msg-bubble { color: var(--gh-ink); }
html[data-theme="dark"] .support-msg.is-staff .support-msg-bubble,
html[data-theme="dark"] .support-msg.is-admin .support-msg-bubble { background: var(--gh-ok-soft); }

/* Primeiros passos (início) */
.gh-steps { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin: 14px 0 0; padding: 0; list-style: none; }
.gh-step {
    display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px;
    border: 1px solid var(--gh-line); background: var(--gh-surface-2); transition: transform .2s var(--gh-ease), border-color .2s;
}
.gh-step:hover { transform: translateY(-2px); border-color: var(--gh-line-strong); }
.gh-step-num {
    flex: 0 0 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px;
    background: var(--gh-card); border: 2px solid var(--gh-line-strong); color: var(--gh-muted);
}
.gh-step.is-done .gh-step-num { background: var(--gh-green); border-color: var(--gh-green); color: var(--gh-on-green); }
.gh-step strong { display: block; font-size: 14px; margin-bottom: 3px; }
.gh-step p { margin: 0 0 6px; color: var(--gh-muted); font-size: 13px; line-height: 1.45; }
.gh-step a { font-size: 13px; font-weight: 700; color: var(--gh-green-dark); }
.gh-progress-line { height: 8px; border-radius: 99px; background: var(--gh-line); overflow: hidden; margin-top: 10px; }
.gh-progress-line > span { display: block; height: 100%; background: linear-gradient(90deg, var(--gh-green), var(--gh-green-2)); border-radius: inherit; transition: width .8s var(--gh-ease); }
.gh-help {
    display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; margin: 0 0 14px;
    background: var(--gh-info-soft); border: 1px solid var(--gh-line); color: var(--gh-ink); font-size: 14px; line-height: 1.5;
}
.gh-help b { color: var(--gh-info); }

/* =====================================================================
   TUTORIAL (tour guiado)
   ===================================================================== */
.gh-tour-backdrop { position: fixed; inset: 0; z-index: 9990; background: transparent; animation: gh-fade .3s both; }
.gh-tour-spot {
    position: fixed; z-index: 9991; border-radius: 14px; pointer-events: none;
    box-shadow: 0 0 0 9999px rgba(5, 10, 16, .68), 0 0 0 3px var(--gh-green), 0 0 30px rgba(1, 224, 79, .55);
    transition: top .45s var(--gh-ease), left .45s var(--gh-ease), width .45s var(--gh-ease), height .45s var(--gh-ease);
}
.gh-tour-card {
    position: fixed; z-index: 9992; width: min(360px, calc(100vw - 24px));
    background: var(--gh-card); color: var(--gh-ink); border: 1px solid var(--gh-line); border-radius: 18px;
    box-shadow: var(--gh-shadow-lg); padding: 18px 18px 14px; animation: gh-pop .35s var(--gh-ease) both;
    transition: top .45s var(--gh-ease), left .45s var(--gh-ease);
}
.gh-tour-card .gh-tour-step { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--gh-green-dark); }
.gh-tour-card h3 { margin: 6px 0 6px; font-size: 18px; letter-spacing: -.01em; }
.gh-tour-card p { margin: 0; color: var(--gh-muted); font-size: 14px; line-height: 1.55; }
.gh-tour-dots { display: flex; gap: 5px; margin: 14px 0 12px; }
.gh-tour-dots i { width: 7px; height: 7px; border-radius: 99px; background: var(--gh-line-strong); transition: width .3s var(--gh-ease), background .3s; }
.gh-tour-dots i.is-on { width: 22px; background: var(--gh-green); }
.gh-tour-actions { display: flex; gap: 8px; justify-content: space-between; align-items: center; }
.gh-tour-actions .gh-tour-skip { background: none; border: 0; color: var(--gh-muted); font: inherit; font-size: 13px; cursor: pointer; padding: 6px 0; }
.gh-tour-actions .gh-tour-nav { display: flex; gap: 8px; }
.gh-tour-hero { font-size: 40px; line-height: 1; margin-bottom: 4px; animation: gh-float 3s ease-in-out infinite; display: inline-block; }

/* =====================================================================
   ADMIN
   ===================================================================== */
.admin-sidebar {
    background:
        radial-gradient(420px 260px at 0% 0%, rgba(1, 224, 79, .14), transparent 70%),
        linear-gradient(180deg, #0f161e, var(--gh-sidebar)) !important;
    border-right: 1px solid rgba(255, 255, 255, .05);
}
.admin-nav a { position: relative; transition: background-color .2s, color .2s, padding .2s; }
.admin-nav a:hover { padding-left: 16px; }
.admin-nav a.is-active { background: linear-gradient(90deg, rgba(1, 224, 79, .22), rgba(1, 224, 79, .04)) !important; color: #fff !important; }
.admin-nav a.is-active::before {
    content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 4px; border-radius: 4px;
    background: var(--gh-green); box-shadow: 0 0 12px var(--gh-green);
}
.admin-topbar {
    position: sticky; top: 0; z-index: 30; background: var(--gh-topbar) !important;
    -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--gh-line) !important;
}
.admin-icon-btn, .admin-account-btn, .admin-search input, .admin-period select {
    background: var(--gh-card) !important; color: var(--gh-ink) !important; border-color: var(--gh-line) !important;
}
.admin-page-head h1 { letter-spacing: -.02em; }
.admin-tabs { border-bottom-color: var(--gh-line); }
.admin-tabs a { transition: color .2s, border-color .2s; }
.admin-details { background: var(--gh-card); border-color: var(--gh-line); transition: box-shadow .2s; }
.admin-details[open] { box-shadow: var(--gh-shadow); }
.admin-code { background: var(--gh-surface-2); border-color: var(--gh-line); color: var(--gh-ink); }
.admin-kpis { gap: 14px; }
.admin-kpi strong { font-size: 24px; letter-spacing: -.02em; }
.admin-kpi em.is-down { color: var(--gh-danger) !important; }
.admin-kpi em { color: var(--gh-ok); }
.admin-kpi em.is-muted { color: var(--gh-muted) !important; }
.admin-kpi a { color: inherit; }

/* Dashboard */
.dash-hero {
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px;
    padding: 20px 22px; border-radius: 20px; margin-bottom: 16px; color: #e9fff1; position: relative; overflow: hidden;
    background: radial-gradient(600px 260px at 90% -40%, rgba(0, 194, 168, .45), transparent 60%),
                radial-gradient(500px 240px at 0% 120%, rgba(1, 224, 79, .35), transparent 60%),
                linear-gradient(135deg, #0d1a14, #0c1219);
    box-shadow: var(--gh-shadow-lg);
}
.dash-hero h2 { margin: 0 0 4px; font-size: 22px; color: #fff; letter-spacing: -.02em; }
.dash-hero p { margin: 0; color: rgba(233, 255, 241, .75); font-size: 14px; }
.dash-hero .dash-hero-stat strong { display: block; font-size: 30px; color: #fff; letter-spacing: -.03em; }
.dash-hero .dash-hero-stat span { font-size: 12px; color: rgba(233, 255, 241, .7); text-transform: uppercase; letter-spacing: .08em; }
.dash-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dash-hero-actions a {
    color: #fff; text-decoration: none; font-weight: 700; font-size: 13px; padding: 9px 12px; border-radius: 10px;
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); transition: background .2s;
}
.dash-hero-actions a:hover { background: rgba(255, 255, 255, .16); }
.dash-grid { display: grid; gap: 14px; grid-template-columns: repeat(12, minmax(0, 1fr)); margin-bottom: 14px; }
.dash-grid > * { margin: 0 !important; min-width: 0; }
.span-12 { grid-column: span 12; } .span-8 { grid-column: span 8; } .span-7 { grid-column: span 7; } .span-6 { grid-column: span 6; }
.span-5 { grid-column: span 5; } .span-4 { grid-column: span 4; } .span-3 { grid-column: span 3; }
@media (max-width: 1180px) { .span-8, .span-7, .span-6, .span-5 { grid-column: span 12; } .span-4, .span-3 { grid-column: span 6; } }
@media (max-width: 680px) { .span-4, .span-3 { grid-column: span 12; } }
.kpi-spark { display: block; width: 100%; height: 34px; margin-top: 8px; }
.dash-kpi-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.dash-kpi-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--gh-green-soft); color: var(--gh-green-dark); font-size: 16px; flex: 0 0 auto; }
.dash-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0 0; padding: 0; list-style: none; font-size: 13px; }
.dash-legend li { display: flex; align-items: center; gap: 6px; color: var(--gh-muted); }
.dash-legend b { color: var(--gh-ink); font-weight: 700; }
.dash-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.dash-list { list-style: none; margin: 0; padding: 0; }
.dash-list li { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--gh-line); font-size: 14px; }
.dash-list li:last-child { border-bottom: 0; }
.dash-list small { display: block; color: var(--gh-muted); font-size: 12px; }
.dash-alert { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; margin-bottom: 8px; font-size: 14px; text-decoration: none; color: inherit; border: 1px solid var(--gh-line); background: var(--gh-surface-2); transition: transform .2s var(--gh-ease); }
.dash-alert:hover { transform: translateX(3px); }
.dash-alert.is-danger { background: var(--gh-danger-soft); border-color: var(--gh-danger-line); color: var(--gh-danger-ink); }
.dash-alert.is-warn { background: var(--gh-warn-soft); border-color: var(--gh-warn-line); color: var(--gh-warn-ink); }
.dash-alert.is-ok { background: var(--gh-ok-soft); border-color: var(--gh-ok-line); color: var(--gh-ok); }
.dash-alert b { font-size: 18px; min-width: 28px; text-align: center; }
.dash-funnel { display: grid; gap: 8px; }
.dash-funnel-row { display: grid; grid-template-columns: 120px 1fr 70px; gap: 10px; align-items: center; font-size: 13px; }
.dash-funnel-bar { height: 26px; border-radius: 8px; background: var(--gh-surface-2); overflow: hidden; }
.dash-funnel-bar span { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--gh-green), var(--gh-green-2)); transform-origin: left; animation: gh-grow-x .9s var(--gh-ease) both; }
@keyframes gh-grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Gráficos SVG */
.gh-chart { width: 100%; height: auto; display: block; overflow: visible; }
.gh-chart .grid line { stroke: var(--chart-grid); stroke-width: 1; }
.gh-chart text { fill: var(--gh-muted); font-size: 11px; font-family: inherit; }
.gh-chart .line { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: var(--len, 1200); animation: gh-draw 1.2s var(--gh-ease) both; }
.gh-chart .area { opacity: .9; animation: gh-fade 1s .3s both; }
.gh-chart .bar { transform-box: fill-box; transform-origin: bottom; animation: gh-grow-y .8s var(--gh-ease) both; rx: 5px; transition: opacity .2s; }
.gh-chart .bar:hover, .gh-chart .slice:hover { opacity: .8; }
.gh-chart .dot { transition: r .15s; }
.gh-chart .hit { fill: transparent; cursor: crosshair; }
.gh-chart .slice { transition: opacity .2s, stroke-width .2s; cursor: pointer; animation: gh-fade .7s both; }
.gh-chart .slice:hover { stroke-width: 30; }
.gh-chart .donut-center { font-size: 20px; font-weight: 800; fill: var(--gh-ink); }
.gh-chart .donut-sub { font-size: 11px; fill: var(--gh-muted); }
.gh-chart-tip {
    position: fixed; z-index: 9999; pointer-events: none; padding: 8px 10px; border-radius: 10px; font-size: 12px; line-height: 1.4;
    background: var(--gh-ink); color: var(--gh-card); box-shadow: var(--gh-shadow-lg); transform: translate(-50%, calc(-100% - 12px));
    opacity: 0; transition: opacity .12s; white-space: nowrap;
}
.gh-chart-tip.is-on { opacity: 1; }
.gh-chart-empty { display: grid; place-items: center; min-height: 160px; color: var(--gh-muted); font-size: 14px; text-align: center; border: 1px dashed var(--gh-line); border-radius: 12px; }

/* =====================================================================
   RESPONSIVIDADE GERAL
   ===================================================================== */
@media (max-width: 900px) {
    .admin-topbar { flex-wrap: wrap; gap: 8px; padding: 10px 12px !important; }
    .admin-search { order: 5; flex: 1 1 100%; max-width: none !important; }
    .admin-period { order: 4; }
    .admin-main, .panel-main { padding-left: 14px !important; padding-right: 14px !important; }
    .admin-page-head, .panel-page-head { padding-left: 14px !important; padding-right: 14px !important; }
    .admin-actions-bar, .admin-filters { gap: 6px; }
    .admin-filters > * { flex: 1 1 140px; min-width: 0; }
    .admin-inline { width: 100%; }
    .admin-inline input, .admin-inline select { flex: 1 1 140px; }
    .admin-dl { grid-template-columns: 1fr; }
    .admin-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .admin-account-btn div small { display: none; }
}
@media (max-width: 420px) {
    .admin-kpis { grid-template-columns: 1fr !important; }
    .admin-kpi strong { font-size: 21px; }
    .dash-hero { padding: 16px; }
    .dash-funnel-row { grid-template-columns: 90px 1fr 56px; }
}
@media (max-width: 760px) {
    .home-split, .profile-layout, .wallet-layout, .support-workspace { grid-template-columns: 1fr !important; }
    .home-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
    .home-kpi { padding: 14px !important; }
    .home-kpi-value { font-size: 20px !important; }
    .panel-page-actions { width: 100%; }
    .profile-tabs { overflow-x: auto; flex-wrap: nowrap !important; -webkit-overflow-scrolling: touch; }
    .profile-tab { white-space: nowrap; }
    .home-hero-banner { min-height: 0 !important; }
    .panel-account-meta { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
    .panel-main > *, .admin-main > *, .gh-chart .line, .gh-chart .bar, .gh-chart .area, .gh-chart .slice, .dash-funnel-bar span { animation: none !important; }
}
@media (max-width: 700px) {
    .gh-chart:not(.kpi-spark) text { font-size: 19px; }
    .gh-chart .donut-center { font-size: 22px; }
    .gh-chart .donut-sub { font-size: 12px; }
}
@media (max-width: 760px) {
    table.is-stack { min-width: 0 !important; }
    .home-split { display: grid; grid-template-columns: minmax(0, 1fr) !important; }
    .home-split > * { min-width: 0; }
    .gh-toast-host { left: 12px; right: 12px; max-width: none; }
}

/* Banner do início no tema escuro e no celular */
html[data-theme="dark"] .home-hero-copy { background: linear-gradient(90deg, rgba(10, 16, 22, .92) 0%, rgba(10, 16, 22, .6) 65%, transparent 100%) !important; }
html[data-theme="dark"] .home-hero-banner-img { opacity: .55; mix-blend-mode: normal; }
@media (max-width: 760px) {
    .home-hero-copy { max-width: none !important; padding: 20px !important; }
    .home-hero-banner { min-height: 0 !important; }
}
.home-hero-banner-img { color: transparent; }

/* Links dentro do conteúdo */
.admin-main a:not([class]), .admin-dl a, .dash-list a, .admin-table td a:not(.admin-btn-sm):not(.admin-link) {
    color: var(--gh-green-dark); text-decoration: none; font-weight: 600;
}
.admin-main a:not([class]):hover, .dash-list a:hover, .admin-table td a:not(.admin-btn-sm):hover { text-decoration: underline; }
.panel-main a:not([class]) { color: var(--gh-green-dark); font-weight: 600; }
body.is-touring .gh-toast-host { display: none !important; }
.gh-cell { min-width: 0; }
@media (max-width: 760px) {
    table.is-stack td .gh-cell { flex: 1 1 auto; min-width: 0; text-align: right; overflow-wrap: anywhere; }
    table.is-stack td[data-label=""] .gh-cell { text-align: left; }
    table.is-stack td .gh-cell .admin-sub { display: block; }
    table.is-stack td .gh-cell .admin-row-actions, table.is-stack td .gh-cell .admin-inline { justify-content: flex-end; }
}
@media (max-width: 420px) {
    .admin-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
    .admin-kpi { padding: 12px !important; }
    .admin-kpi strong { font-size: 18px !important; }
    .admin-kpi span, .admin-kpi em { font-size: 11px !important; }
    .admin-kpi .kpi-spark { height: 24px; }
    .dash-kpi-icon { width: 26px; height: 26px; font-size: 12px; }
}
.dash-hero-actions a.dash-hero-btn { color: #fff !important; text-decoration: none !important; }

/* =====================================================================
   Barras de rolagem (página, sidebar, tabelas, modais) — claro e escuro
   ===================================================================== */
:root { --gh-scroll-thumb: #c3ccd7; --gh-scroll-thumb-hover: #9aa6b4; --gh-scroll-track: transparent; }
html[data-theme="dark"] { --gh-scroll-thumb: #2c3846; --gh-scroll-thumb-hover: #3f4e60; }
html, body, .admin-table-wrap, .gh-table-wrap, .panel-table-wrap, .admin-code, .gh-modal-body, textarea, .admin-tabs, .panel-nav, .admin-nav, .support-thread, .ticket-list {
    scrollbar-width: thin;
    scrollbar-color: var(--gh-scroll-thumb) var(--gh-scroll-track);
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--gh-scroll-track); }
::-webkit-scrollbar-thumb {
    background: var(--gh-scroll-thumb); border-radius: 999px;
    border: 3px solid transparent; background-clip: padding-box; min-height: 40px;
}
::-webkit-scrollbar-thumb:hover { background-color: var(--gh-scroll-thumb-hover); }
::-webkit-scrollbar-corner { background: transparent; }
/* Sidebar escura: barra fina e discreta, aparece mais forte no hover */
.admin-sidebar, .admin-nav, .panel-sidebar, .panel-nav { scrollbar-color: rgba(255,255,255,.14) transparent; }
.admin-nav::-webkit-scrollbar, .panel-sidebar ::-webkit-scrollbar { width: 6px; }
.admin-nav::-webkit-scrollbar-thumb, .panel-sidebar ::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border: 0; }
.admin-nav:hover::-webkit-scrollbar-thumb, .panel-sidebar:hover ::-webkit-scrollbar-thumb { background: rgba(1,224,79,.45); }
/* Tabelas largas: barra horizontal sempre visível e sombra indicando que há mais conteúdo */
.admin-table-wrap, .gh-table-wrap, .panel-table-wrap { overscroll-behavior-x: contain; }
.admin-table-wrap::-webkit-scrollbar, .gh-table-wrap::-webkit-scrollbar { height: 8px; }

/* Painel do cliente › Meus sites: acesso ao DirectAdmin */
.da-access-card { display: grid; gap: 14px; margin-bottom: 16px; padding: 18px 20px; position: relative; overflow: hidden; }
.da-access-card::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, var(--gh-green-soft), transparent 70%); pointer-events: none; }
.da-access-head { display: flex; align-items: flex-start; gap: 14px; }
.da-access-head > div { flex: 1; min-width: 0; }
.da-access-head h3 { margin: 0 0 4px; font-size: 17px; color: var(--gh-ink); }
.da-access-head p { margin: 0; color: var(--gh-muted); font-size: 14px; line-height: 1.5; }
.da-access-actions { display: flex; flex-wrap: wrap; gap: 8px; position: relative; z-index: 1; }
.da-launch-form { display: inline-flex; margin: 0; }
.site-actions .da-launch-form .gh-btn { height: 100%; }
@media (max-width: 560px) {
    .da-access-head { flex-wrap: wrap; }
    .da-access-actions > * { flex: 1 1 calc(50% - 8px); }
    .da-access-actions .gh-btn { width: 100%; justify-content: center; }
}

/* Painel › Suporte: chamada para a Base de conhecimento */
.kb-help-card {
    position: relative; overflow: hidden; display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(260px, 360px);
    align-items: center; gap: 14px 20px; margin: 0 0 18px; padding: 18px 22px; border-radius: 18px;
    background: linear-gradient(120deg, var(--gh-green-soft), transparent 70%), var(--gh-card);
    border: 1px solid var(--gh-ok-line, var(--gh-line)); box-shadow: var(--gh-shadow);
    animation: gh-rise .45s var(--gh-ease) both;
}
.kb-help-card::after { content: ""; position: absolute; right: -50px; bottom: -70px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, var(--gh-green-soft), transparent 70%); pointer-events: none; }
.kb-help-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--gh-green, #01e152); color: #04210f; box-shadow: 0 8px 20px rgba(1, 225, 82, .28); }
.kb-help-icon i, .kb-help-icon svg { width: 26px; height: 26px; }
.kb-help-copy strong { display: block; color: var(--gh-ink); font-size: 16px; line-height: 1.3; }
.kb-help-copy p { margin: 4px 0 0; color: var(--gh-muted); font-size: 14px; line-height: 1.5; }
.kb-help-search { position: relative; z-index: 1; display: flex; align-items: center; gap: 6px; padding: 5px 5px 5px 12px; border-radius: 999px; background: var(--gh-card); border: 1px solid var(--gh-line); transition: border-color .15s, box-shadow .15s; }
.kb-help-search:focus-within { border-color: var(--gh-green, #01e152); box-shadow: 0 0 0 4px var(--gh-green-soft); }
.kb-help-search > i, .kb-help-search > svg { width: 18px; height: 18px; color: var(--gh-muted); flex: 0 0 auto; }
.kb-help-search input { flex: 1; min-width: 0; min-height: 38px; border: 0 !important; outline: 0; background: transparent !important; box-shadow: none !important; color: var(--gh-ink); font: inherit; font-size: 14px; padding: 0 !important; }
.kb-help-search .gh-btn { min-height: 38px; padding: 0 16px; border-radius: 999px; }
.kb-help-link { grid-column: 2 / -1; justify-self: start; display: inline-flex; align-items: center; gap: 4px; margin-top: -6px; color: var(--gh-green-dark, #04933a); font-weight: 700; font-size: 13px; position: relative; z-index: 1; }
.kb-help-link i, .kb-help-link svg { width: 14px; height: 14px; }
.kb-help-link:hover { text-decoration: underline; }
html[data-theme="dark"] .kb-help-link { color: var(--gh-green, #01e152); }
.kb-help-card.is-compact { grid-template-columns: auto minmax(0, 1fr); margin: 4px 0 14px; padding: 14px 16px; }
.kb-help-card.is-compact .kb-help-search { grid-column: 1 / -1; }
.kb-help-card.is-compact .kb-help-link { grid-column: 1 / -1; margin-top: 0; }
.kb-help-card.is-compact .kb-help-icon { width: 42px; height: 42px; border-radius: 12px; }
@media (max-width: 900px) {
    .kb-help-card { grid-template-columns: auto minmax(0, 1fr); }
    .kb-help-search, .kb-help-link { grid-column: 1 / -1; }
}
