/**
 * UMAREZ CSMIS - Main Stylesheet
 * Civil Service Management Information System - Taraba State
 * Theme: Dark Navy & Gold
 * Based on original HTML design specifications
 */

/* ── CSS VARIABLES ─────────────────────────────────────────── */
:root {
    --navy:     #0B1437;
    --navy2:    #0F1C4D;
    --navy3:    #162460;
    --gold:     #D4A843;
    --gold2:    #F0C96A;
    --gold3:    #B88A2A;
    --white:    #FFFFFF;
    --slate:    #8A9BC4;
    --slate2:   #B2C0DE;
    --red:      #E05252;
    --green:    #3DBE8A;
    --orange:   #E07C3C;
    --shadow:   0 4px 24px rgba(0,0,0,0.25);
    --radius:   14px;
}

/* ── RESET & BASE ──────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
    background: var(--navy);
    color: var(--white);
    overflow-x: hidden;
    line-height: 1.5;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--navy2); }
::-webkit-scrollbar-thumb { background: var(--gold3); border-radius: 3px; }

/* ── UTILITIES ─────────────────────────────────────────────── */
.mono       { font-family: 'Courier New', Courier, monospace; }
.fade-in    { animation: fadeIn 0.3s ease; }
.pulse      { animation: pulse 1.5s infinite; }

@keyframes fadeIn    { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse     { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes toastIn   { from { opacity:0; transform:translateX(40px); } to { opacity:1; transform:translateX(0); } }
@keyframes bounce    { 0%,80%,100%{transform:translateY(0)} 40%{transform:translateY(-8px)} }

/* ── LAYOUT ────────────────────────────────────────────────── */
.app {
    display: flex;
    min-height: 100vh;
}

/* ── SIDEBAR ───────────────────────────────────────────────── */
.sidebar {
    width: 64px;
    min-height: 100vh;
    background: var(--navy2);
    border-right: 1px solid rgba(212,168,67,0.15);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    transition: width 0.22s ease;
    overflow: hidden;
}

.sidebar:hover {
    width: 220px;
}

.sidebar-logo {
    padding: 16px 0;
    border-bottom: 1px solid rgba(212,168,67,0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    min-height: 72px;
}

.sidebar-logo h1 {
    font-size: 13px;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.18s;
    padding: 0 14px;
}

.sidebar:hover .sidebar-logo h1 {
    opacity: 1;
}

.sidebar-logo p {
    font-size: 9px;
    color: var(--slate);
    margin-top: 2px;
    letter-spacing: 0.04em;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.18s;
    padding: 0 14px;
}

.sidebar:hover .sidebar-logo p {
    opacity: 1;
}

.logo-icon {
    font-size: 26px;
    flex-shrink: 0;
    margin-bottom: 2px;
}

.sidebar-badge {
    display: inline-block;
    background: var(--gold);
    color: var(--navy);
    font-size: 9px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    margin-top: 6px;
    letter-spacing: 0.05em;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.15s;
}

.sidebar:hover .sidebar-badge {
    opacity: 1;
}

/* Navigation */
.nav {
    flex: 1;
    padding: 16px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    padding-left: 22px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--slate);
    transition: all 0.2s;
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    text-decoration: none;
}

.nav-item:hover {
    color: var(--gold2);
    background: rgba(212,168,67,0.06);
}

.nav-item.active {
    color: var(--gold);
    background: rgba(212,168,67,0.1);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 3px;
    background: var(--gold);
    border-radius: 0 3px 3px 0;
}

.nav-icon {
    font-size: 18px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.nav-label {
    opacity: 0;
    transition: opacity 0.15s;
    white-space: nowrap;
}

.sidebar:hover .nav-label {
    opacity: 1;
}

.nav-badge {
    margin-left: auto;
    margin-right: 12px;
    background: var(--red);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.15s;
    flex-shrink: 0;
}

.sidebar:hover .nav-badge {
    opacity: 1;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 12px 0 12px;
    border-top: 1px solid rgba(212,168,67,0.12);
    text-align: center;
    overflow: hidden;
}

.sidebar-footer-icon {
    font-size: 18px;
    margin-bottom: 4px;
}

.sidebar-footer-text {
    font-size: 9px;
    color: var(--slate);
    opacity: 0;
    transition: opacity 0.15s;
    white-space: nowrap;
    padding: 0 10px;
}

.sidebar:hover .sidebar-footer-text {
    opacity: 1;
}

.sidebar-footer-title {
    font-weight: 700;
    color: var(--slate2);
    margin-bottom: 2px;
}

/* ── MAIN CONTENT AREA ─────────────────────────────────────── */
.main {
    margin-left: 64px;
    flex: 1;
    min-height: 100vh;
    background: var(--navy);
    transition: margin-left 0.22s ease;
}

/* ── TOP BAR ───────────────────────────────────────────────── */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 32px;
    border-bottom: 1px solid rgba(212,168,67,0.12);
    background: var(--navy);
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--white);
}

.topbar-sub {
    font-size: 12px;
    color: var(--slate);
    margin-top: 2px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar-clock {
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    color: var(--gold);
    background: rgba(212,168,67,0.1);
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid rgba(212,168,67,0.2);
}

/* ── CONTENT AREA ──────────────────────────────────────────── */
.content {
    padding: 28px 32px;
}

/* ── STAT CARDS ────────────────────────────────────────────── */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--navy2);
    border: 1px solid rgba(212,168,67,0.1);
    border-radius: var(--radius);
    padding: 20px 22px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    border-radius: 0 var(--radius) 0 100%;
    opacity: 0.07;
}

.stat-card.gold::after   { background: var(--gold); }
.stat-card.green::after  { background: var(--green); }
.stat-card.red::after    { background: var(--red); }
.stat-card.orange::after { background: var(--orange); }

.stat-icon {
    font-size: 22px;
    margin-bottom: 10px;
}

.stat-num {
    font-size: 32px;
    font-weight: 700;
    color: var(--white);
    font-family: 'Courier New', Courier, monospace;
}

.stat-label {
    font-size: 11px;
    color: var(--slate);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 4px;
}

/* ── TABLES ────────────────────────────────────────────────── */
.table-wrap {
    background: var(--navy2);
    border: 1px solid rgba(212,168,67,0.1);
    border-radius: var(--radius);
    overflow: hidden;
}

.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(212,168,67,0.1);
}

.table-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--white);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    font-size: 9px;
    font-weight: 700;
    color: var(--slate);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 9px 10px;
    text-align: left;
    background: rgba(11,20,55,0.5);
}

td {
    padding: 10px 10px;
    font-size: 12px;
    color: var(--slate2);
    border-top: 1px solid rgba(255,255,255,0.04);
    vertical-align: middle;
}

tr:hover td {
    background: rgba(212,168,67,0.04);
    color: var(--white);
}

/* Table scrolling */
.tbl-scroll {
    overflow-x: auto;
    width: 100%;
}

.tbl-scroll table {
    min-width: 900px;
}

/* Column widths for servants table */
.col-profile  { width: 13%; }
.col-id       { width: 9%; }
.col-ids      { width: 11%; }
.col-dept     { width: 17%; }
.col-grade    { width: 10%; }
.col-dates    { width: 10%; }
.col-retire   { width: 9%; }
.col-status   { width: 8%; }
.col-actions  { width: 13%; min-width: 140px; }

.merged-label {
    font-size: 8px;
    font-weight: 700;
    color: var(--gold3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1px;
    display: inline-block;
}

.merged-val {
    font-size: 10px;
    color: var(--slate2);
    font-family: 'Courier New', Courier, monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── AVATARS ───────────────────────────────────────────────── */
.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(212,168,67,0.3);
}

.avatar-placeholder {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--navy3);
    border: 2px solid rgba(212,168,67,0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--gold);
}

.avatar-lg {
    width: 70px;
    height: 70px;
}

/* ── BADGES ────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 20px;
    letter-spacing: 0.04em;
}

.badge-green  { background: rgba(61,190,138,0.15); color: var(--green); }
.badge-red    { background: rgba(224,82,82,0.15); color: var(--red); }
.badge-orange { background: rgba(224,124,60,0.15); color: var(--orange); }
.badge-gold   { background: rgba(212,168,67,0.15); color: var(--gold); }
.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* ── BUTTONS ───────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 9px 18px;
    border-radius: 9px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--gold);
    color: var(--navy);
}

.btn-primary:hover {
    background: var(--gold2);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--gold);
    border: 1px solid rgba(212,168,67,0.4);
}

.btn-outline:hover {
    background: rgba(212,168,67,0.1);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 11px;
    border-radius: 7px;
}

.btn-icon {
    padding: 8px;
    border-radius: 8px;
    background: rgba(212,168,67,0.1);
    color: var(--gold);
    border: none;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: rgba(212,168,67,0.2);
}

.btn-edit {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 4px;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    background: rgba(212,168,67,0.18);
    color: var(--gold);
    border: 1px solid rgba(212,168,67,0.4);
    transition: all 0.18s;
    white-space: nowrap;
    text-decoration: none;
}

.btn-edit:hover {
    background: rgba(212,168,67,0.35);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(212,168,67,0.2);
}

.btn-delete {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 4px;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    background: rgba(224,82,82,0.15);
    color: var(--red);
    border: 1px solid rgba(224,82,82,0.4);
    transition: all 0.18s;
    white-space: nowrap;
    text-decoration: none;
}

.btn-delete:hover {
    background: rgba(224,82,82,0.30);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(224,82,82,0.2);
}

.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 9px;
    background: rgba(224,82,82,0.12);
    color: var(--red);
    border: 1px solid rgba(224,82,82,0.3);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-logout:hover {
    background: rgba(224,82,82,0.25);
    transform: translateY(-1px);
}

.action-btns {
    display: flex;
    gap: 6px;
    align-items: center;
}

/* ── FORMS ─────────────────────────────────────────────────── */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group.full {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 11px;
    font-weight: 600;
    color: var(--slate);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
input[type="tel"],
input[type="file"],
select,
textarea {
    background: var(--navy);
    border: 1px solid rgba(212,168,67,0.15);
    border-radius: 9px;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 13px;
    color: var(--white);
    outline: none;
    transition: border 0.2s;
    width: 100%;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--gold);
}

input::placeholder {
    color: var(--slate);
}

select option {
    background: var(--navy2);
}

input[readonly] {
    background: rgba(212,168,67,0.05);
    color: var(--gold);
}

input.is-invalid {
    border-color: var(--red) !important;
}

.invalid-feedback {
    font-size: 10px;
    color: var(--red);
    margin-top: 3px;
}

.tooltip-hint {
    font-size: 10px;
    color: var(--slate);
    margin-top: 3px;
}

/* ── PHOTO UPLOAD ──────────────────────────────────────────── */
.photo-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.photo-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--navy);
    border: 2px dashed rgba(212,168,67,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    transition: border 0.2s;
}

.photo-circle:hover {
    border-color: var(--gold);
}

.photo-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-hint {
    font-size: 11px;
    color: var(--slate);
}

/* ── SEARCH ────────────────────────────────────────────────── */
.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--navy);
    border: 1px solid rgba(212,168,67,0.15);
    border-radius: 10px;
    padding: 8px 14px;
}

.search-box input {
    background: none;
    border: none;
    padding: 0;
    font-size: 13px;
    color: var(--white);
    outline: none;
    width: 220px;
}

/* ── DROP ZONE (CSV) ───────────────────────────────────────── */
.drop-zone {
    border: 2px dashed rgba(212,168,67,0.3);
    border-radius: 14px;
    padding: 36px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(212,168,67,0.03);
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--gold);
    background: rgba(212,168,67,0.07);
}

.drop-zone h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--white);
    margin: 10px 0 4px;
}

.drop-zone p {
    font-size: 12px;
    color: var(--slate);
}

.drop-icon {
    font-size: 36px;
}

/* ── TABS ──────────────────────────────────────────────────── */
.tabs {
    display: flex;
    gap: 4px;
    background: var(--navy2);
    border-radius: 10px;
    padding: 4px;
    width: fit-content;
    margin-bottom: 20px;
}

.tab {
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    color: var(--slate);
    transition: all 0.2s;
    border: none;
    background: none;
    font-family: inherit;
    text-decoration: none;
}

.tab.active {
    background: var(--gold);
    color: var(--navy);
}

.tab:hover:not(.active) {
    color: var(--gold2);
}

/* ── MODAL ─────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s;
}

.modal {
    background: var(--navy2);
    border: 1px solid rgba(212,168,67,0.2);
    border-radius: 18px;
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 28px;
    border-bottom: 1px solid rgba(212,168,67,0.12);
}

.modal-head h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--white);
}

.modal-body {
    padding: 28px;
}

.modal-foot {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 18px 28px;
    border-top: 1px solid rgba(212,168,67,0.12);
}

/* ── NOTIFICATION CARDS ────────────────────────────────────── */
.notif-card {
    background: var(--navy2);
    border: 1px solid rgba(212,168,67,0.1);
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: all 0.2s;
}

.notif-card:hover {
    border-color: rgba(212,168,67,0.3);
}

.notif-icon-wrap {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.notif-red    { background: rgba(224,82,82,0.15); }
.notif-orange { background: rgba(224,124,60,0.15); }
.notif-gold   { background: rgba(212,168,67,0.15); }

.notif-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--white);
}

.notif-sub {
    font-size: 11px;
    color: var(--slate);
    margin-top: 3px;
}

.notif-date {
    font-size: 10px;
    font-family: 'Courier New', Courier, monospace;
    color: var(--slate);
    margin-top: 4px;
}

/* ── CHATBOT ───────────────────────────────────────────────── */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.chat-msg {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.chat-msg.user {
    flex-direction: row-reverse;
}

.chat-bubble {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-line;
}

.chat-msg.bot .chat-bubble {
    background: var(--navy2);
    color: var(--slate2);
    border: 1px solid rgba(212,168,67,0.1);
    border-bottom-left-radius: 4px;
}

.chat-msg.user .chat-bubble {
    background: var(--gold);
    color: var(--navy);
    font-weight: 500;
    border-bottom-right-radius: 4px;
}

.chat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.bot-av {
    background: rgba(212,168,67,0.15);
    border: 1px solid rgba(212,168,67,0.3);
}

.user-av {
    background: var(--navy3);
}

.chat-input-wrap {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid rgba(212,168,67,0.12);
}

.chat-input-wrap input {
    flex: 1;
}

.typing-dots {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 8px 0;
}

.typing-dots span {
    width: 7px;
    height: 7px;
    background: var(--slate);
    border-radius: 50%;
    animation: bounce 1.2s infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

/* ── AUDIT LOG ─────────────────────────────────────────────── */
.audit-entry {
    background: var(--navy2);
    border: 1px solid rgba(212,168,67,0.08);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: border 0.2s;
}

.audit-entry:hover {
    border-color: rgba(212,168,67,0.22);
}

.audit-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.audit-add  { background: rgba(61,190,138,0.15); }
.audit-edit { background: rgba(212,168,67,0.12); }
.audit-del  { background: rgba(224,82,82,0.13); }
.audit-csv  { background: rgba(138,155,196,0.15); }
.audit-login { background: rgba(61,190,138,0.15); }
.audit-logout { background: rgba(138,155,196,0.15); }

.audit-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--white);
}

.audit-sub {
    font-size: 11px;
    color: var(--slate);
    margin-top: 2px;
}

.audit-ts {
    font-size: 10px;
    font-family: 'Courier New', Courier, monospace;
    color: var(--slate);
    margin-top: 4px;
}

.audit-badge {
    margin-left: auto;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

.ab-add   { background: rgba(61,190,138,0.15); color: var(--green); }
.ab-edit  { background: rgba(212,168,67,0.15); color: var(--gold); }
.ab-del   { background: rgba(224,82,82,0.15); color: var(--red); }
.ab-csv   { background: rgba(138,155,196,0.15); color: var(--slate2); }
.ab-login { background: rgba(61,190,138,0.15); color: var(--green); }
.ab-logout{ background: rgba(138,155,196,0.15); color: var(--slate2); }

.ts-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 9px;
    font-family: 'Courier New', Courier, monospace;
    color: var(--slate);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 6px;
    padding: 2px 7px;
    margin-top: 3px;
}

/* ── PROGRESS BAR ──────────────────────────────────────────── */
.progress-bar {
    height: 4px;
    background: rgba(212,168,67,0.15);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 6px;
}

.progress-fill {
    height: 100%;
    background: var(--gold);
    border-radius: 2px;
    transition: width 0.5s;
}

/* ── ALERT BANNER ──────────────────────────────────────────── */
.alert-banner {
    background: rgba(224,82,82,0.1);
    border: 1px solid rgba(224,82,82,0.3);
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.alert-banner p {
    font-size: 12px;
    color: var(--slate2);
}

.alert-banner strong {
    color: var(--red);
}

/* ── SECTION HEAD ──────────────────────────────────────────── */
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.section-head h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--white);
}

/* ── EMPTY STATE ───────────────────────────────────────────── */
.empty {
    text-align: center;
    padding: 50px 20px;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.4;
}

.empty p {
    font-size: 13px;
    color: var(--slate);
}

/* ── USER PILL ─────────────────────────────────────────────── */
.user-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(212,168,67,0.1);
    border: 1px solid rgba(212,168,67,0.2);
    border-radius: 20px;
    padding: 5px 12px 5px 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.user-pill:hover {
    background: rgba(212,168,67,0.18);
}

.user-av-sm {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

.user-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--white);
}

.user-role {
    font-size: 9px;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

/* ── GUEST BAR ─────────────────────────────────────────────── */
.guest-bar {
    background: rgba(212,168,67,0.07);
    border-bottom: 1px solid rgba(212,168,67,0.12);
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.guest-bar p {
    font-size: 12px;
    color: var(--slate);
}

.guest-bar strong {
    color: var(--gold);
}

/* ── TOAST ─────────────────────────────────────────────────── */
.toast-wrap {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 18px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    box-shadow: 0 6px 24px rgba(0,0,0,0.35);
    animation: toastIn 0.3s ease;
    min-width: 260px;
    max-width: 380px;
}

.toast-success { background: linear-gradient(135deg,#1a8a5a,#239d66); border: 1px solid #2abf7a; }
.toast-error   { background: linear-gradient(135deg,#8a1a1a,#b02020); border: 1px solid #e05252; }
.toast-info    { background: linear-gradient(135deg,#1a3a8a,#1e4db0); border: 1px solid #4a7adc; }

.toast-icon { font-size: 18px; flex-shrink: 0; }

/* ── AUTH SCREENS ──────────────────────────────────────────── */
.auth-wrap {
    min-height: 100vh;
    background: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    background: var(--navy2);
    border: 1px solid rgba(212,168,67,0.2);
    border-radius: 20px;
    width: 100%;
    max-width: 440px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.auth-logo {
    text-align: center;
    margin-bottom: 28px;
}

.auth-emblem {
    font-size: 44px;
    margin-bottom: 10px;
}

.auth-logo h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 0.06em;
}

.auth-logo p {
    font-size: 11px;
    color: var(--slate);
    margin-top: 4px;
    letter-spacing: 0.05em;
}

.auth-tabs {
    display: flex;
    background: var(--navy);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 24px;
}

.auth-tab {
    flex: 1;
    padding: 9px;
    text-align: center;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: var(--slate);
    transition: all 0.2s;
    border: none;
    background: none;
    font-family: inherit;
}

.auth-tab.active {
    background: var(--gold);
    color: var(--navy);
}

.auth-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.auth-form-group label {
    font-size: 11px;
    font-weight: 600;
    color: var(--slate);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.auth-form-group input {
    background: var(--navy);
    border: 1px solid rgba(212,168,67,0.15);
    border-radius: 9px;
    padding: 11px 14px;
    font-family: inherit;
    font-size: 13px;
    color: var(--white);
    outline: none;
    transition: border 0.2s;
    width: 100%;
}

.auth-form-group input:focus {
    border-color: var(--gold);
}

.auth-btn {
    width: 100%;
    padding: 12px;
    background: var(--gold);
    color: var(--navy);
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 6px;
}

.auth-btn:hover {
    background: var(--gold2);
    transform: translateY(-1px);
}

.auth-btn:disabled {
    background: rgba(212,168,67,0.3);
    color: rgba(11,20,55,0.5);
    cursor: not-allowed;
    transform: none;
}

.auth-error {
    background: rgba(224,82,82,0.1);
    border: 1px solid rgba(224,82,82,0.3);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 12px;
    color: var(--red);
    margin-bottom: 14px;
}

.auth-success {
    background: rgba(61,190,138,0.1);
    border: 1px solid rgba(61,190,138,0.3);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 12px;
    color: var(--green);
    margin-bottom: 14px;
}

.auth-info {
    background: rgba(212,168,67,0.08);
    border: 1px solid rgba(212,168,67,0.2);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 11px;
    color: var(--slate2);
    margin-top: 16px;
    line-height: 1.8;
}

.auth-info strong {
    color: var(--gold);
}

.auth-slots {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.auth-slot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(212,168,67,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.auth-slot.filled {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--navy);
    font-weight: 700;
}

.auth-slot.empty {
    color: var(--slate);
}

/* ── LOADING STATE ─────────────────────────────────────────── */
.loading-screen {
    min-height: 100vh;
    background: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-content {
    text-align: center;
}

.loading-icon {
    font-size: 40px;
    margin-bottom: 14px;
}

.loading-text {
    color: var(--gold);
    font-size: 13px;
    font-weight: 600;
}

/* ── LGA COVERAGE ──────────────────────────────────────────── */
.lga-bar-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.lga-bar-rank {
    width: 24px;
    text-align: center;
    font-size: 11px;
    color: var(--slate);
    font-family: 'Courier New', Courier, monospace;
}

.lga-bar-info {
    flex: 1;
    min-width: 0;
}

.lga-bar-label-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3px;
}

.lga-bar-name {
    font-size: 12px;
}

.lga-bar-name.low { color: var(--red); font-weight: 700; }
.lga-bar-name.high { color: var(--green); font-weight: 700; }
.lga-bar-name.normal { color: var(--slate2); font-weight: 400; }

.lga-bar-count {
    font-size: 11px;
    font-family: 'Courier New', Courier, monospace;
}

.lga-bar-count.low { color: var(--red); }
.lga-bar-count.high { color: var(--green); }
.lga-bar-count.normal { color: var(--gold); }

.lga-bar-track {
    height: 4px;
    background: rgba(255,255,255,0.06);
    border-radius: 2px;
    overflow: hidden;
}

.lga-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.4s;
}

.lga-bar-fill.low { background: var(--red); }
.lga-bar-fill.high { background: var(--green); }
.lga-bar-fill.normal { background: var(--gold); }

/* ── CSV PREVIEW ───────────────────────────────────────────── */
.csv-preview-table {
    max-height: 400px;
    overflow-y: auto;
}

/* ── RETIREMENT POLICY BOX ─────────────────────────────────── */
.policy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.policy-box {
    background: rgba(212,168,67,0.07);
    border-radius: 10px;
    padding: 14px;
}

.policy-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 4px;
}

.policy-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--white);
    font-family: 'Courier New', Courier, monospace;
}

.policy-desc {
    font-size: 12px;
    color: var(--slate);
    margin-top: 4px;
}

/* ── QUICK REPLY BUTTONS ───────────────────────────────────── */
.quick-replies {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .content {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .stat-grid {
        grid-template-columns: 1fr;
    }
    .topbar {
        padding: 12px 16px;
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    .content {
        padding: 16px;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .policy-grid {
        grid-template-columns: 1fr;
    }
    .section-head {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    .sidebar {
        width: 0;
    }
    .main {
        margin-left: 0;
    }
}

/* ── PRINT STYLES ──────────────────────────────────────────── */
@media print {
    .sidebar, .topbar, .btn, .action-btns, .nav-badge {
        display: none !important;
    }
    .main {
        margin-left: 0;
    }
    body {
        background: #fff;
        color: #000;
    }
    .table-wrap {
        border: 1px solid #ddd;
    }
}
