.app-theme-toggle {
    padding:.4rem .8rem; border:1px solid #64748b; border-radius:8px;
    background:#fff; color:#24364b; font:inherit; font-size:.85rem; cursor:pointer;
}
.app-theme-toggle:focus-visible { outline:3px solid #ed7a1a; outline-offset:3px; }
.app-theme-toggle .app-theme-moon { display:block; flex-shrink:0; width:20px; height:20px; }
html[data-gipam-theme="dark"] {
    color-scheme:dark;
    --gipam-primary:#ff9c4c; --gipam-primary-dark:#ffb475;
    --gipam-primary-soft:#38291e; --gipam-ink:#e2e8f0;
    --gipam-muted:#a8b6c8; --gipam-border:#39465a; --gipam-surface:#1c2738;
    --bs-body-bg:#121b29; --bs-body-color:#e2e8f0; --bs-border-color:#39465a;
    --bs-secondary-color:#a8b6c8; --bs-tertiary-bg:#243247;
}
html[data-gipam-theme="dark"] body {
    background:#121b29 !important; background-image:none !important; color:#e2e8f0;
}
html[data-gipam-theme="dark"] :is(.app-navbar,.app-context-bar,.dropdown-menu,.card,.modal-content,.login-card,.pa-editor,.pa-listado,.orundes_marco,.orundes_1,#orundes_cuerpo,.ui-dialog,.ui-widget-content,.swal2-popup) {
    background:#1c2738 !important; color:#e2e8f0 !important; border-color:#39465a !important;
}
html[data-gipam-theme="dark"] :is(.prestaciones-admin,.pa-cabecera p,.pa-tabs a,.app-navbar .nav-link,.app-navbar .dropdown-item,.app-action-link,.app-breadcrumb,.app-last-access,.app-user-copy small,.text-muted,.text-secondary,.text-dark,.text-body,.form-label,.form-check-label) {
    color:#c6d2e2 !important;
}
html[data-gipam-theme="dark"] :is(.app-navbar .nav-link,.dropdown-item,.pa-tabs a):is(:hover,:focus),
html[data-gipam-theme="dark"] .dropdown-item.active { background:#31435c !important; color:#fff !important; }
html[data-gipam-theme="dark"] :is(.form-control,.form-select,.input-group-text,input:not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),select,textarea,.app-theme-toggle) {
    background-color:#172233 !important; color:#e2e8f0 !important; border-color:#52627a !important;
}
html[data-gipam-theme="dark"] :is(input,textarea)::placeholder { color:#a8b6c8 !important; opacity:1; }
html[data-gipam-theme="dark"] :is(input,select,textarea):disabled { background-color:#2b3545 !important; color:#a8b6c8 !important; }
html[data-gipam-theme="dark"] :is(input,select,textarea)[readonly] { background-color:#243247 !important; }
html[data-gipam-theme="dark"] .table {
    --bs-table-bg:#1c2738; --bs-table-color:#e2e8f0; --bs-table-border-color:#39465a;
    --bs-table-striped-bg:#243247; --bs-table-striped-color:#e2e8f0;
    --bs-table-hover-bg:#30415a; --bs-table-hover-color:#fff;
}
html[data-gipam-theme="dark"] :is(th,.pa-listado th) { background-color:#26364d !important; color:#e2e8f0 !important; }
html[data-gipam-theme="dark"] td { color:#e2e8f0; border-color:#39465a; }
html[data-gipam-theme="dark"] :is(.bg-white,.bg-light,.card-header,.card-footer,.page-link,.ui-widget-header) { background-color:#243247 !important; color:#e2e8f0 !important; border-color:#39465a !important; }
html[data-gipam-theme="dark"] a:not(.btn):not(.badge):not(.nav-link):not(.dropdown-item):not(.app-brand):not(.app-action-link):not(.app-support-link) { color:#91bfff; }
html[data-gipam-theme="dark"] .btn-outline-secondary { color:#c6d2e2; border-color:#7d8da3; }
@media (max-width:575.98px) {
    .app-session .app-session-actions {
        grid-template-columns:44px minmax(0,1.35fr) minmax(0,.8fr) 44px minmax(0,1fr);
    }
}
