/* Staff Docs module: shared admin shell styles (0.5.0). Pairs with admin-shell.js.
 *
 * The layout, cards, tables and status chips every admin page shares. It carries no
 * brand: each site sets these tokens once, on :root, from its own palette, e.g.
 *
 *   :root { --ap-card-bg: var(--white); --ap-border: var(--border-soft); --ap-radius: var(--radius);
 *           --ap-ok: var(--green); --ap-ok-tint: var(--green-tint); --ap-err: var(--error); --ap-err-tint: var(--error-tint);
 *           --ap-ink-mid: ...; --ap-ink-soft: ...; --ap-ink-xsoft: ...; --ap-off-tint: ...; --ap-sans: var(--font-sans); }
 *
 * The left menu itself (.sd-layout, .sd-side, .sd-count) comes from policies.css.
 */

.portal-wrap-narrow { max-width: 420px; margin: 0 auto; }

.p-card { background: var(--ap-card-bg); border: 1px solid var(--ap-border); border-radius: var(--ap-radius); padding: 24px; margin-bottom: 22px; }
.p-status { font-size: 13px; margin-top: 12px; display: none; line-height: 1.6; }
.p-status.visible { display: block; }
.p-status.p-status-ok { color: var(--ap-ok); }
.p-status.p-status-err { color: var(--ap-err); }

.p-section-head { margin: 36px 0 16px; }
.p-section-head:first-child { margin-top: 0; }
.p-section-head h2 { font-size: 19px; margin: 0 0 4px; }
.p-section-desc { font-size: 12.5px; color: var(--ap-ink-soft); font-weight: 300; }

.p-welcome { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; flex-wrap: wrap; }
.p-welcome h1 { font-size: clamp(20px, 3.5vw, 26px); margin: 0; }
.p-signout { font-size: 12.5px; color: var(--ap-ink-soft); background: none; border: none; cursor: pointer; text-decoration: underline; font-family: var(--ap-sans); padding: 0; }

/* Tables */
.p-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.p-table th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ap-ink-xsoft); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--ap-border); }
.p-table td { padding: 10px; border-bottom: 1px solid var(--ap-border); vertical-align: top; }
.p-table tr:last-child td { border-bottom: none; }
.p-table-wrap { overflow-x: auto; }
.p-days { display: inline-flex; padding: 2px 8px; border-radius: 20px; font-size: 11.5px; font-weight: 600; }
.p-days.ok { color: var(--ap-ok); background: var(--ap-ok-tint); }
.p-days.warn { color: #b45309; background: #fef3c7; }
.p-days.err { color: var(--ap-err); background: var(--ap-err-tint); }
.p-days.none { color: #b91c1c; background: #fee2e2; }
.p-days.off { color: var(--ap-ink-soft); background: var(--ap-off-tint); }
.p-empty-note { font-size: 13px; color: var(--ap-ink-soft); font-weight: 300; padding: 8px 0; }

/* Left menu and sections (same layout classes as Policies & Help) */
.ap-layout { margin-top: 20px; }
.ap-section { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.ap-section[hidden] { display: none; }
.ap-section .p-card { margin-bottom: 0; }
.ap-section > div:empty { display: none; }
.ap-head h2 { font-size: clamp(24px, 3.5vw, 30px); }
.ap-head p { font-size: 13px; font-weight: 300; color: var(--ap-ink-mid); margin: 8px 0 0; max-width: 640px; }
.ap-head .sd-rule { margin-bottom: 14px; }
.sd-count[hidden] { display: none; }

/* A gated menu item (Employee Info, Staff access) keeps its space while the server is asked. */
.sd-side-list a[hidden] { display: none !important; }
.sd-side-list a.ap-pending { visibility: hidden; }
