/* Tema dual del Panel de Control AlphaRest. Usa exclusivamente la paleta corporativa. */

.saas-theme-toggle{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:.45rem;
    min-height:42px;
    padding:.5rem .72rem;
    color:#102A43;
    border:1px solid #AABAC8;
    border-radius:11px;
    background:rgba(255,255,255,.78);
    box-shadow:0 6px 16px rgba(16,42,67,.08);
    font-size:.8rem;
    font-weight:800;
    transition:background .2s ease,border-color .2s ease,color .2s ease,transform .2s ease;
}
.saas-theme-toggle:hover{color:#102A43;border-color:#FF5721;background:#FFF0EB;transform:translateY(-1px)}
.saas-theme-toggle:focus-visible{outline:3px solid rgba(255,87,33,.34);outline-offset:2px}
.saas-theme-toggle i{font-size:1.05rem;line-height:1}.saas-theme-toggle--auth{position:fixed;top:20px;right:22px;z-index:5;width:42px;padding:0}.saas-theme-toggle--auth .saas-theme-toggle__label{display:none}

html[data-bs-theme="light"] .saas-auth__card,html[data-bs-theme="light"] .saas-card,html[data-bs-theme="light"] .saas-modal{background:linear-gradient(145deg,#FFFFFF 0%,#F7FAFC 100%)}
html[data-bs-theme="light"] .saas-kpis article,html[data-bs-theme="light"] .saas-plan,html[data-bs-theme="light"] .saas-plan__price,html[data-bs-theme="light"] .saas-subscription-summary__stats article,html[data-bs-theme="light"] .saas-server__kpis article,html[data-bs-theme="light"] .saas-server__chart-card,html[data-bs-theme="light"] .saas-server__details,html[data-bs-theme="light"] .saas-dashboard-chart__legend>div{background:linear-gradient(145deg,#FFFFFF 0%,#F8FAFC 100%)}

html[data-bs-theme="dark"]{
    color-scheme:dark;
    --saas-bg:#081E32;
    --saas-surface:#102A43;
    --saas-surface-2:#153650;
    --saas-line:#2D4E67;
    --saas-text:#F8FAFC;
    --saas-muted:#B7C7D5;
}
html[data-bs-theme="dark"] .saas-app,html[data-bs-theme="dark"] .saas-auth{
    color:var(--saas-text);
    background:radial-gradient(circle at 94% -10%,rgba(255,87,33,.14),transparent 31rem),radial-gradient(circle at 4% 2%,rgba(55,113,158,.26),transparent 37rem),linear-gradient(145deg,#081E32 0%,#0B2137 62%,#102A43 100%);
}
html[data-bs-theme="dark"] .saas-side{background:linear-gradient(180deg,#102A43 0%,#071A2C 100%);box-shadow:12px 0 32px rgba(0,0,0,.18)}
html[data-bs-theme="dark"] .saas-auth__card,html[data-bs-theme="dark"] .saas-card,html[data-bs-theme="dark"] .saas-modal{color:var(--saas-text);border-color:var(--saas-line);background:linear-gradient(145deg,#143753 0%,#102A43 55%,#0B2137 100%);box-shadow:0 20px 48px rgba(0,0,0,.24)}
html[data-bs-theme="dark"] .saas-card__head,html[data-bs-theme="dark"] .saas-modal .modal-header,html[data-bs-theme="dark"] .saas-modal .modal-footer{border-color:var(--saas-line)}
html[data-bs-theme="dark"] .saas-card p,html[data-bs-theme="dark"] .saas-auth__intro p,html[data-bs-theme="dark"] .saas-auth__hint,html[data-bs-theme="dark"] .saas-modal small,html[data-bs-theme="dark"] .saas-empty p{color:var(--saas-muted)}
html[data-bs-theme="dark"] .saas-eyebrow{color:#FFAB91}
html[data-bs-theme="dark"] .saas-auth__features{color:#D4E0E9}html[data-bs-theme="dark"] .saas-auth label,html[data-bs-theme="dark"] .saas-modal label{color:#EAF1F6}html[data-bs-theme="dark"] .saas-modal h6{color:#FFAB91}html[data-bs-theme="dark"] .saas-checks label{color:#EAF1F6;background:#0B2137;border-color:#42667F}

html[data-bs-theme="dark"] .saas-theme-toggle{color:#EAF1F6;border-color:#42667F;background:rgba(16,42,67,.78);box-shadow:0 6px 18px rgba(0,0,0,.2)}
html[data-bs-theme="dark"] .saas-theme-toggle:hover{color:#FFFFFF;border-color:#FF5721;background:#1A3B56}
html[data-bs-theme="dark"] .saas-app .btn-outline-info,html[data-bs-theme="dark"] .saas-auth .btn-outline-info{color:#EAF1F6;border-color:#66849A;background:transparent}
html[data-bs-theme="dark"] .saas-app .btn-outline-info:hover,html[data-bs-theme="dark"] .saas-app .btn-outline-info:focus,html[data-bs-theme="dark"] .saas-auth .btn-outline-info:hover,html[data-bs-theme="dark"] .saas-auth .btn-outline-info:focus{color:var(--saas-on-accent);background:#FF5721;border-color:#FF5721}
html[data-bs-theme="dark"] .saas-app .btn-outline-light,html[data-bs-theme="dark"] .saas-auth .btn-outline-light,html[data-bs-theme="dark"] .saas-auth .btn-outline-secondary{color:#EAF1F6;border-color:#42667F;background:transparent}
html[data-bs-theme="dark"] .saas-app .btn-outline-light:hover,html[data-bs-theme="dark"] .saas-auth .btn-outline-light:hover,html[data-bs-theme="dark"] .saas-auth .btn-outline-secondary:hover{color:#FFFFFF;border-color:#365E7C;background:#1A3B56}

html[data-bs-theme="dark"] .saas-auth .form-control,html[data-bs-theme="dark"] .saas-auth .btn-outline-secondary,html[data-bs-theme="dark"] .saas-modal .form-control,html[data-bs-theme="dark"] .saas-modal .form-select,html[data-bs-theme="dark"] .saas-card .form-control,html[data-bs-theme="dark"] .saas-card .form-select,html[data-bs-theme="dark"] .saas-card textarea.form-control{color:#F4F8FB;background:#0B2137;border-color:#42667F}
html[data-bs-theme="dark"] .saas-auth .form-control::placeholder,html[data-bs-theme="dark"] .saas-modal .form-control::placeholder,html[data-bs-theme="dark"] .saas-card .form-control::placeholder,html[data-bs-theme="dark"] .saas-card textarea.form-control::placeholder{color:#9FB4C5}
html[data-bs-theme="dark"] .saas-auth .form-control:focus,html[data-bs-theme="dark"] .saas-modal .form-control:focus,html[data-bs-theme="dark"] .saas-modal .form-select:focus,html[data-bs-theme="dark"] .saas-card .form-control:focus,html[data-bs-theme="dark"] .saas-card .form-select:focus,html[data-bs-theme="dark"] .saas-card textarea.form-control:focus{color:#FFFFFF;background:#0B2137;border-color:#FF5721;box-shadow:0 0 0 .22rem rgba(255,87,33,.22)}
html[data-bs-theme="dark"] .saas-modal .form-select option,html[data-bs-theme="dark"] .saas-card .form-select option{color:#F4F8FB;background:#102A43}
html[data-bs-theme="dark"] .saas-card .form-check-input{border-color:#66849A;background-color:#0B2137}html[data-bs-theme="dark"] .saas-card .form-check-input:checked{border-color:#FF5721;background-color:#FF5721}
html[data-bs-theme="dark"] .saas-card .form-control:-webkit-autofill,html[data-bs-theme="dark"] .saas-card .form-control:-webkit-autofill:hover,html[data-bs-theme="dark"] .saas-card .form-control:-webkit-autofill:focus{-webkit-text-fill-color:#F4F8FB;-webkit-box-shadow:0 0 0 1000px #0B2137 inset}
html[data-bs-theme="dark"] .saas-app .input-group-text,html[data-bs-theme="dark"] .saas-auth .input-group-text{color:#FFAB91;background:#102A43;border-color:#42667F}html[data-bs-theme="dark"] .saas-app .border{border-color:var(--saas-line)!important}html[data-bs-theme="dark"] .saas-app .text-info{color:#B9D8EA!important}

html[data-bs-theme="dark"] .saas-kpis article,html[data-bs-theme="dark"] .saas-plan,html[data-bs-theme="dark"] .saas-plan__price,html[data-bs-theme="dark"] .saas-subscription-summary__stats article,html[data-bs-theme="dark"] .saas-server__kpis article,html[data-bs-theme="dark"] .saas-server__chart-card,html[data-bs-theme="dark"] .saas-server__details,html[data-bs-theme="dark"] .saas-dashboard-chart__legend>div{border-color:var(--saas-line);background:linear-gradient(145deg,rgba(25,61,89,.98),rgba(11,33,55,.98))}
html[data-bs-theme="dark"] .saas-kpis strong,html[data-bs-theme="dark"] .saas-plan__price b,html[data-bs-theme="dark"] .saas-plan__price strong,html[data-bs-theme="dark"] .saas-subscription-summary__stats strong,html[data-bs-theme="dark"] .saas-server__kpis strong,html[data-bs-theme="dark"] .saas-server__details h3,html[data-bs-theme="dark"] .saas-dashboard-chart__legend b{color:#F8FAFC}
html[data-bs-theme="dark"] .saas-kpis span,html[data-bs-theme="dark"] .saas-kpis small,html[data-bs-theme="dark"] .saas-plan__price span,html[data-bs-theme="dark"] .saas-plan ul,html[data-bs-theme="dark"] .saas-subscription-summary__stats span,html[data-bs-theme="dark"] .saas-subscription-summary__stats small,html[data-bs-theme="dark"] .saas-server__kpis span,html[data-bs-theme="dark"] .saas-server__kpis small,html[data-bs-theme="dark"] .saas-server__chart-head small,html[data-bs-theme="dark"] .saas-server__details dt{color:#B7C7D5}html[data-bs-theme="dark"] .saas-server__details dd{color:#F8FAFC}html[data-bs-theme="dark"] .saas-subscription-summary__stats span i,html[data-bs-theme="dark"] .saas-server__kpis span i{color:#FFAB91}
html[data-bs-theme="dark"] .saas-plan>strong,html[data-bs-theme="dark"] .saas-plan__price--primary strong{color:#FFAB91}html[data-bs-theme="dark"] .saas-plan__price--primary{border-color:#496A80;background:linear-gradient(145deg,#173E5B,#102A43)}html[data-bs-theme="dark"] .saas-plan__price--primary span{color:#D6E7F1}

html[data-bs-theme="dark"] .saas-table{--bs-table-bg:transparent;--bs-table-color:#EAF1F6;--bs-table-border-color:var(--saas-line)}html[data-bs-theme="dark"] .saas-table th{color:#B7C7D5}html[data-bs-theme="dark"] .saas-table td small{color:#A8BBCB}html[data-bs-theme="dark"] .saas-table a{color:#B9D8EA}
html[data-bs-theme="dark"] .saas-chip,html[data-bs-theme="dark"] .saas-status{color:#D5E5F0;background:#1A3D58}html[data-bs-theme="dark"] .saas-chip--muted{color:#C1CED8;background:#294257}html[data-bs-theme="dark"] .saas-status--success{color:#BBF7D0;background:#14532D}html[data-bs-theme="dark"] .saas-status--info{color:#CFE7F5;background:#1B4964}html[data-bs-theme="dark"] .saas-status--danger{color:#FECACA;background:#7F1D1D}html[data-bs-theme="dark"] .saas-status--warning{color:#FED7AA;background:#7C2D12}
html[data-bs-theme="dark"] .saas-entorno{color:#D4E0E9;border-color:#42667F;background:#193A55}html[data-bs-theme="dark"] .saas-entorno--production{color:#BBF7D0;border-color:#237A4D;background:#14532D}html[data-bs-theme="dark"] .saas-entorno--demo{color:#FED7AA;border-color:#A94A16;background:#7C2D12}
html[data-bs-theme="dark"] .saas-sunat-alerta{color:#C6D5E0;border-color:#42667F;background:#153650}html[data-bs-theme="dark"] .saas-sunat-alerta b{background:#48667C}html[data-bs-theme="dark"] .saas-sunat-alerta.has-alert{color:#FECACA;border-color:#B94343;background:#5E1F2B}

html[data-bs-theme="dark"] .saas-dashboard-chart__head{border-color:var(--saas-line)}html[data-bs-theme="dark"] .saas-dashboard-chart__head>strong{color:#DCEAF5;border-color:#496A80;background:#173953}html[data-bs-theme="dark"] .saas-dashboard-chart__grid{stroke:#31546E}html[data-bs-theme="dark"] .saas-dashboard-chart__axis,html[data-bs-theme="dark"] .saas-dashboard-chart__month,html[data-bs-theme="dark"] .saas-dashboard-chart__empty,html[data-bs-theme="dark"] .saas-dashboard-chart__donut small,html[data-bs-theme="dark"] .saas-dashboard-chart__legend small{fill:#AFC0CE;color:#AFC0CE}html[data-bs-theme="dark"] .saas-dashboard-chart__bar{fill:#FF5721}html[data-bs-theme="dark"] .saas-dashboard-chart__donut{box-shadow:inset 0 0 0 1px #31546E}html[data-bs-theme="dark"] .saas-dashboard-chart__donut>div{background:#102A43;box-shadow:0 0 0 1px #42667F}html[data-bs-theme="dark"] .saas-dashboard-chart__donut strong{color:#F8FAFC}html[data-bs-theme="dark"] .saas-dashboard-chart__empty i{color:#FFAB91}

html[data-bs-theme="dark"] .saas-server__notice{color:#B9D8EA;border-color:#42667F;background:#173953}html[data-bs-theme="dark"] .saas-server__notice.is-ok{color:#BBF7D0;border-color:#237A4D;background:#14532D}html[data-bs-theme="dark"] .saas-server__notice.is-warning{color:#FED7AA;border-color:#A94A16;background:#7C2D12}html[data-bs-theme="dark"] .saas-server__chart-grid{stroke:#31546E}html[data-bs-theme="dark"] .saas-server__chart-label{fill:#AFC0CE}html[data-bs-theme="dark"] .saas-server__details dl>div{border-color:#2D4E67}
html[data-bs-theme="dark"] .saas-client-actions .dropdown-menu{border-color:#42667F;background:#102A43;box-shadow:0 16px 35px rgba(0,0,0,.35)}html[data-bs-theme="dark"] .saas-client-actions .dropdown-item{color:#EAF1F6}html[data-bs-theme="dark"] .saas-client-actions .dropdown-item i{color:#FFAB91}html[data-bs-theme="dark"] .saas-client-actions .dropdown-item:hover,html[data-bs-theme="dark"] .saas-client-actions .dropdown-item:focus{color:#FFFFFF;background:#1A3D58}html[data-bs-theme="dark"] .saas-client-actions .dropdown-item.text-warning,html[data-bs-theme="dark"] .saas-client-actions .dropdown-item.text-warning i{color:#FED7AA!important}html[data-bs-theme="dark"] .saas-client-actions .dropdown-item.text-success,html[data-bs-theme="dark"] .saas-client-actions .dropdown-item.text-success i{color:#BBF7D0!important}html[data-bs-theme="dark"] .saas-client-actions .dropdown-item.text-danger,html[data-bs-theme="dark"] .saas-client-actions .dropdown-item.text-danger i{color:#FECACA!important}html[data-bs-theme="dark"] .saas-client-actions .dropdown-divider{border-color:#2D4E67}

html[data-bs-theme="dark"] .saas-app .swal2-container{background:rgba(2,12,22,.64)}html[data-bs-theme="dark"] .saas-app .swal2-popup{color:#F8FAFC;border-color:#42667F;background:linear-gradient(145deg,#153650,#0B2137);box-shadow:0 28px 80px rgba(0,0,0,.48)}html[data-bs-theme="dark"] .saas-app .swal2-title,html[data-bs-theme="dark"] .saas-app .swal2-html-container b{color:#F8FAFC}html[data-bs-theme="dark"] .saas-app .swal2-html-container{color:#B7C7D5}html[data-bs-theme="dark"] .saas-app .swal2-styled.swal2-cancel{color:#EAF1F6;background:#29465D}html[data-bs-theme="dark"] .saas-app .swal2-close{color:#B7C7D5}html[data-bs-theme="dark"] .saas-app .swal2-close:hover{color:#FFFFFF}html[data-bs-theme="dark"] .saas-modal .btn-close{filter:invert(1) grayscale(1) brightness(2)}
html[data-bs-theme="dark"] .saas-form-error{color:#FECACA;border-color:#B91C1C;background:#7F1D1D}html[data-bs-theme="dark"] .saas-mobile-menu{color:#EAF1F6;border-color:#42667F;background:#102A43}html[data-bs-theme="dark"] .saas-nav-backdrop{background:rgba(2,12,22,.58)}
html[data-bs-theme="dark"] .saas-card .table-responsive{border-color:var(--saas-line);scrollbar-color:#42667F #0B2137}html[data-bs-theme="dark"] .saas-card .table-responsive::-webkit-scrollbar-thumb{background:#42667F}

@media(max-width:850px){html[data-bs-theme="dark"] .saas-modal .modal-footer{background:#102A43}}
@media(max-width:575px){.saas-top .btn.saas-theme-toggle:not(.d-none){grid-column:auto;width:auto;padding:.5rem .65rem}.saas-top>.d-flex{flex-wrap:wrap;justify-content:flex-end}.saas-theme-toggle__label{display:none}.saas-theme-toggle--auth{top:12px;right:12px}}
@media(prefers-reduced-motion:reduce){.saas-theme-toggle{transition:none}.saas-theme-toggle:hover{transform:none}}
