@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Poppins:wght@600;700;800;900&display=swap');

:root {
    --accent: #22c55e;
    --accent-strong: #16a34a;
    --accent-soft: #dcfce7;

    --info: #2563eb;
    --info-soft: #dbeafe;
    --warning: #f59e0b;
    --warning-soft: #fef3c7;
    --danger: #dc2626;
    --danger-soft: #fee2e2;

    --dark-bg: #0b1220;
    --dark-surface: #0f172a;
    --dark-card: #111827;
    --dark-card-strong: #162033;
    --dark-border: rgba(255,255,255,0.08);
    --dark-text: #f8fafc;
    --dark-muted: #94a3b8;

    --light-bg: #f4f7fb;
    --light-surface: #eaf0f7;
    --light-card: #ffffff;
    --light-card-soft: #f8fafc;
    --light-border: rgba(15,23,42,0.08);
    --light-text: #0f172a;
    --light-muted: #64748b;

    --radius-xl: 22px;
    --radius-lg: 18px;
    --radius-md: 14px;

    --shadow-soft: 0 10px 24px rgba(0, 0, 0, 0.12);
    --shadow-medium: 0 16px 34px rgba(0, 0, 0, 0.18);

    --sidebar-bg: linear-gradient(180deg, #020817 0%, #030a16 100%);
}

/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    min-height: 100%;
}

body {
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    display: flex;
    min-height: 100vh;
    transition: background 0.2s ease, color 0.2s ease;
}

/* TEMAS */
body.dark {
    background: linear-gradient(135deg, #07111f 0%, #0b1f3b 55%, #102b4d 100%);
    color: var(--dark-text);
}

body.light {
    background: var(--light-bg);
    color: var(--light-text);
}

/* SIDEBAR */
.sidebar {
    width: 220px;
    min-height: 100vh;
    background: var(--sidebar-bg);
    border-right: 1px solid rgba(255,255,255,0.06);
    padding: 28px 18px;
    box-shadow: 8px 0 24px rgba(0,0,0,0.18);
    flex-shrink: 0;
}

.sidebar h2 {
    color: var(--accent);
    font-size: 24px;
    line-height: 1.15;
    font-weight: 900;
    margin-bottom: 34px;
    letter-spacing: 0.5px;
}

/* font-sync */
.sidebar a {
    display: block;
    text-decoration: none;
    color: #dbe7f3;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: -0.01em;
    transition: 0.2s ease;
}

.sidebar a:hover {
    background: rgba(46, 204, 113, 0.08);
    color: #ffffff;
}

.sidebar a.active {
    background: linear-gradient(90deg, rgba(46,204,113,0.16), rgba(46,204,113,0.06));
    border: 1px solid rgba(46,204,113,0.22);
    color: var(--accent);
    box-shadow: inset 0 0 0 1px rgba(46,204,113,0.04);
}

/* CONTEÚDO */
.content {
    flex: 1;
    padding: 28px;
}

/* TOPO */
.topbar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 24px;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-box {
    padding: 12px 14px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
}

body.dark .theme-box {
    background: rgba(10, 17, 30, 0.94);
    border: 1px solid rgba(255,255,255,0.08);
}

body.light .theme-box {
    background: #ffffff;
    border: 1px solid rgba(15,23,42,0.08);
}

.theme-title {
    font-size: 12px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 800;
}

body.dark .theme-title {
    color: #94a3b8;
}

body.light .theme-title {
    color: #64748b;
}

.theme-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-weight: 800;
}

body.dark .theme-row {
    color: #ffffff;
}

body.light .theme-row {
    color: #0f172a;
}

/* TÍTULOS */
/* font-sync */
.page-title {
    font-family: 'Poppins', 'Inter', Arial, sans-serif;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 22px;
}

body.dark .page-title {
    color: #ffffff;
}

body.light .page-title {
    color: #0f172a;
}

/* font-sync */
.panel-title {
    font-family: 'Poppins', 'Inter', Arial, sans-serif;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-bottom: 18px;
}

body.dark .panel-title {
    color: #ffffff;
}

body.light .panel-title {
    color: #0f172a;
}

/* TABS */
.top-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.top-tab {
    text-decoration: none;
    text-align: center;
    padding: 18px 16px;
    border-radius: var(--radius-lg);
    font-size: 18px;
    font-weight: 900;
    transition: 0.2s ease;
    box-shadow: var(--shadow-soft);
}

body.dark .top-tab {
    background: linear-gradient(180deg, rgba(13, 22, 37, 0.98) 0%, rgba(11, 19, 31, 0.98) 100%);
    border: 1px solid rgba(255,255,255,0.07);
    color: #f8fbff;
}

body.light .top-tab {
    background: #ffffff;
    border: 1px solid rgba(15,23,42,0.08);
    color: #0f172a;
}

.top-tab.active {
    border: 1px solid rgba(46,204,113,0.30);
    box-shadow: 0 12px 26px rgba(0,0,0,0.10);
}

.top-tab:hover {
    transform: translateY(-1px);
}

/* CAIXAS / PAINÉIS */
.panel-box,
.big-panel,
.stat-card,
.plan-card,
.credencial-card,
.upload-box,
.logo-preview-box {
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
}

body.dark .panel-box,
body.dark .big-panel,
body.dark .stat-card,
body.dark .plan-card,
body.dark .credencial-card,
body.dark .upload-box,
body.dark .logo-preview-box {
    background: linear-gradient(180deg, rgba(13, 22, 37, 0.96) 0%, rgba(11, 19, 31, 0.96) 100%);
    border: 1px solid rgba(255,255,255,0.08);
}

body.light .panel-box,
body.light .big-panel,
body.light .stat-card,
body.light .plan-card,
body.light .credencial-card,
body.light .upload-box,
body.light .logo-preview-box {
    background: #ffffff;
    border: 1px solid rgba(15,23,42,0.08);
}

.panel-box {
    padding: 24px;
    margin-bottom: 24px;
}

/* GRID BASE */
.server-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ALERTAS */
.success-alert {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    font-weight: 700;
}

body.dark .success-alert,
body.light .success-alert {
    background: rgba(46, 204, 113, 0.12);
    border: 1px solid rgba(46, 204, 113, 0.20);
    color: #1ec66d;
}

/* BOTÕES */
/* font-sync */
.save-button,
.edit-button,
.toggle-button,
.delete-button,
.mini-button,
.login-form button {
    font-family: 'Poppins', 'Inter', Arial, sans-serif;
    border: none;
    border-radius: 14px;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: 0.2s ease;
    box-shadow: var(--shadow-soft);
}

.save-button,
.login-form button {
    width: 100%;
    padding: 16px 18px;
    font-size: 15px;
    background: linear-gradient(90deg, var(--accent-strong) 0%, var(--accent) 100%);
    color: #04110a;
}

.save-button:hover,
.edit-button:hover,
.toggle-button:hover,
.delete-button:hover,
.mini-button:hover,
.login-form button:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

/* font-sync */
.edit-button {
    background: rgba(46, 204, 113, 0.12);
    border: 1px solid rgba(46, 204, 113, 0.18);
    color: #1ec66d;
    padding: 12px 16px;
}

.toggle-button {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.10);
    color: inherit;
    padding: 12px 16px;
}

body.light .toggle-button {
    background: rgba(15,23,42,0.05);
    border: 1px solid rgba(15,23,42,0.08);
    color: #0f172a;
}

.delete-button {
    background: rgba(255, 82, 82, 0.12);
    border: 1px solid rgba(255, 82, 82, 0.18);
    color: #ff8f8f;
    padding: 12px 16px;
}

.mini-button {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.10);
    color: inherit;
    padding: 10px 12px;
    font-size: 15px;
}

body.light .mini-button {
    background: rgba(15,23,42,0.05);
    border: 1px solid rgba(15,23,42,0.08);
    color: #0f172a;
}

/* FORMULÁRIOS */
.simple-form input,
.simple-form select,
.simple-form textarea,
.cred-input,
.login-form input {
    width: 100%;
    border-radius: var(--radius-md);
    padding: 14px 16px;
    font-size: 14px;
    outline: none;
    transition: 0.2s ease;
    margin-bottom: 14px;
}

body.dark .simple-form input,
body.dark .simple-form select,
body.dark .simple-form textarea,
body.dark .cred-input,
body.dark .login-form input {
    background: var(--dark-surface);
    color: var(--dark-text);
    border: 1px solid var(--dark-border);
}

body.light .simple-form input,
body.light .simple-form select,
body.light .simple-form textarea,
body.light .cred-input,
body.light .login-form input {
    background: var(--light-card);
    color: var(--light-text);
    border: 1px solid var(--light-border);
}

.simple-form input:focus,
.simple-form select:focus,
.simple-form textarea:focus,
.cred-input:focus,
.login-form input:focus {
    border-color: rgba(46, 204, 113, 0.45);
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.08);
}

.simple-form textarea {
    resize: vertical;
    min-height: 110px;
}

/* CARDS DE INFORMAÇÕES DO CLIENTE */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.cards-grid.one-column {
    grid-template-columns: 1fr;
}

.card-option {
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    transition: 0.2s;
    box-shadow: var(--shadow-soft);
}

body.dark .card-option {
    background: linear-gradient(180deg, rgba(14, 24, 39, 0.96) 0%, rgba(11, 19, 31, 0.96) 100%);
    border: 1px solid rgba(46,204,113,0.20);
}

body.light .card-option {
    background: #ffffff;
    border: 1px solid rgba(46,204,113,0.20);
}

.card-option:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.card-left {
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 16px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

body.dark .card-title {
    color: #f8fbff;
}

body.light .card-title {
    color: #0f172a;
}

.card-desc {
    font-size: 13px;
    line-height: 1.4;
    margin-top: 6px;
}

body.dark .card-desc {
    color: #9fb2c8;
}

body.light .card-desc {
    color: #64748b;
}

.card-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-text {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
}

/* TOGGLE */
.switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 30px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    inset: 0;
    cursor: pointer;
    border-radius: 999px;
    transition: 0.25s;
}

body.dark .slider {
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.08);
}

body.light .slider {
    background: rgba(15,23,42,0.12);
    border: 1px solid rgba(15,23,42,0.08);
}

.slider:before {
    content: "";
    position: absolute;
    height: 22px;
    width: 22px;
    left: 4px;
    top: 3px;
    background: #ffffff;
    border-radius: 50%;
    transition: 0.25s;
}

.switch input:checked + .slider {
    background: linear-gradient(90deg, var(--accent-strong) 0%, var(--accent) 100%);
    border-color: rgba(46, 204, 113, 0.35);
}

.switch input:checked + .slider:before {
    transform: translateX(25px);
    background: #04110a;
}

/* DASHBOARD */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.stat-card {
    padding: 22px;
}

.stat-label {
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 8px;
}

body.dark .stat-label {
    color: #9eb0c8;
}

body.light .stat-label {
    color: #64748b;
}

.stat-value {
    font-size: 30px;
    font-weight: 900;
    margin-bottom: 8px;
}

body.dark .stat-value {
    color: #ffffff;
}

body.light .stat-value {
    color: #0f172a;
}

.stat-mini {
    font-size: 13px;
    font-weight: 800;
    color: var(--accent);
}

.big-panel {
    padding: 28px;
}

.big-panel h3 {
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 12px;
}

body.dark .big-panel h3 {
    color: #ffffff;
}

body.light .big-panel h3 {
    color: #0f172a;
}

.big-panel p {
    font-size: 15px;
    line-height: 1.7;
}

body.dark .big-panel p {
    color: #aebcd0;
}

body.light .big-panel p {
    color: #64748b;
}

/* PLANOS */
.plans-toggle-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 10px;
}

.switch-item {
    border-radius: var(--radius-md);
    padding: 14px 16px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

body.dark .switch-item {
    background: linear-gradient(180deg, #0d1726 0%, #0a1320 100%);
    border: 1px solid rgba(255,255,255,0.07);
    color: #fff;
}

body.light .switch-item {
    background: #ffffff;
    border: 1px solid rgba(15,23,42,0.08);
    color: #0f172a;
}

.plans-grid,
.compact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 24px;
    margin-bottom: 24px;
}

.plan-card {
    padding: 18px;
}

.plan-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.plan-card-title {
    font-size: 18px;
    font-weight: 900;
}

body.dark .plan-card-title {
    color: #ffffff;
}

body.light .plan-card-title {
    color: #0f172a;
}

.status-badge {
    font-size: 11px;
    font-weight: 900;
    padding: 6px 10px;
    border-radius: 999px;
}

.status-badge.on {
    background: rgba(46, 204, 113, 0.16);
    color: var(--accent);
    border: 1px solid rgba(46, 204, 113, 0.22);
}

.status-badge.off {
    background: rgba(255,255,255,0.08);
    color: #9ca7b5;
    border: 1px solid rgba(255,255,255,0.08);
}

body.light .status-badge.off {
    background: rgba(15,23,42,0.05);
    color: #64748b;
    border: 1px solid rgba(15,23,42,0.08);
}

/* CREDENCIAIS */
.credenciais-lista {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 18px;
}

.credencial-card {
    padding: 18px 20px;
}

.credencial-info {
    width: 100%;
}

.credencial-edit-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mini-label {
    font-size: 13px;
    font-weight: 700;
    margin-top: 4px;
}

body.dark .mini-label {
    color: #b8c4d4;
}

body.light .mini-label {
    color: #475569;
}

.senha-wrap {
    display: flex;
    gap: 8px;
    align-items: center;
}

.senha-wrap .cred-input {
    flex: 1;
    margin-bottom: 0;
}

.credencial-status {
    margin-top: 10px;
    font-size: 14px;
    font-weight: 700;
}

body.dark .credencial-status {
    color: #c8d4e2;
}

body.light .credencial-status {
    color: #475569;
}

.status-on {
    color: var(--accent);
    font-weight: 900;
}

.status-off {
    color: #ff9b9b;
    font-weight: 900;
}

.cred-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

/* SERVER */
.server-note {
    margin-top: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    line-height: 1.5;
}

body.dark .server-note,
body.light .server-note {
    background: rgba(46, 204, 113, 0.08);
    border: 1px solid rgba(46, 204, 113, 0.14);
    color: #7cdfa4;
}

/* LOGIN */
.login-page {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(rgba(5, 11, 22, 0.72), rgba(5, 11, 22, 0.86)),
        url('https://images.unsplash.com/photo-1516321318423-f06f85e504b3?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
    position: relative;
    overflow: hidden;
}

.login-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(46, 204, 113, 0.16), transparent 35%);
    pointer-events: none;
}

.login-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 460px;
    padding: 24px;
}

.login-box {
    background: rgba(10, 17, 30, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 26px;
    padding: 34px 30px;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px);
}

.login-logo {
    color: var(--accent);
    font-size: 28px;
    font-weight: 900;
    text-align: center;
    margin-bottom: 10px;
}

.login-subtitle {
    color: #c6d2e1;
    text-align: center;
    font-size: 15px;
    margin-bottom: 26px;
}

.login-error {
    background: rgba(255, 82, 82, 0.12);
    color: #ff8f8f;
    border: 1px solid rgba(255, 82, 82, 0.2);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-bottom: 16px;
    font-size: 14px;
    text-align: center;
}

/* RESPONSIVO */
@media (max-width: 1200px) {
    .dashboard-grid,
    .plans-grid,
    .compact-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .top-tabs,
    .grid-2,
    .server-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    body {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-height: auto;
    }

    .content {
        padding: 20px;
    }

    .dashboard-grid,
    .plans-grid,
    .compact-grid {
        grid-template-columns: 1fr;
    }

    .top-tabs {
        grid-template-columns: 1fr;
    }
}

/* ===== DASHBOARD ESTILO REFERÊNCIA ===== */
.dashboard-shell {
    padding-top: 18px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 26px;
}

.dashboard-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-mini-icon {
    font-size: 24px;
    opacity: 0.9;
}

.page-title-inline {
    margin-bottom: 4px;
}

.dashboard-subtitle {
    font-size: 15px;
}

body.dark .dashboard-subtitle {
    color: #b5c3d3;
}

body.light .dashboard-subtitle {
    color: #64748b;
}

.dashboard-header-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.notif-box {
    position: relative;
    font-size: 26px;
    line-height: 1;
}

.notif-dot {
    position: absolute;
    right: -2px;
    top: 1px;
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(46,204,113,0.10);
}

.admin-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: rgba(255,255,255,0.08);
}

body.light .admin-avatar {
    background: rgba(15,23,42,0.08);
}

.admin-name {
    font-size: 16px;
    font-weight: 900;
}

.admin-email {
    font-size: 13px;
}

body.dark .admin-email {
    color: #9fb2c8;
}

body.light .admin-email {
    color: #64748b;
}

.dashboard-top-cards {
    grid-template-columns: repeat(4, 1fr);
    margin-bottom: 22px;
}

.top-metric-card {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 120px;
}

.metric-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
    color: #ffffff;
}

.metric-icon.green { background: #22c55e; }
.metric-icon.blue { background: #2563eb; }
.metric-icon.purple { background: #6d28d9; }
.metric-icon.orange { background: #f59e0b; }

.chart-panel {
    grid-column: span 2;
    min-height: 320px;
}

.donut-panel,
.system-status-panel {
    min-height: 320px;
}

.panel-head-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    gap: 12px;
}

.mini-filter {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
}

body.dark .mini-filter {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    color: #ffffff;
}

body.light .mini-filter {
    background: #f8fafc;
    border: 1px solid rgba(15,23,42,0.08);
    color: #0f172a;
}

.fake-chart {
    height: 220px;
    position: relative;
    overflow: hidden;
    border-radius: 18px;
}

body.dark .fake-chart {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.04);
}

body.light .fake-chart {
    background:
        linear-gradient(180deg, rgba(15,23,42,0.02), rgba(15,23,42,0.01));
    border: 1px solid rgba(15,23,42,0.04);
}

.fake-chart-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(255,255,255,0.06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: calc(100% / 7) calc(100% / 4);
    opacity: 0.25;
}

body.light .fake-chart-grid {
    background-image:
        linear-gradient(to right, rgba(15,23,42,0.06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(15,23,42,0.06) 1px, transparent 1px);
}

.fake-line span {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 0 6px rgba(46,204,113,0.10);
    z-index: 3;
}

.fake-line::before {
    content: "";
    position: absolute;
    left: 4%;
    right: 10%;
    top: 20%;
    bottom: 20%;
    border-bottom: 3px solid var(--accent);
    border-left: 0;
    border-right: 0;
    border-top: 0;
    border-radius: 50% 50% 0 0;
    transform: skewY(-8deg);
    opacity: 0.9;
    z-index: 1;
}

.fake-line-fill {
    position: absolute;
    left: 4%;
    right: 10%;
    bottom: 0;
    top: 42%;
    background: linear-gradient(180deg, rgba(46,204,113,0.22), rgba(46,204,113,0.02));
    clip-path: polygon(0% 70%, 13% 58%, 27% 46%, 41% 42%, 56% 64%, 70% 36%, 86% 28%, 100% 10%, 100% 100%, 0% 100%);
    z-index: 0;
}

.chart-labels {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-top: 12px;
    font-size: 13px;
    text-align: center;
}

body.dark .chart-labels {
    color: #9fb2c8;
}

body.light .chart-labels {
    color: #64748b;
}

.donut-wrap {
    display: flex;
    gap: 18px;
    align-items: center;
    height: calc(100% - 44px);
}

.fake-donut {
    width: 158px;
    height: 158px;
    border-radius: 50%;
    background: conic-gradient(
        #22c55e 0deg 48deg,
        #2563eb 48deg 130deg,
        #6d28d9 130deg 233deg,
        #f59e0b 233deg 304deg,
        #14b8a6 304deg 360deg
    );
    position: relative;
    flex-shrink: 0;
}

.fake-donut::after {
    content: "";
    position: absolute;
    inset: 28px;
    border-radius: 50%;
}

body.dark .fake-donut::after {
    background: #0d1726;
}

body.light .fake-donut::after {
    background: #ffffff;
}

.donut-center {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 2;
}

.donut-center span {
    font-size: 13px;
}

.donut-center strong {
    font-size: 22px;
    font-weight: 900;
}

.donut-legend {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 14px;
}

.donut-legend div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.lg1 { background: #22c55e; }
.lg2 { background: #2563eb; }
.lg3 { background: #6d28d9; }
.lg4 { background: #f59e0b; }
.lg5 { background: #14b8a6; }

.system-status-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.system-status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 15px;
}

.system-status-item span {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-dot {
    width: 10px;
    height: 10px;
    display: inline-block;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 5px rgba(46,204,113,0.10);
}

.dashboard-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 8px 6px;
    font-size: 14px;
    margin-top: 18px;
}

body.dark .dashboard-footer {
    color: #9fb2c8;
}

body.light .dashboard-footer {
    color: #64748b;
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.dashboard-table th,
.dashboard-table td {
    text-align: left;
    padding: 14px 12px;
}

body.dark .dashboard-table thead tr {
    background: rgba(255,255,255,0.04);
}

body.light .dashboard-table thead tr {
    background: #f8fafc;
}

body.dark .dashboard-table tbody tr {
    border-top: 1px solid rgba(255,255,255,0.05);
}

body.light .dashboard-table tbody tr {
    border-top: 1px solid rgba(15,23,42,0.06);
}

.pay-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 800;
}

.pay-badge.pix {
    background: rgba(34,197,94,0.16);
    color: #22c55e;
}

.pay-badge.card {
    background: rgba(37,99,235,0.16);
    color: #2563eb;
}

@media (max-width: 1280px) {
    .dashboard-top-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-main-grid {
        grid-template-columns: 1fr;
    }

    .chart-panel {
        grid-column: span 1;
    }
}

@media (max-width: 900px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-header-right {
        width: 100%;
        justify-content: space-between;
    }

    .dashboard-top-cards,
    .dashboard-bottom-grid {
        grid-template-columns: 1fr;
    }

    .donut-wrap {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-footer {
        flex-direction: column;
    }
}
/* ===== SIDEBAR PRO LEVEL ===== */

/* BASE */
.sidebar-pro {
    width: 240px;
    height: 100vh;
    position: fixed;
    background: linear-gradient(180deg, #020617 0%, #0f172a 100%);
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
}

/* LOGO */
.brand-block {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
}

.brand-title {
    font-size: 18px;
    font-weight: 800;
    color: #22c55e;
    line-height: 1.1;
}

.brand-subtitle {
    font-size: 12px;
    color: #94a3b8;
}

/* GRUPO */
.sidebar-group-title {
    font-size: 11px;
    color: #64748b;
    margin: 15px 0 8px;
    text-transform: uppercase;
}

.sidebar-group-gap {
    margin-top: 20px;
}

/* LINKS */
.sidebar-pro a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 10px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

/* HOVER */
.sidebar-pro a:hover {
    background: rgba(34, 197, 94, 0.08);
    color: #22c55e;
}

/* ATIVO */
.sidebar-pro a.active {
    background: linear-gradient(90deg, #16a34a, #22c55e);
    color: #fff;
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.4);
}

/* ÍCONES */
.nav-icon {
    font-size: 15px;
    width: 18px;
    text-align: center;
    opacity: 0.8;
}

/* STATUS */
.sidebar-status-box {
    margin-top: auto;
    background: rgba(255,255,255,0.04);
    border-radius: 12px;
    padding: 12px;
}

.sidebar-status-title {
    font-size: 12px;
    color: #94a3b8;
}

.sidebar-status-line {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 6px 0;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
}

.sidebar-status-desc {
    font-size: 11px;
    color: #64748b;
}

/* ===== CORREÇÃO LAYOUT ===== */
.content {
    margin-left: 240px !important;
    padding: 24px !important;
}



/* ===== MOBILE FIX PAINEL FINAL ===== */
@media (max-width: 820px) {
    body {
        display: block;
    }

    .sidebar-pro,
    .sidebar {
        position: sticky !important;
        top: 0 !important;
        z-index: 1000 !important;
        width: 100% !important;
        height: auto !important;
        min-height: auto !important;
        padding: 10px 12px !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 10px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        white-space: nowrap !important;
        border-right: none !important;
        border-bottom: 1px solid rgba(255,255,255,.08) !important;
    }

    .brand-block,
    .sidebar-group-title {
        display: none !important;
    }

    .sidebar-pro a,
    .sidebar a {
        flex: 0 0 auto !important;
        min-height: 40px !important;
        margin: 0 !important;
        padding: 10px 14px !important;
        border-radius: 12px !important;
        font-size: 14px !important;
    }

    .content,
    .dashboard-shell {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px !important;
    }

    .top-theme-box {
        position: static !important;
        width: 100% !important;
        margin: 0 0 14px 0 !important;
    }

    .theme-box {
        width: 100% !important;
    }

    .theme-row {
        width: 100% !important;
        justify-content: space-between !important;
    }

    .dashboard-header,
    .dashboard-header-left,
    .dashboard-header-right,
    .dashboard-top-cards,
    .dashboard-bottom-grid,
    .dashboard-grid,
    .server-grid,
    .top-tabs,
    .grid-2,
    .plans-grid,
    .compact-grid {
        width: 100% !important;
    }

    .dashboard-top-cards,
    .dashboard-bottom-grid,
    .dashboard-grid,
    .server-grid,
    .top-tabs,
    .grid-2,
    .plans-grid,
    .compact-grid,
    .cards-grid {
        grid-template-columns: 1fr !important;
    }

    .top-metric-card,
    .stat-card,
    .panel-box,
    .table-panel,
    .card-option,
    .upload-box,
    .logo-preview-box {
        width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
    }

    .stat-card.top-metric-card {
        padding: 18px 16px !important;
    }

    .stat-value {
        font-size: 28px !important;
        line-height: 1.1 !important;
        word-break: break-word !important;
    }

    .panel-head-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }

    .dashboard-table {
        min-width: 620px !important;
    }

    .table-panel {
        overflow-x: auto !important;
    }

    .donut-wrap {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .mini-filter {
        width: 100% !important;
    }

    form > div[style*="grid-template-columns:1fr 1fr"] {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 560px) {
    .content,
    .dashboard-shell {
        padding: 10px !important;
    }

    .page-title {
        font-size: 28px !important;
        line-height: 1.15 !important;
    }

    .dashboard-subtitle {
        font-size: 13px !important;
    }

    .stat-value {
        font-size: 24px !important;
    }

    .metric-icon {
        width: 42px !important;
        height: 42px !important;
        font-size: 20px !important;
    }

    .sidebar-pro a,
    .sidebar a {
        padding: 9px 12px !important;
        font-size: 13px !important;
    }

    .dashboard-table {
        min-width: 580px !important;
    }
}


/* ===== MOBILE FIX DISPOSITIVOS ===== */
@media (max-width: 560px) {
    .top-theme-box,
    .theme-box {
        max-width: 170px !important;
        padding: 10px 12px !important;
    }

    .theme-row span,
    #tema-label {
        font-size: 14px !important;
    }

    .switch {
        transform: scale(.92);
        transform-origin: right center;
    }

    .panel-box div[style*="grid-template-columns:repeat(auto-fit,minmax(160px,1fr))"] {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .panel-box div[style*="grid-template-columns:repeat(auto-fit,minmax(160px,1fr))"] > div {
        width: 100% !important;
    }

    .panel-box div[style*="overflow:auto"] {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .panel-box table[style*="width:100%;border-collapse:collapse;"] {
        min-width: 760px !important;
    }
}


/* ===== THEME CONSISTENCY PATCH ===== */
body.light .panel-box,
body.light .big-panel,
body.light .stat-card,
body.light .plan-card,
body.light .credencial-card,
body.light .upload-box,
body.light .logo-preview-box {
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

body.light .success-alert {
    background: rgba(34, 197, 94, 0.10);
    border: 1px solid rgba(34, 197, 94, 0.18);
    color: #15803d;
}

body.light .edit-button {
    color: #15803d;
    background: rgba(34, 197, 94, 0.10);
    border-color: rgba(34, 197, 94, 0.16);
}

body.light .delete-button {
    color: #dc2626;
    background: rgba(239, 68, 68, 0.10);
    border-color: rgba(239, 68, 68, 0.16);
}

body.dark .delete-button {
    color: #fecaca;
}


/* ===== LOGO PREVIEW FIX ===== */
.logo-preview-box,
.logo-preview-card,
.logo-preview-frame {
    position: relative;
    overflow: hidden;
}

body.light .logo-preview-box,
body.light .logo-preview-card,
body.light .logo-preview-frame {
    background:
        linear-gradient(135deg, rgba(15,23,42,0.96), rgba(30,41,59,0.92)) !important;
    border: 1px solid rgba(148,163,184,0.20) !important;
}

body.dark .logo-preview-box,
body.dark .logo-preview-card,
body.dark .logo-preview-frame {
    background:
        linear-gradient(135deg, rgba(15,23,42,0.96), rgba(30,41,59,0.92)) !important;
}

.logo-preview-box img,
.logo-preview-card img,
.logo-preview-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}


/* ===== LOGO PREVIEW LABEL FIX ===== */
body.light .logo-preview-box .mini-label,
body.light .logo-preview-card .mini-label,
body.light .logo-preview-frame .mini-label {
    color: rgba(255,255,255,0.72) !important;
}

body.dark .logo-preview-box .mini-label,
body.dark .logo-preview-card .mini-label,
body.dark .logo-preview-frame .mini-label {
    color: rgba(255,255,255,0.72) !important;
}


/* ===== BUTTON PALETTE SYSTEM ===== */
.btn-primary,
.save-button,
.login-form button {
    background: linear-gradient(90deg, var(--accent-strong) 0%, var(--accent) 100%) !important;
    color: #04110a !important;
}

.btn-secondary {
    background: var(--info) !important;
    color: #ffffff !important;
}

.btn-neutral {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

.btn-danger {
    background: var(--danger) !important;
    color: #ffffff !important;
}

body.dark .btn-neutral {
    background: #334155 !important;
    color: #f8fafc !important;
}

.green {
    background: linear-gradient(90deg, var(--accent-strong), var(--accent)) !important;
    color: #04110a !important;
}

.blue {
    background: var(--info) !important;
    color: #ffffff !important;
}

.red {
    background: var(--danger) !important;
    color: #ffffff !important;
}

body.light .theme-box {
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

body.light .panel-box,
body.light .big-panel,
body.light .stat-card,
body.light .plan-card,
body.light .credencial-card,
body.light .upload-box,
body.light .logo-preview-box {
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

body.light .theme-title,
body.light .dashboard-subtitle,
body.light .mini-label {
    color: var(--light-muted);
}

body.dark .theme-title,
body.dark .dashboard-subtitle,
body.dark .mini-label {
    color: var(--dark-muted);
}

body.dark code,
body.dark .devices-mono,
body.dark .mkt-script-code {
    font-family: Consolas, monospace;
}

body.light code,
body.light .devices-mono,
body.light .mkt-script-code {
    font-family: Consolas, monospace;
}


/* ===== FINAL DESIGN SYSTEM ===== */
:root {
    --accent: #22c55e;
    --accent-strong: #16a34a;
    --accent-soft: #dcfce7;

    --info: #2563eb;
    --info-strong: #1d4ed8;
    --info-soft: #dbeafe;

    --warning: #f59e0b;
    --warning-strong: #d97706;
    --warning-soft: #fef3c7;

    --danger: #dc2626;
    --danger-strong: #b91c1c;
    --danger-soft: #fee2e2;

    --dark-bg: #0b1220;
    --dark-surface: #0f172a;
    --dark-card: #111827;
    --dark-card-strong: #162033;
    --dark-border: rgba(255,255,255,0.08);
    --dark-text: #f8fafc;
    --dark-muted: #94a3b8;

    --light-bg: #f4f7fb;
    --light-surface: #eaf0f7;
    --light-card: #ffffff;
    --light-card-soft: #f8fafc;
    --light-border: rgba(15,23,42,0.08);
    --light-text: #0f172a;
    --light-muted: #64748b;
}

body {
    font-family: 'Inter', Arial, Helvetica, sans-serif;
}

.page-title,
.panel-title,
.sidebar h2,
.stories-master-title,
.stories-list-title,
.mkt-title,
.status-title {
    font-family: 'Poppins', 'Inter', Arial, sans-serif !important;
    letter-spacing: -0.02em;
}

.page-title {
    font-weight: 800 !important;
}

.panel-title {
    font-weight: 800 !important;
}

body.dark {
    background: linear-gradient(135deg, #07111f 0%, #0b1f3b 55%, #102b4d 100%);
    color: var(--dark-text);
}

body.light {
    background: var(--light-bg);
    color: var(--light-text);
}

body.dark .panel-box,
body.dark .big-panel,
body.dark .stat-card,
body.dark .plan-card,
body.dark .credencial-card,
body.dark .upload-box,
body.dark .logo-preview-box {
    background: linear-gradient(180deg, rgba(13, 22, 37, 0.96) 0%, rgba(11, 19, 31, 0.96) 100%);
    border: 1px solid var(--dark-border);
}

body.light .panel-box,
body.light .big-panel,
body.light .stat-card,
body.light .plan-card,
body.light .credencial-card,
body.light .upload-box,
body.light .logo-preview-box {
    background: var(--light-card);
    border: 1px solid var(--light-border);
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

body.dark .theme-title,
body.dark .dashboard-subtitle,
body.dark .mini-label,
body.dark .field-label,
body.dark .status-subtitle,
body.dark .mkt-meta,
body.dark .logs-subtitle {
    color: var(--dark-muted) !important;
}

body.light .theme-title,
body.light .dashboard-subtitle,
body.light .mini-label,
body.light .field-label,
body.light .status-subtitle,
body.light .mkt-meta,
body.light .logs-subtitle {
    color: var(--light-muted) !important;
}

.save-button,
.edit-button,
.toggle-button,
.delete-button,
.mini-button,
.login-form button,
.btn,
.toggle-secret,
.story-edit-label,
.story-delete-btn,
.mkt-pass-toggle {
    font-family: 'Poppins', 'Inter', Arial, sans-serif !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em;
    border-radius: 14px !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, background 0.18s ease;
}

.save-button,
.login-form button,
.btn-primary,
.green,
.big {
    background: linear-gradient(90deg, var(--accent-strong) 0%, var(--accent) 100%) !important;
    color: #04110a !important;
}

.edit-button,
.btn-secondary,
.blue,
.story-edit-label,
.mkt-pass-toggle {
    background: var(--info) !important;
    color: #ffffff !important;
    border: none !important;
}

.toggle-button,
.mini-button,
.toggle-secret,
.btn-neutral {
    background: #e2e8f0 !important;
    color: #0f172a !important;
    border: 1px solid rgba(15,23,42,0.08) !important;
}

body.dark .toggle-button,
body.dark .mini-button,
body.dark .toggle-secret,
body.dark .btn-neutral {
    background: #334155 !important;
    color: #f8fafc !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
}

.delete-button,
.btn-danger,
.red,
.story-delete-btn {
    background: var(--danger) !important;
    color: #ffffff !important;
    border: none !important;
}

.save-button:hover,
.edit-button:hover,
.toggle-button:hover,
.delete-button:hover,
.mini-button:hover,
.login-form button:hover,
.btn:hover,
.story-edit-label:hover,
.story-delete-btn:hover,
.mkt-pass-toggle:hover {
    transform: translateY(-1px);
    filter: brightness(1.02);
}

.simple-form input,
.simple-form select,
.simple-form textarea,
.cred-input,
.login-form input {
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    border-radius: 14px;
}

body.dark .simple-form input,
body.dark .simple-form select,
body.dark .simple-form textarea,
body.dark .cred-input,
body.dark .login-form input {
    background: var(--dark-surface);
    color: var(--dark-text);
    border: 1px solid var(--dark-border);
}

body.light .simple-form input,
body.light .simple-form select,
body.light .simple-form textarea,
body.light .cred-input,
body.light .login-form input {
    background: var(--light-card);
    color: var(--light-text);
    border: 1px solid var(--light-border);
}

.simple-form input:focus,
.simple-form select:focus,
.simple-form textarea:focus,
.cred-input:focus,
.login-form input:focus {
    border-color: rgba(34, 197, 94, 0.38);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.10);
}

body.dark .status-badge.ok,
body.dark .pay-badge.ok,
body.dark .badge-approved {
    background: rgba(34,197,94,0.18) !important;
    color: #dcfce7 !important;
}

body.light .status-badge.ok,
body.light .pay-badge.ok,
body.light .badge-approved {
    background: var(--accent-soft) !important;
    color: #166534 !important;
}

body.dark .status-badge.pending,
body.dark .pay-badge.pending,
body.dark .badge-pending {
    background: rgba(245,158,11,0.18) !important;
    color: #fef3c7 !important;
}

body.light .status-badge.pending,
body.light .pay-badge.pending,
body.light .badge-pending {
    background: var(--warning-soft) !important;
    color: #92400e !important;
}

body.dark .status-badge.error,
body.dark .pay-badge.error,
body.dark .badge-error {
    background: rgba(239,68,68,0.18) !important;
    color: #fee2e2 !important;
}

body.light .status-badge.error,
body.light .pay-badge.error,
body.light .badge-error {
    background: var(--danger-soft) !important;
    color: #991b1b !important;
}


/* ===== PREMIUM POLISH V1 ===== */
body.dark .content.dashboard-shell {
    max-width: 100%;
}

.page-title {
    font-size: clamp(38px, 4vw, 54px) !important;
    line-height: 1.02;
    margin-bottom: 8px;
    text-wrap: balance;
}

.dashboard-subtitle {
    font-size: 15px !important;
    letter-spacing: -0.01em;
}

.panel-box,
.stat-card,
.table-panel {
    border-radius: 24px !important;
}

body.dark .panel-box,
body.dark .stat-card,
body.dark .table-panel {
    background:
        linear-gradient(180deg, rgba(12, 20, 34, 0.97) 0%, rgba(10, 17, 28, 0.98) 100%) !important;
    border: 1px solid rgba(148, 163, 184, 0.10) !important;
    box-shadow:
        0 22px 44px rgba(2, 8, 23, 0.22),
        inset 0 1px 0 rgba(255,255,255,0.03);
}

body.light .panel-box,
body.light .stat-card,
body.light .table-panel {
    border: 1px solid rgba(15,23,42,0.08) !important;
    box-shadow:
        0 18px 36px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255,255,255,0.72);
}

.dashboard-top-cards {
    gap: 18px !important;
}

.top-metric-card {
    position: relative;
    overflow: hidden;
    padding: 22px 22px !important;
    min-height: 122px;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.top-metric-card:hover {
    transform: translateY(-3px);
}

body.dark .top-metric-card:hover {
    box-shadow:
        0 26px 48px rgba(2, 8, 23, 0.28),
        inset 0 1px 0 rgba(255,255,255,0.04);
    border-color: rgba(96, 165, 250, 0.14) !important;
}

.top-metric-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, rgba(255,255,255,.18), rgba(255,255,255,0));
    opacity: .55;
}

.metric-icon {
    width: 56px !important;
    height: 56px !important;
    font-size: 24px !important;
    border-radius: 18px !important;
    box-shadow:
        0 12px 24px rgba(15, 23, 42, 0.18),
        inset 0 1px 0 rgba(255,255,255,.16);
}

.metric-icon.green {
    background: linear-gradient(180deg, #34d399 0%, #16a34a 100%) !important;
}

.metric-icon.blue {
    background: linear-gradient(180deg, #60a5fa 0%, #2563eb 100%) !important;
}

.metric-icon.orange {
    background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%) !important;
}

.metric-icon.purple {
    background: linear-gradient(180deg, #8b5cf6 0%, #6d28d9 100%) !important;
}

.stat-label {
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: .02em;
    opacity: .82;
    margin-bottom: 6px;
}

.stat-value {
    font-size: clamp(30px, 2.7vw, 42px) !important;
    line-height: 1 !important;
    letter-spacing: -0.03em;
    font-weight: 900 !important;
}

.stat-mini {
    font-size: 12px !important;
    line-height: 1.45;
    margin-top: 8px !important;
}

.panel-title {
    font-size: 28px !important;
    letter-spacing: -0.03em;
}

.panel-head-row {
    margin-bottom: 6px;
}

.dashboard-table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    overflow: hidden;
    border-radius: 16px;
}

.dashboard-table th,
.dashboard-table td {
    padding: 15px 16px !important;
    vertical-align: middle;
}

body.dark .dashboard-table thead tr {
    background: rgba(30, 41, 59, 0.42) !important;
}

body.light .dashboard-table thead tr {
    background: rgba(226, 232, 240, 0.72) !important;
}

.dashboard-table th {
    font-size: 12px !important;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 800;
    opacity: .78;
}

body.dark .dashboard-table tbody tr {
    transition: background .18s ease;
}

body.dark .dashboard-table tbody tr:hover {
    background: rgba(30, 41, 59, 0.26);
}

body.light .dashboard-table tbody tr:hover {
    background: rgba(241, 245, 249, 0.95);
}

.pay-badge,
.log-badge {
    border-radius: 999px !important;
    padding: 7px 12px !important;
    font-size: 11px !important;
    letter-spacing: .02em;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}

.dash-bar-wrap:hover .dash-bar-tooltip {
    opacity: 1 !important;
    transform: translateX(-50%) translateY(0) !important;
}

.dash-bar-wrap:hover .dash-bar {
    filter: brightness(1.08);
    transform: translateY(-3px);
}

.dash-bar {
    transition: transform .18s ease, filter .18s ease, opacity .18s ease;
}

body.dark .top-theme-box,
body.dark .theme-box {
    background: linear-gradient(180deg, rgba(14,24,40,.96) 0%, rgba(10,18,30,.98) 100%) !important;
    border: 1px solid rgba(148,163,184,.10) !important;
    border-radius: 18px !important;
    box-shadow: 0 14px 28px rgba(2,8,23,.18);
}

body.dark .sidebar-pro a.active,
body.dark .sidebar a.active {
    box-shadow: 0 14px 26px rgba(34,197,94,.22);
}

@media (max-width: 820px) {
    .top-metric-card {
        min-height: auto;
    }

    .panel-title {
        font-size: 24px !important;
    }
}


/* ===== PREMIUM POLISH V2 ===== */
.dashboard-header,
.dashboard-top-cards,
.dashboard-bottom-grid,
.panel-box,
.table-panel {
    position: relative;
    z-index: 1;
}

.dashboard-top-cards {
    margin-top: 10px;
    margin-bottom: 10px;
}

.dashboard-top-cards .top-metric-card {
    backdrop-filter: blur(10px);
}

body.dark .dashboard-top-cards .top-metric-card:nth-child(-n+5) {
    background:
        radial-gradient(circle at top right, rgba(59,130,246,.10), transparent 34%),
        linear-gradient(180deg, rgba(13,22,37,.98) 0%, rgba(10,18,30,.98) 100%) !important;
}

body.dark .dashboard-top-cards .top-metric-card:nth-child(n+6) {
    background:
        radial-gradient(circle at top right, rgba(245,158,11,.10), transparent 34%),
        linear-gradient(180deg, rgba(15,23,42,.98) 0%, rgba(11,19,31,.98) 100%) !important;
    border-color: rgba(245,158,11,.12) !important;
}

.dashboard-top-cards .top-metric-card:nth-child(n+6) .stat-label {
    opacity: .9;
}

.dashboard-top-cards .top-metric-card:nth-child(n+6) .stat-value {
    font-size: 26px !important;
}

.dashboard-top-cards .top-metric-card:nth-child(n+6) .stat-mini {
    opacity: .92;
}

.page-title-inline,
.page-title {
    margin-top: 4px;
}

body.dark .panel-box::after,
body.dark .table-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0));
    opacity: .8;
}

.panel-box {
    padding: 20px 20px 18px 20px;
}

.panel-box .panel-title {
    font-size: 22px !important;
}

.dashboard-table {
    margin-top: 6px;
}

.dashboard-table tbody td {
    font-size: 14px;
}

.dashboard-table tbody tr td:first-child {
    font-weight: 600;
}

body.dark .dashboard-table tbody tr + tr td {
    border-top: 1px solid rgba(148,163,184,.08);
}

.dash-bar-wrap {
    cursor: pointer;
}

.dash-bar-tooltip {
    position: absolute;
    left: 50%;
    bottom: 100%;
    margin-bottom: 12px;
    transform: translateX(-50%) translateY(6px);
    background: rgba(15,23,42,.98);
    color: #e2e8f0;
    border: 1px solid rgba(96,165,250,.24);
    border-radius: 14px;
    padding: 10px 12px;
    min-width: 118px;
    text-align: center;
    font-size: 12px;
    line-height: 1.45;
    white-space: nowrap;
    box-shadow: 0 16px 34px rgba(2,8,23,.34);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
    z-index: 40;
}

.dash-bar-tooltip strong {
    display: block;
    margin-bottom: 2px;
    font-size: 12px;
    color: #f8fafc;
}

.dash-bar-wrap:hover .dash-bar-tooltip {
    opacity: 1 !important;
    transform: translateX(-50%) translateY(0) !important;
}

.dash-bar {
    box-shadow:
        0 10px 18px rgba(15,23,42,.16),
        inset 0 1px 0 rgba(255,255,255,.14);
}

body.dark .panel-box div[style*="overflow-x:auto"]::-webkit-scrollbar,
body.dark .table-panel::-webkit-scrollbar {
    height: 10px;
}

body.dark .panel-box div[style*="overflow-x:auto"]::-webkit-scrollbar-track,
body.dark .table-panel::-webkit-scrollbar-track {
    background: rgba(15,23,42,.55);
    border-radius: 999px;
}

body.dark .panel-box div[style*="overflow-x:auto"]::-webkit-scrollbar-thumb,
body.dark .table-panel::-webkit-scrollbar-thumb {
    background: rgba(148,163,184,.36);
    border-radius: 999px;
}

body.dark .panel-box div[style*="overflow-x:auto"]::-webkit-scrollbar-thumb:hover,
body.dark .table-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(148,163,184,.52);
}

.dashboard-grid.dashboard-top-cards + .panel-box,
.dashboard-grid.dashboard-top-cards + .dashboard-bottom-grid,
.panel-box + .panel-box,
.panel-box + .dashboard-bottom-grid,
.dashboard-bottom-grid + .panel-box {
    margin-top: 22px !important;
}

@media (max-width: 820px) {
    .panel-box {
        padding: 18px 16px 16px 16px;
    }

    .dashboard-top-cards .top-metric-card:nth-child(n+6) .stat-value {
        font-size: 22px !important;
    }

    .dash-bar-tooltip {
        min-width: 96px;
        font-size: 11px;
    }
}


/* ===== PREMIUM POLISH V3 VENDAS ===== */
body.dark .dashboard-top-cards .top-metric-card:nth-child(-n+4) {
    background:
        radial-gradient(circle at top right, rgba(96,165,250,.12), transparent 34%),
        linear-gradient(180deg, rgba(12,20,34,.99) 0%, rgba(10,17,28,.99) 100%) !important;
    border-color: rgba(96,165,250,.12) !important;
}

body.dark .dashboard-top-cards .top-metric-card:nth-child(n+5) {
    background:
        radial-gradient(circle at top right, rgba(245,158,11,.08), transparent 36%),
        linear-gradient(180deg, rgba(17,24,39,.98) 0%, rgba(12,19,31,.98) 100%) !important;
    border-color: rgba(148,163,184,.10) !important;
}

.dashboard-top-cards .top-metric-card:nth-child(n+5) .metric-icon {
    width: 50px !important;
    height: 50px !important;
    border-radius: 16px !important;
}

.dashboard-top-cards .top-metric-card:nth-child(n+5) .stat-label {
    font-size: 11px !important;
    letter-spacing: .03em;
    text-transform: uppercase;
    opacity: .78;
}

.dashboard-top-cards .top-metric-card:nth-child(n+5) .stat-mini {
    font-size: 11px !important;
    opacity: .9;
}

.dashboard-top-cards .top-metric-card:nth-child(n+5) {
    min-height: 108px;
}

body.dark .panel-box .panel-title {
    text-shadow: 0 2px 12px rgba(0,0,0,.18);
}

body.dark .panel-box {
    overflow: hidden;
}

body.dark .panel-box[style*="margin-top:20px;"] {
    background:
        radial-gradient(circle at top right, rgba(37,99,235,.06), transparent 28%),
        linear-gradient(180deg, rgba(11,19,31,.98) 0%, rgba(9,16,27,.99) 100%) !important;
}

body.dark .panel-box .dash-bar {
    box-shadow:
        0 12px 22px rgba(2,8,23,.24),
        inset 0 1px 0 rgba(255,255,255,.16);
}

body.dark .panel-box div[style*="justify-content:center;gap:18px"] span:last-child {
    font-weight: 700;
    opacity: .92;
}

body.dark .panel-box div[style*="overflow-x:auto"] {
    scrollbar-color: rgba(148,163,184,.36) rgba(15,23,42,.42);
    scrollbar-width: thin;
}

@media (max-width: 820px) {
    .dashboard-top-cards .top-metric-card:nth-child(n+5) {
        min-height: auto;
    }

    .dashboard-top-cards .top-metric-card:nth-child(n+5) .metric-icon {
        width: 46px !important;
        height: 46px !important;
    }
}


/* ===== PREMIUM POLISH V4 LIGHT ===== */
body.light {
    background: linear-gradient(180deg, #eef3f9 0%, #e8eef6 100%);
}

body.light .content.dashboard-shell {
    background:
        radial-gradient(circle at top right, rgba(37,99,235,.04), transparent 24%),
        linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,0));
}

body.light .page-title {
    color: #0f172a !important;
    text-shadow: 0 1px 0 rgba(255,255,255,.6);
}

body.light .dashboard-subtitle,
body.light .logs-subtitle,
body.light .mini-label {
    color: #5f6f86 !important;
}

body.light .panel-box,
body.light .stat-card,
body.light .table-panel,
body.light .theme-box {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
    border: 1px solid rgba(148,163,184,.24) !important;
    box-shadow:
        0 16px 32px rgba(15,23,42,.08),
        0 2px 10px rgba(148,163,184,.10),
        inset 0 1px 0 rgba(255,255,255,.95) !important;
}

body.light .top-metric-card:nth-child(-n+4) {
    background:
        radial-gradient(circle at top right, rgba(59,130,246,.08), transparent 32%),
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
}

body.light .top-metric-card:nth-child(n+5) {
    background:
        radial-gradient(circle at top right, rgba(245,158,11,.08), transparent 34%),
        linear-gradient(180deg, #fffdfa 0%, #f8fbff 100%) !important;
    border-color: rgba(148,163,184,.26) !important;
}

body.light .stat-label {
    color: #64748b !important;
    opacity: 1 !important;
}

body.light .stat-value,
body.light .panel-title {
    color: #0f172a !important;
}

body.light .stat-mini {
    color: #16a34a !important;
    font-weight: 700;
}

body.light .dashboard-top-cards .top-metric-card:nth-child(n+5) .stat-label {
    color: #7c8da3 !important;
}

body.light .dashboard-top-cards .top-metric-card:nth-child(n+5) {
    box-shadow:
        0 16px 30px rgba(15,23,42,.08),
        0 4px 12px rgba(245,158,11,.08),
        inset 0 1px 0 rgba(255,255,255,.96) !important;
}

body.light .metric-icon {
    box-shadow:
        0 10px 22px rgba(15,23,42,.10),
        inset 0 1px 0 rgba(255,255,255,.28);
}

body.light .panel-box[style*="margin-top:20px;"],
body.light .panel-box[style*="margin-top:18px;"],
body.light .table-panel {
    background:
        radial-gradient(circle at top right, rgba(37,99,235,.05), transparent 26%),
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
}

body.light .dashboard-table thead tr {
    background: rgba(226,232,240,.72) !important;
}

body.light .dashboard-table tbody tr:hover {
    background: rgba(241,245,249,.92) !important;
}

body.light .dashboard-table tbody tr + tr td {
    border-top: 1px solid rgba(148,163,184,.14);
}

body.light .pay-badge,
body.light .log-badge {
    box-shadow: inset 0 1px 0 rgba(255,255,255,.45);
}

body.light .dash-bar {
    box-shadow:
        0 12px 20px rgba(15,23,42,.10),
        inset 0 1px 0 rgba(255,255,255,.20);
}

body.light .dash-bar-tooltip {
    background: rgba(255,255,255,.98) !important;
    color: #0f172a !important;
    border: 1px solid rgba(148,163,184,.26) !important;
    box-shadow: 0 16px 34px rgba(15,23,42,.14) !important;
}

body.light .dash-bar-tooltip strong {
    color: #0f172a !important;
}

body.light .panel-box div[style*="overflow-x:auto"]::-webkit-scrollbar,
body.light .table-panel::-webkit-scrollbar {
    height: 10px;
}

body.light .panel-box div[style*="overflow-x:auto"]::-webkit-scrollbar-track,
body.light .table-panel::-webkit-scrollbar-track {
    background: rgba(226,232,240,.95);
    border-radius: 999px;
}

body.light .panel-box div[style*="overflow-x:auto"]::-webkit-scrollbar-thumb,
body.light .table-panel::-webkit-scrollbar-thumb {
    background: rgba(100,116,139,.42);
    border-radius: 999px;
}

body.light .panel-box div[style*="overflow-x:auto"]::-webkit-scrollbar-thumb:hover,
body.light .table-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(71,85,105,.52);
}


/* ===== PREMIUM POLISH V5 DASHBOARD ===== */
.dashboard-header + .dashboard-grid.dashboard-top-cards {
    margin-top: 16px;
    margin-bottom: 18px;
}

.dashboard-header + .dashboard-grid.dashboard-top-cards .top-metric-card {
    min-height: 128px;
    padding: 24px 22px !important;
}

body.dark .dashboard-header + .dashboard-grid.dashboard-top-cards .top-metric-card {
    background:
        radial-gradient(circle at top right, rgba(96,165,250,.10), transparent 34%),
        linear-gradient(180deg, rgba(12,20,34,.99) 0%, rgba(9,16,28,.99) 100%) !important;
    border-color: rgba(96,165,250,.10) !important;
}

body.light .dashboard-header + .dashboard-grid.dashboard-top-cards .top-metric-card {
    background:
        radial-gradient(circle at top right, rgba(59,130,246,.06), transparent 34%),
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
}

.dashboard-header + .dashboard-grid.dashboard-top-cards .top-metric-card:nth-child(2) {
    transform: scale(1.01);
}

.dashboard-header + .dashboard-grid.dashboard-top-cards .top-metric-card:nth-child(2) .stat-value,
.dashboard-header + .dashboard-grid.dashboard-top-cards .top-metric-card:nth-child(4) .stat-value {
    font-size: clamp(34px, 2.9vw, 46px) !important;
}

.dashboard-header + .dashboard-grid.dashboard-top-cards .top-metric-card:nth-child(3) .stat-value {
    font-size: 24px !important;
}

.dashboard-header + .dashboard-grid.dashboard-top-cards .top-metric-card .stat-mini {
    margin-top: 10px !important;
}

.dashboard-header + .dashboard-grid.dashboard-top-cards + .panel-box {
    padding-top: 18px !important;
    padding-bottom: 18px !important;
}

body.dark .dashboard-header + .dashboard-grid.dashboard-top-cards + .panel-box {
    background:
        radial-gradient(circle at top right, rgba(245,158,11,.06), transparent 26%),
        linear-gradient(180deg, rgba(11,19,31,.99) 0%, rgba(9,16,27,.99) 100%) !important;
}

body.light .dashboard-header + .dashboard-grid.dashboard-top-cards + .panel-box {
    background:
        radial-gradient(circle at top right, rgba(245,158,11,.05), transparent 26%),
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
}

.dashboard-header + .dashboard-grid.dashboard-top-cards + .panel-box .panel-title {
    font-size: 24px !important;
}

.dashboard-header + .dashboard-grid.dashboard-top-cards + .panel-box div[style*="justify-content:center;gap:18px"] {
    margin-top: 12px !important;
    margin-bottom: 2px !important;
}

.dashboard-header + .dashboard-grid.dashboard-top-cards + .panel-box .dash-bar {
    box-shadow:
        0 14px 24px rgba(15,23,42,.18),
        inset 0 1px 0 rgba(255,255,255,.16);
}

.dashboard-header + .dashboard-grid.dashboard-top-cards + .panel-box div[style*="height:320px"] {
    border-radius: 18px;
}

.dashboard-header + .dashboard-grid.dashboard-top-cards + .panel-box + div .panel-box.table-panel {
    padding-top: 18px !important;
}

.dashboard-header + .dashboard-grid.dashboard-top-cards + .panel-box + div .panel-title {
    font-size: 24px !important;
}

body.dark .dashboard-header + .dashboard-grid.dashboard-top-cards + .panel-box + div .dashboard-table thead tr {
    background: rgba(30,41,59,.48) !important;
}

body.light .dashboard-header + .dashboard-grid.dashboard-top-cards + .panel-box + div .dashboard-table thead tr {
    background: rgba(226,232,240,.82) !important;
}

@media (max-width: 820px) {
    .dashboard-header + .dashboard-grid.dashboard-top-cards .top-metric-card:nth-child(2) {
        transform: none;
    }

    .dashboard-header + .dashboard-grid.dashboard-top-cards .top-metric-card {
        min-height: auto;
    }
}


/* ===== DASHBOARD PLANO LIGHT FIX ===== */
body.light .dashboard-grid.dashboard-top-cards .top-metric-card:nth-child(3) div[style*="border-radius:999px"] {
    background: rgba(245, 158, 11, 0.16) !important;
    border: 1px solid rgba(180, 83, 9, 0.28) !important;
    color: #9a3412 !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.65);
}

body.light .dashboard-grid.dashboard-top-cards .top-metric-card:nth-child(3) div[style*="border-radius:999px"] span {
    color: #9a3412 !important;
}


/* ===== VENDAS PILLS LIGHT FIX ===== */
body.light .dashboard-top-cards .top-metric-card:nth-child(6) div[style*="border-radius:999px"] {
    background: rgba(245, 158, 11, 0.16) !important;
    border: 1px solid rgba(180, 83, 9, 0.28) !important;
    color: #9a3412 !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.65);
}

body.light .dashboard-top-cards .top-metric-card:nth-child(6) div[style*="border-radius:999px"] span {
    color: #9a3412 !important;
}

body.light .dashboard-top-cards .top-metric-card:nth-child(7) div[style*="border-radius:999px"] {
    background: rgba(59, 130, 246, 0.14) !important;
    border: 1px solid rgba(29, 78, 216, 0.24) !important;
    color: #1d4ed8 !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.65);
}

body.light .dashboard-top-cards .top-metric-card:nth-child(7) div[style*="border-radius:999px"] span {
    color: #1d4ed8 !important;
}

body.light .dashboard-top-cards .top-metric-card:nth-child(8) div[style*="border-radius:999px"] {
    background: rgba(124, 58, 237, 0.14) !important;
    border: 1px solid rgba(109, 40, 217, 0.24) !important;
    color: #6d28d9 !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.65);
}

body.light .dashboard-top-cards .top-metric-card:nth-child(8) div[style*="border-radius:999px"] span {
    color: #6d28d9 !important;
}


/* ===== FINAL CONSISTENCY POLISH ===== */
.page-title {
    margin-bottom: 10px !important;
}

.panel-title {
    line-height: 1.08;
}

.dashboard-subtitle,
.logs-subtitle,
.mkt-form-help,
.mkt-hero-sub,
.mkt-inline-help,
.server-note,
.stat-mini {
    text-wrap: pretty;
}

.panel-box,
.table-panel,
.stat-card,
.box,
.plano-box,
.credencial-card,
.mkt-card,
.mkt-hero {
    transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease;
}

body.dark .panel-box:hover,
body.dark .table-panel:hover,
body.dark .stat-card:hover,
body.dark .box:hover,
body.dark .plano-box:hover,
body.dark .credencial-card:hover,
body.dark .mkt-card:hover {
    border-color: rgba(148,163,184,.14) !important;
}

body.light .panel-box:hover,
body.light .table-panel:hover,
body.light .stat-card:hover,
body.light .box:hover,
body.light .plano-box:hover,
body.light .credencial-card:hover,
body.light .mkt-card:hover {
    border-color: rgba(148,163,184,.28) !important;
}

body.light .dashboard-subtitle,
body.light .logs-subtitle,
body.light .mkt-form-help,
body.light .mkt-inline-help,
body.light .mkt-hero-sub,
body.light .mini-label,
body.light .field-label,
body.light .status-subtitle {
    color: #5f6f86 !important;
}

body.dark .dashboard-subtitle,
body.dark .logs-subtitle,
body.dark .mkt-form-help,
body.dark .mkt-inline-help,
body.dark .mkt-hero-sub,
body.dark .mini-label,
body.dark .field-label,
body.dark .status-subtitle {
    color: #93a4bc !important;
}

.save-button,
.btn.big,
.big,
.login-form button {
    letter-spacing: .05em !important;
    text-transform: uppercase;
}

.edit-button,
.toggle-button,
.delete-button,
.mini-button,
.toggle-secret,
.mkt-pass-toggle,
.btn,
.pay-badge,
.log-badge,
.plano-badge,
.status-on,
.status-off,
.mkt-status {
    letter-spacing: .03em;
}

.success-alert,
.alert.ok,
.alert.err,
.mkt-error-alert {
    border-radius: 16px !important;
    padding: 14px 16px !important;
    box-shadow: 0 10px 24px rgba(15,23,42,.08);
}

body.dark .success-alert,
body.dark .alert.ok,
body.dark .mkt-error-alert {
    box-shadow: 0 14px 26px rgba(2,8,23,.18);
}

.dashboard-table th,
.dashboard-table td {
    line-height: 1.35;
}

.dashboard-table tbody td {
    vertical-align: middle;
}

.dashboard-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 14px;
}

.dashboard-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 14px;
}

body.light .dashboard-table tbody tr + tr td {
    border-top: 1px solid rgba(148,163,184,.14);
}

body.dark .dashboard-table tbody tr + tr td {
    border-top: 1px solid rgba(148,163,184,.08);
}

.dash-bar-tooltip,
.pay-badge,
.log-badge,
.plano-badge,
.status-on,
.status-off,
.mkt-status {
    backdrop-filter: blur(8px);
}

body.light .dash-bar-tooltip {
    color: #0f172a !important;
}

.panel-box + .panel-box,
.panel-box + div,
div + .panel-box,
.dashboard-bottom-grid + .panel-box {
    margin-top: 22px;
}

@media (max-width: 820px) {
    .page-title {
        margin-bottom: 8px !important;
    }

    .panel-box + .panel-box,
    .panel-box + div,
    div + .panel-box,
    .dashboard-bottom-grid + .panel-box {
        margin-top: 16px !important;
    }
}

/* Ponto Conect Admin Theme Guard
   Mantem o painel legivel em modo claro/escuro sem afetar o portal do cliente. */
:root {
    --pc-admin-blue: #2872ee;
    --pc-admin-blue-700: #0f3c98;
    --pc-admin-blue-800: #0b347f;
    --pc-admin-teal: #11a79a;
    --pc-admin-green: #22c55e;
    --pc-admin-yellow: #f4bc34;
    --pc-admin-danger: #dc2626;
}

body.light {
    --pc-admin-bg: #f4f8ff;
    --pc-admin-surface: #ffffff;
    --pc-admin-surface-soft: #edf4ff;
    --pc-admin-surface-strong: #dbeafe;
    --pc-admin-text: #0f172a;
    --pc-admin-muted: #475569;
    --pc-admin-border: rgba(15, 23, 42, .14);
    --pc-admin-shadow: 0 16px 34px rgba(15, 23, 42, .08);
}

body.dark {
    --pc-admin-bg: #07111f;
    --pc-admin-surface: #0d1b2f;
    --pc-admin-surface-soft: #102b4d;
    --pc-admin-surface-strong: #123f99;
    --pc-admin-text: #f8fafc;
    --pc-admin-muted: #cbd5e1;
    --pc-admin-border: rgba(255, 255, 255, .12);
    --pc-admin-shadow: 0 18px 40px rgba(0, 0, 0, .24);
}

body.light,
body.light .main-content,
body.light .content,
body.light .page-content {
    background: var(--pc-admin-bg) !important;
    color: var(--pc-admin-text) !important;
}

body.light .panel-box,
body.light .table-panel,
body.light .stat-card,
body.light .form-card,
body.light .form-group,
body.light .readonly-card,
body.light .cred-box,
body.light .card-option,
body.light .vip-card,
body.light .est-card,
body.light .est-list-card,
body.light .est-overview-card,
body.light .est-profile-card,
body.light .est-side-card,
body.light .est-info-line,
body.light .mk-row,
body.light .mk-head,
body.light .est-empty-box,
body.light .pc-access-summary,
body.light .pc-vip-help {
    background: var(--pc-admin-surface) !important;
    color: var(--pc-admin-text) !important;
    border-color: var(--pc-admin-border) !important;
    box-shadow: var(--pc-admin-shadow);
}

body.light .page-title,
body.light .panel-title,
body.light .card-title,
body.light .form-label,
body.light .mini-label,
body.light .stat-value,
body.light .dashboard-table td,
body.light .dashboard-table th,
body.light .est-page-title,
body.light .est-card h2,
body.light .est-card h3,
body.light .est-list-title-row h2,
body.light .est-profile-title-row h2,
body.light .readonly-card strong,
body.light .est-info-line strong,
body.light .mk-row strong {
    color: var(--pc-admin-text) !important;
}

body.light .page-subtitle,
body.light .dashboard-subtitle,
body.light .panel-desc,
body.light .card-desc,
body.light .form-help,
body.light .stat-label,
body.light .stat-mini,
body.light .est-subtitle,
body.light .est-card p,
body.light .est-list-meta p,
body.light .est-info-line .label,
body.light .est-mini-metrics span,
body.light .readonly-card p,
body.light .mk-row,
body.light .mk-row small,
body.light small {
    color: var(--pc-admin-muted) !important;
}

body.light .dashboard-table {
    background: transparent !important;
    color: var(--pc-admin-text) !important;
}

body.light .dashboard-table thead th {
    background: linear-gradient(180deg, #eaf2ff 0%, #dbeafe 100%) !important;
    color: #0f2f68 !important;
    border-color: rgba(40, 114, 238, .18) !important;
}

body.light .dashboard-table tbody tr,
body.light .dashboard-table tbody td {
    border-color: rgba(15, 23, 42, .10) !important;
}

body.light .dashboard-table tbody tr:hover {
    background: rgba(40, 114, 238, .06) !important;
}

body.light input,
body.light select,
body.light textarea,
body.light .cred-input {
    background: #ffffff !important;
    color: var(--pc-admin-text) !important;
    border-color: rgba(40, 114, 238, .24) !important;
}

body.light input::placeholder,
body.light textarea::placeholder {
    color: #64748b !important;
}

body.light .theme-box,
body.light .top-theme-box {
    background: #ffffff !important;
    color: var(--pc-admin-text) !important;
    border-color: rgba(40, 114, 238, .18) !important;
}

body.light .pay-badge,
body.light .status-badge,
body.light .est-status,
body.light [class*="badge"] {
    border: 1px solid rgba(15, 23, 42, .10);
    font-weight: 800;
}

body.light .stat-card [style*="background:rgba(148,163,184,.08)"],
body.light .dashboard-table [style*="background:rgba(148,163,184,.08)"],
body.light [style*="background:rgba(148,163,184,.08)"] {
    background: #edf4ff !important;
    color: var(--pc-admin-text) !important;
    border: 1px solid rgba(40, 114, 238, .14) !important;
}

body.light [style*="color:#e2e8f0"],
body.light [style*="color: #e2e8f0"],
body.light [style*="color:#94a3b8"],
body.light [style*="color: #94a3b8"],
body.light [style*="color:rgba(255,255,255"],
body.light [style*="color: rgba(255,255,255"] {
    color: var(--pc-admin-text) !important;
}

body.light .metric-icon.blue,
body.light .est-btn-primary,
body.light .save-button,
body.light button[type="submit"].save-button {
    background: linear-gradient(180deg, var(--pc-admin-blue) 0%, var(--pc-admin-blue-700) 100%) !important;
    color: #ffffff !important;
}

body.light .metric-icon.teal {
    background: linear-gradient(180deg, #1db8aa 0%, var(--pc-admin-teal) 100%) !important;
    color: #ffffff !important;
}

body.light .metric-icon.green {
    background: linear-gradient(180deg, #69d66a 0%, var(--pc-admin-green) 100%) !important;
    color: #ffffff !important;
}

body.light .metric-icon.orange,
body.light .metric-icon.yellow {
    background: linear-gradient(180deg, #ffd86b 0%, var(--pc-admin-yellow) 100%) !important;
    color: #5a3500 !important;
}

body.light .metric-icon.red {
    background: linear-gradient(180deg, #ef4444 0%, var(--pc-admin-danger) 100%) !important;
    color: #ffffff !important;
}

@media (max-width: 760px) {
    body.light #dashboard-ultimos-pagamentos-panel .dashboard-table tr {
        background: #ffffff !important;
        border-color: rgba(40, 114, 238, .16) !important;
    }

    body.light #dashboard-ultimos-pagamentos-panel .dashboard-table td::before {
        color: #0f3c98 !important;
    }
}

/* Ponto Conect Admin Theme Guard - refinamento modo claro */
body.light .est-status.is-active,
body.light .status-active,
body.light .badge-active,
body.light [class*="status"][class*="active"] {
    background: #dcfce7 !important;
    color: #166534 !important;
    border-color: rgba(22, 101, 52, .22) !important;
    font-weight: 900 !important;
}

body.light .est-list-card .est-mini-metrics div,
body.light .est-mini-metrics div,
body.light .mk-row,
body.light .mk-head {
    background: #eef5ff !important;
    color: #0f172a !important;
    border-color: rgba(40, 114, 238, .18) !important;
}

body.light .est-list-card .est-mini-metrics strong,
body.light .est-mini-metrics strong {
    color: #0f172a !important;
}

body.light .est-list-card .est-mini-metrics span,
body.light .est-mini-metrics span,
body.light .est-info-line .label {
    color: #334155 !important;
}

body.light .est-list-actions-clean .est-btn,
body.light .est-list-actions-clean form .est-btn,
body.light .est-list-actions-clean form button,
body.light .est-btn-soft,
body.light .est-btn-muted,
body.light .est-btn-tech,
body.light .est-open-inline {
    background: #eaf2ff !important;
    color: #0f2f68 !important;
    border-color: rgba(40, 114, 238, .22) !important;
    box-shadow: 0 10px 22px rgba(15, 23, 42, .08) !important;
}

body.light .est-list-actions-clean .est-btn:hover,
body.light .est-btn-soft:hover,
body.light .est-btn-muted:hover,
body.light .est-btn-tech:hover,
body.light .est-open-inline:hover {
    background: #dbeafe !important;
    color: #0b347f !important;
}

body.light .est-list-actions-clean .est-btn-primary,
body.light .est-btn-primary,
body.light a.est-btn-primary {
    background: linear-gradient(180deg, #2872ee 0%, #0f3c98 100%) !important;
    color: #ffffff !important;
    border-color: rgba(40, 114, 238, .34) !important;
}

body.light .est-list-actions-clean .est-btn-danger,
body.light .est-btn-danger,
body.light button.est-btn-danger {
    background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%) !important;
    color: #ffffff !important;
    border-color: rgba(185, 28, 28, .28) !important;
}

body.light .est-list-actions-clean .est-btn-success,
body.light .est-btn-success,
body.light [class*="install"],
body.light [class*="mikrotik"] .est-btn-success {
    background: linear-gradient(180deg, #22c55e 0%, #15803d 100%) !important;
    color: #ffffff !important;
}

/* Ponto Conect Admin Theme Guard - painel de acesso modo claro */
body.light .pc-access-card,
body.light .pc-access-box,
body.light .pc-access-info,
body.light .painel-acesso-card,
body.light .painel-acesso-box,
body.light .access-panel-card,
body.light .access-panel-box {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid rgba(40, 114, 238, .16) !important;
    box-shadow: 0 14px 30px rgba(15, 23, 42, .08) !important;
}

body.light .pc-access-card *,
body.light .pc-access-box *,
body.light .pc-access-info *,
body.light .painel-acesso-card *,
body.light .painel-acesso-box *,
body.light .access-panel-card *,
body.light .access-panel-box * {
    color: inherit;
}

body.light .pc-access-card small,
body.light .pc-access-card .label,
body.light .pc-access-box small,
body.light .pc-access-box .label,
body.light .painel-acesso-card small,
body.light .painel-acesso-card .label,
body.light .painel-acesso-box small,
body.light .painel-acesso-box .label {
    color: #475569 !important;
}

body.light a[href*="page=estabelecimentos"] {
    color: #0f3c98 !important;
    font-weight: 800 !important;
}

/* Mantem item ativo da sidebar legivel no modo claro */
body.light .sidebar-pro a.active,
body.light .sidebar-pro a.active span,
body.light .sidebar-pro a.active .nav-svg {
    color: #ffffff !important;
}

body.light .sidebar-pro a.active .nav-svg svg {
    stroke: currentColor !important;
}

/* Evita regra global de estabelecimentos pintar o menu lateral no modo claro */
body.light .sidebar-pro a[href*="page=estabelecimentos"]:not(.active),
body.light .sidebar-pro a[href*="page=estabelecimentos"]:not(.active) span,
body.light .sidebar-pro a[href*="page=estabelecimentos"]:not(.active) .nav-svg {
    color: #cbd5e1 !important;
}

body.light .sidebar-pro a[href*="page=estabelecimentos"]:not(.active) .nav-svg svg {
    stroke: currentColor !important;
}


/* Corrige texto dos botoes de estabelecimento no modo claro */
body.light a.est-btn.est-btn-primary,
body.light a[href*="page=estabelecimentos"].est-btn.est-btn-primary {
    color: #ffffff !important;
}


/* Theme switch sol/lua no canto superior direito */
.topbar-theme-right {
    justify-content: flex-end !important;
}

.topbar-theme-right .topbar-left {
    margin-left: auto;
}

.theme-mode-box {
    width: auto !important;
    padding: 10px 12px !important;
    border-radius: 16px !important;
}

.theme-mode-row {
    width: auto !important;
    justify-content: flex-end !important;
    gap: 10px !important;
}

.theme-mode-label {
    font-size: 14px;
    line-height: 1;
    white-space: nowrap;
}

.theme-mode-switch {
    width: 68px !important;
    height: 34px !important;
    transform: none !important;
}

.theme-mode-slider {
    overflow: hidden;
    background: #111827 !important;
    border: 1px solid rgba(148, 163, 184, .28) !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, .28);
}

body.light .theme-mode-slider {
    background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%) !important;
    border-color: rgba(34, 197, 94, .38) !important;
}

.theme-mode-slider::before {
    width: 28px !important;
    height: 28px !important;
    left: 3px !important;
    top: 2px !important;
    background: #f8fafc !important;
    box-shadow: 0 3px 10px rgba(15, 23, 42, .24);
    z-index: 2;
}

.theme-mode-slider::after {
    content: "\263E";
    position: absolute;
    left: 10px;
    top: 50%;
    z-index: 3;
    transform: translateY(-50%);
    font-size: 15px;
    line-height: 1;
    color: #0f172a;
    transition: left .25s ease, color .25s ease, content .25s ease;
    pointer-events: none;
}

.switch input:checked + .theme-mode-slider::before {
    transform: translateX(34px) !important;
    background: #0f172a !important;
}

.switch input:checked + .theme-mode-slider::after {
    content: "\2600";
    left: 44px;
    color: #facc15;
}

@media (max-width: 820px) {
    .topbar-theme-right {
        justify-content: flex-end !important;
    }

    .topbar-theme-right .top-theme-box.theme-mode-box,
    .topbar-theme-right .theme-box.theme-mode-box {
        width: auto !important;
        max-width: none !important;
        margin: 0 0 14px auto !important;
    }

    .topbar-theme-right .theme-mode-row {
        width: auto !important;
    }
}

@media (max-width: 560px) {
    .theme-mode-box {
        padding: 9px 10px !important;
    }

    .theme-mode-label {
        font-size: 13px !important;
    }

    .theme-mode-switch {
        width: 64px !important;
        height: 32px !important;
    }

    .theme-mode-slider::before {
        width: 26px !important;
        height: 26px !important;
    }

    .theme-mode-slider::after {
        left: 9px;
    }

    .switch input:checked + .theme-mode-slider::before {
        transform: translateX(32px) !important;
    }

    .switch input:checked + .theme-mode-slider::after {
        left: 41px;
    }
}


/* Ajuste fino: deixa o botao de tema mais compacto */
.theme-mode-box {
    padding: 8px 10px !important;
    border-radius: 14px !important;
}

.theme-mode-row {
    gap: 8px !important;
}

.theme-mode-label {
    font-size: 12px !important;
    font-weight: 800 !important;
}

.theme-mode-switch {
    width: 58px !important;
    height: 30px !important;
}

.theme-mode-slider::before {
    width: 24px !important;
    height: 24px !important;
    left: 3px !important;
    top: 2px !important;
}

.theme-mode-slider::after {
    left: 8px !important;
    font-size: 13px !important;
}

.switch input:checked + .theme-mode-slider::before {
    transform: translateX(28px) !important;
}

.switch input:checked + .theme-mode-slider::after {
    left: 37px !important;
}

@media (max-width: 560px) {
    .theme-mode-label {
        font-size: 12px !important;
    }

    .theme-mode-switch {
        width: 56px !important;
        height: 29px !important;
    }

    .switch input:checked + .theme-mode-slider::before {
        transform: translateX(27px) !important;
    }

    .switch input:checked + .theme-mode-slider::after {
        left: 36px !important;
    }
}
