/*
| Olimem Docs & Registry – theme
| Hand-authored (no build step required). Navigation is modelled on Olimem
| Billing's top bar. Colours come from the Murewa RDC crest: forest and leaf
| greens with the gold of its flowers.
*/

/* ------------------------------------------------------------------ *
 | Tokens
 * ------------------------------------------------------------------ */

:root {
    /* Brand – Murewa RDC green. Use --brand-* in new code. */
    --brand-50: #effaf3;
    --brand-100: #d8f2e1;
    --brand-200: #b3e4c6;
    --brand-300: #7fcfa0;
    --brand-400: #48b276;
    --brand-500: #249657;
    --brand-600: #167a45;
    --brand-700: #12613a;
    --brand-800: #114e31;
    --brand-900: #0f402a;
    --brand-950: #062417;
    --brand-rgb: 22, 122, 69;          /* --brand-600, for rgba() */

    /* The --brown-* names pre-date the green theme; every screen uses them,
       so they stay as aliases of the brand scale. */
    --brown-50: var(--brand-50);
    --brown-100: var(--brand-100);
    --brown-200: var(--brand-200);
    --brown-300: var(--brand-300);
    --brown-400: var(--brand-400);
    --brown-500: var(--brand-500);
    --brown-600: var(--brand-600);
    --brown-700: var(--brand-700);
    --brown-800: var(--brand-800);
    --brown-900: var(--brand-900);
    --brown-950: var(--brand-950);

    /* Accent – crest gold */
    --gold-300: #fde68a;
    --gold-400: #f5c938;
    --gold-500: #d9a514;

    /* Neutrals – a faint green-grey so white cards lift off the canvas */
    --ink-900: #101b15;
    --ink-700: #34443b;
    --ink-500: #627169;
    --ink-400: #94a39a;
    --line: #e2e9e4;
    --line-strong: #cdd8d0;
    --surface: #ffffff;
    --surface-muted: #f6f8f6;
    --canvas: #f2f5f3;

    --success: #15803d;
    --success-bg: #e6f6ec;
    --warning: #a1620f;
    --warning-bg: #fdf5e1;
    --danger: #c0281c;
    --danger-bg: #fdecea;
    --info: #1d5f9a;
    --info-bg: #e7f0f9;

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 18px;
    --shadow-rgb: 8, 32, 19;
    --shadow-sm: 0 1px 2px rgba(var(--shadow-rgb), .05), 0 1px 1px rgba(var(--shadow-rgb), .03);
    --shadow: 0 6px 18px -6px rgba(var(--shadow-rgb), .12), 0 2px 4px rgba(var(--shadow-rgb), .05);
    --shadow-lg: 0 24px 48px -12px rgba(var(--shadow-rgb), .22), 0 6px 14px rgba(var(--shadow-rgb), .08);
    --ring: 0 0 0 4px rgba(var(--brand-rgb), .16);
    --nav-h: 62px;
    --ease: cubic-bezier(.2, .7, .2, 1);

    --font: 'Instrument Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Plus Jakarta Sans', var(--font);
}

/* ------------------------------------------------------------------ *
 | Base
 * ------------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    color: var(--ink-900);
    background: var(--canvas);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brown-600); text-decoration: none; }
a:hover { color: var(--brown-800); }

h1, h2, h3, h4, p { margin: 0; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

[hidden] { display: none !important; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 2px solid var(--gold-400); outline-offset: 2px; }

/* ------------------------------------------------------------------ *
 | Top navigation (OBilling pattern, brown)
 * ------------------------------------------------------------------ */

.bg-olimem {
    background: linear-gradient(180deg, var(--brown-600) 0%, var(--brown-800) 100%);
}

.topnav {
    position: sticky;
    top: 0;
    z-index: 85; /* above all page content, below the jump box (90) and modals (95) */
    color: #fff;
    box-shadow: 0 2px 8px rgba(8, 32, 19, .25);
}

.topnav__inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: var(--nav-h);
    padding: 0 1rem;
}

.topnav__brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-shrink: 0;
    color: #fff;
    font-weight: 700;
    font-size: 1.02rem;
    letter-spacing: .01em;
    white-space: nowrap;
}
.topnav__brand:hover { color: #fff; }
.topnav__brand svg { width: 32px; height: 32px; }
.topnav__brand small {
    display: block;
    font-size: .66rem;
    font-weight: 600;
    letter-spacing: .18em;
    color: var(--gold-300);
    text-transform: uppercase;
}

.topnav__toggle {
    display: none;
    margin-left: auto;
    border: 1px solid rgba(255, 255, 255, .25);
    background: transparent;
    color: #fff;
    border-radius: var(--radius-sm);
    padding: .4rem .65rem;
    font-size: 1.1rem;
}

.topnav__collapse {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 1rem;
    min-width: 0;
}

.topnav__menu {
    display: flex;
    align-items: stretch;
    gap: .1rem;
    margin: 0;
    padding: 0;
    list-style: none;
    flex: 1;
    min-width: 0;
}

.topnav__item, .menu { position: relative; display: flex; }

.topnav__link {
    display: flex;
    align-items: center;
    gap: .45rem;
    height: var(--nav-h);
    padding: 0 .75rem;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, .9);
    font-size: .875rem;
    font-weight: 500;
    white-space: nowrap;
    transition: background-color .15s, color .15s;
}
.topnav__link i { font-size: .85rem; opacity: .9; }
.topnav__link .caret { font-size: .6rem; opacity: .75; margin-left: .1rem; transition: transform .15s; }
.topnav__link:hover,
.topnav__link:focus-visible { color: #fff; background: rgba(255, 255, 255, .08); }
.topnav__link.is-open { color: #fff; background: rgba(0, 0, 0, .15); }
.topnav__link.is-open .caret { transform: rotate(180deg); }
.topnav__link.is-active {
    color: #fff;
    font-weight: 600;
    box-shadow: inset 0 -3px 0 0 var(--gold-400);
}

.topnav__right {
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-shrink: 0;
}

.topnav__search { position: relative; }
.topnav__search i {
    position: absolute; left: .7rem; top: 50%; transform: translateY(-50%);
    color: rgba(255, 255, 255, .6); font-size: .8rem; pointer-events: none;
}
.topnav__search input {
    width: 220px;
    height: 34px;
    padding: 0 .75rem 0 2rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .2);
    background: rgba(0, 0, 0, .18);
    color: #fff;
    font-size: .82rem;
    transition: width .2s, background-color .2s, border-color .2s;
}
.topnav__search input::placeholder { color: rgba(255, 255, 255, .6); }
.topnav__search input:focus {
    outline: none;
    width: 260px;
    background: rgba(0, 0, 0, .28);
    border-color: var(--gold-400);
}

.nav-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    height: 34px;
    padding: 0 .7rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, .22);
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font-size: .85rem;
    font-weight: 500;
}
.nav-btn:hover, .nav-btn.is-open { background: rgba(255, 255, 255, .16); }
.nav-btn__badge {
    position: absolute; top: -6px; right: -6px;
    min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 999px;
    background: var(--gold-400); color: var(--brown-950);
    font-size: .68rem; font-weight: 700; line-height: 18px; text-align: center;
}

.avatar {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--gold-400); color: var(--brown-950);
    font-size: .72rem; font-weight: 700; letter-spacing: .02em;
}
.avatar--lg { width: 40px; height: 40px; font-size: .9rem; }

/* ------------------------------------------------------------------ *
 | Dropdown menus
 * ------------------------------------------------------------------ */

.dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 60;
    min-width: 250px;
    padding: .4rem;
    background: var(--surface);
    color: var(--ink-900);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    animation: dropdown-in .12s ease-out;
}
.dropdown--end { left: auto; right: 0; }

@keyframes dropdown-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: none; }
}

.dropdown__header {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .55rem .6rem .3rem;
    color: var(--brown-500);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.dropdown__divider { height: 1px; margin: .35rem .2rem; background: var(--line); border: 0; }

.dropdown__item {
    display: flex;
    align-items: center;
    gap: .6rem;
    width: 100%;
    padding: .45rem .6rem;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--ink-700);
    font-size: .86rem;
    text-align: left;
    white-space: nowrap;
}
.dropdown__item i { width: 1.1rem; text-align: center; color: var(--brown-400); font-size: .85rem; }
.dropdown__item:hover,
.dropdown__item:focus-visible { background: var(--brown-50); color: var(--brown-800); outline: none; }
.dropdown__item:hover i { color: var(--brown-600); }
.dropdown__item.is-active { background: var(--brown-600); color: #fff; font-weight: 600; }
.dropdown__item.is-active i { color: var(--gold-300); }
.dropdown__item--danger, .dropdown__item--danger i { color: var(--danger); }
.dropdown__item--danger:hover { background: var(--danger-bg); color: var(--danger); }

.dropdown__text { padding: .5rem .6rem; color: var(--ink-500); font-size: .8rem; }
.dropdown__user { display: flex; align-items: center; gap: .7rem; padding: .6rem; }
.dropdown__user strong { display: block; font-size: .9rem; color: var(--ink-900); }
.dropdown__user span { display: block; font-size: .78rem; color: var(--ink-500); }

/* Wide multi-column panel (Registry, Reports, Administration). Pinned
   below the navbar and centred so it can't run off either edge. */
.dropdown--wide {
    position: fixed;
    top: calc(var(--nav-h) + 4px);
    left: 50%;
    transform: translateX(-50%);
    width: min(900px, calc(100vw - 1.5rem));
    max-height: calc(100vh - var(--nav-h) - 1rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: .6rem;
    animation: none;
}

.nav-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .1rem .6rem;
}
.nav-grid__header { grid-column: 1 / -1; }
.nav-grid__header:not(:first-child) { margin-top: .35rem; border-top: 1px solid var(--line); padding-top: .2rem; }
.nav-grid .dropdown__item, .nav-group__items .dropdown__item { white-space: normal; }

/* Collapsible groups (Reports) */
.nav-group + .nav-group { margin-top: .2rem; }
.nav-group__header {
    display: flex;
    align-items: center;
    gap: .5rem;
    width: 100%;
    padding: .5rem .7rem;
    border: 0;
    border-radius: var(--radius-sm);
    background: var(--brown-50);
    color: var(--brown-700);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.nav-group__header:hover { background: var(--brown-100); }
.nav-group__header .label { flex: 1; text-align: left; }
.nav-group__header .count {
    padding: .05rem .5rem; border-radius: 999px;
    background: #fff; color: var(--ink-500); font-size: .7rem; font-weight: 600; letter-spacing: 0;
}
.nav-group__header .chev { font-size: .65rem; transition: transform .15s; }
.nav-group.is-open .nav-group__header .chev { transform: rotate(90deg); }
.nav-group__items {
    display: none;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .05rem .5rem;
    padding: .25rem .1rem .4rem;
}
.nav-group.is-open .nav-group__items { display: grid; }

/* Notifications panel */
.dropdown--panel { width: 340px; padding: 0; }
.dropdown--panel .dropdown__header { padding: .75rem .9rem .4rem; }
.dropdown__empty { padding: 1.4rem 1rem 1.6rem; text-align: center; color: var(--ink-500); font-size: .82rem; }
.dropdown__empty i { display: block; margin-bottom: .5rem; font-size: 1.4rem; color: var(--brown-300); }
.dropdown__footer {
    display: block; padding: .6rem; border-top: 1px solid var(--line);
    text-align: center; font-size: .8rem; font-weight: 600;
}

/* ------------------------------------------------------------------ *
 | Responsive navigation
 * ------------------------------------------------------------------ */

/* Breakpoints are sized for nine top-level menu items (Dashboard + eight
   sections); raise them again if another section is added. */
@media (max-width: 1899.98px) {
    .topnav__search { display: none; }
}

@media (min-width: 1800px) and (max-width: 2079.98px) {
    .nav-btn__name { display: none; }
    .topnav__search input:focus { width: 220px; }
}

@media (min-width: 1400px) and (max-width: 1799.98px) {
    .topnav__inner { gap: .75rem; }
    .topnav__link { padding: 0 .55rem; }
    .topnav__link > i:not(.caret) { display: none; }
    .nav-btn__name { display: none; }
}

@media (max-width: 1399.98px) {
    .topnav__inner { flex-wrap: wrap; padding: 0 1rem; }
    .topnav__toggle { display: inline-flex; }
    .topnav__collapse {
        display: none;
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: .5rem;
        padding: .25rem 0 1rem;
    }
    .topnav__collapse.is-open { display: flex; }
    .topnav__menu { flex-direction: column; }
    .topnav__item { flex-direction: column; }
    .topnav__link { height: 44px; border-radius: var(--radius-sm); }
    .topnav__link .caret { margin-left: auto; }
    .topnav__link.is-active { box-shadow: inset 3px 0 0 0 var(--gold-400); }
    .topnav__right { justify-content: space-between; padding-top: .75rem; border-top: 1px solid rgba(255, 255, 255, .15); }
    .topnav__menu .dropdown {
        position: static;
        transform: none;
        width: 100%;
        max-height: none;
        margin: .2rem 0 .4rem;
        box-shadow: none;
        animation: none;
    }
    .topnav__right .dropdown--panel { left: 0; right: auto; }
    .nav-grid, .nav-group__items { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 575.98px) {
    .nav-grid, .nav-group__items { grid-template-columns: 1fr; }
    .topnav__brand small { display: none; }
    .dropdown--panel { width: min(340px, calc(100vw - 2rem)); }
}

/* ------------------------------------------------------------------ *
 | Page header band + content
 * ------------------------------------------------------------------ */

.page-header {
    background: linear-gradient(180deg, var(--brown-200) 0%, var(--brown-100) 100%);
    border-bottom: 1px solid var(--brown-700);
    box-shadow: var(--shadow-sm);
}
.page-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem 1.5rem;
    padding: 1rem 1.25rem;
}
.page-header h1 { font-size: 1.3rem; font-weight: 700; color: var(--brown-800); letter-spacing: -.01em; }
.page-header p { margin-top: .15rem; color: var(--brown-700); font-size: .86rem; opacity: .85; }

.breadcrumb {
    display: flex; flex-wrap: wrap; align-items: center; gap: .4rem;
    margin-bottom: .25rem;
    font-size: .76rem; font-weight: 600; color: var(--brown-500);
    text-transform: uppercase; letter-spacing: .06em;
}
.breadcrumb i { font-size: .55rem; opacity: .7; }

.page { padding: 1.25rem; }
.page__footer {
    padding: 1.25rem; color: var(--ink-400); font-size: .78rem;
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem;
}

/* ------------------------------------------------------------------ *
 | Buttons
 * ------------------------------------------------------------------ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    height: 38px;
    padding: 0 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-size: .86rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn-primary { background: var(--brown-600); color: #fff; box-shadow: 0 1px 2px rgba(8, 32, 19, .2); }
.btn-primary:hover { background: var(--brown-700); color: #fff; }
.btn-light { background: #fff; color: var(--brown-700); border-color: var(--line-strong); }
.btn-light:hover { background: var(--brown-50); color: var(--brown-800); border-color: var(--brown-300); }
.btn i { font-size: .82rem; }

/* ------------------------------------------------------------------ *
 | Cards & dashboard
 * ------------------------------------------------------------------ */

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.card__head {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: .85rem 1.1rem;
    border-bottom: 1px solid var(--line);
}
.card__head h2 { display: flex; align-items: center; gap: .5rem; font-size: .95rem; font-weight: 700; color: var(--ink-900); }
.card__head h2 i { color: var(--brown-500); }
.card__head a { font-size: .8rem; font-weight: 600; }
.card__body { padding: 1.1rem; }

.section-title {
    display: flex; align-items: center; gap: .5rem;
    margin: 1.5rem 0 .75rem;
    font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: var(--brown-600);
}
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--line-strong); }
.section-title:first-child { margin-top: 0; }

.grid { display: grid; gap: 1rem; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }

@media (max-width: 1199.98px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-2-1 { grid-template-columns: 1fr; } }
@media (max-width: 767.98px) { .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 575.98px) { .grid-4 { grid-template-columns: 1fr; } }

.kpi {
    position: relative;
    overflow: hidden;
    padding: 1rem 1.1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 4px solid var(--kpi-accent, var(--brown-500));
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.kpi__label { font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-500); }
.kpi__value { margin-top: .35rem; font-size: 1.75rem; font-weight: 700; color: var(--ink-900); font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi__hint { margin-top: .3rem; font-size: .78rem; color: var(--ink-500); }
.kpi__icon {
    position: absolute; right: .9rem; top: .9rem;
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 10px;
    background: var(--kpi-soft, var(--brown-50)); color: var(--kpi-accent, var(--brown-600));
    font-size: 1rem;
}
.kpi--brown { --kpi-accent: var(--brown-600); --kpi-soft: var(--brown-50); }
.kpi--gold { --kpi-accent: var(--gold-500); --kpi-soft: #fbf3e2; }
.kpi--green { --kpi-accent: var(--success); --kpi-soft: var(--success-bg); }
.kpi--red { --kpi-accent: var(--danger); --kpi-soft: var(--danger-bg); }
.kpi--blue { --kpi-accent: var(--info); --kpi-soft: var(--info-bg); }

/* Workflow pipeline */
.pipeline { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.pipeline li {
    counter-increment: step;
    display: flex; align-items: center; gap: .5rem;
    padding: .45rem .75rem .45rem .45rem;
    border-radius: 999px;
    background: var(--brown-50);
    border: 1px solid var(--brown-100);
    color: var(--brown-800);
    font-size: .8rem; font-weight: 600;
}
.pipeline li::before {
    content: counter(step);
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--brown-600); color: #fff; font-size: .7rem; font-weight: 700;
}
.pipeline li a { color: inherit; text-decoration: none; }
.pipeline li:has(a):hover { background: var(--brown-100); border-color: var(--brown-600); }
.pipeline li i { opacity: .7; margin-right: .15rem; }
.workflow__description { margin: 0 0 .85rem; font-size: .85rem; color: var(--ink-500); }

/* Shortcut tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.tile {
    display: flex; flex-direction: column; align-items: flex-start; gap: .55rem;
    padding: .85rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink-700);
    font-size: .84rem; font-weight: 600;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.tile i {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 9px;
    background: var(--brown-50); color: var(--brown-600); font-size: .9rem;
}
.tile:hover { border-color: var(--brown-300); box-shadow: var(--shadow); color: var(--brown-800); transform: translateY(-1px); }

.empty {
    padding: 2.5rem 1rem;
    text-align: center;
    color: var(--ink-500);
}
.empty__icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 56px; height: 56px; margin-bottom: .9rem;
    border-radius: 16px; background: var(--brown-50); color: var(--brown-500); font-size: 1.4rem;
}
.empty h3 { font-size: 1.05rem; font-weight: 700; color: var(--ink-900); }
.empty p { max-width: 460px; margin: .35rem auto 0; font-size: .86rem; }

.notice {
    display: flex; gap: .65rem; align-items: flex-start;
    padding: .75rem .9rem;
    border-radius: var(--radius-sm);
    background: var(--warning-bg);
    border: 1px solid #f3dcb2;
    color: #7a4a09;
    font-size: .83rem;
}
.notice i { margin-top: .15rem; }

/* ------------------------------------------------------------------ *
 | Authentication pages
 * ------------------------------------------------------------------ */

.auth {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    min-height: 100vh;
    background: var(--canvas);
}

.auth__brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2.5rem;
    overflow: hidden;
    padding: 3rem clamp(2rem, 4vw, 4rem);
    color: #fff;
    background:
        radial-gradient(1200px 600px at 110% -10%, rgba(245, 201, 56, .22), transparent 60%),
        radial-gradient(900px 500px at -20% 120%, rgba(22, 122, 69, .45), transparent 60%),
        linear-gradient(160deg, var(--brown-700) 0%, var(--brown-900) 60%, var(--brown-950) 100%);
}

/* Subtle ruled-ledger texture, a nod to the paper registry */
.auth__brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 34px);
    pointer-events: none;
}
.auth__brand > * { position: relative; z-index: 1; }

.auth-logo { display: flex; align-items: center; gap: .85rem; }
.auth-logo svg { width: 46px; height: 46px; flex-shrink: 0; }
.auth-logo__word { font-size: 1.05rem; font-weight: 700; letter-spacing: .26em; }
.auth-logo__product { font-size: .84rem; color: var(--gold-300); font-weight: 500; letter-spacing: .02em; }

.auth__eyebrow {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .3rem .75rem;
    border: 1px solid rgba(253, 230, 138, .35);
    border-radius: 999px;
    background: rgba(0, 0, 0, .15);
    color: var(--gold-300);
    font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
}
.auth__headline {
    margin-top: 1.25rem;
    max-width: 36rem;
    font-size: clamp(1.8rem, 2.6vw, 2.5rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.02em;
}
.auth__headline em { font-style: normal; color: var(--gold-300); }
.auth__lead { margin-top: 1rem; max-width: 30rem; color: rgba(255, 255, 255, .72); font-size: .95rem; line-height: 1.6; }

.auth__features {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
    max-width: 34rem;
    margin: 2rem 0 0;
    padding: 0;
    list-style: none;
}
.auth__features li {
    display: flex; gap: .7rem; align-items: flex-start;
    padding: .85rem .9rem;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .05);
    backdrop-filter: blur(4px);
}
.auth__features i {
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 32px; height: 32px; border-radius: 8px;
    background: rgba(245, 201, 56, .16); color: var(--gold-300); font-size: .85rem;
}
.auth__features strong { display: block; font-size: .86rem; font-weight: 600; }
.auth__features span { display: block; margin-top: .1rem; font-size: .78rem; color: rgba(255, 255, 255, .62); line-height: 1.45; }

.auth__quote {
    max-width: 34rem;
    padding-left: 1rem;
    border-left: 2px solid var(--gold-400);
    color: rgba(255, 255, 255, .75);
    font-size: .86rem;
    font-style: italic;
    line-height: 1.6;
}
.auth__legal { margin-top: 1rem; color: rgba(255, 255, 255, .45); font-size: .76rem; }

.auth__main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem 1.5rem;
}
.auth__panel { width: 100%; max-width: 420px; margin: 0 auto; }
.auth__mobile-logo { display: none; margin-bottom: 2rem; justify-content: center; }
.auth__mobile-logo .auth-logo__word { color: var(--brown-800); }
.auth__mobile-logo .auth-logo__product { color: var(--brown-500); }

.auth-card {
    padding: 2.25rem 2rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-top: 4px solid var(--brown-600);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 48px -16px rgba(8, 32, 19, .18), 0 2px 6px rgba(8, 32, 19, .05);
}

.auth-card__icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 46px; height: 46px; margin-bottom: 1.1rem;
    border-radius: 12px; background: var(--brown-50); color: var(--brown-600);
    border: 1px solid var(--brown-100); font-size: 1.1rem;
}
.auth-card h1 { font-size: 1.5rem; font-weight: 700; letter-spacing: -.015em; color: var(--ink-900); }
.auth-card__sub { margin-top: .35rem; color: var(--ink-500); font-size: .9rem; }
.auth-card__head { margin-bottom: 1.75rem; }

.form-stack > * + * { margin-top: 1.15rem; }
.form-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.label { display: block; margin-bottom: .4rem; font-size: .84rem; font-weight: 600; color: var(--ink-700); }
.label-row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: .4rem; }
.label-row .label { margin: 0; }
.link-sm { font-size: .82rem; font-weight: 600; color: var(--brown-600); }
.link-sm:hover { color: var(--brown-800); text-decoration: underline; }

.input-wrap { position: relative; }
.input-wrap > i {
    position: absolute; left: .9rem; top: 50%; transform: translateY(-50%);
    color: var(--ink-400); font-size: .88rem; pointer-events: none;
    transition: color .15s;
}
.input {
    display: block;
    width: 100%;
    height: 46px;
    padding: 0 .9rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink-900);
    font-size: .92rem;
    transition: border-color .15s, box-shadow .15s;
}
.input-wrap > i ~ .input, .input--icon { padding-left: 2.6rem; }
.input--toggle { padding-right: 2.9rem; }
.input::placeholder { color: var(--ink-400); }
.input:hover { border-color: var(--brown-300); }
.input:focus { outline: none; border-color: var(--brown-500); box-shadow: 0 0 0 4px rgba(22, 122, 69, .15); }
.input-wrap:focus-within > i { color: var(--brown-500); }
.input.is-invalid { border-color: var(--danger); }
.input.is-invalid:focus { box-shadow: 0 0 0 4px rgba(180, 35, 24, .12); }

.input-toggle {
    position: absolute; right: 0; top: 0; bottom: 0;
    display: flex; align-items: center; justify-content: center;
    width: 2.8rem;
    border: 0; background: transparent;
    color: var(--ink-400);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.input-toggle:hover { color: var(--brown-600); }

.field-error { display: flex; gap: .35rem; align-items: center; margin-top: .4rem; color: var(--danger); font-size: .8rem; }

.caps-warning { display: none; gap: .35rem; align-items: center; margin-top: .4rem; color: var(--warning); font-size: .8rem; }
.caps-warning.is-visible { display: flex; }

.check { display: inline-flex; align-items: center; gap: .55rem; cursor: pointer; user-select: none; font-size: .86rem; color: var(--ink-700); }
.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--brown-600); cursor: pointer; }

.btn-block {
    width: 100%;
    height: 48px;
    font-size: .95rem;
    border-radius: var(--radius-sm);
}
.btn-block:disabled { opacity: .8; cursor: wait; }
.spin { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.alert {
    display: flex; gap: .6rem; align-items: flex-start;
    margin-bottom: 1.25rem;
    padding: .8rem .95rem;
    border-radius: var(--radius-sm);
    font-size: .84rem;
}
.alert i { margin-top: .15rem; }
.alert--success { background: var(--success-bg); color: var(--success); border: 1px solid #c4e3d0; }
.alert--danger { background: var(--danger-bg); color: var(--danger); border: 1px solid #f6c9c4; }

.auth-card__foot {
    display: flex; align-items: center; justify-content: center; gap: .45rem;
    margin-top: 1.75rem; padding-top: 1.25rem;
    border-top: 1px solid var(--line);
    color: var(--ink-400); font-size: .78rem;
}
.auth-card__foot i { color: var(--success); }
.auth-back { display: flex; align-items: center; justify-content: center; gap: .45rem; margin-top: 1.5rem; font-size: .86rem; font-weight: 600; color: var(--ink-500); }
.auth-back:hover { color: var(--brown-700); }

.auth__help { margin-top: 1.5rem; text-align: center; color: var(--ink-500); font-size: .8rem; }
.auth__mobile-legal { display: none; margin-top: 1.5rem; text-align: center; color: var(--ink-400); font-size: .75rem; }

@media (max-width: 991.98px) {
    .auth { grid-template-columns: 1fr; }
    .auth__brand { display: none; }
    .auth__mobile-logo { display: flex; }
    .auth__mobile-legal { display: block; }
    .auth__main { padding: 2rem 1rem; }
}
@media (max-width: 479.98px) {
    .auth-card { padding: 1.75rem 1.25rem; }
}
@media (max-height: 760px) and (min-width: 992px) {
    .auth__features { display: none; }
}

/* ------------------------------------------------------------------ *
 | Shared page components (registers, forms)
 * ------------------------------------------------------------------ */

.actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.actions--center { justify-content: center; margin-top: 1.25rem; }
.muted { color: var(--ink-400); }
.nowrap { white-space: nowrap; }
.text-end { text-align: right; }
.breadcrumb a { color: inherit; }
.breadcrumb a:hover { color: var(--brown-800); text-decoration: underline; }

.page > .alert { margin-bottom: 1rem; }
.alert__close {
    margin-left: auto; padding: 0 .25rem; border: 0; background: transparent;
    color: inherit; opacity: .6;
}
.alert__close:hover { opacity: 1; }

.card + .card, .grid > div > .card + .card { margin-top: 1rem; }
.card__foot { padding: .75rem 1.1rem; border-top: 1px solid var(--line); }
.card--danger { border-color: #f3d2ce; }
.card--danger .card__head h2 i { color: var(--danger); }

.btn-sm { height: 34px; padding: 0 .8rem; font-size: .82rem; }
.btn-ghost { background: transparent; color: var(--ink-500); }
.btn-ghost:hover { background: var(--brown-50); color: var(--brown-800); }
.btn-danger { background: #fff; color: var(--danger); border-color: #f0b8b1; }
.btn-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }

/* Tabs */
.tabs {
    display: flex; gap: .25rem; margin-bottom: 1rem;
    overflow-x: auto; scrollbar-width: thin;
    border-bottom: 1px solid var(--line-strong);
}
.tabs__item {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .65rem .9rem;
    margin-bottom: -1px;
    border-bottom: 3px solid transparent;
    color: var(--ink-500); font-size: .88rem; font-weight: 600; white-space: nowrap;
}
.tabs__item i { color: var(--brown-400); font-size: .85rem; }
.tabs__item:hover { color: var(--brown-800); }
.tabs__item.is-active { color: var(--brown-700); border-bottom-color: var(--brown-600); }
.tabs__count {
    padding: .05rem .5rem; border-radius: 999px;
    background: var(--line); color: var(--ink-700); font-size: .72rem; font-weight: 700;
}
.tabs__item.is-active .tabs__count { background: var(--brown-600); color: #fff; }

/* Toolbar (search + filters) */
.toolbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
    padding: .85rem 1.1rem;
    border-bottom: 1px solid var(--line);
    background: var(--brown-50);
    border-radius: var(--radius) var(--radius) 0 0;
}
.toolbar__search { flex: 1 1 280px; }
.input--sm { height: 36px; font-size: .85rem; }
.input-wrap > i ~ .input--sm { padding-left: 2.3rem; }
.select {
    width: auto; min-width: 150px; padding-right: 2rem;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2378716c'%3E%3Cpath d='M5.3 7.3a1 1 0 0 1 1.4 0L10 10.6l3.3-3.3a1 1 0 1 1 1.4 1.4l-4 4a1 1 0 0 1-1.4 0l-4-4a1 1 0 0 1 0-1.4Z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right .6rem center; background-size: 16px;
}
.form-grid .select { width: 100%; }
.textarea { height: auto; padding: .65rem .9rem; resize: vertical; line-height: 1.5; }

/* Tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.table th {
    padding: .6rem 1.1rem;
    border-bottom: 1px solid var(--line);
    background: #fff;
    color: var(--ink-500); font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    text-align: left; white-space: nowrap;
}
.table td { padding: .7rem 1.1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:hover { background: var(--brown-50); }
.table tbody tr:last-child td { border-bottom: 0; }
.table a:not(.icon-btn):not(.person) { color: var(--ink-700); }
.table a:not(.icon-btn):not(.person):hover { color: var(--brown-700); text-decoration: underline; }
.table .wa i { color: #1f9d55; }

.person { display: flex; align-items: center; gap: .7rem; color: var(--ink-900); min-width: 200px; }
.person strong { display: block; font-weight: 600; }
.person small { display: block; color: var(--ink-500); font-size: .78rem; }
.person:hover strong { color: var(--brown-700); text-decoration: underline; }
.person__avatar {
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 36px; height: 36px; border-radius: 50%;
    font-size: .78rem; font-weight: 700;
    background: var(--brown-100); color: var(--brown-700);
}
.person__avatar--staff { background: var(--info-bg); color: var(--info); }
.person__avatar--external { background: #eef2ef; color: var(--ink-700); }
.person__avatar--lg { width: 64px; height: 64px; font-size: 1.3rem; }

.badge {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .2rem .6rem; border-radius: 999px;
    font-size: .74rem; font-weight: 600; white-space: nowrap;
    background: var(--brown-100); color: var(--brown-800);
}
.badge--staff { background: var(--info-bg); color: var(--info); }
.badge--external { background: #eef2ef; color: var(--ink-700); }

.status { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status--active { color: var(--success); }
.status--inactive { color: var(--ink-400); }

.icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: var(--radius-sm);
    color: var(--ink-500);
}
.icon-btn:hover { background: var(--brown-100); color: var(--brown-700); }

/* Pagination */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.pager__info { color: var(--ink-500); font-size: .82rem; }
.pager__links { display: flex; gap: .25rem; }
.pager__link {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 32px; height: 32px; padding: 0 .5rem;
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    background: #fff; color: var(--ink-700); font-size: .82rem; font-weight: 600;
}
a.pager__link:hover { border-color: var(--brown-300); color: var(--brown-700); }
.pager__link.is-current { background: var(--brown-600); border-color: var(--brown-600); color: #fff; }
.pager__link.is-disabled { color: var(--ink-400); background: transparent; }

/* Forms */
.form-narrow { max-width: 1280px; margin-inline: auto; }
.form-section { padding: 1.25rem 1.4rem; border-bottom: 1px solid var(--line); }
.form-section__title { font-size: .95rem; font-weight: 700; color: var(--ink-900); margin-bottom: .9rem; }
.form-section__lead { margin: -.6rem 0 .9rem; color: var(--ink-500); font-size: .82rem; }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.span-1 { grid-column: span 1; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.field .input { height: 42px; font-size: .9rem; }
.field .textarea { height: auto; }
.req { margin-left: .2rem; color: var(--danger); }
.hint { margin-top: .35rem; color: var(--ink-500); font-size: .78rem; }
.check--sm { margin-top: .45rem; font-size: .8rem; }
.input[readonly] { background: var(--brown-50); color: var(--ink-500); }

.choice-group { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice__body {
    display: flex; flex-direction: column; gap: .2rem; height: 100%;
    padding: .9rem 1rem;
    border: 1.5px solid var(--line-strong); border-radius: var(--radius);
    background: #fff;
    transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.choice__body i { margin-bottom: .3rem; font-size: 1.05rem; color: var(--brown-400); }
.choice__body strong { font-size: .9rem; color: var(--ink-900); }
.choice__body small { font-size: .78rem; color: var(--ink-500); }
.choice:hover .choice__body { border-color: var(--brown-300); }
.choice input:checked + .choice__body {
    border-color: var(--brown-600); background: var(--brown-50);
    box-shadow: 0 0 0 3px rgba(22, 122, 69, .14);
}
.choice input:checked + .choice__body i { color: var(--brown-600); }
.choice input:focus-visible + .choice__body { outline: 2px solid var(--gold-400); outline-offset: 2px; }

.form-actions {
    display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem;
    padding: 1rem 1.4rem;
    background: var(--brown-50);
    border-radius: 0 0 var(--radius) var(--radius);
}

/* Profile (show page) */
.profile { display: flex; align-items: center; gap: 1rem; padding: 1.25rem 1.4rem; border-bottom: 1px solid var(--line); }
.profile h2 { font-size: 1.2rem; font-weight: 700; }
.profile__tags { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: .4rem; }

.quick-actions {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .6rem;
    padding: 1rem 1.4rem; border-bottom: 1px solid var(--line);
}
.quick-actions:empty { display: none; }
.quick {
    display: flex; align-items: center; gap: .7rem;
    padding: .7rem .85rem;
    border: 1px solid var(--line); border-radius: var(--radius);
    color: var(--ink-900);
    transition: border-color .15s, box-shadow .15s;
}
.quick i {
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--brown-100); color: var(--brown-700);
}
.quick--wa i { background: #e3f6ea; color: #1f9d55; font-size: 1.05rem; }
.quick strong { display: block; font-size: .84rem; }
.quick small { display: block; color: var(--ink-500); font-size: .78rem; word-break: break-all; }
.quick:hover { border-color: var(--brown-300); box-shadow: var(--shadow); color: var(--ink-900); }

.details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; padding: .5rem 1.4rem 1rem; }
.details > div { padding: .7rem 0; border-bottom: 1px dashed var(--line); }
.details > div:nth-last-child(-n+2) { border-bottom: 0; }
.details dt { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-500); }
.details dd { margin: .2rem 0 0; font-size: .9rem; color: var(--ink-900); padding-right: 1rem; }
.details dd small { display: block; color: var(--ink-500); font-size: .78rem; }
.details--stacked { grid-template-columns: 1fr; padding-top: .25rem; }
.details--stacked > div:nth-last-child(2) { border-bottom: 1px dashed var(--line); }

.notes { padding: 1rem 1.4rem 1.25rem; border-top: 1px solid var(--line); }
.notes h3 { display: flex; align-items: center; gap: .45rem; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--brown-600); margin-bottom: .45rem; }
.notes p { font-size: .88rem; color: var(--ink-700); }

/* Import */
.span-4 { grid-column: 1 / -1; }
.block { display: block; }

.steps { display: grid; gap: .9rem; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; padding-left: 2.6rem; counter-increment: step; }
.steps li::before {
    content: counter(step);
    position: absolute; left: 0; top: -.1rem;
    display: flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--brown-600); color: #fff; font-size: .8rem; font-weight: 700;
}
.steps strong { font-size: .9rem; }
.steps span { color: var(--ink-500); font-size: .84rem; }
.steps .btn { margin-top: .4rem; }

.dropzone {
    position: relative;
    display: flex; flex-direction: column; align-items: center; gap: .35rem;
    padding: 2rem 1rem;
    border: 2px dashed var(--line-strong); border-radius: var(--radius);
    background: var(--brown-50);
    text-align: center; cursor: pointer;
    transition: border-color .15s, background-color .15s;
}
.dropzone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone__icon {
    display: flex; align-items: center; justify-content: center;
    width: 52px; height: 52px; margin-bottom: .25rem; border-radius: 14px;
    background: #fff; color: var(--brown-600); font-size: 1.35rem; box-shadow: var(--shadow-sm);
}
.dropzone strong { font-size: .92rem; color: var(--ink-900); }
.dropzone strong u { color: var(--brown-600); text-underline-offset: 2px; }
.dropzone small { color: var(--ink-500); font-size: .8rem; }
.dropzone:hover, .dropzone.is-dragover { border-color: var(--brown-500); background: var(--brown-100); }
.dropzone.has-file { border-style: solid; border-color: var(--success); background: var(--success-bg); }
.dropzone.has-file .dropzone__icon { color: var(--success); }
.dropzone.is-invalid { border-color: var(--danger); }
.dropzone:focus-within { outline: 2px solid var(--gold-400); outline-offset: 2px; }

.column-list { display: grid; gap: .45rem; margin: 0; padding: 0; list-style: none; font-size: .84rem; }
.column-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; }
.column-list code {
    padding: .1rem .45rem; border-radius: 5px;
    background: var(--brown-50); border: 1px solid var(--brown-100);
    color: var(--brown-800); font-size: .78rem; font-weight: 600;
}
.column-list span { color: var(--ink-500); font-size: .8rem; }

.import-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; margin: 1rem 0; font-size: .82rem; color: var(--ink-700); }

.confirm-bar {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
    margin-bottom: 1rem; padding: 1rem 1.2rem;
    border: 1px solid var(--brown-200); border-left: 4px solid var(--brown-600); border-radius: var(--radius);
    background: #fff; box-shadow: var(--shadow-sm);
}
.confirm-bar strong { display: block; font-size: .95rem; }
.confirm-bar span { color: var(--ink-500); font-size: .84rem; }

.result { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 600; }
.result--ready { color: var(--success); }
.result--duplicate { color: var(--warning); }
.result--error { color: var(--danger); }
.row-error { display: flex; gap: .35rem; align-items: baseline; margin-top: .25rem; color: var(--danger); font-size: .78rem; }
.table tbody tr.row--error { background: #fffafa; }

@media (max-width: 767.98px) {
    .form-grid { grid-template-columns: 1fr 1fr; }
    .span-3, .span-2 { grid-column: span 2; }
    .choice-group { grid-template-columns: 1fr; }
    .details { grid-template-columns: 1fr; }
    .details > div:nth-last-child(2) { border-bottom: 1px dashed var(--line); }
    .toolbar .select { flex: 1 1 140px; }
    .form-section, .profile, .quick-actions, .details, .notes, .form-actions { padding-left: 1rem; padding-right: 1rem; }
}

/* ------------------------------------------------------------------ *
 | Olimem Docs – document screens
 * ------------------------------------------------------------------ */

.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .92em; letter-spacing: -.01em; }
.small-text { font-size: .78rem; }
.tabs__count--alert { background: var(--gold-400); color: var(--brown-950); }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #256640; color: #fff; }

/* Segmented switch (Recent: added / opened) */
.segmented {
    display: inline-flex; gap: .2rem; margin-bottom: 1rem; padding: .2rem;
    border: 1px solid var(--line-strong); border-radius: 999px; background: #fff;
}
.segmented__item {
    display: inline-flex; align-items: center; gap: .45rem;
    padding: .4rem .9rem; border-radius: 999px;
    color: var(--ink-500); font-size: .84rem; font-weight: 600;
}
.segmented__item:hover { color: var(--brown-700); }
.segmented__item.is-active { background: var(--brown-600); color: #fff; }

/* Advanced search */
.search-hero .input { height: 50px; font-size: 1rem; padding-left: 2.8rem; }
.search-hero > i { left: 1rem; font-size: 1rem; }

/* Document cell */
.doc { display: flex; align-items: center; gap: .75rem; color: var(--ink-900); min-width: 260px; }
.doc strong { display: block; font-weight: 600; line-height: 1.3; }
.doc small { display: block; margin-top: .1rem; color: var(--ink-500); font-size: .76rem; }
.doc:hover strong { color: var(--brown-700); text-decoration: underline; }
.doc__icon {
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 38px; height: 38px; border-radius: 9px;
    background: #eef2ef; color: var(--ink-700); font-size: 1.05rem;
}
.doc__icon--pdf { background: #fdecea; color: #c0392b; }
.doc__icon--office { background: var(--info-bg); color: var(--info); }
.doc__icon--image { background: #f1e9fb; color: #7b4bb7; }
.doc__icon--video, .doc__icon--audio { background: #e7f4ec; color: var(--success); }
.doc__icon--archive { background: var(--brown-100); color: var(--brown-700); }

.folder-link { display: inline-flex; align-items: center; gap: .35rem; color: var(--ink-700); }
.folder-link i { color: var(--gold-500); }

.doc-status {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .15rem .55rem; border-radius: 999px;
    font-size: .74rem; font-weight: 700; white-space: nowrap;
}
.doc-status--active { background: var(--success-bg); color: var(--success); }
.doc-status--pending { background: var(--warning-bg); color: var(--warning); }
.doc-status--rejected { background: var(--danger-bg); color: var(--danger); }
.doc-status--archived { background: #eaefeb; color: var(--ink-500); }

.conf { display: inline-flex; align-items: center; gap: .3rem; margin-top: .25rem; font-size: .74rem; font-weight: 600; }
.conf--confidential { color: var(--warning); }
.conf--restricted { color: var(--danger); }

/* Approve / reject */
.review-actions { display: inline-flex; gap: .4rem; align-items: flex-start; }
.reject-pop { position: relative; display: inline-block; }
.reject-pop > summary { list-style: none; }
.reject-pop > summary::-webkit-details-marker { display: none; }
.reject-pop__panel {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 20;
    display: grid; gap: .5rem; width: 300px; padding: .85rem;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); text-align: left; white-space: normal;
}

/* Status banners on the document page */
.banner {
    display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1rem;
    margin-bottom: 1rem; padding: .9rem 1.1rem;
    border-radius: var(--radius); border: 1px solid; background: #fff;
}
.banner > i { font-size: 1.3rem; }
.banner__text { flex: 1 1 280px; display: grid; gap: .1rem; }
.banner__text strong { font-size: .95rem; color: var(--ink-900); }
.banner__text span { font-size: .85rem; color: var(--ink-700); }
.banner__actions { display: flex; gap: .5rem; align-items: flex-start; }
.banner--pending { background: var(--warning-bg); border-color: #f3dcb2; }
.banner--pending > i { color: var(--warning); }
.banner--rejected { background: var(--danger-bg); border-color: #f6c9c4; }
.banner--rejected > i { color: var(--danger); }
.banner--archived { background: #f1f4f2; border-color: var(--line-strong); }
.banner--archived > i { color: var(--ink-500); }

/* Preview */
.preview { background: #f2f5f3; border-radius: 0 0 var(--radius) var(--radius); }
.preview iframe { display: block; width: 100%; height: 72vh; min-height: 480px; border: 0; background: #fff; border-radius: 0 0 var(--radius) var(--radius); }
.preview img { display: block; max-width: 100%; max-height: 75vh; margin: 0 auto; padding: 1rem; object-fit: contain; }
.preview video { display: block; width: 100%; max-height: 72vh; background: #000; border-radius: 0 0 var(--radius) var(--radius); }
.preview audio { display: block; width: calc(100% - 2rem); margin: 2rem 1rem; }
.preview .empty { background: #fff; border-radius: 0 0 var(--radius) var(--radius); }
.card__head h2 { min-width: 0; overflow-wrap: anywhere; }

/* Versions */
.version-upload { border-top: 1px solid var(--line); }
.version-upload > summary {
    display: flex; align-items: center; gap: .5rem; padding: .85rem 1.1rem;
    cursor: pointer; color: var(--brown-700); font-size: .86rem; font-weight: 600; list-style: none;
}
.version-upload > summary::-webkit-details-marker { display: none; }
.version-upload > summary:hover { background: var(--brown-50); }
.version-upload form { padding: 0 1.1rem 1.1rem; }
.version-upload__row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.version-upload__row .input { flex: 1 1 260px; height: 38px; }
.dropzone--compact { padding: 1rem; }

/* Keywords */
.chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.chip {
    padding: .15rem .6rem; border-radius: 999px;
    background: var(--brown-50); border: 1px solid var(--brown-100);
    color: var(--brown-800); font-size: .78rem; font-weight: 600;
}
.chip:hover { background: var(--brown-100); color: var(--brown-900); }

/* History timeline */
.timeline { margin: 0; padding: .75rem 1.1rem 1rem; list-style: none; max-height: 520px; overflow-y: auto; }
.timeline__item { position: relative; display: flex; gap: .75rem; padding-bottom: .9rem; }
.timeline__item:not(:last-child)::before {
    content: ''; position: absolute; left: 14px; top: 30px; bottom: 0; width: 2px; background: var(--line);
}
.timeline__icon {
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--brown-50); color: var(--brown-600); font-size: .78rem;
    border: 1px solid var(--brown-100);
}
.timeline__item > div { display: grid; gap: .05rem; min-width: 0; font-size: .84rem; }
.timeline__item small { color: var(--ink-700); overflow-wrap: anywhere; }
.timeline__item--approved .timeline__icon { background: var(--success-bg); color: var(--success); border-color: #c4e3d0; }
.timeline__item--rejected .timeline__icon, .timeline__item--deleted .timeline__icon { background: var(--danger-bg); color: var(--danger); border-color: #f6c9c4; }
.timeline__item--viewed .timeline__icon, .timeline__item--downloaded .timeline__icon { background: #f2f5f3; color: var(--ink-500); border-color: var(--line); }

/* Folders */
.folders-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 1rem; align-items: start; }
.folder-tree nav { padding: .4rem; max-height: 60vh; overflow-y: auto; }
.folder-tree__item {
    display: flex; align-items: center; gap: .55rem;
    padding: .42rem .6rem .42rem calc(.6rem + var(--depth, 0) * 1rem);
    border-radius: var(--radius-sm);
    color: var(--ink-700); font-size: .85rem;
}
.folder-tree__item i { color: var(--gold-500); width: 1rem; text-align: center; }
.folder-tree__item span:first-of-type { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-tree__item:hover { background: var(--brown-50); color: var(--brown-800); }
.folder-tree__item.is-active { background: var(--brown-600); color: #fff; font-weight: 600; }
.folder-tree__item.is-active i { color: var(--gold-300); }
.folder-tree__count {
    padding: 0 .45rem; border-radius: 999px; background: var(--line); color: var(--ink-700);
    font-size: .7rem; font-weight: 700;
}
.folder-tree__item.is-active .folder-tree__count { background: rgba(255, 255, 255, .22); color: #fff; }

.folder-form { border-top: 1px solid var(--line); }
.folder-form > summary {
    display: flex; align-items: center; gap: .5rem; padding: .8rem 1rem;
    cursor: pointer; color: var(--brown-700); font-size: .85rem; font-weight: 600; list-style: none;
}
.folder-form > summary::-webkit-details-marker { display: none; }
.folder-form > summary:hover { background: var(--brown-50); }
.folder-form form { display: grid; gap: .6rem; padding: 0 1rem 1rem; }
.folder-form__grid { display: grid; grid-template-columns: 90px 1fr; gap: .4rem; }
.folder-form--settings { border-top: 0; }
.folder-form--settings form { display: block; }
.folder-form__delete { padding-top: 0 !important; }

.folder-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.folder-tile {
    display: flex; align-items: center; gap: .75rem;
    padding: .8rem .9rem; border: 1px solid var(--line); border-radius: var(--radius);
    background: #fff; color: var(--ink-900);
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.folder-tile > i { font-size: 1.6rem; color: var(--gold-500); }
.folder-tile strong { display: block; font-size: .88rem; }
.folder-tile small { display: block; color: var(--ink-500); font-size: .76rem; }
.folder-tile:hover { border-color: var(--brown-300); box-shadow: var(--shadow); transform: translateY(-1px); color: var(--ink-900); }

/* Bulk upload */
.bulk-list { margin-top: 1rem; border: 1px solid var(--line); border-radius: var(--radius); }
.bulk-list__head {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: .55rem .85rem; border-bottom: 1px solid var(--line); background: var(--brown-50);
    border-radius: var(--radius) var(--radius) 0 0; font-size: .86rem;
}
.bulk-list ul { margin: 0; padding: 0; list-style: none; max-height: 380px; overflow-y: auto; }
.bulk-item {
    display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: .65rem;
    padding: .5rem .85rem; border-bottom: 1px solid var(--line); font-size: .84rem;
}
.bulk-item:last-child { border-bottom: 0; }
.bulk-item__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bulk-item__name small { display: block; color: var(--ink-500); font-size: .75rem; white-space: normal; }
.bulk-item__state { font-size: .8rem; font-weight: 600; white-space: nowrap; color: var(--ink-500); }
.bulk-item > i { text-align: center; color: var(--ink-400); }
.bulk-item.is-uploading > i { color: var(--brown-600); }
.bulk-item.is-done > i, .bulk-item.is-done .bulk-item__state { color: var(--success); }
.bulk-item.is-failed > i, .bulk-item.is-failed .bulk-item__state, .bulk-item.is-failed small { color: var(--danger); }
.bulk-item__remove { border: 0; background: none; color: var(--ink-400); padding: .2rem .35rem; }
.bulk-item__remove:hover { color: var(--danger); }

@media (max-width: 991.98px) {
    .folders-layout { grid-template-columns: 1fr; }
    .folder-tree nav { max-height: 280px; }
}
@media (max-width: 575.98px) {
    .reject-pop__panel { width: min(300px, calc(100vw - 2.5rem)); }
    .preview iframe { height: 60vh; min-height: 360px; }
}

/* ------------------------------------------------------------------ *
 | Correspondence & leave workflows
 * ------------------------------------------------------------------ */

.corr-status, .leave-status {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .15rem .55rem; border-radius: 999px;
    font-size: .74rem; font-weight: 700; white-space: nowrap;
}
.corr-status--registered, .corr-status--final_pending,
.leave-status--pending_hod, .leave-status--pending_ceo { background: var(--warning-bg); color: var(--warning); }
.corr-status--acknowledged, .corr-status--channelled, .corr-status--in_progress { background: var(--info-bg); color: var(--info); }
.corr-status--responded { background: #f1e9fb; color: #6b3fa8; }
.corr-status--closed, .leave-status--cancelled { background: #eaefeb; color: var(--ink-500); }
.leave-status--approved { background: var(--success-bg); color: var(--success); }
.leave-status--rejected { background: var(--danger-bg); color: var(--danger); }

.prio { display: inline-flex; align-items: center; gap: .3rem; margin-top: .25rem; font-size: .74rem; font-weight: 700; }
.prio--high { color: var(--warning); }
.prio--urgent { color: var(--danger); }
.due { font-size: .8rem; font-weight: 600; color: var(--ink-700); }
.due--today { color: var(--warning); }
.due--overdue { color: var(--danger); font-weight: 700; }
.row--overdue td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.doc__icon--letter { background: var(--brown-50); color: var(--brown-600); }
.doc__icon--leave { background: var(--success-bg); color: var(--success); }
.tabs__count--danger { background: var(--danger); color: #fff; }
.inline-form { display: inline-block; margin-right: .25rem; }
.input--file { height: auto; padding: .45rem .6rem; }

/* Department chips */
.dept-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.dept-chip {
    display: inline-flex; align-items: center; gap: .45rem;
    padding: .35rem .8rem; border-radius: 999px; border: 1px solid var(--line-strong);
    background: #fff; color: var(--ink-700); font-size: .82rem; font-weight: 600;
}
.dept-chip span { padding: 0 .4rem; border-radius: 999px; background: var(--line); font-size: .72rem; }
.dept-chip:hover { border-color: var(--brown-300); color: var(--brown-800); }
.dept-chip.is-active { background: var(--brown-600); border-color: var(--brown-600); color: #fff; }
.dept-chip.is-active span { background: rgba(255, 255, 255, .22); }

/* Progress tracker */
.progress { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.progress__step {
    display: inline-flex; align-items: center; gap: .45rem;
    padding: .35rem .75rem .35rem .35rem; border-radius: 999px;
    background: #fff; border: 1px solid var(--line); color: var(--ink-400); font-size: .8rem; font-weight: 600;
}
.progress__step span {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 50%; background: var(--line); color: var(--ink-500); font-size: .7rem;
}
.progress__step.is-done { color: var(--success); border-color: #c4e3d0; background: var(--success-bg); }
.progress__step.is-done span { background: var(--success); color: #fff; }
.progress__step.is-current { color: var(--brown-800); border-color: var(--brown-600); background: var(--brown-50); box-shadow: 0 0 0 3px var(--brown-100); }
.progress__step.is-current span { background: var(--brown-600); color: #fff; }

/* Next-step panel */
.step-card { border-top: 4px solid var(--brown-600); }
.step-card--closed, .step-card--approved { border-top-color: var(--success); }
.step-card--rejected { border-top-color: var(--danger); }
.step-card__head { display: flex; gap: .85rem; padding: 1.1rem 1.25rem .4rem; }
.step-card__head h2 { font-size: 1.02rem; font-weight: 700; color: var(--ink-900); }
.step-card__head p { margin-top: .2rem; font-size: .86rem; color: var(--ink-700); }
.step-card__icon {
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 40px; height: 40px; border-radius: 10px; background: var(--brown-50); color: var(--brown-600); font-size: 1.05rem;
}
.step-form { padding: .75rem 1.25rem 1.1rem; }
.step-form__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; margin-top: .85rem; }
.step-form--inline { display: flex; flex-wrap: wrap; gap: .5rem; }
.step-form--inline .select { flex: 1 1 220px; }
.step-more { border-top: 1px solid var(--line); }
.step-more > summary {
    display: flex; align-items: center; gap: .5rem; padding: .8rem 1.25rem;
    cursor: pointer; color: var(--brown-700); font-size: .86rem; font-weight: 600; list-style: none;
}
.step-more > summary::-webkit-details-marker { display: none; }
.step-more > summary:hover { background: var(--brown-50); }
.step-more--quiet > summary { color: var(--ink-500); }

/* Instructions & responses */
.thread { display: grid; gap: .75rem; padding: 1rem 1.1rem; }
.thread__item { display: grid; gap: .1rem; padding: .75rem .9rem; border-radius: var(--radius-sm); background: #f7f9f8; border-left: 3px solid var(--line-strong); }
.thread__item p { margin: .35rem 0 0; font-size: .88rem; color: var(--ink-900); }
.thread__item .muted { font-size: .78rem; }
.thread__item--ceo { border-left-color: var(--brown-600); background: var(--brown-50); }
.thread__item--dept { border-left-color: var(--info); background: var(--info-bg); }
.thread__item--final { border-left-color: var(--success); background: var(--success-bg); }

/* Leave balances */
.balances { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; padding: 1rem 1.1rem; }
.balance { padding: .8rem .9rem; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.balance h3 { font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-500); }
.balance__remaining { margin-top: .2rem; font-size: 1.6rem; font-weight: 800; color: var(--success); line-height: 1.1; }
.balance__remaining small { font-size: .78rem; font-weight: 600; color: var(--ink-500); }
.balance__remaining.is-low { color: var(--warning); }
.balance__remaining.is-negative { color: var(--danger); }
.balance dl { display: grid; grid-template-columns: 1fr auto; gap: .15rem .75rem; margin: .5rem 0 0; font-size: .8rem; }
.balance dt { color: var(--ink-500); }
.balance dd { margin: 0; text-align: right; font-weight: 600; color: var(--ink-900); }
.balance__after { margin-top: .5rem; padding-top: .45rem; border-top: 1px dashed var(--line); font-size: .8rem; color: var(--ink-700); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.num--neg { color: var(--danger); font-weight: 700; }
.num--ok { color: var(--success); font-weight: 700; }
.balances--inline { padding: 1rem 0 0; }
.balances--stacked { grid-template-columns: 1fr; }
.balance--this { border-color: var(--brown-300); box-shadow: 0 0 0 3px var(--brown-50); }
.choice-row { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; min-height: 42px; align-items: center; }
.notice--warning { background: var(--warning-bg); border-color: #f3dcb2; color: var(--warning); }
.mini-list { margin: 0; padding: .4rem 1.1rem .8rem; list-style: none; }
.mini-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem .75rem; padding: .5rem 0; border-bottom: 1px dashed var(--line); font-size: .84rem; }
.mini-list li:last-child { border-bottom: 0; }
.mini-list li > span { color: var(--ink-500); }
.table--balances th.th-group { text-align: center; border-bottom: 1px solid var(--line); }
.table--balances td.num, .table--balances th.num { width: 1%; white-space: nowrap; }
.table--balances .reject-pop__panel { width: 260px; }

@media (max-width: 575.98px) {
    .balances { grid-template-columns: 1fr; }
}

/* Administration › Users, User Types & Departments */
.badge--admin { background: var(--brown-600); color: #fff; }
.choice-group--types { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.perm-group { margin: 0; padding: .85rem 1rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.perm-group legend { padding: 0 .35rem; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brown-600); }
.perm-group .check { display: flex; margin-top: .45rem; font-size: .86rem; }
.link-btn { border: 0; padding: 0; background: none; color: var(--brown-700); font: inherit; font-weight: 600; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }

/* ================================================================== *
 | Design system v2 – Murewa RDC green
 | Refines the components above and adds the dynamic layer (toasts,
 | load bar, quick jump, entrance motion), the live dashboard and the
 | Communication Centre. Later rules here intentionally win.
 * ================================================================== */

/* ---------- Base ---------- */

body.is-app { background: var(--canvas); }
h1, h2, h3, .stat__value, .auth__council, .auth-card h1 { font-family: var(--font-display); }
::selection { background: rgba(var(--brand-rgb), .18); }
:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.strong-link { font-weight: 700; }

* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; border: 2px solid transparent; background-clip: content-box; }

.skip-link {
    position: fixed; top: -40px; left: 1rem; z-index: 100;
    padding: .5rem .9rem; border-radius: var(--radius-sm);
    background: var(--brand-700); color: #fff; font-weight: 600;
    transition: top .15s var(--ease);
}
.skip-link:focus { top: .75rem; color: #fff; }

/* ---------- Crest ---------- */

.crest { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.crest img { display: block; width: 100%; height: 100%; object-fit: contain; }
.crest--badge {
    background: #fff;
    border-radius: 12px;
    padding: 3px 4px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 4px 12px rgba(0, 0, 0, .18);
}

/* ---------- Top navigation ---------- */

.bg-olimem {
    background:
        radial-gradient(900px 140px at 12% -60%, rgba(245, 201, 56, .16), transparent 70%),
        linear-gradient(180deg, var(--brand-800) 0%, var(--brand-900) 100%);
}
.topnav {
    box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 10px 30px -12px rgba(var(--shadow-rgb), .55);
    border-bottom: 1px solid rgba(0, 0, 0, .2);
}
.topnav__inner { gap: 1.1rem; padding: 0 1.25rem; }
.topnav__brand { gap: .7rem; }
.topnav__crest { width: 54px; height: 40px; }
.topnav__brand-text { display: grid; line-height: 1.15; font-family: var(--font-display); font-size: 1.02rem; font-weight: 800; letter-spacing: -.01em; }
.topnav__brand small { color: var(--gold-300); font-family: var(--font); font-size: .64rem; letter-spacing: .16em; }

.topnav__link {
    position: relative;
    height: 38px;
    margin: auto 0;
    padding: 0 .75rem;
    border-radius: 10px;
    color: rgba(255, 255, 255, .82);
    font-weight: 600;
    font-size: .855rem;
    transition: background-color .15s var(--ease), color .15s var(--ease);
}
.topnav__link:hover, .topnav__link:focus-visible { background: rgba(255, 255, 255, .09); color: #fff; }
.topnav__link.is-open { background: rgba(255, 255, 255, .14); color: #fff; }
.topnav__link.is-active { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: none; }
.topnav__link.is-active::after {
    content: ''; position: absolute; left: 50%; bottom: -12px; transform: translateX(-50%);
    width: 22px; height: 3px; border-radius: 3px 3px 0 0; background: var(--gold-400);
}

.dropdown {
    border-radius: 14px;
    border-color: rgba(var(--shadow-rgb), .08);
    box-shadow: var(--shadow-lg);
    padding: .45rem;
    animation: dropdown-in .16s var(--ease);
}
@keyframes dropdown-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.dropdown--wide { animation: dropdown-in-wide .16s var(--ease); }
@keyframes dropdown-in-wide { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translateX(-50%); } }
.dropdown__item { border-radius: 9px; padding: .5rem .65rem; font-weight: 500; transition: background-color .12s, color .12s; }
.dropdown__item:hover, .dropdown__item:focus-visible { background: var(--brand-50); color: var(--brand-800); }
.dropdown__item.is-active { background: var(--brand-600); }
.dropdown__header { color: var(--brand-600); }
.dropdown__role {
    display: inline-block; margin-top: .3rem; padding: .05rem .5rem; border-radius: 999px;
    background: var(--brand-50); color: var(--brand-700); font-size: .7rem; font-style: normal; font-weight: 700;
}
.nav-group__header { background: var(--surface-muted); color: var(--brand-800); border-radius: 9px; }
.nav-group__header:hover { background: var(--brand-50); }

.nav-btn { height: 38px; border-radius: 10px; border-color: rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .07); }
.nav-btn:hover, .nav-btn.is-open { background: rgba(255, 255, 255, .15); }
.nav-btn--icon { width: 38px; justify-content: center; padding: 0; }
.nav-btn__badge {
    top: -5px; right: -5px; min-width: 19px; height: 19px; line-height: 19px;
    background: var(--gold-400); color: var(--brand-950); box-shadow: 0 0 0 2px var(--brand-900);
    animation: badge-pop .4s var(--ease);
}
@keyframes badge-pop { 0% { transform: scale(.4); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
.avatar { background: linear-gradient(135deg, var(--gold-300), var(--gold-400)); color: var(--brand-950); }

.pending-item {
    display: flex; align-items: center; gap: .7rem;
    margin: 0 .35rem; padding: .6rem .65rem; border-radius: 10px;
    color: var(--ink-700); font-size: .86rem;
}
.pending-item:hover { background: var(--brand-50); color: var(--brand-800); }
.pending-item__icon {
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 32px; height: 32px; border-radius: 9px; background: var(--brand-50); color: var(--brand-600);
}
.pending-item--gold .pending-item__icon { background: #fdf6dc; color: #a87a00; }
.pending-item--red .pending-item__icon { background: var(--danger-bg); color: var(--danger); }
.pending-item__label { flex: 1; font-weight: 600; }
.pending-item__count {
    min-width: 26px; padding: .1rem .5rem; border-radius: 999px; text-align: center;
    background: var(--brand-600); color: #fff; font-size: .74rem; font-weight: 800;
}
#menu-notifications { padding-bottom: .45rem; }

/* Quick-jump trigger */
.jump-trigger {
    display: inline-flex; align-items: center; gap: .55rem;
    height: 38px; min-width: 240px; padding: 0 .55rem 0 .8rem;
    border: 1px solid rgba(255, 255, 255, .16); border-radius: 10px;
    background: rgba(0, 0, 0, .18); color: rgba(255, 255, 255, .72);
    font-size: .84rem; text-align: left;
    transition: background-color .15s, border-color .15s, color .15s;
}
.jump-trigger span { flex: 1; }
.jump-trigger:hover { background: rgba(0, 0, 0, .28); border-color: rgba(255, 255, 255, .28); color: #fff; }
.jump-trigger kbd, .jump kbd {
    padding: .1rem .4rem; border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .08);
    font: 600 .68rem/1.4 var(--font); color: inherit;
}
@media (max-width: 1535.98px) { .jump-trigger { min-width: 0; } .jump-trigger span, .jump-trigger kbd { display: none; } .jump-trigger { width: 38px; justify-content: center; padding: 0; } }
@media (max-width: 1199.98px) { .jump-trigger { width: auto; padding: 0 .8rem; } .jump-trigger span { display: inline; } }

/* Quick-jump palette */
.jump { position: fixed; inset: 0; z-index: 90; display: flex; justify-content: center; align-items: flex-start; padding: 10vh 1rem 1rem; }
.jump__backdrop { position: absolute; inset: 0; background: rgba(var(--shadow-rgb), .45); backdrop-filter: blur(3px); animation: fade-in .15s ease-out; }
.jump__panel {
    position: relative; width: min(640px, 100%); max-height: 72vh; display: flex; flex-direction: column;
    background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg), 0 0 0 1px rgba(var(--shadow-rgb), .06);
    overflow: hidden; animation: pop-in .18s var(--ease);
}
.jump__search { display: flex; align-items: center; gap: .75rem; padding: .95rem 1.1rem; border-bottom: 1px solid var(--line); }
.jump__search > i { color: var(--brand-600); font-size: 1rem; }
.jump__search input { flex: 1; border: 0; outline: none; font-size: 1rem; color: var(--ink-900); background: transparent; }
.jump__search kbd, .jump__foot kbd { border-color: var(--line-strong); background: var(--surface-muted); color: var(--ink-500); cursor: pointer; }
.jump__results { margin: 0; padding: .4rem; list-style: none; overflow-y: auto; }
.jump__group { padding: .55rem .7rem .25rem; color: var(--ink-400); font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.jump__item { display: flex; align-items: center; gap: .75rem; padding: .55rem .7rem; border-radius: 10px; color: var(--ink-700); cursor: pointer; }
.jump__item i { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; background: var(--surface-muted); color: var(--brand-600); flex-shrink: 0; }
.jump__item strong { display: block; color: var(--ink-900); font-size: .9rem; font-weight: 600; }
.jump__item small { display: block; color: var(--ink-500); font-size: .76rem; }
.jump__item mark { background: rgba(245, 201, 56, .45); color: inherit; border-radius: 3px; padding: 0 1px; }
.jump__item.is-active { background: var(--brand-50); }
.jump__item.is-active i { background: var(--brand-600); color: #fff; }
.jump__empty { padding: 1.5rem; text-align: center; color: var(--ink-500); }
.jump__foot { display: flex; gap: 1.1rem; padding: .6rem 1.1rem; border-top: 1px solid var(--line); background: var(--surface-muted); color: var(--ink-500); font-size: .74rem; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width: 575.98px) { .jump__foot { display: none; } }

/* Load bar (top of the window while the next page loads) */
.loadbar {
    position: fixed; top: 0; left: 0; z-index: 120; height: 3px; width: 0;
    background: linear-gradient(90deg, var(--gold-400), var(--brand-400), var(--gold-300));
    box-shadow: 0 0 12px rgba(245, 201, 56, .7);
    opacity: 0; transition: width .4s var(--ease), opacity .3s;
}
.loadbar.is-loading { opacity: 1; width: 78%; transition: width 6s cubic-bezier(.1, .7, .2, 1), opacity .2s; }
.loadbar.is-done { opacity: 0; width: 100%; transition: width .2s ease-out, opacity .4s .15s; }

/* ---------- Page header ---------- */

.page-header {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(700px 200px at 100% 0%, rgba(var(--brand-rgb), .09), transparent 70%),
        linear-gradient(180deg, #fff 0%, var(--surface-muted) 100%);
    border-bottom: 1px solid var(--line);
    box-shadow: none;
}
.page-header::after {
    content: ''; position: absolute; right: 1.5rem; top: 50%; width: 150px; height: 106px; transform: translateY(-50%);
    background: url('../images/branding/murewa-rdc-logo.png') center / contain no-repeat;
    opacity: .06; pointer-events: none;
}
.page-header__inner { position: relative; z-index: 1; padding: 1.4rem 1.5rem 1.3rem; }
.page-header h1 { font-size: 1.55rem; font-weight: 800; letter-spacing: -.025em; color: var(--ink-900); }
.page-header p { color: var(--ink-500); opacity: 1; font-size: .9rem; margin-top: .25rem; }
.breadcrumb { color: var(--brand-600); font-size: .72rem; letter-spacing: .08em; }
.breadcrumb i { opacity: .8; }

.page { padding: 1.5rem; max-width: 1680px; margin: 0 auto; }
.page__footer { max-width: 1680px; margin: 0 auto; padding: 1.5rem; align-items: center; border-top: 1px solid var(--line); color: var(--ink-400); }
.page__footer-brand { display: inline-flex; align-items: center; gap: .6rem; }
.page__footer-crest { width: 34px; height: 24px; opacity: .85; }

/* ---------- Motion: content settles in ---------- */

@keyframes rise-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.page > *, [data-reveal] > * { animation: rise-in .45s var(--ease) both; }
.page > :nth-child(2), [data-reveal] > :nth-child(2) { animation-delay: .04s; }
.page > :nth-child(3), [data-reveal] > :nth-child(3) { animation-delay: .08s; }
.page > :nth-child(4), [data-reveal] > :nth-child(4) { animation-delay: .12s; }
.page > :nth-child(5), [data-reveal] > :nth-child(5) { animation-delay: .16s; }
.page > :nth-child(n+6), [data-reveal] > :nth-child(n+6) { animation-delay: .2s; }
.page > .modal, .page > .jump { animation: none; }

/* ---------- Cards, buttons, inputs, tables, tabs ---------- */

.card {
    border-radius: 16px;
    border-color: var(--line);
    box-shadow: var(--shadow-sm);
}
.card__head { padding: 1rem 1.2rem; }
.card__head h2 { font-size: .98rem; font-weight: 700; letter-spacing: -.01em; }
.card__head h2 i { color: var(--brand-500); }
.card__sub { margin-top: .15rem; color: var(--ink-500); font-size: .8rem; }
.card__body { padding: 1.2rem; }
.card__foot { padding: .8rem 1.2rem; }

.btn {
    height: 40px; padding: 0 1.05rem; border-radius: 10px; font-weight: 650;
    transition: background-color .15s var(--ease), border-color .15s, color .15s, box-shadow .15s, transform .08s;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-primary {
    background: linear-gradient(180deg, var(--brand-500) 0%, var(--brand-600) 100%);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 2px 6px -1px rgba(var(--brand-rgb), .45);
    border-color: var(--brand-700);
}
.btn-primary:hover { background: linear-gradient(180deg, var(--brand-600) 0%, var(--brand-700) 100%); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.btn-light { border-color: var(--line-strong); color: var(--ink-700); box-shadow: var(--shadow-sm); }
.btn-light:hover { background: var(--surface-muted); border-color: var(--brand-300); color: var(--brand-800); }
.btn-sm { height: 34px; border-radius: 9px; }
.btn-block { height: 48px; border-radius: 12px; }

.input { border-radius: 10px; border-color: var(--line-strong); transition: border-color .15s, box-shadow .15s, background-color .15s; }
.input:hover { border-color: var(--brand-300); }
.input:focus { border-color: var(--brand-500); box-shadow: var(--ring); }
.input-wrap:focus-within > i { color: var(--brand-600); }
.check input { accent-color: var(--brand-600); }

.table th {
    position: sticky; top: 0; z-index: 1;
    background: var(--surface-muted); color: var(--ink-500);
    border-bottom: 1px solid var(--line);
}
.table td { border-bottom-color: var(--line); }
.table tbody tr { transition: background-color .12s; }
.table tbody tr:hover { background: rgba(var(--brand-rgb), .035); }
.table tbody tr.is-selected { background: var(--brand-50); }
.table tbody tr.is-muted td { opacity: .6; }
.table--compact td, .table--compact th { padding: .45rem .75rem; }

.tabs { gap: .35rem; border-bottom-color: var(--line); }
.tabs__item { border-radius: 10px 10px 0 0; transition: color .15s, background-color .15s, border-color .15s; }
.tabs__item:hover { background: rgba(var(--brand-rgb), .05); }
.tabs__item.is-active { color: var(--brand-700); border-bottom-color: var(--brand-600); }
.tabs__item i { color: var(--brand-500); }
.tabs__count--alert { background: var(--gold-400); color: var(--brand-950); }

.toolbar { background: var(--surface-muted); border-radius: 16px 16px 0 0; }
.empty__icon { border-radius: 18px; background: var(--brand-50); color: var(--brand-600); }
.empty__icon--success { background: var(--success-bg); color: var(--success); }
.empty--compact { padding: 1.75rem 1rem; }
.tile { border-radius: 14px; }
.tile i { background: var(--brand-50); color: var(--brand-600); }
.tile:hover { border-color: var(--brand-300); }
.section-title { color: var(--brand-700); }
.icon-btn { border-radius: 9px; }
.icon-btn:hover { background: var(--brand-50); color: var(--brand-700); }
.icon-btn--danger:hover { background: var(--danger-bg); color: var(--danger); }
.pager__link { border-radius: 9px; }
.pager__link.is-current { background: var(--brand-600); border-color: var(--brand-600); }
.segmented { border-radius: 12px; padding: .25rem; background: var(--surface-muted); }
.segmented__item { border-radius: 9px; cursor: pointer; }
.segmented__item.is-active { background: #fff; color: var(--brand-700); box-shadow: var(--shadow-sm); }
.choice__body { border-radius: 14px; }
.choice input:checked + .choice__body { border-color: var(--brand-600); background: var(--brand-50); box-shadow: var(--ring); }
.choice.is-disabled { cursor: not-allowed; }
.choice.is-disabled .choice__body { opacity: .6; background: var(--surface-muted); }
.form-actions { background: var(--surface-muted); border-radius: 0 0 16px 16px; }
.alert { border-radius: 12px; }

/* ---------- Toasts ---------- */

.toasts { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 110; display: grid; gap: .6rem; width: min(420px, calc(100vw - 2rem)); }
.toast {
    position: relative; overflow: hidden;
    display: flex; align-items: flex-start; gap: .7rem;
    padding: .9rem 1rem .95rem;
    border-radius: 14px; background: #fff; color: var(--ink-900);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(var(--shadow-rgb), .06);
    font-size: .88rem; font-weight: 500;
    animation: toast-in .35s var(--ease) both;
}
.toast > i { margin-top: .1rem; font-size: 1.05rem; }
.toast span { flex: 1; }
.toast--success > i { color: var(--success); }
.toast--danger > i { color: var(--danger); }
.toast__close { border: 0; background: none; padding: 0 .1rem; color: var(--ink-400); }
.toast__close:hover { color: var(--ink-900); }
.toast__timer { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--brand-400); transform-origin: left; animation: toast-timer 6s linear forwards; }
.toast:hover .toast__timer { animation-play-state: paused; }
.toast.is-leaving { animation: toast-out .3s ease-in forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(24px); } }
@keyframes toast-timer { to { transform: scaleX(0); } }

/* ---------- Dashboard ---------- */

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat {
    --tone: var(--brand-600); --tone-soft: var(--brand-50);
    position: relative; overflow: hidden;
    display: grid; grid-template-columns: auto 1fr; grid-template-areas: "icon label" "value value" "hint hint";
    align-items: center; column-gap: .65rem; row-gap: .3rem;
    padding: 1.05rem 1.15rem 1rem;
    background: #fff; border: 1px solid var(--line); border-radius: 16px;
    box-shadow: var(--shadow-sm); color: var(--ink-900);
    transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s;
}
.stat::before { content: ''; position: absolute; inset: 0 0 auto; height: 3px; background: var(--tone); opacity: .9; }
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: rgba(var(--brand-rgb), .25); color: var(--ink-900); }
.stat__icon { grid-area: icon; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; background: var(--tone-soft); color: var(--tone); }
.stat__label { grid-area: label; color: var(--ink-500); font-size: .8rem; font-weight: 600; }
.stat__value { grid-area: value; margin-top: .35rem; font-size: 2rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.stat__hint { grid-area: hint; color: var(--ink-500); font-size: .78rem; }
.stat__go { position: absolute; right: 1rem; bottom: 1rem; color: var(--ink-400); font-size: .8rem; opacity: 0; transform: translateX(-4px); transition: opacity .18s, transform .18s; }
.stat:hover .stat__go { opacity: 1; transform: none; color: var(--tone); }
.stat--info { --tone: var(--info); --tone-soft: var(--info-bg); }
.stat--gold { --tone: #c08a00; --tone-soft: #fdf6dc; }
.stat--red { --tone: var(--danger); --tone-soft: var(--danger-bg); }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 1rem; margin-bottom: 1.25rem; align-items: start; }
@media (max-width: 1199.98px) { .dash-grid { grid-template-columns: 1fr; } }

/* Column chart – single series, one hue, 4px rounded caps, ≤24px columns */
.colchart { position: relative; display: grid; grid-template-columns: auto 1fr; gap: .6rem; margin: 0; height: 220px; }
.colchart__axis { display: flex; flex-direction: column; justify-content: space-between; padding-bottom: 1.4rem; color: var(--ink-400); font-size: .72rem; font-variant-numeric: tabular-nums; text-align: right; }
.colchart__axis span { transform: translateY(-50%); }
.colchart__axis span:last-child { transform: translateY(50%); }
.colchart__plot { position: relative; }
.colchart__grid { position: absolute; inset: 0 0 1.4rem; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.colchart__grid span { height: 1px; background: var(--line); }
.colchart__grid span:last-child { background: var(--line-strong); }
.colchart__bars { position: absolute; inset: 0; display: flex; align-items: stretch; gap: 2px; margin: 0; padding: 0; list-style: none; }
.colchart__col { flex: 1; position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; padding-bottom: 1.4rem; border-radius: 6px; cursor: default; outline: none; }
.colchart__col:hover, .colchart__col:focus-visible { background: rgba(var(--brand-rgb), .06); }
.colchart__bar { width: min(24px, 70%); height: var(--h); min-height: 0; border-radius: 4px 4px 0 0; background: var(--brand-500); transition: height .7s var(--ease), background-color .15s; }
.colchart__col.is-today .colchart__bar { background: var(--brand-700); }
.colchart__col:hover .colchart__bar, .colchart__col:focus-visible .colchart__bar { background: var(--brand-400); }
.colchart.is-pending .colchart__bar { height: 0; }
.colchart__x { position: absolute; bottom: 0; color: var(--ink-400); font-size: .7rem; white-space: nowrap; }
.colchart__col.is-today .colchart__x { color: var(--ink-700); font-weight: 700; }
.colchart__tip {
    position: absolute; z-index: 5; pointer-events: none; transform: translate(-50%, calc(-100% - 10px));
    padding: .45rem .65rem; border-radius: 9px; background: var(--ink-900); color: #fff; white-space: nowrap;
    box-shadow: var(--shadow); font-size: .78rem;
}
.colchart__tip strong { display: block; font-size: .88rem; }
.colchart__tip span { color: rgba(255, 255, 255, .7); }
.chart-table { margin-top: .9rem; font-size: .82rem; }
.chart-table summary { cursor: pointer; color: var(--brand-700); font-weight: 600; }
.chart-table table { margin-top: .5rem; }

.count-pill { padding: .1rem .6rem; border-radius: 999px; background: var(--gold-400); color: var(--brand-950); font-size: .76rem; font-weight: 800; }
.work-list { margin: 0; padding: .4rem; list-style: none; }
.work-item { display: flex; align-items: center; gap: .75rem; padding: .7rem .75rem; border-radius: 12px; color: var(--ink-700); transition: background-color .15s; }
.work-item:hover { background: var(--brand-50); color: var(--brand-800); }
.work-item__icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: var(--brand-50); color: var(--brand-600); flex-shrink: 0; }
.work-item--gold .work-item__icon { background: #fdf6dc; color: #a87a00; }
.work-item--red .work-item__icon { background: var(--danger-bg); color: var(--danger); }
.work-item__label { flex: 1; font-weight: 600; font-size: .88rem; }
.work-item__count { font-family: var(--font-display); font-size: 1.15rem; font-weight: 800; color: var(--ink-900); }
.work-item__go { color: var(--ink-400); font-size: .7rem; }

.stage-list { margin: 0; padding: .5rem .6rem .7rem; list-style: none; }
.stage { display: grid; grid-template-columns: 32px minmax(0, 1fr) minmax(80px, 34%) 40px; align-items: center; gap: .75rem; padding: .5rem .6rem; border-radius: 10px; color: var(--ink-700); }
.stage:hover { background: var(--surface-muted); color: var(--ink-900); }
.stage__icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 9px; background: var(--brand-50); color: var(--brand-600); font-size: .8rem; }
.stage__label { font-size: .86rem; font-weight: 600; }
.stage__meter { height: 8px; border-radius: 999px; background: var(--brand-50); overflow: hidden; }
.stage__meter span { display: block; height: 100%; width: var(--w); border-radius: 999px; background: var(--brand-500); transition: width .8s var(--ease); }
.stage__count { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.stage.is-empty { color: var(--ink-400); }
.stage.is-empty .stage__icon { background: var(--surface-muted); color: var(--ink-400); }
.stage--closed .stage__meter span { background: var(--brand-300); }

.feed { margin: 0; padding: .5rem .9rem .9rem; list-style: none; }
.feed__item { position: relative; display: grid; grid-template-columns: 34px 1fr auto; gap: .75rem; padding: .6rem 0; }
.feed__item:not(:last-child)::before { content: ''; position: absolute; left: 16px; top: 44px; bottom: -6px; width: 2px; background: var(--line); }
.feed__icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand-50); color: var(--brand-600); font-size: .78rem; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.feed__item--correspondence .feed__icon { background: var(--info-bg); color: var(--info); }
.feed__body { min-width: 0; font-size: .85rem; }
.feed__body p { color: var(--ink-700); }
.feed__ref { display: block; margin-top: .1rem; color: var(--ink-500); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed__ref:hover { color: var(--brand-700); }
.feed__time { color: var(--ink-400); font-size: .74rem; white-space: nowrap; padding-top: .15rem; }

/* ---------- Sign-in ---------- */

body.is-auth { background: var(--canvas); }
.auth { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.auth__brand {
    padding: 2.5rem clamp(2rem, 4.5vw, 4.5rem);
    background:
        radial-gradient(900px 520px at 85% 0%, rgba(245, 201, 56, .18), transparent 60%),
        radial-gradient(800px 600px at 0% 100%, rgba(72, 178, 118, .28), transparent 60%),
        linear-gradient(155deg, var(--brand-700) 0%, var(--brand-900) 55%, var(--brand-950) 100%);
}
.auth__brand::before { background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px); background-size: 22px 22px; }
.auth__glow { position: absolute; width: 520px; height: 520px; right: -160px; top: 22%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .08), transparent 65%); pointer-events: none; }
.auth-org__product {
    display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .85rem;
    border-radius: 999px; border: 1px solid rgba(253, 230, 138, .35); background: rgba(0, 0, 0, .15);
    color: var(--gold-300); font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.auth__hero { max-width: 34rem; }
.auth-crest {
    display: inline-flex; padding: 1rem 1.25rem; border-radius: 22px; background: #fff;
    box-shadow: 0 24px 50px -18px rgba(0, 0, 0, .55), 0 0 0 6px rgba(255, 255, 255, .08);
    animation: crest-in .7s var(--ease) both;
}
.auth-crest__img { width: 190px; height: 135px; }
@keyframes crest-in { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }
.auth__council { margin-top: 1.6rem; font-size: clamp(1.7rem, 2.6vw, 2.35rem); font-weight: 800; line-height: 1.12; letter-spacing: -.03em; color: #fff; }
.auth__motto { display: flex; flex-wrap: wrap; gap: .45rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.auth__motto li { padding: .25rem .7rem; border-radius: 999px; background: rgba(245, 201, 56, .16); color: var(--gold-300); font-size: .76rem; font-weight: 700; letter-spacing: .04em; }
.auth__lead { margin-top: 1.1rem; color: rgba(255, 255, 255, .74); }
.auth__features { display: grid; grid-template-columns: 1fr; gap: .55rem; margin-top: 1.6rem; }
.auth__features li { align-items: center; padding: .6rem .8rem; border-radius: 12px; background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .09); color: rgba(255, 255, 255, .85); font-size: .86rem; }
.auth__features i { background: rgba(245, 201, 56, .16); color: var(--gold-300); }
.auth__legal { color: rgba(255, 255, 255, .5); }
.auth__main { background: radial-gradient(700px 400px at 50% 0%, rgba(var(--brand-rgb), .07), transparent 70%); }
.auth-card { border-top: 0; border-radius: 22px; padding: 2.4rem 2.2rem; box-shadow: var(--shadow-lg), 0 0 0 1px rgba(var(--shadow-rgb), .05); animation: rise-in .5s var(--ease) both; }
.auth-card__eyebrow { display: inline-block; margin-bottom: .6rem; padding: .2rem .65rem; border-radius: 999px; background: var(--brand-50); color: var(--brand-700); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.auth-card h1 { font-size: 1.7rem; font-weight: 800; letter-spacing: -.03em; }
.auth__mobile-brand { display: none; flex-direction: column; align-items: center; gap: .35rem; margin-bottom: 1.5rem; text-align: center; }
.auth__mobile-crest { width: 120px; height: 85px; }
.auth__mobile-brand strong { font-family: var(--font-display); font-size: 1.05rem; color: var(--brand-800); }
.auth__mobile-brand span { color: var(--ink-500); font-size: .8rem; }
.auth__help { display: flex; justify-content: center; align-items: center; gap: .4rem; }
@media (max-width: 991.98px) { .auth__mobile-brand { display: flex; } }
@media (max-height: 760px) and (min-width: 992px) { .auth__features { display: none; } .auth-crest__img { width: 150px; height: 106px; } }

/* ---------- Communication Centre ---------- */

.compose { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1rem; align-items: start; }
.compose__main { display: grid; gap: 1rem; }
.compose__main > .card + .card { margin-top: 0; }
.compose__side { position: sticky; top: calc(var(--nav-h) + 1rem); }
@media (max-width: 1099.98px) { .compose { grid-template-columns: 1fr; } .compose__side { position: static; } }
.step-no { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--brand-600); color: #fff; font-size: .74rem; font-weight: 800; }
.pill { display: inline-block; justify-self: start; margin-top: .35rem; padding: .1rem .55rem; border-radius: 999px; font-size: .7rem; font-weight: 800; }
.pill--ready { background: var(--success-bg); color: var(--success); }
.pill--off { background: #eef2ef; color: var(--ink-500); }
.audience-panel { margin-top: 1rem; }
.picker { position: relative; }
.picker__results { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: .35rem; list-style: none; max-height: 320px; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); }
.picker__results button { display: block; width: 100%; padding: .5rem .65rem; border: 0; border-radius: 9px; background: none; text-align: left; }
.picker__results button:hover, .picker__results button:focus-visible { background: var(--brand-50); outline: none; }
.picker__results strong { display: block; font-size: .88rem; color: var(--ink-900); }
.picker__results small { display: block; color: var(--ink-500); font-size: .76rem; }
.picker__none { padding: .75rem; color: var(--ink-500); font-size: .84rem; }
.chips--picked { margin-top: .75rem; }
.chip--removable { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .35rem .25rem .7rem; }
.chip--removable button { border: 0; background: none; padding: 0 .25rem; color: var(--brand-700); border-radius: 50%; }
.chip--removable button:hover { color: var(--danger); }
.chip { background: var(--brand-50); border-color: var(--brand-100); color: var(--brand-800); }
.tokens { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-top: .55rem; font-size: .78rem; }
.token { padding: .15rem .5rem; border: 1px dashed var(--brand-300); border-radius: 7px; background: var(--brand-50); color: var(--brand-800); font: 600 .74rem/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; }
.token:hover { background: var(--brand-100); border-style: solid; }
.counter { color: var(--ink-500); font-size: .76rem; font-variant-numeric: tabular-nums; }
.counter--warn { color: var(--warning); font-weight: 700; }
.summary-card .card__body { display: grid; gap: .9rem; }
.summary-stats { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: 0; }
.summary-stats div { padding: .7rem .8rem; border-radius: 12px; background: var(--surface-muted); }
.summary-stats dt { color: var(--ink-500); font-size: .74rem; font-weight: 600; }
.summary-stats dd { margin: .1rem 0 0; font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; }
.summary-warnings, .summary-sample { margin: 0; padding: 0; list-style: none; display: grid; gap: .4rem; }
.summary-warnings:empty, .summary-sample:empty { display: none; }
.summary-warnings__item { display: flex; gap: .5rem; padding: .55rem .65rem; border-radius: 10px; font-size: .8rem; }
.summary-warnings__item--warn { background: var(--warning-bg); color: #7a4a09; }
.summary-warnings__item--error { background: var(--danger-bg); color: var(--danger); }
.summary-sample li { display: flex; justify-content: space-between; gap: .75rem; font-size: .82rem; }
.summary-sample strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.summary-sample small { color: var(--ink-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phone-preview { margin: 0 1.2rem 1rem; padding: 1rem; border-radius: 18px; background: linear-gradient(180deg, #e9efe9, #dde6df); }
.phone-preview__to { display: block; margin-bottom: .45rem; color: var(--ink-500); font-size: .72rem; font-weight: 700; }
.phone-preview__bubble { position: relative; padding: .7rem .85rem; border-radius: 16px 16px 16px 4px; background: #fff; box-shadow: var(--shadow-sm); white-space: pre-wrap; font-size: .85rem; line-height: 1.45; overflow-wrap: anywhere; }
.summary-card__foot { padding: 0 1.2rem 1.2rem; }
.summary-card__foot .hint { text-align: center; margin-top: .5rem; }

.batch-detail { margin-bottom: 1rem; border-color: rgba(var(--brand-rgb), .3); box-shadow: var(--shadow); }
.batch-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; color: var(--ink-500); font-size: .84rem; }
.batch-meta i { color: var(--brand-500); margin-right: .25rem; }
.batch-status { display: inline-flex; padding: .15rem .55rem; border-radius: 999px; font-size: .74rem; font-weight: 800; background: #eef2ef; color: var(--ink-500); }
.batch-status--queued, .batch-status--sending { background: var(--info-bg); color: var(--info); }
.batch-status--completed { background: var(--success-bg); color: var(--success); }
.batch-status--failed { background: var(--danger-bg); color: var(--danger); }
.sendbar { height: 8px; margin-top: .75rem; border-radius: 999px; background: var(--brand-50); overflow: hidden; }
.sendbar--thin { height: 4px; margin-top: .35rem; max-width: 120px; }
.sendbar__fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand-500), var(--brand-400)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; transition: width .5s var(--ease); }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: 0 0; } }
.message-body { margin-top: .9rem; padding: .85rem 1rem; border-radius: 12px; background: var(--surface-muted); border: 1px solid var(--line); white-space: pre-wrap; font-size: .86rem; line-height: 1.55; }
.message-body--modal { margin: 0 1.2rem 1rem; }
.count-chips { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .9rem; }
.count-chip { display: inline-flex; gap: .35rem; padding: .3rem .7rem; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; color: var(--ink-700); font-size: .8rem; }
.count-chip strong { color: var(--ink-900); }
.count-chip.is-active { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.count-chip.is-active strong { color: #fff; }
.count-chip--failed:not(.is-active) strong { color: var(--danger); }
.channel-tag { display: inline-flex; padding: .1rem .5rem; margin-right: .2rem; border-radius: 6px; font-size: .72rem; font-weight: 800; background: var(--brand-50); color: var(--brand-700); }
.channel-tag--whatsapp { background: #e3f6ea; color: #128c4b; }
.channel-tag--email { background: var(--info-bg); color: var(--info); }
.channel-tag--any { background: #eef2ef; color: var(--ink-500); }
.truncate { display: block; max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.truncate--wide { max-width: 520px; margin-top: .15rem; font-size: .8rem; }
.msg-status { display: inline-flex; padding: .12rem .55rem; border-radius: 999px; font-size: .73rem; font-weight: 800; white-space: nowrap; background: #eef2ef; color: var(--ink-500); }
.msg-status--sent, .msg-status--delivered { background: var(--success-bg); color: var(--success); }
.msg-status--failed { background: var(--danger-bg); color: var(--danger); }
.msg-status--skipped, .msg-status--awaiting_approval { background: var(--warning-bg); color: var(--warning); }
.msg-status--pending { background: var(--info-bg); color: var(--info); }
.msg-error { color: var(--danger); max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: .2rem; }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.stat-tile { display: grid; gap: .15rem; padding: .75rem .9rem; border-radius: 14px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); color: var(--ink-500); font-size: .78rem; font-weight: 600; transition: border-color .15s, transform .15s; }
.stat-tile strong { font-family: var(--font-display); font-size: 1.4rem; font-weight: 800; color: var(--ink-900); }
.stat-tile:hover { border-color: var(--brand-300); transform: translateY(-1px); color: var(--ink-700); }
.stat-tile.is-active { background: var(--brand-600); border-color: var(--brand-600); color: rgba(255, 255, 255, .8); }
.stat-tile.is-active strong { color: #fff; }
.stat-tile--failed:not(.is-active) strong { color: var(--danger); }
.report-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding: .7rem 1.2rem; border-bottom: 1px solid var(--line); font-size: .82rem; }
.inline-form { display: inline-block; }
.status-list { margin: 0; padding: .3rem .6rem .6rem; list-style: none; }
.status-list li { display: flex; align-items: center; justify-content: space-between; padding: .65rem .6rem; border-bottom: 1px dashed var(--line); font-weight: 600; }
.status-list li:last-child { border-bottom: 0; }
.status-list i { width: 1.2rem; color: var(--brand-600); }
.status-list .pill { margin: 0; }
.templates-layout { display: grid; grid-template-columns: 1fr; gap: 1rem; align-items: start; }
.templates-layout.has-form { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.templates-layout > .card + .card { margin-top: 0; }
@media (max-width: 1099.98px) { .templates-layout.has-form { grid-template-columns: 1fr; } }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 95; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(var(--shadow-rgb), .45); backdrop-filter: blur(3px); animation: fade-in .15s ease-out; }
.modal__panel { position: relative; width: min(640px, 100%); max-height: 88vh; overflow-y: auto; background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); animation: pop-in .2s var(--ease); outline: none; }
.modal__panel .form-actions { position: sticky; bottom: 0; }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- v2 layout fixes ---------- */

/* Cards placed side by side in a grid don't take the stacked-card top margin. */
.dash-grid > * + *, .stat-grid > *, .compose__side .card { margin-top: 0; }

.stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1199.98px) { .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .stat-grid { grid-template-columns: 1fr; } }

.page-header::after { content: none; }

/* Top bar: nine menus must fit from 1400px (below that the menu collapses
   behind the toggle – see the 1399.98px block near the top of this file). */
@media (min-width: 1400px) and (max-width: 1799.98px) {
    .topnav__inner { gap: .75rem; }
    .topnav__menu { gap: 0; }
    .topnav__link { padding: 0 .5rem; font-size: .82rem; }
    .topnav__link > i:not(.caret) { display: none; }
    .topnav__link .caret { margin-left: .05rem; }
    .jump-trigger { width: 38px; min-width: 0; justify-content: center; padding: 0; }
    .jump-trigger span, .jump-trigger kbd { display: none; }
    .nav-btn__name { display: none; }
}

/* Collapsed (mobile) menu: full-width search row, dropdowns in the flow. */
@media (max-width: 1399.98px) {
    .jump-trigger { width: 100%; min-width: 0; padding: 0 .8rem; }
    .jump-trigger span { display: inline; }
    .topnav__right { flex-wrap: wrap; }
    .topnav__link.is-active::after { content: none; }
}

/* Sign-in: single column on tablets and phones. */
@media (max-width: 991.98px) {
    .auth { grid-template-columns: 1fr; }
    .auth-card { padding: 1.9rem 1.4rem; }
}

/* ---------- Dashboard cards: solid colours + rotation ---------- */

.stat-grid { perspective: 1200px; }
.stat {
    --solid: #9a3412;
    background: var(--solid); border-color: transparent; color: #fff;
    box-shadow: 0 6px 18px -8px var(--solid);
}
.stat-grid > .stat { animation: stat-flip-in .7s var(--ease) backwards; transform-origin: center left; }
.stat-grid > .stat:nth-child(8n+1) { --solid: #9a3412; animation-delay: .05s; }
.stat-grid > .stat:nth-child(8n+2) { --solid: #1d4ed8; animation-delay: .12s; }
.stat-grid > .stat:nth-child(8n+3) { --solid: #b45309; animation-delay: .19s; }
.stat-grid > .stat:nth-child(8n+4) { --solid: #6d28d9; animation-delay: .26s; }
.stat-grid > .stat:nth-child(8n+5) { --solid: #0f766e; animation-delay: .33s; }
.stat-grid > .stat:nth-child(8n+6) { --solid: #be123c; animation-delay: .40s; }
.stat-grid > .stat:nth-child(8n+7) { --solid: #15803d; animation-delay: .47s; }
.stat-grid > .stat:nth-child(8n+8) { --solid: #334155; animation-delay: .54s; }
.stat-grid > .stat.stat--red { --solid: #b91c1c; }

.stat::before { display: none; }
/* Slowly turning ring in the corner */
.stat::after {
    content: ''; position: absolute; top: -42px; right: -42px; width: 130px; height: 130px;
    border-radius: 50%; border: 14px dashed rgba(255, 255, 255, .16);
    animation: stat-spin 22s linear infinite; pointer-events: none;
}
.stat:nth-child(even)::after { animation-direction: reverse; }
.stat > * { position: relative; z-index: 1; }

.stat:hover { color: #fff; border-color: transparent; transform: translateY(-3px) rotate(-1deg); box-shadow: 0 14px 28px -10px var(--solid); }
.stat__icon { background: rgba(255, 255, 255, .2); color: #fff; transition: transform .6s var(--ease); }
.stat:hover .stat__icon { transform: rotate(360deg); }
.stat__label, .stat__hint { color: rgba(255, 255, 255, .88); }
.stat__value { color: #fff; }
.stat__go, .stat:hover .stat__go { color: #fff; }
.stat:focus-visible { outline: 3px solid var(--gold-400); outline-offset: 3px; }

@keyframes stat-flip-in {
    from { opacity: 0; transform: rotateY(-80deg) scale(.92); }
    to { opacity: 1; transform: none; }
}
@keyframes stat-spin { to { transform: rotate(360deg); } }

/* ---------- App background (every page in layouts/app) ---------- */

.app-bg {
    position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
    background:
        radial-gradient(rgba(154, 52, 18, .09) 1px, transparent 1.4px) 0 0 / 22px 22px,
        linear-gradient(160deg, #fbf6ef 0%, #f4efe7 45%, #eef3f1 100%);
}
/* Soft colour blobs that drift slowly */
.app-bg span {
    position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%;
    filter: blur(70px); opacity: .32;
    animation: app-bg-drift 28s ease-in-out infinite alternate;
}
.app-bg span:nth-child(1) { top: -18vmax; left: -12vmax; background: #f5c938; }
.app-bg span:nth-child(2) { top: 10vmax; right: -16vmax; background: #c8661f; opacity: .22; animation-duration: 34s; animation-delay: -8s; }
.app-bg span:nth-child(3) { bottom: -22vmax; left: 25vw; background: #0f766e; opacity: .18; animation-duration: 40s; animation-delay: -15s; }

@keyframes app-bg-drift {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); }
    50% { transform: translate(6vmax, 4vmax) rotate(120deg) scale(1.08); }
    100% { transform: translate(-4vmax, 7vmax) rotate(240deg) scale(.95); }
}

/* Let the background show through the page header and footer */
body.is-app .page-header { background: rgba(255, 255, 255, .55); backdrop-filter: blur(8px); }
body.is-app .page__footer { border-top-color: rgba(0, 0, 0, .06); }

/* Employee Register – employment status badges and the quick status select */
.emp-badge { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 600; background: #eef2ef; color: var(--ink-700); }
.emp-status { min-width: 9.5rem; font-weight: 600; }
.emp-status--active { color: var(--success); }
.emp-badge.emp-status--active { background: var(--success-bg); }
.emp-status--on_leave, .emp-status--suspended { color: var(--warning); }
.emp-badge.emp-status--on_leave, .emp-badge.emp-status--suspended { background: var(--warning-bg); }
.emp-status--resigned, .emp-status--retired, .emp-status--contract_ended, .emp-status--deceased { color: var(--ink-500); }
.emp-status--terminated { color: var(--danger); }
.emp-badge.emp-status--terminated { background: var(--danger-bg); }

/* ---------- Attendance & tasks ---------- */

.att-totals { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.att-totals--compact { margin: 1rem 0 0; }
.att-pill {
    --c: var(--ink-500); --bg: #f1f4f2;
    display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .7rem; border-radius: 999px;
    background: var(--bg); color: var(--c); font-size: .8rem; font-weight: 600; white-space: nowrap;
}
.att-pill strong { font-weight: 800; }
.att-pill--green, .att-day--green { --c: var(--success); --bg: var(--success-bg); }
.att-pill--gold, .att-day--gold { --c: var(--warning); --bg: var(--warning-bg); }
.att-pill--red, .att-day--red { --c: var(--danger); --bg: var(--danger-bg); }
.att-pill--blue, .att-day--blue { --c: var(--info); --bg: var(--info-bg); }
.att-pill--purple, .att-day--purple { --c: #6d28d9; --bg: #f1ebfd; }
.att-pill--grey, .att-day--grey { --c: var(--ink-700); --bg: #eceeed; }
.att-pill--none { --c: var(--ink-400); --bg: transparent; border: 1px dashed var(--line-strong); }
.att-num { display: inline-block; min-width: 1.8rem; padding: .1rem .45rem; border-radius: 8px; text-align: center; font-weight: 700; }
.att-num--green { background: var(--success-bg); color: var(--success); }
.att-num--gold { background: var(--warning-bg); color: var(--warning); }
.att-num--red { background: var(--danger-bg); color: var(--danger); }
.att-num--blue { background: var(--info-bg); color: var(--info); }
.att-num--purple { background: #f1ebfd; color: #6d28d9; }
.att-num--grey { background: #eceeed; color: var(--ink-700); }

.att-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .75rem 1.25rem; border-bottom: 1px solid var(--line); font-size: .82rem; }
.att-table td { vertical-align: middle; }
.att-table .att-status { min-width: 150px; }
.att-table .att-time { width: 120px; }
.att-table tr.is-unmarked .att-status { border-style: dashed; }

/* 14-day strip on the employee dashboard */
.att-strip { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: .3rem; margin: 0; padding: 0; list-style: none; }
.att-day {
    --c: var(--ink-400); --bg: #fff;
    display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .4rem 0;
    border-radius: 10px; background: var(--bg); color: var(--c); border: 1px solid var(--line); font-size: .7rem;
}
.att-day strong { font-size: .9rem; }
.att-day--none { border-style: dashed; }
.att-day--weekend { --bg: #f4f6f5; --c: var(--ink-400); border-color: transparent; }
@media (max-width: 575.98px) { .att-strip { grid-template-columns: repeat(7, minmax(0, 1fr)); } }

.task-status { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 600; white-space: nowrap; color: var(--ink-500); }
.task-status--in_progress { color: var(--info); }
.task-status--done { color: var(--success); }
.task-status--cancelled { color: var(--ink-400); text-decoration: line-through; }
.task-priority { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .74rem; font-weight: 700; background: #eceeed; color: var(--ink-700); }
.task-priority--low { background: transparent; color: var(--ink-400); }
.task-priority--high { background: var(--warning-bg); color: var(--warning); }
.task-priority--urgent { background: var(--danger-bg); color: var(--danger); }
.task-due--overdue { color: var(--danger); font-weight: 700; }

.my-tasks { margin: 0; padding: .4rem .7rem .8rem; list-style: none; }
.my-task { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .7rem; padding: .6rem .5rem; border-radius: 10px; color: var(--ink-900); }
.my-task:hover { background: var(--surface-muted); color: var(--ink-900); }
.my-task__body strong { display: block; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.my-task__body small { color: var(--ink-500); font-size: .76rem; }
.my-task__due { font-size: .78rem; color: var(--ink-500); white-space: nowrap; }

/* ---------- Staff notifications & My Leave ---------- */

.choice-group--audience { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.people-picker__bar { display: flex; align-items: center; gap: .75rem; margin-bottom: .6rem; }
.people-picker { margin: 0; padding: .35rem .6rem; list-style: none; max-height: 340px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.people-picker li { padding: .3rem 0; border-bottom: 1px dashed var(--line); }
.people-picker li:last-child { border-bottom: 0; }
.people-picker .check { display: flex; font-size: .86rem; }
.audience-summary { position: sticky; top: 1rem; }
.audience-summary__count { font-size: .95rem; }
.audience-summary__count strong { font-family: var(--font-display); font-size: 2.2rem; font-weight: 800; color: var(--brand-700); }
.audience-summary__sample { margin-top: .6rem; font-size: .82rem; color: var(--ink-700); }

.notice-priority { display: inline-flex; align-items: center; gap: .3rem; font-weight: 700; color: var(--ink-500); }
.notice-priority--important { color: var(--warning); }
.notice-priority--urgent { color: var(--danger); }

.inbox { margin: 0; padding: .4rem; list-style: none; }
.inbox__item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .85rem; padding: .8rem .9rem; border-radius: 12px; color: var(--ink-900); border-left: 3px solid transparent; }
.inbox__item:hover { background: var(--surface-muted); color: var(--ink-900); }
.inbox__icon { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 11px; background: var(--brand-50); color: var(--brand-600); }
.inbox__item--important .inbox__icon { background: var(--warning-bg); color: var(--warning); }
.inbox__item--urgent .inbox__icon { background: var(--danger-bg); color: var(--danger); }
.inbox__body strong { display: block; font-size: .9rem; font-weight: 600; }
.inbox__body small { display: block; color: var(--ink-500); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox__meta { text-align: right; font-size: .76rem; color: var(--ink-500); white-space: nowrap; }
.inbox__meta small { display: block; }
.inbox__item.is-unread { background: rgba(var(--brand-rgb), .05); border-left-color: var(--brand-500); }
.inbox__item.is-unread .inbox__body strong { font-weight: 800; }

.leave-balances { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.leave-balance { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.15rem; margin: 0; }
.leave-balance__icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: var(--brand-50); color: var(--brand-600); font-size: 1.1rem; }
.leave-balance__label { display: block; font-size: .78rem; font-weight: 600; color: var(--ink-500); }
.leave-balance__value { display: block; font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; }
.leave-balance small { display: block; font-size: .76rem; }
.leave-days { display: flex; flex-direction: column; justify-content: flex-end; }
.leave-days strong { font-size: 1.4rem; font-weight: 800; color: var(--brand-700); }

.leave-steps { margin: 0; padding: .75rem 1.25rem 1rem; list-style: none; }
.leave-steps li { display: flex; align-items: center; gap: .75rem; padding: .55rem 0; color: var(--ink-500); }
.leave-steps li + li { border-top: 1px dashed var(--line); }
.leave-steps__dot { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: #eef1ef; font-size: .78rem; }
.leave-steps li.is-done { color: var(--ink-900); }
.leave-steps li.is-done .leave-steps__dot { background: var(--success-bg); color: var(--success); }
.leave-steps li.is-rejected .leave-steps__dot { background: var(--danger-bg); color: var(--danger); }
.leave-steps strong { display: block; font-size: .88rem; }
.leave-steps small { display: block; font-size: .78rem; color: var(--ink-500); }

/* ------------------------------------------------------------------ *
 | Contact Directory & Contact Groups
 * ------------------------------------------------------------------ */

/* Group colours: --g is the accent, --gs the soft background */
.group-chip--brown, .group-pick--brown, .group-card--brown, .group-dot--brown { --g: var(--brown-600); --gs: var(--brown-50); }
.group-chip--gold, .group-pick--gold, .group-card--gold, .group-dot--gold { --g: #a1620f; --gs: #fbf3e2; }
.group-chip--blue, .group-pick--blue, .group-card--blue, .group-dot--blue { --g: var(--info); --gs: var(--info-bg); }
.group-chip--green, .group-pick--green, .group-card--green, .group-dot--green { --g: var(--success); --gs: var(--success-bg); }
.group-chip--purple, .group-pick--purple, .group-card--purple, .group-dot--purple { --g: #6b3fa8; --gs: #f1e9fb; }
.group-chip--red, .group-pick--red, .group-card--red, .group-dot--red { --g: var(--danger); --gs: var(--danger-bg); }
.group-chip--grey, .group-pick--grey, .group-card--grey, .group-dot--grey { --g: var(--ink-500); --gs: #ece8e4; }

.group-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--g, var(--brown-600)); flex-shrink: 0; vertical-align: middle; }
h1 .group-dot { width: 14px; height: 14px; margin-right: .2rem; }
.group-chips { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .35rem; }
.group-chip {
    display: inline-flex; align-items: center; padding: .05rem .5rem; border-radius: 999px; margin: 0 .2rem .2rem 0;
    background: var(--gs, var(--brown-50)); color: var(--g, var(--brown-700)); border: 1px solid color-mix(in srgb, var(--g, #8a5a3c) 25%, transparent);
    font-size: .72rem; font-weight: 700; white-space: nowrap;
}
a.group-chip:hover { filter: brightness(.95); color: var(--g); }

/* Contact form: group ticks */
.group-picks { display: flex; flex-wrap: wrap; gap: .5rem; }
.group-pick {
    display: inline-flex; align-items: center; gap: .45rem; cursor: pointer; user-select: none;
    padding: .4rem .8rem; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; font-size: .85rem; font-weight: 600; color: var(--ink-700);
}
.group-pick input { width: 15px; height: 15px; margin: 0; accent-color: var(--g); }
.group-pick:has(input:checked) { background: var(--gs); border-color: var(--g); color: var(--g); }

/* Groups page */
.new-group { margin-bottom: 1rem; }
.new-group > summary {
    display: flex; align-items: center; gap: .5rem; padding: .9rem 1.25rem; cursor: pointer; list-style: none;
    color: var(--brown-700); font-weight: 700; font-size: .9rem;
}
.new-group > summary::-webkit-details-marker { display: none; }
.new-group > summary:hover { background: var(--brown-50); }
.new-group[open] > summary { border-bottom: 1px solid var(--line); }
.group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: .85rem; }
.group-card {
    display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    border-top: 4px solid var(--g); box-shadow: var(--shadow-sm, none);
}
.group-card__main { display: flex; align-items: center; gap: .8rem; padding: 1rem 1.1rem .5rem; color: var(--ink-900); }
.group-card__main strong { display: block; font-size: 1rem; }
.group-card__main small { display: block; color: var(--ink-500); font-size: .8rem; }
.group-card__main:hover strong { color: var(--brown-700); text-decoration: underline; }
.group-card__icon {
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 42px; height: 42px; border-radius: 10px; background: var(--gs); color: var(--g); font-size: 1.1rem;
}
.group-card__desc { margin: 0; padding: 0 1.1rem .5rem; font-size: .84rem; color: var(--ink-700); }
.group-card__foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: auto; padding: .5rem .8rem .5rem 1.1rem; border-top: 1px solid var(--line); }
.group-card__actions { display: inline-flex; gap: .15rem; }
.pick-list { margin: 0; padding: 0; list-style: none; max-height: 340px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.pick-list li { padding: .45rem .7rem; border-bottom: 1px solid var(--line); }
.pick-list li:last-child { border-bottom: 0; }
.pick-list li:hover { background: var(--brown-50); }

/* Directory */
.directory { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 1rem; align-items: start; }
.directory__groups { position: sticky; top: calc(var(--nav-h) + 1rem); }
.directory__groups nav { padding: .4rem; max-height: 70vh; overflow-y: auto; }
.directory__groups .folder-tree__item .group-dot { flex: 0 0 10px; width: 10px; height: 10px; margin: 0 3px; background: var(--g); }
.directory__section + .directory__section { margin-top: .5rem; }
.directory .section-title small { font-size: .72rem; color: var(--ink-400); letter-spacing: 0; }
.directory > div > .toolbar { margin-bottom: .75rem; }
.az { display: flex; flex-wrap: wrap; gap: .2rem; margin-bottom: 1rem; }
.az a, .az span {
    display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px; padding: 0 .4rem;
    border-radius: 6px; font-size: .78rem; font-weight: 700;
}
.az a { background: #fff; border: 1px solid var(--line); color: var(--brown-700); }
.az a:hover { border-color: var(--brown-300); }
.az a.is-active { background: var(--brown-600); border-color: var(--brown-600); color: #fff; }
.az span { color: var(--ink-300, #c9bfb6); }
.dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .65rem; }
.dir-card { padding: .85rem .95rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); break-inside: avoid; }
.dir-card:hover { border-color: var(--brown-300); box-shadow: var(--shadow); }
.dir-card__ways { margin: .6rem 0 0; padding: 0; list-style: none; display: grid; gap: .2rem; font-size: .84rem; }
.dir-card__ways li { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.dir-card__ways i { width: 1rem; text-align: center; color: var(--brown-500); }
.dir-card__ways .fa-whatsapp { color: #1fa855; }
.dir-card__ways a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 991.98px) {
    .directory { grid-template-columns: 1fr; }
    .directory__groups { position: static; }
    .directory__groups nav { max-height: 220px; }
}

@media print {
    .topnav, .page__footer, .no-print, .alert { display: none !important; }
    .page-header { background: none !important; border: 0; padding: 0 0 .5rem; }
    .directory { display: block; }
    .dir-grid { grid-template-columns: repeat(3, 1fr); gap: .4rem; }
    .dir-card { box-shadow: none; padding: .45rem .55rem; }
    .dir-card__ways a { white-space: normal; color: #000; }
}

/* ---------- Sign-in page: mobile app downloads ---------- */
.app-get { margin-top: 1.6rem; padding-top: 1.4rem; border-top: 1px solid var(--line); text-align: center; }
.app-get__title { font-size: .98rem; font-weight: 700; color: var(--ink-900); display: flex; align-items: center; justify-content: center; gap: .45rem; }
.app-get__title i { color: var(--brand-700, var(--brown-700)); }
.app-get__sub { margin: .25rem 0 1rem; font-size: .82rem; color: var(--ink-500); }
.app-get__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .9rem; }
.app-get__item { display: flex; flex-direction: column; align-items: center; gap: .55rem; padding: .9rem .75rem; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.app-get__qr { width: 120px; height: 120px; image-rendering: pixelated; background: #fff; border-radius: 6px; }
.app-get__btn { font-size: .82rem; padding-left: .5rem; padding-right: .5rem; gap: .4rem; white-space: nowrap; }
.app-get__btn .fa-android { color: #3ddc84; }
.app-get__meta { font-size: .72rem; color: var(--ink-500); }
/* Left (dark green) brand panel version */
.app-get--brand { margin-top: 1.6rem; padding-top: 0; border-top: 0; text-align: left; max-width: 544px; }
.app-get--brand .app-get__title { justify-content: flex-start; color: #fff; }
.app-get--brand .app-get__title i { color: var(--gold-300, #f3d36b); }
.app-get--brand .app-get__sub { color: rgba(255, 255, 255, .72); }
.app-get--brand .app-get__grid { grid-template-columns: repeat(2, minmax(0, 210px)); gap: .9rem; }
.app-get--brand .app-get__item { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .14); }
.app-get--brand .app-get__qr { width: 132px; height: 132px; padding: 4px; }
.app-get--brand .app-get__meta { color: rgba(255, 255, 255, .6); }
/* Only one copy shows: left panel on wide screens, under the form when the left panel is hidden */
.app-get--mobile { display: none; }
@media (max-width: 991.98px) { .app-get--mobile { display: block; } }
