:root {
    --accent: #2ecc71;
    --accent-strong: #23c566;

    --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: 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: #f8fbff;
}

body.light {
    background: #f4f7fb;
    color: #0f172a;
}

/* 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;
}

.sidebar a {
    display: block;
    text-decoration: none;
    color: #dbe7f3;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    font-weight: 800;
    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 */
.page-title {
    font-size: 32px;
    font-weight: 900;
    margin-bottom: 22px;
}

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

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

.panel-title {
    font-size: 20px;
    font-weight: 900;
    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 */
.save-button,
.edit-button,
.toggle-button,
.delete-button,
.mini-button,
.login-form button {
    border: none;
    border-radius: var(--radius-md);
    font-weight: 900;
    cursor: pointer;
    transition: 0.2s ease;
    box-shadow: var(--shadow-soft);
}

.save-button,
.login-form button {
    width: 100%;
    padding: 16px 18px;
    font-size: 16px;
    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);
}

.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: #0b1220;
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.08);
}

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: #ffffff;
    color: #0f172a;
    border: 1px solid rgba(15,23,42,0.08);
}

.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;
}
