/* ==========================================================================
   CAPSS1 — NEMSU Sports Hub
   PROFESSIONAL THEME LAYER  (theme-pro.css)

   Paano gamitin:
   - I-load ito PINAKAHULI, pagkatapos ng custom.css / landing.css / motion.css.
   - Hindi nito binabago ang HTML, PHP, o JavaScript. Pure styling lang.
   - Gumagana sa Light at Dark mode (html[data-theme="dark"]).
   - Para i-off: tanggalin lang ang <link> ng theme-pro.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS
   -------------------------------------------------------------------------- */
:root {
    /* Brand: Executive Navy + Laurel Gold */
    --pro-navy-950: #07111f;
    --pro-navy-900: #0a1728;
    --pro-navy-800: #122540;
    --pro-navy-700: #1d3557;
    --pro-navy-600: #284b78;
    --pro-gold-500: #c8901f;
    --pro-gold-400: #dba73a;
    --pro-gold-300: #ecc873;

    /* Elevation scale */
    --pro-shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
    --pro-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 12px rgba(15, 23, 42, 0.05);
    --pro-shadow-md: 0 2px 4px rgba(15, 23, 42, 0.04), 0 12px 28px rgba(15, 23, 42, 0.08);
    --pro-shadow-lg: 0 4px 8px rgba(15, 23, 42, 0.05), 0 24px 48px rgba(15, 23, 42, 0.14);

    /* Shape */
    --pro-radius-sm: 8px;
    --pro-radius-md: 10px;
    --pro-radius-lg: 16px;

    /* Motion (sinusunod ang motion.css) */
    --pro-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --pro-fast: 180ms;
    --pro-base: 260ms;

    /* Hook into existing system variables */
    --radius-card: var(--pro-radius-lg);
    --radius-control: var(--pro-radius-md);
    --surface-shadow: var(--pro-shadow-sm);
    --surface-shadow-hover: var(--pro-shadow-md);
    --brand-gradient: linear-gradient(135deg, var(--pro-navy-800) 0%, var(--pro-navy-600) 100%);
    --content-bg: #f4f6fa;
}

html[data-theme="dark"] {
    --content-bg: #0b1220;
    --surface-primary: #131d30;
    --surface-secondary: #0f1828;
    --surface-hover: #1b2840;
    --card-border: #243149;
    --card-border-subtle: #1b2638;
    --pro-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.2);
    --pro-shadow-md: 0 2px 4px rgba(0, 0, 0, 0.3), 0 12px 28px rgba(0, 0, 0, 0.35);
    --pro-shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.35), 0 24px 48px rgba(0, 0, 0, 0.5);
}

/* --------------------------------------------------------------------------
   2. TYPOGRAPHY & BASE
   -------------------------------------------------------------------------- */
body {
    font-family: var(--font-body);
    font-feature-settings: "cv11", "ss01", "tnum";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    background-color: var(--content-bg);
    color: var(--text-primary);
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font-display);
    letter-spacing: -0.015em;
    font-weight: 700;
}

h6, .h6 { letter-spacing: -0.005em; }

::selection {
    background: rgba(200, 144, 31, 0.28);
    color: inherit;
}

a { text-underline-offset: 3px; }

:focus-visible {
    outline: 2px solid var(--pro-gold-500);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Slim, modern scrollbars */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 116, 139, 0.45) transparent;
}
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.4);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover { background-color: rgba(100, 116, 139, 0.7); }

/* --------------------------------------------------------------------------
   3. SIDEBAR — Executive Navy with Gold Accent
   -------------------------------------------------------------------------- */
.app-sidebar {
    width: var(--app-sidebar-width, 285px);
    background:
        radial-gradient(ellipse 120% 40% at 0% 0%, rgba(200, 144, 31, 0.10), transparent 60%),
        radial-gradient(ellipse 100% 50% at 100% 100%, rgba(40, 75, 120, 0.35), transparent 65%),
        linear-gradient(180deg, var(--pro-navy-900) 0%, var(--pro-navy-950) 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 4px 0 24px rgba(7, 17, 31, 0.18);
}

.sidebar-brand {
    padding: 1.25rem 1.15rem 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    position: relative;
}

.sidebar-brand::after {
    content: "";
    position: absolute;
    left: 1.15rem;
    bottom: -1px;
    width: 44px;
    height: 2px;
    background: linear-gradient(90deg, var(--pro-gold-500), transparent);
    border-radius: 2px;
}

.sidebar-brand img {
    transition: transform 400ms var(--pro-ease), box-shadow 400ms var(--pro-ease);
}
.sidebar-brand:hover img {
    transform: rotate(-6deg) scale(1.06);
}

.sidebar-menu {
    padding: 0.85rem 0.8rem 1rem;
}

.menu-header {
    color: rgba(148, 163, 184, 0.62);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    padding: 1.1rem 0.85rem 0.45rem;
}

.nav-link-custom {
    position: relative;
    color: #a9b6c9;
    font-weight: 500;
    border-radius: var(--pro-radius-md);
    padding: 0.6rem 0.85rem;
    margin-bottom: 2px;
}

.nav-link-custom i {
    font-size: 1.05rem;
    width: 1.25rem;
    text-align: center;
    opacity: 0.85;
    transition: transform var(--pro-base) var(--pro-ease), color var(--pro-fast) ease, opacity var(--pro-fast) ease;
}

.nav-link-custom:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(2px);
}
.nav-link-custom:hover i {
    opacity: 1;
    color: var(--pro-gold-300);
}

.nav-link-custom.active {
    color: #ffffff;
    font-weight: 600;
    background:
        linear-gradient(90deg, rgba(200, 144, 31, 0.20) 0%, rgba(40, 75, 120, 0.40) 55%, rgba(29, 53, 87, 0.30) 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), 0 6px 16px rgba(0, 0, 0, 0.22);
    transform: none;
}
.nav-link-custom.active i {
    color: var(--pro-gold-400);
    opacity: 1;
}
.nav-link-custom.active::before {
    content: "";
    position: absolute;
    left: -0.8rem;
    top: 20%;
    bottom: 20%;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: linear-gradient(180deg, var(--pro-gold-300), var(--pro-gold-500));
    box-shadow: 0 0 12px rgba(200, 144, 31, 0.6);
}

.sidebar-footer {
    margin: 0 0.8rem 0.9rem;
    padding: 0.9rem 1rem;
    border-radius: var(--pro-radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* --------------------------------------------------------------------------
   4. TOP NAVBAR
   -------------------------------------------------------------------------- */
.top-navbar {
    background: color-mix(in srgb, var(--surface-primary) 86%, transparent);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid color-mix(in srgb, var(--card-border) 75%, transparent);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 6px 20px rgba(15, 23, 42, 0.04);
    position: sticky;
}

.top-navbar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: linear-gradient(90deg, var(--pro-navy-700) 0%, var(--pro-gold-500) 48%, transparent 100%);
    opacity: 0.85;
    pointer-events: none;
}

.top-navbar h6 {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.top-navbar .btn-light.rounded-circle {
    background: var(--surface-primary);
    border-color: var(--card-border) !important;
    box-shadow: var(--pro-shadow-xs);
    transition: transform var(--pro-fast) var(--pro-ease), box-shadow var(--pro-fast) ease, border-color var(--pro-fast) ease;
}
.top-navbar .btn-light.rounded-circle:hover {
    transform: translateY(-1px);
    box-shadow: var(--pro-shadow-sm);
    border-color: var(--pro-gold-500) !important;
}

/* --------------------------------------------------------------------------
   5. MAIN CONTENT AREA
   -------------------------------------------------------------------------- */
.main-body {
    padding-top: clamp(1.1rem, 2.2vw, 1.75rem);
    padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

html:not([data-theme="dark"]) .app-content {
    background:
        radial-gradient(ellipse 60% 30% at 100% 0%, rgba(40, 75, 120, 0.05), transparent 70%),
        var(--content-bg);
}

/* --------------------------------------------------------------------------
   6. CARDS & STAT TILES
   -------------------------------------------------------------------------- */
.card {
    border: 1px solid var(--card-border);
    border-radius: var(--pro-radius-lg);
    background-color: var(--surface-primary);
    box-shadow: var(--pro-shadow-sm);
    transition: box-shadow var(--pro-base) var(--pro-ease), border-color var(--pro-base) ease, transform var(--pro-base) var(--pro-ease);
}

.card-header {
    background: linear-gradient(180deg, var(--surface-primary), var(--surface-secondary));
    border-bottom: 1px solid var(--card-border-subtle);
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.005em;
    padding: 1rem 1.25rem;
    border-top-left-radius: calc(var(--pro-radius-lg) - 1px);
    border-top-right-radius: calc(var(--pro-radius-lg) - 1px);
}

.card-footer {
    background: var(--surface-secondary);
    border-top: 1px solid var(--card-border-subtle);
}

.card-body { padding: 1.25rem 1.35rem; }

@media (hover: hover) {
    .card:hover {
        border-color: color-mix(in srgb, var(--pro-navy-600) 28%, var(--card-border));
        box-shadow: var(--pro-shadow-md);
    }
    .stat-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--pro-shadow-md);
    }
}

/* Stat tiles — top accent bar + refined icon chip */
.stat-card {
    border-radius: var(--pro-radius-lg);
    padding: 1.3rem 1.35rem;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--surface-primary) 100%, #fff 0%), var(--surface-primary));
}
.stat-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--pro-navy-700), var(--pro-gold-500));
    opacity: 0.9;
    z-index: 1;
}
.stat-card::after {
    content: "";
    position: absolute;
    right: -30px;
    top: -30px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(40, 75, 120, 0.07), transparent 70%);
    z-index: -1;
}
.stat-card .h3,
.stat-card .h2 {
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}
.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    font-size: 1.3rem;
    transition: transform var(--pro-base) var(--pro-ease);
}
.stat-card:hover .stat-icon { transform: scale(1.08) rotate(-4deg); }

/* --------------------------------------------------------------------------
   7. BUTTONS
   -------------------------------------------------------------------------- */
.btn {
    font-weight: 600;
    letter-spacing: 0.005em;
    border-radius: var(--pro-radius-md);
    padding: 0.5rem 1.05rem;
    transition: transform var(--pro-fast) var(--pro-ease), box-shadow var(--pro-base) var(--pro-ease),
                background-color var(--pro-fast) ease, border-color var(--pro-fast) ease, color var(--pro-fast) ease;
}
.btn-sm { padding: 0.32rem 0.7rem; border-radius: var(--pro-radius-sm); }
.btn-lg { padding: 0.7rem 1.4rem; border-radius: 12px; }

.btn-primary,
.btn-nemsu {
    background: linear-gradient(180deg, var(--pro-navy-600) 0%, var(--pro-navy-700) 100%);
    border: 1px solid var(--pro-navy-800);
    color: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.btn-primary:hover,
.btn-primary:focus-visible,
.btn-nemsu:hover,
.btn-nemsu:focus-visible {
    background: linear-gradient(180deg, #305a8d 0%, var(--pro-navy-600) 100%);
    border-color: var(--pro-navy-700);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(29, 53, 87, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.btn-primary:active,
.btn-nemsu:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.2);
}

.btn-success,
.btn-nemsu-green {
    background: linear-gradient(180deg, #0f8a3d 0%, var(--nemsu-green) 100%);
    border: 1px solid var(--nemsu-green-dark);
    color: #fff;
    box-shadow: 0 1px 2px rgba(7, 74, 31, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.btn-success:hover,
.btn-nemsu-green:hover {
    background: linear-gradient(180deg, #129a45 0%, #0d7a35 100%);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(11, 107, 46, 0.32);
}

.btn-outline-primary {
    color: var(--pro-navy-700);
    border: 1.5px solid color-mix(in srgb, var(--pro-navy-700) 45%, transparent);
    background: transparent;
}
.btn-outline-primary:hover {
    background: var(--pro-navy-700);
    border-color: var(--pro-navy-700);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(29, 53, 87, 0.25);
}
html[data-theme="dark"] .btn-outline-primary { color: #9ec0ee; border-color: rgba(158, 192, 238, 0.4); }
html[data-theme="dark"] .btn-outline-primary:hover { background: var(--nemsu-blue); color: #fff; }

.btn-outline-secondary,
.btn-light {
    border-color: var(--card-border);
    color: var(--text-secondary);
}
.btn-outline-secondary:hover,
.btn-light:hover {
    background: var(--surface-hover);
    border-color: color-mix(in srgb, var(--pro-navy-600) 35%, var(--card-border));
    color: var(--text-primary);
}

.btn-warning {
    background: linear-gradient(180deg, var(--pro-gold-400), var(--pro-gold-500));
    border-color: #a8761a;
    color: #2b1d02;
}
.btn-danger {
    background: linear-gradient(180deg, #c8504e, #b3413f);
    border-color: #8f2f2d;
}

.btn:disabled,
.btn.disabled { opacity: 0.55; box-shadow: none; transform: none; }

/* --------------------------------------------------------------------------
   8. FORMS
   -------------------------------------------------------------------------- */
.form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
    margin-bottom: 0.4rem;
}

.form-control,
.form-select {
    background-color: var(--control-bg);
    border: 1.5px solid var(--card-border);
    border-radius: var(--pro-radius-md);
    padding: 0.58rem 0.85rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    box-shadow: var(--pro-shadow-xs);
}
.form-control::placeholder { color: color-mix(in srgb, var(--text-muted) 75%, transparent); }

.form-control:hover,
.form-select:hover {
    border-color: color-mix(in srgb, var(--pro-navy-600) 40%, var(--card-border));
}

.form-control:focus,
.form-select:focus {
    background-color: var(--control-bg);
    border-color: var(--pro-navy-600);
    box-shadow: 0 0 0 4px rgba(40, 75, 120, 0.14), var(--pro-shadow-xs);
    outline: none;
}
html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] .form-select:focus {
    border-color: #6b97d6;
    box-shadow: 0 0 0 4px rgba(107, 151, 214, 0.2);
}
.form-select:focus,
html[data-theme="dark"] .form-select:focus {
    border-color: var(--card-border);
    box-shadow: var(--pro-shadow-xs);
}

.input-group-text {
    background: var(--surface-secondary);
    border: 1.5px solid var(--card-border);
    color: var(--text-muted);
    border-radius: var(--pro-radius-md);
}

.form-check-input {
    border-width: 1.5px;
    border-color: color-mix(in srgb, var(--text-muted) 55%, transparent);
}
.form-check-input:checked {
    background-color: var(--pro-navy-700);
    border-color: var(--pro-navy-700);
}
.form-check-input:focus { box-shadow: 0 0 0 4px rgba(40, 75, 120, 0.16); }
.form-switch .form-check-input:checked { background-color: var(--nemsu-green); border-color: var(--nemsu-green); }

/* --------------------------------------------------------------------------
   9. TABLES
   -------------------------------------------------------------------------- */
.table {
    --bs-table-bg: transparent;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--text-primary);
}

.table-responsive {
    border-radius: var(--pro-radius-lg);
}

.card > .table-responsive,
.card > .card-body > .table-responsive {
    border-radius: 0 0 var(--pro-radius-lg) var(--pro-radius-lg);
}

.table thead th {
    background: linear-gradient(180deg, var(--surface-secondary), color-mix(in srgb, var(--surface-secondary) 88%, var(--pro-navy-700) 12%));
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-bottom: 2px solid color-mix(in srgb, var(--pro-navy-700) 18%, var(--card-border));
    padding: 0.9rem 1.15rem;
    white-space: nowrap;
}

.table tbody td {
    padding: 0.9rem 1.15rem;
    border-bottom: 1px solid var(--card-border-subtle);
    vertical-align: middle;
    font-size: 0.88rem;
}
.table tbody tr:last-child td { border-bottom: 0; }

.table-hover tbody tr {
    transition: background-color var(--pro-fast) ease, box-shadow var(--pro-fast) ease;
}
.table-hover tbody tr:hover {
    background-color: color-mix(in srgb, var(--pro-navy-700) 5%, transparent);
    box-shadow: inset 3px 0 0 var(--pro-gold-500);
}
.table-hover tbody tr:hover > * { --bs-table-hover-bg: transparent; --bs-table-accent-bg: transparent; }

.table-striped > tbody > tr:nth-of-type(odd) > * {
    --bs-table-accent-bg: color-mix(in srgb, var(--pro-navy-700) 2.5%, transparent);
}

/* --------------------------------------------------------------------------
   10. BADGES, ALERTS, PROGRESS
   -------------------------------------------------------------------------- */
.badge {
    font-weight: 600;
    letter-spacing: 0.03em;
    padding: 0.4em 0.75em;
    border-radius: 999px;
}

.alert {
    border: 1px solid transparent;
    border-left-width: 4px;
    border-radius: var(--pro-radius-md);
    box-shadow: var(--pro-shadow-xs);
    font-size: 0.9rem;
}
.alert-success { border-left-color: var(--nemsu-green); }
.alert-danger  { border-left-color: var(--nemsu-red); }
.alert-warning { border-left-color: var(--pro-gold-500); }
.alert-info    { border-left-color: var(--pro-navy-600); }

.progress {
    height: 0.6rem;
    border-radius: 999px;
    background-color: color-mix(in srgb, var(--pro-navy-700) 10%, transparent);
    overflow: hidden;
}
.progress-bar {
    background: linear-gradient(90deg, var(--pro-navy-700), var(--pro-navy-600));
    border-radius: 999px;
    transition: width 700ms var(--pro-ease);
}
.progress-bar.bg-success { background: linear-gradient(90deg, var(--nemsu-green-dark), var(--nemsu-green)) !important; }
.progress-bar.bg-warning { background: linear-gradient(90deg, var(--pro-gold-500), var(--pro-gold-400)) !important; }

/* --------------------------------------------------------------------------
   11. TABS, PILLS, PAGINATION, BREADCRUMB
   -------------------------------------------------------------------------- */
.nav-tabs {
    border-bottom: 1px solid var(--card-border);
    gap: 0.25rem;
}
.nav-tabs .nav-link {
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: var(--pro-radius-sm) var(--pro-radius-sm) 0 0;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.7rem 1.1rem;
    transition: color var(--pro-fast) ease, border-color var(--pro-base) var(--pro-ease), background-color var(--pro-fast) ease;
}
.nav-tabs .nav-link:hover {
    color: var(--text-primary);
    background: var(--surface-hover);
}
.nav-tabs .nav-link.active {
    color: var(--pro-navy-700);
    background: transparent;
    border-bottom-color: var(--pro-gold-500);
}
html[data-theme="dark"] .nav-tabs .nav-link.active { color: #cfe0fa; }

.nav-pills .nav-link {
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.86rem;
    color: var(--text-secondary);
    transition: background-color var(--pro-fast) ease, color var(--pro-fast) ease, box-shadow var(--pro-base) ease;
}
.nav-pills .nav-link:hover { background: var(--surface-hover); }
.nav-pills .nav-link.active {
    background: linear-gradient(180deg, var(--pro-navy-600), var(--pro-navy-700));
    color: #fff;
    box-shadow: 0 4px 12px rgba(29, 53, 87, 0.28);
}

.page-link {
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    margin: 0 2px;
    border-radius: var(--pro-radius-sm) !important;
}
.page-link:hover {
    background: var(--surface-hover);
    border-color: var(--pro-navy-600);
    color: var(--pro-navy-700);
}
.page-item.active .page-link {
    background: linear-gradient(180deg, var(--pro-navy-600), var(--pro-navy-700));
    border-color: var(--pro-navy-700);
    color: #fff;
    box-shadow: 0 4px 10px rgba(29, 53, 87, 0.26);
}

.breadcrumb-item + .breadcrumb-item::before { color: var(--pro-gold-500); }

/* --------------------------------------------------------------------------
   12. DROPDOWNS, MODALS, TOASTS, LIST GROUPS
   -------------------------------------------------------------------------- */
.dropdown-menu {
    border: 1px solid var(--card-border);
    border-radius: var(--pro-radius-md);
    box-shadow: var(--pro-shadow-lg);
    padding: 0.4rem;
    background: var(--surface-primary);
}
.dropdown-item {
    border-radius: var(--pro-radius-sm);
    font-size: 0.87rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
}
.dropdown-item:hover,
.dropdown-item:focus {
    background: color-mix(in srgb, var(--pro-navy-700) 8%, transparent);
    color: var(--text-primary);
}
.dropdown-item.active,
.dropdown-item:active { background: var(--pro-navy-700); color: #fff; }

.modal-content {
    border: 1px solid var(--card-border);
    border-radius: 18px;
    box-shadow: var(--pro-shadow-lg);
    overflow: hidden;
}
.modal-header {
    background: linear-gradient(180deg, var(--surface-primary), var(--surface-secondary));
    border-bottom: 1px solid var(--card-border-subtle);
    padding: 1.1rem 1.4rem;
    position: relative;
}
.modal-header::after {
    content: "";
    position: absolute;
    left: 1.4rem;
    bottom: -1px;
    width: 52px;
    height: 2px;
    background: linear-gradient(90deg, var(--pro-gold-500), transparent);
}
.modal-title { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; }
.modal-footer { background: var(--surface-secondary); border-top: 1px solid var(--card-border-subtle); }
.modal-backdrop.show { opacity: 1; background-color: rgba(7, 17, 31, 0.55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }

.profile-avatar {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 50%;
    background: var(--surface-secondary);
    color: var(--nemsu-blue);
    vertical-align: middle;
    font-weight: 700;
    line-height: 1;
}
.profile-avatar--xs { width: 28px; height: 28px; font-size: 0.6rem; }
.profile-avatar--sm { width: 38px; height: 38px; font-size: 0.72rem; }
.profile-avatar--md { width: 48px; height: 48px; font-size: 0.85rem; }
.profile-avatar--lg { width: 72px; height: 72px; font-size: 1.2rem; }
.profile-avatar--xl { width: 112px; height: 112px; font-size: 2rem; }
.profile-avatar__image { display: block; width: 100%; height: 100%; object-fit: cover; }
.profile-avatar__initials { display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.profile-avatar__initials[hidden] { display: none; }

.toast {
    border: 1px solid var(--card-border);
    border-radius: var(--pro-radius-md);
    box-shadow: var(--pro-shadow-lg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.list-group-item {
    border-color: var(--card-border-subtle);
    transition: background-color var(--pro-fast) ease;
}
.list-group-item-action:hover { background: var(--surface-hover); }

.accordion-item {
    border: 1px solid var(--card-border);
    border-radius: var(--pro-radius-md) !important;
    overflow: hidden;
    margin-bottom: 0.5rem;
    background: var(--surface-primary);
}
.accordion-button {
    font-weight: 600;
    background: var(--surface-primary);
    color: var(--text-primary);
}
.accordion-button:not(.collapsed) {
    background: color-mix(in srgb, var(--pro-navy-700) 6%, var(--surface-primary));
    color: var(--pro-navy-700);
    box-shadow: inset 3px 0 0 var(--pro-gold-500);
}
html[data-theme="dark"] .accordion-button:not(.collapsed) { color: #cfe0fa; }

/* --------------------------------------------------------------------------
   13. SWEETALERT2 (matching popups)
   -------------------------------------------------------------------------- */
.swal2-popup {
    border-radius: 18px;
    font-family: var(--font-body);
    box-shadow: var(--pro-shadow-lg);
    padding: 1.6rem 1.5rem 1.4rem;
}
.swal2-title { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.015em; }

/* --------------------------------------------------------------------------
   14. FOOTER
   -------------------------------------------------------------------------- */
.site-footer {
    border-top: 1px solid var(--card-border);
    background: var(--surface-primary);
    font-size: 0.8rem;
    color: var(--text-muted);
    position: fixed;
    right: 0;
    bottom: 0;
    left: var(--app-sidebar-width, 285px);
    z-index: 1020;
}
.site-footer::before {
    content: "";
    position: absolute;
    left: 0;
    top: -1px;
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, var(--pro-gold-500), transparent);
}

/* --------------------------------------------------------------------------
   15. LOGIN / REGISTER (auth layout)
   -------------------------------------------------------------------------- */
.auth-card {
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(15, 23, 42, 0.05);
    position: relative;
    overflow: hidden;
}
.auth-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, var(--pro-navy-700), var(--pro-gold-500) 60%, var(--pro-gold-300));
}
.auth-card h1, .auth-card h2, .auth-card h3, .auth-card h4, .auth-card h5 {
    font-family: var(--font-display);
    letter-spacing: -0.02em;
}
.auth-logo {
    filter: drop-shadow(0 6px 14px rgba(29, 53, 87, 0.25));
}
.auth-input {
    border-radius: var(--pro-radius-md);
}
.auth-card .btn-primary,
.auth-card .btn-nemsu {
    padding: 0.7rem 1.2rem;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

/* --------------------------------------------------------------------------
   16. PUBLIC LANDING PAGE
   -------------------------------------------------------------------------- */
.landing-navbar {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid rgba(199, 211, 227, 0.7);
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.05);
}
.landing-nav-link {
    font-weight: 600;
    position: relative;
}
.landing-nav-link::after {
    content: "";
    position: absolute;
    left: 0.9rem;
    right: 0.9rem;
    bottom: 0.25rem;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--pro-navy-700), var(--pro-gold-500));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--pro-base) var(--pro-ease);
}
.landing-nav-link:hover::after,
.landing-nav-link.active::after { transform: scaleX(1); }

.hero-title {
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -0.035em;
}
.hero-pill {
    border: 1px solid var(--nemsu-gold-border);
    background: linear-gradient(180deg, #fffaf0, var(--nemsu-gold-light));
    box-shadow: var(--pro-shadow-xs);
}

.btn-landing-primary {
    background: linear-gradient(180deg, var(--pro-navy-600), var(--pro-navy-700));
    border: 1px solid var(--pro-navy-800);
    border-radius: 12px;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(29, 53, 87, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    transition: transform var(--pro-base) var(--pro-ease), box-shadow var(--pro-base) var(--pro-ease);
}
.btn-landing-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(29, 53, 87, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-landing-secondary {
    border-radius: 12px;
    font-weight: 700;
    transition: transform var(--pro-base) var(--pro-ease), box-shadow var(--pro-base) var(--pro-ease), border-color var(--pro-fast) ease;
}
.btn-landing-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--pro-shadow-md);
    border-color: var(--pro-gold-500);
}

.section-tag {
    letter-spacing: 0.14em;
    font-weight: 700;
}
.section-heading {
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -0.03em;
}

.minimal-card,
.sports-all-card,
.tryout-panel {
    border-radius: var(--pro-radius-lg);
    box-shadow: var(--pro-shadow-sm);
    transition: transform var(--pro-base) var(--pro-ease), box-shadow var(--pro-base) var(--pro-ease), border-color var(--pro-base) ease;
}
@media (hover: hover) {
    .minimal-card:hover,
    .sports-all-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--pro-shadow-md);
        border-color: color-mix(in srgb, var(--pro-gold-500) 45%, var(--border-subtle, #e2e8f0));
    }
}

.sport-card-image,
.facility-card-image {
    transition: transform 700ms var(--pro-ease);
}
.minimal-card:hover .sport-card-image,
.minimal-card:hover .facility-card-image { transform: scale(1.05); }

.stats-strip {
    background:
        linear-gradient(135deg, var(--pro-navy-900) 0%, var(--pro-navy-700) 60%, var(--pro-navy-600) 100%);
    border-top: 3px solid var(--pro-gold-500);
}
.stats-strip .stat-number {
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #805b0d;
    -webkit-text-fill-color: #805b0d;
    font-variant-numeric: tabular-nums;
}

.landing-footer {
    background:
        radial-gradient(ellipse 80% 60% at 0% 0%, rgba(200, 144, 31, 0.08), transparent 60%),
        linear-gradient(180deg, var(--pro-navy-900), var(--pro-navy-950));
    border-top: 3px solid var(--pro-gold-500);
}
.footer-link { transition: color var(--pro-fast) ease, transform var(--pro-fast) var(--pro-ease); }
.footer-link:hover { color: var(--pro-gold-300); transform: translateX(3px); }

/* --------------------------------------------------------------------------
   17. PAGE-LOAD POLISH (kasama sa motion.css; mahinahon lang)
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
    .app-sidebar { animation: pro-sidebar-in 520ms var(--pro-ease) both; }
    .top-navbar  { animation: pro-fade-down 460ms var(--pro-ease) both; }

    .stat-card { animation: pro-rise 520ms var(--pro-ease) both; }
    .row > [class*="col-"]:nth-child(1) > .stat-card { animation-delay: 40ms; }
    .row > [class*="col-"]:nth-child(2) > .stat-card { animation-delay: 100ms; }
    .row > [class*="col-"]:nth-child(3) > .stat-card { animation-delay: 160ms; }
    .row > [class*="col-"]:nth-child(4) > .stat-card { animation-delay: 220ms; }
}

@keyframes pro-sidebar-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes pro-fade-down {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes pro-rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   18. RESPONSIVE & PRINT
   -------------------------------------------------------------------------- */
@media (max-width: 1199.98px) {
    .app-sidebar { width: var(--app-sidebar-width, 285px); box-shadow: 8px 0 40px rgba(7, 17, 31, 0.45); }
    .site-footer { left: 0; }
    .card-body { padding: 1.05rem; }
    .table thead th,
    .table tbody td { padding: 0.75rem 0.85rem; }
}

@media (max-width: 575.98px) {
    .btn { padding: 0.5rem 0.9rem; }
    .stat-icon { width: 42px; height: 42px; font-size: 1.15rem; }
}

@media print {
    .app-sidebar,
    .top-navbar,
    .site-footer,
    .landing-navbar { display: none !important; }
    .card { box-shadow: none !important; border: 1px solid #cbd5e1 !important; }
    .table thead th { background: #f1f5f9 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* --------------------------------------------------------------------------
   19. ACCESSIBILITY — igalang ang "reduce motion"
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .app-sidebar,
    .top-navbar,
    .stat-card { animation: none !important; }
    .card, .btn, .nav-link-custom, .stat-card, .minimal-card { transition-duration: 0s !important; }
    .stat-card:hover,
    .btn:hover,
    .minimal-card:hover { transform: none !important; }
}

/* --------------------------------------------------------------------------
   20. DARK MODE FINE-TUNING
   -------------------------------------------------------------------------- */
html[data-theme="dark"] .table > :not(caption) > * > * {
    background-color: transparent;
    color: var(--text-primary);
    box-shadow: none;
}
html[data-theme="dark"] .table-hover tbody tr:hover {
    background-color: rgba(107, 151, 214, 0.08);
    box-shadow: inset 3px 0 0 var(--pro-gold-500);
}
html[data-theme="dark"] .table thead th {
    background: var(--surface-secondary);
    color: #9fb0c8;
}
html[data-theme="dark"] .btn-outline-primary { color: #a9c8f2; }
html[data-theme="dark"] .top-navbar {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* --------------------------------------------------------------------------
   21. PAGE-SPECIFIC POLISH (Calendar, Chat, Facilities, Alerts, Misc)
   -------------------------------------------------------------------------- */

/* Facility calendar */
.facility-calendar-card { overflow: hidden; }
.facility-calendar-toolbar {
    background: linear-gradient(180deg, var(--surface-primary), var(--surface-secondary));
    padding: 0.9rem 1.15rem;
}
.facility-calendar-weekday {
    background: var(--surface-secondary);
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.facility-calendar-day {
    transition: background-color var(--pro-fast) ease, box-shadow var(--pro-fast) ease;
}
.facility-calendar-day:not(.is-outside-month):hover {
    background: color-mix(in srgb, var(--pro-navy-700) 5%, var(--surface-primary));
    box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--pro-gold-500) 55%, transparent);
    z-index: 1;
}
.facility-calendar-day.is-selected .facility-calendar-date {
    background: linear-gradient(180deg, var(--pro-navy-600), var(--pro-navy-700));
    color: #fff;
    box-shadow: 0 4px 10px rgba(29, 53, 87, 0.3);
}
.facility-calendar-event {
    border-radius: 6px;
    font-weight: 600;
    transition: transform var(--pro-fast) var(--pro-ease), box-shadow var(--pro-fast) ease;
}
.facility-calendar-event:hover { transform: translateY(-1px); box-shadow: var(--pro-shadow-sm); }

/* Facility photos & generic images in cards */
.facility-photo-wrap,
.facility-photo-preview {
    border-radius: var(--pro-radius-md);
    overflow: hidden;
    box-shadow: var(--pro-shadow-xs);
}
.card img.card-img-top { transition: transform 700ms var(--pro-ease); }
.card:hover img.card-img-top { transform: scale(1.03); }
.card:has(> img.card-img-top) { overflow: hidden; }

/* Chat panels */
.sports-chat-panel,
.admin-coach-chat-messages,
.sports-chat-messages {
    border-radius: var(--pro-radius-md);
}
.sports-chat-messages > article,
.admin-coach-chat-messages > article {
    border-radius: 14px;
    box-shadow: var(--pro-shadow-xs);
}
.live-dot-indicator {
    box-shadow: 0 0 0 4px rgba(11, 107, 46, 0.18);
}
.chat-message-highlight {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--pro-gold-500) 55%, transparent);
    transition: box-shadow var(--pro-base) ease;
}
.chat-message-quote {
    border-left: 3px solid var(--pro-gold-500);
    border-radius: 6px;
}

/* SweetAlert buttons — match the system buttons */
.swal2-styled.swal2-confirm,
.nemsu-swal-confirm {
    background: linear-gradient(180deg, var(--pro-navy-600), var(--pro-navy-700)) !important;
    border-radius: var(--pro-radius-md) !important;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(29, 53, 87, 0.28) !important;
}
.swal2-styled.swal2-cancel,
.nemsu-swal-cancel {
    border-radius: var(--pro-radius-md) !important;
    font-weight: 600;
}
.nemsu-swal-danger {
    background: linear-gradient(180deg, #c8504e, #b3413f) !important;
}

/* Generic helpers used in views */
.hover-lift { transition: transform var(--pro-base) var(--pro-ease), box-shadow var(--pro-base) var(--pro-ease); }
@media (hover: hover) {
    .hover-lift:hover { transform: translateY(-3px); box-shadow: var(--pro-shadow-md); }
}
.font-monospace {
    font-size: 0.86em;
    letter-spacing: 0;
    color: var(--text-secondary);
}
code {
    background: color-mix(in srgb, var(--pro-navy-700) 8%, transparent);
    color: var(--pro-navy-700);
    padding: 0.12em 0.4em;
    border-radius: 5px;
}
html[data-theme="dark"] code { color: #b9d2f5; background: rgba(107, 151, 214, 0.14); }

/* Page headings inside content */
.main-body > h1, .main-body > h2, .main-body > .h2,
.main-body .page-title {
    font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem);
    margin-bottom: 0.25rem;
}

/* Empty states & muted blocks */
.text-muted { color: var(--text-muted) !important; }
.border-top, .border-bottom, .border { border-color: var(--card-border) !important; }
hr { border-color: var(--card-border); opacity: 1; }

/* Mobile sidebar toggle */
#sidebarToggle {
    border-radius: var(--pro-radius-sm);
    background: var(--surface-primary);
    box-shadow: var(--pro-shadow-xs);
}

/* Notification dropdown */
.notification-center-menu {
    border-radius: 14px;
    overflow: hidden;
    min-width: min(380px, 92vw);
}
.notification-feed-item {
    transition: background-color var(--pro-fast) ease, box-shadow var(--pro-fast) ease;
}
.notification-feed-item:hover {
    background: color-mix(in srgb, var(--pro-navy-700) 6%, transparent);
    box-shadow: inset 3px 0 0 var(--pro-gold-500);
}

/* Global image preview */
.image-preview-trigger {
    cursor: zoom-in;
    transition: filter var(--pro-fast) ease, transform var(--pro-fast) var(--pro-ease);
}

@media (hover: hover) {
    .image-preview-trigger:hover {
        filter: brightness(0.96);
        transform: scale(1.025);
    }
}

.image-preview-trigger:focus-visible {
    outline: 3px solid var(--pro-gold-400);
    outline-offset: 3px;
}

.image-preview-modal[hidden] {
    display: none;
}

.image-preview-modal {
    position: fixed;
    z-index: 2000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: clamp(0.75rem, 3vw, 2rem);
    overflow: auto;
    background: rgba(4, 10, 20, 0.88);
    opacity: 0;
    transition: opacity 180ms ease;
}

.image-preview-modal.is-open {
    opacity: 1;
}

.image-preview-modal__frame {
    position: relative;
    display: grid;
    place-items: center;
    max-width: 100%;
    max-height: 100%;
    transform: scale(0.98);
    transition: transform 180ms var(--pro-ease);
}

.image-preview-modal.is-open .image-preview-modal__frame {
    transform: scale(1);
}

.image-preview-modal__image {
    display: block;
    width: auto;
    height: auto;
    max-width: min(92vw, 1200px);
    max-height: 84vh;
    object-fit: contain;
    border-radius: var(--pro-radius-sm);
    box-shadow: 0 24px 72px rgba(0, 0, 0, 0.42);
}

.image-preview-modal__close {
    position: fixed;
    top: max(0.75rem, env(safe-area-inset-top));
    right: max(0.75rem, env(safe-area-inset-right));
    z-index: 1;
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font: inherit;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
}

.image-preview-modal__close:hover,
.image-preview-modal__close:focus-visible {
    background: rgba(255, 255, 255, 0.18);
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.image-preview-modal__message {
    margin: 0;
    max-width: min(92vw, 32rem);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--pro-radius-md);
    background: rgba(15, 23, 42, 0.88);
    color: #fff;
    text-align: center;
}

@media (prefers-reduced-motion: reduce) {
    .image-preview-trigger,
    .image-preview-modal,
    .image-preview-modal__frame {
        transition: none;
    }
}
