/* ============================================================
   SAFD Central — Shared UI Theme (matches postimages.php)
   Glass cards · cyan/violet/pink · JetBrains Mono labels
   ============================================================ */
:root {
    --c-cyan: #22d3ee;
    --c-violet: #8b5cf6;
    --c-pink: #f472b6;
    --c-amber: #fbbf24;
    --c-green: #34d399;
    --c-red: #fb7185;
    --c-bg: #070b18;
    --c-glass: rgba(15, 23, 42, 0.55);
    --c-glass-strong: rgba(10, 15, 30, 0.82);
    --c-line: rgba(148, 163, 184, 0.14);
    --c-line-soft: rgba(148, 163, 184, 0.08);
    --c-txt: #e2e8f0;
    --c-muted: #8fa1bd;
    --sidebar-width: 80px;
    --topbar-h: 64px;
    --radius: 18px;
    --font-mono: 'JetBrains Mono', 'Consolas', monospace;
    --shadow-glow: 0 0 0 1px rgba(34, 211, 238, 0.08), 0 20px 50px -20px rgba(0, 0, 0, 0.7);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scrollbar-color: rgba(34,211,238,.35) transparent; }
body {
    font-family: 'Inter', sans-serif;
    background: var(--c-bg);
    color: var(--c-txt);
    min-height: 100vh;
    overflow-x: hidden;
    padding-left: calc(var(--sidebar-width) + 20px);
    -webkit-font-smoothing: antialiased;
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148,163,184,.2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(34,211,238,.4); }

/* ================= Top Bar ================= */
.topbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    height: var(--topbar-h);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 28px 0 calc(var(--sidebar-width) + 28px);
    background: rgba(7, 11, 24, 0.72);
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--c-line);
}
.topbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(34,211,238,.6), rgba(139,92,246,.6), transparent); }
.crumb { display: flex; align-items: center; gap: 12px; font-size: .82rem; color: var(--c-muted); font-family: var(--font-mono); }
.crumb a { color: var(--c-muted); text-decoration: none; transition: .2s; }
.crumb a:hover { color: var(--c-cyan); }
.crumb i { font-size: .6rem; opacity: .7; }
.crumb b { color: var(--c-cyan); font-weight: 500; }
.user-chip {
    display: flex; align-items: center; gap: 10px;
    background: var(--c-glass); border: 1px solid var(--c-line); border-radius: 999px;
    padding: 6px 14px 6px 6px; font-size: .85rem; font-weight: 600;
    box-shadow: 0 4px 18px rgba(0,0,0,.3);
}
.user-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--c-cyan), var(--c-violet));
    color: #04121a; font-weight: 800; font-size: .8rem;
    box-shadow: 0 0 14px rgba(34,211,238,.45);
}
.user-chip .badge-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c-green); box-shadow: 0 0 8px var(--c-green); }

/* ================= Left Dock ================= */
.bottom-dock {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: var(--sidebar-width);
    background: rgba(5, 10, 20, 0.82);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(0, 242, 255, 0.15);
    border-radius: 0;
    display: flex; flex-direction: column; align-items: center;
    padding: 24px 0; z-index: 1040;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden; white-space: nowrap;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
}
.bottom-dock::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 2px;
    background: linear-gradient(90deg, #00f2ff, #7000ff, #ff0055);
    opacity: 0.8; border-radius: 0;
}
.bottom-dock:hover { width: 240px; align-items: flex-start; }
.dock-logo { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; padding: 0 20px; width: 100%; text-decoration: none; flex-shrink: 0; cursor: pointer; position: relative; }
.dock-logo img { width: 40px; height: auto; flex-shrink: 0; filter: drop-shadow(0 0 8px rgba(0, 242, 255, 0.4)); }
.dock-logo::before {
    content: ''; position: absolute; left: 20px; top: 50%;
    width: 40px; height: 40px; border-radius: 50%;
    border: 2px solid rgba(0, 242, 255, 0.5);
    transform: translateY(-50%);
    animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
    pointer-events: none; z-index: 0;
}
@keyframes pulse-ring { 0% { transform: translateY(-50%) scale(0.8); opacity: 0.6; } 100% { transform: translateY(-50%) scale(1.6); opacity: 0; } }
.dock-logo-text { font-weight: 800; font-size: 1.2rem; letter-spacing: 1px; color: #fff; opacity: 0; transition: opacity 0.2s; white-space: nowrap; font-family: var(--font-mono); }
.dock-logo-text b { color: #00f2ff; }
.bottom-dock:hover .dock-logo-text { opacity: 1; transition-delay: 0.1s; }
.dock-menu { display: flex; flex-direction: column; gap: 4px; width: 100%; flex-grow: 1; overflow-y: auto; overflow-x: hidden; padding-bottom: 20px; scrollbar-width: none; }
.dock-menu::-webkit-scrollbar { display: none; }
.dock-btn {
    width: 100%; padding: 12px 28px; display: flex; align-items: center; gap: 16px;
    background: transparent; border: none; border-right: 3px solid transparent;
    color: var(--c-muted); cursor: pointer; transition: all 0.3s ease; text-decoration: none; font-size: 0.95rem; flex-shrink: 0;
}
.dock-btn:hover { background: rgba(0, 242, 255, 0.1); color: #fff; border-right-color: #00f2ff; }
.dock-btn.active { background: rgba(0, 242, 255, 0.12); color: #00f2ff; border-right-color: #00f2ff; }
.dock-icon { font-size: 1.2rem; width: 24px; height: 24px; object-fit: contain; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.dock-text { font-weight: 500; opacity: 0; transition: opacity 0.2s; white-space: nowrap; font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.5px; }
.bottom-dock:hover .dock-text { opacity: 1; transition-delay: 0.1s; }
.dock-divider { border-bottom: 1px solid rgba(255, 255, 255, 0.05); margin: 8px 16px; flex-shrink: 0; }

/* ================= Main Layout ================= */
.main { max-width: 1200px; margin: 0 auto; padding: calc(var(--topbar-h) + 44px) 28px 60px; }

/* ================= Hero ================= */
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 34px; flex-wrap: wrap; }
.hero-left { min-width: 260px; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--font-mono); font-size: .72rem; letter-spacing: .18em;
    color: var(--c-cyan); text-transform: uppercase;
    background: rgba(34,211,238,.08); border: 1px solid rgba(34,211,238,.25);
    padding: 6px 14px; border-radius: 999px; margin-bottom: 16px;
}
.hero-badge .live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c-green); animation: blink 1.4s infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .25; } }
.hero h1 { font-size: clamp(2rem, 4vw, 3.1rem); font-weight: 900; letter-spacing: -0.02em; line-height: 1.05; }
.hero h1 .grad { background: linear-gradient(92deg, var(--c-cyan), var(--c-violet), var(--c-pink)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { margin-top: 12px; color: var(--c-muted); font-size: .95rem; max-width: 560px; line-height: 1.7; }
.hero-stats { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stat {
    background: var(--c-glass); border: 1px solid var(--c-line); border-radius: 14px;
    padding: 12px 18px; text-align: center; min-width: 110px; backdrop-filter: blur(10px);
}
.hero-stat b { display: block; font-size: 1.2rem; font-family: var(--font-mono); color: var(--c-cyan); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.hero-stat span { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--c-muted); }

/* ================= Cards ================= */
.card {
    background: var(--c-glass);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-glow);
    position: relative;
    overflow: hidden;
}
.card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(34,211,238,.5), transparent); }
.card-title {
    display: flex; align-items: center; gap: 12px;
    padding: 20px 24px; border-bottom: 1px solid var(--c-line-soft);
    font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.card-title i { color: var(--c-cyan); font-size: 1rem; }
.card-title .mono { font-family: var(--font-mono); font-weight: 400; color: var(--c-muted); letter-spacing: 0; }
.card-body { padding: 22px 24px; }
.card-head-actions { margin-left: auto; display: flex; gap: 10px; }

.grid-2col { display: grid; grid-template-columns: 1.55fr 1fr; gap: 24px; margin-bottom: 28px; }
@media (max-width: 960px) { .grid-2col { grid-template-columns: 1fr; } }

/* ================= Buttons ================= */
.btn-primary, .btn-submit {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    border: none; cursor: pointer; font-weight: 700; font-size: .92rem; letter-spacing: .06em;
    text-transform: uppercase; color: #04121a;
    padding: 14px 26px; border-radius: 14px;
    background: linear-gradient(92deg, var(--c-cyan), var(--c-violet));
    background-size: 160% 160%;
    box-shadow: 0 8px 26px -8px rgba(34,211,238,.55);
    transition: all .3s ease; font-family: inherit; text-decoration: none;
}
.btn-primary:hover, .btn-submit:hover { background-position: 100% 50%; transform: translateY(-2px); box-shadow: 0 14px 34px -10px rgba(139,92,246,.6); }
.btn-primary:disabled, .btn-submit:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-ghost {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    background: rgba(148,163,184,.08); border: 1px solid var(--c-line); color: var(--c-txt);
    padding: 12px 22px; border-radius: 12px; cursor: pointer; font-weight: 600; font-size: .86rem;
    transition: all .25s ease; font-family: inherit; text-decoration: none;
}
.btn-ghost:hover { background: rgba(34,211,238,.1); color: var(--c-cyan); border-color: rgba(34,211,238,.4); }
.btn-ghost:disabled { opacity: .55; cursor: not-allowed; }
.btn-soft {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: rgba(34,211,238,.1); border: 1px solid rgba(34,211,238,.28); color: var(--c-cyan);
    padding: 9px 16px; border-radius: 11px; cursor: pointer; font-weight: 600; font-size: .82rem;
    transition: all .25s ease; font-family: inherit; text-decoration: none;
}
.btn-soft:hover { background: rgba(34,211,238,.2); box-shadow: 0 4px 16px rgba(34,211,238,.2); transform: translateY(-1px); }
.btn-soft:disabled { opacity: .55; cursor: not-allowed; }
.btn-soft.green { background: rgba(52,211,153,.1); border-color: rgba(52,211,153,.3); color: var(--c-green); }
.btn-soft.green:hover { background: rgba(52,211,153,.2); box-shadow: 0 4px 16px rgba(52,211,153,.2); }

/* ================= Controls / Search / Tabs ================= */
.controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 24px; }
.search-box { position: relative; flex: 1; min-width: 240px; max-width: 400px; }
.search-box i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--c-muted); font-size: .9rem; z-index: 1; }
.search-input {
    width: 100%; padding: 12px 16px 12px 42px;
    background: var(--c-glass-strong); border: 1px solid var(--c-line); border-radius: 12px;
    color: var(--c-txt); font-size: .88rem; outline: none; transition: all .25s;
    font-family: inherit;
}
.search-input::placeholder { color: var(--c-muted); }
.search-input:focus { border-color: rgba(34,211,238,.5); box-shadow: 0 0 0 3px rgba(34,211,238,.12); }

.tabs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tab {
    padding: 9px 16px; border-radius: 999px;
    background: rgba(148,163,184,.07); border: 1px solid var(--c-line);
    color: var(--c-muted); font-size: .8rem; font-weight: 600; cursor: pointer;
    transition: all .2s ease; font-family: inherit; white-space: nowrap;
}
.tab:hover { color: var(--c-txt); background: rgba(148,163,184,.13); }
.tab.active {
    background: linear-gradient(92deg, rgba(34,211,238,.2), rgba(139,92,246,.2));
    color: var(--c-cyan); border-color: rgba(34,211,238,.45);
    box-shadow: 0 4px 14px rgba(34,211,238,.15);
}

/* ================= Tables ================= */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 760px; }
.tbl th {
    background: rgba(34,211,238,.06); color: var(--c-cyan);
    font-weight: 700; text-transform: uppercase; font-size: .7rem; letter-spacing: .12em;
    padding: 14px 18px; text-align: left; white-space: nowrap;
    border-bottom: 1px solid var(--c-line); cursor: pointer; user-select: none;
}
.tbl th:hover { background: rgba(34,211,238,.11); }
.tbl th .sort-hint { opacity: .6; font-size: .65rem; margin-left: 4px; }
.tbl td { padding: 14px 18px; border-bottom: 1px solid var(--c-line-soft); vertical-align: middle; font-size: .86rem; }
.tbl tbody tr { transition: background .2s; }
.tbl tbody tr:hover td { background: rgba(148,163,184,.05); }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl .empty-cell { text-align: center; padding: 44px 20px; color: var(--c-muted); }
.tbl .empty-cell i { font-size: 1.9rem; opacity: .4; display: block; margin-bottom: 10px; }
.tbl-name { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.tbl-name .avatar-img { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; border: 1px solid var(--c-line); flex-shrink: 0; }
.tbl-name .avatar-placeholder {
    width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
    background: linear-gradient(135deg, rgba(34,211,238,.18), rgba(139,92,246,.18));
    border: 1px solid rgba(34,211,238,.3); color: var(--c-cyan);
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem;
}
.tbl-name .name-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tbl-name .name-title { font-weight: 700; font-size: .9rem; }
.tbl-name .district-sub { font-size: .72rem; color: var(--c-muted); }
.highlighted-row td { background: rgba(34,211,238,.09) !important; box-shadow: inset 3px 0 0 var(--c-cyan); }

/* ================= Badges & Pills ================= */
.rank-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 13px; border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap;
}
.rank-exec { background: rgba(245,158,11,.13); color: #facc15; border: 1px solid rgba(245,158,11,.35); }
.rank-officer { background: rgba(139,92,246,.14); color: #c4b5fd; border: 1px solid rgba(139,92,246,.35); }
.rank-standard { background: rgba(34,211,238,.1); color: #67e8f9; border: 1px solid rgba(34,211,238,.28); }

.absence-type-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 13px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap;
}
.type-full { background: rgba(251,113,133,.13); color: #fda4af; border: 1px solid rgba(251,113,133,.35); }
.type-part { background: rgba(139,92,246,.14); color: #c4b5fd; border: 1px solid rgba(139,92,246,.35); }

.status-pill {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 5px 12px; border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap;
}
.status-active-pill { background: rgba(251,113,133,.13); color: #fda4af; border: 1px solid rgba(251,113,133,.35); }
.status-upcoming-pill { background: rgba(251,191,36,.13); color: #fcd34d; border: 1px solid rgba(251,191,36,.35); }
.status-returned-pill { background: rgba(52,211,153,.13); color: #6ee7b7; border: 1px solid rgba(52,211,153,.35); }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background-color: currentColor; box-shadow: 0 0 8px currentColor; animation: pulse 1.5s infinite; }
@keyframes pulse { 0% { opacity: .4; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.1); } 100% { opacity: .4; transform: scale(.9); } }

.duty-target-info { font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 5px; }
.status-pending { color: #fcd34d; background: rgba(251,191,36,.12); border: 1px solid rgba(251,191,36,.3); }
.status-completed { color: #6ee7b7; background: rgba(52,211,153,.12); border: 1px solid rgba(52,211,153,.3); }

/* ================= Progress / Duty meter ================= */
.duty-progress-container { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; width: 100%; max-width: 320px; }
.duty-progress-row { display: flex; align-items: center; gap: 12px; width: 100%; }
.duty-progress-bar { flex: 1; min-width: 100px; height: 9px; background: rgba(148,163,184,.12); border-radius: 999px; overflow: hidden; position: relative; }
.duty-progress-fill { height: 100%; background: linear-gradient(90deg, var(--c-cyan), var(--c-violet)); border-radius: 999px; transition: width .6s cubic-bezier(.4,0,.2,1); }
.duty-progress-fill.completed-fill { background: linear-gradient(90deg, var(--c-green), var(--c-cyan)); }
.duty-progress-fill.exec-fill { background: linear-gradient(90deg, #f59e0b, var(--c-cyan), var(--c-violet)); background-size: 200% 100%; animation: shimmer 3s infinite linear; }
@keyframes shimmer { 0% { background-position: 0% 0%; } 100% { background-position: 200% 0%; } }
.percent-text { font-size: .8rem; font-weight: 700; color: var(--c-muted); min-width: 42px; font-family: var(--font-mono); }
.infinity-badge { font-size: 1.05rem; font-weight: bold; color: #fbbf24; display: inline-flex; align-items: center; justify-content: center; min-width: 42px; text-shadow: 0 0 8px rgba(245,158,11,.4); }
.time-badge { font-weight: 700; color: var(--c-cyan); font-size: .86rem; font-family: var(--font-mono); white-space: nowrap; }
.exec-dash { font-weight: 800; color: var(--c-muted); font-size: 1.05rem; }

/* ================= Stats grid ================= */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; padding: 22px 24px; }
.stat-card {
    background: rgba(148,163,184,.05); border: 1px solid var(--c-line); border-radius: 16px;
    padding: 18px 20px; display: flex; align-items: center; gap: 15px;
    transition: all .25s ease; position: relative; overflow: hidden;
}
.stat-card::before { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 120% at 0% 0%, rgba(34,211,238,.08), transparent 60%); opacity: 0; transition: opacity .25s; }
.stat-card:hover { transform: translateY(-2px); border-color: rgba(34,211,238,.3); }
.stat-card:hover::before { opacity: 1; }
.stat-icon {
    width: 50px; height: 50px; border-radius: 14px; flex-shrink: 0;
    background: rgba(34,211,238,.13); color: var(--c-cyan);
    display: flex; align-items: center; justify-content: center; font-size: 1.25rem;
    border: 1px solid rgba(34,211,238,.3);
}
.stat-icon.purple { background: rgba(139,92,246,.14); color: var(--c-violet); border-color: rgba(139,92,246,.32); }
.stat-icon.red { background: rgba(251,113,133,.13); color: var(--c-red); border-color: rgba(251,113,133,.32); }
.stat-icon.gold { background: rgba(251,191,36,.13); color: var(--c-amber); border-color: rgba(251,191,36,.32); }
.stat-icon.emerald { background: rgba(52,211,153,.13); color: var(--c-green); border-color: rgba(52,211,153,.32); }
.stat-icon img { width: 24px; height: 24px; object-fit: contain; }
.stat-info h4 { margin: 0; font-size: .7rem; color: var(--c-muted); text-transform: uppercase; letter-spacing: .09em; font-weight: 700; }
.stat-info .value { font-size: 1.35rem; font-weight: 800; color: var(--c-txt); margin-top: 4px; letter-spacing: -.02em; font-family: var(--font-mono); }

/* ================= Spotlight (user personal card) ================= */
.spotlight { margin: 0 0 28px; position: relative; }
.spotlight::after { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%;
    background: linear-gradient(180deg, var(--c-cyan), var(--c-violet)); border-radius: 0 0 4px 4px; }
.spotlight-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 20px 24px; border-bottom: 1px solid var(--c-line-soft); flex-wrap: wrap; }
.spotlight-title { display: flex; align-items: center; gap: 14px; }
.spotlight-ic {
    width: 44px; height: 44px; border-radius: 13px;
    background: linear-gradient(135deg, rgba(34,211,238,.2), rgba(139,92,246,.2));
    border: 1px solid rgba(34,211,238,.4); color: var(--c-cyan);
    display: flex; align-items: center; justify-content: center; font-size: 1.15rem;
    box-shadow: 0 4px 14px rgba(34,211,238,.15);
}
.spotlight-title h3 { margin: 0; font-size: 1.02rem; font-weight: 800; }
.spotlight-title .sub { font-size: .74rem; color: var(--c-muted); font-weight: 500; margin-top: 3px; }
.spotlight-body { display: grid; grid-template-columns: minmax(200px, 1.2fr) repeat(3, minmax(150px, 1fr)); gap: 18px; padding: 22px 24px; align-items: stretch; }
@media (max-width: 1024px) { .spotlight-body { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .spotlight-body { grid-template-columns: 1fr; } }
.stat-box { display: flex; flex-direction: column; gap: 5px; background: rgba(148,163,184,.05); padding: 13px 16px; border-radius: 13px; border: 1px solid var(--c-line); justify-content: center; }
.stat-box .lbl { font-size: .68rem; font-weight: 700; color: var(--c-muted); text-transform: uppercase; letter-spacing: .07em; }
.stat-box .val { font-size: 1rem; font-weight: 700; color: var(--c-cyan); }
.stat-box .val .muted { color: var(--c-muted); font-weight: 600; }

/* ================= Roster ================= */
.group-nav { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.group-nav::-webkit-scrollbar { display: none; }
.group-nav a {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 15px; border-radius: 12px; white-space: nowrap;
    background: var(--c-glass); border: 1px solid var(--c-line);
    color: var(--c-muted); text-decoration: none; font-weight: 600; font-size: .84rem;
    transition: all .25s; flex-shrink: 0;
}
.group-nav a:hover { color: var(--c-txt); border-color: rgba(34,211,238,.35); transform: translateY(-1px); }
.group-nav a.active { color: var(--c-cyan); border-color: rgba(34,211,238,.45); box-shadow: 0 0 16px rgba(34,211,238,.15); }
.group-nav a .nav-badge { background: rgba(255,255,255,.08); border-radius: 999px; padding: 1px 8px; font-size: .7rem; font-weight: 700; font-family: var(--font-mono); }

.roster-section { margin-bottom: 40px; scroll-margin-top: 90px; }
.section-header { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--c-line-soft); }
.section-icon { width: 46px; height: 46px; background: rgba(148,163,184,.06); border: 1px solid var(--c-line); border-radius: 13px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; box-shadow: 0 4px 15px rgba(0,0,0,.2); flex-shrink: 0; }
.section-title { font-size: 1.3rem; font-weight: 800; margin: 0; letter-spacing: -.02em; }
.section-subtitle { font-size: .75rem; color: var(--c-muted); margin-top: 3px; font-weight: 500; }

.rank-group-header {
    font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .14em;
    color: var(--c-muted); margin: 20px 0 10px;
    display: flex; align-items: center; gap: 10px;
}
.rank-group-header::after { content: ''; flex: 1; height: 1px; background: var(--c-line-soft); }

.roster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.member-card {
    background: var(--c-glass); border: 1px solid var(--c-line); border-radius: 16px;
    padding: 16px 20px; display: flex; align-items: center; gap: 18px;
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    transition: all .3s cubic-bezier(.4,0,.2,1); position: relative; overflow: hidden;
    box-shadow: 0 6px 24px rgba(0,0,0,.25);
}
.member-card::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%;
    background: var(--rank-color, var(--c-cyan)); opacity: .85; box-shadow: 0 0 12px var(--rank-color, var(--c-cyan)); }
.member-card.verified { cursor: pointer; }
.member-card.verified:hover { transform: translateY(-4px); border-color: var(--rank-color, var(--c-cyan)); box-shadow: 0 14px 34px rgba(0,0,0,.4); }
.member-card.unverified { opacity: .7; filter: grayscale(30%); cursor: default; }
.rank-insignia { width: 50px; height: 50px; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0,0,0,.4)); flex-shrink: 0; }
.member-info { flex-grow: 1; min-width: 0; }
.member-rank { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; color: var(--rank-color, var(--c-cyan)); margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-name { font-size: .98rem; font-weight: 700; color: var(--c-txt); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.verified-badge { color: var(--c-cyan); font-size: .85rem; flex-shrink: 0; filter: drop-shadow(0 0 4px rgba(34,211,238,.5)); }
.member-badge { font-size: .72rem; color: var(--c-muted); font-family: var(--font-mono); background: rgba(0,0,0,.3); padding: 2px 9px; border-radius: 7px; display: inline-block; border: 1px solid var(--c-line-soft); }
.unverified-tag { font-size: .68rem; color: var(--c-muted); margin-top: 3px; display: flex; align-items: center; gap: 4px; }

/* ================= Career panels ================= */
.career-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 4px; }
@media (max-width: 1000px) { .career-grid { grid-template-columns: 1fr; } }
.career-panel { padding: 0; }
.career-panel-head { display: flex; align-items: center; gap: 14px; padding: 18px 24px; border-bottom: 1px solid var(--c-line-soft); }
.career-panel-head .ic {
    width: 44px; height: 44px; border-radius: 13px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}
.career-panel-head .ic.promo { background: rgba(52,211,153,.13); color: var(--c-green); border: 1px solid rgba(52,211,153,.35); }
.career-panel-head .ic.resign { background: rgba(251,113,133,.13); color: var(--c-red); border: 1px solid rgba(251,113,133,.35); }
.career-panel-head h3 { margin: 0; font-size: 1rem; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.career-panel-head span { font-size: .74rem; color: var(--c-muted); font-weight: 500; }
.career-count { margin-left: auto; padding: 5px 13px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: rgba(148,163,184,.1); border: 1px solid var(--c-line); color: var(--c-txt); font-family: var(--font-mono); white-space: nowrap; }
.career-list { max-height: 540px; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.career-item { display: flex; align-items: center; gap: 13px; background: rgba(148,163,184,.05); border: 1px solid var(--c-line); border-radius: 13px; padding: 13px 15px; transition: all .22s ease; }
.career-item:hover { background: rgba(148,163,184,.09); border-color: rgba(34,211,238,.3); transform: translateY(-2px); }
.career-avatar { width: 42px; height: 42px; border-radius: 12px; object-fit: cover; border: 1px solid var(--c-line); flex-shrink: 0; }
.career-avatar-placeholder { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1rem; flex-shrink: 0; }
.career-avatar-placeholder.promotion { background: linear-gradient(135deg, rgba(52,211,153,.2), rgba(34,211,238,.2)); color: var(--c-green); border: 1px solid rgba(52,211,153,.35); }
.career-avatar-placeholder.resignation { background: linear-gradient(135deg, rgba(251,113,133,.2), rgba(139,92,246,.2)); color: var(--c-red); border: 1px solid rgba(251,113,133,.35); }
.career-item-info { flex: 1; min-width: 0; }
.career-item-name { font-weight: 700; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.career-item-sub { font-size: .72rem; color: var(--c-muted); margin-top: 3px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.career-message { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: .74rem; font-weight: 700; white-space: nowrap; flex-shrink: 0; }
.career-message.promotion { background: rgba(52,211,153,.13); color: var(--c-green); border: 1px solid rgba(52,211,153,.35); }
.career-message.resignation { background: rgba(251,113,133,.13); color: var(--c-red); border: 1px solid rgba(251,113,133,.35); }
.career-message.unregistered { background: rgba(148,163,184,.1); color: var(--c-muted); border: 1px solid var(--c-line); }
.btn-forum-link {
    padding: 6px 12px; background: rgba(34,211,238,.1); color: var(--c-cyan);
    border: 1px solid rgba(34,211,238,.3); border-radius: 9px; font-size: .76rem; font-weight: 600;
    text-decoration: none; display: inline-flex; align-items: center; gap: 6px; transition: all .2s ease; flex-shrink: 0;
}
.btn-forum-link:hover { background: rgba(34,211,238,.22); box-shadow: 0 3px 12px rgba(34,211,238,.2); transform: translateY(-1px); }
.empty-state { text-align: center; padding: 40px 20px; color: var(--c-muted); }
.empty-state i { font-size: 2rem; opacity: .3; display: block; margin-bottom: 10px; }

/* ================= Mini Profile Modal ================= */
.mp-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(3,7,18,.8); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    z-index: 5000; display: none; justify-content: center; align-items: center;
    opacity: 0; transition: opacity .3s;
}
.mp-modal-overlay.show { display: flex; opacity: 1; }
.mp-card {
    background: var(--c-glass-strong); border: 1px solid var(--c-line);
    border-radius: 24px; padding: 0; width: 90%; max-width: 420px;
    text-align: center; position: relative; overflow: hidden;
    box-shadow: 0 25px 60px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.1);
    transform: scale(.95) translateY(20px); transition: all .45s cubic-bezier(.16,1,.3,1);
    backdrop-filter: blur(30px) saturate(1.5); -webkit-backdrop-filter: blur(30px) saturate(1.5);
}
.mp-modal-overlay.show .mp-card { transform: scale(1) translateY(0); }

/* animated top banner */
.mp-banner {
    position: relative; height: 120px; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(34,211,238,.25), rgba(139,92,246,.18), rgba(244,114,182,.12));
    background-size: 300% 300%; animation: mpGradient 9s ease infinite;
    border-bottom: 1px solid var(--c-line-soft);
}
.mp-banner::after {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(120px 80px at 50% 118%, rgba(34,211,238,.3), transparent 70%);
}

/* rank pill */
.mp-rank-pill {
    position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 9px;
    padding: 9px 18px; border-radius: 999px; font-size: .8rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: 1.5px; color: #fff;
    background: rgba(3,7,18,.55); border: 1px solid rgba(34,211,238,.5);
    animation: mpPulse 2.4s ease-in-out infinite;
}
.mp-rank-pill i { color: var(--c-cyan); }

/* shine sweep across card on open */
.mp-card::after {
    content: ''; position: absolute; top: -60%; left: -80%; width: 50%; height: 220%;
    background: linear-gradient(105deg, transparent 0%, rgba(255,255,255,.07) 50%, transparent 100%);
    transform: rotate(14deg); pointer-events: none; z-index: 5; opacity: 0;
}
.mp-modal-overlay.show .mp-card::after { animation: mpShine .9s ease .3s; }

/* avatar with rotating gradient ring */
.mp-avatar-ring { position: relative; width: 118px; height: 118px; margin: -55px auto 14px; z-index: 3; }
.mp-avatar-ring::before {
    content: ''; position: absolute; inset: -7px; border-radius: 50%;
    background: conic-gradient(from 0deg, #22d3ee, #8b5cf6, #f472b6, #22d3ee);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
            mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
    animation: mpSpin 5s linear infinite;
}
.mp-avatar {
    width: 118px; height: 118px; border-radius: 50%; object-fit: cover;
    border: 4px solid var(--c-glass-strong); box-shadow: 0 10px 30px rgba(0,0,0,.5); background: #030712;
    animation: mpPop .55s cubic-bezier(.34,1.56,.64,1) both;
}

.mp-content { position: relative; z-index: 2; padding: 0 28px 26px; }

.mp-name {
    font-size: 1.4rem; font-weight: 800; color: #fff; margin-bottom: 8px; letter-spacing: -.02em;
    animation: mpUp .5s ease both .15s;
}
.mp-sub { display: flex; justify-content: center; margin-bottom: 18px; animation: mpUp .5s ease both .2s; }
.mp-chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
    font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    border: 1px solid rgba(52,211,153,.35); color: var(--c-green); background: rgba(52,211,153,.08);
}

.mp-divider {
    height: 1px; margin: 0 0 16px;
    background: linear-gradient(90deg, transparent, var(--c-line), transparent);
    animation: mpUp .5s ease both .25s;
}

.mp-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; text-align: left; }
.mp-info-item {
    background: rgba(0,0,0,.22); padding: 14px 15px; border-radius: 14px; border: 1px solid var(--c-line-soft);
    position: relative; overflow: hidden; animation: mpUp .5s ease both;
}
.mp-info-item:nth-child(1) { animation-delay: .25s; }
.mp-info-item:nth-child(2) { animation-delay: .32s; }
.mp-info-item:nth-child(3) { animation-delay: .39s; }
.mp-info-item:nth-child(4) { animation-delay: .46s; }
.mp-info-item::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 2px;
    background: linear-gradient(90deg, rgba(34,211,238,.7), transparent 70%);
}
.mp-ico { color: var(--c-cyan); font-size: .85rem; margin-right: 7px; vertical-align: -1px; }
.mp-label { font-size: .66rem; color: var(--c-muted); display: block; margin: 4px 0 4px 23px; text-transform: uppercase; font-weight: 700; letter-spacing: .08em; }
.mp-value { font-size: .9rem; color: #fff; font-weight: 600; margin-left: 23px; word-break: break-word; }

.mp-close { position: absolute; top: 15px; right: 15px; z-index: 10; background: rgba(0,0,0,.35); border: 1px solid var(--c-line); color: var(--c-muted); width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1rem; cursor: pointer; transition: all .3s; }
.mp-close:hover { color: #fff; background: var(--c-red); border-color: transparent; transform: rotate(90deg); }

.mp-loader { color: var(--c-cyan); font-size: 2rem; margin: 60px 0; display: none; position: relative; z-index: 1; }

/* indeterminate loading bar */
.mp-loadbar { position: absolute; top: 0; left: 0; height: 3px; width: 100%; z-index: 20; display: none; overflow: hidden; }
.mp-loadbar::before {
    content: ''; position: absolute; top: 0; left: -40%; width: 40%; height: 100%; border-radius: 3px;
    background: linear-gradient(90deg, #22d3ee, #8b5cf6, #f472b6);
    animation: mpLoad 1.1s ease-in-out infinite;
}

@keyframes mpGradient { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes mpSpin { to { transform: rotate(360deg); } }
@keyframes mpPulse { 0%,100% { box-shadow: 0 0 18px rgba(34,211,238,.18); } 50% { box-shadow: 0 0 32px rgba(34,211,238,.4); } }
@keyframes mpShine { 0% { opacity: 0; left: -80%; } 20% { opacity: 1; } 100% { opacity: 0; left: 130%; } }
@keyframes mpLoad { 0% { left: -40%; } 100% { left: 110%; } }
@keyframes mpPop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }
@keyframes mpUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ================= Toasts ================= */
.toast-container { position: fixed; top: calc(var(--topbar-h) + 16px); right: 20px; z-index: 99999; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-radius: 13px; font-size: .84rem; font-weight: 600;
    background: var(--c-glass-strong); border: 1px solid var(--c-line); color: var(--c-txt); backdrop-filter: blur(14px);
    box-shadow: 0 10px 30px rgba(0,0,0,.5); opacity: 0; transform: translateX(30px); transition: all .3s ease; max-width: 340px; }
.toast.show { opacity: 1; transform: none; }
.toast i { font-size: 1.05rem; }
.toast.success i { color: var(--c-green); }
.toast.error i { color: var(--c-red); }
.toast.warn i { color: var(--c-amber); }
/* standalone toast (created directly in body) */
body > .toast { position: fixed; bottom: 24px; right: 24px; z-index: 99999; animation: toastIn .3s ease both; opacity: 1; transform: none; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ================= Responsive ================= */
@media (max-width: 768px) {
    body { padding: 0 0 84px 0; }
    .topbar { padding: 0 16px 0 16px; }
    .crumb { display: none; }
    .main { padding: calc(var(--topbar-h) + 24px) 16px 40px; }
    .hero { flex-direction: column; align-items: flex-start; }
    .roster-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .bottom-dock, .bottom-dock:hover { top: auto; bottom: 0; left: 0; right: 0; width: 100% !important; height: 66px; flex-direction: row; align-items: center; justify-content: flex-start; padding: 0 8px; border-right: none; border-top: 1px solid rgba(0, 242, 255, 0.15); overflow-x: auto; overflow-y: hidden; border-radius: 0; }
    .bottom-dock::-webkit-scrollbar { display: none; }
    .dock-logo { display: none; }
    .dock-menu { flex-direction: row; overflow-x: auto; overflow-y: hidden; padding-bottom: 0; gap: 2px; }
    .dock-btn { justify-content: center; padding: 8px 14px; gap: 4px; flex-direction: column; width: auto; min-width: 62px; font-size: 1rem; border-right: 3px solid transparent; }
    .dock-btn:hover { border-right-color: transparent; }
    .dock-icon { width: 22px; height: 22px; font-size: 1rem; }
    .dock-text { font-size: 0.6rem; opacity: 1; transition: none; }
    .bottom-dock:hover .dock-text { opacity: 1; }
    .dock-divider { border-bottom: none; border-right: 1px solid rgba(255, 255, 255, 0.05); height: 36px; margin: auto 6px; width: 1px; flex-shrink: 0; }
}
