/* ==========================================================================
   Portal (admin, student, parent panels) — builds on style.css tokens
   ========================================================================== */

[hidden] { display: none !important; }
body.portal { background: #f7f3ea; font-size: 1rem; line-height: 1.6; }
.portal h1, .portal h2, .portal h3 { color: var(--green-900); }
.small { font-size: .86rem; }
.nowrap { white-space: nowrap; }
code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .92em; background: var(--sand); padding: .1em .4em; border-radius: 6px; color: var(--green-900); }

/* ---------- Shell ---------- */
.p-shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.p-sidebar {
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
    background: var(--green-900); color: #cfe0d5;
    display: flex; flex-direction: column; padding: 20px 14px;
}
.p-brand { display: flex; flex-direction: column; gap: 8px; padding: 4px 8px 22px; text-decoration: none; }
.p-brand__logo { background: var(--cream); border-radius: 14px; padding: 10px 14px; display: inline-flex; align-self: flex-start; }
.p-brand__logo img { width: 130px; }
.p-brand__role { font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--sun); padding-left: 4px; }

.p-nav { display: grid; gap: 2px; }
.p-nav a, .p-user a, .p-user button {
    display: flex; align-items: center; gap: 12px; width: 100%;
    padding: 10px 12px; border-radius: 10px; border: 0; background: none;
    color: #d6e5db; font: 600 .95rem var(--font-body); text-decoration: none; cursor: pointer; text-align: left;
    transition: background-color .15s ease, color .15s ease;
}
.p-nav a .icon, .p-user .icon { width: 20px; height: 20px; opacity: .85; }
.p-nav a:hover, .p-user a:hover, .p-user button:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.p-nav a[aria-current="page"] { background: rgba(246, 195, 59, .16); color: #fff; box-shadow: inset 3px 0 0 var(--sun); }
.p-nav a[aria-current="page"] .icon { color: var(--sun); opacity: 1; }
.p-nav__count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--sun); color: var(--green-900); font-size: .75rem; display: grid; place-items: center; }

.p-user { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .1); display: grid; gap: 2px; }
.p-user__who { display: flex; gap: 12px; align-items: center; padding: 6px 10px 12px; }
.p-user__who strong { display: block; color: #fff; font-size: .95rem; line-height: 1.3; }
.p-user__who small { display: block; color: #9fb8a8; font-size: .8rem; }
.p-user__avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--sun); color: var(--green-900); display: grid; place-items: center; font-weight: 700; flex: none; }
.p-user a[aria-current="page"] { background: rgba(255, 255, 255, .08); color: #fff; }

.p-main { min-width: 0; }
.p-topbar { display: none; }
.p-content { padding: clamp(20px, 3.5vw, 40px); max-width: 1240px; }

@media (max-width: 960px) {
    .p-shell { grid-template-columns: 1fr; }
    .p-sidebar { position: fixed; z-index: 60; left: 0; top: 0; width: 280px; transform: translateX(-100%); transition: transform .25s ease; box-shadow: 20px 0 40px rgba(0, 0, 0, .2); }
    .p-sidebar.is-open { transform: none; }
    .p-scrim { position: fixed; inset: 0; z-index: 55; background: rgba(10, 26, 19, .45); }
    .p-topbar { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 40; background: var(--paper); border-bottom: 1px solid var(--line); padding: 10px 16px; }
    .p-topbar img { width: 110px; }
    .p-topbar__role { margin-left: auto; font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--green-700); }
    .p-menu-btn { width: 42px; height: 42px; border: 0; border-radius: 10px; background: var(--green-100); color: var(--green-900); display: grid; place-items: center; cursor: pointer; }
    .p-menu-btn .icon { width: 22px; height: 22px; }
}

/* ---------- Page heading ---------- */
.p-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.p-head h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.45rem, 2.6vw, 1.9rem); margin: 0; letter-spacing: -.01em; }
.p-head__sub { color: var(--muted); margin: 6px 0 0; }
.p-head__actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.p-back { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; font-weight: 600; color: var(--muted); text-decoration: none; margin-bottom: 8px; }
.p-back:hover { color: var(--green-700); }
.p-back .icon { width: 16px; height: 16px; }

/* ---------- Cards & layout ---------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 2.4vw, 26px); box-shadow: var(--shadow-sm); }
.card--flush { padding: 0; overflow: hidden; }
.card__head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 14px; }
.card__head h2, .card__title, .section-title { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; margin: 0; }
.card__title { margin-bottom: 14px; }
.card__head--pad { padding: 18px 22px 0; margin-bottom: 12px; }
.card .link-arrow { font-size: .9rem; }
.stack { display: grid; gap: 16px; align-content: start; }
.dash-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
.dash-grid > .span-2 { grid-column: span 2; }
.dash-grid--wide { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
@media (max-width: 1360px) { .dash-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 1100px) { .dash-grid--wide { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .dash-grid { grid-template-columns: 1fr; } .dash-grid > .span-2 { grid-column: auto; } }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; text-decoration: none; display: flex; flex-direction: column; gap: 6px; transition: transform .15s ease, box-shadow .15s ease; }
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat__label { color: var(--muted); font-size: .85rem; font-weight: 600; }
.stat__value { font-family: var(--font-display); font-size: 1.8rem; font-weight: 600; color: var(--green-900); line-height: 1; }
.stat--sun { background: var(--sun-100); border-color: #f0d98c; }

.getting-started { margin-bottom: 24px; border-left: 4px solid var(--sun); }
.getting-started h2 { font-family: var(--font-display); font-size: 1.2rem; }
.getting-started ol { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }

/* Simple stacked rows */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.rows li:first-child { border-top: 0; padding-top: 0; }
.rows li > a { text-decoration: none; min-width: 0; }
.rows li > a strong { display: block; color: var(--ink); font-weight: 600; }
.rows li > a span { display: block; color: var(--muted); font-size: .86rem; }
.rows li > a:hover strong { color: var(--green-700); text-decoration: underline; }
.rows li > :last-child:not(a) { flex: none; white-space: nowrap; }
.rows__stack { flex-direction: column; align-items: stretch !important; }

/* ---------- Tables ---------- */
.table-scroll { overflow-x: auto; }
.ptable { width: 100%; border-collapse: collapse; font-size: .95rem; }
.ptable th { text-align: left; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: #fbf8f1; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ptable td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ptable tr:last-child td { border-bottom: 0; }
.ptable tbody tr:hover { background: #fdfbf6; }
.ptable td > .small, .ptable td > .muted.small { display: block; }
.ptable__main { font-weight: 700; color: var(--ink); text-decoration: none; display: block; }
.ptable__main:hover { color: var(--green-700); text-decoration: underline; }
.ptable__actions { text-align: right; white-space: nowrap; }
.ptable__actions form { display: inline; }
.input--sm { padding: .45em .7em; font-size: .92rem; border-radius: 8px; }

.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); color: var(--green-700); cursor: pointer; vertical-align: middle; }
.icon-btn:hover { background: var(--green-100); }
.icon-btn .icon { width: 17px; height: 17px; }
.icon-btn--danger { color: #b42318; }
.icon-btn--danger:hover { background: #fee4e2; }

/* ---------- Badges & tags ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: .22em .7em; border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap; background: var(--sand); color: var(--ink-soft); }
.badge--pending, .badge--todo, .badge--draft { background: var(--sun-100); color: #8a5a00; }
.badge--approved, .badge--reviewed, .badge--active, .badge--published, .badge--on { background: #dcf1e2; color: #17613b; }
.badge--rejected, .badge--overdue, .badge--off { background: #fde2e0; color: #a4281c; }
.badge--submitted { background: #e2ecfb; color: #1f4f96; }
.badge--late { background: var(--orange-100); color: #9a4a08; }
.badge--left { background: #ececec; color: #555; }
/* Job application steps */
.badge--new { background: #e2ecfb; color: #1f4f96; }
.badge--shortlisted { background: #dff3f1; color: #0f5e59; }
.badge--interview { background: #efe4fb; color: #5b2a86; }
.badge--selected { background: #dcf1e2; color: #17613b; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag { font-size: .74rem; font-weight: 600; padding: .15em .6em; border-radius: 6px; background: var(--green-100); color: var(--green-800); }
.tag--sun { background: var(--sun-100); color: #8a5a00; }

/* ---------- Alerts ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; font-weight: 600; font-size: .95rem; }
.alert .icon { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.alert--success { background: #dcf1e2; color: #17613b; }
.alert--error { background: #fde2e0; color: #a4281c; }
.alert--info { background: #e2ecfb; color: #1f4f96; }

.cred { display: flex; gap: 16px; background: var(--sun-100); border: 1px dashed #d9b441; border-radius: var(--radius); padding: 18px 20px; margin-bottom: 20px; }
.cred__icon { width: 44px; height: 44px; border-radius: 12px; background: var(--green-900); color: var(--sun); display: grid; place-items: center; flex: none; }
.cred__icon .icon { width: 22px; height: 22px; }
.cred__title { font-weight: 700; margin: 0 0 8px; color: var(--green-900); }
.cred dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 0; }
.cred dt { color: var(--muted); font-size: .9rem; }
.cred dd { margin: 0; }
.cred code { font-size: 1.05rem; background: var(--paper); }
.cred__note { font-size: .85rem; color: #6b5413; margin: 10px 0 0; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 720px) { .form-grid { grid-template-columns: 1fr; } }
.form-narrow { max-width: 680px; display: grid; gap: 18px; }
.form-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 4px; }
.portal .input { background: #fff; }
textarea.input { resize: vertical; min-height: 44px; line-height: 1.5; }
.hint { font-size: .84rem; color: var(--muted); }
.inline-check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; font-size: .92rem; cursor: pointer; }
.inline-check input, .checks input { width: 18px; height: 18px; accent-color: var(--green-700); }
.checks { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.checks legend { padding: 0; margin-bottom: 8px; }
.checks label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.input-prefix { display: flex; align-items: stretch; border: 1.5px solid #d9d0bb; border-radius: 12px; overflow: hidden; background: #fff; }
.input-prefix span { padding: .8em .9em; background: var(--sand); color: var(--muted); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; display: flex; align-items: center; }
.input-prefix .input { border: 0; border-radius: 0; }
details.more summary { cursor: pointer; font-weight: 600; color: var(--green-700); }
.danger-zone { margin-top: 18px; }
.btn--danger { background: #fff; color: #b42318; border-color: #f3b8b2; }
.btn--danger:hover { background: #b42318; color: #fff; }
/* Solid red: an action still needed, e.g. uploading a missing disclosure document */
.btn--red { background: #c42b1c; color: #fff; box-shadow: 0 8px 20px -10px rgba(180, 35, 24, .8); }
.btn--red:hover { background: #9f1f13; color: #fff; }
.link-child { display: grid; grid-template-columns: 1fr 130px auto; gap: 10px; align-items: end; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
@media (max-width: 520px) { .link-child { grid-template-columns: 1fr; } }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.filters form, form.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
form.filters { justify-content: flex-start; }
.filters .input { width: auto; padding: .6em .9em; }
.filters select.input { padding-right: 40px; }
.filters__search { position: relative; flex: 1 1 260px; max-width: 380px; }
.filters__search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.filters__search .input { width: 100%; padding-left: 38px; }
.tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.tabs a { padding: .45em 1em; border-radius: 9px; font-weight: 600; font-size: .9rem; color: var(--ink-soft); text-decoration: none; }
.tabs a:hover { background: var(--sand); }
.tabs a[aria-current="page"] { background: var(--green-700); color: #fff; }

/* Pagination */
.pager { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 18px; font-size: .9rem; color: var(--muted); }
.pager a { font-weight: 700; text-decoration: none; }

.empty-state { text-align: center; padding: 48px 24px; color: var(--muted); }
.empty-state .icon { width: 40px; height: 40px; color: var(--green-500); margin: 0 auto 10px; display: block; }
.empty-state p { margin: 0 0 12px; }

/* ---------- Assignments ---------- */
.meter { height: 6px; width: 90px; background: var(--sand); border-radius: 99px; overflow: hidden; margin-bottom: 3px; }
.meter span { display: block; height: 100%; background: var(--green-500); border-radius: 99px; }
.file-chip { display: inline-flex; align-items: center; gap: 6px; padding: .45em .9em; border: 1px solid var(--line); border-radius: 999px; background: #fbf8f1; font-size: .88rem; font-weight: 600; color: var(--green-700); text-decoration: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip:hover { background: var(--green-100); }
.answer { background: #fbf8f1; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; white-space: normal; word-break: break-word; font-size: .95rem; }
.prose-sm p { margin: 0 0 12px; }
.roster { list-style: none; margin: 0; padding: 0; }
.roster > li { border-top: 1px solid var(--line); }
.roster__row { display: flex; align-items: center; gap: 12px; padding: 12px 22px; flex-wrap: wrap; }
.roster__row strong { flex: 1; min-width: 140px; }
summary.roster__row { cursor: pointer; list-style: none; }
summary.roster__row::-webkit-details-marker { display: none; }
summary.roster__row:hover { background: #fdfbf6; }
.roster__roll { width: 32px; height: 32px; border-radius: 8px; background: var(--sand); display: grid; place-items: center; font-size: .82rem; font-weight: 700; color: var(--muted); flex: none; }
.roster__work { padding: 4px 22px 20px 66px; display: grid; gap: 12px; }
.review { display: grid; gap: 8px; }
.review__actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 640px) { .roster__work { padding-left: 22px; } }

.task-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.task-list a { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-left: 4px solid var(--sun); border-radius: 12px; text-decoration: none; background: #fffdf8; transition: box-shadow .15s ease; }
.task-list a:hover { box-shadow: var(--shadow-sm); border-color: #e9dcb8; }
.task-list strong { color: var(--ink); }
.task-list__subject { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--green-500); }
.task-list__due { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); }
.task-list__due.is-late { color: #a4281c; font-weight: 600; }
.task-list__due .icon { width: 15px; height: 15px; }

.assign-list { list-style: none; margin: 0; padding: 0; }
.assign-list__item { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 16px 22px; border-top: 1px solid var(--line); }
.assign-list__item:first-child { border-top: 0; }
.assign-list__main { display: grid; gap: 2px; min-width: 0; }
.assign-list__title { font-weight: 700; color: var(--ink); text-decoration: none; font-size: 1.02rem; }
a.assign-list__title:hover { color: var(--green-700); text-decoration: underline; }
.assign-list__desc { color: var(--ink-soft); margin: 6px 0 0; }
.assign-list__files { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.assign-list__files:empty { display: none; }

.feedback-quote { margin: 8px 0 0; padding: 8px 12px; border-left: 3px solid var(--green-500); background: var(--green-100); border-radius: 0 8px 8px 0; font-size: .92rem; color: var(--green-900); }
.teacher-note { margin-top: 18px; padding: 14px 16px; border-radius: 12px; background: var(--green-100); color: var(--green-900); }
.teacher-note p { margin: 0; }
.teacher-note__label { display: flex; align-items: center; gap: 6px; font-weight: 700; margin-bottom: 6px !important; }
.teacher-note__label .icon { width: 18px; height: 18px; }
.late-note { color: #9a4a08; background: var(--orange-100); padding: 8px 12px; border-radius: 8px; }

/* ---------- Notices ---------- */
.notice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.notice-card { display: grid; gap: 8px; align-content: start; }
.notice-card__date { display: flex; justify-content: space-between; gap: 10px; font-size: .82rem; font-weight: 700; color: var(--green-500); }
.notice-card__title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; margin: 0; line-height: 1.3; }
.notice-card__body p { margin: 0 0 10px; color: var(--ink-soft); }

/* ---------- Parent panel ---------- */
.child-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.child-card { display: grid; gap: 12px; align-content: start; border-top: 4px solid var(--green-500); }
.child-card__top { display: flex; gap: 14px; align-items: center; }
.child-card__top h2 { font-family: var(--font-display); font-size: 1.25rem; margin: 0; }
.child-card__top p { margin: 0; }
.child-card__stat { margin: 0; }
.child-card__stat strong { font-family: var(--font-display); font-size: 1.5rem; color: var(--green-900); }
.child-card__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mini-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .9rem; }
.mini-list li { display: flex; justify-content: space-between; gap: 10px; align-items: center; min-width: 0; }
.mini-list li span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mini-list .badge { flex: none; }
.child-card { min-width: 0; }

.type-cards { display: grid; gap: 10px; }
.type-card { position: relative; display: block; cursor: pointer; }
.type-card input { position: absolute; opacity: 0; }
.type-card > span { display: grid; gap: 2px; padding: 14px 16px 14px 48px; border: 1.5px solid #d9d0bb; border-radius: 14px; background: #fff; transition: border-color .15s ease, background-color .15s ease; position: relative; }
.type-card > span::before { content: ""; position: absolute; left: 16px; top: 17px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #bfb49b; background: #fff; }
.type-card small { color: var(--muted); font-size: .86rem; }
.type-card input:checked + span { border-color: var(--green-700); background: var(--green-100); }
.type-card input:checked + span::before { border-color: var(--green-700); background: radial-gradient(circle, var(--green-700) 45%, #fff 50%); }
.type-card input:focus-visible + span { outline: 3px solid var(--sun-deep); outline-offset: 2px; }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; }
.facts dt { color: var(--muted); font-size: .9rem; }
.facts dd { margin: 0; font-weight: 600; }
@media (max-width: 520px) { .facts { grid-template-columns: 1fr; } .facts dd { margin-bottom: 8px; } }

.timeline { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); counter-reset: t; }
.timeline li { position: relative; padding: 30px 8px 0 0; font-size: .9rem; }
.timeline li::before { content: ""; position: absolute; left: 0; right: 0; top: 10px; height: 3px; background: var(--line); }
.timeline li::after { content: ""; position: absolute; left: 0; top: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; border: 3px solid var(--line); }
.timeline li.is-done::before, .timeline li.is-done::after { background: var(--green-500); border-color: var(--green-500); }
.timeline--rejected li:last-child.is-done::after { background: #c0392b; border-color: #c0392b; }
.timeline strong { display: block; color: var(--green-900); }
.timeline span { color: var(--muted); font-size: .82rem; }

/* ---------- Login page (public layout) ---------- */
.auth--portal .auth__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.auth--portal .display { font-size: clamp(2rem, 4.2vw, 3rem); }
.auth--portal .form-card { max-width: 460px; justify-self: end; width: 100%; }
.auth__who { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.auth__who li { display: flex; gap: 14px; align-items: flex-start; color: var(--ink-soft); }
.auth__who .icon { width: 24px; height: 24px; color: var(--green-500); flex: none; margin-top: 2px; }
.auth__who strong { color: var(--green-900); }
.auth__help { font-size: .88rem; margin: 18px 0 0; }
@media (max-width: 900px) { .auth--portal .auth__grid { grid-template-columns: 1fr; } .auth--portal .form-card { justify-self: stretch; max-width: none; } }

/* ---------- Admin → Disclosure ---------- */
.stats--two { grid-template-columns: repeat(auto-fit, minmax(220px, 280px)); }
.stat__value small { font-size: 1rem; color: var(--muted); font-family: var(--font-body); }
.doc-group { font-family: var(--font-body); font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0; padding: 16px 22px 8px; background: #fbf8f1; border-top: 1px solid var(--line); }
.doc-rows { list-style: none; margin: 0; padding: 0; }
.doc-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 22px; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.doc-row:target { background: var(--sun-100); }
.doc-row__num { width: 34px; height: 34px; border-radius: 8px; background: var(--green-100); color: var(--green-800); display: grid; place-items: center; font-size: .8rem; font-weight: 700; }
.doc-row__label { margin: 0 0 4px; font-weight: 600; line-height: 1.4; }
.doc-row__info p.small { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.doc-row__info a { font-weight: 600; word-break: break-all; }
.doc-row__actions { display: flex; align-items: center; gap: 8px; }
.doc-upload { display: flex; align-items: center; gap: 8px; }
.doc-upload input[type="file"] { max-width: 210px; font-size: .82rem; }
@media (max-width: 900px) {
    .doc-row { grid-template-columns: 34px minmax(0, 1fr); }
    .doc-row__actions { grid-column: 2; flex-wrap: wrap; }
    .doc-upload { flex-wrap: wrap; }
}
.disclosure-form { margin-top: 24px; }
.results-title { font-family: var(--font-body); font-size: .95rem; font-weight: 700; margin: 16px 0 8px; }
.results-input { width: 100%; border-collapse: collapse; min-width: 560px; }
.results-input th { text-align: left; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 0 6px 6px; }
.results-input td { padding: 4px 6px; }
.results-input td:first-child { width: 120px; }
.results-input td:nth-child(2), .results-input td:nth-child(3), .results-input td:nth-child(4) { width: 110px; }
.save-bar { position: sticky; bottom: 12px; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--green-900); border-radius: var(--radius); padding: 12px 16px 12px 22px; box-shadow: var(--shadow); }
.save-bar .muted { color: #b7cdbf; }
.save-bar .btn--primary { background: var(--sun); color: var(--green-900); }
.save-bar .btn--primary:hover { background: #ffd35e; }

/* ---------- Motion (portal) — switched off for reduced-motion users by style.css ---------- */
@keyframes portal-rise { from { opacity: 0; transform: translateY(10px); } }
.p-content > * { animation: portal-rise .5s cubic-bezier(.2, .7, .2, 1) backwards; }
.p-content > :nth-child(2) { animation-delay: .06s; }
.p-content > :nth-child(3) { animation-delay: .12s; }
.p-content > :nth-child(4) { animation-delay: .18s; }
.p-content > :nth-child(n+5) { animation-delay: .24s; }
.stat, .card, .child-card { transition: transform .2s ease, box-shadow .2s ease; }
.child-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.p-nav a .icon { transition: transform .2s ease; }
.p-nav a:hover .icon { transform: translateX(2px) scale(1.08); }
/* ---------- Job applications (admin/jobs) ---------- */
.tabs__n { font-size: .8em; opacity: .7; margin-left: 2px; }
.job-top { display: flex; gap: 22px; align-items: flex-start; }
.job-photo { width: 120px; height: 160px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); flex: none; display: block; }
.job-photo--none { display: grid; place-items: center; background: #fbf8f1; color: var(--muted); }
.job-photo--none .icon { width: 36px; height: 36px; }
.job-contact { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
@media (max-width: 640px) { .job-top { flex-direction: column; } }
@media print {
    .p-sidebar, .p-topbar, .p-head__actions, .p-back, .no-print, .alert { display: none !important; }
    body.portal { background: #fff; }
    .p-shell, .p-main, .p-content { display: block; padding: 0; margin: 0; }
    .dash-grid--wide { display: block; }
    .card { border: 0; box-shadow: none; padding: 0; }
}
