/* ==========================================================================
   Parlo theme for the YellowTDS admin.
   Dark neutral surfaces, Syne + Geist Mono, pill buttons, 1rem cards and the
   22px/30px frame lines. Loaded after every other admin stylesheet.
   ========================================================================== */

@font-face { font-family: "Syne"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fonts/syne-latin.woff2) format("woff2"); }
@font-face { font-family: "Syne Fallback"; src: local("Arial"); ascent-override: 93.93%; descent-override: 27.93%; line-gap-override: 0%; size-adjust: 98.47%; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/geist-mono-latin.woff2) format("woff2"); }
@font-face { font-family: "Geist Mono Fallback"; src: local("Arial"); ascent-override: 74.67%; descent-override: 21.92%; line-gap-override: 0%; size-adjust: 134.59%; }

:root {
    color-scheme: dark;
    --p-bg: #0a0a0a;
    --p-surface-1: #121212;
    --p-surface-2: #1a1a1a;
    --p-secondary: #262626;
    --p-border: rgba(255, 255, 255, .1);
    --p-border-strong: #5e5e5e;
    --p-fg: #fafafa;
    --p-muted: #a1a1a1;
    --p-ring: #737373;
    --p-accent: #8b5cf6;
    --p-success: #00bb7f;
    --p-danger: #e5484d;
    --p-warning: #f59e0b;
    --p-radius: 1rem;
    --p-font: "Syne", "Syne Fallback", Arial, sans-serif;
    --p-mono: "Geist Mono", "Geist Mono Fallback", ui-monospace, monospace;

    /* Bootstrap 5.3 tokens */
    --bs-body-bg: var(--p-bg);
    --bs-body-color: var(--p-fg);
    --bs-body-font-family: var(--p-font);
    --bs-font-sans-serif: var(--p-font);
    --bs-font-monospace: var(--p-mono);
    --bs-secondary-color: var(--p-muted);
    --bs-tertiary-bg: var(--p-surface-2);
    --bs-border-color: var(--p-border);
    --bs-emphasis-color: var(--p-fg);
    --bs-primary: var(--p-accent);
    --bs-primary-rgb: 139, 92, 246;
    --bs-link-color: #c4b5fd;
    --bs-link-color-rgb: 196, 181, 253;
    --bs-link-hover-color: var(--p-fg);
    --bs-link-hover-color-rgb: 250, 250, 250;
    --bs-success: var(--p-success);
    --bs-success-rgb: 0, 187, 127;
    --bs-danger: var(--p-danger);
    --bs-danger-rgb: 229, 72, 77;
    --bs-border-radius: .75rem;
    --bs-border-radius-sm: .5rem;
    --bs-border-radius-lg: var(--p-radius);
    --bs-focus-ring-color: rgba(115, 115, 115, .5);
}

/* ---------- base ---------- */
html,
html body {
    background: var(--p-bg) !important;
    color: var(--p-fg);
    font-family: var(--p-font);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html body,
html body button,
html body input,
html body select,
html body textarea,
html body .tabulator {
    font-family: var(--p-font);
}

html body code,
html body pre,
html body kbd,
html body samp,
html body .cm-editor,
html body .cm-content,
.geo-version,
.system-status-value {
    font-family: var(--p-mono);
}

::selection { background: var(--p-fg); color: var(--p-bg); }

* { scrollbar-color: #363636 transparent; scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #363636; border-radius: 999px; border: 2px solid var(--p-bg); }
::-webkit-scrollbar-thumb:hover { background: #4a4a4a; }

html body .container-fluid { background: transparent; }

/* Parlo frame: fixed hairlines 22px and 30px from each edge */
html::before,
html::after,
body::before,
body::after {
    content: "";
    position: fixed;
    top: 0;
    bottom: 0;
    z-index: 60;
    pointer-events: none;
}
html::before { left: 22px; border-left: 1px solid var(--p-border); }
html::after { right: 22px; border-right: 1px solid var(--p-border); }
body::before { left: 30px; border-left: 1px solid var(--p-border); }
body::after { right: 30px; border-right: 1px solid var(--p-border); }

@media (max-width: 640px) {
    html::before, html::after, body::before, body::after { display: none; }
}

/* ---------- header ---------- */
html body .header-top-area {
    position: sticky;
    top: 0;
    z-index: 40;
    min-height: 74px;
    display: flex;
    align-items: center;
    margin: 0 30px;
    background: rgba(0, 0, 0, .85);
    -webkit-backdrop-filter: blur(24px) saturate(1.5);
    backdrop-filter: blur(24px) saturate(1.5);
    border-bottom: 1px solid var(--p-border);
}

html body .header-shell { padding: 0 25px !important; }

.main-logo { max-height: 34px; width: auto; }

html body .geo-version {
    color: var(--p-muted);
    font-size: 12px;
    letter-spacing: -.01em;
}

html body .header-right-info ul.header-right-menu li.nav-item { gap: 8px; }

html body .header-right-info ul.header-right-menu li > a.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 16px;
    border: 1px solid var(--p-border);
    border-radius: 999px;
    background: transparent;
    color: var(--p-muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: color .2s, background-color .2s;
}

html body .header-right-info ul.header-right-menu li > a.nav-link:hover,
html body .header-right-info ul.header-right-menu li > a.nav-link:focus-visible {
    background: var(--p-secondary);
    color: var(--p-fg);
}

@media (max-width: 850px) {
    html body .header-top-area { margin: 0; }
    html body .header-right-info ul.header-right-menu li > a.nav-link { width: 36px; padding: 0; justify-content: center; }
}

/* ---------- page content ---------- */
@keyframes parlo-hero-reveal {
    from { opacity: 0; filter: blur(4px); transform: translateY(12px); }
    to { opacity: 1; filter: none; transform: none; }
}

html body .all-content-wrapper {
    margin: 24px 56px 40px;
    animation: parlo-hero-reveal .6s cubic-bezier(.2, .8, .2, 1) both;
}

@media (max-width: 850px) {
    html body .all-content-wrapper { margin: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    html body .all-content-wrapper { animation: none; }
}

html body h1, html body h2, html body h3,
html body h4, html body h5, html body h6 {
    color: var(--p-fg);
    font-weight: 500;
    letter-spacing: -.02em;
}

html body a { color: #c4b5fd; }
html body a:hover { color: var(--p-fg); }
html body .nav-link, html body .btn, html body .system-status-item { text-decoration: none; }

/* ---------- buttons (pills) ---------- */
html body .btn {
    --bs-btn-font-family: var(--p-font);
    --bs-btn-font-weight: 500;
    --bs-btn-font-size: .875rem;
    --bs-btn-border-radius: 999px;
    --bs-btn-focus-box-shadow: 0 0 0 1px var(--p-ring);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 36px;
    padding-inline: 1rem;
    border-radius: 999px;
    box-shadow: none;
    transition: color .2s, background-color .2s, border-color .2s, transform .1s;
}
html body .btn {
    /* page stylesheets (e.g. modal-common.css) set raw backgrounds on .btn-*; route them back through the Bootstrap vars */
    background-color: var(--bs-btn-bg);
    color: var(--bs-btn-color);
    border: var(--bs-btn-border-width, 1px) solid var(--bs-btn-border-color);
}
html body .btn:hover { background-color: var(--bs-btn-hover-bg); color: var(--bs-btn-hover-color); border-color: var(--bs-btn-hover-border-color); }
html body .btn:active { transform: scale(.98); background-color: var(--bs-btn-active-bg, var(--bs-btn-hover-bg)); }
html body .btn-sm { min-height: 32px; padding-inline: .75rem; font-size: .75rem; }

/* primary -> Parlo white button */
html body .btn-primary {
    --bs-btn-color: #303030;
    --bs-btn-bg: #fff;
    --bs-btn-border-color: #e5e5e5;
    --bs-btn-hover-color: #0a0a0a;
    --bs-btn-hover-bg: #fafafa;
    --bs-btn-hover-border-color: #e5e5e5;
    --bs-btn-active-color: #0a0a0a;
    --bs-btn-active-bg: #e5e5e5;
    --bs-btn-active-border-color: #e5e5e5;
    --bs-btn-disabled-color: #303030;
    --bs-btn-disabled-bg: #fff;
    --bs-btn-disabled-border-color: #e5e5e5;
}

/* info / secondary / light / dark -> ghost */
html body .btn-info,
html body .btn-secondary,
html body .btn-light,
html body .btn-dark,
html body .btn-outline-primary,
html body .btn-outline-secondary,
html body .btn-outline-info,
html body .btn-outline-light {
    --bs-btn-color: var(--p-fg);
    --bs-btn-bg: rgba(250, 250, 250, .05);
    --bs-btn-border-color: var(--p-border);
    --bs-btn-hover-color: var(--p-fg);
    --bs-btn-hover-bg: rgba(38, 38, 38, .9);
    --bs-btn-hover-border-color: rgba(255, 255, 255, .16);
    --bs-btn-active-color: var(--p-fg);
    --bs-btn-active-bg: var(--p-secondary);
    --bs-btn-active-border-color: rgba(255, 255, 255, .2);
    --bs-btn-disabled-color: var(--p-muted);
    --bs-btn-disabled-bg: rgba(250, 250, 250, .03);
    --bs-btn-disabled-border-color: var(--p-border);
}

html body .btn-success {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--p-success);
    --bs-btn-border-color: var(--p-success);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #00a06d;
    --bs-btn-hover-border-color: #00a06d;
    --bs-btn-active-bg: #008a5e;
    --bs-btn-active-border-color: #008a5e;
}

html body .btn-danger {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--p-danger);
    --bs-btn-border-color: var(--p-danger);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #cf3b40;
    --bs-btn-hover-border-color: #cf3b40;
    --bs-btn-active-bg: #b73337;
    --bs-btn-active-border-color: #b73337;
}

html body .btn-warning {
    --bs-btn-color: #0a0a0a;
    --bs-btn-bg: var(--p-warning);
    --bs-btn-border-color: var(--p-warning);
    --bs-btn-hover-color: #0a0a0a;
    --bs-btn-hover-bg: #fbbf24;
    --bs-btn-hover-border-color: #fbbf24;
}

html body .btn-outline-danger {
    --bs-btn-color: #ff8a8e;
    --bs-btn-border-color: rgba(229, 72, 77, .5);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--p-danger);
    --bs-btn-hover-border-color: var(--p-danger);
}

html body .btn-outline-success {
    --bs-btn-color: #5ee0b0;
    --bs-btn-border-color: rgba(0, 187, 127, .5);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--p-success);
    --bs-btn-hover-border-color: var(--p-success);
}

/* ---------- forms ---------- */
html body .form-control,
html body .form-select,
html body input[type="text"],
html body input[type="number"],
html body input[type="password"],
html body input[type="search"],
html body input[type="url"],
html body input[type="email"],
html body select,
html body textarea {
    background-color: var(--p-surface-1);
    border: 1px solid var(--p-border);
    border-radius: .75rem;
    color: var(--p-fg);
}

html body .form-control::placeholder,
html body input::placeholder,
html body textarea::placeholder { color: #6b6b6b; }

html body .form-control:focus,
html body .form-select:focus,
html body input:focus,
html body select:focus,
html body textarea:focus {
    background-color: var(--p-surface-1);
    border-color: var(--p-ring);
    box-shadow: 0 0 0 1px var(--p-ring);
    color: var(--p-fg);
    outline: none;
}

html body .form-check-input:checked { background-color: var(--p-accent); border-color: var(--p-accent); }
html body input[type="checkbox"], html body input[type="radio"] { accent-color: var(--p-accent); }

/* ---------- cards / surfaces ---------- */
html body .card,
html body .campaign-table-shell {
    background: var(--p-surface-1);
    border: 1px solid var(--p-border);
    border-radius: var(--p-radius);
}

html body .campaign-table-shell { overflow: hidden; }

html body .badge { border-radius: 999px; font-weight: 500; }

/* system status strip on the dashboard -> Parlo pill */
html body .system-status-inline {
    border: 1px solid var(--p-border);
    border-radius: 999px;
    background: var(--p-surface-1);
}
html body .system-status-item { color: var(--p-muted); }
html body a.system-status-item:hover { color: var(--p-fg); }
html body .system-status-value { color: var(--p-fg); }

/* ---------- tables (Tabulator) ---------- */
html body .tabulator {
    background-color: var(--p-surface-1);
    border: 1px solid var(--p-border);
    border-radius: var(--p-radius);
    font-size: 13px;
}
html body .campaign-table-shell .tabulator { border: 0; border-radius: 0; }

html body .tabulator .tabulator-header,
html body .tabulator .tabulator-header .tabulator-col {
    background-color: var(--p-surface-1);
    color: var(--p-muted);
    border-color: var(--p-border);
}
html body .tabulator .tabulator-header { border-bottom: 1px solid var(--p-border); font-weight: 500; }
html body .tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover { background-color: var(--p-surface-2); color: var(--p-fg); }

html body .tabulator .tabulator-tableholder { background-color: var(--p-surface-1); }

/* figures read better in Geist Mono than in Syne */
html body .tabulator-row .tabulator-cell,
html body .tabulator .tabulator-footer .tabulator-cell {
    font-family: var(--p-mono);
    font-size: 12.5px;
    font-variant-numeric: tabular-nums;
}

html body .tabulator-row,
html body .tabulator-row.tabulator-row-even {
    background-color: var(--p-surface-1);
    color: var(--p-fg);
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}
html body .tabulator-row.tabulator-row-even { background-color: #151515; }
html body .tabulator-row .tabulator-cell { border-right-color: rgba(255, 255, 255, .06); }

@media (hover: hover) and (pointer: fine) {
    html body .tabulator-row.tabulator-selectable:hover { background-color: #1e1e1e; }
}
html body .tabulator-row.tabulator-selected { background-color: rgba(139, 92, 246, .14); }

html body .tabulator .tabulator-footer {
    background-color: var(--p-surface-1);
    border-top: 1px solid var(--p-border);
    color: var(--p-muted);
}
html body .tabulator .tabulator-footer .tabulator-calcs-holder,
html body .tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row {
    background-color: var(--p-surface-2) !important;
}
html body .tabulator .tabulator-footer .tabulator-page {
    border-radius: 999px;
    border-color: var(--p-border);
    background: transparent;
    color: var(--p-muted);
}
html body .tabulator .tabulator-footer .tabulator-page.active,
html body .tabulator .tabulator-footer .tabulator-page:not(.disabled):hover {
    background: var(--p-secondary);
    color: var(--p-fg);
}

/* ---------- modals ---------- */
html body .modal-content,
html body .blocker .modal,
html body .settings-modal,
html body .settings-modal .modal-content {
    background: var(--p-surface-1);
    color: var(--p-fg);
    border: 1px solid var(--p-border);
    border-radius: var(--p-radius);
}
html body .blocker { background-color: rgba(0, 0, 0, .6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
html body .settings-modal-header,
html body .settings-modal-footer,
html body .settings-tabs { background: var(--p-surface-1); border-color: var(--p-border); }
html body .settings-modal-body { background: var(--p-surface-1); }
html body .settings-tab-button.active,
html body .settings-tab-button:hover { color: var(--p-fg); border-bottom-color: var(--p-fg); }
html body .settings-plugin-row,
html body .settings-update-card,
html body .settings-backup-row,
html body .settings-notice { background: var(--p-surface-2); border-color: var(--p-border); border-radius: .75rem; }
html body .settings-plugin-enabled:checked + .settings-plugin-switch-track { background: var(--p-success); border-color: var(--p-success); }

/* ---------- date picker ---------- */
html body .flatpickr-calendar {
    background: var(--p-surface-1);
    border: 1px solid var(--p-border);
    border-radius: var(--p-radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .45);
}
html body .flatpickr-day.selected,
html body .flatpickr-day.startRange,
html body .flatpickr-day.endRange {
    background: var(--p-fg);
    border-color: var(--p-fg);
    color: var(--p-bg);
}
html body .flatpickr-day.inRange { background: var(--p-secondary); border-color: var(--p-secondary); box-shadow: -5px 0 0 var(--p-secondary), 5px 0 0 var(--p-secondary); }
html body .flatpickr-tz-footer { background: var(--p-surface-2); border-top-color: var(--p-border); }

/* ---------- login page ---------- */
body.parlo-login { overflow: auto; }
body.parlo-login .background .shape { display: none; }
body.parlo-login #matrix-rain { opacity: .3; filter: grayscale(1); }
body.parlo-login .grid-overlay {
    background-image: linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
}
body.parlo-login .login-container {
    background: var(--p-surface-1);
    border: 1px solid var(--p-border);
    border-radius: var(--p-radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .45);
}
body.parlo-login .login-container::before { display: none; }
body.parlo-login input {
    background: var(--p-surface-2);
    border: 1px solid var(--p-border);
    border-radius: .75rem;
    color: var(--p-fg);
}
body.parlo-login button.login-button {
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e5e5e5;
    color: #303030;
    font-family: var(--p-font);
    font-weight: 500;
}
body.parlo-login button.login-button:hover {
    background: #fafafa;
    color: #0a0a0a;
    border-color: #e5e5e5;
    text-shadow: none;
    box-shadow: none;
}
body.parlo-login .version-info { font-family: var(--p-mono); color: var(--p-muted); }
body.parlo-login,
body.parlo-login *:not(#cursor):not(#fake-input):not(.cursor) { font-family: var(--p-font); }


/* ==========================================================================
   Menu lateral — padrão Datta Able (fundo #3f4d67, títulos em maiúsculas,
   item ativo em faixa escura com barra azul de 3px, Open Sans 14px)
   ========================================================================== */
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 300 800; font-stretch: 100%; font-display: swap; src: url(fonts/open-sans-latin.woff2) format("woff2"); }

:root {
    --d-sidebar-bg: #3f4d67;
    --d-sidebar-caption: #e8edf7;
    --d-sidebar-color: #a9b7d0;
    --d-primary: #04a9f5;
    --d-sidebar-width: 264px;
    --d-header-height: 74px;
}

html body:has(.app-sidebar) { padding-left: var(--d-sidebar-width); transition: padding-left .2s cubic-bezier(.4, 0, .2, 1); }
html body:has(.app-sidebar) .header-top-area { margin: 0 30px 0 0; }
html body:has(.app-sidebar) .all-content-wrapper { margin: 24px 56px 40px 40px; }
html body:has(.app-sidebar)::before,
html:has(.app-sidebar)::before { display: none; } /* a moldura da esquerda fica atrás do menu */

.app-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 70;
    width: var(--d-sidebar-width);
    display: flex;
    flex-direction: column;
    background: var(--d-sidebar-bg);
    box-shadow: 7px 0 15px 0 rgba(69, 90, 100, .09);
    font-family: "Open Sans", system-ui, sans-serif;
    transition: transform .2s cubic-bezier(.4, 0, .2, 1);
}
.app-sidebar-brand {
    display: flex;
    align-items: center;
    height: var(--d-header-height);
    flex: 0 0 var(--d-header-height);
    padding: 16px 24px;
}
.app-sidebar-brand .main-logo { max-height: 36px; }
.app-sidebar-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
    padding: 10px 0;
    overflow-y: auto;
    scrollbar-color: rgba(255, 255, 255, .2) transparent;
}
html body .app-sidebar .nav-caption {
    display: block;
    margin: 0;
    padding: 24px 23px 8px;
    color: var(--d-sidebar-caption);
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
html body .app-sidebar .nav-caption:first-child { padding-top: 10px; }
html body .app-sidebar .nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 20px;
    border-radius: 0;
    color: var(--d-sidebar-color);
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    text-decoration: none;
    transition: color .2s, background-color .2s;
}
html body .app-sidebar .nav-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html body .app-sidebar .nav-link:hover { color: #fff; }
html body .app-sidebar .nav-link[data-state="active"] {
    background: rgba(0, 0, 0, .19);
    color: #fff;
    font-weight: 500;
}
html body .app-sidebar .nav-link[data-state="active"]::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 3px;
    background: var(--d-primary);
}
html body .app-sidebar .nav-link:focus-visible { outline: 2px solid var(--d-primary); outline-offset: -2px; }
.app-sidebar svg.lucide { width: 18px; height: 18px; flex: 0 0 18px; stroke-width: 1.75; }
.app-sidebar-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, .08);
}
html body .app-sidebar-footer .geo-version {
    padding: 0 23px 10px;
    color: var(--d-sidebar-color);
    font-size: 11px;
    line-height: 1.5;
    white-space: normal;
}

/* botões do cabeçalho (recolher / abrir menu) */
.icon-btn {
    display: inline-grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid var(--p-border);
    border-radius: 999px;
    color: var(--p-muted);
    transition: color .15s, background-color .15s;
}
.icon-btn:hover { background: var(--p-secondary); color: var(--p-fg); }
.icon-btn svg.lucide { width: 16px; height: 16px; }
html body .header-brand-area { display: flex; align-items: center; gap: 8px; }
.sidebar-toggle-mobile { display: none; }

/* recolhido no desktop */
html[data-sidebar="hidden"] body:has(.app-sidebar) { padding-left: 30px; }
html[data-sidebar="hidden"] .app-sidebar { transform: translateX(-100%); box-shadow: none; }
html[data-sidebar="hidden"]:has(.app-sidebar)::before,
html[data-sidebar="hidden"] body:has(.app-sidebar)::before { display: block; }

.sidebar-backdrop { display: none; }

@media (max-width: 1023.98px) {
    html body:has(.app-sidebar),
    html[data-sidebar="hidden"] body:has(.app-sidebar) { padding-left: 0; }
    html body:has(.app-sidebar) .header-top-area { margin: 0; }
    html body:has(.app-sidebar) .all-content-wrapper { margin: 16px; }
    .app-sidebar { transform: translateX(-100%); box-shadow: none; }
    html[data-sidebar="open"] .app-sidebar { transform: none; box-shadow: 7px 0 15px 0 rgba(0, 0, 0, .35); }
    html[data-sidebar="open"] .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 65;
        background: rgba(0, 0, 0, .6);
        -webkit-backdrop-filter: blur(4px);
        backdrop-filter: blur(4px);
    }
    .sidebar-toggle-desktop { display: none; }
    .sidebar-toggle-mobile { display: inline-grid; }
}

@media (prefers-reduced-motion: reduce) {
    .app-sidebar, html body:has(.app-sidebar) { transition: none; }
}

/* ==========================================================================
   Escala padrão (tipografia, alturas e espaçamentos) usada em todo o admin
   ========================================================================== */
:root {
    --fs-page-title: 22px;   /* título da página */
    --fs-value: 26px;        /* números de destaque (KPIs) */
    --fs-body: 14px;         /* texto, links, botões */
    --fs-small: 13px;        /* células de tabela */
    --fs-label: 12px;        /* rótulos, legendas, títulos de seção */
    --h-control: 36px;       /* altura de botões, selects e campos */
    --gap: 24px;
}

/* textos e ícones sempre centralizados na vertical dentro dos blocos */
html body .btn,
html body .nav-link,
html body .badge,
html body .system-status-item { align-items: center; }
html body .btn i, html body .btn svg { line-height: 1; }
html body table td, html body table th { vertical-align: middle; }
html body .form-control, html body .form-select { min-height: var(--h-control); font-size: var(--fs-body); }
html body .buttons-block { align-items: center; gap: 12px; }

/* ==========================================================================
   Visão geral (overview.php)
   ========================================================================== */
.ov-page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: var(--gap);
}
html body .ov-title {
    margin: 0;
    font-size: var(--fs-page-title);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -.02em;
}
.ov-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
    color: var(--p-muted);
    font-size: var(--fs-body);
}
.ov-breadcrumb a { color: var(--p-muted) !important; text-decoration: none; }
.ov-breadcrumb a:hover { color: var(--p-fg) !important; }
.ov-breadcrumb [aria-current] { color: rgba(250, 250, 250, .75); }
.ov-breadcrumb svg.lucide { width: 14px; height: 14px; }

.ov-filters { display: flex; align-items: center; gap: 10px; margin: 0; }
.ov-filter-label { margin: 0; color: var(--p-muted); font-size: var(--fs-label); }
html body .ov-select { width: 240px; height: var(--h-control); padding: 0 36px 0 14px; border-radius: 999px; }

.ov-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: var(--gap);
}
.ov-kpi {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 120px;
    padding: 20px 16px;
    border: 1px solid var(--p-border);
    border-radius: var(--p-radius);
    background: var(--p-surface-1);
    text-align: center;
    animation: parlo-hero-reveal .5s cubic-bezier(.2, .8, .2, 1) both;
}
.ov-kpi-label { margin: 0; color: var(--p-muted); font-size: var(--fs-label); font-weight: 500; letter-spacing: .02em; text-transform: uppercase; }
.ov-kpi-value {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: var(--p-fg);
    font-family: var(--p-mono);
    font-size: clamp(18px, 1.55vw, var(--fs-value));
    font-weight: 500;
    line-height: 1;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.ov-kpi-sub { margin: 0; color: var(--p-muted); font-size: var(--fs-label); line-height: 1.3; }
.ov-kpi-trend { width: 20px; height: 20px; }
.ov-kpi-trend.is-up { color: #00bb7f; }
.ov-kpi-trend.is-down { color: #e5484d; }

.ov-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--gap);
}
.ov-span-3 { grid-column: span 3; }
.ov-span-4 { grid-column: span 4; }
.ov-span-12 { grid-column: 1 / -1; }
.ov-span-5 { grid-column: span 5; }
.ov-span-7 { grid-column: span 7; }
.ov-span-8 { grid-column: span 8; }

.ov-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border: 1px solid var(--p-border);
    border-radius: var(--p-radius);
    background: var(--p-surface-1);
    overflow: hidden;
}
.ov-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 64px;
    padding: 0 24px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}
html body .ov-card-title { margin: 0; font-size: var(--fs-body); font-weight: 500; line-height: 1.3; letter-spacing: 0; }
.ov-badge {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--p-secondary);
    color: var(--p-fg);
    font-size: var(--fs-label);
    font-weight: 500;
}
.ov-table-toggle {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 12px;
    border: 1px solid var(--p-border);
    border-radius: 999px;
    background: transparent;
    color: var(--p-muted);
    font-size: var(--fs-label);
    font-weight: 500;
    cursor: pointer;
    transition: color .2s, background-color .2s;
}
.ov-table-toggle:hover, .ov-table-toggle[aria-pressed="true"] { background: var(--p-secondary); color: var(--p-fg); }
.ov-table-toggle:focus-visible { outline: 1px solid var(--p-ring); outline-offset: 2px; }

.ov-chart { position: relative; height: 300px; padding: 20px 24px 24px; }
.ov-chart[hidden], .ov-chart-table[hidden] { display: none; }
.ov-table-wrap { max-height: 344px; overflow: auto; }
.ov-chart-table { height: 344px; }

.ov-table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
.ov-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    height: 40px;
    padding: 0 16px;
    background: var(--p-surface-1);
    border-bottom: 1px solid var(--p-border);
    color: var(--p-muted);
    font-size: var(--fs-label);
    font-weight: 500;
    text-align: left;
    white-space: nowrap;
}
.ov-table td {
    height: 44px;
    padding: 0 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    color: var(--p-fg);
    white-space: nowrap;
}
.ov-table th:first-child, .ov-table td:first-child { padding-left: 24px; }
.ov-table th:last-child, .ov-table td:last-child { padding-right: 24px; }
.ov-table .num { text-align: right; font-family: var(--p-mono); font-variant-numeric: tabular-nums; }
.ov-table td.is-up { color: #00bb7f; }
.ov-table td.is-down { color: #ff8a8e; }
.ov-table tbody tr:hover td { background: rgba(250, 250, 250, .03); }
.ov-table a { color: var(--p-fg) !important; text-decoration: none; }
.ov-table a:hover { color: #c4b5fd !important; }

.ov-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 100%;
    min-height: 200px;
    color: var(--p-muted);
    font-size: var(--fs-body);
    text-align: center;
}
.ov-empty p { margin: 0; }
.ov-empty svg.lucide { width: 28px; height: 28px; opacity: .6; }

@media (max-width: 1279.98px) {
    .ov-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ov-span-3, .ov-span-4, .ov-span-5, .ov-span-7, .ov-span-8 { grid-column: span 6; }
    .ov-span-8, .ov-span-7 { grid-column: 1 / -1; }
}
@media (max-width: 767.98px) {
    .ov-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ov-span-3, .ov-span-4, .ov-span-5, .ov-span-7, .ov-span-8 { grid-column: 1 / -1; }
    .ov-filters, html body .ov-select { width: 100%; }
    .ov-kpi-value { font-size: 22px; }
}

/* itens do menu nunca encolhem: o menu rola quando não cabe */
.app-sidebar-body > * { flex-shrink: 0; }

/* sem cantos arredondados em nenhum elemento do admin */
*, *::before, *::after,
::-webkit-scrollbar-thumb { border-radius: 0 !important; }

/* ==========================================================================
   Botão preto do design system (star button do Parlo / Dash):
   fundo preto, borda clara fina e uma luz percorrendo a borda em 3s.
   Aplicado aos botões principais (.btn-primary).
   ========================================================================== */
@keyframes parlo-star-light {
    0%   { left: 0;    top: 0; }
    40%  { left: 100%; top: 0; }
    50%  { left: 100%; top: 100%; }
    90%  { left: 0;    top: 100%; }
    100% { left: 0;    top: 0; }
}

html body .btn-primary,
html body .btn-star {
    --bs-btn-color: #fafafa;
    --bs-btn-bg: #000;
    --bs-btn-border-color: rgba(255, 255, 255, .15);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #000;
    --bs-btn-hover-border-color: rgba(255, 255, 255, .3);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #000;
    --bs-btn-active-border-color: rgba(255, 255, 255, .3);
    --bs-btn-disabled-color: #a1a1a1;
    --bs-btn-disabled-bg: #000;
    --bs-btn-disabled-border-color: rgba(255, 255, 255, .1);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background-color: #000;
    color: #fafafa;
}
/* a luz que corre pela borda */
html body .btn-primary::before,
html body .btn-star::before {
    content: "";
    position: absolute;
    z-index: -2;
    width: 110px;
    height: 110px;
    transform: translate(-50%, -50%);
    background: radial-gradient(closest-side, #fafafa, rgba(250, 250, 250, .35) 45%, transparent);
    animation: parlo-star-light 3s linear infinite;
    pointer-events: none;
}
/* o miolo preto: deixa só um fio de luz aparecendo na borda */
html body .btn-primary::after,
html body .btn-star::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 1px;
    background: #000;
    pointer-events: none;
}
html body .btn-primary:hover::after,
html body .btn-star:hover::after { background: #0d0d0d; }
html body .btn-primary:disabled::before,
html body .btn-star:disabled::before { animation: none; opacity: 0; }

@media (prefers-reduced-motion: reduce) {
    html body .btn-primary::before,
    html body .btn-star::before { animation: none; left: 0; top: 0; }
}

/* ==========================================================================
   Sem linhas: nenhuma borda ou divisória separa os elementos.
   A hierarquia vem só do fundo (bg < surface-1 < surface-2).
   Mantidos: setas/triângulos feitos com borda, spinner, checkbox e o
   anel de foco (box-shadow), por acessibilidade.
   ========================================================================== */
:root {
    --p-border: transparent;
    --bs-border-color: transparent;
    --bs-border-color-translucent: transparent;
}

html::before,
html::after,
body::before,
body::after { display: none !important; }

html body hr { display: none; }

html body *:not([class*="arrow"]):not(.spinner-border):not(.spinner-grow):not(.form-check-input):not(.flatpickr-day):not(input[type="radio"]):not(input[type="checkbox"]):not([class*="switch"]):not([class*="toggle-track"]) {
    border-color: transparent !important;
}

/* campos e botões neutros ganham fundo para continuarem visíveis */
html body .form-control,
html body .form-select,
html body input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
html body select,
html body textarea,
html body .btn-secondary,
html body .icon-btn,
html body .ov-table-toggle,
html body .header-right-info ul.header-right-menu li > a.nav-link {
    background-color: var(--p-surface-2);
}

html body .btn-secondary:hover,
html body .icon-btn:hover,
html body .ov-table-toggle:hover { background-color: var(--p-secondary); }

/* aba ativa: fundo no lugar do sublinhado */
html body .settings-tab-button.active {
    background-color: var(--p-surface-2);
    border-radius: .5rem;
}

/* ==========================================================================
   Menu lateral preto. Cada item (uma página) é um bloco num tom de preto
   diferente do fundo do menu; hover e ativo clareiam um passo cada.
   ========================================================================== */
:root {
    --d-sidebar-bg: #000;
    --d-sidebar-item: #111;
    --d-sidebar-item-hover: #1c1c1c;
    --d-sidebar-item-active: #262626;
    --d-sidebar-caption: #6b6b6b;
    --d-sidebar-color: #a1a1a1;
}

html body .app-sidebar { box-shadow: none; }
html body .app-sidebar .nav-caption { padding: 22px 20px 8px; }
html body .app-sidebar .nav-caption:first-child { padding-top: 8px; }
html body .app-sidebar .nav-link {
    margin: 0 12px 4px;
    padding: 9px 12px;
    border-radius: .625rem;
    background: var(--d-sidebar-item);
}
html body .app-sidebar .nav-link:hover {
    background: var(--d-sidebar-item-hover);
    color: var(--p-fg);
}
html body .app-sidebar .nav-link[data-state="active"] {
    background: var(--d-sidebar-item-active);
    color: var(--p-fg);
}
html body .app-sidebar .nav-link[data-state="active"]::before { display: none; }

/* ==========================================================================
   Configurações em lista: cada ajuste é uma linha (nome e ajuda à esquerda,
   controle à direita). A linha desliza para a direita ao passar o mouse.
   ========================================================================== */
html body .settings-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

html body .settings-field,
html body .settings-switches > label,
html body .settings-plugin-row,
html body .settings-backup-row,
html body .settings-update-card {
    background: var(--p-surface-2);
    border-radius: .75rem;
    transition: transform .2s cubic-bezier(.2, .8, .2, 1), background-color .2s;
}

html body .settings-field:hover,
html body .settings-field:focus-within,
html body .settings-switches > label:hover,
html body .settings-plugin-row:hover,
html body .settings-backup-row:hover,
html body .settings-update-card:hover {
    transform: translateX(6px);
    background: var(--p-secondary);
}

html body .settings-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 340px);
    align-items: center;
    gap: 4px 24px;
    padding: 14px 16px;
}
html body .settings-field-wide { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
html body .settings-field > span { grid-column: 1; grid-row: 1; }
html body .settings-field > small:not(.settings-field-error) { grid-column: 1; grid-row: 2; }
html body .settings-field > input,
html body .settings-field > select,
html body .settings-field > .settings-key-row { grid-column: 2; grid-row: 1 / span 2; }
html body .settings-field > .settings-current-value,
html body .settings-field > .settings-field-error { grid-column: 2; }

/* controles mais escuros que a linha, para destacar dentro dela */
html body .settings-field input,
html body .settings-field select,
html body .settings-update-card .btn-secondary { background-color: var(--p-bg); }

html body .settings-switches {
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}
html body .settings-switches > label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
}

@media (max-width: 640px) {
    html body .settings-field,
    html body .settings-field-wide { grid-template-columns: minmax(0, 1fr); }
    html body .settings-field > *,
    html body .settings-field > input,
    html body .settings-field > select,
    html body .settings-field > .settings-key-row { grid-column: 1; grid-row: auto; }
}

@media (prefers-reduced-motion: reduce) {
    html body .settings-field:hover,
    html body .settings-field:focus-within,
    html body .settings-switches > label:hover,
    html body .settings-plugin-row:hover,
    html body .settings-backup-row:hover,
    html body .settings-update-card:hover { transform: none; }
}

html body .settings-modal-body { overflow-x: clip; }

/* nome do produto em texto no lugar da imagem do logo */
html body .app-sidebar-brand .logo-link { text-decoration: none; }
html body .brand-wordmark {
    color: var(--p-fg);
    font-family: var(--p-font);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -.01em;
    white-space: nowrap;
}
