/* Global Styles - Aprimorado */
:root {
    /* Light Theme */
    --light-primary: #007bff; /* Azul vibrante para destaque */
    --light-secondary: #0056b3; /* Tom mais escuro do azul para hover */
    --light-bg: #f4f7f6; /* Fundo mais suave e moderno */
    --light-card: #ffffff; /* Branco puro para cartões e modais */
    --light-text: #333333; /* Texto preto mais suave e legível */
    --light-border: #e0e0e0; /* Borda cinza clara e sutil */
    --light-hover: #f0f0f0; /* Fundo cinza muito claro para hover */
    --light-error: #dc3545; /* Vermelho padrão para erros */
    --light-success: #28a745; /* Verde padrão para sucesso */
    --light-warning: #ffc107; /* Amarelo para aviso/renovação */
    --light-info: #17a2b8; /* Azul claro para informação/WhatsApp */
    
    /* Dark Theme - CORES AJUSTADAS PARA MELHOR LEGIBILIDADE */
    --dark-primary: #64b5f6; /* Azul mais claro para destaque no tema escuro */
    --dark-secondary: #42a5f5; /* Tom mais escuro do azul para hover */
    --dark-bg: #1e1e2e; /* Fundo escuro profundo, ligeiramente mais claro */
    --dark-card: #28283c; /* Cartões e modais em tom escuro, ligeiramente mais claro */
    --dark-text: #e0e0e0; /* Texto claro para contraste - AJUSTADO */
    --dark-border: #555577; /* Borda sutil no tema escuro, mais visível */
    --dark-hover: #3a3a5a; /* Fundo para hover no tema escuro */
    --dark-error: #e74c3c; /* Vermelho para erros */
    --dark-success: #2ecc71; /* Verde para sucesso */
    --dark-warning: #f1c40f; /* Amarelo para aviso */
    --dark-info: #3498db; /* Azul claro para informação */
}

[data-master-admin-link][hidden],
[data-master-admin-link]:not(.admin-link-visible) {
    display: none !important;
}

html.primeflow-auth-guard,
html.primeflow-auth-guard body {
    min-height: 100%;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 0%, rgba(79, 111, 136, 0.16), transparent 360px),
        linear-gradient(180deg, #22272b 0%, #1f2327 100%);
}

html.primeflow-auth-guard body {
    visibility: visible !important;
}

html.primeflow-auth-guard body > * {
    visibility: hidden !important;
}

html.primeflow-auth-guard body::before,
html.primeflow-auth-guard body::after {
    position: fixed;
    left: 50%;
    z-index: 2147483647;
    pointer-events: none;
    visibility: visible !important;
}

html.primeflow-auth-guard body::before {
    content: "Carregando painel\A Preparando sua área de trabalho";
    top: 50%;
    width: min(390px, calc(100vw - 40px));
    min-height: 174px;
    transform: translate(-50%, -50%);
    box-sizing: border-box;
    padding: 88px 28px 44px;
    border: 1px solid rgba(90, 106, 119, 0.42);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(100, 181, 246, 0), rgba(100, 181, 246, 0.95), rgba(100, 181, 246, 0)) left calc(100% - 22px) / 96px 4px no-repeat,
        linear-gradient(90deg, rgba(79, 111, 136, 0.38), rgba(100, 181, 246, 0.54), rgba(79, 111, 136, 0.38)) center calc(100% - 22px) / 228px 4px no-repeat,
        linear-gradient(180deg, #22272b 0%, #191d20 100%);
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.36);
    color: #dfeaf2;
    font-family: Roboto, Arial, sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.65;
    letter-spacing: 0;
    text-align: center;
    white-space: pre-line;
    animation: primeflowLoaderSweep 1.25s ease-in-out infinite;
}

html.primeflow-auth-guard body::after {
    content: "";
    top: calc(50% - 58px);
    width: 46px;
    height: 46px;
    transform: translateX(-50%);
    border: 4px solid rgba(143, 168, 186, 0.24);
    border-top-color: var(--brand-primary, #64b5f6);
    border-right-color: #64b5f6;
    border-radius: 50%;
    box-shadow: 0 0 28px rgba(100, 181, 246, 0.24);
    animation: primeflowLoaderSpin 0.9s linear infinite;
}

@keyframes primeflowLoaderSpin {
    to {
        transform: translateX(-50%) rotate(360deg);
    }
}

@keyframes primeflowLoaderSweep {
    0% {
        background-position: left calc(100% - 22px), center calc(100% - 22px), 0 0;
    }

    50% {
        background-position: center calc(100% - 22px), center calc(100% - 22px), 0 0;
    }

    100% {
        background-position: right calc(100% - 22px), center calc(100% - 22px), 0 0;
    }
}

/* Light theme final polish: keep it soft and override the mobile dark shell */
body.light-theme {
    background: #edf2f5;
    color: #28333f;
}

body.light-theme .login-wrapper {
    background:
        radial-gradient(circle at 50% 8%, rgba(104, 132, 154, 0.12), transparent 280px),
        #edf2f5;
}

body.light-theme .login-container {
    background: #f7f9fa;
    border: 1px solid #d8e0e7;
    box-shadow: 0 18px 44px rgba(43, 57, 71, 0.1);
}

body.light-theme .primeflow-login-brand {
    color: #28333f;
}

body.light-theme .primeflow-login-brand strong {
    color: #28333f;
    text-shadow: none;
}

body.light-theme .dashboard-header,
body.light-theme .clients-header {
    background: #f4f7f9;
    border-bottom: 1px solid #d8e0e7;
    color: #28333f;
    box-shadow: 0 8px 20px rgba(43, 57, 71, 0.06);
}

body.light-theme .header-left h1,
body.light-theme .mobile-dashboard-intro h2,
body.light-theme .clients-toolbar-copy h2,
body.light-theme .client-form-container h2,
body.light-theme .clients-list-container h2,
body.light-theme .modal-header h2,
body.light-theme .settings-section h3 {
    color: #5aa7d6;
}

body.light-theme .header-left p,
body.light-theme .clients-toolbar-copy p,
body.light-theme .card p,
body.light-theme .tutorial-card-body p,
body.light-theme .about-section .text-muted {
    color: #697683;
}

body.light-theme .dashboard-main,
body.light-theme .clients-main {
    background:
        linear-gradient(180deg, rgba(237, 242, 245, 0.96), rgba(230, 236, 241, 0.98)),
        #edf2f5;
}

body.light-theme .card,
body.light-theme .clients-toolbar,
body.light-theme .client-form-container,
body.light-theme .clients-list-container,
body.light-theme .modal-content,
body.light-theme .settings-section,
body.light-theme .tutorial-card,
body.light-theme .tutorial-hero,
body.light-theme .finance-chart-card,
body.light-theme .item-card,
body.light-theme .alert-setting-item {
    background: #f8fafb;
    border: 1px solid #d9e1e8;
    color: #28333f;
    box-shadow: 0 10px 26px rgba(43, 57, 71, 0.08);
}

body.light-theme .settings-section {
    background: #f1f5f7;
}

body.light-theme .card h2,
body.light-theme .tutorial-card-body h3,
body.light-theme .finance-chart-header span,
body.light-theme .item-card strong {
    color: #28333f;
}

body.light-theme .card-icon,
body.light-theme .finance-chart-header strong,
body.light-theme .tutorial-card-body span,
body.light-theme .tutorial-pill {
    color: #4f6f88;
}

body.light-theme .mobile-drawer,
body.light-theme .mobile-account-menu {
    background:
        linear-gradient(180deg, #f4f7f9 0%, #edf2f5 100%);
    color: #28333f;
    box-shadow: 22px 0 54px rgba(18, 29, 41, 0.18);
}

body.light-theme .mobile-drawer-brand,
body.light-theme .mobile-drawer-link,
body.light-theme .mobile-account-menu button,
body.light-theme .mobile-icon-btn {
    color: #28333f;
}

body.light-theme .mobile-drawer-section,
body.light-theme .mobile-drawer-link i {
    color: #788693;
}

body.light-theme .mobile-drawer-link.active,
body.light-theme .mobile-drawer-link.active i,
body.light-theme .mobile-drawer-link:active {
    color: #36556f;
}

body.light-theme .mobile-drawer-link.active {
    background: rgba(79, 111, 136, 0.1);
}

body.light-theme .clients-search-field input,
body.light-theme .clients-filter-bar select,
body.light-theme .form-group input,
body.light-theme .form-group select,
body.light-theme .form-group textarea,
body.light-theme .whatsapp-section textarea,
body.light-theme .theme-section .theme-btn {
    background: #f8fafb;
    border-color: #d4dde5;
    color: #28333f;
}

body.light-theme .clients-search-field input:focus,
body.light-theme .clients-filter-bar select:focus,
body.light-theme .form-group input:focus,
body.light-theme .form-group select:focus,
body.light-theme .form-group textarea:focus {
    border-color: #6f879b;
    box-shadow: 0 0 0 3px rgba(111, 135, 155, 0.14);
}

body.light-theme .clients-search-field i,
body.light-theme .form-group label,
body.light-theme .alert-setting-label,
body.light-theme .alert-setting-label i,
body.light-theme .whatsapp-section .hint-text {
    color: #66737f;
}

body.light-theme .btn-primary {
    background: #4f6f88;
    color: #fff;
    box-shadow: 0 8px 20px rgba(79, 111, 136, 0.2);
}

body.light-theme .btn-primary:hover {
    background: #405f78;
    box-shadow: 0 10px 22px rgba(79, 111, 136, 0.24);
}

body.light-theme .btn-secondary {
    background: #f8fafb;
    border-color: #d4dde5;
    color: #28333f;
}

body.light-theme .btn-secondary:hover {
    background: #eef3f6;
    border-color: #8da0af;
    color: #36556f;
}

body.light-theme #clientsTable tr.client-table-row {
    background: #f8fafb;
    border-color: #d9e1e8;
    color: #28333f;
    box-shadow: 0 10px 24px rgba(43, 57, 71, 0.09);
}

body.light-theme #clientsTable tr.client-table-row:hover {
    background: #f2f6f8;
}

body.light-theme #clientsTable .client-due-date-cell,
body.light-theme #clientsTable .client-actions-cell {
    border-top-color: #dce4ea;
}

body.light-theme #clientsTable tr.client-empty-row {
    background: #f8fafb;
    border-color: #d4dde5;
}

body.light-theme td .action-btn.renew {
    background-color: var(--light-warning);
    border-color: var(--light-warning);
    color: #fff;
}

body.light-theme td .action-btn.edit {
    background-color: var(--light-primary);
    border-color: var(--light-primary);
    color: #fff;
}

body.light-theme td .action-btn.whatsapp {
    background-color: var(--light-success);
    border-color: var(--light-success);
    color: #fff;
}

body.light-theme td .action-btn.renew-server {
    background-color: #6f42c1;
    border-color: #6f42c1;
    color: #fff;
}

body.light-theme td .action-btn.delete {
    background-color: var(--light-error);
    border-color: var(--light-error);
    color: #fff;
}

@media (max-width: 760px) {
    body.light-theme {
        background: #edf2f5;
        color: #28333f;
    }

    body.light-theme .dashboard-header,
    body.light-theme .clients-header {
        background: rgba(244, 247, 249, 0.96);
    }

    body.light-theme .dashboard-main,
    body.light-theme .clients-main {
        background: #edf2f5;
    }

    body.light-theme .card,
    body.light-theme .clients-toolbar,
    body.light-theme .client-form-container,
    body.light-theme .clients-list-container,
    body.light-theme .modal-content,
    body.light-theme .finance-chart-card,
    body.light-theme .tutorial-card,
    body.light-theme .tutorial-hero {
        background: #f8fafb;
        border: 1px solid #d9e1e8;
        color: #28333f;
        box-shadow: 0 10px 26px rgba(43, 57, 71, 0.08);
    }

    body.light-theme .card h2,
    body.light-theme .card p {
        text-align: right;
    }

    body.light-theme .card-icon {
        color: #5aa7d6;
    }

    body.light-theme .login-container {
        background: #f8fafb;
    }

    body.light-theme .primeflow-login-brand strong {
        color: #28333f;
        font-size: clamp(2.15rem, 10vw, 3.25rem);
    }

    body.light-theme .primeflow-logo-mark {
        width: 96px;
        height: 76px;
        border-radius: 24px;
    }
}

/* White Label */
:root {
    --brand-primary: #4f6f88;
    --brand-secondary: #405f78;
}

body.light-theme .header-left h1,
body.light-theme .mobile-dashboard-intro h2,
body.light-theme .clients-toolbar-copy h2,
body.light-theme .client-form-container h2,
body.light-theme .clients-list-container h2,
body.light-theme .modal-header h2,
body.light-theme .settings-section h3,
body.light-theme .finance-chart-header strong,
body.light-theme .card-icon,
body.dark-theme .header-left h1,
body.dark-theme .clients-toolbar-copy h2,
body.dark-theme .client-form-container h2,
body.dark-theme .clients-list-container h2,
body.dark-theme .modal-header h2,
body.dark-theme .settings-section h3,
body.subscription-page .subscription-payment .price {
    color: var(--brand-primary) !important;
}

body.light-theme .btn-primary,
body.dark-theme .btn-primary,
.login-form .btn-primary,
.subscription-actions .btn-primary {
    background: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    color: #fff !important;
}

body.light-theme .btn-primary:hover,
body.dark-theme .btn-primary:hover,
.login-form .btn-primary:hover,
.subscription-actions .btn-primary:hover {
    background: var(--brand-secondary) !important;
    border-color: var(--brand-secondary) !important;
}

body.light-theme .mobile-drawer-link.active,
body.dark-theme .mobile-drawer-link.active {
    background: color-mix(in srgb, var(--brand-primary) 16%, transparent) !important;
}

body.light-theme .mobile-drawer-link.active,
body.light-theme .mobile-drawer-link.active i,
body.dark-theme .mobile-drawer-link.active,
body.dark-theme .mobile-drawer-link.active i {
    color: var(--brand-primary) !important;
}

body.subscription-page .subscription-copy {
    background: var(--brand-secondary) !important;
}

.brand-settings-section {
    position: relative;
}

.brand-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.brand-settings-grid .form-group {
    margin-bottom: 0;
}

.brand-settings-grid input[type="color"] {
    width: 100%;
    min-height: 46px;
    padding: 4px;
    cursor: pointer;
}

.brand-preview {
    --preview-primary: var(--brand-primary);
    --preview-secondary: var(--brand-secondary);
    grid-column: span 2;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid color-mix(in srgb, var(--preview-primary) 40%, transparent);
    border-radius: 8px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--preview-primary) 13%, transparent), color-mix(in srgb, var(--preview-secondary) 10%, transparent));
}

.brand-preview-logo {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--preview-primary), var(--preview-secondary));
    color: #fff;
}

.brand-preview-logo img,
.brand-logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.brand-preview strong {
    display: block;
    color: inherit;
    font-size: 1.05rem;
}

.brand-preview span {
    display: block;
    margin-top: 3px;
    color: inherit;
    opacity: .72;
    font-size: .9rem;
}

.brand-logo-container {
    overflow: hidden;
    background: transparent !important;
    border-radius: 8px !important;
}

.primeflow-logo-mark.brand-logo-container,
.primeflow-small-mark.brand-logo-container,
.subscription-brand-mark.brand-logo-container {
    display: grid;
    place-items: center;
}

.primeflow-login-brand .brand-logo-image {
    max-width: 120px;
    max-height: 86px;
}

.primeflow-small-mark.brand-logo-container {
    width: 36px;
    height: 36px;
}

.subscription-brand-mark.brand-logo-container {
    width: 42px;
    height: 42px;
}

@media (max-width: 760px) {
    .brand-settings-grid {
        grid-template-columns: 1fr;
    }

    .brand-preview {
        grid-column: span 1;
    }

    .brand-settings-section .hint-text {
        font-size: .88rem;
    }
}

/* Light theme accent final override */
body.light-theme .header-left h1,
body.light-theme .mobile-dashboard-intro h2,
body.light-theme .clients-toolbar-copy h2,
body.light-theme .client-form-container h2,
body.light-theme .clients-list-container h2,
body.light-theme .modal-header h2,
body.light-theme .settings-section h3,
body.light-theme .finance-chart-header strong,
body.light-theme .card-icon {
    color: #5aa7d6;
}

body.light-theme .mobile-drawer {
    background: linear-gradient(180deg, #101623 0%, #070b12 100%);
    color: #eef7ff;
    box-shadow: 24px 0 60px rgba(0, 0, 0, 0.32);
}

body.light-theme .mobile-drawer-brand,
body.light-theme .mobile-drawer-link {
    color: #eef7ff;
}

body.light-theme .mobile-drawer-section {
    color: #8da0b3;
}

body.light-theme .mobile-drawer-link i {
    color: #8fc7ea;
}

body.light-theme .mobile-drawer-link.active,
body.light-theme .mobile-drawer-link.active i,
body.light-theme .mobile-drawer-link:active {
    color: #63b7ea;
}

body.light-theme .mobile-drawer-link.active {
    background: rgba(99, 183, 234, 0.12);
}

/* Light theme accent refinement */
body.light-theme .header-left h1,
body.light-theme .mobile-dashboard-intro h2,
body.light-theme .clients-toolbar-copy h2,
body.light-theme .client-form-container h2,
body.light-theme .clients-list-container h2,
body.light-theme .modal-header h2,
body.light-theme .settings-section h3,
body.light-theme .finance-chart-header strong,
body.light-theme .card-icon {
    color: #5aa7d6;
}

body.light-theme .mobile-drawer {
    background: linear-gradient(180deg, #101623 0%, #070b12 100%);
    color: #eef7ff;
    box-shadow: 24px 0 60px rgba(0, 0, 0, 0.32);
}

body.light-theme .mobile-drawer-brand,
body.light-theme .mobile-drawer-link {
    color: #eef7ff;
}

body.light-theme .mobile-drawer-section {
    color: #8da0b3;
}

body.light-theme .mobile-drawer-link i {
    color: #8fc7ea;
}

body.light-theme .mobile-drawer-link.active,
body.light-theme .mobile-drawer-link.active i,
body.light-theme .mobile-drawer-link:active {
    color: #63b7ea;
}

body.light-theme .mobile-drawer-link.active {
    background: rgba(99, 183, 234, 0.12);
}

/* Light Theme Refresh */
body.light-theme {
    background:
        radial-gradient(circle at 12% 0%, rgba(93, 121, 148, 0.08), transparent 320px),
        linear-gradient(180deg, #f7f8fa 0%, #eef1f4 100%);
    color: #2f3a46;
}

body.light-theme .dashboard-header,
body.light-theme .clients-header {
    background: rgba(250, 252, 254, 0.95);
    border-bottom: 1px solid #e1e6ec;
    box-shadow: 0 8px 22px rgba(45, 57, 72, 0.06);
}

body.light-theme .header-left h1,
body.light-theme .clients-toolbar-copy h2,
body.light-theme .client-form-container h2,
body.light-theme .clients-list-container h2,
body.light-theme .modal-header h2,
body.light-theme .settings-section h3 {
    color: #3d5f7c;
}

body.light-theme .header-left p,
body.light-theme .clients-toolbar-copy p,
body.light-theme .card p,
body.light-theme .about-section .text-muted,
body.light-theme .tutorial-card-body p {
    color: #687482;
}

body.light-theme .clients-toolbar,
body.light-theme .client-form-container,
body.light-theme .clients-list-container,
body.light-theme .modal-content,
body.light-theme .settings-section,
body.light-theme .card,
body.light-theme .tutorial-card,
body.light-theme .finance-chart-card,
body.light-theme .item-card,
body.light-theme .alert-setting-item {
    background: #fbfcfd;
    border: 1px solid #e1e6ec;
    color: #2f3a46;
    box-shadow: 0 10px 26px rgba(45, 57, 72, 0.07);
}

body.light-theme .settings-section {
    background: #f4f6f8;
}

body.light-theme .card h2,
body.light-theme .tutorial-card-body h3,
body.light-theme .item-card strong,
body.light-theme .finance-chart-header span {
    color: #2f3a46;
}

body.light-theme .card-icon,
body.light-theme .finance-chart-header strong,
body.light-theme .tutorial-pill,
body.light-theme .tutorial-card-body span {
    color: #52708d;
}

body.light-theme .clients-search-field input,
body.light-theme .clients-filter-bar select,
body.light-theme .form-group input,
body.light-theme .form-group select,
body.light-theme .form-group textarea,
body.light-theme .whatsapp-section textarea,
body.light-theme .theme-section .theme-btn {
    background: #fbfcfd;
    border-color: #d9e0e7;
    color: #2f3a46;
    box-shadow: none;
}

body.light-theme .clients-search-field input:focus,
body.light-theme .clients-filter-bar select:focus,
body.light-theme .form-group input:focus,
body.light-theme .form-group select:focus,
body.light-theme .form-group textarea:focus {
    border-color: #6d89a4;
    box-shadow: 0 0 0 3px rgba(109, 137, 164, 0.13);
}

body.light-theme .clients-search-field i,
body.light-theme .form-group label,
body.light-theme .alert-setting-label,
body.light-theme .alert-setting-label i,
body.light-theme .whatsapp-section .hint-text {
    color: #667381;
}

body.light-theme .btn-secondary,
body.light-theme td .action-btn {
    background: #fbfcfd;
    border-color: #d9e0e7;
    color: #2f3a46;
}

body.light-theme .btn-primary {
    background: #52708d;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(82, 112, 141, 0.18);
}

body.light-theme .btn-primary:hover {
    background: #45637e;
    box-shadow: 0 10px 24px rgba(82, 112, 141, 0.22);
}

body.light-theme .btn-secondary:hover {
    background: #f0f4f7;
    border-color: #8aa0b4;
    color: #3d5f7c;
}

body.light-theme .theme-btn.active {
    background: #52708d;
    border-color: #52708d;
    color: #ffffff;
}

body.light-theme .table-responsive {
    border-color: #e1e6ec;
}

body.light-theme th {
    background: #5f7890;
    color: #ffffff;
}

body.light-theme td {
    border-bottom-color: #e8edf2;
}

body.light-theme tr:hover {
    background: #f3f6f8;
}

body.light-theme .modal {
    background: rgba(47, 58, 70, 0.28);
}

body.light-theme .modal-header {
    border-bottom-color: #e1e6ec;
}

body.light-theme .close-modal {
    color: #667381;
}

body.light-theme .mobile-drawer,
body.light-theme .mobile-account-menu {
    background: #fbfcfd;
    color: #2f3a46;
    box-shadow: 22px 0 52px rgba(45, 57, 72, 0.14);
}

body.light-theme .mobile-drawer-brand,
body.light-theme .mobile-drawer-link,
body.light-theme .mobile-account-menu button,
body.light-theme .mobile-icon-btn {
    color: #2f3a46;
}

body.light-theme .mobile-drawer-section,
body.light-theme .mobile-drawer-link i {
    color: #7a8794;
}

body.light-theme .mobile-drawer-link.active,
body.light-theme .mobile-drawer-link.active i,
body.light-theme .mobile-drawer-link:active {
    color: #52708d;
}

@media (max-width: 760px) {
    body.light-theme {
        background:
            radial-gradient(circle at 50% 0%, rgba(93, 121, 148, 0.08), transparent 240px),
            #f1f4f7;
        color: #2f3a46;
    }

    body.light-theme:has(.login-wrapper) {
        background: #f1f4f7;
    }

    body.light-theme .dashboard-header,
    body.light-theme .clients-header {
        background: rgba(250, 252, 254, 0.96);
        border-bottom: 1px solid #e1e6ec;
        box-shadow: 0 6px 18px rgba(45, 57, 72, 0.06);
    }

    body.light-theme .header-left h1,
    body.light-theme .mobile-dashboard-intro h2,
    body.light-theme .clients-toolbar-copy h2,
    body.light-theme .client-form-container h2,
    body.light-theme .clients-list-container h2,
    body.light-theme .modal-header h2,
    body.light-theme .settings-section h3 {
        color: #3d5f7c;
    }

    body.light-theme .mobile-icon-btn {
        color: #2f3a46;
        background: transparent;
    }

    body.light-theme .mobile-drawer,
    body.light-theme .mobile-account-menu {
        background: #fbfcfd;
        color: #2f3a46;
    }

    body.light-theme .mobile-drawer-brand,
    body.light-theme .mobile-drawer-link,
    body.light-theme .mobile-account-menu button {
        color: #2f3a46;
    }

    body.light-theme .mobile-drawer-section,
    body.light-theme .mobile-drawer-link i {
        color: #7a8794;
    }

    body.light-theme .mobile-drawer-link.active,
    body.light-theme .mobile-drawer-link.active i {
        color: #52708d;
    }

    body.light-theme .card,
    body.light-theme .clients-toolbar,
    body.light-theme .client-form-container,
    body.light-theme .clients-list-container,
    body.light-theme .modal-content,
    body.light-theme .tutorial-card,
    body.light-theme .finance-chart-card {
        background: #fbfcfd;
        border: 1px solid #e1e6ec;
        color: #2f3a46;
        box-shadow: 0 10px 26px rgba(45, 57, 72, 0.07);
    }

    body.light-theme .card h2,
    body.light-theme .tutorial-card-body h3,
    body.light-theme .finance-chart-header span {
        color: #2f3a46;
    }

    body.light-theme .card p,
    body.light-theme .clients-toolbar-copy p,
    body.light-theme .tutorial-card-body p {
        color: #687482;
    }

    body.light-theme .card-icon,
    body.light-theme .finance-chart-header strong {
        color: #52708d;
    }

    body.light-theme .clients-search-field input,
    body.light-theme .clients-filter-bar select,
    body.light-theme .form-group input,
    body.light-theme .form-group select,
    body.light-theme .form-group textarea {
        background: #fbfcfd;
        border-color: #d9e0e7;
        color: #2f3a46;
    }

    body.light-theme .clients-search-field i,
    body.light-theme .form-group label {
        color: #667381;
    }

    body.light-theme .btn-secondary {
        background: #fbfcfd;
        border-color: #d9e0e7;
        color: #2f3a46;
    }

    body.light-theme #clientsTable tr.client-table-row {
        background: #fbfcfd;
        border-color: #dce3ea;
        color: #2f3a46;
        box-shadow: 0 10px 24px rgba(45, 57, 72, 0.09);
    }

    body.light-theme #clientsTable tr.client-table-row:hover {
        background: #f4f7fa;
    }

    body.light-theme #clientsTable tr.client-empty-row {
        background: #fbfcfd;
        border-color: #d9e0e7;
    }

    body.light-theme #clientsTable tr.client-empty-row td {
        color: #687482;
    }

    body.light-theme #clientsTable .client-due-date-cell,
    body.light-theme #clientsTable .client-actions-cell {
        border-top-color: #e1e6ec;
    }

    body.light-theme .login-wrapper {
        background: #f1f4f7;
    }

    body.light-theme .login-container {
        background: #fbfcfd;
        border: 1px solid #e1e6ec;
        border-radius: 12px;
        padding: 28px;
        box-shadow: 0 14px 34px rgba(45, 57, 72, 0.09);
    }

    body.light-theme .login-header p,
    body.light-theme .login-form label {
        color: #667381;
    }

    body.light-theme .login-form input {
        background: #fbfcfd;
        border: 1px solid #d9e0e7;
        color: #2f3a46;
    }

    body.light-theme .tutorial-hero {
        background:
            radial-gradient(circle at 88% 10%, rgba(93, 121, 148, 0.1), transparent 30%),
            #fbfcfd;
        border: 1px solid #e1e6ec;
        color: #2f3a46;
        box-shadow: 0 10px 26px rgba(45, 57, 72, 0.07);
    }

    body.light-theme .tutorial-hero h2 {
        color: #3d5f7c;
    }

    body.light-theme .tutorial-hero p:last-child {
        color: #687482;
    }
}

html, body {
    height: 100%;
    font-size: 16px; /* Base font size for better mobile readability */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
    -webkit-font-smoothing: antialiased; /* Melhorar renderização de fontes */
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--light-bg);
    color: var(--light-text);
    transition: background-color 0.4s ease, color 0.4s ease; /* Transição mais suave */
    position: relative;
    line-height: 1.6; /* Melhorar legibilidade do texto */
}

body.dark-theme {
    background-color: var(--dark-bg);
    color: var(--dark-text); /* GARANTIDO */
}

a {
    text-decoration: none;
    color: inherit;
}

/* Canvas para a animação de partículas */
#particles-canvas {
    position: fixed; /* Usar fixed para garantir que cubra toda a tela */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none; /* Não interferir com cliques */
}

/* Buttons - Aprimorado */
.btn {
    padding: 12px 24px; /* Aumentar padding para facilitar o toque */
    border: none;
    border-radius: 8px; /* Bordas mais arredondadas */
    cursor: pointer;
    font-size: 1rem; /* Tamanho de fonte responsivo */
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex; /* Para alinhar ícones e texto */
    align-items: center;
    justify-content: center;
    gap: 8px; /* Espaçamento entre ícone e texto */
}

.btn-primary {
    background-color: var(--light-primary);
    color: white;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.2); /* Sombra mais proeminente */
}

.btn-primary:hover {
    background-color: var(--light-secondary);
    box-shadow: 0 6px 15px rgba(0, 123, 255, 0.3);
    transform: translateY(-2px); /* Efeito sutil ao hover */
}

.btn-secondary {
    background-color: var(--light-card);
    color: var(--light-text);
    border: 1px solid var(--light-border);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
    background-color: var(--light-hover);
    border-color: var(--light-primary);
    color: var(--light-primary);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.btn-icon {
    background: none;
    border: none;
    color: var(--light-text);
    font-size: 1.2rem; /* Tamanho de ícone responsivo */
    cursor: pointer;
    padding: 10px; /* Aumentar padding para facilitar o toque */
    border-radius: 50%;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background-color: rgba(0, 0, 0, 0.08); /* Sombra mais suave */
    color: var(--light-primary);
}

.dark-theme .btn-icon:hover {
    background-color: rgba(255, 255, 0, 0.08);
}

/* Forms - Aprimorado */
.form-group {
    margin-bottom: 20px; /* Aumentar espaçamento entre grupos de formulário */
}

.form-group label {
    display: block;
    margin-bottom: 8px; /* Aumentar espaçamento para o label */
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--light-text);
}
.dark-theme .form-group label {
    color: var(--dark-text); /* Garante que no tema escuro fique claro e visível */
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px; /* Aumentar padding para campos de input */
    border: 1px solid var(--light-border);
    border-radius: 8px; /* Bordas mais arredondadas */
    font-size: 1rem;
    background-color: var(--light-card);
    color: var(--light-text);
    transition: all 0.3s ease;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05); /* Sombra interna sutil */
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--light-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2); /* Foco mais visível */
}

.dark-theme .form-group input,
.dark-theme .form-group select,
.dark-theme .form-group textarea {
    border-color: var(--dark-border);
    background-color: var(--dark-card);
    color: var(--dark-text); /* AJUSTADO */
}

.dark-theme .form-group input:focus,
.dark-theme .form-group select:focus,
.dark-theme .form-group textarea:focus {
    border-color: var(--dark-primary);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

.form-row {
    display: flex;
    flex-direction: column; /* Mobile-first: empilhar colunas */
    gap: 20px; /* Espaçamento entre os grupos de formulário */
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0; /* Remover margin-bottom aqui, já que o gap do form-row cuida disso */
}

.date-input {
    display: flex;
    flex-direction: column; /* Empilhar input e botão no mobile */
    gap: 10px;
}

.date-input input {
    flex: 1;
}

/* New style for input with buttons */
.input-with-buttons {
    display: flex;
    flex-direction: column; /* Empilhar no mobile */
    gap: 10px;
}

.input-with-buttons select {
    flex-grow: 1;
    margin-right: 0;
}

.input-with-buttons .btn-icon {
    flex-shrink: 0;
    padding: 8px; /* Ajustar padding */
    font-size: 1rem;
    border-radius: 6px; /* Ajustar borda */
    width: 100%; /* Ocupar largura total no mobile */
}

/* Login Page - Aprimorado */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px; /* Adicionar padding para telas pequenas */
    position: relative;
    z-index: 1;
}

.login-container {
    width: 100%; /* Ocupar largura total no mobile */
    max-width: 400px;
    padding: 30px;
    background-color: var(--light-card);
    border-radius: 12px; /* Bordas mais arredondadas */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15); /* Sombra mais suave e profunda */
    transition: all 0.3s ease;
}

.dark-theme .login-container {
    background-color: var(--dark-card);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 40px; /* Aumentar espaçamento */
}

.login-header h1 {
    font-size: 2rem; /* Tamanho de fonte responsivo */
    margin-bottom: 10px;
    color: var(--light-primary); /* Cor primária para o título */
}

.dark-theme .login-header h1 {
    color: var(--dark-primary);
}

.login-header p {
    color: var(--light-text);
    font-size: 0.95rem;
}

.dark-theme .login-header p {
    color: var(--dark-text); /* AJUSTADO */
}

.login-form {
    margin-bottom: 20px;
}

.password-input {
    position: relative;
}

.password-input input {
    padding-right: 40px; /* Espaço para o ícone */
}

.password-input .fa-eye,
.password-input .fa-eye-slash {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--light-text); /* Alterado para usar a variável de tema */
    font-size: 1rem;
}

.dark-theme .password-input .fa-eye,
.dark-theme .password-input .fa-eye-slash {
    color: var(--dark-text); /* AJUSTADO */
}

.login-form .btn-primary {
    width: 100%; /* Botão de login ocupa largura total */
    margin-top: 20px;
}

.login-options {
    text-align: center;
    margin-top: 20px;
}

.login-options a {
    color: var(--light-primary);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.login-options a:hover {
    color: var(--light-secondary);
    text-decoration: underline;
}

.error-message {
    color: var(--light-error);
    text-align: center;
    margin-top: 15px;
    font-size: 0.9rem;
    padding: 10px;
    background-color: rgba(220, 53, 69, 0.1);
    border-radius: 8px;
    border: 1px solid var(--light-error);
}

.dark-theme .error-message {
    color: var(--dark-error);
    background-color: rgba(231, 76, 60, 0.1);
    border-color: var(--dark-error);
}

.error-message.success-message {
    color: #0d6b46;
    background-color: rgba(0, 214, 143, 0.12);
    border-color: rgba(0, 214, 143, 0.55);
}

.dark-theme .error-message.success-message {
    color: #85efc1;
    background-color: rgba(0, 214, 143, 0.14);
    border-color: rgba(0, 214, 143, 0.45);
}

.reset-message {
    width: 100%;
    margin-top: 14px;
}

/* Dashboard Page - Aprimorado */
.dashboard-header,
.clients-header {
    display: flex;
    flex-direction: column; /* Mobile-first: empilhar elementos */
    align-items: flex-start;
    padding: 20px;
    background-color: var(--light-card);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); /* Sombra mais suave */
    transition: all 0.3s ease;
    gap: 15px; /* Espaçamento entre os blocos do header */
}

.dark-theme .dashboard-header,
.dark-theme .clients-header {
    background-color: var(--dark-card);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.header-actions {
    display: flex;
    flex-direction: column; /* Empilhar botões no mobile */
    width: 100%; /* Ocupar largura total */
    gap: 10px;
}

.header-actions {
    flex-wrap: wrap;
}

.header-actions .btn {
    width: 100%; /* Botões ocupam largura total */
}

.header-left h1 {
    font-size: 1.8rem; /* Tamanho de fonte responsivo */
    margin-bottom: 5px;
    color: var(--light-primary);
}

.dark-theme .header-left h1 {
    color: var(--dark-primary);
}

.header-left p {
    color: var(--light-text);
    font-size: 0.9rem;
}

.dark-theme .header-left p {
    color: var(--dark-text); /* AJUSTADO */
}

.dashboard-main,
.clients-main {
    padding: 20px;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: 1fr; /* Mobile-first: uma coluna */
    gap: 20px;
    margin-top: 20px;
}

.dashboard-cards[hidden] {
    display: none !important;
}

.card {
    background-color: var(--light-card);
    border-radius: 12px; /* Bordas mais arredondadas */
    padding: 25px; /* Aumentar padding */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1); /* Sombra mais suave */
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center; /* Centralizar conteúdo */
}

.dark-theme .card {
    background-color: var(--dark-card);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.card-icon {
    font-size: 2.5rem; /* Ícones maiores */
    color: var(--light-primary);
    margin-bottom: 15px;
}

.dark-theme .card-icon {
    color: var(--dark-primary);
}

.card h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--light-text);
}

.dark-theme .card h2 {
    color: var(--dark-text); /* AJUSTADO */
}

.card p {
    color: var(--light-text); /* Alterado para usar a variável de tema */
    font-size: 0.9rem;
}

.dark-theme .card p {
    color: var(--dark-text); /* AJUSTADO */
}

/* Clients Page - Aprimorado */
.clients-toolbar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
    justify-content: space-between;
    background-color: var(--light-card);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 20px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

.dark-theme .clients-toolbar {
    background-color: var(--dark-card);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

.clients-toolbar-copy h2 {
    margin: 0 0 6px;
    color: var(--light-primary);
    font-size: 1.35rem;
}

.dark-theme .clients-toolbar-copy h2 {
    color: var(--dark-primary);
}

.clients-toolbar-copy p {
    margin: 0;
    color: var(--light-text);
    font-size: 0.92rem;
}

.dark-theme .clients-toolbar-copy p {
    color: var(--dark-text);
}

.clients-toolbar .btn {
    width: 100%;
}

.clients-filter-bar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
}

.clients-search-field {
    position: relative;
    display: flex;
    align-items: center;
}

.clients-search-field i {
    position: absolute;
    left: 13px;
    color: var(--light-text);
    opacity: 0.65;
    pointer-events: none;
}

.dark-theme .clients-search-field i {
    color: var(--dark-text);
}

.clients-search-field input,
.clients-filter-bar select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--light-border);
    border-radius: 8px;
    background: var(--light-bg);
    color: var(--light-text);
    font: inherit;
    font-size: 0.95rem;
}

.clients-search-field input {
    padding: 10px 12px 10px 38px;
}

.clients-filter-bar select {
    padding: 10px 12px;
}

.clients-search-field input:focus,
.clients-filter-bar select:focus {
    outline: none;
    border-color: var(--light-primary);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.12);
}

.dark-theme .clients-search-field input,
.dark-theme .clients-filter-bar select {
    border-color: var(--dark-border);
    background: var(--dark-bg);
    color: var(--dark-text);
}

.dark-theme .clients-search-field input:focus,
.dark-theme .clients-filter-bar select:focus {
    border-color: var(--dark-primary);
}

.add-client-modal-content {
    max-width: 780px;
}

.client-form-container,
.clients-list-container {
    background-color: var(--light-card);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.dark-theme .client-form-container,
.dark-theme .clients-list-container {
    background-color: var(--dark-card);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

.client-form-container h2,
.clients-list-container h2 {
    margin-bottom: 25px;
    font-size: 1.6rem;
    color: var(--light-primary);
    text-align: center;
}

.dark-theme .client-form-container h2,
.dark-theme .clients-list-container h2 {
    color: var(--dark-primary);
}

/* Table Styles - Aprimorado */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* Rolagem suave em iOS */
    border-radius: 8px; /* Bordas arredondadas para a tabela */
    border: 1px solid var(--light-border);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px; /* Garantir que a tabela não fique muito estreita no mobile */
}

th, td {
    padding: 15px 12px; /* Aumentar padding */
    text-align: left;
    border-bottom: 1px solid var(--light-border); /* Manter borda para separação */
    font-size: 0.95rem;
}

/* Removido: .dark-theme th, .dark-theme td { border-bottom-color: var(--dark-border); color: var(--dark-text); } */
/* A cor do texto será definida dinamicamente pelo JS ou herdada do body */

th {
    background-color: var(--light-primary);
    color: white;
    font-weight: 500;
    position: sticky; /* Fixar cabeçalho ao rolar */
    top: 0;
    z-index: 10;
}

.dark-theme th {
    background-color: var(--dark-primary);
}

tr:hover {
    background-color: var(--light-hover);
}

.dark-theme tr:hover {
    background-color: var(--dark-hover);
}

/* Ações da Tabela de Clientes - Aprimorado */
td .action-btn {
    padding: 10px; /* Aumentar padding para facilitar o toque */
    font-size: 1.1rem; /* Ícones maiores */
    border-radius: 6px; /* Bordas mais arredondadas */
    margin: 0 4px;
    min-width: 45px; /* Aumentar tamanho mínimo */
    min-height: 45px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    background-color: var(--light-card);
    color: var(--light-text);
    border: 1px solid var(--light-border);
}

.client-name-cell strong {
    display: block;
    font-weight: 700;
}

.client-mobile-summary {
    display: none;
}

.client-actions-cell {
    white-space: nowrap;
}

.dark-theme td .action-btn {
    background-color: var(--dark-card);
    color: var(--dark-text);
    border-color: var(--dark-border);
}

td .action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Cores específicas para cada tipo de botão de ação */
td .action-btn.renew {
    background-color: var(--light-warning);
    color: white;
    border-color: var(--light-warning);
}
.dark-theme td .action-btn.renew {
    background-color: var(--dark-warning);
    border-color: var(--dark-warning);
}
td .action-btn.renew:hover {
    background-color: #e0a800;
    box-shadow: 0 4px 10px rgba(255, 193, 7, 0.3);
}
.dark-theme td .action-btn.renew:hover {
    background-color: #d6890f;
}

td .action-btn.edit {
    background-color: var(--light-primary);
    color: white;
    border-color: var(--light-primary);
}
.dark-theme td .action-btn.edit {
    background-color: var(--dark-primary);
    border-color: var(--dark-primary);
}
td .action-btn.edit:hover {
    background-color: var(--light-secondary);
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
}
.dark-theme td .action-btn.edit:hover {
    background-color: var(--dark-secondary);
}

td .action-btn.whatsapp {
    background-color: var(--light-success);
    color: white;
    border-color: var(--light-success);
}
.dark-theme td .action-btn.whatsapp {
    background-color: var(--dark-success);
    border-color: var(--dark-success);
}
td .action-btn.whatsapp:hover {
    background-color: #218838;
    box-shadow: 0 4.5px 10px rgba(40, 167, 69, 0.3);
}
.dark-theme td .action-btn.whatsapp:hover {
    background-color: #209955;
}

td .action-btn.renew-server {
    background-color: #6f42c1;
    color: white;
    border-color: #6f42c1;
}
.dark-theme td .action-btn.renew-server {
    background-color: #8a63d2;
    border-color: #8a63d2;
}
td .action-btn.renew-server:hover {
    background-color: #5a32a3;
    box-shadow: 0 4px 10px rgba(111, 66, 193, 0.3);
}

td .action-btn.delete {
    background-color: var(--light-error);
    color: white;
    border-color: var(--light-error);
}
.dark-theme td .action-btn.delete {
    background-color: var(--dark-error);
    border-color: var(--dark-error);
}
td .action-btn.delete:hover {
    background-color: #c82333;
    box-shadow: 0 4px 10px rgba(220, 53, 69, 0.3);
}
.dark-theme td .action-btn.delete:hover {
    background-color: #a93226;
}

/* Modal Styles - Aprimorado */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Fundo mais escuro */
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px; /* Padding para evitar que o modal toque as bordas */
    overflow-y: auto; /* Permitir rolagem se o conteúdo for muito grande */
}

.modal-content {
    background-color: var(--light-card);
    border-radius: 12px; /* Bordas mais arredondadas */
    width: 100%; /* Ocupar largura total no mobile */
    max-width: 650px; /* Aumentar um pouco o max-width */
    max-height: 95vh; /* Ajustar altura máxima */
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); /* Sombra mais proeminente */
    transition: all 0.3s ease;
    transform: scale(0.95); /* Efeito de entrada sutil */
    opacity: 0;
    animation: modalFadeIn 0.3s forwards;
}

.modal.show .modal-content {
    transform: scale(1);
    opacity: 1;
}

@keyframes modalFadeIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.dark-theme .modal-content {
    background-color: var(--dark-card);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px; /* Aumentar padding */
    border-bottom: 1px solid var(--light-border);
}

.dark-theme .modal-header {
    border-bottom-color: var(--dark-border);
}

.modal-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem; /* Tamanho de fonte responsivo */
    color: var(--light-primary);
}

.dark-theme .modal-header h2 {
    color: var(--dark-primary);
}

.close-modal {
    font-size: 1.8rem; /* Ícone maior */
    cursor: pointer;
    color: var(--light-text); /* Alterado para usar a variável de tema */
    transition: all 0.3s ease;
}

.dark-theme .close-modal {
    color: var(--dark-text); /* AJUSTADO */
}

.close-modal:hover {
    color: var(--light-error);
    transform: rotate(90deg); /* Efeito de rotação */
}

.dark-theme .close-modal:hover {
    color: var(--dark-error);
}

.modal-body {
    padding: 25px;
}

.settings-section {
    background-color: var(--light-bg);
    border-radius: 10px; /* Bordas mais arredondadas */
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--light-border);
    transition: all 0.3s ease;
}

.dark-theme .settings-section {
    background-color: var(--dark-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--dark-border);
}

.settings-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px; /* Aumentar espaçamento */
    font-size: 1.3rem; /* Tamanho de fonte responsivo */
    color: var(--light-primary);
}

.dark-theme .settings-section h3 {
    color: var(--dark-primary);
}

/* Theme Section Specifics */
.theme-section .theme-switch {
    display: flex;
    flex-direction: column; /* Empilhar botões no mobile */
    gap: 10px;
}

.theme-section .theme-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px; /* Aumentar padding */
    font-size: 1rem;
    background-color: var(--light-card);
    color: var(--light-text);
    border: 1px solid var(--light-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dark-theme .theme-section .theme-btn {
    border-color: var(--dark-border);
    background-color: var(--dark-card);
    color: var(--dark-text); /* AJUSTADO */
}

.theme-btn.active {
    background-color: var(--light-primary);
    color: white;
    border-color: var(--light-primary);
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.2);
}

.dark-theme .theme-btn.active {
    background-color: var(--dark-primary);
    border-color: var(--dark-primary);
    box-shadow: 0 4px 10px rgba(74, 144, 226, 0.2);
}

/* Account and Data Management Actions */
.account-actions,
.data-actions {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Aumentar espaçamento */
}

.full-width-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px; /* Aumentar padding */
    font-size: 1rem;
}

/* WhatsApp Section Specifics */
.whatsapp-section textarea {
    min-height: 180px; /* Aumentar altura mínima */
    margin-bottom: 15px;
    resize: vertical;
    font-size: 1rem;
    line-height: 1.6;
    padding: 15px;
    border-radius: 8px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
}

.dark-theme .whatsapp-section textarea {
    box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.08);
    color: var(--dark-text);
}

.whatsapp-section .hint-text {
    text-align: left;
    margin-top: 10px;
    font-size: 0.85rem;
    color: #999;
    line-height: 1.5;
}

.dark-theme .whatsapp-section .hint-text {
    color: var(--dark-text);
}

.whatsapp-template-helper {
    display: grid;
    gap: 10px;
    margin: -2px 0 18px;
}

.template-helper-note {
    margin: 0;
    color: #666;
    font-size: 0.86rem;
    line-height: 1.45;
}

.dark-theme .template-helper-note {
    color: #b8b8c8;
}

.template-token-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: 8px;
}

.template-token-btn,
.template-default-btn {
    border: 1px solid var(--light-border);
    background: rgba(255, 255, 255, 0.72);
    color: var(--light-text);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.dark-theme .template-token-btn,
.dark-theme .template-default-btn {
    border-color: var(--dark-border);
    background: rgba(255, 255, 255, 0.06);
    color: var(--dark-text);
}

.template-token-btn {
    display: grid;
    gap: 3px;
    min-height: 54px;
    padding: 8px 10px;
    border-radius: 8px;
    text-align: left;
}

.template-token-btn span {
    font-weight: 600;
    font-size: 0.82rem;
}

.template-token-btn code {
    color: var(--light-primary);
    font-size: 0.78rem;
    overflow-wrap: anywhere;
}

.dark-theme .template-token-btn code {
    color: var(--dark-primary);
}

.template-default-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: fit-content;
    max-width: 100%;
    padding: 9px 12px;
    border-radius: 8px;
    font-weight: 700;
}

.template-token-btn:hover,
.template-default-btn:hover {
    transform: translateY(-1px);
    border-color: var(--light-primary);
    background: rgba(0, 123, 255, 0.08);
}

.dark-theme .template-token-btn:hover,
.dark-theme .template-default-btn:hover {
    border-color: var(--dark-primary);
    background: rgba(77, 166, 255, 0.12);
}

/* About Section */
.about-section p {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.about-section .text-muted {
    font-size: 0.8rem;
    color: #eceaea;
}

.dark-theme .about-section .text-muted {
    color: var(--dark-text);
}

/* Toggle Switch for Checkbox */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px; /* Aumentar largura */
    height: 28px; /* Aumentar altura */
    margin-left: 15px;
    vertical-align: middle;
    cursor: pointer;
}

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

.toggle-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.toggle-switch .slider:before {
    position: absolute;
    content: "";
    height: 20px; /* Aumentar tamanho do círculo */
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.toggle-switch input:checked + .slider {
    background-color: var(--light-primary);
}

.dark-theme .toggle-switch input:checked + .slider {
    background-color: var(--dark-primary);
}

.toggle-switch input:focus + .slider {
    box-shadow: 0 0 1px var(--light-primary);
}

.toggle-switch input:checked + .slider:before {
    transform: translateX(20px); /* Ajustar translação */
}

/* NEW STYLES FOR DUE DATE ALERTS SECTION - Aprimorado */
.alert-settings-grid {
    display: grid;
    grid-template-columns: 1fr; /* Mobile-first: uma coluna */
    gap: 15px;
    margin-top: 15px;
}

.alert-setting-item {
    display: flex;
    flex-direction: column;
    gap: 10px; /* Aumentar espaçamento */
    padding: 18px; /* Aumentar padding */
    border: 1px solid var(--light-border);
    border-radius: 10px;
    background-color: var(--light-card);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.dark-theme .alert-setting-item {
    border-color: var(--dark-border);
    background-color: var(--dark-card);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.alert-setting-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    font-size: 1rem;
    color: var(--light-text);
}

.dark-theme .alert-setting-label {
    color: var(--dark-text);
}

.alert-setting-label i {
    font-size: 1.3rem; /* Ícone maior */
    color: var(--light-primary);
}

.dark-theme .alert-setting-label i {
    color: var(--dark-primary);
}

.alert-setting-item input[type="color"] {
    width: 100%;
    height: 45px; /* Aumentar altura */
    border: 1px solid var(--light-border);
    border-radius: 6px;
    padding: 0;
    cursor: pointer;
    background: none;
}

.dark-theme .alert-setting-item input[type="color"] {
    border-color: var(--dark-border);
}

.alert-setting-item .days-input {
    width: 80px; /* Largura fixa para o input de dias */
    text-align: center;
    margin-left: auto; /* Empurrar para a direita */
    padding: 8px; /* Ajustar padding */
    border-radius: 6px;
}

.alert-setting-item .days-label {
    font-size: 0.9rem;
    color: #777;
}

.dark-theme .alert-setting-item .days-label {
    color: var(--dark-text);
}

/* Items List (for Apps/Servers Modals) */
.items-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* NOVO: Estilos para o item do card (aplicado a .item-card) */
.item-card {
    display: flex;
    flex-direction: column; /* Empilha o conteúdo do card em telas pequenas */
    align-items: flex-start; /* Alinha o conteúdo à esquerda */
    gap: 15px; /* Espaçamento entre o conteúdo e os botões */
    padding: 15px;
    background-color: var(--light-bg);
    border: 1px solid var(--light-border);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    width: 100%; /* Garante que o card ocupe a largura total disponível */
}

.dark-theme .item-card {
    background-color: var(--dark-bg);
    border-color: var(--dark-border);
}

.item-card strong {
    font-size: 1.05rem;
    color: var(--light-text);
}

.dark-theme .item-card strong {
    color: var(--dark-text);
}

.item-card .text-muted {
    font-size: 0.85rem;
    color: #777;
}

.dark-theme .item-card .text-muted {
    color: var(--dark-text);
}

/* NOVO: Estilos para o container de ações dentro do item do card */
.item-actions {
    display: flex;
    flex-wrap: wrap; /* Permite que os itens quebrem a linha */
    gap: 8px; /* Espaçamento entre os botões */
    width: 100%; /* Ocupa a largura total disponível para quebrar a linha corretamente */
    justify-content: flex-start; /* Alinha os botões ao início da linha */
}

.item-actions button {
    flex-shrink: 0; /* Impede que os botões encolham */
    padding: 8px 12px;
    font-size: 0.9rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    white-space: nowrap; /* Impede que o texto do botão quebre em várias linhas */
}

.dark-theme .item-actions button {
    background-color: var(--dark-secondary);
    border-color: var(--dark-secondary);
}

.item-actions button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Specific styles for "Abrir" buttons (Apps and Servers) */
.item-actions .open-app,
.item-actions .open-server {
    background-color: var(--light-info); /* Azul claro para informação/abrir */
    color: white;
    border: 1px solid var(--light-info);
}

.dark-theme .item-actions .open-app,
.dark-theme .item-actions .open-server {
    background-color: var(--dark-info);
    border-color: var(--dark-info);
}

.item-actions .open-app:hover,
.item-actions .open-server:hover {
    background-color: #138496; /* Tom mais escuro no hover */
    box-shadow: 0 1px 5px rgba(23, 162, 184, 0.3);
}

.dark-theme .item-actions .open-app:hover,
.dark-theme .item-actions .open-server:hover {
    background-color: #2874a6;
}

/* Specific styles for "Editar" buttons (Servers) */
.item-actions .edit-server-btn {
    background-color: var(--light-primary); /* Azul primário para editar */
    color: white;
    border: 1px solid var(--light-primary);
}

.dark-theme .item-actions .edit-server-btn {
    background-color: var(--dark-primary);
    border-color: var(--dark-primary);
}

.item-actions .edit-server-btn:hover {
    background-color: var(--light-secondary);
    box-shadow: 0 1px 5px rgba(0, 123, 255, 0.3);
}

.dark-theme .item-actions .edit-server-btn:hover {
    background-color: var(--dark-secondary);
}

/* Specific styles for "Ver Custo" button (Servers) */
.item-actions .view-cost-server {
    background-color: var(--light-info); /* Azul claro para ver custo */
    color: white;
    border: 1px solid var(--light-info);
}

.dark-theme .item-actions .view-cost-server {
    background-color: var(--dark-info);
    border-color: var(--dark-info);
}

.item-actions .view-cost-server:hover {
    background-color: #138496; /* Tom mais escuro no hover */
    box-shadow: 0 1px 5px rgba(23, 162, 184, 0.3);
}

.dark-theme .item-actions .view-cost-server:hover {
    background-color: #2874a6;
}

/* Specific styles for "Registrar Custo" button (Servers - if implemented) */
.item-actions .register-cost-server {
    background-color: var(--light-success); /* Verde para indicar adição/registro */
    color: white;
    border: 1px solid var(--light-success);
}

.dark-theme .item-actions .register-cost-server {
    background-color: var(--dark-success);
    border-color: var(--dark-success);
}

.item-actions .register-cost-server:hover {
    background-color: #218838; /* Tom mais escuro no hover */
    box-shadow: 0 2px 5px rgba(40, 167, 69, 0.3);
}

.dark-theme .item-actions .register-cost-server:hover {
    background-color: #209955;
}

/* Specific styles for "Excluir" buttons (Apps and Servers) */
.item-actions .delete-item {
    background-color: var(--light-error); /* Vermelho para excluir */
    color: white;
    border: 1px solid var(--light-error);
}

.dark-theme .item-actions .delete-item {
    background-color: var(--dark-error);
    border-color: var(--dark-error);
}

.item-actions .delete-item:hover {
    background-color: #c82333; /* Tom mais escuro no hover */
    box-shadow: 0 2px 5px rgba(220, 53, 69, 0.3);
}

.dark-theme .item-actions .delete-item:hover {
    background-color: #a93226;
}


/* Media Queries for Desktop (min-width) */
@media (min-width: 768px) {
    /* Global */
    html, body {
        font-size: 17px; /* Aumentar um pouco a fonte base para desktop */
    }

    .btn {
        padding: 10px 20px;
        font-size: 1rem;
    }

    .btn-icon {
        padding: 8px;
        font-size: 1.1rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px;
        font-size: 0.95rem;
    }

    .form-row {
        flex-direction: row; /* Voltar para colunas no desktop */
        gap: 15px;
    }

    .date-input {
        flex-direction: row; /* Voltar para linha no desktop */
    }

    .input-with-buttons {
        flex-direction: row; /* Voltar para linha no desktop */
        gap: 5px;
    }

    .input-with-buttons .btn-icon {
        width: auto; /* Remover largura total */
        padding: 6px;
        font-size: 1rem;
    }

    /* Login Page */
    .login-container {
        padding: 40px;
    }

    .login-header h1 {
        font-size: 2.2rem;
    }

    .login-form .btn-primary {
        width: auto; /* Botão de login não ocupa largura total */
    }

    /* Dashboard Page */
    .dashboard-header,
    .clients-header {
        flex-direction: row; /* Voltar para linha no desktop */
        align-items: center;
        padding: 20px 40px; /* Aumentar padding horizontal */
    }

    .header-actions {
        flex-direction: row; /* Voltar para linha no desktop */
        justify-content: flex-end;
        width: auto;
        max-width: 74%;
    }

    .header-actions .btn {
        width: auto;
    }

    .header-left h1 {
        font-size: 2rem;
    }

    .dashboard-cards {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* Mais colunas */
        gap: 25px;
    }

    .card {
        padding: 30px;
    }

    .card-icon {
        font-size: 3rem;
    }

    .card h2 {
        font-size: 1.6rem;
    }

    /* Clients Page */
    .clients-toolbar {
        flex-direction: row;
        align-items: center;
        padding: 22px 30px;
    }

    .clients-filter-bar {
        flex: 1;
        grid-template-columns: minmax(220px, 1.4fr) minmax(160px, 0.9fr) minmax(160px, 0.9fr);
        max-width: 720px;
    }

    .clients-toolbar .btn {
        width: auto;
    }

    .client-form-container,
    .clients-list-container {
        padding: 30px;
    }

    .client-form-container h2,
    .clients-list-container h2 {
        font-size: 1.8rem;
        text-align: left; /* Alinhar à esquerda no desktop */
    }

    /* Table */
    th, td {
        padding: 12px 15px;
        font-size: 1rem;
    }

    td .action-btn {
        padding: 8px 12px;
        font-size: 1rem;
        min-width: 40px;
        min-height: 40px;
    }

    /* Modals */
    .modal-content {
        padding: 0; /* Remover padding do modal-content, o padding será no body */
    }

    .modal-header {
        padding: 20px 30px;
    }

    .modal-header h2 {
        font-size: 1.6rem;
    }

    .close-modal {
        font-size: 1.5rem;
    }

    .modal-body {
        padding: 30px;
    }

    .settings-section {
        padding: 25px;
    }

    .settings-section h3 {
        font-size: 1.4rem;
    }

    .theme-section .theme-switch {
        flex-direction: row; /* Voltar para linha no desktop */
    }

    .theme-section .theme-btn {
        padding: 12px;
    }

    .full-width-btn {
        padding: 12px;
    }

    .whatsapp-section textarea {
        min-height: 150px;
    }

    .toggle-switch {
        width: 40px;
        height: 24px;
    }

    .toggle-switch .slider:before {
        height: 16px;
        width: 16px;
    }

    .toggle-switch input:checked + .slider:before {
        transform: translateX(16px);
    }

    .alert-settings-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Mais colunas */
    }

    .alert-setting-item {
        flex-direction: row; /* Voltar para linha */
        align-items: center;
        justify-content: space-between;
        padding: 15px;
    }

    .alert-setting-item .days-input {
        margin-left: 10px; /* Ajustar margem */
    }

    /* NOVO: Media Query para .item-card e .item-actions no desktop */
    .item-card {
        flex-direction: row; /* Volta para linha no desktop */
        align-items: center;
        justify-content: space-between; /* Distribui o conteúdo e as ações */
        gap: 15px; /* Espaçamento entre os elementos do card */
    }

    .item-card > div:first-child { /* O div que contém o nome, URL, preço, etc. */
        flex-grow: 1; /* Permite que o conteúdo cresça e ocupe o espaço disponível */
    }

    .item-actions {
        flex-wrap: nowrap; /* Botões ficam na mesma linha no desktop */
        width: auto; /* Largura automática para os botões */
    }

    .item-actions button {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
}

/* Media Queries for Larger Desktops */
@media (min-width: 1024px) {
    .dashboard-cards {
        grid-template-columns: repeat(3, 1fr); /* 3 colunas no desktop maior */
    }
}

/* Removido: Adicionado para garantir que os botões se ajustem em telas menores */
/* As regras foram movidas para as definições de .item-card e .item-actions */
/* @media (max-width: 767px) {
    .item-actions {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }

    .item-actions button {
        width: 100%;
    }

    .item-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
} */

/* PrimeFlow mobile experience */
.mobile-only,
.mobile-drawer,
.mobile-drawer-backdrop,
.mobile-account-menu {
    display: none;
}

.primeflow-login-brand {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    justify-content: center;
    gap: 18px;
    color: #fff;
}

.primeflow-login-brand strong {
    color: #fff;
    font-size: clamp(2.8rem, 13vw, 4.5rem);
    line-height: 1;
    letter-spacing: 0;
}

.primeflow-logo-mark,
.primeflow-small-mark {
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.35), transparent 28%),
        linear-gradient(135deg, #12c2e9 0%, #6c5ce7 52%, #00d68f 100%);
    box-shadow: 0 18px 42px rgba(18, 194, 233, 0.25);
}

.primeflow-logo-mark {
    width: 118px;
    height: 92px;
    grid-template-columns: repeat(3, 16px);
    gap: 8px;
    border-radius: 30px;
}

.primeflow-logo-mark span,
.primeflow-small-mark span {
    display: block;
    width: 100%;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
}

.primeflow-logo-mark span:nth-child(1) {
    height: 36px;
    align-self: end;
}

.primeflow-logo-mark span:nth-child(2) {
    height: 58px;
    align-self: center;
}

.primeflow-logo-mark span:nth-child(3) {
    height: 44px;
    align-self: start;
}

.primeflow-small-mark {
    width: 42px;
    height: 42px;
    grid-template-columns: repeat(3, 5px);
    gap: 4px;
    border-radius: 12px;
}

.primeflow-small-mark span:nth-child(1) {
    height: 14px;
    align-self: end;
}

.primeflow-small-mark span:nth-child(2) {
    height: 24px;
}

.primeflow-small-mark span:nth-child(3) {
    height: 18px;
    align-self: start;
}

.app-dashboard #settingsModal .whatsapp-section,
.app-dashboard #settingsModal .whatsapp-connection-section,
.app-dashboard #settingsModal .notification-settings-section,
.app-dashboard #settingsModal .due-date-alerts-section,
.app-clients #settingsModal .whatsapp-section,
.app-clients #settingsModal .whatsapp-connection-section,
.app-clients #settingsModal .notification-settings-section,
.app-clients #settingsModal .due-date-alerts-section,
.app-receita #settingsModal .whatsapp-section,
.app-receita #settingsModal .whatsapp-connection-section,
.app-receita #settingsModal .notification-settings-section,
.app-receita #settingsModal .due-date-alerts-section {
    display: none;
}

.section-title-row,
.finance-chart-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.section-title-row h2,
.finance-chart-header strong {
    margin: 0;
}

.eyebrow {
    margin: 0 0 6px;
    color: #4f78ff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.finance-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.finance-chart-card {
    min-height: 245px;
    padding: 26px;
    border: 1px solid var(--light-border);
    border-radius: 8px;
    background: var(--light-card);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.finance-chart-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.12);
}

.finance-chart-header span {
    color: var(--light-text);
    font-weight: 700;
}

.finance-chart-header strong {
    color: var(--light-primary);
    font-size: 1.4rem;
}

.mini-bars {
    display: flex;
    align-items: end;
    gap: 12px;
    height: 150px;
    margin-top: 32px;
}

.mini-bars span {
    flex: 1;
    min-width: 18px;
    border-radius: 12px 12px 4px 4px;
    background: linear-gradient(180deg, #12c2e9, #4f78ff);
}

.mini-line-chart,
.mini-area-chart {
    position: relative;
    overflow: hidden;
    height: 150px;
    margin-top: 34px;
    border-radius: 8px;
    background:
        linear-gradient(transparent 24%, rgba(79, 120, 255, 0.1) 25%, transparent 26%),
        linear-gradient(90deg, transparent 24%, rgba(79, 120, 255, 0.1) 25%, transparent 26%);
    background-size: 100% 38px, 72px 100%;
}

.mini-line-chart svg,
.mini-area-chart svg {
    position: absolute;
    inset: 14px 10px 12px;
    width: calc(100% - 20px);
    height: calc(100% - 26px);
    overflow: visible;
}

.chart-fill {
    fill: url(#profitFillGradient);
}

.chart-line {
    fill: none;
    stroke: url(#profitLineGradient);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 7;
    filter: drop-shadow(0 8px 12px rgba(18, 194, 233, 0.2));
}

.chart-dots circle {
    fill: #f7f8ff;
    stroke: #12c2e9;
    stroke-width: 3;
}

.delay-fill {
    fill: url(#delayAreaGradient);
}

.delay-line {
    stroke: rgba(140, 200, 255, 0.72);
    stroke-width: 5;
}

.mini-donut {
    display: grid;
    width: 148px;
    height: 148px;
    place-items: center;
    margin: 28px auto 0;
    border-radius: 50%;
    background: conic-gradient(#00d68f 0 var(--receipt-percent, 0%), rgba(79, 120, 255, 0.16) var(--receipt-percent, 0%) 100%);
}

.mini-donut span {
    display: grid;
    width: 92px;
    height: 92px;
    place-items: center;
    border-radius: 50%;
    color: var(--light-primary);
    background: var(--light-card);
    font-weight: 800;
}

.minimal-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(79, 120, 255, 0.24);
    border-radius: 999px;
    padding: 10px 14px;
    color: #4f78ff;
    background: transparent;
    font-weight: 700;
    text-decoration: none;
}

.content-back {
    width: fit-content;
    margin: 0 0 18px;
}

@media (min-width: 761px) {
    .content-back {
        display: none;
    }
}

.whatsapp-page-main {
    display: grid;
    gap: 24px;
}

.whatsapp-qr-panel {
    display: grid;
    min-height: 300px;
    place-items: center;
    margin: 18px 0;
    border: 1px dashed var(--light-border);
    border-radius: 8px;
    background: rgba(79, 120, 255, 0.05);
}

.whatsapp-details-grid,
.whatsapp-action-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.whatsapp-details-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.status-pill {
    border-radius: 999px;
    padding: 8px 12px;
    color: #0d6b46;
    background: rgba(0, 214, 143, 0.13);
    font-size: 0.86rem;
    font-weight: 700;
}

.tutorial-main {
    display: grid;
    gap: 24px;
}

.tutorial-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 28px;
    border: 1px solid var(--light-border);
    border-radius: 12px;
    background:
        radial-gradient(circle at 86% 12%, rgba(18, 194, 233, 0.14), transparent 26%),
        var(--light-card);
    box-shadow: var(--shadow);
}

.dark-theme .tutorial-hero {
    border-color: var(--dark-border);
    background:
        radial-gradient(circle at 86% 12%, rgba(18, 194, 233, 0.18), transparent 28%),
        var(--dark-card);
}

.tutorial-hero h2 {
    margin: 0 0 8px;
    color: var(--light-primary);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    line-height: 1.05;
}

.dark-theme .tutorial-hero h2 {
    color: #8cc8ff;
}

.tutorial-hero p:last-child {
    max-width: 620px;
    margin: 0;
    color: var(--light-text);
    line-height: 1.55;
}

.dark-theme .tutorial-hero p:last-child {
    color: var(--dark-text);
}

.tutorial-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 12px 16px;
    color: #fff;
    background: linear-gradient(135deg, #ff3d5a, #ff8a3d);
    font-weight: 800;
    box-shadow: 0 12px 28px rgba(255, 61, 90, 0.22);
}

.tutorial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 20px;
}

.tutorial-card {
    overflow: hidden;
    border: 1px solid var(--light-border);
    border-radius: 14px;
    background: var(--light-card);
    box-shadow: var(--shadow);
}

.dark-theme .tutorial-card {
    border-color: var(--dark-border);
    background: var(--dark-card);
}

.tutorial-video-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #070a14;
}

.tutorial-video-frame iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.tutorial-video-placeholder {
    display: grid;
    min-height: 100%;
    place-items: center;
    gap: 10px;
    padding: 28px;
    color: #dce7ff;
    text-align: center;
    background:
        radial-gradient(circle at 28% 18%, rgba(79, 120, 255, 0.42), transparent 30%),
        linear-gradient(135deg, #11172d, #071221 62%, #0c2b31);
}

.tutorial-video-placeholder i {
    color: #4f78ff;
    font-size: 2.2rem;
}

.tutorial-card-body {
    padding: 20px;
}

.tutorial-card-body span {
    display: inline-flex;
    margin-bottom: 10px;
    border-radius: 999px;
    padding: 6px 10px;
    color: #4f78ff;
    background: rgba(79, 120, 255, 0.12);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.tutorial-card-body h3 {
    margin: 0 0 8px;
    color: var(--light-text);
    font-size: 1.15rem;
}

.dark-theme .tutorial-card-body h3 {
    color: #fff;
}

.tutorial-card-body p {
    margin: 0;
    color: var(--light-text);
    line-height: 1.45;
}

.dark-theme .tutorial-card-body p {
    color: var(--dark-text);
}

@media (max-width: 760px) {
    body.light-theme,
    body.dark-theme {
        background:
            radial-gradient(circle at 50% 0%, rgba(60, 101, 255, 0.1), transparent 220px),
            #101326;
        color: #f7f8ff;
    }

    body:has(.login-wrapper) {
        background: #0b0c12;
    }

    .mobile-only {
        display: inline-flex;
    }

    .dashboard-header,
    .clients-header {
        position: sticky;
        top: 0;
        z-index: 50;
        display: grid;
        grid-template-columns: 56px 1fr 56px;
        align-items: center;
        min-height: 92px;
        padding: 18px 22px;
        border: 0;
        background: #252947;
        box-shadow: none;
    }

    .header-left {
        text-align: center;
    }

    .header-left h1 {
        color: #fff;
        font-size: 1.35rem;
        font-weight: 700;
    }

    .header-left p,
    .header-actions {
        display: none;
    }

    .mobile-icon-btn {
        display: grid;
        width: 48px;
        height: 48px;
        place-items: center;
        border: 0;
        border-radius: 14px;
        color: #e8ebf7;
        background: transparent;
        font-size: 1.5rem;
        cursor: pointer;
    }

    .mobile-drawer {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 80;
        display: block;
        width: min(82vw, 340px);
        padding: 30px 22px;
        background: #252947;
        transform: translateX(-105%);
        transition: transform 0.24s ease;
        box-shadow: 26px 0 60px rgba(0, 0, 0, 0.35);
    }

    .mobile-drawer.open {
        transform: translateX(0);
    }

    .mobile-drawer-backdrop {
        position: fixed;
        inset: 0;
        z-index: 70;
        background: rgba(5, 7, 14, 0.58);
    }

    .mobile-drawer-backdrop.show {
        display: block;
    }

    .mobile-drawer-brand {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 12px;
        margin-bottom: 36px;
        color: #fff;
        font-size: 1.4rem;
    }

    .mobile-drawer-section {
        margin: 26px 0 12px;
        color: #dfe3f6;
        font-size: 0.85rem;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .mobile-drawer-link {
        display: grid;
        grid-template-columns: 34px 1fr;
        align-items: center;
        width: 100%;
        min-height: 52px;
        border: 0;
        border-radius: 12px;
        color: #f7f8ff;
        background: transparent;
        font: inherit;
        font-size: 1.08rem;
        text-align: left;
        cursor: pointer;
    }

    .mobile-drawer-link i {
        color: #b7bed8;
    }

    .mobile-drawer-link.active,
    .mobile-drawer-link:active,
    .mobile-drawer-link.active i {
        color: #4f78ff;
    }

    .mobile-account-menu {
        position: fixed;
        top: 92px;
        left: 0;
        right: 0;
        z-index: 75;
        padding: 28px 13vw 34px;
        background: #142d38;
        box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    }

    .mobile-account-menu.show {
        display: grid;
        gap: 22px;
    }

    .mobile-account-menu button {
        border: 0;
        color: #e8edf4;
        background: transparent;
        font: inherit;
        font-size: 1rem;
        letter-spacing: 0.05em;
        text-align: left;
        text-transform: uppercase;
    }

    .dashboard-main,
    .clients-main {
        padding: 28px 8.5vw 42px;
    }

    .mobile-dashboard-intro {
        display: block;
        margin-bottom: 20px;
    }

    .mobile-dashboard-intro h2 {
        margin: 24px 0 16px;
        color: #fff;
        font-size: 1.75rem;
        font-weight: 500;
    }

    .mobile-notice {
        position: relative;
        padding: 16px 44px 16px 18px;
        border-radius: 5px;
        color: #163f28;
        background: #e3f8e8;
        font-size: 0.98rem;
        line-height: 1.45;
    }

    .mobile-notice span {
        font-weight: 700;
    }

    .mobile-notice button {
        position: absolute;
        top: 12px;
        right: 14px;
        border: 0;
        color: #486755;
        background: transparent;
        font-size: 1.4rem;
    }

    .dashboard-cards {
        display: grid;
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .finance-dashboard-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .finance-chart-card {
        min-height: 190px;
        border: 0;
        border-radius: 7px;
        color: #fff;
        background: #1f233d;
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
    }

    .finance-chart-header span {
        color: #f7f8ff;
    }

    .finance-chart-header strong {
        color: #8cc8ff;
        font-size: 1rem;
    }

    .mini-bars,
    .mini-line-chart,
    .mini-area-chart {
        height: 110px;
        background: transparent;
    }

    .mini-donut {
        width: 116px;
        height: 116px;
    }

    .mini-donut span {
        width: 72px;
        height: 72px;
        color: #8cc8ff;
        background: #1f233d;
    }

    .card {
        position: relative;
        display: grid;
        grid-template-columns: 76px 1fr;
        align-items: center;
        min-height: 130px;
        padding: 28px;
        border: 0;
        border-radius: 7px;
        color: #fff;
        background: #282c4b;
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
    }

    .card:hover {
        transform: none;
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
    }

    .card-icon {
        margin: 0;
        color: #426dff;
        font-size: 2.75rem;
    }

    .card h2 {
        margin: 0;
        color: #fff;
        font-size: 1.2rem;
        font-weight: 500;
        text-align: right;
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }

    .card p {
        grid-column: 2;
        margin: 6px 0 0;
        color: #dfe4ff;
        text-align: right;
        font-size: 0.86rem;
    }

    .clients-toolbar,
    .client-form-container,
    .clients-list-container,
    .modal-content {
        border: 0;
        border-radius: 7px;
        background: #282c4b;
        color: #fff;
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
    }

    .clients-toolbar-copy h2,
    .client-form-container h2,
    .clients-list-container h2,
    .modal-header h2,
    .settings-section h3 {
        color: #fff;
    }

    .clients-toolbar-copy p {
        color: #dfe4ff;
    }

    .clients-search-field input,
    .clients-filter-bar select,
    .dark-theme .clients-search-field input,
    .dark-theme .clients-filter-bar select {
        border-color: #343a61;
        color: #fff;
        background: #1b1f35;
    }

    .clients-search-field i,
    .dark-theme .clients-search-field i {
        color: #dfe4ff;
    }

    .form-group label,
    .dark-theme .form-group label {
        color: #eef1ff;
    }

    .form-group input,
    .form-group select,
    .form-group textarea,
    .dark-theme .form-group input,
    .dark-theme .form-group select,
    .dark-theme .form-group textarea {
        border-color: #343a61;
        color: #fff;
        background: #1b1f35;
        box-shadow: none;
    }

    .btn-primary {
        background: #0f7af2;
        box-shadow: 0 10px 28px rgba(15, 122, 242, 0.28);
    }

    .btn-secondary {
        border-color: #343a61;
        color: #f7f8ff;
        background: #1b1f35;
    }

    .clients-list-container {
        padding: 18px;
    }

    .clients-list-container h2 {
        margin-bottom: 16px;
        font-size: 1.18rem;
        text-align: left;
    }

    .table-responsive {
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
        padding-bottom: 2px;
    }

    #clientsTable {
        min-width: 0;
        border-collapse: separate;
        border-spacing: 0 20px;
    }

    #clientsTable thead {
        display: none;
    }

    #clientsTable,
    #clientsTable tbody,
    #clientsTable tr,
    #clientsTable td {
        display: block;
        width: 100%;
    }

    #clientsTable tr.client-table-row {
        position: relative;
        overflow: hidden;
        margin-bottom: 26px;
        padding: 20px 16px 18px;
        border: 1px solid #465077;
        border-radius: 7px;
        background: #1b1f35;
        box-shadow: 0 14px 30px rgba(0, 0, 0, 0.26);
    }

    #clientsTable tr.client-table-row:last-child {
        margin-bottom: 0;
    }

    #clientsTable tr.client-table-row::before {
        content: "";
        position: absolute;
        inset: 0 0 auto;
        height: 4px;
        background: var(--client-alert-color, #4f78ff);
    }

    #clientsTable tr.client-table-row:hover {
        background: #1f243d;
    }

    #clientsTable tr.client-empty-row {
        display: block;
        border: 1px dashed #343a61;
        border-radius: 7px;
        background: #1b1f35;
    }

    #clientsTable tr.client-empty-row td {
        display: block;
        border: 0;
        color: #dfe4ff;
    }

    #clientsTable td {
        display: grid;
        grid-template-columns: minmax(92px, 34%) 1fr;
        gap: 12px;
        align-items: start;
        padding: 10px 0;
        border: 0;
        color: inherit;
        font-size: 0.96rem;
        line-height: 1.35;
        overflow-wrap: anywhere;
    }

    #clientsTable td::before {
        content: attr(data-label);
        color: inherit;
        font-size: 0.76rem;
        font-weight: 800;
        letter-spacing: 0.04em;
        opacity: 0.72;
        text-transform: uppercase;
    }

    #clientsTable .client-name-cell {
        display: block;
        padding-top: 0;
    }

    #clientsTable .client-name-cell::before {
        display: none;
    }

    #clientsTable .client-name-cell strong {
        color: inherit;
        font-size: 1.18rem;
    }

    .client-mobile-summary {
        display: grid;
        gap: 8px;
        margin-top: 12px;
        color: inherit;
        font-size: 0.88rem;
        font-weight: 500;
        opacity: 0.86;
    }

    .client-mobile-summary span {
        display: grid;
        grid-template-columns: 22px 1fr;
        align-items: center;
        min-width: 0;
    }

    .client-mobile-summary i {
        color: inherit;
        font-size: 0.9rem;
        opacity: 0.9;
        text-align: center;
    }

    #clientsTable .client-due-date-cell {
        margin-top: 4px;
        border-top: 1px solid #343a61;
        padding-top: 14px;
        font-weight: 800;
    }

    #clientsTable .client-actions-cell {
        display: grid;
        grid-template-columns: repeat(5, minmax(42px, 1fr));
        gap: 8px;
        margin-top: 6px;
        padding-top: 14px;
        border-top: 1px solid #343a61;
        white-space: normal;
    }

    #clientsTable .client-actions-cell::before {
        grid-column: 1 / -1;
    }

    #clientsTable td .action-btn {
        width: 100%;
        min-width: 42px;
        min-height: 44px;
        margin: 0;
        padding: 0;
        border-radius: 7px;
        box-shadow: none;
    }

    .login-wrapper {
        align-items: flex-start;
        padding: 104px 28px 28px;
        background: #0b0c12;
    }

    .login-container,
    .dark-theme .login-container {
        max-width: 100%;
        padding: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .login-header {
        margin-bottom: 54px;
        text-align: left;
    }

    .login-header p {
        color: #8d91a0;
        text-align: center;
    }

    .login-form label {
        color: #f7f8ff;
        font-size: 1rem;
        font-weight: 700;
    }

    .login-form input {
        min-height: 76px;
        border: 0;
        border-radius: 12px;
        color: #fff;
        background: #1a1c24;
    }

    .login-form .btn-primary {
        width: 100%;
        min-height: 72px;
        margin-top: 32px;
        border-radius: 12px;
        font-size: 1.08rem;
    }

    .whatsapp-details-grid,
    .whatsapp-action-grid {
        grid-template-columns: 1fr;
    }

    .section-title-row {
        display: grid;
    }

    .tutorial-main {
        gap: 18px;
    }

    .tutorial-hero {
        display: grid;
        padding: 22px;
        border: 0;
        border-radius: 7px;
        color: #fff;
        background:
            radial-gradient(circle at 88% 10%, rgba(18, 194, 233, 0.24), transparent 30%),
            #282c4b;
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
    }

    .tutorial-hero h2 {
        color: #8cc8ff;
        font-size: 1.75rem;
    }

    .tutorial-hero p:last-child {
        color: #dfe4ff;
    }

    .tutorial-pill {
        width: fit-content;
        padding: 10px 14px;
    }

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

    .tutorial-card {
        border: 0;
        border-radius: 7px;
        background: #282c4b;
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
    }

    .tutorial-card-body h3 {
        color: #fff;
    }

    .tutorial-card-body p {
        color: #dfe4ff;
    }
}

/* Light theme final mobile override */
body.light-theme {
    background: #edf2f5;
    color: #28333f;
}

body.light-theme .login-wrapper {
    background:
        radial-gradient(circle at 50% 8%, rgba(104, 132, 154, 0.12), transparent 280px),
        #edf2f5;
}

body.light-theme .login-container {
    background: #f7f9fa;
    border: 1px solid #d8e0e7;
    box-shadow: 0 18px 44px rgba(43, 57, 71, 0.1);
}

body.light-theme .primeflow-login-brand,
body.light-theme .primeflow-login-brand strong {
    color: #28333f;
    text-shadow: none;
}

body.light-theme .dashboard-header,
body.light-theme .clients-header {
    background: #f4f7f9;
    border-bottom: 1px solid #d8e0e7;
    color: #28333f;
    box-shadow: 0 8px 20px rgba(43, 57, 71, 0.06);
}

body.light-theme .dashboard-main,
body.light-theme .clients-main {
    background: #edf2f5;
}

body.light-theme .header-left h1,
body.light-theme .mobile-dashboard-intro h2,
body.light-theme .clients-toolbar-copy h2,
body.light-theme .client-form-container h2,
body.light-theme .clients-list-container h2,
body.light-theme .modal-header h2,
body.light-theme .settings-section h3 {
    color: #5aa7d6;
}

body.light-theme .header-left p,
body.light-theme .clients-toolbar-copy p,
body.light-theme .card p,
body.light-theme .tutorial-card-body p,
body.light-theme .about-section .text-muted {
    color: #697683;
}

body.light-theme .card,
body.light-theme .clients-toolbar,
body.light-theme .client-form-container,
body.light-theme .clients-list-container,
body.light-theme .modal-content,
body.light-theme .settings-section,
body.light-theme .tutorial-card,
body.light-theme .tutorial-hero,
body.light-theme .finance-chart-card,
body.light-theme .item-card,
body.light-theme .alert-setting-item {
    background: #f8fafb;
    border: 1px solid #d9e1e8;
    color: #28333f;
    box-shadow: 0 10px 26px rgba(43, 57, 71, 0.08);
}

body.light-theme .settings-section {
    background: #f1f5f7;
}

body.light-theme .card h2,
body.light-theme .tutorial-card-body h3,
body.light-theme .finance-chart-header span,
body.light-theme .item-card strong {
    color: #28333f;
}

body.light-theme .card-icon,
body.light-theme .finance-chart-header strong,
body.light-theme .tutorial-card-body span,
body.light-theme .tutorial-pill {
    color: #5aa7d6;
}

body.light-theme .mobile-drawer,
body.light-theme .mobile-account-menu {
    background: linear-gradient(180deg, #101623 0%, #070b12 100%);
    color: #eef7ff;
    box-shadow: 24px 0 60px rgba(0, 0, 0, 0.32);
}

body.light-theme .mobile-drawer-brand,
body.light-theme .mobile-drawer-link,
body.light-theme .mobile-account-menu button {
    color: #eef7ff;
}

body.light-theme .mobile-icon-btn {
    color: #28333f;
}

body.light-theme .mobile-drawer .mobile-icon-btn {
    color: #eef7ff;
}

body.light-theme .mobile-drawer-section,
body.light-theme .mobile-drawer-link i {
    color: #8fc7ea;
}

body.light-theme .mobile-drawer-link.active,
body.light-theme .mobile-drawer-link.active i,
body.light-theme .mobile-drawer-link:active {
    color: #63b7ea;
}

body.light-theme .mobile-drawer-link.active {
    background: rgba(99, 183, 234, 0.12);
}

body.light-theme .clients-search-field input,
body.light-theme .clients-filter-bar select,
body.light-theme .form-group input,
body.light-theme .form-group select,
body.light-theme .form-group textarea,
body.light-theme .whatsapp-section textarea,
body.light-theme .theme-section .theme-btn {
    background: #f8fafb;
    border-color: #d4dde5;
    color: #28333f;
}

body.light-theme .clients-search-field input:focus,
body.light-theme .clients-filter-bar select:focus,
body.light-theme .form-group input:focus,
body.light-theme .form-group select:focus,
body.light-theme .form-group textarea:focus {
    border-color: #6f879b;
    box-shadow: 0 0 0 3px rgba(111, 135, 155, 0.14);
}

body.light-theme .clients-search-field i,
body.light-theme .form-group label,
body.light-theme .alert-setting-label,
body.light-theme .alert-setting-label i,
body.light-theme .whatsapp-section .hint-text {
    color: #66737f;
}

body.light-theme .btn-primary {
    background: #4f6f88;
    color: #fff;
    box-shadow: 0 8px 20px rgba(79, 111, 136, 0.2);
}

body.light-theme .btn-primary:hover {
    background: #405f78;
    box-shadow: 0 10px 22px rgba(79, 111, 136, 0.24);
}

body.light-theme .btn-secondary {
    background: #f8fafb;
    border-color: #d4dde5;
    color: #28333f;
}

body.light-theme .btn-secondary:hover {
    background: #eef3f6;
    border-color: #8da0af;
    color: #36556f;
}

body.light-theme #clientsTable tr.client-table-row {
    background: #f8fafb;
    border-color: #d9e1e8;
    color: #28333f;
    box-shadow: 0 10px 24px rgba(43, 57, 71, 0.09);
}

body.light-theme #clientsTable tr.client-table-row:hover {
    background: #f2f6f8;
}

body.light-theme #clientsTable .client-due-date-cell,
body.light-theme #clientsTable .client-actions-cell {
    border-top-color: #dce4ea;
}

body.light-theme #clientsTable tr.client-empty-row {
    background: #f8fafb;
    border-color: #d4dde5;
}

body.light-theme td .action-btn.renew {
    background-color: var(--light-warning);
    border-color: var(--light-warning);
    color: #fff;
}

body.light-theme td .action-btn.edit {
    background-color: var(--light-primary);
    border-color: var(--light-primary);
    color: #fff;
}

body.light-theme td .action-btn.whatsapp {
    background-color: var(--light-success);
    border-color: var(--light-success);
    color: #fff;
}

body.light-theme td .action-btn.renew-server {
    background-color: #6f42c1;
    border-color: #6f42c1;
    color: #fff;
}

body.light-theme td .action-btn.delete {
    background-color: var(--light-error);
    border-color: var(--light-error);
    color: #fff;
}

@media (max-width: 760px) {
    body.light-theme {
        background: #edf2f5;
        color: #28333f;
    }

    body.light-theme .dashboard-header,
    body.light-theme .clients-header {
        background: rgba(244, 247, 249, 0.96);
    }

    body.light-theme .dashboard-main,
    body.light-theme .clients-main {
        background: #edf2f5;
    }

    body.light-theme .card,
    body.light-theme .clients-toolbar,
    body.light-theme .client-form-container,
    body.light-theme .clients-list-container,
    body.light-theme .modal-content,
    body.light-theme .finance-chart-card,
    body.light-theme .tutorial-card,
    body.light-theme .tutorial-hero {
        background: #f8fafb;
        border: 1px solid #d9e1e8;
        color: #28333f;
        box-shadow: 0 10px 26px rgba(43, 57, 71, 0.08);
    }

    body.light-theme .card h2,
    body.light-theme .card p {
        text-align: right;
    }

    body.light-theme .card-icon {
        color: #5aa7d6;
    }

    body.light-theme .login-container {
        background: #f8fafb;
    }

    body.light-theme .primeflow-login-brand strong {
        color: #28333f;
        font-size: clamp(2.15rem, 10vw, 3.25rem);
    }

    body.light-theme .primeflow-logo-mark {
        width: 96px;
        height: 76px;
        border-radius: 24px;
    }
}
