:root {
  color-scheme: dark;
  --ink: #e6edf3;
  --muted: #9aa8b8;
  --line: #30363d;
  --paper: #0d1117;
  --white: #161b22;
  --navy: #e6edf3;
  --blue: #58a6ff;
  --blue-dark: #79c0ff;
  --mint: #12352f;
  --good: #3fb950;
  --warn: #d29922;
  --danger: #f85149;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.55; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--blue-dark); }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid #75c7ff; outline-offset: 2px; }

.public-header, .app-header { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px max(24px, calc((100vw - 1180px) / 2)); background: var(--navy); color: var(--white); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--white); text-decoration: none; font-size: 1.08rem; font-weight: 750; letter-spacing: -.02em; }
.brand-light { color: #8bd2ff; }
.brand-mark { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid #5aaad9; border-radius: 12px; color: #9addff; font-size: .7rem; letter-spacing: .04em; }
.header-right { display: flex; align-items: center; gap: 16px; }
.identity { display: grid; gap: 0; text-align: right; font-size: .83rem; }
.identity small { color: #b4c1cf; }
.public-main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.hero { padding: clamp(52px, 9vw, 110px) 0 64px; max-width: 850px; }
.eyebrow { margin: 0 0 12px; color: var(--blue-dark); font-size: .77rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.hero h1 { max-width: 820px; margin: 0; color: var(--navy); font-size: clamp(2.4rem, 6vw, 4.8rem); letter-spacing: -.055em; line-height: 1.04; }
.hero-copy { max-width: 750px; margin: 24px 0 28px; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.22rem); }
.intro-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.intro-card, .status-panel, .panel, .metric-card, .ticket-card, .device-card, .client-card, .login-card, .mfa-card, .detail-card { border: 1px solid var(--line); border-radius: 18px; background: var(--white); box-shadow: 0 8px 30px rgb(16 27 43 / 4%); }
.intro-card { min-height: 240px; padding: 24px; }
.card-index { color: var(--blue); font-size: .78rem; font-weight: 800; letter-spacing: .1em; }
.intro-card h2 { margin: 18px 0 9px; color: var(--navy); font-size: 1.14rem; }
.intro-card p, .status-panel p { margin: 0; color: var(--muted); font-size: .94rem; }
.status-panel { display: flex; align-items: center; justify-content: space-between; gap: 32px; margin: 28px 0; padding: 28px; }
.status-panel > div { max-width: 740px; }
.status-panel h2 { margin: 0 0 9px; color: var(--navy); font-size: 1.5rem; }
.fallback-sign-in { margin: 56px 0 44px; padding: 22px 0; border-top: 1px solid var(--line); color: var(--muted); }
.fallback-sign-in h2 { color: var(--navy); }
.site-footer { display: flex; justify-content: space-between; gap: 16px; padding: 26px max(24px, calc((100vw - 1180px) / 2)); color: #aab8c8; background: var(--navy); font-size: .82rem; }

.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 17px; border: 1px solid transparent; border-radius: 10px; text-decoration: none; font-size: .92rem; font-weight: 720; cursor: pointer; transition: transform .12s ease, background .12s ease, border-color .12s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: var(--white); background: var(--blue); }
.button-primary:hover { background: var(--blue-dark); }
.button-secondary { border-color: #b7c8d8; color: var(--ink); background: var(--white); }
.button-secondary:hover { border-color: var(--blue); color: var(--blue-dark); }
.button-quiet { color: #dbe7f1; background: transparent; border-color: #4b5d70; }
.button-danger { color: #fff; background: var(--danger); }
.button-small { min-height: 34px; padding: 6px 11px; font-size: .82rem; }
.button[disabled] { cursor: not-allowed; opacity: .48; transform: none; }

.login-layout { min-height: calc(100vh - 135px); display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(320px, .7fr); align-items: center; gap: clamp(36px, 7vw, 95px); padding: 55px 0; }
.login-copy h1 { margin: 0; color: var(--navy); font-size: clamp(2.4rem, 5vw, 4.25rem); letter-spacing: -.05em; line-height: 1.04; }
.login-copy > p:not(.eyebrow) { max-width: 680px; color: var(--muted); font-size: 1.05rem; }
.login-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 28px; }
.fact { padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.fact strong { display: block; margin-bottom: 4px; color: var(--navy); font-size: .9rem; }
.fact span { color: var(--muted); font-size: .82rem; }
.login-card, .mfa-card { padding: 25px; }
.login-card h2, .mfa-card h2 { margin: 0 0 6px; color: var(--navy); font-size: 1.45rem; }
.login-card > p, .mfa-card > p { margin: 0 0 20px; color: var(--muted); font-size: .9rem; }
.form-stack { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { color: #344458; font-size: .84rem; font-weight: 700; }
.field input, .field select, .field textarea, .search-input { width: 100%; min-height: 43px; padding: 10px 12px; border: 1px solid #c8d3df; border-radius: 9px; background: #fff; color: var(--ink); }
.field textarea { min-height: 110px; resize: vertical; }
.field-help { margin: 0; color: var(--muted); font-size: .78rem; }
.form-error, .form-success, .form-info { display: none; margin: 13px 0 0; padding: 10px 12px; border-radius: 9px; font-size: .86rem; }
.form-error.visible { display: block; color: #802d2d; background: #fff0f0; }
.form-success.visible { display: block; color: #14604d; background: #e8f7f1; }
.form-info.visible { display: block; color: #234f70; background: #e8f4fc; }
.auth-footnote { margin: 17px 0 0 !important; color: #7a8899 !important; font-size: .78rem !important; }
.secret-box { display: block; overflow-wrap: anywhere; padding: 13px; border: 1px solid #c9dbe9; border-radius: 9px; color: var(--navy); background: #f4f9fc; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .9rem; }
.backup-codes { display: grid; grid-template-columns: repeat(2,1fr); gap: 7px; margin: 13px 0; padding: 0; list-style: none; }
.backup-codes li { padding: 8px; border-radius: 7px; text-align: center; color: #11334a; background: #eff5f8; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }

.app-wrap { min-height: calc(100vh - 76px); }
.app-header { position: sticky; top: 0; z-index: 10; min-height: 70px; padding: 12px max(20px, calc((100vw - 1320px) / 2)); box-shadow: 0 5px 18px rgb(16 27 43 / 14%); }
.app-nav { display: flex; align-items: center; gap: 6px; }
.nav-button { padding: 8px 11px; border: 0; border-radius: 9px; color: #c8d5e1; background: transparent; font-size: .86rem; font-weight: 700; cursor: pointer; }
.nav-button:hover, .nav-button.active { color: #fff; background: #27374b; }
.app-main { width: min(1320px, calc(100% - 40px)); margin: 0 auto; padding: 34px 0 70px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.page-heading h1 { margin: 0; color: var(--navy); font-size: clamp(1.8rem, 4vw, 2.65rem); letter-spacing: -.04em; line-height: 1.1; }
.page-heading p { max-width: 750px; margin: 7px 0 0; color: var(--muted); }
.heading-actions { display: flex; gap: 9px; align-items: center; }
.tenant-banner { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 22px; padding: 12px 15px; border: 1px solid #beddd9; border-radius: 12px; color: #164d46; background: #e8f6f3; font-size: .87rem; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-bottom: 24px; }
.metric-card { padding: 17px 19px; }
.metric-label { color: var(--muted); font-size: .78rem; font-weight: 700; }
.metric-value { margin-top: 3px; color: var(--navy); font-size: 1.75rem; font-weight: 760; letter-spacing: -.04em; }
.metric-note { color: #7d8999; font-size: .76rem; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 23px 0 12px; }
.section-head h2 { margin: 0; color: var(--navy); font-size: 1.18rem; }
.section-head p { margin: 0; color: var(--muted); font-size: .82rem; }
.panel { padding: 21px; }
.list-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ticket-card, .device-card, .client-card { padding: 17px; }
.ticket-title-row, .device-title-row, .client-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.client-create-panel, .client-access-panel { margin: 18px 0; padding: 19px; }
.client-create-panel > .section-head, .client-access-panel > .section-head { margin-top: 0; }
.client-access-form { display: grid; grid-template-columns: minmax(220px, 1fr) 180px auto; align-items: end; gap: 12px; }
.client-card-actions { margin-top: 14px; flex-wrap: wrap; }
.client-members { display: grid; gap: 9px; margin-top: 14px; }
.client-member-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; }
.client-member-identity { display: grid; min-width: 0; }
.client-member-identity strong { color: var(--ink); font-size: .87rem; }
.client-member-identity span { overflow-wrap: anywhere; color: var(--muted); font-size: .78rem; }
.client-members-title { margin: 19px 0 0; color: var(--ink); font-size: 1rem; }
.client-invitation-section { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.client-invite-link { display: grid; gap: 10px; margin: 14px 0; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.client-invite-link input { width: 100%; min-width: 0; }
.ticket-number { color: var(--blue-dark); font-size: .78rem; font-weight: 800; letter-spacing: .05em; }
.ticket-card h3, .device-card h3, .client-card h3 { margin: 3px 0 5px; color: var(--navy); font-size: 1.02rem; }
.ticket-card p, .device-card p, .client-card p { margin: 0; color: var(--muted); font-size: .83rem; }
.ticket-meta, .device-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.pill { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 99px; color: #47596e; background: #edf1f5; font-size: .72rem; font-weight: 700; }
.pill-good { color: #0c684d; background: #ddf5e9; }
.pill-warn { color: #775006; background: #fff1ce; }
.pill-bad { color: #892f2f; background: #ffe5e5; }
.search-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0; }
.search-input { max-width: 420px; background-color: var(--white); }
.device-filter-row { display: grid; grid-template-columns: minmax(240px, 1.6fr) repeat(2, minmax(170px, 1fr)); gap: 12px; margin: 16px 0 8px; }
.device-filter-field { min-width: 0; }
.device-filter-field .search-input { max-width: none; }
.device-filter-select { width: 100%; min-height: 43px; padding: 10px 12px; border: 1px solid #c8d3df; border-radius: 9px; color: var(--ink); background: #fff; }
.device-results-summary { margin: 0 0 12px; }
.empty-state { padding: 38px 20px; border: 1px dashed #b9c6d3; border-radius: 14px; color: var(--muted); text-align: center; background: #fff; }
.empty-state strong { display: block; margin-bottom: 4px; color: var(--navy); }
.callout { margin: 16px 0; padding: 13px 15px; border-left: 3px solid #e2ad37; border-radius: 0 9px 9px 0; color: #664b13; background: #fff8e7; font-size: .84rem; }
.callout-blue { border-left-color: var(--blue); color: #31516b; background: #eef7fc; }
.ticket-detail-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(270px, .8fr); gap: 16px; }
.detail-card { padding: 20px; }
.detail-card h2, .detail-card h3 { margin: 0 0 9px; color: var(--navy); }
.ticket-desc { white-space: pre-wrap; color: #4c5c6e; }
.comment-list { display: grid; gap: 11px; margin: 17px 0; }
.comment { padding: 13px; border: 1px solid #e1e7ed; border-radius: 11px; background: #f9fbfc; }
.comment.internal { border-color: #f0d9a5; background: #fff9e8; }
.comment-top { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 7px; color: #718096; font-size: .73rem; }
.comment-body { white-space: pre-wrap; overflow-wrap: anywhere; color: #334357; font-size: .9rem; }
.form-inline { display: grid; gap: 10px; }
.checkbox-row { display: flex; align-items: flex-start; gap: 9px; color: #596b7e; font-size: .82rem; }
.checkbox-row input { margin-top: 4px; accent-color: var(--blue); }
.ticket-side-list { display: grid; gap: 9px; color: var(--muted); font-size: .84rem; }
.ticket-side-list strong { color: var(--ink); }
.terminal-panel { display: none; position: fixed; inset: 0; z-index: 30; align-items: center; justify-content: center; padding: 18px; background: rgb(7 15 25 / 72%); }
.terminal-panel.visible { display: flex; }
.terminal-window { width: min(1050px, 100%); max-height: min(760px, 94vh); display: flex; flex-direction: column; overflow: hidden; border: 1px solid #33475b; border-radius: 16px; color: #e5eef6; background: #111a24; box-shadow: 0 24px 90px rgb(0 0 0 / 40%); }
.terminal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 16px; border-bottom: 1px solid #344657; }
.terminal-head strong { display: block; color: #fff; font-size: .9rem; }
.terminal-head small { color: #aebdcb; }
.terminal-policy { padding: 10px 15px; color: #f6d98b; background: #27301e; font-size: .8rem; }
.terminal-output { min-height: 220px; max-height: 52vh; overflow: auto; margin: 0; padding: 17px; color: #d7e7d4; background: #0b1118; font: .84rem/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.terminal-input-row { display: flex; gap: 9px; padding: 13px; border-top: 1px solid #344657; }
.terminal-input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid #50667c; border-radius: 8px; color: #fff; background: #1b2835; font: .85rem ui-monospace, SFMono-Regular, Consolas, monospace; }
.terminal-foot { padding: 0 15px 13px; color: #9eafbd; font-size: .73rem; }
.modal-backdrop { display: none; position: fixed; inset: 0; z-index: 20; align-items: center; justify-content: center; padding: 18px; background: rgb(7 15 25 / 64%); }
.modal-backdrop.visible { display: flex; }
.modal { width: min(520px, 100%); padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 20px 70px rgb(0 0 0 / 25%); }
.modal h2 { margin: 0 0 7px; color: var(--navy); }
.modal p { color: var(--muted); font-size: .9rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 15px; }
.loading { color: var(--muted); }

/* CitadelFrame shared visual language: charcoal surfaces, quiet borders, blue and green marks. */
body { color: var(--ink); background: radial-gradient(ellipse at 52% -18%, rgb(37 78 116 / 20%), transparent 55%), var(--paper); }
.public-header, .app-header {
  position: sticky; top: 0; z-index: 100; min-height: 60px;
  padding: 10px max(24px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--line); background: rgb(13 17 23 / 94%);
  color: var(--ink); box-shadow: none; backdrop-filter: blur(16px);
}
.brand { color: var(--ink); }
.brand-mark { width: 26px; height: 26px; border: 0; border-radius: 0; color: var(--blue); stroke: var(--blue); stroke-width: 1.8; letter-spacing: 0; }
.brand-mark-check { stroke: var(--good); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.brand-light { color: var(--blue); }
.public-main { min-height: calc(100vh - 128px); }
.hero { padding: clamp(48px, 7vw, 86px) 0 46px; max-width: 860px; }
.eyebrow { color: var(--blue); letter-spacing: .14em; }
.hero h1, .login-copy h1 { color: var(--ink); font-size: clamp(2.15rem, 4.8vw, 3.65rem); letter-spacing: -.045em; line-height: 1.08; }
.hero-copy, .login-copy > p:not(.eyebrow) { color: var(--muted); }
.intro-card, .status-panel, .panel, .metric-card, .ticket-card, .device-card, .client-card, .login-card, .mfa-card, .detail-card {
  border-color: var(--line); border-radius: 12px; background: var(--white); box-shadow: none;
}
.intro-card { min-height: 190px; padding: 21px; }
.intro-card h2, .status-panel h2, .fact strong, .login-card h2, .mfa-card h2, .page-heading h1, .page-heading h2, .section-head h2,
.ticket-card h3, .device-card h3, .client-card h3, .detail-card h2, .detail-card h3, .metric-value { color: var(--ink); }
.intro-card p, .status-panel p, .fact span, .login-card > p, .mfa-card > p, .page-heading p, .ticket-card p, .device-card p, .client-card p { color: var(--muted); }
.fact { border-color: var(--line); border-radius: 10px; background: var(--white); }
.login-card, .mfa-card { padding: 24px; }
.field label { color: #c8d3df; }
.field input, .field select, .field textarea, .search-input { border-color: #3d4854; border-radius: 8px; color: var(--ink); background: #0d1117; }
.device-filter-select { border-color: #3d4854; border-radius: 8px; color: var(--ink); background: #0d1117; }
.field input::placeholder, .field textarea::placeholder, .search-input::placeholder { color: #7f8b99; }
.button-primary { color: #07111d; background: var(--blue); }
.button-primary:hover { color: #07111d; background: #79c0ff; }
.button-secondary { border-color: #465363; color: var(--ink); background: #1c2128; }
.button-secondary:hover { border-color: var(--blue); color: var(--ink); background: #202a35; }
.button-quiet { border-color: #3d4854; color: #c8d3df; }
.button-quiet:hover { border-color: var(--blue); color: var(--ink); background: rgb(88 166 255 / 9%); }
.pill { border: 1px solid #303d4b; color: #c5d1dd; background: #161b22; }
.tenant-banner { border-color: #245246; color: #b6f0d5; background: #10271f; }
.empty-state { border-color: #394553; color: var(--muted); background: #111820; }
.empty-state strong { color: var(--ink); }
.callout { border-left-color: var(--warn); color: #f2d994; background: #292416; }
.callout-blue { border-left-color: var(--blue); color: #c8e2fc; background: #132536; }
.comment { border-color: var(--line); background: #111820; }
.comment.internal { border-color: #5a4822; background: #211d13; }
.comment-body { color: #d1dbe5; }
.form-error.visible { color: #ffb3ac; background: #321b1b; }
.form-success.visible { color: #a6edc3; background: #11281e; }
.form-info.visible { color: #bee2ff; background: #132536; }
.secret-box { border-color: #334558; color: var(--ink); background: #111a24; }
.backup-codes li { color: var(--ink); background: #1c2732; }
.modal { border-color: var(--line); background: #161b22; }
.modal h2 { color: var(--ink); }
.terminal-window { border-color: var(--line); border-radius: 12px; }
.site-footer { border-top: 1px solid var(--line); background: #0b1017; }
.site-footer span:first-child { color: var(--ink); font-weight: 750; }
.site-footer span:last-child { color: var(--muted); }

.suite-products { position: relative; flex: 0 0 auto; }
.suite-products > summary { display: flex; min-height: 40px; align-items: center; gap: 7px; color: #c5d0dd; cursor: pointer; font-size: .92rem; font-weight: 600; list-style: none; }
.suite-products > summary::-webkit-details-marker { display: none; }
.suite-products > summary::after { content: "▾"; color: var(--blue); font-size: .75rem; }
.suite-products > summary:hover, .suite-products[open] > summary { color: #fff; }
.suite-products-panel { position: absolute; top: calc(100% + 12px); left: 0; z-index: 200; display: none; width: min(330px, calc(100vw - 28px)); padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: #161b22; box-shadow: 0 16px 42px rgb(0 0 0 / 42%); }
.suite-products[open] > .suite-products-panel { display: grid; }
.suite-products-panel a { display: block; padding: 11px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.suite-products-panel a:hover { color: #fff; background: rgb(88 166 255 / 10%); }
.suite-products-panel strong { display: block; color: inherit; font-size: .9rem; }
.suite-products-panel small { display: block; margin-top: 2px; color: var(--muted); font-size: .78rem; }
.suite-products-panel .suite-products-more { margin-top: 4px; border-top: 1px solid var(--line); color: var(--blue); font-size: .82rem; }
.app-nav { margin-left: auto; }
.threat-metrics { margin: 18px 0 28px; }
.threat-review-list, .threat-job-list { display: grid; gap: 12px; margin: 14px 0 30px; }
.threat-review-card { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.threat-review-title { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.threat-review-title h3 { margin: 0; color: var(--ink); }
.threat-review-card > p { color: var(--muted); }
.threat-hash { overflow-wrap: anywhere; }
.threat-hash code { color: var(--ink); font-size: .82rem; }
.threat-evidence { margin-top: 12px; color: var(--ink); }
.threat-evidence summary { cursor: pointer; font-weight: 650; }
.threat-evidence ul { display: flex; flex-wrap: wrap; gap: 7px; padding-left: 18px; }
.threat-evidence li { overflow-wrap: anywhere; }
.threat-review-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.threat-job-row { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(110px, auto) minmax(180px, 1.4fr); align-items: center; gap: 10px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }
.threat-job-row strong { color: var(--ink); }
.threat-job-row span, .threat-job-row small { color: var(--muted); }
.threat-review-modal { width: min(620px, 100%); }

@media (max-width: 620px) {
  .public-header, .app-header { min-height: 58px; padding: 10px 16px; flex-wrap: wrap; }
  .public-header .suite-products { order: 3; flex-basis: 100%; }
  .public-header .suite-products > summary { min-height: 42px; }
  .app-header .suite-products { order: 2; margin-left: auto; }
  .suite-products-panel { left: auto; right: 0; }
  .app-nav { margin-left: 0; }
}

@media (max-width: 820px) {
  .intro-grid { grid-template-columns: 1fr; }
  .intro-card { min-height: auto; }
  .login-layout { grid-template-columns: 1fr; align-items: start; }
  .login-copy { max-width: 700px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .ticket-detail-grid { grid-template-columns: 1fr; }
  .threat-job-row { grid-template-columns: 1fr; gap: 5px; }
  .status-panel { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 620px) {
  .public-header, .app-header { padding-left: 16px; padding-right: 16px; }
  .public-main, .app-main { width: calc(100% - 28px); }
  .app-header { flex-wrap: wrap; }
  .app-nav { order: 3; width: 100%; overflow-x: auto; }
  .nav-button { flex: 0 0 auto; }
  .identity { display: none; }
  .header-right { margin-left: auto; }
  .metric-grid { gap: 8px; }
  .metric-card { padding: 13px; }
  .list-grid { grid-template-columns: 1fr; }
  .client-access-form { grid-template-columns: 1fr; }
  .client-member-row { grid-template-columns: minmax(0, 1fr) auto; }
  .client-member-row > .button-danger { grid-column: 1 / -1; justify-self: start; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .heading-actions { flex-wrap: wrap; }
  .search-row { align-items: stretch; flex-direction: column; }
  .search-input { max-width: none; }
  .device-filter-row { grid-template-columns: 1fr; }
  .site-footer { align-items: flex-start; flex-direction: column; }
  .login-facts { grid-template-columns: 1fr; }
  .terminal-panel { padding: 8px; }
  .terminal-window { max-height: 96vh; }
  .terminal-output { max-height: 47vh; }
  .terminal-input-row { flex-wrap: wrap; }
}
