:root {
  color-scheme: dark;
  --bg: #080b12;
  --sidebar: #0b0f18;
  --surface: #101620;
  --surface-2: #151c28;
  --line: #222c3b;
  --line-soft: #1a2230;
  --text: #edf2f7;
  --muted: #8e9aad;
  --accent: #6d5dfc;
  --accent-2: #8b7fff;
  --cyan: #33c6d9;
  --green: #35d49a;
  --yellow: #f2b84b;
  --red: #ff5f6d;
  --radius: 14px;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 82% 0%, rgba(109,93,252,.12), transparent 30%), radial-gradient(circle at 15% 85%, rgba(51,198,217,.05), transparent 28%), var(--bg); }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .22; background-image: linear-gradient(rgba(116,130,160,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(116,130,160,.06) 1px, transparent 1px); background-size: 36px 36px; mask-image: linear-gradient(to bottom, black, transparent 78%); }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
.is-hidden { display: none !important; }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 5px; color: #7e8a9c; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 25px; letter-spacing: -.03em; }
h2 { margin-bottom: 0; font-size: 18px; letter-spacing: -.02em; }
h3 { margin-bottom: 6px; font-size: 16px; }

.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(420px, 100%); padding: 34px; border: 1px solid var(--line); border-radius: 20px; background: rgba(16,22,32,.96); box-shadow: 0 28px 90px rgba(0,0,0,.45); }
.auth-card h1 { margin-bottom: 10px; font-size: 31px; }
.auth-card > .muted { margin-bottom: 26px; line-height: 1.55; }
.auth-card .field { margin-top: 13px; }
.brand-mark { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 10px; color: #fff; font-size: 17px; font-weight: 900; background: linear-gradient(145deg, var(--accent-2), #5142de); box-shadow: 0 8px 28px rgba(109,93,252,.28); }
.brand-mark--large { width: 50px; height: 50px; margin-bottom: 22px; border-radius: 14px; font-size: 22px; }
.security-note { margin: 20px 0 0; color: #667286; font-size: 11px; line-height: 1.5; text-align: center; }
.form-error { min-height: 20px; margin: 6px 0; color: var(--red); font-size: 13px; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; display: flex; flex-direction: column; width: 230px; padding: 24px 15px; border-right: 1px solid var(--line-soft); background: rgba(11,15,24,.97); }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 28px; }
.brand strong, .brand span { display: block; }
.brand strong { font-size: 17px; }
.brand span { margin-top: 2px; color: #758195; font-size: 10px; letter-spacing: .09em; text-transform: uppercase; }
.nav { display: grid; gap: 5px; }
.nav-item { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 8px; width: 100%; padding: 11px 12px; border: 0; border-radius: 9px; color: #8995a8; background: transparent; text-align: left; cursor: pointer; transition: .18s ease; }
.nav-item:hover { color: #dce3ed; background: #111824; }
.nav-item.is-active { color: #fff; background: linear-gradient(90deg, rgba(109,93,252,.24), rgba(109,93,252,.08)); box-shadow: inset 3px 0 var(--accent); }
.nav-icon { color: #6f7b8e; font-size: 18px; text-align: center; }
.nav-item.is-active .nav-icon { color: var(--accent-2); }
.nav-count { min-width: 25px; padding: 2px 6px; border-radius: 20px; color: #bcb5ff; background: rgba(109,93,252,.16); font-size: 10px; text-align: center; }
.sidebar-footer { margin-top: auto; padding: 15px 10px 0; border-top: 1px solid var(--line-soft); }
.service-state { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; color: #788498; font-size: 11px; }
.service-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px rgba(53,212,154,.7); }

.main { min-height: 100vh; margin-left: 230px; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; height: 82px; padding: 0 30px; border-bottom: 1px solid var(--line-soft); background: rgba(8,11,18,.88); backdrop-filter: blur(16px); }
.topbar-title { display: flex; align-items: center; gap: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.project-picker { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.project-picker select { min-width: 170px; }
.menu-button { display: none; border: 0; background: transparent; font-size: 20px; }
.content { max-width: 1500px; margin: 0 auto; padding: 28px 30px 50px; }
.view { display: none; }
.view.is-active { display: block; animation: reveal .22s ease-out; }
@keyframes reveal { from { opacity: 0; transform: translateY(4px); } }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.metric-card { position: relative; overflow: hidden; min-height: 142px; padding: 19px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(21,28,40,.96), rgba(14,20,30,.96)); }
.metric-card--accent::after { content: ""; position: absolute; right: -35px; bottom: -55px; width: 130px; height: 130px; border-radius: 50%; background: rgba(109,93,252,.11); filter: blur(2px); }
.metric-label { display: flex; align-items: center; justify-content: space-between; color: #8e9aac; font-size: 12px; font-weight: 600; }
.metric-label i { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 8px; color: #9d94ff; background: rgba(109,93,252,.1); font-style: normal; }
.metric-label i.danger { color: var(--red); background: rgba(255,95,109,.1); }
.metric-label i.success { color: var(--green); background: rgba(53,212,154,.1); }
.metric-card > strong { display: block; margin: 16px 0 8px; font-size: 30px; letter-spacing: -.04em; }
.metric-card small { color: #707d91; }
.metric-card small b { color: #abb6c7; font-weight: 650; }

.overview-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 18px; margin-bottom: 18px; }
.panel { margin-bottom: 18px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(17,23,34,.94), rgba(13,19,29,.91)); box-shadow: inset 0 1px rgba(255,255,255,.018), 0 18px 50px rgba(0,0,0,.08); backdrop-filter: blur(12px); }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.panel-header--actions { flex-wrap: wrap; }
.panel-hint { color: #657186; font-size: 11px; }
.bar-chart { display: grid; gap: 14px; min-height: 178px; align-content: center; }
.bar-row { display: grid; grid-template-columns: minmax(100px, 150px) 1fr 42px; align-items: center; gap: 12px; color: #aab4c3; font-size: 12px; }
.bar-track { overflow: hidden; height: 7px; border-radius: 8px; background: #1a2230; }
.bar-value { height: 100%; min-width: 4px; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--cyan)); }
.bar-count { color: #dfe5ee; text-align: right; }
.posture-card { display: flex; flex-direction: column; }
.posture-score { display: flex; align-items: center; gap: 20px; margin: auto 0; }
.score-ring { display: grid; flex: 0 0 104px; place-content: center; width: 104px; height: 104px; border-radius: 50%; background: radial-gradient(circle at center, var(--surface) 57%, transparent 59%), conic-gradient(var(--green) var(--score, 75%), #252d3b 0); text-align: center; }
.score-ring strong { font-size: 22px; }
.score-ring span { color: #778398; font-size: 9px; text-transform: uppercase; }
.posture-score p { margin: 0; font-size: 12px; line-height: 1.5; }
.posture-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 22px; color: #758196; font-size: 10px; }
.dot { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; }
.dot--green { background: var(--green); }
.dot--red { background: var(--red); }

.field { display: grid; gap: 7px; color: #8e9aac; font-size: 11px; font-weight: 650; }
input, select, textarea { width: 100%; padding: 0 11px; border: 1px solid #2a3546; border-radius: 8px; outline: none; color: #e7ebf2; background: #0c111a; transition: .15s ease; }
input, select { height: 39px; }
textarea { padding-top: 10px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(109,93,252,.12); }
.filters { display: grid; grid-template-columns: minmax(190px, 1.5fr) repeat(3, minmax(125px, .65fr)) auto; align-items: end; gap: 10px; margin-bottom: 18px; padding: 15px; border: 1px solid var(--line-soft); border-radius: 11px; background: #0c111a; }
.filter-submit { height: 39px; }
.button, .icon-button { border: 1px solid transparent; cursor: pointer; transition: .16s ease; }
.button { min-height: 37px; padding: 0 14px; border-radius: 8px; font-size: 12px; font-weight: 700; }
.button:disabled { opacity: .4; cursor: default; }
.button--primary { background: linear-gradient(135deg, var(--accent-2), #5a49e8); box-shadow: 0 7px 20px rgba(109,93,252,.15); }
.button--primary:hover:not(:disabled) { filter: brightness(1.1); transform: translateY(-1px); }
.button--secondary { border-color: #2a3546; color: #aeb8c7; background: #121925; }
.button--secondary:hover:not(:disabled) { border-color: #3c4a60; color: #fff; }
.button--danger { border-color: rgba(255,95,109,.25); color: #ff929b; background: rgba(255,95,109,.08); }
.button--wide { width: 100%; height: 43px; }
.icon-button { display: grid; place-items: center; width: 38px; height: 38px; border-color: #283345; border-radius: 9px; color: #9ba7b9; background: #111824; font-size: 18px; }
.icon-button:hover { color: #fff; border-color: #46546a; }
.text-button { padding: 0; border: 0; color: #8f84ff; background: none; cursor: pointer; font-size: 12px; }
.text-button:hover { color: #b6afff; }

.table-wrap { overflow-x: auto; margin: 0 -6px; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th { padding: 11px 12px; border-bottom: 1px solid var(--line); color: #68758a; font-size: 10px; font-weight: 750; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
td { max-width: 360px; padding: 13px 12px; border-bottom: 1px solid var(--line-soft); color: #b4becc; font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
tbody tr { transition: .14s ease; }
tbody tr:hover { background: rgba(255,255,255,.018); }
tbody tr:last-child td { border-bottom: 0; }
.row-action { cursor: pointer; }
.table-primary { color: #edf1f6; font-weight: 650; }
.table-secondary { display: block; margin-top: 4px; color: #657186; font-size: 10px; }
.mono { font-family: "Cascadia Code", Consolas, monospace; font-size: 11px; }
.badge { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 8px; border-radius: 20px; color: #aeb8c7; background: #1b2432; font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.badge--critical, .badge--high, .badge--revoked, .badge--expired { color: #ff8b96; background: rgba(255,95,109,.12); }
.badge--medium, .badge--expiring { color: #f2c56f; background: rgba(242,184,75,.12); }
.badge--low, .badge--active, .badge--enforce { color: #58dca9; background: rgba(53,212,154,.11); }
.badge--info, .badge--report, .badge--pro { color: #a89eff; background: rgba(109,93,252,.12); }
.empty-state { padding: 42px 15px !important; color: #647085; text-align: center; }
.table-meta { display: flex; justify-content: space-between; margin-bottom: 6px; color: #667287; font-size: 11px; }
.pagination { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.key-cell { display: flex; align-items: center; gap: 7px; }
.copy-button { padding: 3px 6px; border: 0; border-radius: 5px; color: #867bfa; background: transparent; cursor: pointer; }
.row-buttons { display: flex; justify-content: flex-end; gap: 6px; }

.split-heading { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.split-heading > div:last-child { display: flex; gap: 8px; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.project-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, #111823, #0f151f); }
.project-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.project-card-actions { display: flex; align-items: center; gap: 6px; }
.project-code { display: inline-block; margin-bottom: 8px; color: #8f84ff; font-family: "Cascadia Code", Consolas, monospace; font-size: 11px; font-weight: 700; }
.project-card h3 { font-size: 17px; }
.project-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 20px; }
.project-stats div { padding: 10px; border-radius: 8px; background: #0b1018; }
.project-stats span, .project-stats strong { display: block; }
.project-stats span { margin-bottom: 4px; color: #667287; font-size: 9px; text-transform: uppercase; }
.project-stats strong { font-size: 12px; }
.customer-list { display: flex; flex-wrap: wrap; gap: 10px; }
.customer-chip { display: flex; align-items: center; gap: 9px; padding: 9px 10px 9px 12px; border: 1px solid var(--line); border-radius: 9px; color: #b3bdcb; background: #0d131c; font-size: 12px; }
.customer-chip i { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; color: #a89eff; background: rgba(109,93,252,.12); font-style: normal; }
.customer-chip .customer-delete { margin-left: 5px; }

.server-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.server-summary > div { position: relative; overflow: hidden; padding: 14px 16px; border: 1px solid var(--line); border-radius: 11px; background: rgba(14,20,30,.88); }
.server-summary > div::after { content: ""; position: absolute; right: -18px; bottom: -26px; width: 68px; height: 68px; border-radius: 50%; background: rgba(109,93,252,.08); }
.server-summary span, .server-summary strong { display: block; }
.server-summary span { color: #68758a; font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.server-summary strong { margin-top: 7px; font-size: 20px; }
.success-text { color: var(--green); }
.server-inventory { padding: 0; overflow: hidden; }
.inventory-toolbar { display: flex; align-items: end; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); background: rgba(8,13,21,.45); }
.inventory-search { flex: 1; max-width: 430px; }
.inventory-toolbar > .field:not(.inventory-search) { width: 190px; }
.inventory-result { margin-left: auto; padding-bottom: 11px; color: #69758a; font-size: 10px; }
.server-inventory .table-wrap { margin: 0; }
.server-table th { position: sticky; top: 0; z-index: 2; background: #0d131d; }
.server-table td { height: 68px; }
.server-table tr { cursor: pointer; }
.server-table tr.is-selected { background: linear-gradient(90deg, rgba(109,93,252,.1), transparent 62%); box-shadow: inset 3px 0 var(--accent); }
.server-identity { display: flex; align-items: center; gap: 10px; }
.server-glyph { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border: 1px solid rgba(109,93,252,.23); border-radius: 9px; color: #a89eff; background: rgba(109,93,252,.08); font-family: "Cascadia Code", Consolas, monospace; font-size: 10px; font-weight: 800; }
.server-status { display: inline-flex; align-items: center; gap: 7px; color: #718096; font-size: 10px; text-transform: uppercase; }
.server-status i { width: 7px; height: 7px; border-radius: 50%; background: #586375; }
.server-status.is-online { color: #75deb7; }
.server-status.is-online i { background: var(--green); box-shadow: 0 0 10px rgba(53,212,154,.75); animation: status-pulse 2s infinite; }
@keyframes status-pulse { 50% { box-shadow: 0 0 16px rgba(53,212,154,.95); } }
.config-cell strong, .config-cell span { display: block; }
.config-cell span { margin-top: 4px; color: #657186; font-size: 9px; }
.server-row-actions { display: flex; justify-content: flex-end; gap: 6px; }
.button--icon { min-width: 34px; padding: 0 9px; }
.danger-icon { color: #ff7884; }

.version-pill { display: inline-flex; margin-left: 6px; padding: 3px 8px; border-radius: 20px; color: #a89eff; background: rgba(109,93,252,.12); font-size: 10px; vertical-align: middle; }
.config-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, .65fr); gap: 18px; align-items: start; }
.config-layout aside { position: sticky; top: 102px; }
.toggle-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.toggle-card { position: relative; display: flex; align-items: flex-start; gap: 11px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #0c121b; cursor: pointer; }
.toggle-card > input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.toggle-card > span:last-child { min-width: 0; }
.toggle-card strong, .toggle-card small { display: block; }
.toggle-card strong { color: #c8d0dc; font-size: 11px; }
.toggle-card small { margin-top: 5px; color: #667287; font-size: 9px; line-height: 1.4; }
.switch { position: relative; flex: 0 0 34px; width: 34px; height: 19px; border-radius: 20px; background: #283243; transition: .18s ease; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; border-radius: 50%; background: #8995a8; transition: .18s ease; }
.toggle-card input:checked + .switch { background: rgba(109,93,252,.65); }
.toggle-card input:checked + .switch::after { left: 18px; background: #fff; }
.toggle-card--compact { align-items: center; padding: 10px; }
.detector-list { display: grid; gap: 8px; }
.detector-row { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(170px, .85fr); align-items: center; gap: 15px; padding: 12px; border: 1px solid var(--line-soft); border-radius: 10px; background: #0c121b; }
.detector-title { display: flex; align-items: center; gap: 11px; }
.detector-title > span:last-child { min-width: 0; }
.detector-title strong, .detector-title small { display: block; }
.detector-title strong { color: #cbd3df; font-size: 12px; }
.detector-title small { margin-top: 4px; color: #667287; font-size: 9px; }
.detector-modes { display: grid; gap: 7px; }
.detector-mode { display: grid; grid-template-columns: 1fr minmax(105px, 130px); align-items: center; gap: 8px; color: #7f8b9e; font-size: 10px; }
.detector-mode select { height: 33px; font-size: 10px; }
.settings-grid { display: grid; gap: 13px; }

.drawer { position: fixed; inset: 0 0 0 auto; z-index: 60; width: min(510px, 100%); padding: 24px; border-left: 1px solid var(--line); background: #0e141e; box-shadow: -25px 0 70px rgba(0,0,0,.4); transform: translateX(105%); transition: transform .22s ease; overflow-y: auto; }
.drawer.is-open { transform: translateX(0); }
.drawer-backdrop { position: fixed; inset: 0; z-index: 50; visibility: hidden; opacity: 0; background: rgba(0,0,0,.45); transition: .2s ease; }
.drawer-backdrop.is-open { visibility: visible; opacity: 1; }
.drawer-header { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.drawer-body { padding-top: 18px; }
.detail-section { margin-bottom: 24px; }
.detail-section h3 { margin-bottom: 12px; color: #7e8a9d; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.detail-item { min-width: 0; padding: 11px; border-radius: 8px; background: #0a0f17; }
.detail-item--wide { grid-column: 1 / -1; }
.detail-item span, .detail-item strong { display: block; }
.detail-item span { margin-bottom: 5px; color: #647084; font-size: 9px; text-transform: uppercase; }
.detail-item strong { color: #c3ccd8; font-size: 11px; overflow-wrap: anywhere; }

dialog { width: min(520px, calc(100% - 30px)); padding: 0; border: 1px solid #2c3748; border-radius: 16px; color: var(--text); background: #101620; box-shadow: 0 28px 90px rgba(0,0,0,.55); }
dialog::backdrop { background: rgba(0,0,0,.68); backdrop-filter: blur(3px); }
.dialog-form { display: grid; gap: 15px; padding: 22px; }
.dialog-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 4px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 5px; }
.danger-dialog { border-color: rgba(255,95,109,.35); }
.danger-text { color: #ff7e89; }
.impact-box { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; padding: 12px; border: 1px solid rgba(255,95,109,.17); border-radius: 9px; background: rgba(255,95,109,.045); }
.impact-box:empty { display: none; }
.impact-box div { display: flex; justify-content: space-between; gap: 10px; color: #8793a6; font-size: 11px; }
.impact-box strong { color: #ff929b; }
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.toast-stack { position: fixed; right: 18px; bottom: 18px; z-index: 100; display: grid; gap: 8px; }
.toast { min-width: 260px; max-width: 380px; padding: 12px 15px; border: 1px solid #2b3748; border-left: 3px solid var(--green); border-radius: 9px; color: #c9d2de; background: #151d29; box-shadow: 0 12px 35px rgba(0,0,0,.35); font-size: 12px; animation: toast-in .2s ease; }
.toast--error { border-left-color: var(--red); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1050px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .overview-grid { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .server-summary { grid-template-columns: repeat(2, 1fr); }
  .filters { grid-template-columns: repeat(2, 1fr); }
  .config-layout { grid-template-columns: 1fr; }
  .config-layout aside { position: static; }
}
@media (max-width: 760px) {
  .sidebar { transform: translateX(-105%); transition: transform .2s ease; box-shadow: 20px 0 50px rgba(0,0,0,.45); }
  .sidebar.is-open { transform: translateX(0); }
  .main { margin-left: 0; }
  .menu-button { display: block; }
  .topbar { height: auto; min-height: 75px; padding: 13px 17px; }
  .topbar-actions { gap: 6px; }
  .project-picker span { display: none; }
  .project-picker select { min-width: 120px; max-width: 145px; }
  .content { padding: 20px 14px 40px; }
  .inventory-toolbar { align-items: stretch; flex-direction: column; }
  .inventory-search, .inventory-toolbar > .field:not(.inventory-search) { width: 100%; max-width: none; }
  .inventory-result { margin-left: 0; padding: 0; }
  .project-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .metric-grid { grid-template-columns: 1fr; }
  .filters, .form-row { grid-template-columns: 1fr; }
  .split-heading { align-items: flex-start; flex-direction: column; }
  .posture-score { align-items: flex-start; flex-direction: column; }
  .auth-card { padding: 26px 22px; }
  .toggle-grid { grid-template-columns: 1fr; }
  .detector-row { grid-template-columns: 1fr; }
}
