:root {
  color-scheme: light;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  color: #202427;
  background: #f3f4f6;
  --font-sans: "Inter", "Segoe UI", Arial, sans-serif;
  --font-display: "Poppins", "Inter", "Segoe UI", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
  --text-xs: 11px;
  --text-sm: 12px;
  --text-base: 13px;
  --text-body: 14px;
  --space-panel: 16px;
  --radius-panel: 12px;
  --control-height: 38px;
  --ink: #202427;
  --ink-strong: #111416;
  --muted: #697177;
  --muted-light: #949ca1;
  --line: #dfe2e5;
  --line-strong: #cfd3d7;
  --surface: #ffffff;
  --surface-muted: #f7f8f9;
  --canvas: #f3f4f6;
  --brand: #bd2027;
  --brand-dark: #79151a;
  --brand-deep: #4f0e12;
  --brand-soft: #fbecee;
  --green: #18734f;
  --green-soft: #e7f5ee;
  --blue: #286287;
  --blue-soft: #eaf3f8;
  --amber: #916114;
  --amber-soft: #fff3d6;
  --red: #b4232b;
  --red-soft: #fbe9eb;
  --shadow-sm: 0 1px 2px #14191d0a, 0 6px 20px #14191d08;
  --shadow-lg: 0 22px 70px #1b101229;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; min-width: 320px; overflow-x: hidden; background: var(--canvas); color: var(--ink); font-size: var(--text-body); line-height: 1.5; }
body, button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #d96d726b;
  outline-offset: 2px;
}
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 9px 12px; border-radius: 7px; color: #fff; background: var(--brand-deep); font-weight: 700; text-decoration: none; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 264px minmax(0, 1fr); }
.mobile-topbar, .mobile-nav-backdrop, .mobile-nav-close { display: none; }
.sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 18px 16px 16px;
  color: #fff;
  background:
    radial-gradient(circle at 12% 6%, #cf3037 0, transparent 30%),
    linear-gradient(165deg, #8f181e 0%, var(--brand-dark) 48%, var(--brand-deep) 100%);
  border-right: 1px solid #4d1115;
  box-shadow: 8px 0 30px #3510141a;
}
.sidebar-top { position: relative; z-index: 1; }
.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .17;
  background-image: linear-gradient(#ffffff12 1px, transparent 1px), linear-gradient(90deg, #ffffff12 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, #000, transparent 70%);
}
.brand { position: relative; z-index: 1; display: flex; align-items: center; min-width: 0; text-decoration: none; }
.sidebar .brand { min-height: 76px; padding: 11px 12px; border: 1px solid #ffffff21; border-radius: 14px; background: #3d0e123d; box-shadow: inset 0 1px #ffffff14; }
.brand-logo { display: block; width: 100%; max-width: 210px; height: auto; }
.brand-logo-light { width: auto; max-width: 100%; max-height: 62px; }

.sidebar nav { position: relative; z-index: 1; display: grid; gap: 4px; margin-top: 25px; }
.nav-label { margin: 0 10px 8px; color: #e7b8bb; font-size: var(--text-xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.sidebar nav a { position: relative; min-height: 46px; display: flex; align-items: center; gap: 11px; padding: 5px 10px; border: 1px solid transparent; border-radius: 10px; color: #f1dfe0; text-decoration: none; font-size: 13px; font-weight: 600; transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease; }
.sidebar nav a:hover { color: #fff; background: #ffffff10; border-color: #ffffff12; }
.sidebar nav a.active { color: #fff; background: #ffffff17; border-color: #ffffff24; box-shadow: inset 3px 0 #fff, 0 8px 20px #39090d24; }
.sidebar nav a.active::after { content: ""; position: absolute; right: -17px; width: 4px; height: 26px; border-radius: 4px 0 0 4px; background: #fff; }
.nav-icon { width: 31px; height: 31px; flex: 0 0 31px; display: grid; place-items: center; border-radius: 8px; background: #ffffff0d; }
.nav-icon svg, .session-chip-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sidebar nav a.active .nav-icon { background: #fff; color: var(--brand-dark); }

.identity { position: relative; z-index: 1; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; align-items: center; margin-top: auto; padding: 15px 8px 0; border-top: 1px solid #ffffff1f; min-width: 0; }
.identity-avatar { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid #ffffff26; border-radius: 10px; background: #ffffff12; color: #fff; font-family: var(--font-display); font-weight: 700; }
.identity-copy { min-width: 0; }
.identity strong, .identity span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.identity strong { font-size: var(--text-sm); }
.identity span { margin-top: 3px; color: #e6c4c6; font-size: var(--text-xs); }
.identity .button { grid-column: 1 / -1; margin-top: 3px; }

.workspace { min-width: 0; background: var(--canvas); }
.page-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 84px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 14px 28px;
  border-bottom: 1px solid #dfe2e5d9;
  background: #f8f9fadb;
  backdrop-filter: blur(18px);
}
.page-heading { min-width: 0; }
.page-header h1 { margin: 4px 0 0; color: var(--ink-strong); font-family: var(--font-display); font-size: clamp(23px, 2.1vw, 30px); font-weight: 600; line-height: 1.08; letter-spacing: -.035em; }
.eyebrow { display: flex; align-items: center; gap: 7px; margin: 0; color: var(--brand); font-size: var(--text-xs); font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.status-dot { width: 7px; height: 7px; display: inline-block; flex: 0 0 7px; border-radius: 50%; background: #36a66f; box-shadow: 0 0 0 4px #36a66f1f; }
.page-context { margin: 5px 0 0; color: var(--muted); font-size: var(--text-sm); }
.command-tools { display: flex; justify-content: flex-end; align-items: center; gap: 14px; }
.session-chip { min-height: 48px; display: flex; align-items: center; gap: 10px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: var(--shadow-sm); }
.session-chip-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 8px; background: var(--brand-soft); color: var(--brand); }
.session-chip strong, .session-chip small { display: block; white-space: nowrap; }
.session-chip strong { color: var(--ink); font-size: var(--text-sm); }
.session-chip small { margin-top: 2px; color: var(--muted); font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: .04em; }
.header-actions:empty { display: none; }
.workspace-content { width: 100%; max-width: 1760px; margin-inline: auto; padding: 20px 28px 40px; }

.workspace-section { width: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--surface); box-shadow: var(--shadow-sm); }
.workspace-section + .workspace-section { margin-top: var(--space-panel); }
.section-heading { min-height: 50px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 16px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #fff, #fbfbfc); }
.section-heading h2, .section-heading h3 { margin: 0; color: var(--ink-strong); font-family: var(--font-display); font-size: 15px; font-weight: 600; }
.section-heading .eyebrow { margin-bottom: 2px; font-size: var(--text-xs); }
.section-heading span { color: var(--muted); font-family: var(--font-mono); font-size: var(--text-xs); }

.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-bottom: 18px; }
.metric { position: relative; min-width: 0; min-height: 102px; overflow: hidden; padding: 15px 17px; border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--surface); box-shadow: var(--shadow-sm); }
.metric::after { content: ""; position: absolute; right: -20px; bottom: -25px; width: 78px; height: 78px; border: 15px solid #eef0f2; border-radius: 50%; opacity: .75; }
.metric span { position: relative; z-index: 1; color: var(--muted); font-size: var(--text-xs); font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.metric strong { position: relative; z-index: 1; display: block; margin-top: 14px; color: var(--ink-strong); font-family: var(--font-display); font-size: 30px; font-weight: 600; line-height: 1; letter-spacing: -.04em; }
.metric.critical { border-color: #e9c8cb; }
.metric.critical strong { color: var(--red); }
.metric.warning { border-color: #eadbbd; }
.metric.warning strong { color: var(--amber); }
.status-strip { min-height: 92px; display: flex; flex-wrap: wrap; align-content: center; gap: 8px; padding: 18px; }

.table-wrap { width: 100%; overflow: auto; }
table { width: 100%; min-width: 720px; border-collapse: separate; border-spacing: 0; color: #2f3438; font-size: var(--text-base); font-variant-numeric: tabular-nums; }
th { position: sticky; top: 0; z-index: 1; height: 38px; background: #f5f6f7; color: #5e666c; text-align: left; font-size: var(--text-xs); letter-spacing: .07em; text-transform: uppercase; font-weight: 700; }
th, td { padding: 8px 12px; border-bottom: 1px solid #e8eaec; vertical-align: middle; }
td { min-height: 40px; height: 40px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s ease, box-shadow .12s ease; }
tbody tr:hover { background: #f8f9fa; box-shadow: inset 3px 0 var(--brand); }
.empty { color: var(--muted); text-align: center; padding: 38px; }
.mono { color: #2c3338; font-family: var(--font-mono); font-size: var(--text-sm); font-weight: 600; letter-spacing: .01em; }

.badge { min-height: 24px; max-width: 100%; display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border: 1px solid transparent; border-radius: 6px; font-size: var(--text-xs); font-weight: 700; letter-spacing: .035em; line-height: 1.25; text-transform: uppercase; white-space: normal; }
.badge::before { content: ""; width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px currentColor; opacity: .75; }
.badge.online, .badge.active, .badge.up-to-date { color: var(--green); background: var(--green-soft); border-color: #c7e7d8; }
.badge.offline, .badge.required, .badge.revoked, .badge.disabled { color: var(--red); background: var(--red-soft); border-color: #edc9cd; }
.badge.pending, .badge.due-soon, .badge.suspended { color: var(--amber); background: var(--amber-soft); border-color: #ead7ab; }
.badge.never-seen { color: var(--blue); background: var(--blue-soft); border-color: #c9e0ec; }

.button { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 8px; padding: 7px 13px; cursor: pointer; font-size: var(--text-sm); font-weight: 700; letter-spacing: .01em; text-decoration: none; transition: transform .14s ease, background .14s ease, border-color .14s ease, box-shadow .14s ease; }
.button.primary { background: var(--brand); color: #fff; box-shadow: 0 7px 18px #a51b2230; }
.button.primary:hover { background: #a91c22; transform: translateY(-1px); }
.button.secondary { background: #fff; color: var(--ink); border-color: var(--line-strong); box-shadow: 0 1px 2px #14191d0a; }
.button.secondary:hover { border-color: #aeb4b9; background: #fafafa; }
.button.danger { background: #851a20; color: #fff; }
.button.danger:hover { background: #6f151a; border-color: var(--brand-deep); transform: translateY(-1px); }
.button.maintenance-complete { background: var(--brand); color: #fff; box-shadow: 0 7px 18px #a51b2230; }
.button.maintenance-complete:hover { background: var(--brand-dark); border-color: var(--brand-deep); box-shadow: 0 9px 20px #79151a40; transform: translateY(-1px); }
.button.quiet { width: 100%; min-height: 33px; color: #f2dfe0; background: #ffffff09; border-color: #ffffff24; }
.button.quiet:hover { background: #ffffff14; }
.button.wide { width: 100%; }
.button:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.row-actions .button { min-height: 34px; padding: 6px 10px; font-size: var(--text-xs); }
.audit-details summary { cursor: pointer; color: var(--brand-dark); font-weight: 700; }
.audit-details pre { max-width: 360px; margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 11px/1.45 var(--font-mono); }

label { display: grid; gap: 6px; color: #4b5257; font-size: var(--text-sm); font-weight: 700; letter-spacing: .005em; }
input, select, textarea { width: 100%; min-height: var(--control-height); border: 1px solid var(--line-strong); border-radius: 8px; padding: 7px 10px; background: #fff; color: var(--ink); font-size: var(--text-base); box-shadow: inset 0 1px 2px #11182008; }
select[multiple] { padding: 5px; }
textarea { resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: #abb1b6; }
input:focus, select:focus, textarea:focus { outline: 3px solid #d96d7233; border-color: var(--brand); }
input:disabled, select:disabled, textarea:disabled { opacity: 1; color: #50585e; background: var(--surface-muted); cursor: not-allowed; }
input[readonly], textarea[readonly] { color: #3a4247; background: var(--surface-muted); border-color: var(--line); }
dialog { width: min(480px, calc(100vw - 28px)); border: 1px solid #ffffff45; border-radius: 14px; padding: 22px; background: #fff; box-shadow: var(--shadow-lg); }
dialog::backdrop { background: #181113b8; backdrop-filter: blur(4px); }
dialog form { display: grid; gap: 16px; }
dialog h2 { margin: 0 0 3px; color: var(--ink-strong); font-family: var(--font-display); font-size: 20px; font-weight: 600; letter-spacing: -.025em; }
dialog p { font-size: var(--text-base); line-height: 1.55; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 5px; padding-top: 15px; border-top: 1px solid var(--line); }
.form-feedback { margin: 0; padding: 9px 10px; border: 1px solid #e8bec2; border-radius: 7px; color: var(--red); background: var(--red-soft); font-size: var(--text-sm); font-weight: 600; }
[aria-busy="true"] { cursor: wait; }

dialog.technical-dialog { width: min(760px, calc(100vw - 28px)); max-height: calc(100vh - 32px); overflow-y: auto; }
.technical-dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.technical-dialog-heading .eyebrow { margin-bottom: 6px; }
.technical-dialog-close { width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 8px; padding: 0; background: #fff; color: var(--ink); cursor: pointer; }
.technical-dialog-close:hover { border-color: #aeb4b9; background: #fafafa; }
.technical-dialog-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.technical-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; }
.technical-section { min-width: 0; padding-top: 14px; border-top: 1px solid var(--line); }
.technical-section h3 { margin: 0 0 11px; color: var(--brand-dark); font-size: var(--text-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.technical-fields { display: grid; gap: 9px; margin: 0; }
.technical-fields > div { min-width: 0; display: grid; grid-template-columns: minmax(108px, .75fr) minmax(0, 1.25fr); gap: 12px; }
.technical-fields dt { color: var(--muted); font-size: var(--text-xs); font-weight: 600; }
.technical-fields dd { min-width: 0; margin: 0; overflow-wrap: anywhere; color: var(--ink); font-size: var(--text-sm); }

.notice { margin-bottom: 16px; border: 1px solid #bcdccc; border-radius: 9px; padding: 11px 13px; background: var(--green-soft); color: var(--green); font-size: 12px; font-weight: 600; }
.notice.error { color: var(--red); border-color: #e8bec2; background: var(--red-soft); }

.login-page { min-height: 100vh; background: #eeeef0; }
.login-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, .9fr) minmax(480px, 1.1fr); }
.login-hero { position: relative; display: flex; flex-direction: column; overflow: hidden; padding: clamp(28px, 5vw, 66px); color: #fff; background: radial-gradient(circle at 20% 12%, #d83c42 0, transparent 31%), linear-gradient(145deg, #92181e, #571014 68%, #39090c); }
.login-hero::before { content: ""; position: absolute; inset: 0; opacity: .18; background-image: linear-gradient(#ffffff17 1px, transparent 1px), linear-gradient(90deg, #ffffff17 1px, transparent 1px); background-size: 44px 44px; mask-image: linear-gradient(140deg, #000, transparent 75%); }
.login-hero::after { content: ""; position: absolute; right: -130px; bottom: -150px; width: 430px; height: 430px; border: 75px solid #ffffff0c; border-radius: 50%; }
.login-brand { z-index: 1; width: fit-content; }
.login-brand .brand-logo { max-width: 280px; }
.login-hero-copy { position: relative; z-index: 1; max-width: 560px; margin: auto 0; }
.login-kicker { margin: 0 0 18px; color: #f4c9cb; font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 700; letter-spacing: .15em; }
.login-hero-copy h1 { margin: 0; font-family: var(--font-display); font-size: clamp(35px, 4.3vw, 64px); font-weight: 600; line-height: .98; letter-spacing: -.055em; }
.login-hero-copy p:last-child { max-width: 480px; margin: 24px 0 0; color: #f0d7d8; font-size: 14px; line-height: 1.7; }
.login-security { position: relative; z-index: 1; display: flex; align-items: center; gap: 9px; color: #ecd3d5; font-size: 11px; }
.login-main { display: grid; place-items: center; padding: 34px; background: radial-gradient(circle at 85% 8%, #fff 0, transparent 26%), #f2f3f5; }
.login-panel { width: min(430px, 100%); padding: 38px; border: 1px solid var(--line); border-radius: 17px; background: #fff; box-shadow: 0 25px 70px #25282d17; }
.login-panel h2 { margin: 8px 0 0; color: var(--ink-strong); font-family: var(--font-display); font-size: 29px; font-weight: 600; letter-spacing: -.04em; }
.login-intro { margin: 9px 0 26px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.login-panel form { display: grid; gap: 16px; }
.login-panel .notice { margin-top: 18px; }
.login-footnote { margin: 25px 0 0; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-family: var(--font-mono); font-size: var(--text-xs); line-height: 1.5; text-align: center; }
.error-main { min-height: 100vh; }
.error-panel { display: grid; gap: 14px; }
.error-brand { width: fit-content; margin-bottom: 10px; }
.error-brand .brand-logo { width: auto; max-width: 180px; max-height: 70px; }
.error-panel h1 { margin: 0; color: var(--ink-strong); font-family: var(--font-display); font-size: 26px; line-height: 1.2; letter-spacing: -.03em; }
.error-panel p[role="alert"] { margin: 0; color: var(--muted); line-height: 1.65; }

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 226px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .page-header, .workspace-content { padding-left: 24px; padding-right: 24px; }
  .session-chip { display: none; }
}

@media (max-width: 1023px) {
  .app-shell { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .mobile-topbar {
    position: sticky;
    top: 0;
    z-index: 45;
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 14px;
    color: #fff;
    background: linear-gradient(120deg, var(--brand-dark), var(--brand-deep));
    border-bottom: 1px solid #4d1115;
    box-shadow: 0 5px 20px #35101424;
  }
  .mobile-brand { min-width: 0; }
  .mobile-brand .brand-logo { width: auto; max-width: min(190px, 62vw); max-height: 44px; }
  .mobile-menu-button, .mobile-nav-close {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: grid;
    place-items: center;
    border: 1px solid #ffffff29;
    border-radius: 8px;
    padding: 0;
    color: #fff;
    background: #ffffff10;
    cursor: pointer;
  }
  .mobile-menu-button:hover, .mobile-nav-close:hover { background: #ffffff1c; }
  .mobile-menu-button svg, .mobile-nav-close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
  .mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    width: 100%;
    height: 100%;
    border: 0;
    padding: 0;
    background: #181113a8;
    backdrop-filter: blur(2px);
  }
  body.mobile-nav-open { overflow: hidden; }
  body.mobile-nav-open .mobile-nav-backdrop { display: block; }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    width: min(328px, 88vw);
    height: 100vh;
    height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 14px 14px 16px;
    transform: translateX(-105%);
    transition: transform .2s ease;
  }
  .sidebar.mobile-open { transform: translateX(0); }
  .sidebar-top { display: flex; align-items: center; gap: 10px; }
  .sidebar-top .brand { min-width: 0; min-height: 62px; flex: 1 1 auto; padding: 8px 9px; }
  .sidebar-top .brand-logo { max-width: 190px; }
  .sidebar nav { display: grid; gap: 4px; margin-top: 18px; overflow: visible; }
  .sidebar nav a { min-height: 46px; flex: none; padding: 5px 10px; font-size: 13px; }
  .sidebar nav a.active::after { display: block; right: -15px; }
  .nav-label { display: block; }
  .identity { display: grid; }
  .page-header { top: 62px; min-height: 86px; padding-left: 20px; padding-right: 20px; }
  .workspace-content { padding-left: 20px; padding-right: 20px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .login-layout { grid-template-columns: 1fr; }
  .login-hero { min-height: 260px; padding: 28px; }
  .login-hero-copy { margin: 38px 0; }
  .login-hero-copy h1 { font-size: clamp(30px, 8vw, 48px); }
  .login-security { display: none; }
}

@media (max-width: 767px) {
  .page-header { position: relative; top: auto; min-height: 0; align-items: stretch; flex-direction: column; gap: 10px; padding: 13px 14px; }
  .page-header h1 { margin-top: 3px; font-size: 22px; line-height: 1.15; }
  .eyebrow { font-size: var(--text-xs); }
  .page-context { margin-top: 4px; font-size: 11px; }
  .command-tools, .header-actions, .row-actions { width: 100%; justify-content: stretch; }
  .header-actions .button, .header-actions > .button, .row-actions .button { flex: 1 1 auto; }
  .workspace-content { padding: 14px 10px 30px; }
  .metric-grid { grid-template-columns: 1fr; gap: 10px; }
  .metric { min-height: 88px; padding: 14px 15px; }
  .metric strong { margin-top: 10px; font-size: 27px; }
  .workspace-section { border-radius: 10px; }
  .section-heading { min-height: 50px; flex-wrap: wrap; gap: 5px 12px; padding: 10px 13px; }
  .section-heading h2 { font-size: 13px; }
  .button { min-height: 42px; }
  dialog { max-height: calc(100dvh - 20px); overflow-y: auto; padding: 18px; }
  dialog.technical-dialog { max-height: calc(100dvh - 20px); }
  dialog form, dialog label { min-width: 0; }
  dialog h2 { font-size: 18px; }
  .technical-sections { grid-template-columns: 1fr; gap: 15px; }
  .technical-diagnostic { grid-column: auto; }
  .technical-fields > div { grid-template-columns: minmax(100px, 42%) minmax(0, 1fr); }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions .button { width: 100%; }
  .login-hero { min-height: 225px; padding: 22px; }
  .login-hero-copy { margin: 25px 0 10px; }
  .login-hero-copy p:last-child { display: none; }
  .login-main { padding: 18px 12px 28px; }
  .login-panel { padding: 27px 22px; border-radius: 14px; }
}

@media (max-width: 767px), (max-width: 900px) and (max-height: 600px) {
  .table-wrap { overflow: visible; padding: 10px; }
  .table-wrap table { min-width: 0; display: block; }
  .table-wrap thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .table-wrap tbody { display: grid; gap: 10px; }
  .table-wrap tbody tr { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
  .table-wrap tbody tr:hover { background: #fff; box-shadow: inset 3px 0 var(--brand); }
  .table-wrap tbody td {
    width: 100%;
    min-height: 39px;
    height: auto;
    display: grid;
    grid-template-columns: minmax(96px, 38%) minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    overflow-wrap: anywhere;
    text-align: left;
  }
  .table-wrap tbody td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
  }
  .table-wrap tbody td:last-child { border-bottom: 0; }
  .table-wrap tbody td.empty { display: block; padding: 28px 12px; text-align: center; }
  .table-wrap tbody td.empty::before { display: none; }
  .table-wrap .row-actions { justify-content: flex-start; }
  .table-wrap .row-actions .button { min-width: min(150px, 100%); }
  .audit-details pre { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
