:root {
  color-scheme: dark;
  --bg: #07101d;
  --bg-raised: #0b1727;
  --panel: #0e1d30;
  --panel-strong: #11243a;
  --line: rgba(159, 184, 214, 0.14);
  --line-strong: rgba(159, 184, 214, 0.24);
  --text: #f0f5fb;
  --muted: #91a4ba;
  --muted-strong: #b4c3d4;
  --blue: #64a7ff;
  --green: #55d59a;
  --amber: #f2bd67;
  --violet: #ae9cff;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-width: 320px; min-height: 100%; }
html { background: var(--bg); }
body { margin: 0; color: var(--text); background: radial-gradient(circle at 78% -10%, rgba(50, 126, 211, 0.16), transparent 35rem), var(--bg); font-size: 15px; line-height: 1.5; }
button, input { font: inherit; }
button { color: inherit; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar { position: fixed; z-index: 20; inset: 0 auto 0 0; display: flex; flex-direction: column; width: 248px; padding: 28px 16px 20px; border-right: 1px solid var(--line); background: rgba(7, 16, 29, 0.92); backdrop-filter: blur(22px); }
.brand-lockup { display: flex; align-items: center; gap: 11px; padding: 0 12px 34px; }
.brand-mark { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid rgba(117, 180, 255, 0.45); border-radius: 12px; color: #ecf6ff; background: linear-gradient(145deg, #2e84dc, #143965); box-shadow: 0 8px 26px rgba(36, 125, 226, 0.25); font-size: 11px; font-weight: 800; letter-spacing: 0.07em; }
.brand-name, .brand-subtitle, .sidebar-version, .topbar-kicker, .topbar-title, .eyebrow, .section-caption, .workspace-footer { margin: 0; }
.brand-name { font-weight: 750; letter-spacing: -0.02em; }
.brand-subtitle { color: var(--muted); font-size: 12px; }
.sidebar-label { padding: 0 12px 10px; color: #61758d; font-size: 11px; font-weight: 750; letter-spacing: 0.13em; text-transform: uppercase; }
.side-nav { display: grid; gap: 5px; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border: 1px solid transparent; border-radius: 10px; color: var(--muted); background: transparent; cursor: pointer; text-align: left; transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease; }
.nav-item:hover { color: var(--text); background: rgba(126, 161, 198, 0.08); }
.nav-item:active { transform: translateY(1px); }
.nav-item.is-active { border-color: rgba(100, 167, 255, 0.19); color: #e8f3ff; background: linear-gradient(90deg, rgba(56, 130, 223, 0.22), rgba(56, 130, 223, 0.06)); }
.nav-icon { display: inline-grid; width: 19px; place-items: center; color: #7b9cc2; font-size: 18px; line-height: 1; }
.nav-item.is-active .nav-icon { color: var(--blue); }
.sidebar-footer { margin-top: auto; padding: 16px 12px 0; border-top: 1px solid var(--line); }
.mini-status { display: flex; align-items: center; gap: 8px; color: var(--muted-strong); font-size: 12px; }
.sidebar-version { margin-top: 8px; color: #5e738a; font-size: 11px; }

.workspace { width: calc(100% - 248px); min-height: 100vh; margin-left: 248px; }
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 82px; padding: 18px clamp(22px, 4vw, 62px); border-bottom: 1px solid var(--line); background: rgba(7, 16, 29, 0.54); }
.topbar-left, .topbar-actions, .connection-pill, .section-heading, .progress-summary, .page-intro--with-action, .viewer-heading { display: flex; align-items: center; }
.topbar-left { gap: 13px; }
.topbar-kicker { color: #71859d; font-size: 11px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; }
.topbar-title { margin-top: 2px; color: #e9f3fd; font-size: 17px; font-weight: 700; }
.topbar-actions { gap: 12px; }
.connection-pill { gap: 8px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted-strong); background: rgba(14, 29, 48, 0.68); font-size: 12px; }
.icon-button { display: inline-grid; width: 36px; height: 36px; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 10px; color: var(--muted-strong); background: rgba(14, 29, 48, 0.65); cursor: pointer; transition: color 160ms ease, border-color 160ms ease, background 160ms ease; }
.icon-button:hover { border-color: var(--line-strong); color: var(--text); background: var(--panel-strong); }
.menu-button { display: none; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(85, 213, 154, 0.1); }
.status-dot--muted { background: #8496aa; box-shadow: 0 0 0 4px rgba(132, 150, 170, 0.1); }
.status-dot--warn { background: var(--amber); box-shadow: 0 0 0 4px rgba(242, 189, 103, 0.1); }

.main-content { width: min(1280px, 100%); margin: 0 auto; padding: clamp(30px, 5vw, 66px) clamp(22px, 4vw, 62px) 36px; }
.page-view { display: none; animation: page-in 240ms ease both; }
.page-view.is-visible { display: block; }
@keyframes page-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.eyebrow { color: #74a9dc; font-size: 11px; font-weight: 800; letter-spacing: 0.14em; line-height: 1.2; }
h1, h2, p { margin-top: 0; }
h1 { max-width: 720px; margin-bottom: 13px; color: #f7fbff; font-size: clamp(32px, 4.4vw, 56px); font-weight: 780; letter-spacing: -0.055em; line-height: 1.04; }
h2 { margin-bottom: 7px; color: #e9f2fb; font-size: 20px; letter-spacing: -0.025em; line-height: 1.2; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr); gap: clamp(26px, 5vw, 78px); align-items: center; min-height: 355px; }
.hero-text { max-width: 590px; margin-bottom: 25px; color: var(--muted); font-size: 16px; line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 16px; border: 1px solid transparent; border-radius: 9px; cursor: pointer; font-size: 13px; font-weight: 700; text-decoration: none; transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button--primary { border-color: rgba(108, 179, 255, 0.35); color: #f8fcff; background: linear-gradient(135deg, #368ee9, #276abe); box-shadow: 0 10px 26px rgba(30, 116, 213, 0.22); }
.button--primary:hover { background: linear-gradient(135deg, #499cf0, #2e79d0); }
.button--quiet { border-color: var(--line); color: var(--muted-strong); background: rgba(19, 37, 59, 0.65); }
.button--quiet:hover { border-color: rgba(126, 174, 224, 0.32); color: var(--text); background: var(--panel-strong); }
.button--small { min-height: 34px; padding: 0 11px; font-size: 12px; }

.agent-card { padding: 22px; border: 1px solid rgba(113, 157, 204, 0.18); border-radius: 16px; background: linear-gradient(150deg, rgba(17, 36, 58, 0.96), rgba(11, 26, 43, 0.92)); box-shadow: var(--shadow); }
.section-heading { justify-content: space-between; gap: 14px; }
.section-heading--compact { align-items: flex-start; }
.section-heading--compact h2 { margin-top: 7px; margin-bottom: 0; }
.status-badge { display: inline-flex; align-items: center; min-height: 25px; padding: 0 9px; border: 1px solid rgba(100, 167, 255, 0.2); border-radius: 999px; color: var(--blue); background: rgba(100, 167, 255, 0.08); font-size: 11px; font-weight: 750; }
.status-badge--muted { border-color: rgba(159, 184, 214, 0.16); color: var(--muted); background: rgba(159, 184, 214, 0.06); }
.status-badge--safe { border-color: rgba(85, 213, 154, 0.2); color: var(--green); background: rgba(85, 213, 154, 0.08); }
.agent-illustration { display: flex; align-items: center; justify-content: center; min-height: 112px; padding: 18px 0 12px; }
.monitor { position: relative; width: 104px; height: 68px; padding: 5px; border: 3px solid #517292; border-radius: 8px; }
.monitor-screen { width: 100%; height: 100%; border-radius: 3px; background: linear-gradient(145deg, rgba(73, 141, 220, 0.55), rgba(26, 65, 104, 0.46)); }
.monitor-stand { position: absolute; bottom: -14px; left: 50%; width: 28px; height: 11px; border-right: 3px solid #517292; border-bottom: 3px solid #517292; border-left: 3px solid #517292; transform: translateX(-50%); }
.connection-line { display: flex; gap: 5px; margin: 0 16px; }
.connection-line span { display: block; width: 5px; height: 5px; border-radius: 50%; background: #517292; }
.cloud { position: relative; width: 70px; height: 40px; border: 3px solid #517292; border-radius: 25px 25px 10px 10px; }
.cloud::before, .cloud::after, .cloud span { position: absolute; display: block; border: 3px solid #517292; border-bottom: 0; border-radius: 50% 50% 0 0; content: ""; }
.cloud::before { right: 12px; bottom: 10px; width: 27px; height: 24px; background: var(--panel-strong); }
.cloud::after { right: 31px; bottom: 9px; width: 24px; height: 21px; background: var(--panel-strong); }
.cloud span:nth-child(1) { right: -3px; bottom: 8px; width: 25px; height: 20px; background: var(--panel-strong); }
.cloud span:nth-child(2), .cloud span:nth-child(3) { display: none; }
.agent-message { min-height: 48px; margin-bottom: 14px; color: var(--muted-strong); font-size: 13px; }
.agent-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 13px; }
.pairing-panel { margin-bottom: 13px; padding: 15px; border: 1px solid rgba(100, 167, 255, 0.28); border-radius: 11px; background: rgba(100, 167, 255, 0.07); }
.pairing-code { margin-top: 8px; color: #f5fbff; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: clamp(25px, 4vw, 32px); font-weight: 800; letter-spacing: 0.16em; line-height: 1.1; }
.pairing-countdown { margin: 7px 0 12px; color: var(--muted); font-size: 11px; }
.pairing-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pairing-status { margin: 12px 0 0; color: var(--muted-strong); font-size: 12px; }
.agent-note { display: flex; gap: 9px; padding: 11px 12px; border: 1px solid rgba(242, 189, 103, 0.15); border-radius: 9px; color: #c6b999; background: rgba(242, 189, 103, 0.06); font-size: 12px; line-height: 1.45; }
.agent-note > span:first-child { display: inline-grid; flex: 0 0 auto; width: 17px; height: 17px; place-items: center; border: 1px solid rgba(242, 189, 103, 0.45); border-radius: 50%; color: var(--amber); font-size: 11px; font-weight: 800; }

.section-heading:not(.section-heading--compact) { margin-top: 58px; margin-bottom: 17px; align-items: end; }
.section-heading:not(.section-heading--compact) h2 { margin-top: 8px; margin-bottom: 0; }
.section-caption { max-width: 330px; color: var(--muted); font-size: 12px; text-align: right; }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tool-card { display: grid; grid-template-columns: auto 1fr auto; gap: 13px; align-items: center; min-height: 126px; padding: 18px; border: 1px solid var(--line); border-radius: 13px; color: inherit; background: rgba(14, 29, 48, 0.72); cursor: pointer; text-align: left; transition: transform 160ms ease, border-color 160ms ease, background 160ms ease; }
.tool-card:hover { border-color: rgba(126, 174, 224, 0.31); background: rgba(17, 36, 58, 0.94); transform: translateY(-2px); }
.tool-icon { display: inline-grid; width: 37px; height: 37px; place-items: center; border-radius: 10px; font-size: 20px; }
.tool-icon--blue { color: var(--blue); background: rgba(100, 167, 255, 0.11); }
.tool-icon--green { color: var(--green); background: rgba(85, 213, 154, 0.11); }
.tool-icon--violet { color: var(--violet); background: rgba(174, 156, 255, 0.11); }
.tool-card-copy { display: grid; gap: 5px; }
.tool-card-copy strong { color: #e8f3ff; font-size: 14px; }
.tool-card-copy span { color: var(--muted); font-size: 12px; line-height: 1.45; }
.tool-arrow { color: #6e88a5; font-size: 20px; }
.status-strip { display: flex; align-items: center; gap: 12px; margin-top: 13px; padding: 14px 16px; border: 1px solid rgba(85, 213, 154, 0.15); border-radius: 11px; background: rgba(85, 213, 154, 0.055); }
.status-strip-icon { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 50%; color: var(--green); background: rgba(85, 213, 154, 0.13); font-size: 14px; }
.status-strip strong { font-size: 13px; }
.status-strip p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.status-strip-version { margin-left: auto; color: #769582; font-size: 12px; }

.page-intro { max-width: 730px; margin-bottom: 32px; }
.page-intro h1 { margin-bottom: 12px; font-size: clamp(34px, 5vw, 52px); }
.page-intro > p:last-child { color: var(--muted); font-size: 15px; }
.page-intro--with-action { align-items: end; justify-content: space-between; gap: 18px; }
.page-intro--with-action > div { max-width: 700px; }
.empty-state { display: grid; justify-items: center; max-width: 720px; min-height: 320px; margin: 28px auto; padding: 56px 28px; border: 1px dashed rgba(126, 174, 224, 0.25); border-radius: 16px; background: rgba(14, 29, 48, 0.48); text-align: center; }
.empty-state-icon { display: grid; width: 60px; height: 60px; place-items: center; margin-bottom: 20px; border: 1px solid rgba(100, 167, 255, 0.19); border-radius: 17px; color: var(--blue); background: rgba(100, 167, 255, 0.08); font-size: 28px; }
.empty-state h2 { margin-bottom: 10px; }
.empty-state p { max-width: 550px; margin-bottom: 22px; color: var(--muted); font-size: 13px; }
.device-inventory { margin-top: 28px; }
.inventory-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.inventory-card { min-height: 105px; padding: 17px; border: 1px solid rgba(85, 213, 154, 0.16); border-radius: 13px; background: rgba(14, 29, 48, 0.72); }
.inventory-card span { display: block; margin-bottom: 10px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.inventory-card strong { display: block; color: #e8f4ff; overflow-wrap: anywhere; font-size: 15px; line-height: 1.35; }
.inventory-footer { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: #8ebca5; font-size: 12px; }

.progress-card { margin-bottom: 15px; padding: 17px 19px; border: 1px solid var(--line); border-radius: 13px; background: rgba(14, 29, 48, 0.72); }
.progress-summary { justify-content: space-between; margin-bottom: 10px; color: var(--muted-strong); font-size: 13px; }
.progress-summary span { color: var(--green); font-weight: 750; }
.progress-track { height: 7px; overflow: hidden; border-radius: 999px; background: rgba(145, 164, 186, 0.13); }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3a9cff, #52d59a); transition: width 220ms ease; }
.checklist-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.checklist-group { padding: 19px; border: 1px solid var(--line); border-radius: 14px; background: rgba(14, 29, 48, 0.68); }
.checklist-group-heading { display: flex; gap: 11px; min-height: 57px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.checklist-group-heading h2 { margin-bottom: 4px; font-size: 16px; }
.checklist-group-heading p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.step-number { color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: 0.08em; }
.check-row { display: flex; gap: 10px; padding: 14px 0; border-bottom: 1px solid rgba(159, 184, 214, 0.1); cursor: pointer; }
.check-row:last-child { padding-bottom: 2px; border-bottom: 0; }
.check-row input { flex: 0 0 auto; width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--green); cursor: pointer; }
.check-row span { display: grid; gap: 3px; }
.check-row strong { color: #dfeaf5; font-size: 12px; font-weight: 650; line-height: 1.35; }
.check-row small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.check-row:has(input:checked) strong { color: #91cdb1; text-decoration: line-through; text-decoration-color: rgba(85, 213, 154, 0.5); }
.text-button { display: block; margin-top: 14px; padding: 0; border: 0; color: #8bb9e8; background: transparent; cursor: pointer; font-size: 12px; }
.text-button:hover { color: #d8edff; text-decoration: underline; }

.report-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 15px; align-items: stretch; }
.dropzone { display: grid; justify-items: center; width: 100%; min-height: 255px; padding: 35px 20px; border: 1px dashed rgba(100, 167, 255, 0.38); border-radius: 15px; color: inherit; background: rgba(14, 29, 48, 0.62); cursor: pointer; text-align: center; transition: border-color 160ms ease, background 160ms ease, transform 160ms ease; }
.dropzone:hover, .dropzone.is-dragover { border-color: var(--blue); background: rgba(38, 82, 132, 0.2); transform: translateY(-1px); }
.dropzone-icon { display: grid; width: 50px; height: 50px; place-items: center; margin-bottom: 16px; border-radius: 15px; color: var(--blue); background: rgba(100, 167, 255, 0.11); font-size: 28px; }
.dropzone strong { margin-bottom: 6px; font-size: 16px; }
.dropzone > span:not(.dropzone-icon):not(.button) { margin-bottom: 18px; color: var(--muted); font-size: 12px; }
.privacy-note { display: flex; gap: 7px; align-items: center; margin: 10px 2px 0; color: #8299b2; font-size: 11px; }
.report-summary { padding: 20px; border: 1px solid rgba(85, 213, 154, 0.17); border-radius: 15px; background: rgba(85, 213, 154, 0.055); }
.report-summary h2 { margin-top: 10px; overflow-wrap: anywhere; font-size: 16px; }
.report-summary p:not(.eyebrow) { margin-bottom: 17px; color: var(--muted); font-size: 12px; }
.report-summary .button { margin-bottom: 1px; }
.report-viewer { margin-top: 20px; padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: rgba(14, 29, 48, 0.72); }
.viewer-heading { justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.viewer-heading h2 { margin-top: 7px; margin-bottom: 0; }
.report-viewer iframe { display: block; width: 100%; height: min(680px, 70vh); border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.empty-state--report { min-height: 230px; margin-top: 20px; }
.empty-state--report .empty-state-icon { margin-bottom: 14px; }

.workspace-footer { display: flex; justify-content: space-between; gap: 20px; padding: 20px clamp(22px, 4vw, 62px) 28px; border-top: 1px solid var(--line); color: #627991; font-size: 11px; }
.toast { position: fixed; z-index: 40; right: 22px; bottom: 22px; max-width: min(360px, calc(100vw - 44px)); padding: 12px 15px; border: 1px solid rgba(100, 167, 255, 0.3); border-radius: 10px; color: #eaf4ff; background: #10243b; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity 180ms ease, transform 180ms ease; font-size: 12px; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
:focus-visible { outline: 2px solid #8fc8ff; outline-offset: 3px; }

@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; max-width: 760px; }
  .hero-copy { padding-top: 10px; }
  .agent-card { max-width: 760px; }
  .tool-grid, .checklist-grid { grid-template-columns: 1fr; }
  .inventory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .checklist-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
  .checklist-group-heading { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .sidebar { width: min(290px, 85vw); transform: translateX(-102%); transition: transform 200ms ease; box-shadow: 14px 0 50px rgba(0, 0, 0, 0.35); }
  .sidebar.is-open { transform: translateX(0); }
  .workspace { width: 100%; margin-left: 0; }
  .menu-button { display: inline-grid; }
  .topbar { min-height: 72px; padding: 14px 18px; }
  .topbar-kicker { display: none; }
  .topbar-title { font-size: 16px; }
  .connection-pill { padding: 7px 9px; }
  .connection-pill span:last-child { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .main-content { padding: 35px 18px 28px; }
  h1 { font-size: clamp(34px, 11vw, 48px); }
  .hero-text { font-size: 14px; }
  .hero-actions { display: grid; }
  .hero-actions .button { width: 100%; }
  .section-heading:not(.section-heading--compact) { display: block; margin-top: 43px; }
  .section-caption { margin-top: 10px; text-align: left; }
  .tool-grid { gap: 9px; }
  .tool-card { min-height: 104px; padding: 14px; }
  .page-intro--with-action { display: block; }
  .page-intro--with-action .button { margin-top: 16px; }
  .checklist-group { display: block; }
  .inventory-grid { grid-template-columns: 1fr; }
  .report-layout { grid-template-columns: 1fr; }
  .report-summary { min-height: 0; }
  .workspace-footer { display: grid; gap: 8px; padding: 18px; }
}

@media (max-width: 430px) {
  .agent-card { padding: 17px; }
  .agent-illustration { transform: scale(0.83); transform-origin: center; }
  .status-strip { align-items: flex-start; }
  .status-strip-version { padding-top: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
