/* =====================================================================
   PARLIAMENT OF TANZANIA · NEUMORPHIC PORTAL
   Palette: white + blue, with Tanzania flag accents
   ===================================================================== */

:root {
    --bg: #e8eff9;
    --bg-deep: #dde7f5;
    --surface: #eaf1fb;
    --surface-2: #f2f6fd;
    --white: #ffffff;
    --ink: #0b2545;
    --ink-soft: #3c5374;
    --muted: #6c819d;
    --blue: #0b3b8c;
    --blue-2: #1355c0;
    --blue-3: #3c7be8;
    --blue-soft: #dbe7fa;
    --yellow: #fcd116;
    --green: #1eb53a;
    --black: #111111;
    --danger: #c0392b;
    --warning: #b87700;
    --success: #157a34;
    --radius: 22px;
    --radius-sm: 14px;
    --shadow-out: 8px 8px 18px #c5d3e6, -8px -8px 18px #ffffff;
    --shadow-out-sm: 4px 4px 10px #c9d6e8, -4px -4px 10px #ffffff;
    --shadow-in: inset 4px 4px 9px #c9d6e8, inset -4px -4px 9px #ffffff;
    --shadow-in-sm: inset 2px 2px 5px #cdd9e9, inset -2px -2px 5px #ffffff;
    --ring: 0 0 0 3px rgba(19, 85, 192, .18);
    --font: "Segoe UI", "Inter", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background:
        radial-gradient(1200px 700px at 92% -10%, rgba(19, 85, 192, .10), transparent 60%),
        radial-gradient(900px 600px at -10% 30%, rgba(252, 209, 22, .08), transparent 55%),
        var(--bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 { margin: 0; line-height: 1.2; letter-spacing: -.02em; font-weight: 700; }
p { margin: 0; line-height: 1.6; }
a { color: var(--blue-2); text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--blue-2); color: #fff; }

.skip-link {
    position: absolute; left: -999px; top: 8px; z-index: 999;
    background: var(--blue); color: #fff; padding: 10px 16px; border-radius: 10px;
}
.skip-link:focus { left: 12px; }

.icon { flex: 0 0 auto; vertical-align: middle; }

.eyebrow {
    display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .12em;
    text-transform: uppercase; color: var(--muted);
}

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

.sidebar {
    position: fixed; inset: 0 auto 0 0; width: 272px; z-index: 60;
    padding: 22px 16px 18px;
    display: flex; flex-direction: column; gap: 14px;
    background: linear-gradient(165deg, #eff5fd 0%, #e4edf9 100%);
    box-shadow: 14px 0 36px rgba(11, 59, 140, .09);
    overflow-y: auto;
}

.sidebar__brand { display: flex; align-items: center; gap: 12px; padding: 2px 4px 8px; }
.brand-logo {
    width: 50px; height: 50px; border-radius: 16px; flex: 0 0 auto;
    display: grid; place-items: center; background: var(--white);
    box-shadow: var(--shadow-out-sm); padding: 5px;
}
.brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.brand-text strong { display: block; font-size: 19px; letter-spacing: .16em; color: var(--blue); }
.brand-text span { font-size: 10.5px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.sidebar__close { display: none !important; margin-left: auto; }

.sidebar__flag { display: flex; height: 4px; border-radius: 99px; overflow: hidden; margin: 0 4px 2px; }
.sidebar__flag span { flex: 1; }
.flag-black { background: var(--black); }
.flag-yellow { background: var(--yellow); }
.flag-green { background: var(--green); }
.flag-blue { background: var(--blue-2); }

.sidebar__portal {
    padding: 12px 14px; border-radius: var(--radius-sm);
    background: var(--surface); box-shadow: var(--shadow-in-sm);
    margin: 0 2px;
}
.sidebar__portal strong { display: block; font-size: 13px; margin-top: 2px; color: var(--blue); }

.sidebar__nav { flex: 1; display: flex; flex-direction: column; gap: 16px; padding: 4px 0 10px; }
.nav-section { display: flex; flex-direction: column; gap: 3px; }
.nav-section__label {
    margin: 0 0 4px 12px; font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase;
    color: var(--muted); font-weight: 700;
}
.nav-link {
    display: flex; align-items: center; gap: 11px; padding: 10px 12px;
    border-radius: 13px; color: var(--ink-soft); font-size: 13px; font-weight: 600;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}
.nav-link__icon { display: grid; place-items: center; width: 26px; height: 26px; color: var(--muted); }
.nav-link:hover { background: rgba(255, 255, 255, .55); color: var(--blue); transform: translateX(2px); }
.nav-link:hover .nav-link__icon { color: var(--blue-2); }
.nav-link.is-active {
    background: linear-gradient(145deg, #f5f9ff, #e1eaf8);
    box-shadow: var(--shadow-out-sm); color: var(--blue);
}
.nav-link.is-active .nav-link__icon { color: var(--blue-2); }
.nav-link__label { flex: 1; }
.nav-badge {
    min-width: 21px; height: 21px; padding: 0 6px; border-radius: 99px;
    display: grid; place-items: center; font-size: 10.5px; font-weight: 800;
    background: var(--blue-2); color: #fff;
}
.nav-badge--warning { background: var(--yellow); color: #423500; }
.nav-badge--danger { background: var(--danger); }

.sidebar__footer {
    display: flex; align-items: center; gap: 8px; padding-top: 14px;
    border-top: 1px solid rgba(11, 59, 140, .09);
}
.sidebar-user { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; }
.sidebar-user strong { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user span { display: block; font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.app-main { flex: 1; min-width: 0; margin-left: 272px; display: flex; flex-direction: column; min-height: 100vh; }

.topbar {
    position: sticky; top: 0; z-index: 40;
    display: flex; align-items: center; gap: 18px;
    padding: 16px 30px; min-height: 84px;
    background: rgba(232, 239, 249, .82);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(11, 59, 140, .06);
}
.topbar__menu { display: none !important; }
.topbar__title { flex: 1; min-width: 0; }
.topbar__title h1 { font-size: 22px; margin-top: 3px; color: var(--blue); }
.topbar__actions { display: flex; align-items: center; gap: 14px; }
.topbar__tag {
    font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--blue);
    background: var(--blue-soft); padding: 7px 12px; border-radius: 99px;
    white-space: nowrap;
}
.topbar__user { display: flex; align-items: center; gap: 9px; color: var(--ink); }
.topbar__user strong { display: block; font-size: 12.5px; }
.topbar__user small { color: var(--muted); font-size: 10px; }

.page { flex: 1; padding: 26px 30px 42px; max-width: 1520px; width: 100%; margin: 0 auto; animation: fadeUp .35s ease both; }
.page__subtitle { color: var(--muted); font-size: 13.5px; margin: -8px 0 20px; max-width: 780px; }

.app-footer {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 16px 30px 24px; color: var(--muted); font-size: 11px;
}
.app-footer__flag { display: inline-flex; gap: 3px; }
.app-footer__flag i { width: 16px; height: 4px; border-radius: 99px; }
.app-footer__flag i:nth-child(1) { background: var(--black); }
.app-footer__flag i:nth-child(2) { background: var(--yellow); }
.app-footer__flag i:nth-child(3) { background: var(--green); }
.app-footer__flag i:nth-child(4) { background: var(--blue-2); }

.sidebar-backdrop { display: none; }

/* ---------------------------------------------------------------- cards */
.card {
    background: linear-gradient(150deg, #edf3fc, #e6eef9);
    border-radius: var(--radius); padding: 22px;
    box-shadow: var(--shadow-out);
    border: 1px solid rgba(255, 255, 255, .7);
}
.card--flat { box-shadow: var(--shadow-out-sm); }
.card--inset { box-shadow: var(--shadow-in); background: var(--surface); border: 0; }
.card--accent { position: relative; overflow: hidden; }
.card--accent::after {
    content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%;
    right: -70px; top: -80px; background: radial-gradient(circle, rgba(19,85,192,.16), transparent 70%);
}
.card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.card__head h2 { font-size: 15.5px; color: var(--blue); }
.card__head p { font-size: 12px; color: var(--muted); margin-top: 3px; }

.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.split--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 20px; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed rgba(11,59,140,.1); color: inherit; }
.list-row:last-child { border-bottom: 0; }
.list-row:hover .user-cell strong { color: var(--blue-2); }

.stat-card {
    display: flex; align-items: center; gap: 14px;
    padding: 18px 20px; border-radius: 20px;
    background: linear-gradient(150deg, #eef4fd, #e4edf9);
    box-shadow: var(--shadow-out-sm);
    border: 1px solid rgba(255, 255, 255, .7);
}
.stat-icon {
    width: 46px; height: 46px; border-radius: 15px; flex: 0 0 auto;
    display: grid; place-items: center; color: var(--blue-2);
    background: var(--surface); box-shadow: var(--shadow-out-sm);
}
.stat-icon--yellow { color: #7a5d00; background: #fdf3c8; }
.stat-icon--green { color: var(--success); background: #dcf5e3; }
.stat-icon--red { color: var(--danger); background: #fbe1de; }
.stat-icon--dark { color: #fff; background: linear-gradient(145deg, #1c3f70, #0b2545); }
.stat-body { min-width: 0; }
.stat-body span { display: block; font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.stat-body strong { display: block; font-size: 25px; line-height: 1.15; margin-top: 2px; color: var(--blue); }
.stat-body small { color: var(--muted); font-size: 10.5px; }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 30px 0 14px; }
.section-head h2 { font-size: 17px; color: var(--blue); }
.section-head p { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.section-head:first-child { margin-top: 0; }

/* ---------------------------------------------------------------- buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 18px; border: 0; border-radius: 13px; cursor: pointer;
    font-size: 12.8px; font-weight: 700; letter-spacing: .01em;
    background: linear-gradient(145deg, #f4f8fe, #e2ebf8);
    color: var(--blue); box-shadow: var(--shadow-out-sm);
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
    text-decoration: none; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: 6px 7px 14px #c5d3e6, -5px -5px 12px #fff; }
.btn:active { transform: translateY(0); box-shadow: var(--shadow-in-sm); }
.btn:focus-visible { outline: none; box-shadow: var(--shadow-out-sm), var(--ring); }
.btn:disabled, .btn.is-disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.btn--primary {
    background: linear-gradient(145deg, var(--blue-2), var(--blue));
    color: #fff; box-shadow: 5px 5px 12px rgba(11, 59, 140, .32), -3px -3px 9px rgba(255,255,255,.75);
}
.btn--primary:hover { filter: brightness(1.06); box-shadow: 6px 8px 16px rgba(11, 59, 140, .36), -4px -4px 10px rgba(255,255,255,.8); }
.btn--yellow { background: linear-gradient(145deg, #ffe05b, var(--yellow)); color: #3d3100; box-shadow: 5px 5px 12px rgba(150, 120, 0, .22), -3px -3px 9px #fff; }
.btn--success { background: linear-gradient(145deg, #2ecb4f, #179b37); color: #fff; box-shadow: 5px 5px 12px rgba(21,122,52,.25), -3px -3px 9px #fff; }
.btn--danger { background: linear-gradient(145deg, #d9564a, #b03025); color: #fff; box-shadow: 5px 5px 12px rgba(160,40,30,.25), -3px -3px 9px #fff; }
.btn--soft { background: var(--surface); box-shadow: var(--shadow-out-sm); }
.btn--ghost { background: transparent; box-shadow: none; color: var(--blue-2); padding: 8px 10px; }
.btn--ghost:hover { background: rgba(19, 85, 192, .08); box-shadow: none; }
.btn--sm { padding: 8px 12px; font-size: 11.5px; border-radius: 10px; }
.btn--lg { padding: 14px 24px; font-size: 14px; border-radius: 15px; }
.btn--block { width: 100%; }
.btn--icon { padding: 9px; width: 38px; height: 38px; }

.icon-btn {
    display: inline-grid; place-items: center; width: 38px; height: 38px;
    border: 0; border-radius: 12px; cursor: pointer; background: var(--surface);
    color: var(--blue); box-shadow: var(--shadow-out-sm);
    transition: transform .15s ease, box-shadow .15s ease;
}
.icon-btn:hover { transform: translateY(-1px); }
.icon-btn:active { box-shadow: var(--shadow-in-sm); }
.icon-btn--danger { color: var(--danger); }
.icon-btn--sm { width: 30px; height: 30px; border-radius: 9px; }

.btn-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.btn-row--end { justify-content: flex-end; }

/* ---------------------------------------------------------------- forms */
.form-grid { display: grid; gap: 16px; }
.form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-group { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.form-group--full { grid-column: 1 / -1; }
.form-label { font-size: 11.5px; font-weight: 700; color: var(--ink-soft); letter-spacing: .02em; }
.form-hint { font-size: 11px; color: var(--muted); }
.form-error { font-size: 11px; color: var(--danger); font-weight: 600; }

.input, .select, .textarea {
    width: 100%; border: 0; border-radius: 13px; padding: 12px 15px;
    background: var(--surface); color: var(--ink);
    box-shadow: var(--shadow-in-sm); font-size: 13px;
    transition: box-shadow .18s ease;
    outline: none;
}
.input::placeholder, .textarea::placeholder { color: #93a5bd; }
.input:focus, .select:focus, .textarea:focus { box-shadow: var(--shadow-in-sm), var(--ring); }
.textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.select {
    appearance: none; -webkit-appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236c819d' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center;
    padding-right: 38px;
}
.input--icon { padding-left: 42px; }
.input-wrap { position: relative; }
.input-wrap .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }

.check { display: inline-flex; align-items: flex-start; gap: 9px; font-size: 12px; color: var(--ink-soft); cursor: pointer; line-height: 1.5; }
.check input { appearance: none; -webkit-appearance: none; width: 19px; height: 19px; flex: 0 0 auto; border-radius: 6px; background: var(--surface); box-shadow: var(--shadow-in-sm); display: grid; place-items: center; margin: 0; cursor: pointer; transition: background .15s ease; }
.check input::after { content: "✓"; font-size: 12px; font-weight: 900; color: #fff; opacity: 0; transform: scale(.6); transition: opacity .15s ease, transform .15s ease; }
.check input:checked { background: linear-gradient(145deg, var(--blue-2), var(--blue)); box-shadow: 2px 2px 5px rgba(11,59,140,.3); }
.check input:checked::after { opacity: 1; transform: scale(1); }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.switch input { appearance: none; -webkit-appearance: none; width: 44px; height: 25px; border-radius: 99px; background: var(--surface); box-shadow: var(--shadow-in-sm); position: relative; cursor: pointer; transition: background .2s ease; flex: 0 0 auto; }
.switch input::after { content: ""; position: absolute; width: 19px; height: 19px; border-radius: 50%; background: #fff; box-shadow: 1px 1px 4px rgba(11,59,140,.25); top: 3px; left: 3px; transition: transform .2s ease, background .2s ease; }
.switch input:checked { background: linear-gradient(145deg, var(--blue-2), var(--blue)); box-shadow: inset 1px 1px 3px rgba(0,0,0,.2); }
.switch input:checked::after { transform: translateX(19px); }

.file-drop {
    display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px;
    background: var(--surface); box-shadow: var(--shadow-in-sm); cursor: pointer;
    color: var(--muted); font-size: 12px; border: 1px dashed rgba(19, 85, 192, .3);
}
.file-drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.file-drop__icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); flex: 0 0 auto; }
.file-preview { margin-top: 10px; border-radius: 14px; overflow: hidden; max-height: 220px; box-shadow: var(--shadow-out-sm); }
.file-preview img { width: 100%; max-height: 220px; object-fit: cover; }

.searchbar { display: flex; gap: 10px; align-items: center; width: 100%; }
.searchbar .input-wrap { flex: 1; min-width: 180px; }

.toolbar {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    flex-wrap: wrap; margin-bottom: 18px;
}
.toolbar__filters { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.toolbar .input, .toolbar .select { width: auto; min-width: 120px; padding-top: 9px; padding-bottom: 9px; font-size: 12px; }
.toolbar .searchbar { max-width: 340px; }

/* ---------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; border-radius: 16px; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 680px; }
.table th {
    text-align: left; font-size: 9.8px; letter-spacing: .1em; text-transform: uppercase;
    color: var(--muted); font-weight: 800; padding: 10px 12px;
    border-bottom: 1px solid rgba(11, 59, 140, .10); white-space: nowrap;
}
.table td { padding: 13px 12px; border-bottom: 1px solid rgba(11, 59, 140, .06); font-size: 12.4px; vertical-align: middle; }
.table tbody tr { transition: background .15s ease; }
.table tbody tr:hover { background: rgba(255, 255, 255, .45); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .cell-title { font-weight: 700; color: var(--ink); display: block; max-width: 330px; }
.table .cell-sub { color: var(--muted); font-size: 11px; display: block; margin-top: 2px; }
.table .cell-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.table--compact td { padding: 9px 10px; }

.avatar { border-radius: 50%; object-fit: cover; background: var(--blue-soft); }
.avatar--square { border-radius: 13px; }
.user-cell { display: flex; align-items: center; gap: 9px; min-width: 0; }
.user-cell strong { display: block; font-size: 12.5px; }
.user-cell span { display: block; font-size: 10.5px; color: var(--muted); }

.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 9px; border-radius: 99px; font-size: 9.8px; font-weight: 800;
    letter-spacing: .04em; text-transform: uppercase; white-space: nowrap;
    background: #e3eaf5; color: var(--ink-soft);
}
.badge--primary { background: var(--blue-soft); color: var(--blue); }
.badge--success { background: #d9f3e1; color: var(--success); }
.badge--warning { background: #fdf1c5; color: #765900; }
.badge--danger { background: #fbe0dc; color: var(--danger); }
.badge--info { background: #ddebfb; color: #0f4a91; }
.badge--muted { background: #e6ebf3; color: var(--muted); }
.badge--dark { background: #dbe2ed; color: var(--black); }
.badge--live { background: var(--danger); color: #fff; animation: pulse 1.7s infinite; }

/* ---------------------------------------------------------------- flash */
.flash {
    display: flex; align-items: center; gap: 10px;
    padding: 13px 16px; border-radius: 14px; margin-bottom: 18px;
    background: var(--surface); box-shadow: var(--shadow-out-sm);
    font-size: 12.6px; font-weight: 600; color: var(--ink-soft);
    animation: fadeUp .3s ease both;
}
.flash--success { color: var(--success); }
.flash--error { color: var(--danger); }
.flash--warning { color: var(--warning); }
.flash__close { margin-left: auto; background: none; border: 0; cursor: pointer; color: var(--muted); padding: 4px; }

/* ---------------------------------------------------------------- login */
.auth-body {
    min-height: 100vh;
    background:
        radial-gradient(900px 600px at 15% 10%, rgba(19, 85, 192, .16), transparent 55%),
        radial-gradient(700px 500px at 85% 90%, rgba(252, 209, 22, .16), transparent 55%),
        var(--bg);
}
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.auth-brand { padding: 52px 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-brand::before {
    content: ""; position: absolute; inset: auto -160px -220px auto; width: 520px; height: 520px;
    border-radius: 50%; border: 1px solid rgba(11, 59, 140, .1);
    box-shadow: 0 0 0 40px rgba(19,85,192,.025), 0 0 0 100px rgba(19,85,192,.02);
}
.auth-brand__logo { width: 96px; height: 96px; border-radius: 28px; background: #fff; padding: 12px; box-shadow: var(--shadow-out); }
.auth-brand__logo img { width: 100%; height: 100%; object-fit: contain; }
.auth-brand__flag { display: flex; width: 140px; height: 6px; border-radius: 99px; overflow: hidden; margin: 26px 0 22px; }
.auth-brand__flag span { flex: 1; }
.auth-brand h1 { font-size: clamp(34px, 4.4vw, 58px); line-height: 1.02; letter-spacing: -.03em; color: var(--blue); max-width: 540px; }
.auth-brand h1 em { font-style: normal; color: var(--blue-2); }
.auth-brand p.lead { margin-top: 18px; max-width: 460px; color: var(--ink-soft); font-size: 14.5px; }
.auth-brand__footer { display: flex; gap: 26px; margin-top: 40px; flex-wrap: wrap; }
.auth-brand__stat strong { display: block; font-size: 20px; color: var(--blue); }
.auth-brand__stat span { font-size: 10.5px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; font-weight: 700; }
.auth-panel { display: grid; place-items: center; padding: 36px 34px; }
.auth-card { width: min(460px, 100%); padding: 30px; border-radius: 28px; background: linear-gradient(155deg, #f1f6fd, #e4edf9); box-shadow: var(--shadow-out); border: 1px solid rgba(255,255,255,.8); animation: fadeUp .5s ease both; }
.auth-card__logo { width: 62px; height: 62px; border-radius: 18px; background: #fff; padding: 7px; box-shadow: var(--shadow-out-sm); margin: 0 auto 14px; }
.auth-card__logo img { width: 100%; height: 100%; object-fit: contain; }
.auth-card__head { text-align: center; margin-bottom: 20px; }
.auth-card__head h2 { font-size: 21px; color: var(--blue); }
.auth-card__head p { color: var(--muted); font-size: 12px; margin-top: 5px; }
.auth-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 5px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-in-sm); margin-bottom: 20px; }
.auth-tab { border: 0; background: transparent; border-radius: 10px; padding: 9px 6px; font-size: 10.5px; font-weight: 800; color: var(--muted); cursor: pointer; transition: all .18s ease; letter-spacing: .01em; }
.auth-tab.is-active { background: linear-gradient(145deg, #f6f9fe, #e6eefa); box-shadow: var(--shadow-out-sm); color: var(--blue); }
.auth-tab:hover:not(.is-active) { color: var(--blue-2); }
.auth-note { text-align: center; font-size: 10.5px; color: var(--muted); margin-top: 18px; line-height: 1.6; }
.auth-hint { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: rgba(252, 209, 22, .13); font-size: 10.8px; color: #6d5600; margin-top: 14px; line-height: 1.55; }
.auth-hint--blue { background: rgba(19, 85, 192, .08); color: var(--blue); }
.demo-accounts { margin-top: 16px; font-size: 10.5px; color: var(--muted); }
.demo-accounts summary { cursor: pointer; font-weight: 700; color: var(--blue-2); }
.demo-accounts code { background: #fff; padding: 1px 5px; border-radius: 5px; font-size: 10px; }

/* ---------------------------------------------------------------- dashboard bits */
.hero {
    position: relative; overflow: hidden; padding: 28px;
    border-radius: 26px; color: #fff;
    background: linear-gradient(120deg, #0b3b8c 0%, #1355c0 62%, #2f74dd 100%);
    box-shadow: 0 18px 40px rgba(11, 59, 140, .28);
}
.hero::after {
    content: ""; position: absolute; right: -80px; top: -110px; width: 300px; height: 300px;
    border-radius: 50%; background: rgba(255, 255, 255, .08);
    box-shadow: 0 0 0 34px rgba(255,255,255,.04), 0 0 0 68px rgba(255,255,255,.03);
}
.hero h2 { font-size: 24px; }
.hero p { color: rgba(255, 255, 255, .82); margin-top: 8px; max-width: 560px; font-size: 12.8px; }
.hero__flag { display: flex; gap: 4px; margin-bottom: 16px; }
.hero__flag span { width: 26px; height: 4px; border-radius: 99px; background: rgba(255,255,255,.8); }
.hero__flag span:nth-child(2) { background: var(--yellow); }
.hero__flag span:nth-child(3) { background: var(--green); }
.hero__flag span:nth-child(4) { background: rgba(255,255,255,.4); }
.hero__actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.hero .btn--primary { background: #fff; color: var(--blue); }
.hero .btn--ghost { color: #fff; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.08); }
.hero .btn--ghost:hover { background: rgba(255,255,255,.16); }

.metric-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px dashed rgba(11,59,140,.1); font-size: 12px; }
.metric-row:last-child { border-bottom: 0; }
.metric-row strong { color: var(--blue); }

.progress { height: 7px; border-radius: 99px; background: var(--surface); box-shadow: var(--shadow-in-sm); overflow: hidden; }
.progress__bar { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--blue-2), var(--blue)); }
.progress__bar--green { background: linear-gradient(90deg, #31cf58, var(--green)); }
.progress__bar--yellow { background: linear-gradient(90deg, #ffe268, var(--yellow)); }
.progress__bar--red { background: linear-gradient(90deg, #e06a5e, var(--danger)); }

.engagement-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); font-weight: 600; }
.engagement-pill b { color: var(--ink); }

.sparkline { width: 100%; height: 86px; display: block; overflow: visible; }
.chart-bars { display: flex; align-items: flex-end; gap: 8px; height: 120px; padding-top: 8px; }
.chart-bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.chart-bar__fill { width: 100%; max-width: 34px; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, #4b8cf0, var(--blue-2)); min-height: 4px; transition: height .4s ease; }
.chart-bar small { font-size: 9px; color: var(--muted); text-transform: uppercase; }

.empty-state { text-align: center; padding: 42px 20px; color: var(--muted); }
.empty-state .icon { color: #aebed4; margin-bottom: 10px; }
.empty-state strong { display: block; color: var(--ink-soft); font-size: 14px; margin-bottom: 4px; }
.empty-state p { font-size: 12px; max-width: 340px; margin: 0 auto; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 22px; }
.page-btn {
    min-width: 34px; height: 34px; padding: 0 9px; display: grid; place-items: center;
    border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-out-sm);
    font-size: 11.5px; font-weight: 700; color: var(--ink-soft);
}
.page-btn:hover { color: var(--blue); }
.page-btn.is-active { background: linear-gradient(145deg, var(--blue-2), var(--blue)); color: #fff; box-shadow: 3px 3px 8px rgba(11,59,140,.28); }
.page-btn.is-disabled { opacity: .4; pointer-events: none; }
.page-dots { color: var(--muted); font-size: 11px; padding: 0 3px; }

/* ---------------------------------------------------------------- post cards */
.post-list { display: flex; flex-direction: column; gap: 16px; }
.post-card { padding: 20px; border-radius: 20px; background: linear-gradient(150deg, #eef4fd, #e6eef9); box-shadow: var(--shadow-out-sm); border: 1px solid rgba(255,255,255,.7); }
.post-card__head { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.post-card__head .meta { flex: 1; min-width: 0; }
.post-card__head strong { display: block; font-size: 12.8px; }
.post-card__head span { display: block; font-size: 10.5px; color: var(--muted); }
.post-card h3 { font-size: 15px; margin-bottom: 7px; color: var(--blue); }
.post-card p { font-size: 12.3px; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card__media { margin-top: 12px; border-radius: 14px; overflow: hidden; aspect-ratio: 16/8; background: var(--blue-soft); }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.post-stats { display: flex; align-items: center; gap: 14px; margin-top: 13px; padding-top: 12px; border-top: 1px dashed rgba(11,59,140,.1); flex-wrap: wrap; }
.post-stats span { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); font-weight: 600; }
.post-stats .agree { color: var(--success); }
.post-stats .disagree { color: var(--danger); }

.post-preview { border-radius: 18px; overflow: hidden; background: #fff; box-shadow: var(--shadow-out-sm); }
.post-preview__bar { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid #eef2f8; }
.post-preview__body { padding: 16px; }
.post-preview h4 { font-size: 15px; color: var(--blue); margin-bottom: 6px; }
.post-preview p { font-size: 12px; color: var(--ink-soft); white-space: pre-line; }
.post-preview img { width: 100%; max-height: 240px; object-fit: cover; }

/* ---------------------------------------------------------------- live */
.live-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.live-card {
    border-radius: 20px; overflow: hidden; background: linear-gradient(150deg, #eef4fd, #e3ecf9);
    box-shadow: var(--shadow-out-sm); border: 1px solid rgba(255,255,255,.8);
    display: flex; flex-direction: column;
}
.live-card__cover { position: relative; aspect-ratio: 16/9; background: #0b2545; overflow: hidden; }
.live-card__cover img { width: 100%; height: 100%; object-fit: cover; opacity: .88; }
.live-card__cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.55)); }
.live-card__badge { position: absolute; top: 10px; left: 10px; z-index: 2; }
.live-card__viewers { position: absolute; bottom: 10px; right: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 700; color: #fff; background: rgba(0,0,0,.5); padding: 4px 8px; border-radius: 99px; backdrop-filter: blur(4px); }
.live-card__body { padding: 13px 15px 15px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.live-card__body h3 { font-size: 13px; line-height: 1.35; }
.live-card__host { display: flex; align-items: center; gap: 7px; font-size: 10.5px; color: var(--muted); }
.live-card__actions { display: flex; gap: 6px; margin-top: auto; flex-wrap: wrap; }
.live-card__actions .btn { flex: 1; }

/* ---------------------------------------------------------------- modal */
.modal { position: fixed; inset: 0; z-index: 90; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal.is-open { display: flex; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(8, 26, 51, .48); backdrop-filter: blur(3px); }
.modal__panel {
    position: relative; width: min(680px, 100%); max-height: 90vh; overflow-y: auto;
    background: linear-gradient(155deg, #f1f6fd, #e6eef9);
    border-radius: 26px; padding: 26px; box-shadow: 0 30px 80px rgba(8, 26, 51, .35);
    animation: fadeUp .25s ease both; border: 1px solid rgba(255,255,255,.8);
}
.modal__panel--wide { width: min(920px, 100%); }
.modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.modal__head h2 { font-size: 18px; color: var(--blue); }
.modal__head p { color: var(--muted); font-size: 11.5px; margin-top: 3px; }
.modal__close { border: 0; background: var(--surface); width: 32px; height: 32px; border-radius: 10px; box-shadow: var(--shadow-out-sm); cursor: pointer; color: var(--muted); display: grid; place-items: center; }
.modal__foot { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- detail views */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.detail-list { display: flex; flex-direction: column; gap: 12px; }
.detail-row { display: flex; justify-content: space-between; gap: 14px; font-size: 12px; padding: 9px 0; border-bottom: 1px dashed rgba(11,59,140,.1); }
.detail-row:last-child { border-bottom: 0; }
.detail-row span { color: var(--muted); }
.detail-row strong { text-align: right; font-weight: 600; max-width: 62%; word-break: break-word; }
.reply-list { display: flex; flex-direction: column; gap: 12px; }
.reply { display: flex; gap: 10px; padding: 13px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-out-sm); }
.reply--portal { background: linear-gradient(145deg, #e3edfb, #dbe8f9); }
.reply__body { flex: 1; min-width: 0; }
.reply__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 3px; }
.reply__head strong { font-size: 12px; }
.reply__head span { font-size: 10px; color: var(--muted); }
.reply p { font-size: 12px; color: var(--ink-soft); white-space: pre-line; }
.attachment { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; color: var(--blue-2); padding: 7px 10px; border-radius: 9px; background: var(--blue-soft); margin-top: 10px; }

/* ---------------------------------------------------------------- officials */
.profile-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.person-card { padding: 18px 16px; border-radius: 18px; background: linear-gradient(150deg, #eff4fd, #e6eef9); box-shadow: var(--shadow-out-sm); text-align: center; border: 1px solid rgba(255,255,255,.75); }
.person-card img { width: 74px; height: 74px; border-radius: 50%; object-fit: cover; margin: 0 auto 10px; box-shadow: var(--shadow-out-sm); }
.person-card h3 { font-size: 13px; }
.person-card p { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.person-card small { display: inline-block; margin-top: 8px; font-size: 9.5px; color: var(--blue); background: var(--blue-soft); padding: 3px 8px; border-radius: 99px; font-weight: 700; }

/* ---------------------------------------------------------------- misc */
.muted { color: var(--muted); }
.small { font-size: 11px; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 18px; }
.mt-3 { margin-top: 26px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 18px; }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; }
.divider { height: 1px; background: rgba(11,59,140,.09); margin: 16px 0; border: 0; }
.stat-inline { display: flex; gap: 18px; flex-wrap: wrap; }
.stat-inline .stat { min-width: 80px; }
.stat-inline strong { display: block; font-size: 18px; color: var(--blue); }
.stat-inline span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }

.nida-chip { font-family: "Consolas", monospace; font-size: 10.5px; letter-spacing: .03em; }

.table-actions { display: flex; gap: 5px; justify-content: flex-end; }

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

/* ---------------------------------------------------------------- animations */
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1240px) {
    .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .detail-grid { grid-template-columns: 1fr; }
    .split { grid-template-columns: 1fr; }
    .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1080px) {
    .auth-page { grid-template-columns: 1fr; }
    .auth-brand { display: none; }
    .sidebar { transform: translateX(-100%); transition: transform .25s ease; }
    .sidebar.is-open { transform: translateX(0); }
    .sidebar__close { display: inline-grid !important; }
    .app-main { margin-left: 0; }
    .topbar__menu { display: inline-grid !important; }
    .sidebar-backdrop.is-open { display: block; position: fixed; inset: 0; background: rgba(8,26,51,.35); z-index: 55; backdrop-filter: blur(2px); }
}

@media (max-width: 820px) {
    .page { padding: 20px 18px 34px; }
    .topbar { padding: 12px 18px; min-height: 74px; gap: 10px; }
    .topbar__title h1 { font-size: 18px; }
    .topbar__tag { display: none; }
    .topbar__user span { display: none; }
    .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
    .form-grid--2 { grid-template-columns: 1fr; }
    .card { padding: 18px; border-radius: 18px; }
    .app-footer { padding: 12px 18px 20px; flex-wrap: wrap; }
    .auth-panel { padding: 20px 16px; }
    .auth-card { padding: 24px 20px; }
    .hero { padding: 22px; }
    .hero h2 { font-size: 20px; }
    .toolbar { align-items: stretch; }
    .toolbar__filters { width: 100%; }
    .toolbar .searchbar { max-width: none; }
}

@media (max-width: 520px) {
    .btn { padding: 10px 14px; }
    .btn--sm { padding: 7px 10px; }
    .auth-tabs { grid-template-columns: 1fr; }
    .table { min-width: 580px; }
    .stat-body strong { font-size: 21px; }
}

/* Bilingual switcher */
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border-radius: 999px;
    background: rgba(11, 59, 140, 0.08);
    border: 1px solid rgba(11, 59, 140, 0.12);
}
.lang-switch__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .04em;
    color: var(--muted);
    text-decoration: none;
    transition: all .18s ease;
}
.lang-switch__btn:hover { color: var(--blue); }
.lang-switch__btn.is-active {
    background: var(--blue);
    color: #fff;
    box-shadow: 0 4px 10px rgba(11, 59, 140, .28);
}
.auth-lang { display: flex; justify-content: center; margin: -4px 0 14px; }
