/* =============================================================
   Youth Registration & Management System - Custom styles
   ============================================================= */
:root {
    --font-main: "Agency FB", "AgencyFB", "Bahnschrift SemiCondensed", "Arial Narrow", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
    --sidebar-w: 264px;
    --sidebar-bg: #0d1a2d;
    --sidebar-active: #2563eb;
    --topbar-h: 66px;
    --accent: #1d4ed8;
    --brand: #1d4ed8;
    --brand-dark: #1e40af;
    --brand-soft: #e8efff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e5ebf3;
    --surface: #ffffff;
    --page: #f4f7fb;
    --logo-sidebar-h: 36px;
    --logo-sidebar-max: 120px;
    --logo-mark: 96px;
    --bs-primary: #1d4ed8;
    --bs-primary-rgb: 29, 78, 216;
    --bs-link-color: #1d4ed8;
    --bs-link-color-rgb: 29, 78, 216;
    --bs-link-hover-color: #1e40af;
    --bs-link-hover-color-rgb: 30, 64, 175;
}

* { box-sizing: border-box; }

html { font-size: 17px; }

body {
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: .015em;
    line-height: 1.5;
    background: #eef2f7;
    margin: 0;
    color: #1e293b;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* ---------- Sidebar ---------- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--sidebar-bg);
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    z-index: 1040;
    overflow-x: hidden;
    transition: transform .25s ease;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: 1.1rem 1.25rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-brand i { color: var(--sidebar-active); font-size: 1.3rem; }
.sidebar-brand span {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-brand .brand-logo {
    height: var(--logo-sidebar-h);
    max-width: var(--logo-sidebar-max);
    width: auto;
    object-fit: contain;
    border-radius: 0;
    flex-shrink: 0;
    display: block;
}
.brand-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--logo-sidebar-h);
    max-width: var(--logo-sidebar-max);
    overflow: hidden;
    flex-shrink: 0;
}
.brand-logo-wrap .brand-logo {
    height: auto;
    width: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}
img.brand-logo {
    max-height: var(--logo-sidebar-h);
    max-width: var(--logo-sidebar-max);
}

.sidebar-nav {
    list-style: none;
    margin: 0;
    padding: .75rem;
    flex: 1;
    overflow-y: auto;
}
.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .6rem .8rem;
    border-radius: .5rem;
    color: #cbd5e1;
    text-decoration: none;
    margin-bottom: 2px;
    font-size: .92rem;
    transition: background .15s, color .15s;
}
.sidebar-nav .nav-link i { font-size: 1.05rem; width: 1.2rem; text-align: center; }
.sidebar-nav .nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar-nav .nav-link.active {
    background: var(--sidebar-active);
    color: #fff;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar-user {
    display: flex;
    align-items: center;
    gap: .7rem;
}
.sidebar-user .avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--sidebar-active);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}
.sidebar-user .name { font-weight: 600; color: #fff; font-size: .9rem; }
.sidebar-user .role { font-size: .75rem; color: #94a3b8; }

/* ---------- Main content ---------- */
.main-content {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    position: sticky;
    top: 0;
    height: var(--topbar-h);
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    z-index: 1030;
}
.topbar-title { font-size: 1.15rem; font-weight: 700; }
.topbar-location { color: #475569; font-size: .88rem; }
.btn-icon {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: #334155;
    padding: .25rem .5rem;
}

main.container-fluid { flex: 1; }

.footer { border-top: 1px solid #e2e8f0; background: #fff; }

/* ---------- Cards & stat tiles ---------- */
.card {
    border: 1px solid #e2e8f0;
    border-radius: .75rem;
}
.card-header { background: #fff; border-bottom: 1px solid #eef2f7; font-weight: 600; }

.stat-card {
    border-radius: .75rem;
    padding: 1.1rem 1.25rem;
    color: #fff;
    height: 100%;
}
.stat-card .stat-icon {
    font-size: 1.6rem;
    opacity: .9;
}
.stat-card .stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1.2; }
.stat-card .stat-label { font-size: .82rem; opacity: .9; }
.stat-primary { background: linear-gradient(135deg,#0d6efd,#0b5ed7); }
.stat-success { background: linear-gradient(135deg,#198754,#146c43); }
.stat-warning { background: linear-gradient(135deg,#ffc107,#d39e00); color: #1e293b; }
.stat-danger  { background: linear-gradient(135deg,#dc3545,#b02a37); }
.stat-info    { background: linear-gradient(135deg,#0dcaf0,#0aa2c0); color: #1e293b; }
.stat-secondary { background: linear-gradient(135deg,#6c757d,#565e64); }

/* ---------- Tables ---------- */
.table thead th {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .02em;
    color: #475569;
}
.table td { vertical-align: middle; }

/* ---------- Login ---------- */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg,#1e293b 0%,#0f172a 100%);
}
.login-wrap { width: 100%; max-width: 420px; padding: 1rem; }
.login-logo {
    width: var(--logo-mark);
    height: var(--logo-mark);
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    overflow: hidden;
}
.login-logo.is-image {
    background: #fff;
    border-radius: 20px;
    padding: 12px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .15);
}
.login-logo img,
.check-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.brand-preview {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .75rem 1.1rem;
    border-radius: .5rem;
    background: #1e293b;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    max-width: 100%;
}
.brand-preview .brand-logo {
    height: var(--logo-sidebar-h);
    max-width: var(--logo-sidebar-max);
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
}
.brand-preview i { color: #38bdf8; font-size: 1.4rem; }

/* ---------- Misc ---------- */
.progress { height: .7rem; border-radius: 1rem; }
.progress-sm { height: .45rem; }
.avatar-sm {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--accent); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .85rem;
}
.empty-state {
    text-align: center; color: #94a3b8; padding: 3rem 1rem;
}
.empty-state i { font-size: 3rem; display: block; margin-bottom: .5rem; opacity: .4; }
.section-title { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: #475569; }

/* ---------- Searchable select ---------- */
.ss-wrap { position: relative; }
.ss-menu {
    position: absolute;
    z-index: 1055;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    max-height: 260px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--line, #dbe3ec);
    border-radius: .5rem;
    box-shadow: 0 12px 28px -18px rgba(15, 23, 42, .55);
    padding: .25rem;
}
.ss-option {
    display: block;
    width: 100%;
    border: 0;
    background: transparent;
    color: #1e293b;
    text-align: left;
    padding: .45rem .65rem;
    border-radius: .375rem;
    font-size: .875rem;
    line-height: 1.3;
}
.ss-option:hover,
.ss-option.active { background: #eef4ff; color: #1d4ed8; }
.ss-empty { padding: .5rem .65rem; color: #94a3b8; font-size: .85rem; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); box-shadow: 0 0 40px rgba(0,0,0,.3); }
    .main-content { margin-left: 0; }
}

/* ---------- Professional theme refresh ---------- */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-weight: 700;
    letter-spacing: .015em;
}

.sidebar {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    box-shadow: 6px 0 28px -22px rgba(15, 23, 42, .8);
}
.sidebar-brand {
    text-transform: uppercase;
    letter-spacing: .05em;
}
.sidebar-nav .nav-link {
    font-weight: 700;
    letter-spacing: .025em;
    border-left: 3px solid transparent;
}
.sidebar-nav .nav-link:hover {
    background: rgba(148, 163, 184, .12);
}
.sidebar-nav .nav-link.active {
    background: linear-gradient(90deg, rgba(14, 165, 233, .95), rgba(2, 132, 199, .85));
    border-left-color: #7dd3fc;
    box-shadow: 0 8px 18px -12px rgba(2, 132, 199, .9);
}

.topbar {
    box-shadow: 0 1px 0 #e2e8f0, 0 12px 26px -26px rgba(15, 23, 42, .7);
}
.topbar-title { letter-spacing: .025em; }

.card {
    border-color: #dbe4ee;
    border-radius: .85rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 18px 36px -30px rgba(15, 23, 42, .45);
}
.card-header {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    font-weight: 700;
    letter-spacing: .03em;
    border-bottom-color: #e2e8f0;
    padding: .85rem 1.1rem;
}

.table thead th {
    background: #eef2f7;
    color: #334155;
    font-weight: 700;
    font-size: .76rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    border-bottom: 2px solid #cbd5e1;
    padding: .8rem .85rem;
    white-space: nowrap;
}
.table tbody td {
    padding: .75rem .85rem;
    border-color: #eef2f7;
    vertical-align: middle;
}
.table-hover > tbody > tr:hover > td,
.table-hover > tbody > tr:hover > th {
    background-color: #f8fafc;
}
.table-sm thead th,
.table-sm tbody td { padding: .55rem .65rem; }

.btn {
    font-family: var(--font-main);
    font-weight: 700;
    letter-spacing: .03em;
    border-radius: .55rem;
}
.btn-sm { letter-spacing: .02em; }
.btn-outline-primary { border-width: 2px; }

.form-label {
    font-weight: 700;
    letter-spacing: .02em;
}
.form-control,
.form-select {
    font-family: var(--font-main);
    font-weight: 600;
    border-radius: .55rem;
    border-color: #cbd5e1;
}
.form-control:focus,
.form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .15);
}
.input-group-text { font-weight: 700; }

.badge {
    font-weight: 700;
    letter-spacing: .03em;
}
.stat-card {
    border: 0;
    box-shadow: 0 16px 32px -20px rgba(15, 23, 42, .6);
}
.stat-card .stat-label {
    text-transform: uppercase;
    letter-spacing: .05em;
    font-size: .72rem;
}
.section-title {
    color: #334155;
    letter-spacing: .08em;
}
code {
    font-weight: 700;
    color: #0b5ed7;
}
.pagination { font-weight: 700; }
.dropdown-menu { font-weight: 600; }
.modal-title { font-weight: 700; letter-spacing: .02em; }
.fw-semibold,
.fw-medium { font-weight: 700 !important; }

.login-body {
    background: radial-gradient(1200px 600px at 50% 0%, #1e3a5f 0%, #0f172a 55%, #0b1120 100%);
}
.login-card {
    border-top: 4px solid var(--accent);
}
.login-card h1 {
    text-transform: uppercase;
    letter-spacing: .06em;
}
.brand-preview {
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* =============================================================
   Professional UI refresh v2
   ============================================================= */
body {
    background: var(--page);
    color: var(--ink);
    font-size: .95rem;
    letter-spacing: .012em;
}
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
::selection { background: rgba(29,78,216,.16); }

/* ---------- Sidebar ---------- */
.sidebar {
    background:
        radial-gradient(600px 240px at 0% 0%, rgba(37,99,235,.28), transparent 70%),
        linear-gradient(180deg, #0b1728 0%, #0d1d33 55%, #0a1626 100%);
    border-right: 1px solid rgba(148,163,184,.12);
    box-shadow: 10px 0 40px -32px rgba(15,23,42,.9);
}
.sidebar-brand {
    gap: .75rem;
    padding: 1.15rem 1.15rem;
    border-bottom: 1px solid rgba(148,163,184,.14);
    text-transform: none;
    letter-spacing: 0;
}
.brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.15;
}
.brand-name {
    color: #fff;
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: .055em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.brand-sub {
    color: #7f97b8;
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    margin-top: .15rem;
}
.sidebar-nav {
    padding: .55rem .7rem 1rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(148,163,184,.25) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(148,163,184,.25);
    border-radius: 99px;
}
.nav-section {
    padding: 1rem .75rem .35rem;
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: #67809f;
}
.sidebar-nav .nav-link {
    gap: .7rem;
    padding: .54rem .7rem;
    border-radius: .55rem;
    border-left: 3px solid transparent;
    color: #a9bad0;
    font-size: .86rem;
    font-weight: 700;
    letter-spacing: .025em;
    margin-bottom: 1px;
}
.sidebar-nav .nav-link i {
    width: 1.35rem;
    font-size: 1rem;
    color: #7f97b8;
    transition: color .15s;
}
.sidebar-nav .nav-link:hover {
    background: rgba(148,163,184,.10);
    color: #fff;
}
.sidebar-nav .nav-link:hover i { color: #bfdbfe; }
.sidebar-nav .nav-link.active {
    background: linear-gradient(90deg, rgba(37,99,235,.95), rgba(29,78,216,.62));
    border-left-color: #93c5fd;
    color: #fff;
    box-shadow: 0 10px 22px -18px rgba(37,99,235,1);
}
.sidebar-nav .nav-link.active i { color: #dbeafe; }
.sidebar-footer {
    padding: .8rem;
    border-top: 1px solid rgba(148,163,184,.14);
}
.sidebar-user {
    padding: .6rem .65rem;
    border: 1px solid rgba(148,163,184,.14);
    border-radius: .7rem;
    background: rgba(255,255,255,.035);
}
.sidebar-user .avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg,#3b82f6,#1d4ed8);
    box-shadow: 0 6px 14px -8px rgba(37,99,235,.9);
    font-size: .9rem;
}
.sidebar-user .name { font-size: .82rem; font-weight: 700; }
.sidebar-user .role {
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #7f97b8;
    margin-top: .1rem;
}
.sidebar-user-meta { flex: 1; min-width: 0; }
.sidebar-user-meta .name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-logout {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .4rem;
    color: #7f97b8;
    font-size: .9rem;
    text-decoration: none;
    transition: background .15s, color .15s;
}
.sidebar-logout:hover { background: rgba(255,255,255,.07); color: #fca5a5; }

.brand-preview {
    display: flex;
    align-items: center;
    gap: .75rem;
    max-width: 100%;
    padding: .85rem 1rem;
    border: 1px solid rgba(148,163,184,.16);
    border-radius: .8rem;
    background:
        radial-gradient(400px 160px at 0% 0%, rgba(37,99,235,.28), transparent 70%),
        linear-gradient(180deg,#0b1728,#0d1d33);
    text-transform: none;
    letter-spacing: 0;
    font-size: 1rem;
}
.brand-preview i { color: #38bdf8; font-size: 1.4rem; }

/* ---------- Topbar ---------- */
.topbar {
    height: var(--topbar-h);
    padding: 0 1.6rem;
    background: rgba(255,255,255,.92);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.topbar-heading {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.1;
    min-width: 0;
}
.topbar-title {
    font-size: 1.06rem;
    font-weight: 700;
    letter-spacing: .03em;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.topbar-sub {
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #93a3b8;
    margin-top: .2rem;
}
.topbar-location {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .32rem .7rem;
    background: #f5f8fc;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #526176;
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.topbar-location i { color: var(--brand); font-size: .8rem; }
.topbar-divider { width: 1px; height: 26px; background: var(--line); }
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: .6rem;
    color: #526176;
    font-size: 1.2rem;
    background: transparent;
    border: 1px solid transparent;
}
.btn-icon:hover { background: #f2f6fb; border-color: var(--line); color: var(--ink); }
.user-menu {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .28rem .5rem .28rem .35rem;
    border: 1px solid transparent;
    border-radius: .7rem;
    background: transparent;
    color: var(--ink);
}
.user-menu:hover, .user-menu.show { background: #f5f8fc; border-color: var(--line); }
.user-menu::after { display: none; }
.user-menu .avatar-sm {
    width: 34px;
    height: 34px;
    font-size: .8rem;
    background: linear-gradient(135deg,#3b82f6,#1d4ed8);
    box-shadow: 0 6px 14px -10px rgba(37,99,235,.9);
}
.user-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
    text-align: left;
}
.user-name {
    font-size: .78rem;
    font-weight: 700;
    color: var(--ink);
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-role {
    font-size: .57rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #93a3b8;
    margin-top: .1rem;
}
.user-chevron { font-size: .62rem; color: #93a3b8; }
.dropdown-menu {
    border: 1px solid var(--line);
    border-radius: .75rem;
    padding: .35rem;
    box-shadow: 0 24px 48px -28px rgba(15,23,42,.55);
}
.dropdown-item {
    border-radius: .5rem;
    padding: .5rem .65rem;
    font-size: .82rem;
    font-weight: 600;
    color: #334155;
}
.dropdown-item:hover, .dropdown-item:focus { background: #f3f7fc; color: var(--ink); }
.dropdown-item.text-danger:hover { background: #fef2f2; color: #b91c1c; }
.dropdown-item-text { padding: .5rem .65rem; }
.dropdown-divider { margin: .3rem 0; border-color: var(--line); }

/* ---------- Page shell ---------- */
main.container-fluid { padding: 1.7rem 1.9rem 2rem !important; }
.footer {
    border-top: 1px solid var(--line);
    background: transparent;
    color: #93a3b8 !important;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    padding: 1rem;
}

/* ---------- Cards ---------- */
.card {
    border: 1px solid var(--line);
    border-radius: .85rem;
    box-shadow: 0 1px 2px rgba(15,23,42,.03), 0 14px 30px -28px rgba(15,23,42,.35);
    background: var(--surface);
}
.card-header {
    padding: .8rem 1.1rem;
    background: linear-gradient(180deg,#fff,#fbfcfe);
    border-bottom: 1px solid #eef3f9;
    color: var(--ink);
    font-size: .86rem;
    font-weight: 700;
    letter-spacing: .035em;
}
.card-header i { color: var(--brand); }
.card-body { padding: 1.15rem; }
.card-footer { background: #fbfcfe; border-top: 1px solid #eef3f9; }

/* ---------- Stat tiles ---------- */
.stat-card {
    position: relative;
    overflow: hidden;
    padding: 1.05rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: .85rem;
    background: #fff !important;
    color: var(--ink) !important;
    box-shadow: 0 1px 2px rgba(15,23,42,.03), 0 16px 30px -28px rgba(15,23,42,.4);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.stat-card:hover {
    transform: translateY(-2px);
    border-color: #d3dfed;
    box-shadow: 0 2px 4px rgba(15,23,42,.04), 0 22px 40px -30px rgba(15,23,42,.5);
}
.stat-card::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--stat-color, var(--brand));
    opacity: .9;
}
.stat-card .stat-icon {
    width: 40px;
    height: 40px;
    border-radius: .65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    opacity: 1;
    color: var(--stat-color, var(--brand));
    background: var(--stat-bg, #eef3fb);
}
.stat-card .stat-value {
    margin-top: .65rem;
    font-size: 1.7rem;
    line-height: 1;
    color: var(--ink);
    letter-spacing: .01em;
}
.stat-card .stat-label {
    margin-top: .28rem;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #7b8ba1;
    opacity: 1;
}
.stat-primary { --stat-color: #1d4ed8; --stat-bg: #e8efff; }
.stat-success { --stat-color: #15803d; --stat-bg: #e8f7ee; }
.stat-warning { --stat-color: #b45309; --stat-bg: #fdf3e3; }
.stat-danger  { --stat-color: #b91c1c; --stat-bg: #fdecec; }
.stat-info    { --stat-color: #0e7490; --stat-bg: #e6f7fb; }
.stat-secondary { --stat-color: #475569; --stat-bg: #eef2f7; }

/* ---------- Headings & text ---------- */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 { color: var(--ink); letter-spacing: .02em; }
.text-muted { color: #7b8ba1 !important; }
.small, small { font-size: .8rem; }
.display-6 { font-size: 2.1rem; letter-spacing: .01em; }
.section-title { color: #5b6b82; font-size: .68rem; letter-spacing: .14em; }

/* ---------- Tables ---------- */
.table {
    --bs-table-bg: transparent;
    margin-bottom: 0;
    color: #334155;
    font-size: .86rem;
}
.table thead th {
    background: #f6f9fc;
    color: #61718a;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
    border-bottom: 1px solid #e4ebf3;
    padding: .72rem .9rem;
    white-space: nowrap;
}
.table tbody td {
    padding: .68rem .9rem;
    border-color: #eef3f9;
    vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table-hover > tbody > tr:hover > * { background-color: #f8fbfe; }
.table-sm thead th, .table-sm tbody td { padding: .5rem .65rem; }
.table > :not(caption) > * > * { box-shadow: none; }

/* ---------- Forms ---------- */
.form-label {
    margin-bottom: .3rem;
    color: #5b6b82;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.form-text { font-size: .72rem; color: #8a99ad; }
.form-control, .form-select {
    min-height: 42px;
    padding: .5rem .75rem;
    font-size: .88rem;
    font-weight: 600;
    color: var(--ink);
    background-color: #fff;
    border: 1px solid #d8e2ee;
    border-radius: .55rem;
    box-shadow: 0 1px 1px rgba(15,23,42,.02);
    transition: border-color .15s, box-shadow .15s;
}
.form-control::placeholder { color: #a2afc0; font-weight: 600; }
.form-control:focus, .form-select:focus {
    border-color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(29,78,216,.13);
}
textarea.form-control { min-height: auto; }
.input-group-text {
    padding: .5rem .7rem;
    color: #61718a;
    background: #f6f9fc;
    border: 1px solid #d8e2ee;
    border-radius: .55rem;
    font-weight: 700;
}
.input-group > .input-group-text:first-child { border-right: 0; }
.input-group > .form-control:not(:first-child) { border-left: 0; }
.input-group > .input-group-text:first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.input-group > .form-control:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
.input-group > .form-control:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.input-group > .input-group-text:last-child {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
.input-group-lg > .form-control,
.input-group-lg > .input-group-text { min-height: 52px; }

/* ---------- Buttons ---------- */
.btn {
    padding: .5rem .9rem;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .035em;
    border-radius: .55rem;
    transition: background-color .15s, border-color .15s, box-shadow .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: .34rem .65rem; font-size: .72rem; border-radius: .45rem; }
.btn-lg { padding: .7rem 1.2rem; font-size: .9rem; }
.btn-primary {
    --bs-btn-bg: #1d4ed8;
    --bs-btn-border-color: #1d4ed8;
    --bs-btn-hover-bg: #1e40af;
    --bs-btn-hover-border-color: #1e40af;
    --bs-btn-active-bg: #1c3fa8;
    --bs-btn-active-border-color: #1c3fa8;
    --bs-btn-disabled-bg: #93b0ee;
    --bs-btn-disabled-border-color: #93b0ee;
    box-shadow: 0 10px 20px -14px rgba(29,78,216,.85);
}
.btn-outline-primary {
    --bs-btn-color: #1d4ed8;
    --bs-btn-border-color: #b9cdf4;
    --bs-btn-hover-bg: #1d4ed8;
    --bs-btn-hover-border-color: #1d4ed8;
    --bs-btn-active-bg: #1e40af;
    --bs-btn-active-border-color: #1e40af;
    border-width: 1px;
}
.btn-light { background: #f6f9fc; border-color: var(--line); color: #475569; }

/* ---------- Badges ---------- */
.badge {
    padding: .32em .6em;
    border-radius: 999px;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    border: 1px solid transparent;
}
.badge.bg-success { background: #e5f6ec !important; color: #15803d !important; border-color: #c7ebd5; }
.badge.bg-warning { background: #fdf3e0 !important; color: #a45a09 !important; border-color: #f4dfb5; }
.badge.bg-danger { background: #fdeaea !important; color: #b42323 !important; border-color: #f6cccc; }
.badge.bg-primary { background: #e8efff !important; color: #1d4ed8 !important; border-color: #c9d9fb; }
.badge.bg-info { background: #e4f6fa !important; color: #0e7490 !important; border-color: #c2e9f1; }
.badge.bg-secondary { background: #eef2f7 !important; color: #475569 !important; border-color: #dde5ee; }
.badge.text-bg-success { background: #15803d !important; color: #fff !important; }
.badge.text-bg-secondary { background: #64748b !important; color: #fff !important; }

/* ---------- Alerts & progress ---------- */
.alert { border-radius: .7rem; border-width: 1px; font-weight: 600; font-size: .84rem; }
.progress { height: .5rem; background: #edf2f8; border-radius: 999px; }
.progress-bar { border-radius: 999px; }

/* ---------- Pagination ---------- */
.pagination {
    --bs-pagination-border-color: var(--line);
    --bs-pagination-color: #526176;
    --bs-pagination-hover-bg: #f3f7fc;
    --bs-pagination-active-bg: #1d4ed8;
    --bs-pagination-active-border-color: #1d4ed8;
    font-size: .78rem;
}
.page-link { border-radius: .45rem !important; margin: 0 2px; font-weight: 700; }

/* ---------- Empty state & code ---------- */
.empty-state { padding: 2.6rem 1rem; color: #8a99ad; font-size: .82rem; }
.empty-state i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: .6rem;
    border-radius: 50%;
    background: #f2f6fb;
    color: #a4b2c5;
    font-size: 1.4rem;
    opacity: 1;
}
code {
    color: #1d4ed8;
    background: #f2f6fb;
    padding: .15rem .35rem;
    border-radius: .35rem;
    font-size: .82em;
}

/* ---------- Login split layout ---------- */
.login-body {
    display: block;
    min-height: 100vh;
    padding: 0;
    background: #f4f7fb;
}
.login-shell { display: flex; min-height: 100vh; }
.login-watermark {
    position: absolute;
    inset: 0;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 125% auto;
    pointer-events: none;
    z-index: 0;
}
.login-watermark-light {
    opacity: .32;
}
@media (max-width: 767.98px) {
    .login-watermark { background-size: 190% auto; }
    .login-watermark-light { opacity: .26; }
}
.login-aside {
    position: relative;
    flex: 0 0 46%;
    max-width: 640px;
    display: flex;
    flex-direction: column;
    padding: 2.4rem 2.6rem;
    color: #dbe7f6;
    overflow: hidden;
    background:
        radial-gradient(700px 420px at 15% 10%, rgba(59,130,246,.35), transparent 65%),
        radial-gradient(520px 380px at 85% 90%, rgba(14,165,233,.18), transparent 60%),
        linear-gradient(160deg,#0b1728 0%,#0d1f38 55%,#0a1627 100%);
}
.login-aside::after {
    content: "";
    position: absolute;
    inset: auto -80px -120px auto;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    border: 1px solid rgba(147,197,253,.16);
    box-shadow: 0 0 0 40px rgba(147,197,253,.04), 0 0 0 90px rgba(147,197,253,.03);
}
.login-aside-brand {
    display: flex;
    align-items: center;
    gap: .7rem;
    position: relative;
    z-index: 1;
}
.login-aside-logo {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: .65rem;
    background: #fff;
    box-shadow: 0 10px 24px -16px rgba(0,0,0,.8);
}
.login-aside-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.login-aside-logo i { color: #1d4ed8; font-size: 1.3rem; }
.login-aside-brand span {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #fff;
}
.login-aside-copy {
    position: relative;
    z-index: 1;
    margin: auto 0;
    max-width: 470px;
    padding: 2.5rem 0;
}
.login-kicker {
    display: inline-block;
    margin-bottom: 1rem;
    padding: .32rem .7rem;
    border: 1px solid rgba(147,197,253,.28);
    border-radius: 999px;
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: #bfdbfe;
    background: rgba(30,64,175,.22);
}
.login-aside-copy h1 {
    color: #fff;
    font-size: 2rem;
    line-height: 1.15;
    letter-spacing: .02em;
    margin-bottom: .85rem;
}
.login-aside-copy p {
    color: #9fb5cf;
    font-size: .9rem;
    line-height: 1.6;
    margin-bottom: 1.4rem;
}
.login-points {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .55rem;
}
.login-points li {
    display: flex;
    align-items: center;
    gap: .55rem;
    color: #cfe0f3;
    font-size: .84rem;
}
.login-points i { color: #60a5fa; }
.login-aside-foot {
    position: relative;
    z-index: 1;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #6c86a8;
}
.login-panel {
    position: relative;
    overflow: hidden;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.4rem 1.4rem;
    background: #f4f7fb;
}
.login-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    border: 1px solid var(--line) !important;
    border-top: 3px solid var(--brand) !important;
    border-radius: 1rem;
    box-shadow: 0 2px 4px rgba(15,23,42,.03), 0 30px 60px -40px rgba(15,23,42,.45);
}
.login-card .card-body { padding: 2.6rem 2.4rem !important; }
.login-logo {
    width: 72px;
    height: 72px;
    margin: 0 auto .9rem;
    border-radius: 1rem;
    background: var(--brand);
    box-shadow: 0 14px 28px -18px rgba(29,78,216,.9);
}
.login-logo.is-image {
    background: #f6f9fc;
    border: 1px solid var(--line);
    padding: 10px;
    box-shadow: 0 14px 28px -22px rgba(15,23,42,.5);
}
.login-card h1 {
    font-size: 1.28rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.login-card .text-muted.small { font-size: .8rem; }
.login-card .input-group .input-group-text { background: #f6f9fc; }
.login-card .btn-primary { padding: .68rem 1rem; font-size: .86rem; }
.login-card a { font-weight: 700; }
.password-toggle {
    border: 1px solid #d8e2ee;
    border-left: 0;
    border-radius: 0 .55rem .55rem 0;
    background: #f6f9fc;
    color: #61718a;
    padding: 0 .8rem;
    font-size: .95rem;
}
.password-toggle:hover { background: #eef3f9; color: var(--ink); }
.login-panel-foot {
    text-align: center;
    margin-top: 1rem;
    font-size: .66rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #93a3b8;
}
@media (max-width: 991.98px) {
    .login-panel { align-items: flex-start; padding-top: 3rem; }
}

/* ---------- Check registration page ---------- */
.check-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(59,130,246,.22), transparent 55%),
        radial-gradient(800px 400px at 90% 110%, rgba(16,185,129,.12), transparent 50%),
        linear-gradient(165deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
}
.check-card {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 680px;
    margin: 0;
    border: none !important;
    border-radius: 1.25rem;
    background: #ffffff;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.05);
}
.check-card > .card-body { position: relative; z-index: 1; padding: 2.5rem !important; }
.check-watermark {
    position: absolute; inset: 0;
    background-repeat: no-repeat; background-position: center 60%; background-size: min(90%, 520px) auto;
    opacity: .035; pointer-events: none; z-index: 0;
}
.check-logo {
    width: 72px; height: 72px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; font-size: 1.75rem; color: #fff;
    border-radius: 1rem !important;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    box-shadow: 0 10px 25px -5px rgba(37,99,235,.45);
}
.check-logo.is-image {
    padding: 10px; background: #fff !important;
    border: 1px solid #e2e8f0; box-shadow: 0 4px 12px rgba(15,23,42,.06);
}
.check-card .check-title { font-size: 1.625rem; font-weight: 700; color: #0f172a; letter-spacing: -.025em; }
.check-card .check-subtitle { color: #64748b; font-size: .9375rem; }
.check-tabs { background: #f1f5f9; padding: .375rem; border-radius: .75rem; gap: .25rem; }
.check-tabs .nav-link {
    color: #475569; font-weight: 600; font-size: .8125rem; padding: .625rem .75rem;
    border-radius: .5rem; transition: all .2s ease; border: none;
}
.check-tabs .nav-link:hover:not(.active) { color: #1e293b; background: rgba(255,255,255,.7); }
.check-tabs .nav-link.active {
    background: #fff; color: #2563eb; box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
}
.check-card .form-control, .check-card .form-select {
    border-radius: .625rem; border: 1px solid #e2e8f0; padding: .6875rem .875rem; font-size: .9375rem;
    transition: border-color .15s, box-shadow .15s;
}
.check-card .form-control:focus, .check-card .form-select:focus {
    border-color: #93c5fd; box-shadow: 0 0 0 4px rgba(59,130,246,.12);
}
.check-card .input-group-text { background: #f8fafc; border: 1px solid #e2e8f0; color: #64748b; border-radius: .625rem 0 0 .625rem; }
.check-card .input-group-lg > .form-control { padding: .875rem 1rem; font-size: 1rem; }
.check-card .input-group-lg > .input-group-text { padding: .875rem 1rem; }
.check-card .btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%); border: none;
    padding: .8125rem 1.25rem; border-radius: .625rem; font-weight: 600; font-size: .9375rem;
    box-shadow: 0 4px 14px -3px rgba(37,99,235,.45); transition: all .2s;
}
.check-card .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px -3px rgba(37,99,235,.5); }
.check-card .btn-success { border-radius: .625rem; font-weight: 600; }
.check-card .alert { border: none; border-radius: .75rem; padding: 1rem 1.25rem; }
.check-card .alert-success.result-ok { background: #f0fdf4; color: #166534; border-left: 4px solid #22c55e; }
.check-card .alert-danger.result-no { background: #fef2f2; color: #991b1b; border-left: 4px solid #ef4444; }
.check-card .alert-warning { background: #fffbeb; color: #92400e; }
.check-card .alert-info { background: #eff6ff; color: #1e40af; }
.check-info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
.check-info-item { background: #f8fafc; padding: .75rem 1rem; border-radius: .625rem; border: 1px solid #f1f5f9; }
.check-info-item .label { font-size: .6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: #64748b; margin-bottom: .125rem; }
.check-info-item .value { font-size: .875rem; font-weight: 600; color: #1e293b; word-break: break-word; }
.check-info-item.full { grid-column: span 2; }
.check-section { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid #e2e8f0; }
.check-section-title { font-size: .8125rem; font-weight: 700; color: #334155; margin-bottom: .75rem; display: flex; align-items: center; gap: .5rem; }
.check-section-title i { color: #2563eb; }
.check-card .table { font-size: .8125rem; margin: 0; }
.check-card .table th { background: #f8fafc; font-weight: 600; color: #475569; border-color: #e2e8f0; }
.check-card .table td { border-color: #f1f5f9; vertical-align: middle; }
.check-card .table-responsive { border-radius: .625rem; border: 1px solid #e2e8f0; overflow: hidden; }
.check-footer { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid #f1f5f9; text-align: center; }
.check-footer a { color: #64748b; font-size: .8125rem; font-weight: 500; text-decoration: none; }
.check-footer a:hover { color: #2563eb; }
@media (max-width: 576px) {
    .check-card > .card-body { padding: 1.5rem !important; }
    .check-info-grid { grid-template-columns: 1fr; }
    .check-info-item.full { grid-column: span 1; }
    .check-tabs .nav-link { font-size: .75rem; padding: .5rem .375rem; }
    .check-tabs .nav-link i { display: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 767.98px) {
    main.container-fluid { padding: 1.1rem !important; }
    .topbar { padding: 0 .9rem; }
    .footer { padding: .85rem; }
}

/* ---------- Print ---------- */
@media print {
    .sidebar,
    .topbar,
    .footer,
    .btn,
    .pagination,
    .filter-card { display: none !important; }
    .main-content { margin-left: 0 !important; }
    body { background: #fff !important; color: #000 !important; }
    main.container-fluid { padding: 0 !important; }
    .card { border: 0 !important; box-shadow: none !important; }
    .card-header { background: #fff !important; border-bottom: 1px solid #ccc !important; }
    .table thead th { background: #fff !important; color: #000 !important; }
    .table td, .table th { border-color: #ddd !important; }
    a[href]::after { content: "" !important; }
}
