/* Shared futuristic palette. Light-mode preferences remain supported in the workspace. */
.fms-theme {
    color-scheme: light;
    --fms-bg: #edf3fb;
    --fms-surface: #ffffff;
    --fms-raised: #e4eef9;
    --fms-input: #f7faff;
    --fms-line: #bdcee2;
    --fms-text: #152f4f;
    --fms-muted: #506580;
    --fms-accent: #00678a;
    --fms-secondary: #6144ba;
    --bs-body-bg: var(--fms-bg);
    --bs-body-color: var(--fms-text);
    --bs-secondary-color: var(--fms-muted);
    --bs-tertiary-bg: var(--fms-raised);
    --bs-border-color: var(--fms-line);
    --bs-heading-color: var(--fms-text);
    --bs-link-color: var(--fms-accent);
    --bs-link-hover-color: #3356b8;
}
.fms-theme[data-bs-theme="light"] {
    color-scheme: light;
    --fms-bg: #edf3fb;
    --fms-surface: #ffffff;
    --fms-raised: #e4eef9;
    --fms-input: #f7faff;
    --fms-line: #bdcee2;
    --fms-text: #152f4f;
    --fms-muted: #506580;
    --fms-accent: #00678a;
    --fms-secondary: #6144ba;
}
.fms-theme body {
    color: var(--fms-text);
    background: radial-gradient(ellipse at 95% 0, #2775c51a, transparent 48%), var(--fms-bg);
}
.fms-theme h1, .fms-theme h2, .fms-theme h3, .fms-theme h4, .fms-theme h5, .fms-theme h6,
.fms-theme .page-title, .fms-theme .form-label, .fms-theme label { color: var(--fms-text); }
.fms-theme a { color: var(--fms-accent); }
.fms-theme a:hover { color: var(--fms-secondary); }
.fms-theme .text-muted, .fms-theme .text-secondary, .fms-theme .form-text { color: var(--fms-muted) !important; }
.fms-theme .text-dark, .fms-theme .text-body { color: var(--fms-text) !important; }
.fms-theme .text-primary, .fms-theme .text-info { color: var(--fms-accent) !important; }
.fms-theme .text-success { color: #137457 !important; }
.fms-theme .text-danger { color: #b4254d !important; }
.fms-theme .text-warning { color: #815b08 !important; }
.fms-theme[data-bs-theme="light"] .text-success { color: #137457 !important; }
.fms-theme[data-bs-theme="light"] .text-danger { color: #b4254d !important; }
.fms-theme[data-bs-theme="light"] .text-warning { color: #815b08 !important; }
.fms-theme .card, .fms-theme .modal-content, .fms-theme .dropdown-menu,
.fms-theme .swal2-popup, .fms-theme .list-group-item {
    background: var(--fms-surface); color: var(--fms-text);
    border: 1px solid var(--fms-line);
    box-shadow: 0 10px 30px #00000014;
}
.fms-theme .card { border-radius: 14px; }
.fms-theme .card-header, .fms-theme .card-footer, .fms-theme .modal-header,
.fms-theme .modal-footer { background: transparent; border-color: var(--fms-line); }
.fms-theme .card-header { border-top: 2px solid #3da5ca; border-radius: 14px 14px 0 0; }
.fms-theme .bg-light, .fms-theme .bg-white { background-color: var(--fms-raised) !important; }
.fms-theme .content-page, .fms-theme .page-title-box { background: transparent; }
.fms-theme .left-side-menu, .fms-theme .logo-box, .fms-theme .navbar-custom {
    background: var(--fms-surface) !important; border-color: var(--fms-line);
}
.fms-theme .left-side-menu { border-right: 1px solid var(--fms-line); }
.fms-theme .navbar-custom { border-bottom: 1px solid var(--fms-line); box-shadow: 0 4px 24px #00000014; }
.fms-theme .navbar-custom .topnav-menu .nav-link, .fms-theme .button-menu-mobile,
.fms-theme .dropdown-item { color: var(--fms-text); }
.fms-theme .dropdown-item:hover, .fms-theme .dropdown-item:focus { color: var(--fms-accent); background: var(--fms-raised); }
.fms-theme #sidebar-menu .menu-title { color: var(--fms-muted); font-size: 10px; letter-spacing: 1.5px; }
.fms-theme #sidebar-menu ul li a { color: var(--fms-muted); }
.fms-theme #sidebar-menu ul li a:hover, .fms-theme #sidebar-menu ul li a.active,
.fms-theme #sidebar-menu ul li.menuitem-active > a {
    color: var(--fms-accent); background: linear-gradient(90deg, #259bd324, #7366ed12);
    box-shadow: inset 3px 0 var(--fms-accent);
}
.fms-theme .form-control, .fms-theme .form-select, .fms-theme .input-group-text,
.fms-theme .swal2-input, .fms-theme .swal2-textarea {
    background-color: var(--fms-input); color: var(--fms-text); border-color: var(--fms-line);
}
.fms-theme .form-control::placeholder { color: var(--fms-muted); opacity: .85; }
.fms-theme .form-control:focus, .fms-theme .form-select:focus {
    background-color: var(--fms-input); color: var(--fms-text); border-color: var(--fms-accent);
    box-shadow: 0 0 0 3px #38caff24;
}
.fms-theme .form-control:disabled, .fms-theme .form-control[readonly] { background: var(--fms-raised); opacity: 1; }
.fms-theme select option { background: var(--fms-input); color: var(--fms-text); }
.fms-theme input[type="checkbox"] { accent-color: #268cd9; }
.fms-theme .btn-primary {
    color: #fff; background: linear-gradient(115deg, #136aba, #5841c2); border: 1px solid #628eed;
    box-shadow: 0 4px 18px #2467dc25;
}
.fms-theme .btn-primary:hover { color: #fff; background: linear-gradient(115deg, #0f599e, #4934ad); border-color: #79ceff; }
.fms-theme .btn-outline-primary, .fms-theme .btn-outline-info { color: var(--fms-accent); border-color: #4388ac; background: transparent; }
.fms-theme .btn-outline-primary:hover, .fms-theme .btn-outline-info:hover { color: var(--fms-text); background: var(--fms-raised); }
.fms-theme .btn-secondary, .fms-theme .btn-light, .fms-theme .btn-dark,
.fms-theme .btn-outline-secondary { color: var(--fms-text); background: var(--fms-raised); border-color: var(--fms-line); }
.fms-theme .btn-success { background: #116b55; border-color: #289b7d; color: #fff; }
.fms-theme .btn-danger { background: #a92a50; border-color: #d54c76; color: #fff; }
.fms-theme .btn-warning { background: #efc36a; border-color: #efc36a; color: #211b0e; }
.fms-theme .btn-info { background: #83d8ef; border-color: #83d8ef; color: #102438; }
.fms-theme .table {
    --bs-table-bg: transparent; --bs-table-color: var(--fms-text);
    --bs-table-border-color: var(--fms-line); --bs-table-striped-bg: #8fc9ff08;
    --bs-table-striped-color: var(--fms-text); --bs-table-hover-bg: #559ed414;
    --bs-table-hover-color: var(--fms-text); color: var(--fms-text); border-color: var(--fms-line);
}
.fms-theme .table thead, .fms-theme .table-light { --bs-table-bg: var(--fms-raised); --bs-table-color: var(--fms-text); background: var(--fms-raised); color: var(--fms-text); }
.fms-theme .table-danger { --bs-table-bg: #ffe9ef; --bs-table-color: #942444; }
.fms-theme .table td, .fms-theme .table th { border-color: var(--fms-line); }
.fms-theme .alert-info, .fms-theme .auth-note { background: #e1f3fc; border-color: #98cce2; color: #155470; }
.fms-theme .alert-success { background: #e3f6ed; border-color: #94cdb8; color: #175d46; }
.fms-theme .alert-warning { background: #fff4da; border-color: #dec181; color: #72520b; }
.fms-theme .alert-danger { background: #ffe9ef; border-color: #e1a5b5; color: #942444; }
.fms-theme .alert h4 { color: inherit; }
.fms-theme .badge.bg-success { background: #146b53 !important; color: #e2fff5; }
.fms-theme .badge.bg-danger { background: #9b2549 !important; color: #fff; }
.fms-theme .badge.bg-warning { background: #ebc16b !important; color: #211b0e; }
.fms-theme .badge.bg-secondary { background: #384e6d !important; color: #eef5ff; }
.fms-theme .page-link { color: var(--fms-accent); background: var(--fms-surface); border-color: var(--fms-line); }
.fms-theme .page-item.active .page-link { background: #15599d; color: white; }
.fms-theme .footer { background: transparent; color: var(--fms-muted); border-top: 1px solid var(--fms-line); }
.fms-theme .swal2-title, .fms-theme .swal2-html-container { color: var(--fms-text); }
.fms-theme .swal2-confirm { background: #235cc3 !important; }
.fms-theme a:focus-visible, .fms-theme button:focus-visible, .fms-theme summary:focus-visible { outline: 3px solid var(--fms-accent); outline-offset: 3px; }
/* Public pages share the same palette and subtle illuminated surfaces. */
.fms-theme .landing-page { --landing-ink: var(--fms-text); --landing-muted: var(--fms-muted); --landing-primary: var(--fms-accent); }
.fms-theme .landing-page .hero {
    background: radial-gradient(ellipse at 78% 35%, #286ab42b, transparent 58%),
        linear-gradient(135deg, var(--fms-bg), var(--fms-surface));
    border-bottom: 1px solid var(--fms-line);
}
.fms-theme .landing-page .home-title em { color: #087ba3; }
.fms-theme .landing-page .guide, .fms-theme .landing-footer { background: var(--fms-bg); border-color: var(--fms-line); }
.fms-theme .hero-caption, .fms-theme .guide-aside { background: var(--fms-surface); border-color: var(--fms-line); color: var(--fms-text); }
.fms-theme .hero-caption { box-shadow: 0 12px 45px #258aca18; }
.fms-theme .landing-page .feature-card { border-color: var(--fms-line); background: linear-gradient(145deg, var(--fms-surface), var(--fms-input)); }
.fms-theme .feature-icon { color: var(--fms-accent); background: #e2f1ff; border: 1px solid #b5d3ed; }
.fms-theme .steps li::before { background: var(--fms-raised); border-color: var(--fms-line); color: var(--fms-accent); }
.fms-theme .steps li, .fms-theme .guidance-note, .fms-theme .faq-list details { border-color: var(--fms-line); }
.fms-theme .landing-page .closing { background: linear-gradient(115deg, #e0f3ff, #eee8ff); border: 1px solid #b9d0eb; box-shadow: 0 12px 42px #1765a514; }
.fms-theme .landing-footer strong { color: var(--fms-text); }
.fms-theme .landing-brand img, .fms-theme .login-card img { filter: drop-shadow(0 0 12px #80c7ff35); }
.fms-theme body:has(.login-card)::before {
    background: radial-gradient(ellipse at 20% 15%, #6cc8ff40, transparent 50%),
        radial-gradient(ellipse at 85% 80%, #b2a4f530, transparent 50%), #edf3fb;
    filter: none; transform: none;
}
.fms-theme .login-card {
    background: linear-gradient(150deg, #fffffffa, #f3f8fffa); border: 1px solid #bfd4eb;
    box-shadow: 0 25px 75px #315d9025, 0 0 45px #219dde0a;
}
.fms-theme .login-card .auth-heading { color: var(--fms-text); }
.fms-theme .skip-link { background: var(--fms-surface); color: var(--fms-accent); }
@media (prefers-reduced-motion: reduce) { .fms-theme *, .fms-theme *::before, .fms-theme *::after { transition-duration: 0s !important; animation-duration: 0s !important; } }
@media print {
    .fms-theme { color-scheme: light; --fms-bg: white; --fms-surface: white; --fms-raised: #eee; --fms-text: #111; --fms-muted: #444; --fms-line: #bbb; }
    .fms-theme .card { box-shadow: none; }
}

.fms-theme .landing-page .closing h2 { color: var(--fms-text); }
.fms-theme .landing-page .closing p { color: var(--fms-muted); }
.fms-theme .landing-page .closing .eyebrow { color: var(--fms-accent); }
