/* ==========================================================================
   LEIA ID Information — design system
   ========================================================================== */
:root {
  color-scheme: light;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;

  --bg: #f3f5f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #eef2f7;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f1b2d;
  --text-2: #3c4a5e;
  --muted: #64748b;

  --brand: #0f2742;
  --brand-2: #173a5e;
  --brand-text: #e7eef7;
  --brand-muted: #8fa6c0;
  --accent: #c9a64b;

  --primary: #1f5fbf;
  --primary-hover: #194e9e;
  --primary-soft: #e8f0fb;
  --primary-ring: rgba(31, 95, 191, .22);

  --success: #12795a;
  --success-soft: #e3f4ec;
  --warning: #a8620b;
  --warning-soft: #fdf2df;
  --danger: #c0352b;
  --danger-soft: #fdecea;
  --info: #1f6fb2;
  --info-soft: #e5f0fa;
  --neutral-soft: #eef1f5;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(15, 27, 45, .06);
  --shadow: 0 1px 2px rgba(15, 27, 45, .05), 0 4px 16px rgba(15, 27, 45, .06);
  --shadow-lg: 0 12px 40px rgba(15, 27, 45, .16);
  --sidebar-w: 264px;
  font-family: var(--font);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a111d;
  --surface: #101a2a;
  --surface-2: #0d1624;
  --surface-3: #16233a;
  --border: #1e2b40;
  --border-strong: #2c3c56;
  --text: #e6edf7;
  --text-2: #b9c6d8;
  --muted: #8796ae;

  --brand: #08101c;
  --brand-2: #13213a;
  --brand-text: #e2eaf5;
  --brand-muted: #7d91ad;

  --primary: #4d8ef0;
  --primary-hover: #6aa2f5;
  --primary-soft: #14284a;
  --primary-ring: rgba(77, 142, 240, .3);

  --success: #3fc495;
  --success-soft: #0f2e25;
  --warning: #f0b049;
  --warning-soft: #33250c;
  --danger: #f2766c;
  --danger-soft: #3a1714;
  --info: #5fa9ea;
  --info-soft: #102a42;
  --neutral-soft: #1a2638;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, .5);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
h1, h2, h3 { margin: 0; color: var(--text); font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }
p { margin: 0; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.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; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--primary); color: #fff; padding: 8px 14px; border-radius: var(--radius-sm); font-weight: 600; }
.skip-link:focus { top: 12px; color: #fff; }
.eyebrow, .dashboard-kicker { display: block; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- Brand ---------- */
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-logo { width: 40px; height: 40px; flex: none; object-fit: contain; border-radius: 8px; }
.brand-monogram { display: grid; place-items: center; background: linear-gradient(135deg, var(--brand-2), var(--brand)); color: #fff; font-weight: 800; font-size: 14px; letter-spacing: .04em; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.brand-copy { display: grid; min-width: 0; line-height: 1.2; }
.brand-copy strong { font-size: 13.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-copy small { color: var(--muted); font-size: 11.5px; font-weight: 500; }

/* ---------- Buttons ---------- */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border: 1px solid transparent; border-radius: var(--radius-sm); font: inherit; font-size: 14px; font-weight: 600; line-height: 1; white-space: nowrap; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s; text-decoration: none; }
.button:disabled, .button[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.button-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.button-primary:hover { background: var(--primary-hover); color: #fff; }
.button-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.button-secondary:hover { background: var(--surface-3); color: var(--text); }
.button-ghost { background: transparent; color: var(--text-2); }
.button-ghost:hover { background: var(--surface-3); color: var(--text); }
.button-danger { background: var(--surface); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.button-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.button-sm { min-height: 32px; padding: 0 12px; font-size: 13px; }
.button-full { width: 100%; }
.icon-button { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-2); cursor: pointer; font: inherit; transition: background-color .15s, color .15s; }
.icon-button:hover { background: var(--surface-3); color: var(--text); }

.theme-toggle { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.theme-toggle:hover { background: var(--surface-3); color: var(--text); }
.theme-toggle.icon-only { width: 38px; padding: 0; justify-content: center; }
.theme-toggle.icon-only .theme-toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }

/* ---------- Forms ---------- */
label { display: block; color: var(--text-2); font-size: 13px; font-weight: 600; }
label > input, label > select, label > textarea { display: block; margin-top: 6px; }
label b { margin-left: 2px; color: var(--danger); font-weight: 700; }
label small, .field-hint { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; font-weight: 400; }
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: inherit; font-size: 14px; font-weight: 400; line-height: 1.4;
  transition: border-color .15s, box-shadow .15s; box-shadow: var(--shadow-sm);
}
textarea { resize: vertical; min-height: 84px; }
select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .75; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-3); color: var(--muted); cursor: not-allowed; }
input[type="file"] { width: 100%; padding: 8px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text-2); font: inherit; font-size: 13px; font-weight: 400; cursor: pointer; }
input[type="file"]::file-selector-button { margin-right: 12px; padding: 7px 12px; border: 1px solid var(--border-strong); border-radius: 5px; background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); }
.fields-grid[hidden] { display: none; }
.fields-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px 18px; align-items: start; }
.fields-grid + label, label + .fields-grid, .fields-grid + .fields-grid, form > label + label, .form-section > label { margin-top: 16px; }
.name-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-two { grid-column: span 2; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.form-actions > p { margin-right: auto; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.draft-save-status { color: var(--muted); font-size: 12.5px; }
.draft-save-status:not(:empty)::before { content: "\f00c"; font-family: "Font Awesome 7 Free"; font-weight: 900; margin-right: 6px; color: var(--success); }

/* ---------- Alerts ---------- */
.alert { display: block; position: relative; margin-bottom: 18px; padding: 12px 14px 12px 42px; border: 1px solid; border-radius: var(--radius); font-size: 13.5px; }
.alert::before { position: absolute; left: 15px; top: 12px; font-family: "Font Awesome 7 Free"; font-weight: 900; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }
.alert-error { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 30%, transparent); color: var(--danger); }
.alert-error::before { content: "\f06a"; }
.alert-success { background: var(--success-soft); border-color: color-mix(in srgb, var(--success) 30%, transparent); color: var(--success); }
.alert-success::before { content: "\f058"; }
.alert-info { background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 30%, transparent); color: var(--info); }
.alert-info::before { content: "\f05a"; }
.alert strong { color: inherit; }

/* ---------- Badges ---------- */
.badge, .support-status, .status-tag, .type-tag, .priority-tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.support-status::before, .status-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.support-status-open, .status-pending { background: var(--warning-soft); color: var(--warning); }
.support-status-in_progress, .status-in_review { background: var(--info-soft); color: var(--info); }
.support-status-resolved, .status-completed { background: var(--success-soft); color: var(--success); }
.badge-muted { background: var(--neutral-soft); color: var(--muted); }
.badge-muted::before { background: var(--muted); }
.badge-info { background: var(--info-soft); color: var(--info); }
.type-tag { background: var(--neutral-soft); color: var(--text-2); }
.type-student { background: var(--primary-soft); color: var(--primary); }
.type-employee { background: color-mix(in srgb, var(--accent) 18%, transparent); color: color-mix(in srgb, var(--accent) 70%, var(--text)); }
.priority-tag { padding: 0 8px; background: transparent; border: 1px solid var(--border); color: var(--text-2); }
.priority-tag i { font-size: 10px; }
.priority-high { border-color: color-mix(in srgb, var(--danger) 35%, transparent); color: var(--danger); background: var(--danger-soft); }
.priority-low { color: var(--muted); }

/* ---------- Public layout ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--border); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1180px; height: 68px; margin: 0 auto; padding: 0 24px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-actions form { margin: 0; }
.top-link { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: var(--radius-sm); color: var(--text-2); font-weight: 600; font-size: 13.5px; }
.top-link:hover { background: var(--surface-3); color: var(--text); }
.employee-portal-nav { display: flex; gap: 4px; margin-right: 6px; }
.employee-portal-nav a { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: var(--radius-sm); color: var(--text-2); font-weight: 600; font-size: 13.5px; }
.employee-portal-nav a:hover { background: var(--surface-3); color: var(--text); }
.employee-portal-nav a.active { background: var(--primary-soft); color: var(--primary); }
.page-shell { width: 100%; max-width: 1180px; margin: 0 auto; padding: 36px 24px 48px; }
.public-body .page-shell { max-width: 960px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.page-heading h1 { font-size: 26px; font-weight: 750; }
.page-heading .subtitle { margin-top: 6px; color: var(--muted); font-size: 14.5px; max-width: 680px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.site-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; max-width: 1180px; margin: 0 auto; padding: 20px 24px 32px; color: var(--muted); font-size: 12.5px; border-top: 1px solid var(--border); }
.public-body .site-footer { max-width: 960px; }
.site-footer i { margin-right: 4px; }

/* ---------- User chip ---------- */
.user-chip { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--brand-2)); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.user-chip-copy { display: grid; min-width: 0; line-height: 1.25; }
.user-chip-copy strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip-copy small { font-size: 11.5px; color: var(--muted); }
.user-chip.compact { padding: 3px 12px 3px 3px; border: 1px solid var(--border); border-radius: 999px; }
.user-chip.compact .avatar { width: 30px; height: 30px; font-size: 11px; }
.user-chip.compact strong { max-width: 140px; }

/* ---------- Admin shell ---------- */
.admin-shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.admin-sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--brand); color: var(--brand-text); border-right: 1px solid rgba(255, 255, 255, .04); overflow-y: auto; z-index: 40; }
.admin-brand { padding: 20px 20px 18px; border-bottom: 1px solid rgba(255, 255, 255, .07); color: var(--brand-text); }
.admin-brand:hover { color: #fff; }
.admin-brand .brand-copy small { color: var(--brand-muted); }
.admin-brand .brand-logo:not(.brand-monogram) { background: #fff; padding: 3px; }
.admin-brand .brand-monogram { background: linear-gradient(135deg, var(--accent), #a8862f); color: #0f2742; }
.admin-side-nav { flex: 1; display: grid; align-content: start; gap: 2px; padding: 12px; }
.side-nav-group { margin: 16px 10px 6px; color: var(--brand-muted); font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.side-nav-group:first-child { margin-top: 4px; }
.admin-side-nav a { position: relative; display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: 8px; color: #c4d2e3; font-weight: 500; font-size: 14px; transition: background-color .15s, color .15s; }
.admin-side-nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.admin-side-nav a.active { background: rgba(255, 255, 255, .1); color: #fff; font-weight: 600; }
.admin-side-nav a.active::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.side-nav-icon { width: 18px; text-align: center; font-size: 15px; color: var(--brand-muted); }
.admin-side-nav a:hover .side-nav-icon, .admin-side-nav a.active .side-nav-icon { color: var(--accent); }
.admin-sidebar-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 12px; padding: 12px; border-radius: 10px; background: rgba(255, 255, 255, .05); }
.admin-sidebar-bottom form { margin: 0; }
.admin-sidebar-bottom .user-chip-copy small { color: var(--brand-muted); }
.admin-sidebar-bottom .user-chip-copy strong { color: #fff; }
.sidebar-logout { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--brand-muted); cursor: pointer; font: inherit; }
.sidebar-logout span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.sidebar-logout:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.admin-workspace { display: flex; flex-direction: column; min-width: 0; }
.admin-topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 28px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--border); }
.admin-topbar .topbar-actions { margin-left: auto; }
.sidebar-toggle { display: none; }
.breadcrumb { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; min-width: 0; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb > span { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.breadcrumb-sep { font-size: 10px; opacity: .6; }
.admin-content { flex: 1; max-width: 1240px; padding: 28px 28px 40px; margin: 0; }
.admin-site-footer { max-width: none; margin: 0; padding: 18px 28px 24px; }
.sidebar-backdrop { position: fixed; inset: 0; z-index: 35; background: rgba(8, 16, 28, .5); }

/* ---------- Cards ---------- */
.form-card, .table-card, .notice-card, .login-card, .public-links-panel, .id-records-overview, .panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.form-card { padding: 28px; }
.table-card { overflow: hidden; }
.form-card + .form-card, .table-card + .table-card, .table-card + section, .stat-grid + section, section + .table-card { margin-top: 20px; }

.section-heading { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.section-heading > span { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 9px; background: var(--primary-soft); color: var(--primary); font-size: 12.5px; font-weight: 700; }
.section-heading h2 { font-size: 16.5px; font-weight: 700; }
.section-heading p { margin-top: 2px; color: var(--muted); font-size: 13px; }
.form-section { padding: 24px 0; border-top: 1px solid var(--border); }
.form-section:first-of-type { border-top: 0; padding-top: 4px; }
form > .form-section:first-of-type { padding-top: 24px; border-top: 1px solid var(--border); }
#informationForm > .form-section:first-of-type { border-top: 0; padding-top: 8px; }

/* ---------- Stepper ---------- */
.step-row { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border); color: var(--text); font-size: 12px; font-weight: 700; letter-spacing: .06em; }
.step-number { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 12px; letter-spacing: 0; }
.step-track { display: flex; gap: 6px; flex: 1; max-width: 160px; margin-left: auto; }
.step-track i { flex: 1; height: 5px; border-radius: 999px; background: var(--primary); }
.step-track i + i { background: var(--surface-3); }
.step-track i.complete { background: var(--primary); }
.step-count { color: var(--muted); font-weight: 600; letter-spacing: 0; }

/* ---------- Callouts ---------- */
.support-portal-callout { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; padding: 16px 18px; border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent); border-radius: var(--radius); background: var(--primary-soft); }
.support-portal-callout > div { display: grid; gap: 2px; }
.support-portal-callout strong { color: var(--text); }
.support-portal-callout small { color: var(--text-2); font-size: 13px; }

/* ---------- Uploads & media ---------- */
.upload-previews { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 16px; }
.upload-previews figure { margin: 0; display: grid; gap: 8px; width: 280px; max-width: 100%; }
.upload-previews img { width: 100%; height: 140px; object-fit: contain; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff repeating-conic-gradient(#f1f4f8 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.upload-previews figcaption { color: var(--muted); font-size: 12px; }
.media-placeholder { display: grid; place-items: center; align-content: center; gap: 8px; width: 100%; height: 140px; border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface-2); color: var(--muted); font-size: 12.5px; text-align: center; }
.media-placeholder i { font-size: 24px; opacity: .7; }

.public-body .page-shell:has(.id-form-layout) { max-width: 1180px; }
.id-form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.id-preview { position: sticky; top: 88px; }
.admin-content .id-preview { top: 80px; }
.id-preview-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.id-preview-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; font-weight: 700; }
.id-preview-head span { color: var(--muted); font-size: 12px; }
.id-card-flip { perspective: 1400px; cursor: pointer; }
.id-card-inner { display: grid; transform-style: preserve-3d; transition: transform .6s ease; }
.id-card-flip.is-flipped .id-card-inner { transform: rotateX(180deg); }
.id-card { grid-area: 1 / 1; position: relative; container-type: inline-size; aspect-ratio: 1947863 / 3117850; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-lg); color: #111; font-family: "Bahnschrift", "Arial Narrow", Arial, sans-serif; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
/* Front positions and sizes are the PPT slide's (EMU coordinates as % of the 1947863 x 3117850 slide; 1pt = 0.652cqw). */
.id-card-art { position: absolute; left: -.856%; top: -.874%; width: 101.71%; height: 100.87%; overflow: hidden; }
.id-card-art img { position: absolute; left: -3.847%; top: 0; width: 106.77%; max-width: none; height: 100%; }
.id-card-small { position: absolute; left: 0; right: 0; font-size: 2.61cqw; line-height: 1.2; text-align: center; white-space: nowrap; transform: translateY(-50%); }
.id-card-address { top: 26.16%; }
.id-card-phones { top: 29.85%; }
.id-card-valid { position: absolute; left: 3.06%; width: 100.86%; top: 98.87%; color: #fff; font-size: 3.26cqw; line-height: 1; text-align: center; white-space: nowrap; transform: translateY(-50%); }
.id-card .id-card-valid.is-placeholder { color: #fff; }
/* The printed back is rotated 180deg; flipping top-to-bottom shows it upright, like turning the real card over. */
.id-card-back { transform: rotateX(180deg); }
.id-back-line, .id-back-text, .id-back-certify, .id-back-president { position: absolute; left: 9%; right: 6%; margin: 0; font-size: 3.9cqw; line-height: 1.25; }
.id-back-text { font-weight: 300; overflow-wrap: anywhere; }
.id-back-text b, .id-back-line { font-weight: 400; }
.id-back-caap { top: 3.5%; font-size: 4.6cqw; }
.id-back-address-label { top: 12.3%; }
.id-back-address { top: 16.7%; max-height: 9%; overflow: hidden; }
.id-back-details { top: 28.2%; }
.id-back-emergency { top: 40.2%; left: 6%; right: 4%; font-size: 4cqw; letter-spacing: .03em; white-space: nowrap; }
.id-back-emergency-name { top: 45.5%; }
.id-back-emergency-address { top: 52.1%; max-height: 9%; overflow: hidden; }
.id-back-emergency-contact { top: 61%; }
.id-back-certify { top: 69.9%; left: 6%; text-align: center; line-height: 1.15; }
.id-back-president-signature { position: absolute; top: 83.4%; left: 34.4%; width: 31.3%; height: 7.5%; object-fit: contain; }
.id-back-president { top: 90.6%; text-align: center; left: 6%; font-size: 3.6cqw; line-height: 1.2; }
.id-preview-actions { display: flex; gap: 8px; margin-top: 12px; }
.id-preview-actions .button { flex: 1; justify-content: center; }
.id-card-photo { position: absolute; left: 28.56%; top: 35.89%; width: 42.88%; height: 26.9%; }
.id-card-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.id-card-photo-empty { display: grid; place-items: center; align-content: center; gap: 2cqw; height: 100%; padding: 0 4cqw; color: #8a94a3; font-size: 3.2cqw; line-height: 1.2; text-align: center; }
.id-card-photo-empty[hidden] { display: none; }
.id-card-photo-empty i { font-size: 10cqw; }
.id-card-line { position: absolute; left: 4%; right: 4%; overflow: hidden; line-height: 1.1; text-align: center; white-space: nowrap; transform: translateY(-50%); }
.id-card-last { top: 68.07%; font-size: 9.13cqw; }
.id-card-first { top: 72.95%; font-size: 7.82cqw; }
.id-card-role { top: 78.21%; font-size: 5.87cqw; font-weight: 300; }
.id-card-idno { top: 83.48%; font-size: 5.87cqw; font-weight: 300; }
.id-card .is-placeholder { color: #9aa3af; }
.id-card-signature { position: absolute; left: 29.83%; top: 85.08%; width: 40.35%; height: 11.59%; object-fit: contain; }
/* Employee card: same slide size, different art and layout (assets/ppt/employee-id-template.pptx). */
.id-card-employee .id-card-art { left: -1.204%; top: -.174%; width: 102.43%; height: 100.17%; }
.id-card-employee .id-card-art img { left: 0; width: 100%; }
.id-card-employee .id-card-small { padding: 0 4.69%; white-space: normal; transform: none; }
.id-card-employee .id-card-address { left: 23.88%; right: auto; width: 73.06%; top: 24.22%; }
.id-card-employee .id-card-phones { left: 21.82%; right: auto; width: 75.13%; top: 28.05%; }
.id-card-department { position: absolute; left: 13.26%; top: 65.18%; width: 111.47%; padding: 0 4.69%; overflow: hidden; color: #8cb6d0; font-size: 18.25cqw; font-weight: 300; line-height: 1; white-space: nowrap; transform: translate(-50%, -50%) rotate(-90deg); }
.id-card .id-card-department.is-placeholder { color: #8cb6d0; opacity: .6; }
.id-card-employee .id-card-photo { left: 36.19%; top: 35.21%; width: 46.82%; height: 29.33%; }
.id-card-employee .id-card-line { right: auto; width: 79.06%; }
.id-card-employee .id-card-last { left: 19.92%; top: 70.68%; }
.id-card-employee .id-card-first { left: 20.27%; top: 75.21%; font-size: 7.17cqw; }
.id-card-employee .id-card-role { left: 20.61%; top: 80.66%; }
.id-card-employee .id-card-idno { left: 19.92%; top: 84%; }
.id-card-employee .id-card-signature { left: 40.19%; top: 86.6%; width: 44.15%; height: 6.41%; }
.id-card-employee .id-card-valid { left: 39.02%; width: 82.15%; top: 95.94%; padding-left: 4.69%; text-align: left; }
.id-card-employee .id-back-address-label { top: 10.9%; }
.id-card-employee .id-back-address { top: 15.71%; max-height: 5%; }
.id-card-employee .id-back-government { top: 21.41%; }
.id-card-employee .id-back-details { top: 34.83%; }
.id-card-employee .id-back-emergency { top: 46.9%; }
.id-card-employee .id-back-emergency-name { top: 52.26%; }
.id-card-employee .id-back-emergency-address { top: 56.7%; max-height: 5%; }
.id-card-employee .id-back-emergency-contact { top: 63.31%; }
.id-card-employee .id-back-certify { top: 71.2%; line-height: 1.1; }
.id-card-employee .id-back-president-signature { top: 84%; left: 34.35%; height: 6.6%; }
.id-card-employee .id-back-president { top: 90.8%; }
.id-preview-note { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.upload-note { margin-top: 10px; color: var(--muted); font-size: 13px; }

/* ---------- Review ---------- */
.summary-type { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.summary-type span:first-child { padding: 4px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 700; }
.summary-type span:last-child { color: var(--muted); font-size: 13px; }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.summary-item { display: grid; gap: 3px; padding: 14px 16px; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); margin: 0 -1px -1px 0; }
.summary-item span { color: var(--muted); font-size: 12px; font-weight: 600; }
.summary-item strong { color: var(--text); font-weight: 500; word-break: break-word; }
.summary-files { margin-top: 24px; }
.summary-files h2 { font-size: 15px; }
.review-actions { justify-content: space-between; }
.review-actions form { margin: 0; }

/* ---------- Success ---------- */
.notice-card { max-width: 560px; margin: 0 auto; padding: 40px 36px; text-align: center; }
.success-mark { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; background: var(--success-soft); color: var(--success); font-size: 26px; box-shadow: 0 0 0 8px color-mix(in srgb, var(--success-soft) 50%, transparent); }
.notice-card h2 { margin: 6px 0 10px; font-size: 21px; }
.notice-card > p:not(.eyebrow) { color: var(--text-2); }
.ticket-box { display: grid; gap: 4px; margin: 24px 0; padding: 18px; border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface-2); }
.ticket-box span { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .1em; }
.ticket-box strong { font-family: var(--mono); font-size: 22px; letter-spacing: .04em; }

/* ---------- Auth layout ---------- */
.auth-shell { display: grid; grid-template-columns: minmax(360px, 5fr) 7fr; min-height: 100vh; }
.auth-aside { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: 40px 48px; background: radial-gradient(120% 80% at 0% 0%, var(--brand-2) 0%, var(--brand) 60%); color: var(--brand-text); overflow: hidden; }
.auth-aside::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 380px; height: 380px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .07); box-shadow: 0 0 0 60px rgba(255, 255, 255, .02), 0 0 0 120px rgba(255, 255, 255, .015); pointer-events: none; }
.auth-brand { color: #fff; }
.auth-brand:hover { color: #fff; }
.auth-brand .brand-copy small { color: var(--brand-muted); }
.auth-brand .brand-logo:not(.brand-monogram) { background: #fff; padding: 3px; }
.auth-brand .brand-monogram { background: linear-gradient(135deg, var(--accent), #a8862f); color: #0f2742; }
.auth-aside-copy { position: relative; z-index: 1; max-width: 420px; }
.auth-aside .eyebrow { color: var(--accent); }
.auth-aside h2 { margin: 12px 0 24px; color: #fff; font-size: 28px; font-weight: 750; line-height: 1.25; }
.auth-points { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.auth-points li { display: flex; align-items: center; gap: 12px; color: #c9d6e6; font-size: 14px; }
.auth-points i { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 8px; background: rgba(255, 255, 255, .08); color: var(--accent); font-size: 13px; }
.auth-aside-foot { color: var(--brand-muted); font-size: 12px; }
.auth-main { display: flex; flex-direction: column; padding: 24px; background: var(--bg); }
.auth-main-top { display: flex; justify-content: flex-end; }
.auth-panel { width: 100%; max-width: 400px; margin: auto; padding: 24px 0 40px; }
.auth-heading { margin-bottom: 24px; }
.auth-heading h1 { font-size: 26px; font-weight: 750; }
.auth-heading .subtitle { margin-top: 6px; color: var(--muted); }
.login-card { padding: 28px; }
.login-card form { display: grid; gap: 16px; }
.login-card form label + label { margin-top: 0; }
.login-card .button-full { margin-top: 6px; min-height: 44px; }
.employee-auth-switch { margin-top: 20px; color: var(--muted); text-align: center; font-size: 13.5px; }
.employee-auth-switch a { font-weight: 600; }
.auth-footnote { margin-top: 18px; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 12.5px; }

/* ---------- Dashboard ---------- */
.dashboard-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 8px 0 14px; }
.dashboard-toolbar h2 { margin-top: 2px; font-size: 18px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card { position: relative; display: grid; gap: 4px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.stat-card > span { color: var(--muted); font-size: 13px; font-weight: 600; }
.stat-card strong { font-size: 28px; font-weight: 750; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat-card small { color: var(--muted); font-size: 12.5px; }
.stat-icon { position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: var(--primary-soft); color: var(--primary); font-size: 15px; }
.stat-icon.tone-warning { background: var(--warning-soft); color: var(--warning); }
.stat-icon.tone-info { background: var(--info-soft); color: var(--info); }
.stat-icon.tone-success { background: var(--success-soft); color: var(--success); }
.role-form { display: flex; align-items: center; gap: 6px; margin: 0; }
.admin-users-table .role-form select, .admin-users-table .role-form input[data-role-title] { flex: none; min-height: 34px; height: 34px; padding-top: 0; padding-bottom: 0; font-size: 13px; }
.admin-users-table .role-form select { width: 140px; }
.branches-new-admin, .branches-admins { margin-top: 20px; }
.branch-switcher { margin: 0; }
.branch-switcher label { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; }
.branch-switcher select { width: auto; min-height: 36px; height: 36px; padding-top: 0; padding-bottom: 0; font-size: 13px; font-weight: 600; color: var(--text); }
.admin-topbar .topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
@media (max-width: 640px) { .branch-switcher span { display: none; } }
.branches-admins .role-form select.branch-select { width: 200px; min-height: 34px; height: 34px; padding-top: 0; padding-bottom: 0; font-size: 13px; }
.admin-users-table select.branch-select { width: 130px; min-height: 34px; height: 34px; padding-top: 0; padding-bottom: 0; font-size: 13px; }
.admin-users-table .role-form input[data-role-title] { width: 84px; padding-left: 8px; padding-right: 8px; }
.admin-users-table .role-form input[data-role-title][hidden] { display: none; }
.todo-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.todo-tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; color: var(--muted); font-size: 13px; font-weight: 600; text-decoration: none; }
.todo-tabs a:hover { background: var(--surface-3); color: var(--text); }
.todo-tabs a.active { background: var(--primary-soft); color: var(--primary); }
.todo-list { margin: 0; padding: 0; list-style: none; }
.todo-list .empty-row { display: grid; justify-items: center; gap: 8px; padding: 40px 20px; color: var(--muted); text-align: center; }
.todo-item { display: flex; align-items: flex-start; gap: 14px; padding: 16px 20px; border-top: 1px solid var(--border); }
.todo-item form { margin: 0; }
.todo-check { display: grid; place-items: center; width: 24px; height: 24px; margin-top: 1px; padding: 0; border: 2px solid var(--border-strong); border-radius: 50%; background: var(--surface); color: transparent; font-size: 11px; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.todo-check:hover { border-color: var(--success); color: var(--success); }
.todo-item.is-done .todo-check { border-color: var(--success); background: var(--success); color: #fff; }
.todo-body { flex: 1; min-width: 0; }
.todo-body strong { display: block; color: var(--text); overflow-wrap: anywhere; }
.todo-item.is-done .todo-body strong { color: var(--muted); text-decoration: line-through; }
.todo-body p { margin: 4px 0 0; color: var(--text-2); font-size: 13px; overflow-wrap: anywhere; }
.todo-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 8px; color: var(--muted); font-size: 12.5px; }
.todo-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.todo-item.is-overdue .todo-due { color: var(--danger); font-weight: 600; }
.todo-actions { display: flex; gap: 6px; flex: none; }
.stat-icon.tone-danger { background: var(--danger-soft); color: var(--danger); }
.management-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.management-overview { margin-bottom: 20px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.dashboard-grid > aside { display: grid; gap: 20px; }

.public-links-panel, .id-records-overview { padding: 20px; }
.panel-title { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; font-size: 15px; font-weight: 700; }
.panel-title i { color: var(--primary); }
.panel-text { color: var(--muted); font-size: 13px; }
.public-link-list { display: grid; gap: 8px; margin-top: 16px; }
.public-link-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.public-link-item a { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; font-size: 13.5px; }
.public-link-item a i { color: var(--muted); width: 16px; text-align: center; }
.public-link-item a:hover { color: var(--primary); }
.copy-feedback { margin-top: 8px; min-height: 18px; color: var(--success); font-size: 12.5px; }
.id-record-counts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.id-record-counts > div { padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.id-record-counts strong { display: block; font-size: 22px; font-weight: 750; font-variant-numeric: tabular-nums; }
.id-record-counts span { color: var(--muted); font-size: 12px; }

/* ---------- Tables ---------- */
.dashboard-table-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.dashboard-table-heading h2 { margin-top: 2px; font-size: 16px; }
.dashboard-table-heading > span, .dashboard-table-heading > a { font-size: 13px; font-weight: 600; }
.dashboard-table-heading > span { color: var(--muted); }
.table-scroll { position: relative; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th { padding: 11px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-align: left; text-transform: uppercase; white-space: nowrap; }
tbody td { padding: 13px 16px; border-bottom: 1px solid var(--border); color: var(--text-2); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background-color .12s; }
tbody tr:hover { background: var(--surface-2); }
tbody td strong { color: var(--text); font-weight: 600; }
th:first-child, td:first-child { padding-left: 20px; }
th:last-child, td:last-child { padding-right: 20px; }
td:last-child:has(> .button, > form, > details) { text-align: right; }
.ticket-cell { font-family: var(--mono); font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.nowrap { white-space: nowrap; }
.cell-sub { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.empty-row { padding: 48px 20px !important; text-align: center; color: var(--muted); }
.empty-row i { display: block; margin-bottom: 10px; font-size: 26px; opacity: .5; }
.table-footnote { padding: 12px 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12.5px; }
.table-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.table-pagination strong { color: var(--text); font-weight: 600; }
.pager { display: flex; gap: 4px; }
.pager-link { display: inline-grid; place-items: center; min-width: 32px; height: 32px; padding: 0 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-2); font-size: 13px; font-weight: 600; }
.pager-link:hover { background: var(--surface-3); color: var(--text); }
.pager-link.is-current { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager-link.is-disabled { opacity: .4; pointer-events: none; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--border); background: var(--surface); }
.filter-bar select { width: auto; min-width: 160px; }
.search-field { position: relative; flex: 1 1 280px; display: block; }
.search-field > i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; pointer-events: none; }
.filter-bar .search-field > input:not([type="file"]) { padding-left: 38px; }

.person-image-cell { width: 64px; }
.person-thumbnail { display: block; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); }
.person-thumbnail-placeholder { display: grid; place-items: center; background: var(--surface-3); color: var(--muted); font-size: 12.5px; font-weight: 700; }

.record-actions-menu { position: relative; display: inline-block; }
.record-actions-menu summary { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-sm); color: var(--muted); cursor: pointer; list-style: none; }
.record-actions-menu summary::-webkit-details-marker { display: none; }
.record-actions-menu summary:hover, .record-actions-menu[open] summary { background: var(--surface-3); color: var(--text); }
.record-actions-popover { position: absolute; right: 0; top: calc(100% + 4px); z-index: 50; min-width: 180px; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); text-align: left; }
.record-actions-popover.is-floating { position: fixed; right: auto; top: 0; }
.record-actions-popover a, .record-actions-popover button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: none; color: var(--text); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.record-actions-popover a:hover, .record-actions-popover button:hover { background: var(--surface-3); color: var(--text); }
.record-actions-popover form { margin: 0; }
.record-actions-popover button { color: var(--danger); }
.record-actions-popover button:hover { background: var(--danger-soft); color: var(--danger); }
.record-actions-popover i { width: 14px; text-align: center; }
.inline-user-action { margin: 0; display: inline; }
.request-type-actions { white-space: nowrap; }
.request-type-actions form { display: inline; margin: 0 0 0 6px; }

/* ---------- Record / ticket detail ---------- */
.record-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.back-link, .form-back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-weight: 600; font-size: 13.5px; }
.back-link:hover, .form-back-link:hover { color: var(--primary); }
.form-back-link { margin-bottom: 16px; }
.record-toolbar > div { display: flex; align-items: center; gap: 10px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.record-ticket { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.record-toolbar strong { font-family: var(--mono); font-size: 13px; }
.record-toolbar .record-ppt-button { margin-left: auto; }
.signatory-signature-preview { width: 100%; max-width: 240px; height: 90px; padding: 8px; object-fit: contain; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.signatory-signature-thumb { width: 110px; height: 40px; object-fit: contain; border-radius: var(--radius-sm); background: #fff; }
.request-types-table td .cell-sub { display: block; }

.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.detail-layout > aside { display: grid; gap: 20px; position: sticky; top: 80px; }
.public-body .detail-layout { grid-template-columns: minmax(0, 1fr) 280px; }
.employee-ticket-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.employee-ticket-title h2 { margin-top: 4px; font-size: 20px; }
.ticket-detail-block { margin-top: 18px; }
.ticket-detail-block > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.ticket-detail-block p { color: var(--text); line-height: 1.65; white-space: normal; }
.meta-list { display: grid; gap: 0; margin: 0; }
.meta-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.meta-list > div:last-child { border-bottom: 0; }
.meta-list dt { color: var(--muted); }
.meta-list dd { margin: 0; color: var(--text); font-weight: 600; text-align: right; }
.panel { padding: 20px; }
.panel > h3 { margin-bottom: 12px; font-size: 14px; }
.ticket-response-block { margin-top: 24px; padding: 18px; border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent); border-left: 4px solid var(--primary); border-radius: var(--radius); background: var(--primary-soft); }
.ticket-response-block h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 14px; }
.ticket-response-block h3 i { color: var(--primary); }
.ticket-response-block p { color: var(--text); }
.ticket-response-block.is-empty { border-color: var(--border); border-left-color: var(--border-strong); background: var(--surface-2); }
.ticket-response-block.is-empty p { color: var(--muted); }
.ticket-updated { margin-top: 16px; color: var(--muted); font-size: 12.5px; }
.support-admin-card form > label { margin-top: 16px; }
.support-admin-card .ticket-reply-form { margin-top: 24px; padding-bottom: 0; border-top: 1px solid var(--border); }

.profile-assets { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 8px; }
.profile-asset-card { padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.profile-asset-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.profile-asset-heading span:first-child { display: block; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.profile-asset-heading h2 { font-size: 15px; margin-top: 2px; }
.asset-optional { padding: 2px 8px; border-radius: 999px; background: var(--neutral-soft); color: var(--muted); font-size: 11.5px; font-weight: 600; }
.profile-asset-body { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; align-items: center; }
.profile-asset-preview img, .profile-asset-preview .media-placeholder { width: 120px; height: 120px; padding: 6px; object-fit: contain; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.profile-asset-preview .media-placeholder { background: var(--surface); }
.photo-preview img { object-fit: cover; padding: 0; }
.record-type-note { display: inline-flex; align-items: center; gap: 8px; margin: 20px 0 4px; color: var(--muted); font-size: 13px; }
.record-final-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 8px; padding-top: 20px; border-top: 1px solid var(--border); }
.record-delete-form { margin: 0 auto 0 0; order: -1; }

/* ---------- Request types / settings ---------- */
.request-types-layout { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 20px; align-items: start; }
.request-types-layout > * { margin-top: 0 !important; }
.request-type-form-card form { display: grid; gap: 14px; }
.request-type-form-card .form-actions { margin-top: 6px; }
.request-type-check { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); font-weight: 500; color: var(--text); cursor: pointer; }
.request-type-hint { color: var(--muted); font-size: 12.5px; margin-top: -6px; }
.settings-card { max-width: 820px; }
.settings-company-field { margin-bottom: 20px; }
.settings-logo-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: center; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.settings-logo-row > div { display: grid; gap: 4px; }
.settings-logo-row strong { color: var(--text); }
.settings-logo-row > div small { color: var(--muted); font-size: 12.5px; }
.settings-logo-preview { width: 96px; height: 96px; margin-top: 10px; padding: 8px; object-fit: contain; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.settings-logo-preview.brand-monogram { display: grid; padding: 0; font-size: 28px; }
.empty-row-action { margin-top: 14px; }
.profile-password-section { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--border); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .dashboard-grid, .detail-layout, .public-body .detail-layout { grid-template-columns: minmax(0, 1fr); }
  .detail-layout > aside { position: static; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .request-types-layout { grid-template-columns: minmax(0, 1fr); }
  .admin-content .id-form-layout { grid-template-columns: minmax(0, 1fr); }
  .admin-content .id-preview { position: static; order: -1; width: 100%; max-width: 280px; margin: 0 auto; }
}
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: minmax(0, 1fr); }
  .admin-sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar-w); transform: translateX(-100%); visibility: hidden; transition: transform .2s ease, visibility .2s; }
  .admin-sidebar.is-open { transform: none; visibility: visible; box-shadow: var(--shadow-lg); }
  .sidebar-toggle { display: inline-grid; }
  .admin-topbar { padding: 0 16px; }
  .admin-content { padding: 22px 16px 32px; }
  .auth-shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .auth-aside { padding: 24px; gap: 0; }
  .auth-aside-copy, .auth-aside-foot, .auth-aside::after { display: none; }
  .profile-assets { grid-template-columns: minmax(0, 1fr); }
  .id-form-layout { grid-template-columns: minmax(0, 1fr); }
  .id-preview { position: static; order: -1; width: 100%; max-width: 260px; margin: 0 auto; }
}
@media (max-width: 640px) {
  body { font-size: 14px; }
  .topbar-inner { padding: 0 16px; height: 60px; }
  .brand-copy { max-width: 170px; }
  .employee-portal-nav span, .top-link span, .user-chip.compact { display: none; }
  .page-shell { padding: 24px 16px 36px; }
  .page-heading h1 { font-size: 22px; }
  .form-card, .login-card { padding: 20px; }
  .name-grid { grid-template-columns: minmax(0, 1fr); }
  .span-two { grid-column: auto; }
  .stat-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-card strong { font-size: 22px; }
  .stat-icon { display: none; }
  .form-actions > p { width: 100%; }
  .form-actions .button, .review-actions > *, .review-actions .button { flex: 1; }
  .profile-asset-body, .settings-logo-row { grid-template-columns: minmax(0, 1fr); }
  .step-track { display: none; }
  .filter-bar select { flex: 1; }
  .site-footer { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.search-field > input, .request-type-check > input { margin-top: 0; }
