/* Optional institutional screen theme. Keep original artwork and printed documents intact. */
.adison-appearance { padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid #dce1e6; }
.adison-theme-toggle { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 6px 14px; border: 0; border-radius: 3px; background: transparent; color: #34465b; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.adison-theme-toggle[hidden] { display: none; }
.adison-theme-toggle:hover { background: #e7edf3; }
.adison-theme-toggle:focus-visible { outline: 3px solid #557fa9; outline-offset: 3px; }
@media screen {
    /* The bundled SweetAlert2 uses .swal2-modal and an inline white background. */
    html[data-adison-theme="dark"] .swal2-modal { background: var(--ad-surface) !important; color: var(--ad-text); border: 1px solid var(--ad-border); }
    html[data-adison-theme="dark"] .swal2-modal :is(.swal2-title, .swal2-content, .swal2-checkbox, .swal2-radio) { color: var(--ad-text); }
    html[data-adison-theme="dark"] .swal2-modal .swal2-success::before,
    html[data-adison-theme="dark"] .swal2-modal .swal2-success::after,
    html[data-adison-theme="dark"] .swal2-modal .swal2-success .fix { background: var(--ad-surface); }
    html[data-adison-theme="dark"] .swal2-modal :is(.swal2-textarea, .swal2-file) { background: var(--ad-bg); color: var(--ad-text); border-color: var(--ad-border); }
    html[data-adison-theme="dark"] .swal2-modal :is(.swal2-input, .swal2-textarea)::placeholder { color: var(--ad-muted); }
    html[data-adison-theme="dark"] .swal2-modal .swal2-validationerror { background: var(--ad-raised); color: var(--ad-text); }
    html[data-adison-theme="dark"] .swal2-modal .swal2-close { color: var(--ad-muted); }
    html[data-adison-theme="dark"] .swal2-modal .swal2-close:hover { color: var(--ad-text); }
    html[data-adison-theme="dark"] .swal2-modal .swal2-styled:not(.swal2-loading) { background-color: var(--ad-action) !important; color: #fff; }
    html[data-adison-theme="dark"] .swal2-modal .swal2-cancel.swal2-styled:not(.swal2-loading) { background-color: var(--ad-raised) !important; color: var(--ad-text); }
    html[data-adison-theme="dark"] .swal2-modal :is(button, input, textarea, select):focus-visible { outline: 3px solid var(--ad-link); outline-offset: 3px; }
    html[data-adison-theme="dark"] {
        color-scheme: dark;
        --ad-bg: #141b24;
        --ad-surface: #1d2733;
        --ad-raised: #263342;
        --ad-hover: #304258;
        --ad-border: #536274;
        --ad-text: #edf0f4;
        --ad-muted: #bcc7d3;
        --ad-link: #b8d3ed;
        --ad-action: #365c82;
        background: var(--ad-bg);
        scrollbar-color: #718095 var(--ad-bg);
    }
    html[data-adison-theme="dark"] body,
    html[data-adison-theme="dark"] :is(#wrapper, #content, .content-wrap) { background-color: var(--ad-bg); color: var(--ad-text); }
    html[data-adison-theme="dark"] :is(.adison-appearance, #header, #header-wrap, #page-title, .section, .card, .card-body, .card-header, .card-footer, .panel, .panel-body, .panel-heading, .well, .list-group-item, .modal-content, .dropdown-menu, .top-cart-content, .tabs-bordered .tab-container, .toggle .togglec, .accordion .acc_content, .swal2-popup, .datepicker, .daterangepicker) { background-color: var(--ad-surface); color: var(--ad-text); border-color: var(--ad-border); }
    html[data-adison-theme="dark"] :is(h1, h2, h3, h4, h5, h6, label, legend, .acctitle, .acctitlec, .togglet, .toggleta, .swal2-title, .swal2-content, .swal2-html-container) { color: var(--ad-text); }
    html[data-adison-theme="dark"] #page-title :is(h1, h2) { color: var(--ad-text); }
    html[data-adison-theme="dark"] .fancy-title.title-border-color::before { border-color: var(--ad-border); }
    html[data-adison-theme="dark"] #primary-menu-trigger { background-color: var(--ad-surface); border-radius: 3px; }
    html[data-adison-theme="dark"] a { color: var(--ad-link); }
    html[data-adison-theme="dark"] a:hover { color: #e2efff; }
    html[data-adison-theme="dark"] :is(.text-muted, .text-secondary, .help-block, .breadcrumb, .breadcrumb-item.active, #page-title span, .form-text) { color: var(--ad-muted) !important; }
    html[data-adison-theme="dark"] :is(.text-dark, .text-body, .text-black-50) { color: var(--ad-text) !important; }
    html[data-adison-theme="dark"] :is(.bg-white, .bg-light, .bg-light-gray) { background-color: var(--ad-surface) !important; }
    html[data-adison-theme="dark"] :is(hr, .modal-header, .modal-footer, .top-cart-title, .top-cart-item, .divider, .border, .border-bottom, .border-top, .border-left, .border-right) { border-color: var(--ad-border) !important; }
    html[data-adison-theme="dark"] :is(.divider::after, .divider::before, .fancy-title::before) { border-color: var(--ad-border); }
    html[data-adison-theme="dark"] .fancy-title :is(h1, h2, h3, h4, h5, h6) { background-color: var(--ad-surface); }
    html[data-adison-theme="dark"] :is(#primary-menu ul ul, #primary-menu ul ul li a, #primary-menu .mega-menu-content, #primary-menu ul li:hover > a, #primary-menu ul li.current > a) { background-color: var(--ad-raised); color: var(--ad-text); border-color: var(--ad-border); }
    html[data-adison-theme="dark"] :is(#primary-menu ul li a, #primary-menu-trigger, #top-cart-trigger, .top-cart-item-desc a, .dropdown-item, .close) { color: var(--ad-text); text-shadow: none; }
    html[data-adison-theme="dark"] :is(.dropdown-item:hover, .dropdown-item:focus, .list-group-item-action:hover, #primary-menu ul ul li:hover > a) { background-color: var(--ad-hover); color: #fff; }
    /* Use the existing transparent institutional artwork for dark headers. */
    html[data-adison-theme="dark"] #top-cart .top-cart-content { background-color: var(--ad-surface); color: var(--ad-text); border-color: var(--ad-border); }
    html[data-adison-theme="dark"] #logo { border-color: var(--ad-border); }
    html[data-adison-theme="dark"] #logo .standard-logo img { content: url("/images/logo-dark.png"); }
    html[data-adison-theme="dark"] #logo .retina-logo img { content: url("/images/logo-dark@2x.png"); }
    html[data-adison-theme="dark"] #footer { background-color: #111923; color: var(--ad-muted); border-color: var(--ad-border); }
    html[data-adison-theme="dark"] .adison-theme-toggle { background: var(--ad-raised); color: var(--ad-text); border-color: var(--ad-border); }
    html[data-adison-theme="dark"] .adison-theme-toggle:hover { background: var(--ad-hover); }
    html[data-adison-theme="dark"] :is(.form-control, .sm-form-control, .custom-select, .input-group-text, .select2-dropdown, .select2-container--default .select2-selection--single, .select2-container--default .select2-selection--multiple, .select2-search__field, .swal2-input, .swal2-select) { background-color: var(--ad-bg); color: var(--ad-text); border-color: var(--ad-border); }
    html[data-adison-theme="dark"] :is(.form-control, .sm-form-control)::placeholder { color: var(--ad-muted); opacity: 1; }
    html[data-adison-theme="dark"] :is(.form-control, .sm-form-control):focus { background-color: var(--ad-bg); color: #fff; border-color: #a7c7e8; box-shadow: 0 0 0 3px rgb(167 199 232 / 22%); }
    html[data-adison-theme="dark"] :is(.form-control:disabled, .form-control[readonly], .select2-container--default.select2-container--disabled .select2-selection--single) { background-color: var(--ad-raised); color: var(--ad-muted); }
    html[data-adison-theme="dark"] :is(.select2-container--default .select2-selection--single .select2-selection__rendered, .select2-selection__placeholder, .select2-results__option) { color: var(--ad-text); }
    html[data-adison-theme="dark"] :is(.select2-container--default .select2-results__option[aria-selected=true], .select2-selection__choice) { background-color: var(--ad-raised); color: var(--ad-text); }
    html[data-adison-theme="dark"] .select2-container--default .select2-results__option--highlighted[aria-selected] { background-color: var(--ad-action); color: #fff; }
    html[data-adison-theme="dark"] :is(.button, .btn-primary, .btn-info, .page-item.active .page-link) { background-color: var(--ad-action); color: #fff; border-color: #6d8cad; text-shadow: none; }
    html[data-adison-theme="dark"] :is(.button:hover, .btn-primary:hover, .btn-info:hover) { background-color: #446f9a; color: #fff; }
    html[data-adison-theme="dark"] :is(.button-white, .btn-light, .btn-default, .btn-secondary, .page-link, .nav-tabs .nav-link, ul.tab-nav li a) { background-color: var(--ad-raised); color: var(--ad-text) !important; border-color: var(--ad-border); }
    html[data-adison-theme="dark"] :is(.nav-tabs .nav-link.active, ul.tab-nav li.ui-tabs-active a, .page-link:hover) { background-color: var(--ad-hover); color: #fff; border-color: var(--ad-border); }
    html[data-adison-theme="dark"] .page-item.disabled .page-link { background-color: var(--ad-surface); color: var(--ad-muted); border-color: var(--ad-border); }
    html[data-adison-theme="dark"] .table { color: var(--ad-text); background-color: var(--ad-surface); }
    html[data-adison-theme="dark"] :is(.table th, .table td, .table thead th, .table-bordered) { border-color: var(--ad-border); }
    html[data-adison-theme="dark"] :is(.table thead, .table .thead-light th, .table .thead-dark th) { background-color: var(--ad-raised); color: var(--ad-text); }
    html[data-adison-theme="dark"] .table-striped tbody tr:nth-of-type(odd) { background-color: #243140; }
    html[data-adison-theme="dark"] .table-striped tbody tr:nth-of-type(even) { background-color: var(--ad-surface); }
    html[data-adison-theme="dark"] .table-hover tbody tr:hover { background-color: var(--ad-hover); color: #fff; }
    html[data-adison-theme="dark"] :is(.alert-info, .alert-primary) { background-color: #20394e; color: #d3e8fa; border-color: #6385a1; }
    html[data-adison-theme="dark"] .alert-success { background-color: #203c32; color: #c5ead4; border-color: #608c72; }
    html[data-adison-theme="dark"] .alert-warning { background-color: #423921; color: #f4dfad; border-color: #a58a50; }
    html[data-adison-theme="dark"] .alert-danger { background-color: #492c34; color: #f8ced4; border-color: #b17782; }
    html[data-adison-theme="dark"] :is(.text-danger, .invalid-feedback) { color: #f5aeb9 !important; }
    html[data-adison-theme="dark"] :is(.table-success, .table-success > td, .table-success > th) { background-color: #203c32; color: #c5ead4; }
    html[data-adison-theme="dark"] :is(.table-warning, .table-warning > td, .table-warning > th) { background-color: #423921; color: #f4dfad; }
    html[data-adison-theme="dark"] :is(.table-danger, .table-danger > td, .table-danger > th) { background-color: #492c34; color: #f8ced4; }
    html[data-adison-theme="dark"] :is(.button-red, .btn-danger) { background-color: #803f4b; color: #fff; border-color: #b17782; }
    html[data-adison-theme="dark"] :is(.button-green, .btn-success) { background-color: #2c6147; color: #fff; border-color: #608c72; }
    html[data-adison-theme="dark"] .text-success { color: #a9dfbf !important; }
    html[data-adison-theme="dark"] .text-warning { color: #efd29b !important; }
    html[data-adison-theme="dark"] :is(.text-primary, .text-info) { color: var(--ad-link) !important; }
    html[data-adison-theme="dark"] :is(.datepicker table tr td.day:hover, .daterangepicker td.available:hover, .daterangepicker th.available:hover) { background-color: var(--ad-hover); }
    html[data-adison-theme="dark"] .daterangepicker .calendar-table { background-color: var(--ad-surface); border-color: var(--ad-border); }
    html[data-adison-theme="dark"] .daterangepicker td.off { background-color: var(--ad-bg); color: var(--ad-muted); }
    html[data-adison-theme="dark"] :focus-visible { outline: 3px solid #a7c7e8; outline-offset: 3px; }
    html[data-adison-theme="dark"] #header.full-header { border-bottom-color: var(--ad-border); }
    html[data-adison-theme="dark"] #page-title { background-color: var(--ad-bg); border-bottom-color: #354354; }
    html[data-adison-theme="dark"] #page-title.page-title-mini { padding: 16px 0; }
    /* Profile components define their own light colors; override them explicitly. */
    html[data-adison-theme="dark"] #perfil-usuario :is(.perfil-identity, .perfil-signature, .perfil-signature-actions) { background-color: var(--ad-surface); color: var(--ad-text); border-color: var(--ad-border); }
    html[data-adison-theme="dark"] #perfil-usuario :is(.perfil-identity, .perfil-signature) { border-top-color: #89a9cb; }
    html[data-adison-theme="dark"] #perfil-usuario :is(dd, .perfil-address p, .perfil-email) { color: var(--ad-text); }
    html[data-adison-theme="dark"] #perfil-usuario :is(dt, .perfil-caption, .perfil-address .perfil-location, summary) { color: var(--ad-muted); }
    html[data-adison-theme="dark"] #perfil-usuario :is(.perfil-security, .perfil-address, .perfil-certificate) { border-color: var(--ad-border); }
    html[data-adison-theme="dark"] #perfil-usuario .perfil-portrait { background-color: var(--ad-raised); border-color: var(--ad-raised); box-shadow: 0 0 0 1px var(--ad-border); }
    html[data-adison-theme="dark"] #perfil-usuario .perfil-initials { color: var(--ad-text); }
    html[data-adison-theme="dark"] #perfil-usuario .perfil-action { background-color: var(--ad-raised); color: var(--ad-text); border-color: var(--ad-border); }
    html[data-adison-theme="dark"] #perfil-usuario .perfil-action:hover { background-color: var(--ad-hover); color: #fff; }
    html[data-adison-theme="dark"] :is(#perfil-usuario, .perfil-modal) .perfil-primary { background-color: var(--ad-action); color: #fff; }
    html[data-adison-theme="dark"] :is(#perfil-usuario, .perfil-modal) .perfil-primary:hover { background-color: #446f9a; color: #fff; }
    html[data-adison-theme="dark"] #perfil-usuario .badge-success { background-color: #203c32; color: #c5ead4; }
    html[data-adison-theme="dark"] #perfil-usuario .badge-warning { background-color: #423921; color: #f4dfad; }
    html[data-adison-theme="dark"] #perfil-usuario .badge-danger { background-color: #492c34; color: #f8ced4; }
    html[data-adison-theme="dark"] .perfil-modal .modal-header { background-color: var(--ad-raised); color: var(--ad-text); }
    html[data-adison-theme="dark"] .perfil-modal .perfil-feedback { color: #f5aeb9; }
    html[data-adison-theme="dark"] :is(#perfil-usuario, .perfil-modal) :is(.button, a, summary, button):focus-visible { outline-color: #a7c7e8; }
    /* Keep the registered signature on its original paper background, without filters. */
    html[data-adison-theme="dark"] #header.sticky-header #header-wrap { background-color: var(--ad-surface); border-color: var(--ad-border); }
    html[data-adison-theme="dark"] ::selection { background: #496889; color: #fff; }
}
@media (max-width: 575.98px) { .adison-theme-toggle { min-height: 44px; } }
@media print { .adison-appearance { display: none !important; } }

/* Compact the desktop navigation without changing the existing sticky/mobile behavior. */
@media screen and (min-width: 992px) {
    #header.full-header:not(.sticky-header),
    #header.full-header:not(.sticky-header) #header-wrap,
    #header.full-header:not(.sticky-header) #logo img { height: 80px; }
    #header.full-header:not(.sticky-header) #primary-menu > ul > li > a { padding-top: 29px; padding-bottom: 29px; }
    #header.full-header:not(.sticky-header) :is(#top-cart, #top-notificacion) { margin-top: 30px; margin-bottom: 30px; }
    #header.full-header:not(.sticky-header) :is(#top-cart, #top-notificacion) .top-cart-content { top: 50px; }
}
