/* ---------------- Animations ---------------- */
.fade-in {
    animation: fadeIn ease 5s;
    -webkit-animation: fadeIn ease 5s;
    -moz-animation: fadeIn ease 5s;
    -o-animation: fadeIn ease 5s;
    -ms-animation: fadeIn ease 5s;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@-moz-keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@-webkit-keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@-o-keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@-ms-keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

/* ---------------- Base ---------------- */
body {
    /* The product's typeface, from app/base/tokens.css - change it there, in
       one place, rather than here. The fallback repeats the old hard-coded
       stack for the hosts that do not load tokens.css yet (LMS, QA). */
    font-family: var(--font-family-base, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif);
    margin: 0;
    padding: 0;
    background-color: var(--app-bg);
    color: var(--app-text);
    line-height: 1.6;
}

.app-main {
    background: radial-gradient(1200px 600px at 12% -10%, rgba(125,211,252,.28), transparent 60%), radial-gradient(1000px 520px at 88% -6%, rgba(167,139,250,.22), transparent 62%), radial-gradient(900px 520px at 50% 100%, rgba(253,186,116,.18), transparent 60%), radial-gradient(820px 420px at 18% 110%, rgba(152,216,170,.16), transparent 58%), linear-gradient(180deg, #ffffff, #fbfbff 35%, #f8fbff 70%, #ffffff);
}

header {
    color: var(--app-text);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.privacy-policy {
    float: right;
    font-size: 12px;
    color: var(--theme-text, #000);
    position: relative;
    right: 30px;
    bottom: 12px;
}

/* ---------------- Nav ---------------- */
nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0.5rem;
}

nav a {
    text-decoration: none;
    font-weight: 500;
/*    padding: 0.5rem 1rem;*/
    border-radius: 4px;
/*    transition: background-color 0.3s ease, color .2s ease;*/
    color: var(--app-text);
}

nav a:hover {
    background-color: var(--app-surface-2);
    color: var(--app-text);
}

/* Fixed top navbar */
.navbar {
    background: var(--app-surface-1) !important;
    height: 56px;
    width: 100%;
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
    z-index: 1000;
    justify-content: center;
    align-content: center;
}

/* AdminLTE sidebar wrapper � theme-aware */
.sidebar-wrapper {
    background: var(--app-surface-2);
    color: var(--app-text);
}

/* Sidebar links (keep it simple & readable) */
.nav-link {
    color: var(--app-text-muted) !important;
    padding: 5px !important;
}

.nav-link:hover,
.nav-link:focus {
    color: var(--app-text) !important;
    background-color: grey !important;
    color: red;
/*    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);*/
/*    transform: translateY(-2px);*/
}
/* Shared Confirm Modal */
.rp-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, .45);
    z-index: 9999;
    padding: 20px;
}

    .rp-modal.open {
        display: flex;
    }

.rp-modal-dialog {
    width: 100%;
    max-width: 760px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--app-surface, #fff);
    border-radius: var(--modal-radius, 16px);
    padding: 26px;
    box-shadow: 0 24px 48px rgba(0,0,0,.18);
}

.rp-modal-small {
    max-width: 620px;
}

.rp-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.rp-modal-title {
    color: var(--app-text, #0f172a);
    font-size: 22px;
    font-weight: 700;
}

.rp-modal-desc {
    color: var(--app-muted, #64748b);
    font-size: 15px;
    margin-top: 6px;
}

.rp-modal-close {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid var(--app-border, #d1d5db);
    background: var(--app-surface, #fff);
    font-size: 20px;
    cursor: pointer;
    color: var(--app-text, #0f172a);
}

.rp-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.rp-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 16px;
    border-radius: 10px;
    border: 1px solid var(--app-border, #e5e7eb);
    background: var(--app-surface, #fff);
    color: var(--app-text, #111827);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s ease;
}

    .rp-btn-outline:hover {
        background: var(--app-surface-2, #f9fafb);
        border-color: var(--theme-border-strong, var(--gray-300, #d1d5db));
    }

.rp-btn-dark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 16px;
    border-radius: 10px;
    border: 1px solid transparent;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s ease;
}

.rp-alert-danger {
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    border: 1px solid;
}

.rp-alert-danger-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.rp-alert-danger-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rp-alert-danger-title {
    font-weight: 600;
}

.rp-alert-danger-text {
    font-size: 13px;
}

/* Sometimes list items get hover bg from AdminLTE */
.navbar-nav li:hover {
    background-color: var(--app-surface-2) !important;
}

/* Links that previously forced black */
.text-decoration-none {
    color: var(--app-text);
}

/* ---------------- Sections / Cards ---------------- */
.section {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-start;
    width: 100%;
}

select, input {
    border: 1px solid lightgrey;
}

/* Narrow tile: fixed 380px */
.section-item-narrow {
    background: var(--app-surface-1);
    border: 3px solid var(--app-border);
    border-radius: 16px;
    padding: 16px 40px;
    position: relative;
    transition: transform .2s, box-shadow .2s;
    width: 380px; /* explicit width */
    flex: 0 0 380px; /* don't grow/shrink; basis 380 */
    height: 378px;
}

/* Wide tile: prefers 775px but can grow */
.section-item-wide {
    background: var(--app-surface-1);
    border: 3px solid var(--app-border);
    border-radius: 16px;
    padding: 16px 40px;
    position: relative;
    transition: transform .2s, box-shadow .2s;
    width: 775px; /* preferred width */
    flex: 1 1 775px; /* can grow/shrink around 775 */
    min-width: 600px; /* don�t squish too small on wide rows */
    height: 378px;
}

/* Relax min-width on medium screens */
@media (max-width: 1200px) {
    .section-item-wide {
        min-width: 0;
    }
}

/* Stack on small screens */
@media (max-width: 992px) {
    .section-item-narrow,
    .section-item-wide {
        flex: 1 1 100%;
        width: 100%;
        min-width: 0;
        height: auto;
    }
}


.section-item-narrow {
    width: 380px;
}

.section-item-wide {
    width: 775px;
}

.section-item-narrow:hover,
.section-item-wide:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.drag-handle {
    position: absolute;
    left: 8px;
    top: 24px;
    transform: translateY(-50%);
    width: 33px;
    height: 33px;
    display: flex;
    flex-direction: column !important; /* vertical */
    justify-content: center;
    align-items: center;
    gap: 4px; /* even spacing between dots */
    cursor: grab;
    padding: 4px;
    z-index: 1;
}

.drag-handle:active {
    cursor: grabbing;
}

/* Scope .dot to the handle so nothing else is affected */
.drag-handle .dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: var(--bs-border-color, lightgrey) !important; /* match border */
    display: block;
}

.section-item.sortable-ghost {
    opacity: 0.5;
    background: var(--app-surface-2);
}

.section-item.sortable-chosen {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: scale(1.02);
}

.card {
    border: 3px solid var(--light-border);
}

/* ---------------- Auth boxes ---------------- */
.login,
.register {
    max-width: 360px;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5) !important;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-content: center;
    justify-content: center;
    background: var(--app-surface-1);
    border: 3px solid var(--app-border);
    border-radius: 20px;
    margin: 120px auto;
    text-align: center;
}

.login {
    height: 360px;
}

.register {
    height: 420px;
}

.main-heading {
    text-align: center;
}

.container {
/*    padding: 90px 0 70px 0;*/
    max-width: 1600px;
}

/* ---------------- Buttons ---------------- */
/*.btn {
    display: inline-block;
    padding: 10px 20px;
    color: var(--app-on-primary, #fff);
    text-decoration: none;
    border-radius: 5px;
    background-color: var(--app-primary);
}*/

.btn-round {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background-color: var(--app-accent, #28a745); /* fallback if not defined */
    font-size: 14px;
    color: #fff;
    text-decoration: none;
    padding: 5px;
    margin: 0 auto;
}

    .btn-round:hover {
        /* a neutral hover that works in all themes */
        filter: brightness(0.95);
    }

/* Submit button style */
.btn-submit {
    align-items: center;
    appearance: none;
    background-color: var(--app-surface-1);
    border-radius: 4px;
    border: 0;
    box-shadow: rgba(45,35,66,0.4) 0 2px 4px, rgba(45,35,66,0.3) 0 7px 13px -3px, var(--app-border) 0 -3px 0 inset;
    box-sizing: border-box;
    color: var(--app-text);
    cursor: pointer;
    display: inline-flex;
    height: 48px;
    justify-content: center;
    line-height: 1;
    overflow: hidden;
    padding: 0 16px;
    position: relative;
    text-align: left;
    text-decoration: none;
    transition: box-shadow .15s, transform .15s;
    user-select: none;
    white-space: nowrap;
    font-size: 18px;
}

    .btn-submit:focus {
        box-shadow: var(--app-border) 0 0 0 1.5px inset, rgba(45,35,66,0.4) 0 2px 4px, rgba(45,35,66,0.3) 0 7px 13px -3px, var(--app-border) 0 -3px 0 inset;
    }

    .btn-submit:hover {
        box-shadow: rgba(45,35,66,0.4) 0 4px 8px, rgba(45,35,66,0.3) 0 7px 13px -3px, var(--app-border) 0 -3px 0 inset;
        transform: translateY(-2px);
    }

/* === THEME + LAYOUT HOTFIX (append at end) =============================== */
/* Theme tokens (--app-bg, --app-text, --app-surface-1/2) live in
   app/themes/themes.css. */

/* Base */
body {
    background: var(--app-bg);
    color: var(--app-text);
}

/* Header / Navbar */
.app-header.navbar,
.navbar {
    background: var(--app-surface-1) !important;
    color: var(--app-text) !important;
}

    .navbar .nav-link,
    .navbar .nav-link i {
        color: var(--app-text) !important;
    }

/* Sidebar */
.app-sidebar,
.sidebar-wrapper {
    background: var(--app-surface-2) !important;
    color: var(--app-text) !important;
}

    .app-sidebar .nav-link {
        color: var(--app-text) !important;
    }

        .app-sidebar .nav-link:hover {
            background: color-mix(in srgb, var(--app-text) 12%, transparent);
            color: #fff !important;
        }

/* ---------------- Footer ---------------- */
.app-footer {
    z-index: 10000;
    background: var(--app-surface-1) !important;
    color: var(--app-text) !important;
    border-top: 1px solid color-mix(in srgb, var(--app-text) 15%, transparent);
    height: 60px;
    margin: 0;
    padding: 0;
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100% !important;
    text-align: center !important;
/*    display: flex;*/
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
}

.copyright {
    text-align: center;
}
/* Dashboard layout */
.section {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
}

.section-item-narrow,
.section-item-wide {
    flex: 0 0 auto;
}

/* === PATCH 01: nav hover (light), primary buttons, input borders ========== */

/* Tokens (--app-primary, --app-border, --app-input-*, --app-hover-*)
   live in app/themes/themes.css. */

/* 1) Sidebar hover � LIGHT should not flicker or vanish */
[data-theme="light"] .app-sidebar .nav-link:hover,
[data-theme="light"] .app-sidebar .nav-link:focus {
    background-color: var(--app-hover-light) !important;
    color: var(--theme-text, #111) !important;
}

/* Sidebar hover � DARK & CALM */
[data-theme="dark"] .app-sidebar .nav-link:hover,
[data-theme="dark"] .app-sidebar .nav-link:focus,
[data-theme="calm"] .app-sidebar .nav-link:hover,
[data-theme="calm"] .app-sidebar .nav-link:focus {
    background-color: var(--app-hover-dark) !important;
    color: #fff !important;
}

/* Active item (all themes) */
.app-sidebar .nav-link.active {
    background-color: var(--app-primary) !important;
    color: #fff !important;
}

    .app-sidebar .nav-link.active i {
        color: #fff !important;
    }

/* 2) Buttons � force .btn-primary to be a filled button, not outline */
.btn-primary {
    background-color: var(--app-primary) !important;
    border-color: var(--app-primary) !important;
    color: #fff !important;
}

    .btn-primary:hover,
    .btn-primary:focus,
    .btn-primary:active {
        background-color: var(--app-primary-hover) !important;
        border-color: var(--app-primary-hover) !important;
        color: #fff !important;
    }

/* Base button focus ring + border */
.btn {
    border-color: var(--app-border) !important;
}

    .btn:focus {
        box-shadow: 0 0 0 .25rem rgba(13,110,253,.25);
    }

[data-theme="dark"] .btn:focus,
[data-theme="calm"] .btn:focus {
    box-shadow: 0 0 0 .25rem rgba(76,163,255,.22);
}

/* 3) Inputs � show borders in light mode, solid focus ring */
.form-control,
.form-select,
input[type="text"],
input[type="email"],
input[type="password"],
textarea {
    background-color: var(--app-input-bg) !important;
    color: var(--app-input-text) !important;
    border: 1px solid var(--app-border) !important;
}

    .form-control::placeholder {
        color: color-mix(in srgb, var(--app-text) 45%, transparent);
    }

    .form-control:focus,
    .form-select:focus,
    input[type="text"]:focus,
    input[type="email"]:focus,
    input[type="password"]:focus,
    textarea:focus {
        border-color: var(--app-primary) !important;
        outline: 0 !important;
        box-shadow: 0 0 0 .25rem rgba(13,110,253,.25) !important;
    }

/* Invalid fields (ASP.NET validation, aria-invalid). The rules above set every
   input border with !important from an attribute selector, which outranked
   pages' own .input-validation-error, so a field in error looked untouched. */
:is(.form-control, .form-select, input, textarea, select):is(.input-validation-error, [aria-invalid="true"]) {
    border-color: var(--app-danger, #dc2626) !important;
}

    :is(.form-control, .form-select, input, textarea, select):is(.input-validation-error, [aria-invalid="true"]):focus {
        border-color: var(--app-danger, #dc2626) !important;
        box-shadow: 0 0 0 3px rgba(220, 38, 38, .15) !important;
    }

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus,
[data-theme="calm"] .form-control:focus,
[data-theme="calm"] .form-select:focus {
    box-shadow: 0 0 0 .25rem rgba(76,163,255,.22) !important;
}

/* Top nav hover (independent from sidebar rules) */
.app-header.navbar .nav-link:hover,
.app-header.navbar .nav-link:focus {
    background: var(--app-surface-2) !important;
    color: var(--app-text) !important;
}

/* === PATCH: Circular gauges (size + no black fill) ======================= */
.circular-gauge,
.circular-gauge-attendance {
    position: relative;
    width: 150px;
    height: 150px;
}

    .circular-gauge .gauge-svg,
    .circular-gauge-attendance .gauge-svg {
        width: 100%;
        height: 100%;
        display: block;
        transform: rotate(-90deg); /* 12 o'clock start */
    }

        /* Kill any global icon fills inside our gauges, and lock stroke width */
        .circular-gauge .gauge-svg *,
        .circular-gauge-attendance .gauge-svg * {
            fill: none !important;
            vector-effect: non-scaling-stroke;
        }

    /* Track + progress rings */
    .circular-gauge .gauge-track,
    .circular-gauge-attendance .gauge-track {
        stroke: var(--app-border) !important;
        stroke-width: 8;
        opacity: .6;
    }

    .circular-gauge .gauge-progress,
    .circular-gauge-attendance .gauge-progress {
        stroke: var(--app-primary) !important;
        stroke-width: 8;
        stroke-linecap: round;
        transition: stroke-dashoffset .4s ease;
    }

    /* Center value label */
    .circular-gauge .gauge-value,
    .circular-gauge-attendance .gauge-value {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-size: 1.6rem;
        font-weight: 700;
        color: var(--app-text);
    }

.gauge-svg {
    width: 150px;
    height: 150px;
    transform: rotate(-90deg);
}

.gauge-track {
    fill: none;
    stroke-width: 8;
    stroke: color-mix(in srgb, var(--app-text) 15%, transparent);
}

.gauge-progress {
    fill: none;
    stroke-width: 8;
    stroke: var(--app-primary);
    stroke-linecap: butt; /* avoids tiny seam at 100% */
    transition: stroke-dashoffset .35s ease;
}

.gauge-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 600;
    color: var(--app-text);
}

.circular-gauge, .circular-gauge-attendance {
    position: relative;
    width: 150px;
    height: 150px;
}

.skip-link {
    background: none!important;
}

.lift {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
/*    transform: translateY(-2px);*/
}

.ee-tabs {
    gap: 30px;
}

/* Page-size ("Display N lines") dropdowns above tables. Many pages remove their outline, which
   hid keyboard focus, so Tab looked as if it skipped them. Keep a visible focus ring site-wide. */
.dataTables_length select:focus-visible,
.emp-length select:focus-visible {
    outline: 2px solid #2563eb !important;
    outline-offset: 2px;
}

/* Modal chrome stays fixed; only the content area owns scrollbars. */
.modal .modal-dialog { overflow-x: clip; }
.modal .modal-content {
    display: flex;
    flex-direction: column;
    max-height: calc(100dvh - 3.5rem);
    min-width: 0;
    border-radius: 20px !important;
    overflow: hidden !important;
}
.modal .modal-content > form {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    max-height: inherit;
    overflow: hidden;
}
.modal .modal-header, .modal .modal-footer {
    flex-shrink: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}
.modal .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    max-width: 100%;
    overflow: auto !important;
    overscroll-behavior: contain;
}
@media (max-width: 575.98px) {
    .modal .modal-dialog { max-width: calc(100vw - 1rem); }
    .modal .modal-content { max-height: calc(100dvh - 1rem); }
}

/* Subtle frosted surfaces across feature cards, menus and modal panels. */
:root { --synx-glass-surface: rgba(255, 255, 255, .88); --synx-glass-edge: rgba(148, 163, 184, .22); }
body.dark, [data-bs-theme="dark"] { --synx-glass-surface: rgba(30, 41, 59, .9); --synx-glass-edge: rgba(148, 163, 184, .25); }
@supports (backdrop-filter: blur(10px)) {
    :is(.card, .lm-card, .app-card, .recovery-card, .modal-content, .dropdown-menu,
        .stat-card, .stats-card, .summary-card, .dashboard-card, .emp-card, .department-card) {
        background-color: var(--synx-glass-surface) !important;
        backdrop-filter: blur(10px) saturate(110%);
        -webkit-backdrop-filter: blur(10px) saturate(110%);
        border-color: var(--synx-glass-edge);
        box-shadow: 0 2px 6px rgba(23, 36, 59, .025), 0 10px 30px rgba(23, 36, 59, .035);
    }
    /* Nested content stays quiet; dialogs retain enough elevation to stand apart. */
    .card .card { box-shadow: none; }
    .modal .modal-content { box-shadow: var(--shadow-lg, 0 24px 64px rgba(15, 23, 42, .12)); }
}
@media (prefers-reduced-transparency: reduce) {
    :is(.card, .lm-card, .app-card, .recovery-card, .modal-content, .dropdown-menu,
        .stat-card, .stats-card, .summary-card, .dashboard-card, .emp-card, .department-card) {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background-color: var(--bs-body-bg, #fff) !important;
    }
}

/* Shared data-loading state for Bootstrap and custom pop-up dialogs. */
.synx-modal-loading,
:is(.modal, [role="dialog"], .fg-modal-backdrop) .lm-org-loading:has(> .spinner-border) {
    text-align: center;
    color: var(--theme-primary-text, #65748a);
    font-size: 13px;
    line-height: 1.6;
    padding: 24px 16px;
}
.synx-modal-loading::before,
:is(.modal, [role="dialog"], .fg-modal-backdrop) .lm-org-loading:has(> .spinner-border)::before {
    content: "";
    display: block;
    width: 22px;
    height: 22px;
    box-sizing: border-box;
    margin: 0 auto 12px;
    border: 2px solid var(--theme-primary-border, #dce7fc);
    border-top-color: #2864ef;
    border-radius: 50%;
    animation: synx-modal-spin .75s linear infinite;
}
.synx-modal-loading > .spinner-border,
:is(.modal, [role="dialog"], .fg-modal-backdrop) .lm-org-loading:has(> .spinner-border) > .spinner-border { display: none !important; }
@keyframes synx-modal-spin { to { transform: rotate(360deg); } }

.dashboard-greeting-animating { position: relative; }
.dashboard-greeting-reserve { visibility: hidden; }
.dashboard-greeting-typed { position: absolute; inset: 0; }
.dashboard-greeting-typed::after {
    content: "";
    display: inline-block;
    height: .85em;
    border-right: 2px solid currentColor;
    margin-left: 3px;
    vertical-align: baseline;
}

/* One fade for Bootstrap and the custom application dialog shells. */
:root { --synx-dialog-duration: 220ms; }
.modal.fade,
.modal-backdrop.fade {
    transition: opacity var(--synx-dialog-duration) ease-in-out !important;
}
.modal.fade .modal-dialog {
    transform: none !important;
    animation: none !important;
    /* Bootstrap waits for this transition before firing shown/hidden events. */
    transition: opacity var(--synx-dialog-duration) ease-in-out !important;
}

/* Keep the shell painted until its closing fade completes. Visibility hides
   closed controls from keyboard navigation; pointer events stop immediately. */
.fg-modal-backdrop,
.figma-confirm-backdrop,
.rp-modal,
.fg-onboarding-modal,
.onboard-modal {
    display: flex !important;
    opacity: 0 !important;
    visibility: hidden;
    pointer-events: none !important;
    animation: none !important;
    transition: opacity var(--synx-dialog-duration) ease-in-out,
                visibility 0s linear var(--synx-dialog-duration) !important;
}
.fg-modal-backdrop:is(.show, .is-open, .active),
.figma-confirm-backdrop.show,
.rp-modal.open,
.fg-onboarding-modal:not([hidden]),
.onboard-modal:not([hidden]) {
    opacity: 1 !important;
    visibility: visible;
    pointer-events: auto !important;
    transition-delay: 0s !important;
}
.fg-modal-backdrop > *,
.figma-confirm-backdrop > .figma-confirm-dialog,
.rp-modal > .rp-modal-dialog,
.fg-onboarding-modal > .fg-onboarding-modal-panel,
.onboard-modal > .panel {
    animation: none !important;
    transform: none !important;
}
@media (prefers-reduced-motion: reduce) {
    :root { --synx-dialog-duration: 0ms; }
}
@media (prefers-reduced-motion: reduce) {
    .synx-modal-loading::before,
    :is(.modal, [role="dialog"], .fg-modal-backdrop) .lm-org-loading:has(> .spinner-border)::before { animation: none; }
}

/* Theme every standard single-choice select.  A shared rule prevents browser
   defaults from reappearing in new pages, while multi-select controls retain
   their native affordance. */
select:not([multiple]):not([size]),
.form-select:not([multiple]):not([size]) {
    appearance: none;
    -webkit-appearance: none;
    background-color: var(--bs-body-bg, #fff);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-position: right .75rem center;
    background-repeat: no-repeat;
    background-size: 1rem;
    border: 1px solid var(--theme-primary-border, #d8dee8);
    border-radius: .5rem;
    color: var(--bs-body-color, #17243b);
    cursor: pointer;
    min-height: 2.5rem;
    padding-right: 2.5rem;
}

select:not([multiple]):not([size]):focus,
.form-select:not([multiple]):not([size]):focus {
    background-color: var(--bs-body-bg, #fff);
    border-color: #2563eb;
    box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .14);
    outline: 0;
}

select:not([multiple]):not([size]):disabled,
.form-select:not([multiple]):not([size]):disabled {
    background-color: var(--theme-surface-muted, #f8fafc);
    color: var(--theme-muted, #64748b);
    cursor: default;
    opacity: 1;
}
