/* ===========================================================================
   RMS - Recruitment Management System
   Theme: the institute purple - #A800A8 over #6A0A6A - on Mist Gray (#F0F2F5).

   Every colour is a custom property in :root below. To retune the brand,
   change --brand and the numbered shades; nothing else in this file holds a
   brand colour of its own.

   One stylesheet, no framework, no external requests - the Content Security
   Policy allows no third party origins, so fonts are system stacks and icons
   are an inline SVG sprite.
   =========================================================================== */

:root {
    /* --- Brand ---------------------------------------------------------- */
    --brand: #a800a8;
    --brand-600: #960096;
    --brand-700: #870087;
    --brand-800: #760076;
    --brand-900: #6a0a6a;
    --brand-950: #4a054a;
    --brand-50: #fdf0fd;
    --brand-100: #f7ddf7;
    --brand-200: #ecb9ec;
    --brand-ring: rgba(168, 0, 168, .22);

    /* --- Neutrals ------------------------------------------------------- */
    --mist: #f0f2f5;
    --paper: #ffffff;
    --ink: #15171f;
    --ink-soft: #565d6b;
    --ink-faint: #858c9a;
    --line: #e0e3ea;
    --line-soft: #eef0f4;

    /* --- Meaning -------------------------------------------------------- */
    --ok: #0c8a55;
    --ok-bg: #e7f6ef;
    --ok-line: #b9e4cf;
    --warn: #9a6206;
    --warn-bg: #fdf3e3;
    --warn-line: #f2ddb2;
    --bad: #c62348;
    --bad-bg: #fdeaef;
    --bad-line: #f4c4d1;
    --info: #1a6fa8;
    --info-bg: #e8f3fb;
    --info-line: #bcdcf0;

    /* --- Shape and depth ------------------------------------------------ */
    --r-sm: 7px;
    --r: 10px;
    --r-lg: 14px;
    --r-xl: 18px;

    --shadow-xs: 0 1px 2px rgba(21, 23, 31, .05);
    --shadow: 0 1px 2px rgba(21, 23, 31, .05), 0 6px 16px -6px rgba(21, 23, 31, .10);
    --shadow-md: 0 2px 4px rgba(21, 23, 31, .05), 0 12px 28px -10px rgba(21, 23, 31, .16);
    --shadow-brand: 0 6px 20px -8px rgba(168, 0, 168, .5);

    --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    --serif: "Georgia", "Times New Roman", serif;
    --mono: "Cascadia Mono", "SF Mono", Consolas, "Courier New", monospace;

    --ease: cubic-bezier(.4, 0, .2, 1);
}

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

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

body {
    margin: 0;
    font-family: var(--sans);
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--mist);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    margin: 0 0 .45rem;
    line-height: 1.25;
    font-weight: 650;
    letter-spacing: -.011em;
    text-wrap: balance;
}

h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
h4 { font-size: .9rem; }
p { margin: 0 0 .8rem; }

a { color: var(--brand-700); text-decoration: none; }
a:hover { color: var(--brand-800); text-decoration: underline; text-underline-offset: 2px; }

small { font-size: .82rem; }
hr { border: 0; border-top: 1px solid var(--line-soft); margin: 1.1rem 0; }

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: 4px;
}

::selection { background: var(--brand-100); }

/* Checkboxes, radios and range inputs pick up the brand colour natively. */
input, select, textarea, progress { accent-color: var(--brand); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
    html { scroll-behavior: auto; }
}

/* --------------------------------------------------------------- Icons */

.ico {
    width: 1.05em;
    height: 1.05em;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.85;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: -.16em;
}

/* ---------------------------------------------------------- Institute logo */

/* The sign in screen's mark, shown with or without a logo. */
.login__mark {
    display: inline-grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--brand), var(--brand-700));
    color: #fff;
    box-shadow: var(--shadow-brand);
    margin-bottom: .6rem;
}

/* With a logo, the chip becomes a white panel that wraps the artwork. A crest
   or a wordmark is usually dark and detailed: it needs a light background to
   sit on, and its own proportions to stay legible.
 *
 * The selectors are deliberately compound - .masthead__mark.masthead__mark--logo
 * rather than .masthead__mark--logo - so they outrank the plain chip rules no
 * matter where those appear in this file. Relying on source order here was a
 * bug: the square purple chip won and the logo overflowed it. */
.masthead__mark.masthead__mark--logo,
.side__mark.side__mark--logo,
.login__mark.login__mark--logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, .55);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
    backdrop-filter: none;
}

.masthead__mark.masthead__mark--logo { padding: 5px 9px; border-radius: 10px; }
.side__mark.side__mark--logo { padding: 4px 7px; border-radius: 9px; }
.login__mark.login__mark--logo { padding: 8px 14px; border-radius: 14px; }

/* The image is sized by an explicit height, so nothing depends on a percentage
   resolving against a parent whose own height is automatic. */
.brand-logo { display: block; object-fit: contain; }

.masthead__mark--logo .brand-logo { height: 42px; width: auto; max-width: 210px; }
.side__mark--logo .brand-logo { height: 34px; width: auto; max-width: 160px; }
.login__mark--logo .brand-logo { height: 58px; width: auto; max-width: 260px; }

@media (max-width: 640px) {
    .masthead__mark--logo .brand-logo { height: 34px; max-width: 140px; }
}

.ico--sm { width: .92em; height: .92em; }
.ico--lg { width: 1.35em; height: 1.35em; }
.ico--xl { width: 1.8em; height: 1.8em; stroke-width: 1.7; }

/* --------------------------------------------------------------- Layout */

.wrap { max-width: 1220px; margin: 0 auto; padding: 0 1.25rem; }
.wrap--narrow { max-width: 880px; }
.wrap--form { max-width: 1020px; }

.stack > * + * { margin-top: 1rem; }
.row { display: flex; flex-wrap: wrap; gap: 1rem; }
.row > * { min-width: 0; }
.grid { display: grid; gap: 1rem; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(195px, 1fr)); }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.right { margin-left: auto; }

.muted { color: var(--ink-soft); }
.faint { color: var(--ink-faint); }
.tiny { font-size: .8rem; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.mono { font-family: var(--mono); font-size: .88em; letter-spacing: -.01em; }

/* ------------------------------------------------------ Public masthead */

.masthead {
    background: linear-gradient(135deg, var(--brand-950) 0%, var(--brand-900) 45%, var(--brand-700) 100%);
    color: #fff;
    padding: 1rem 0;
    position: relative;
}

.masthead::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand) 0%, #e58ce5 50%, var(--brand) 100%);
}

.masthead a { color: #fff; }
.masthead a:hover { text-decoration: none; }

.masthead__org { display: flex; align-items: center; gap: .8rem; }
.masthead__org strong { display: block; font-size: 1.05rem; font-weight: 650; letter-spacing: -.01em; }
.masthead__org span { display: block; font-size: .8rem; color: #e9b6e9; }

.masthead__mark {
    width: 42px; height: 42px;
    flex: 0 0 auto;
    display: grid; place-items: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, .13);
    border: 1px solid rgba(255, 255, 255, .22);
    backdrop-filter: blur(6px);
}

.masthead__nav { display: flex; gap: .3rem; flex-wrap: wrap; }
.masthead__nav a {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .42rem .85rem;
    border-radius: 999px;
    font-size: .86rem;
    font-weight: 550;
    color: #f2d8f2;
    border: 1px solid transparent;
    transition: background .16s var(--ease), color .16s var(--ease);
}
.masthead__nav a:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.masthead__nav a.is-active { background: #fff; color: var(--brand-800); font-weight: 650; }

.page-head { padding: 1.6rem 0 .6rem; }
.page-head h1 { letter-spacing: -.02em; }

/* The sentence under a page title. It takes the width it is given, up to the
   point where a line becomes tiring to read - the eye loses its place on the
   way back to the left margin long before 1200 pixels. */
.lede { max-width: 100ch; }

/* ------------------------------------------------------------- Surfaces */

.card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-xs);
}

.card__head {
    padding: .8rem 1.1rem;
    border-bottom: 1px solid var(--line-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
}
.card__head h2, .card__head h3 { margin: 0; display: flex; align-items: center; gap: .5rem; }
.card__head h2 .ico, .card__head h3 .ico { color: var(--brand); }
.card__body { padding: 1.1rem; }
.card__foot {
    padding: .8rem 1.1rem;
    border-top: 1px solid var(--line-soft);
    background: #fbfbfd;
    border-radius: 0 0 var(--r-lg) var(--r-lg);
}

.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: .9rem 1rem; }

.tint {
    background: var(--brand-50);
    border: 1px solid var(--brand-100);
    border-radius: var(--r);
    padding: .9rem 1rem;
}

.note {
    display: flex; gap: .65rem;
    background: var(--warn-bg);
    border: 1px solid var(--warn-line);
    border-left: 3px solid var(--warn);
    border-radius: var(--r);
    padding: .8rem .95rem;
    font-size: .9rem;
}
.note > .ico { color: var(--warn); margin-top: .12em; }
.note--ok { background: var(--ok-bg); border-color: var(--ok-line); border-left-color: var(--ok); }
.note--ok > .ico { color: var(--ok); }
.note--bad { background: var(--bad-bg); border-color: var(--bad-line); border-left-color: var(--bad); }
.note--bad > .ico { color: var(--bad); }
.note--info { background: var(--info-bg); border-color: var(--info-line); border-left-color: var(--info); }
.note--info > .ico { color: var(--info); }

/* Empty states */
.empty { padding: 2.2rem 1rem; text-align: center; color: var(--ink-soft); }
.empty .ico { color: var(--brand-200); margin-bottom: .4rem; }
.empty strong { display: block; color: var(--ink); margin-bottom: .2rem; }

/* -------------------------------------------------------------- Vacancy */

.vacancy {
    display: block;
    position: relative;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 1.1rem 1.2rem 1.1rem 1.35rem;
    box-shadow: var(--shadow-xs);
    overflow: hidden;
    transition: transform .16s var(--ease), box-shadow .16s var(--ease), border-color .16s var(--ease);
}
.vacancy::before {
    content: "";
    position: absolute; inset: 0 auto 0 0; width: 4px;
    background: linear-gradient(180deg, var(--brand), var(--brand-700));
}
.vacancy:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--brand-200);
    text-decoration: none;
}
.vacancy h3 { color: var(--brand-800); }
.vacancy__meta {
    display: flex; gap: .35rem .9rem; flex-wrap: wrap;
    font-size: .82rem; color: var(--ink-soft); margin-top: .55rem;
    align-items: center;
}
.vacancy__meta span { display: inline-flex; align-items: center; gap: .3rem; }
.vacancy--closed { opacity: .78; }
.vacancy--closed::before { background: var(--ink-faint); }

.deadline { font-weight: 650; color: var(--bad); }

/* --------------------------------------------------------------- Badges */

.badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .2em .62em;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 650;
    letter-spacing: .005em;
    border: 1px solid transparent;
    white-space: nowrap;
    line-height: 1.5;
}
.badge .ico { width: .88em; height: .88em; stroke-width: 2.1; }
.badge--ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.badge--warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.badge--bad { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); }
.badge--info { background: var(--info-bg); color: var(--info); border-color: var(--info-line); }
.badge--muted { background: var(--line-soft); color: var(--ink-soft); border-color: var(--line); }
.badge--brand { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-100); }

.pill {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .14em .55em;
    border-radius: var(--r-sm);
    background: var(--line-soft);
    font-size: .78rem;
    color: var(--ink-soft);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .42rem;
    padding: .48rem .95rem;
    min-height: 36px;
    border: 1px solid var(--brand);
    border-radius: var(--r-sm);
    background: var(--brand);
    color: #fff;
    font: inherit;
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: var(--shadow-xs);
    transition: background .15s var(--ease), border-color .15s var(--ease),
                box-shadow .15s var(--ease), transform .06s var(--ease);
}
.btn:hover { background: var(--brand-600); border-color: var(--brand-600); color: #fff; text-decoration: none; box-shadow: var(--shadow-brand); }
.btn:active { transform: translateY(1px); box-shadow: var(--shadow-xs); }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }

.btn--ghost { background: transparent; color: var(--brand-700); border-color: transparent; box-shadow: none; }
.btn--ghost:hover { background: var(--brand-50); color: var(--brand-800); box-shadow: none; }

.btn--plain { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn--plain:hover { background: var(--brand-50); border-color: var(--brand-200); color: var(--brand-800); box-shadow: var(--shadow-xs); }

.btn--ok { background: var(--ok); border-color: var(--ok); }
.btn--ok:hover { background: #0a7248; border-color: #0a7248; box-shadow: 0 6px 18px -8px rgba(12, 138, 85, .6); }

.btn--bad { background: var(--bad); border-color: var(--bad); }
.btn--bad:hover { background: #a91c3c; border-color: #a91c3c; box-shadow: 0 6px 18px -8px rgba(198, 35, 72, .6); }

.btn--sm { padding: .3rem .62rem; min-height: 30px; font-size: .8rem; border-radius: var(--r-sm); }
.btn--lg { padding: .68rem 1.5rem; min-height: 44px; font-size: .95rem; }
.btn--block { width: 100%; }
.btn--icon { padding: .38rem; min-height: 32px; width: 32px; }

.btn-row { display: flex; gap: .45rem; flex-wrap: wrap; align-items: center; }

/* ---------------------------------------------------------------- Forms */

.field { margin-bottom: .85rem; }

.field > label, .field-label {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-weight: 600;
    font-size: .82rem;
    margin-bottom: .28rem;
    color: var(--ink);
}
.field > label .ico { color: var(--ink-faint); }
.field .hint { display: block; font-size: .77rem; color: var(--ink-faint); margin-top: .22rem; }
.required::after { content: "*"; color: var(--bad); margin-left: .15rem; font-weight: 700; }
.req-star { color: var(--bad); }

input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date],
input[type=time], input[type=password], input[type=search], input[type=url], select, textarea {
    width: 100%;
    min-height: 36px;
    padding: .42rem .6rem;
    font: inherit;
    font-size: .875rem;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid #ccd1da;
    border-radius: var(--r-sm);
    transition: border-color .14s var(--ease), box-shadow .14s var(--ease), background .14s var(--ease);
}

input::placeholder, textarea::placeholder { color: #a8aebb; }

input:hover:not(:disabled), select:hover:not(:disabled), textarea:hover:not(:disabled) { border-color: #b3bac6; }

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-ring);
    background: #fff;
}

input:disabled, select:disabled, textarea:disabled { background: var(--line-soft); color: var(--ink-faint); }

input[type=file] {
    width: 100%;
    font-size: .82rem;
    padding: .35rem;
    border: 1px dashed #c3c9d4;
    border-radius: var(--r-sm);
    background: #fcfcfe;
}
input[type=file]:hover { border-color: var(--brand-200); background: var(--brand-50); }
input[type=file]::file-selector-button {
    font: inherit;
    font-size: .78rem;
    font-weight: 600;
    margin-right: .6rem;
    padding: .3rem .7rem;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--paper);
    color: var(--brand-700);
    cursor: pointer;
}
input[type=file]::file-selector-button:hover { background: var(--brand-50); border-color: var(--brand-200); }

textarea { min-height: 78px; resize: vertical; line-height: 1.5; }

select {
    appearance: none;
    padding-right: 1.9rem;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%),
        linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%);
    background-position: calc(100% - 15px) 51%, calc(100% - 10px) 51%;
    background-size: 5px 5px;
    background-repeat: no-repeat;
}

.is-invalid { border-color: var(--bad) !important; background: #fffbfc; }
.is-invalid:focus { box-shadow: 0 0 0 3px rgba(198, 35, 72, .18); }

.error:not(:empty) {
    display: flex; align-items: center; gap: .28rem;
    color: var(--bad); font-size: .78rem; margin-top: .22rem; font-weight: 550;
}

.check { display: flex; gap: .55rem; align-items: flex-start; font-size: .88rem; }
.check input { margin-top: .2rem; flex: 0 0 auto; width: auto; min-height: 0; width: 16px; height: 16px; }

.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Numbered questions, mirroring the printed form. */
.question { border-top: 1px solid var(--line-soft); padding: 1rem 0 .3rem; }
.question:first-of-type { border-top: 0; padding-top: .2rem; }

.question__no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.85rem;
    height: 1.85rem;
    padding: 0 .38rem;
    border-radius: 8px;
    background: var(--brand-50);
    color: var(--brand-700);
    border: 1px solid var(--brand-100);
    font-weight: 700;
    font-size: .8rem;
    margin-right: .6rem;
}
.question__title { display: flex; align-items: center; margin-bottom: .1rem; }
.question__title h3 { margin: 0; font-size: .98rem; }
.question__help { font-size: .81rem; color: var(--ink-faint); margin: 0 0 .7rem 2.45rem; }
.question__body { margin-left: 2.45rem; }

@media (max-width: 640px) {
    .question__body, .question__help { margin-left: 0; }
}

.section-title {
    display: flex; align-items: center; gap: .45rem;
    font-size: 1.02rem;
    font-weight: 650;
    color: var(--brand-800);
    padding-bottom: .35rem;
    margin: 0 0 .9rem;
    border-bottom: 2px solid var(--brand-100);
}
.section-title .ico { color: var(--brand); }

/* ----------------------------------------------------------------- Tabs */

/* The panels are all visible until JavaScript turns the tabs on, so the form
   still works end to end with scripting disabled. */
.tabs { display: none; }
.tabs__progress { display: none; }

.is-tabbed .tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
    margin-bottom: .55rem;
}

.is-tabbed .tabs__tab {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .42rem .7rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper);
    color: var(--ink-soft);
    font: inherit;
    font-size: .82rem;
    font-weight: 550;
    cursor: pointer;
    transition: background .14s var(--ease), color .14s var(--ease), border-color .14s var(--ease);
}
.is-tabbed .tabs__tab:hover { border-color: var(--brand-200); background: var(--brand-50); color: var(--brand-800); }
.is-tabbed .tabs__tab.is-active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    box-shadow: var(--shadow-brand);
}
.is-tabbed .tabs__tab.is-done { border-color: var(--ok-line); color: var(--ok); background: var(--ok-bg); }
.is-tabbed .tabs__tab.has-error { border-color: var(--bad); color: var(--bad); background: var(--bad-bg); }

.tabs__num {
    display: inline-grid;
    place-items: center;
    width: 1.25rem; height: 1.25rem;
    border-radius: 50%;
    background: var(--line-soft);
    color: var(--ink-soft);
    font-size: .7rem;
    font-weight: 700;
}
.tabs__tab.is-active .tabs__num { background: rgba(255, 255, 255, .25); color: #fff; }
.tabs__tab.is-done .tabs__num { background: var(--ok); color: #fff; }
.tabs__tab.has-error .tabs__num { background: var(--bad); color: #fff; }

@media (max-width: 700px) {
    .is-tabbed .tabs__label { display: none; }
    .is-tabbed .tabs__tab { padding: .42rem .55rem; }
}

.is-tabbed .tabs__progress {
    display: block;
    height: 4px;
    border-radius: 999px;
    background: var(--line-soft);
    margin-bottom: 1rem;
    overflow: hidden;
}
.is-tabbed .tabs__progress span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--brand), var(--brand-600));
    transition: width .3s var(--ease);
}

.is-tabbed .tabpanel { display: none; }
.is-tabbed .tabpanel.is-active { display: block; animation: panel-in .2s var(--ease); }

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

/* Without the tabs, separate the sections so the long form stays readable. */
.tabpanel + .tabpanel { margin-top: 1.1rem; }

/* --------------------------------------------------------------- Tables */

.table-scroll { overflow-x: auto; border-radius: 0 0 var(--r-lg) var(--r-lg); }

table.data {
    width: 100%;
    border-collapse: collapse;
    font-size: .865rem;
    background: var(--paper);
}
table.data th, table.data td {
    padding: .58rem .7rem;
    text-align: left;
    border-bottom: 1px solid var(--line-soft);
    vertical-align: top;
}
table.data thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f7f7fb;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .045em;
    color: var(--ink-soft);
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
table.data tbody tr { transition: background .12s var(--ease); }
table.data tbody tr:hover { background: var(--brand-50); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data.tight th, table.data.tight td { padding: .38rem .55rem; font-size: .83rem; }

table.entry { width: 100%; border-collapse: separate; border-spacing: 0 .2rem; font-size: .86rem; }
table.entry th {
    text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em;
    color: var(--ink-soft); padding: 0 .3rem .25rem; font-weight: 700;
}
table.entry td { padding: .1rem .3rem; }
table.entry input, table.entry select { font-size: .85rem; padding: .35rem .5rem; min-height: 33px; }

/* A certificate attached to one row of a table: the browser's own file button
   is far wider than a text cell, so it is held to the column. */
table.entry input.file-cell {
    font-size: .74rem; padding: .28rem .35rem; min-height: 30px; width: 100%;
    background: var(--mist); border-style: dashed;
}
table.entry input.file-cell::file-selector-button {
    font: inherit; margin-right: .4rem; padding: .16rem .45rem; cursor: pointer;
    border: 1px solid var(--line); border-radius: 5px;
    background: #fff; color: var(--brand-800);
}

.facts { display: grid; grid-template-columns: minmax(150px, 30%) 1fr; gap: 0 1rem; margin: 0; font-size: .89rem; }
.facts dt { color: var(--ink-soft); padding: .38rem 0; border-bottom: 1px solid var(--line-soft); font-size: .84rem; }
.facts dd { margin: 0; padding: .38rem 0; border-bottom: 1px solid var(--line-soft); }
.facts dt:last-of-type, .facts dd:last-of-type { border-bottom: 0; }
.facts--plain dt, .facts--plain dd { border-bottom: 0; padding: .14rem 0; }

@media (max-width: 560px) {
    .facts { grid-template-columns: 1fr; }
    .facts dt { border-bottom: 0; padding-bottom: 0; }
}

/* ---------------------------------------------------------------- Stats */

.stat {
    position: relative;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: .95rem 1.05rem;
    box-shadow: var(--shadow-xs);
    display: flex;
    align-items: flex-start;
    gap: .8rem;
    transition: box-shadow .16s var(--ease), border-color .16s var(--ease);
}
.stat:hover { box-shadow: var(--shadow); border-color: var(--brand-200); }

.stat__icon {
    width: 40px; height: 40px;
    flex: 0 0 auto;
    display: grid; place-items: center;
    border-radius: 11px;
    background: var(--brand-50);
    color: var(--brand);
    border: 1px solid var(--brand-100);
}
.stat__label { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); font-weight: 650; }
.stat__value { font-size: 1.65rem; font-weight: 700; line-height: 1.15; color: var(--ink); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat__note { font-size: .78rem; color: var(--ink-soft); }

.stat--ok .stat__icon { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.stat--ok .stat__value { color: var(--ok); }
.stat--warn .stat__icon { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.stat--warn .stat__value { color: var(--warn); }
.stat--bad .stat__icon { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); }
.stat--bad .stat__value { color: var(--bad); }

/* Horizontal bars drawn with plain divs. */
.bars { display: grid; gap: .45rem; }
.bar { display: grid; grid-template-columns: 145px 1fr 44px; align-items: center; gap: .6rem; font-size: .83rem; }
.bar__track { background: var(--line-soft); border-radius: 999px; height: 8px; overflow: hidden; }
.bar__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--brand), var(--brand-600));
    border-radius: 999px;
    transition: width .5s var(--ease);
}
.bar__fill--ok { background: linear-gradient(90deg, #14a568, var(--ok)); }
.bar__fill--warn { background: linear-gradient(90deg, #d08a12, var(--warn)); }
.bar__fill--bad { background: linear-gradient(90deg, #e0405f, var(--bad)); }
.bar__fill--info { background: linear-gradient(90deg, #2a91d1, var(--info)); }
.bar__value { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }

/* Vertical spark columns. */
.spark { display: flex; align-items: flex-end; gap: 3px; height: 72px; }
.spark__col {
    flex: 1;
    background: var(--brand-100);
    border-radius: 3px 3px 0 0;
    min-height: 3px;
    transition: background .16s var(--ease);
}
.spark__col:hover { background: var(--brand); }

/* ------------------------------------------------------------- Timeline */

.timeline { list-style: none; margin: 0; padding: 0 0 0 1rem; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 .95rem 1.1rem; }
.timeline li::before {
    content: "";
    position: absolute;
    left: -1.36rem;
    top: .4rem;
    width: .6rem;
    height: .6rem;
    border-radius: 50%;
    background: var(--brand);
    border: 2px solid var(--paper);
    box-shadow: 0 0 0 2px var(--brand-100);
}
.timeline li:last-child { padding-bottom: 0; }
.timeline time { display: block; font-size: .76rem; color: var(--ink-faint); }

/* Progress tracker. */
.steps { display: flex; gap: .4rem; flex-wrap: wrap; margin: 0 0 1.1rem; padding: 0; list-style: none; }
.steps li {
    flex: 1 1 135px;
    display: flex; align-items: center; gap: .45rem;
    padding: .55rem .7rem;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--paper);
    font-size: .78rem;
    color: var(--ink-faint);
}
.steps li strong { display: block; font-size: .85rem; color: inherit; }
.steps li .ico { flex: 0 0 auto; }
.steps li.is-done { border-color: var(--ok-line); background: var(--ok-bg); color: var(--ok); }
.steps li.is-now {
    border-color: var(--brand);
    background: var(--brand-50);
    color: var(--brand-800);
    font-weight: 600;
    box-shadow: 0 0 0 3px var(--brand-ring);
}
.steps li.is-bad { border-color: var(--bad-line); background: var(--bad-bg); color: var(--bad); }

/* ---------------------------------------------------------------- Flash */

.flash {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    padding: .75rem .95rem;
    border-radius: var(--r);
    margin-bottom: 1rem;
    border: 1px solid;
    border-left-width: 3px;
    font-size: .89rem;
    animation: flash-in .22s var(--ease);
}
@keyframes flash-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.flash--success { background: var(--ok-bg); border-color: var(--ok-line); border-left-color: var(--ok); color: #0a5c39; }
.flash--error { background: var(--bad-bg); border-color: var(--bad-line); border-left-color: var(--bad); color: #8f1832; }
.flash--warning { background: var(--warn-bg); border-color: var(--warn-line); border-left-color: var(--warn); color: #6f4604; }
.flash--info { background: var(--info-bg); border-color: var(--info-line); border-left-color: var(--info); color: #124e77; }
.flash .ico { margin-top: .1em; }

/* ---------------------------------------------------------- Admin shell */

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

.side {
    width: 244px;
    flex: 0 0 244px;
    background: linear-gradient(180deg, var(--brand-950) 0%, var(--brand-900) 100%);
    color: #e3bde3;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.side__brand {
    padding: .95rem 1.05rem;
    border-bottom: 1px solid rgba(255, 255, 255, .09);
    display: flex; align-items: center; justify-content: space-between; gap: .5rem;
}
.side__brand a { display: flex; align-items: center; gap: .6rem; color: #fff; }
.side__brand a:hover { text-decoration: none; }
.side__mark {
    width: 34px; height: 34px;
    display: grid; place-items: center;
    border-radius: 10px;
    background: var(--brand);
    color: #fff;
    box-shadow: var(--shadow-brand);
}
.side__brand strong { display: block; font-size: .92rem; font-weight: 650; letter-spacing: -.01em; }
.side__brand span { font-size: .72rem; color: #cf9acf; }

.side nav { padding: .7rem .6rem; flex: 1; overflow-y: auto; }
.side nav::-webkit-scrollbar { width: 6px; }
.side nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .16); border-radius: 99px; }

.side__group {
    padding: .85rem .6rem .3rem;
    font-size: .66rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #b884b8;
    font-weight: 700;
}

.side a.side__link {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem .7rem;
    margin-bottom: .12rem;
    border-radius: 9px;
    color: #e3bde3;
    font-size: .875rem;
    font-weight: 550;
    transition: background .14s var(--ease), color .14s var(--ease);
}
.side a.side__link:hover { background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; }
.side a.side__link.is-active {
    background: var(--brand);
    color: #fff;
    font-weight: 650;
    box-shadow: var(--shadow-brand);
}
.side a.side__link .ico { opacity: .95; }

.side__count {
    margin-left: auto;
    background: rgba(255, 255, 255, .18);
    border-radius: 999px;
    padding: .05rem .42rem;
    font-size: .72rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.side__link.is-active .side__count { background: rgba(255, 255, 255, .28); }

.side__foot { padding: .8rem 1.05rem; border-top: 1px solid rgba(255, 255, 255, .09); }
.side__foot a { display: inline-flex; align-items: center; gap: .4rem; color: #cf9acf; font-size: .8rem; }
.side__foot a:hover { color: #fff; text-decoration: none; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
    background: rgba(255, 255, 255, .82);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--line);
    padding: .65rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 20;
}
.topbar h1 { font-size: 1.12rem; margin: 0; }

.crumbs { font-size: .78rem; color: var(--ink-faint); display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.crumbs a { color: var(--ink-soft); }
.crumbs .ico { width: .8em; height: .8em; }

.content { padding: 1.4rem 1.5rem 2.5rem; flex: 1; }

.who { display: flex; align-items: center; gap: .55rem; font-size: .84rem; }
.who__avatar {
    width: 34px; height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--brand), var(--brand-700));
    color: #fff;
    display: grid; place-items: center;
    font-weight: 700;
    font-size: .78rem;
    letter-spacing: .02em;
}
.who__name { line-height: 1.25; }
.who__name strong { display: block; font-size: .85rem; }

.side-toggle { display: none; }

@media (max-width: 900px) {
    .shell { display: block; }
    .side { width: auto; flex: none; height: auto; position: static; }
    .side nav { display: none; padding-bottom: 1rem; }
    .side.is-open nav { display: block; }
    .side__foot { display: none; }
    .side.is-open .side__foot { display: block; }
    .side-toggle { display: inline-flex; }
    .content { padding: 1rem; }
    .topbar { padding: .65rem 1rem; position: static; }
}

/* -------------------------------------------------------------- Toolbar */

.filters { display: flex; gap: .55rem; flex-wrap: wrap; align-items: flex-end; }
.filters .field { margin: 0; min-width: 145px; }
.filters .field > label {
    font-size: .72rem; text-transform: uppercase; letter-spacing: .04em;
    color: var(--ink-faint); font-weight: 700;
}
.filters .btn-row { padding-bottom: 1px; }

.pager { display: flex; gap: .25rem; align-items: center; flex-wrap: wrap; font-size: .84rem; }
.pager a, .pager span {
    display: inline-flex; align-items: center;
    min-width: 32px; height: 32px;
    padding: 0 .55rem;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--paper);
    color: var(--ink-soft);
}
.pager a:hover { background: var(--brand-50); border-color: var(--brand-200); color: var(--brand-800); text-decoration: none; }
.pager .is-current { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 650; }

/* ---------------------------------------------------------------- Modal */

dialog.modal {
    border: 0;
    border-radius: var(--r-xl);
    padding: 0;
    max-width: 580px;
    width: calc(100% - 2rem);
    box-shadow: var(--shadow-md);
    animation: modal-in .18s var(--ease);
}
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
dialog.modal::backdrop { background: rgba(58, 5, 58, .55); backdrop-filter: blur(2px); }
dialog.modal .card__head { border-radius: var(--r-xl) var(--r-xl) 0 0; background: var(--brand-50); }
dialog.modal .card__foot { border-radius: 0 0 var(--r-xl) var(--r-xl); }

/* ---------------------------------------------------------------- Print */

@media print {
    body { background: #fff; font-size: 11.5pt; }
    .masthead, .side, .topbar, .no-print, .btn, .flash, .pager, .filters, .side-toggle { display: none !important; }
    .card, .panel { border: 1px solid #ccc; box-shadow: none; }
    .content, .wrap { padding: 0; max-width: none; }
    a { color: #000; text-decoration: none; }
    table.data thead th { background: #eee !important; position: static; }
    .page-break { page-break-before: always; }
}

/* --------------------------------------------------------------- Footer */

.foot {
    margin-top: 2.5rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--line);
    background: var(--paper);
    font-size: .83rem;
    color: var(--ink-soft);
}
.foot a { color: var(--brand-700); }

.skip { position: absolute; left: -9999px; }
.skip:focus {
    left: 1rem; top: 1rem;
    background: #fff; color: var(--brand-800);
    padding: .5rem .9rem; border-radius: var(--r-sm); z-index: 50;
    box-shadow: var(--shadow-md);
}


