:root {
  --ink: #101a34;
  --ink-2: #26324d;
  --muted: #77819a;
  --muted-2: #9ea7ba;
  --line: #e2e6ef;
  --line-soft: #edf0f5;
  --surface: #ffffff;
  --canvas: #f4f6fa;
  --accent: #5868ef;
  --accent-2: #7482ff;
  --accent-soft: #eef0ff;
  --navy: #121c3c;
  --mint: #5ed4a5;
  --mint-soft: #e9fbf4;
  --coral: #f17b70;
  --shadow: 0 18px 44px rgba(20, 32, 69, .08);
  --shadow-soft: 0 7px 22px rgba(20, 32, 69, .06);
  --radius: 18px;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  display: flex;
  width: 246px;
  flex-direction: column;
  padding: 26px 18px 20px;
  color: #dce2f6;
  background:
    radial-gradient(circle at 15% 92%, rgba(104, 93, 220, .22), transparent 26%),
    linear-gradient(168deg, #121c3c 0%, #101934 52%, #0c142c 100%);
  box-shadow: 7px 0 30px rgba(11, 21, 49, .06);
}

.brand { display: flex; align-items: center; gap: 12px; padding: 0 9px; color: #fff; font-size: 20px; font-weight: 760; letter-spacing: -.45px; text-decoration: none; }
.brand.compact { padding: 0; font-size: 18px; }
.brand-mark { display: block; width: 36px; height: 36px; flex: 0 0 auto; object-fit: contain; }
.brand.compact .brand-mark { width: 31px; height: 31px; }

.main-nav { display: grid; gap: 5px; margin-top: 42px; }
.nav-item { display: flex; width: 100%; align-items: center; gap: 13px; min-height: 45px; padding: 0 14px; border: 0; border-radius: 12px; color: #aeb8d3; background: transparent; cursor: pointer; text-align: left; transition: .18s ease; }
.nav-item svg { width: 19px; height: 19px; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.065); }
.nav-item.active { color: #fff; background: linear-gradient(90deg, rgba(102, 114, 247, .31), rgba(92, 104, 235, .12)); box-shadow: inset 2px 0 #8290ff; }
.nav-item span:nth-child(2) { flex: 1; }
.nav-count { display: grid; min-width: 21px; height: 21px; place-items: center; border-radius: 20px; color: #dfe3ff; background: rgba(125, 136, 255, .22); font-size: 11px; }
.sidebar-bottom { display: grid; gap: 7px; margin-top: auto; }
.security-card { display: flex; gap: 10px; margin: 0 3px 12px; padding: 13px; border: 1px solid rgba(255,255,255,.09); border-radius: 13px; background: rgba(255,255,255,.045); }
.security-card p { margin: 0; color: #929ebc; font-size: 11.5px; }
.security-card strong { color: #dbe3f8; font-size: 12px; font-weight: 600; }
.security-icon { display: grid; width: 29px; height: 29px; flex: 0 0 auto; place-items: center; border-radius: 9px; color: #71dfb7; background: rgba(91,211,165,.11); }
.security-icon svg { width: 16px; }
.profile-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 16px 8px 2px; border-top: 1px solid rgba(255,255,255,.08); }
.profile-row > div:nth-child(2) { display: grid; flex: 1; }
.profile-row strong { color: #eef2ff; font-size: 12px; font-weight: 600; }
.profile-row span { color: #8591ad; font-size: 10.5px; }
.profile-row .icon-button { color: #7f8aa5; }

.avatar { display: inline-grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; border-radius: 11px; color: #fff; font-size: 11px; font-weight: 730; letter-spacing: .2px; }
.avatar.large { width: 64px; height: 64px; border-radius: 20px; font-size: 16px; }
.avatar-you { color: #172040; background: linear-gradient(145deg, #d2f8e9, #72dcb7); }
.avatar-navy { background: linear-gradient(145deg, #1a2c5c, #425489); }
.avatar-lilac { background: linear-gradient(145deg, #7565d9, #9c8cf2); }
.avatar-coral { background: linear-gradient(145deg, #eb7669, #f7a695); }

.workspace { min-width: 0; flex: 1; margin-left: 246px; }
.topbar { position: sticky; z-index: 15; top: 0; display: flex; height: 78px; align-items: center; padding: 0 38px; border-bottom: 1px solid rgba(222,226,237,.78); background: rgba(248,249,252,.9); backdrop-filter: blur(14px); }
.topbar-title { display: grid; }
.topbar-title span { color: var(--muted); font-size: 10px; font-weight: 680; letter-spacing: .12em; text-transform: uppercase; }
.topbar-title strong { margin-top: 2px; color: var(--ink-2); font-size: 16px; font-weight: 650; letter-spacing: -.15px; }
.topbar-actions { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.connection-badge { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.connection-badge > span:first-child { width: 7px; height: 7px; border-radius: 50%; background: #f2b64c; box-shadow: 0 0 0 4px rgba(242,182,76,.11); }
.connection-badge.connected > span:first-child { background: var(--mint); box-shadow: 0 0 0 4px rgba(94,212,165,.12); }
.connection-badge.offline > span:first-child { background: var(--coral); box-shadow: 0 0 0 4px rgba(241,123,112,.12); }
.support-button, .primary-button, .secondary-button, .quiet-button, .small-action, .text-button, .copy-button, .icon-button, .round-connect { border: 0; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, background .16s ease, color .16s ease; }
.support-button { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 16px; border-radius: 10px; color: #fff; background: var(--ink); font-size: 12px; font-weight: 610; box-shadow: 0 5px 14px rgba(18,28,60,.15); }
.support-button svg { width: 16px; }
.support-button:hover, .primary-button:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(74,88,215,.21); }
.menu-button { display: none !important; }

.content { max-width: 1510px; margin: 0 auto; padding: 46px 52px 62px; }
.view { display: none; animation: reveal .28s ease both; }
.view.active { display: block; }
@keyframes reveal { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; color: var(--ink); font-size: clamp(28px, 3vw, 38px); line-height: 1.12; letter-spacing: -1.35px; }
h2 { margin-bottom: 0; color: var(--ink); font-size: 19px; line-height: 1.2; letter-spacing: -.45px; }
h3 { margin-bottom: 4px; font-size: 16px; }
.muted { color: var(--muted); }
.eyebrow { display: block; margin-bottom: 7px; color: var(--accent); font-size: 10px; font-weight: 720; letter-spacing: .115em; text-transform: uppercase; }

.welcome-copy { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 34px; }
.welcome-copy h1 { max-width: 670px; }
.welcome-copy p { margin: 0; color: var(--muted); font-size: 15px; }
.trust-chip { display: flex; min-width: 232px; align-items: center; gap: 12px; padding: 12px 15px; border: 1px solid #dbeee8; border-radius: 14px; color: #27926c; background: rgba(237,251,246,.72); }
.trust-chip svg { width: 22px; height: 22px; }
.trust-chip span { display: grid; }
.trust-chip strong { color: #2a6754; font-size: 12px; }
.trust-chip small { color: #769589; font-size: 10.5px; }

.connect-grid { display: grid; grid-template-columns: minmax(0, 1.14fr) minmax(330px, .86fr); gap: 22px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-soft); }
.identity-panel, .connect-panel { min-height: 395px; padding: 29px 30px 25px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.panel > .muted { margin: 10px 0 22px; font-size: 12px; }
.online-pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border: 1px solid #cfeee2; border-radius: 30px; color: #37816a; background: #f2fcf8; font-size: 10.5px; font-weight: 650; }
.online-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px rgba(94,212,165,.14); }
.credential-row { display: grid; grid-template-columns: 1.2fr .8fr; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fafbfe; }
.credential { position: relative; display: grid; min-width: 0; padding: 17px 52px 18px 20px; }
.credential + .credential { border-left: 1px solid var(--line); }
.credential label { margin-bottom: 4px; color: var(--muted); font-size: 10.5px; }
.credential strong { overflow: hidden; color: var(--ink); font-size: 20px; font-weight: 670; letter-spacing: 1.8px; text-overflow: ellipsis; white-space: nowrap; }
.copy-button { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 9px; color: var(--muted); background: transparent; }
.copy-button:hover { color: var(--accent); background: var(--accent-soft); }
.copy-button svg { width: 16px; height: 16px; }
.credential > .copy-button { position: absolute; top: 21px; right: 13px; }
.password-credential { padding-right: 83px; }
.password-credential > .copy-button { right: 43px; }
.password-credential > .copy-button:last-child { right: 10px; }
.identity-actions { display: flex; align-items: center; gap: 11px; margin-top: 22px; }
.primary-button { display: inline-flex; min-height: 43px; align-items: center; justify-content: center; gap: 9px; padding: 0 19px; border-radius: 11px; color: #fff; background: linear-gradient(135deg, var(--accent), #6979f6); font-size: 12px; font-weight: 650; box-shadow: 0 7px 18px rgba(88,104,239,.17); }
.primary-button svg { width: 17px; height: 17px; }
.quiet-button { padding: 8px 10px; color: var(--muted); background: transparent; font-size: 11.5px; font-weight: 570; }
.quiet-button:hover { color: var(--accent); }
.session-note { display: flex; align-items: center; gap: 7px; margin-top: 18px; color: var(--muted-2); font-size: 10.5px; }
.session-note svg { width: 14px; height: 14px; }

.mini-orbit { position: relative; width: 52px; height: 32px; }
.mini-orbit span { position: absolute; top: 8px; width: 17px; height: 17px; border: 2px solid #fff; border-radius: 50%; background: var(--accent); box-shadow: 0 3px 9px rgba(56,72,190,.2); }
.mini-orbit span:nth-child(1) { left: 0; background: var(--navy); }
.mini-orbit span:nth-child(2) { left: 16px; z-index: 2; background: var(--mint); }
.mini-orbit span:nth-child(3) { left: 32px; background: var(--accent); }
.connect-form { display: grid; grid-template-columns: 1fr; gap: 9px; }
.connect-form label { color: var(--ink-2); font-size: 10.5px; font-weight: 620; }
.input-with-icon { position: relative; }
.input-with-icon svg { position: absolute; top: 50%; left: 14px; width: 17px; color: var(--muted-2); transform: translateY(-50%); pointer-events: none; }
input, select { width: 100%; height: 45px; border: 1px solid var(--line); border-radius: 11px; outline: none; color: var(--ink); background: #fafbfe; transition: border .16s, box-shadow .16s, background .16s; }
input { padding: 0 14px; }
.input-with-icon input { padding-left: 42px; }
input::placeholder { color: #aeb5c5; }
input:focus, select:focus { border-color: #929cf5; background: #fff; box-shadow: 0 0 0 4px rgba(88,104,239,.08); }
.connect-button { width: 100%; margin-top: 4px; }
.connect-button svg { margin-left: auto; }
.recent-connection { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line-soft); }
.recent-connection > div { display: grid; flex: 1; }
.recent-connection small { color: var(--muted-2); font-size: 9.5px; }
.recent-connection strong { color: var(--ink-2); font-size: 11.5px; font-weight: 620; }

.section-block { margin-top: 38px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 16px; }
.text-button { display: inline-flex; align-items: center; gap: 7px; padding: 7px; color: var(--accent); background: transparent; font-size: 11.5px; font-weight: 600; }
.text-button svg { width: 15px; height: 15px; transition: transform .16s; }
.text-button:hover svg { transform: translateX(3px); }
.device-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.device-card { display: flex; min-width: 0; align-items: center; gap: 14px; min-height: 95px; padding: 15px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: 0 5px 15px rgba(30,42,80,.03); transition: transform .16s, box-shadow .16s, border .16s; }
.device-card:hover { transform: translateY(-2px); border-color: #d7dbec; box-shadow: var(--shadow-soft); }
.device-visual { position: relative; display: grid; width: 72px; height: 53px; flex: 0 0 auto; place-items: center; overflow: hidden; border: 3px solid #253258; border-radius: 7px; color: rgba(255,255,255,.85); background: linear-gradient(145deg, #5e70f0, #9ba6ff); font-size: 10px; font-weight: 700; box-shadow: 0 5px 10px rgba(35,48,90,.14); }
.device-visual::after { content: ""; position: absolute; left: 24px; bottom: -9px; width: 19px; height: 9px; background: #253258; }
.device-visual.laptop-visual { border-color: #273249; background: linear-gradient(145deg, #253863, #536486); }
.device-visual.warm { background: linear-gradient(145deg, #d9857a, #f1b1a4); }
.screen-shine { position: absolute; inset: 0; background: linear-gradient(125deg, rgba(255,255,255,.16), transparent 43%); }
.device-info { display: flex; min-width: 0; flex: 1; align-items: center; gap: 8px; }
.device-info > div { display: grid; min-width: 0; }
.device-info strong { overflow: hidden; font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.device-info small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.status-dot { display: inline-block; width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; }
.status-dot.online { background: var(--mint); box-shadow: 0 0 0 3px rgba(94,212,165,.12); }
.status-dot.away { background: #efb655; box-shadow: 0 0 0 3px rgba(239,182,85,.12); }
.icon-button { display: inline-grid; width: 32px; height: 32px; place-items: center; border-radius: 9px; color: var(--muted); background: transparent; }
.icon-button:hover { color: var(--ink); background: rgba(22,35,71,.055); }
.icon-button svg { width: 17px; height: 17px; }
.round-connect { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #fff; background: var(--accent); }
.round-connect:hover { transform: translateX(2px); }
.round-connect svg { width: 16px; }
.insight-strip { display: flex; align-items: center; gap: 14px; margin-top: 22px; padding: 17px 20px; border: 1px solid #dfe2f2; border-radius: 15px; background: linear-gradient(95deg, #f0f2ff, #f8f9fe 55%, #f1fbf7); }
.insight-icon { display: grid; width: 37px; height: 37px; flex: 0 0 auto; place-items: center; border-radius: 11px; color: var(--accent); background: #fff; box-shadow: 0 4px 12px rgba(74,88,170,.09); }
.insight-icon svg { width: 19px; }
.insight-strip > div:nth-child(2) { flex: 1; }
.insight-strip strong { font-size: 12px; }
.insight-strip p { margin: 1px 0 0; color: var(--muted); font-size: 10.5px; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.page-head p { margin: 0; color: var(--muted); }
.secondary-button { display: inline-flex; min-height: 41px; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink-2); background: #fff; font-size: 11.5px; font-weight: 600; }
.secondary-button:hover { border-color: #cdd2e1; box-shadow: var(--shadow-soft); }
.secondary-button svg { width: 16px; }
.remote-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 22px; }
.feature-card { position: relative; overflow: hidden; min-height: 352px; padding: 30px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow-soft); }
.feature-card > p { max-width: 460px; color: var(--muted); }
.feature-card h2 { margin-bottom: 12px; font-size: 25px; }
.feature-icon { display: grid; width: 48px; height: 48px; place-items: center; margin-bottom: 25px; border-radius: 14px; color: #fff; background: rgba(255,255,255,.18); }
.feature-icon.soft { color: var(--accent); background: var(--accent-soft); }
.accent-card { color: #e8ebff; border-color: transparent; background: radial-gradient(circle at 87% 15%, rgba(113,226,186,.21), transparent 23%), linear-gradient(145deg, #1b2854, #5767e9); }
.accent-card::after { content: ""; position: absolute; right: -42px; bottom: -75px; width: 230px; height: 230px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; box-shadow: 0 0 0 34px rgba(255,255,255,.025), 0 0 0 72px rgba(255,255,255,.018); }
.accent-card .eyebrow { color: #9ff0d0; }
.accent-card h2 { color: #fff; }
.accent-card > p { color: #c8cfef; }
.mini-credentials { position: relative; z-index: 1; display: grid; grid-template-columns: 1.3fr 1fr; gap: 1px; overflow: hidden; margin: 22px 0 17px; border: 1px solid rgba(255,255,255,.15); border-radius: 12px; background: rgba(255,255,255,.1); }
.mini-credentials > span { display: grid; padding: 12px 15px; background: rgba(10,17,45,.12); }
.mini-credentials small { color: #aeb8e4; font-size: 9.5px; }
.mini-credentials strong { color: #fff; font-size: 15px; letter-spacing: 1px; }
.primary-button.light { position: relative; z-index: 1; color: #33417d; background: #fff; box-shadow: none; }
.stacked-connect { display: grid; max-width: 430px; gap: 10px; margin-top: 28px; }
.stacked-connect input { height: 49px; padding: 0 16px; }
.stacked-connect .primary-button { min-height: 49px; margin-top: 3px; }
.capability-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 24px; }
.capability-grid article { display: flex; gap: 12px; padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.capability-grid article > svg { width: 20px; flex: 0 0 auto; color: var(--accent); }
.capability-grid strong { font-size: 11.5px; }
.capability-grid p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }

.list-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 17px; }
.search-box { position: relative; width: min(320px, 40%); }
.search-box svg { position: absolute; top: 50%; left: 14px; width: 17px; color: var(--muted); transform: translateY(-50%); }
.search-box input { padding-left: 41px; background: #fff; }
.segmented { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.segmented button { min-width: 62px; height: 31px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; font-size: 10.5px; cursor: pointer; }
.segmented button.active { color: var(--ink); background: var(--accent-soft); font-weight: 600; }
.table-card { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow-soft); }
.table-row { display: grid; grid-template-columns: 2fr 1fr 1.2fr 1fr 44px; min-height: 73px; align-items: center; padding: 0 22px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 11.5px; }
.table-row:first-child { border-top: 0; }
.table-row:not(.table-header):hover { background: #fbfcfe; }
.table-header { min-height: 43px; color: var(--muted-2); background: #fafbfc; font-size: 9.5px; font-weight: 690; letter-spacing: .08em; text-transform: uppercase; }
.table-device { display: flex; align-items: center; gap: 12px; color: var(--ink-2); }
.table-device > span:last-child { display: grid; }
.table-device strong { font-size: 12px; font-weight: 650; }
.table-device small { color: var(--muted); font-size: 9.5px; }
.table-icon { display: grid; width: 39px; height: 39px; place-items: center; border-radius: 11px; color: #fff; background: linear-gradient(145deg, #344569, #172548); }
.table-icon.violet { background: linear-gradient(145deg, #6171ee, #8e9aff); }
.table-icon.coral { background: linear-gradient(145deg, #d9786e, #f1a095); }
.table-icon svg { width: 18px; }
.table-row > span > .status-dot { margin-right: 7px; }
.access-pill { display: inline-block; padding: 5px 9px; border-radius: 20px; color: #36735f; background: var(--mint-soft); font-size: 9.5px; font-weight: 620; }
.small-action { min-height: 31px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink-2); background: #fff; font-size: 10px; font-weight: 620; }
.small-action:hover { border-color: var(--accent); color: var(--accent); }
.primary-small { border-color: var(--accent); color: #fff; background: var(--accent); }
.primary-small:hover { color: #fff; background: #4d5de2; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 21px; }
.stat-grid article { position: relative; display: grid; min-height: 112px; padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.stat-grid small { color: var(--muted); font-size: 10.5px; }
.stat-grid strong { margin-top: 6px; font-size: 24px; letter-spacing: -.5px; }
.stat-grid span { color: var(--muted-2); font-size: 9.5px; }
.stat-grid .trend { position: absolute; top: 20px; right: 20px; padding: 4px 7px; border-radius: 12px; }
.stat-grid .trend.up { color: #278768; background: var(--mint-soft); }
.history-table .table-row { grid-template-columns: 2fr 1.1fr 1.2fr .8fr 1fr; }
.result-good { display: flex; align-items: center; gap: 5px; color: #39806a; }
.result-good svg { width: 13px; }
.contact-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 17px; }
.contact-card { position: relative; display: flex; min-height: 245px; flex-direction: column; align-items: center; justify-content: center; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow-soft); text-align: center; }
.contact-card > .status-dot { position: absolute; top: 85px; left: calc(50% + 19px); border: 3px solid #fff; width: 12px; height: 12px; box-sizing: content-box; }
.contact-card h3 { margin-top: 15px; }
.contact-card p { margin-bottom: 19px; color: var(--muted); font-size: 11px; }
.contact-card > div:last-child { display: flex; gap: 7px; }
.add-contact { border-style: dashed; color: var(--muted); background: rgba(255,255,255,.5); cursor: pointer; }
.add-contact h3 { color: var(--ink); }

.saved-indicator { display: flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 20px; color: #3b8169; background: var(--mint-soft); font-size: 10.5px; opacity: 0; transition: opacity .2s; }
.saved-indicator.show { opacity: 1; }
.saved-indicator svg { width: 14px; }
.settings-layout { display: grid; grid-template-columns: 210px minmax(0, 760px); gap: 26px; align-items: start; }
.settings-nav { display: grid; gap: 4px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.settings-nav button { min-height: 39px; padding: 0 12px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; cursor: pointer; text-align: left; font-size: 11.5px; }
.settings-nav button.active { color: var(--accent); background: var(--accent-soft); font-weight: 630; }
.settings-panel { display: grid; gap: 16px; }
.settings-group { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.settings-group > div:first-child { padding: 21px 22px 15px; }
.settings-group h2 { font-size: 16px; }
.settings-group p { margin: 5px 0 0; color: var(--muted); font-size: 10.5px; }
.setting-row, .select-row { display: flex; min-height: 71px; align-items: center; gap: 20px; padding: 12px 22px; border-top: 1px solid var(--line-soft); cursor: pointer; }
.setting-row > span, .select-row > span { display: grid; flex: 1; }
.setting-row strong, .select-row strong { font-size: 11.5px; font-weight: 620; }
.setting-row small, .select-row small { color: var(--muted); font-size: 9.5px; }
.setting-row input { position: absolute; opacity: 0; pointer-events: none; }
.setting-row i { position: relative; width: 39px; height: 22px; flex: 0 0 auto; border-radius: 20px; background: #cbd1df; transition: .18s; }
.setting-row i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(20,30,60,.17); transition: .18s; }
.setting-row input:checked + i { background: var(--accent); }
.setting-row input:checked + i::after { transform: translateX(17px); }
.select-row select { width: 155px; height: 39px; padding: 0 10px; }
.danger-group { padding-bottom: 19px; }
.danger-group > .secondary-button { margin-left: 22px; }

.toast-region { position: fixed; z-index: 100; right: 23px; bottom: 23px; display: grid; gap: 10px; pointer-events: none; }
.app-toast { display: flex; min-width: 250px; align-items: center; gap: 10px; padding: 13px 15px; border: 1px solid rgba(255,255,255,.09); border-radius: 12px; color: #f6f8ff; background: rgba(17,27,57,.96); box-shadow: 0 16px 38px rgba(10,18,40,.24); font-size: 11.5px; animation: toast-in .22s ease both; }
.app-toast::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); }
.app-toast.error::before { background: var(--coral); }
.app-toast.leaving { animation: toast-out .2s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

.modal-backdrop { position: fixed; z-index: 120; inset: 0; display: grid; place-items: center; padding: 20px; visibility: hidden; background: rgba(9,16,38,.45); opacity: 0; backdrop-filter: blur(5px); transition: .2s; }
.modal-backdrop.open { visibility: visible; opacity: 1; }
.modal-card { width: min(420px,100%); padding: 31px; border-radius: 20px; background: #fff; box-shadow: 0 28px 70px rgba(8,15,36,.24); text-align: center; transform: translateY(9px) scale(.98); transition: .2s; }
.modal-backdrop.open .modal-card { transform: none; }
.modal-icon { display: grid; width: 50px; height: 50px; margin: 0 auto 18px; place-items: center; border-radius: 15px; color: var(--accent); background: var(--accent-soft); }
.modal-icon svg { width: 24px; }
.modal-card h2 { font-size: 20px; }
.modal-card p { margin: 10px 0 25px; color: var(--muted); font-size: 12px; }
.modal-actions { display: grid; grid-template-columns: 1fr 1.45fr; gap: 9px; }

.session-workspace { position: fixed; z-index: 80; inset: 0; display: none; flex-direction: column; color: #eaf0ff; background: #080d1d; }
.session-workspace.open { display: flex; }
.session-header { display: flex; min-height: 64px; align-items: center; gap: 24px; padding: 0 18px 0 22px; border-bottom: 1px solid rgba(255,255,255,.075); background: #111a34; }
.session-header .brand { width: 185px; }
.session-identity { display: flex; align-items: center; gap: 10px; }
.session-identity > div { display: grid; }
.session-identity strong { color: #fff; font-size: 11.5px; }
.session-identity small { color: #8c98b4; font-size: 9.5px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #efb956; box-shadow: 0 0 0 4px rgba(239,185,86,.1); }
.live-dot.connected { background: var(--mint); box-shadow: 0 0 0 4px rgba(94,212,165,.12); }
.session-toolbar { display: flex; align-items: stretch; justify-content: flex-end; gap: 3px; margin-left: auto; }
.session-toolbar button { display: inline-flex; min-width: 55px; height: 43px; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0 8px; border: 0; border-radius: 8px; color: #9da9c3; background: transparent; font-size: 8px; cursor: pointer; transition: .16s; }
.session-toolbar button:hover, .session-toolbar button.active { color: #fff; background: rgba(255,255,255,.07); }
.session-toolbar button[data-tool="control"].active { color: var(--mint); background: rgba(94,212,165,.13); }
.session-toolbar button[data-tool="control"].pending { color: #efb956; background: rgba(239,185,86,.12); }
.session-toolbar button svg { width: 17px; height: 17px; }
.session-toolbar .end-session { min-width: auto; flex-direction: row; gap: 6px; margin-left: 8px; padding: 0 13px; color: #ffdcd9; background: rgba(241,123,112,.16); font-size: 10px; }
.session-toolbar .end-session:hover { color: #fff; background: #ce5e57; }
.quality-bars { display: flex; height: 17px; align-items: flex-end; gap: 2px; }
.quality-bars i { width: 3px; border-radius: 2px; background: var(--mint); }
.quality-bars i:nth-child(1) { height: 5px; }.quality-bars i:nth-child(2) { height: 9px; }.quality-bars i:nth-child(3) { height: 14px; }
.session-body { display: flex; min-height: 0; flex: 1; }
.stage { position: relative; display: flex; min-width: 0; flex: 1; align-items: center; justify-content: center; overflow: hidden; outline: none; background: radial-gradient(circle at 50% 42%, #18213a, #080d1d 68%); }
.stage video { width: 100%; height: 100%; object-fit: contain; background: #050711; }
.stage video:not([src]) { display: none; }
.stage-placeholder { position: absolute; z-index: 2; display: grid; max-width: 450px; justify-items: center; text-align: center; }
.stage-placeholder.hidden { display: none; }
.stage-placeholder h2 { margin: 26px 0 8px; color: #edf1ff; font-size: 20px; }
.stage-placeholder p { color: #8995af; font-size: 11.5px; }
.connecting-orbit { position: relative; width: 92px; height: 82px; animation: float 3s ease-in-out infinite; }
.connecting-orbit span { position: absolute; width: 31px; height: 31px; border: 4px solid #111a34; border-radius: 50%; box-shadow: 0 6px 16px rgba(0,0,0,.18); }
.connecting-orbit span:nth-child(1) { top: 0; left: 11px; background: #6878f2; }
.connecting-orbit span:nth-child(2) { top: 0; right: 11px; background: #9fa8ff; }
.connecting-orbit span:nth-child(3) { bottom: 3px; left: 30px; background: #66d7ad; }
.connecting-orbit::before, .connecting-orbit::after { content: ""; position: absolute; top: 22px; left: 27px; width: 38px; height: 2px; background: rgba(157,171,228,.5); transform: rotate(60deg); }
.connecting-orbit::after { transform: rotate(-60deg); }
.connecting-orbit i { position: absolute; inset: -12px -7px; border: 1px solid rgba(112,128,231,.12); border-radius: 50%; box-shadow: 0 0 0 14px rgba(112,128,231,.025); }
@keyframes float { 50% { transform: translateY(-5px); } }
.privacy-ribbon { position: absolute; z-index: 3; bottom: 14px; left: 50%; display: flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid rgba(255,255,255,.08); border-radius: 20px; color: #8b97b2; background: rgba(10,15,31,.72); font-size: 8.5px; transform: translateX(-50%); backdrop-filter: blur(7px); pointer-events: none; }
.privacy-ribbon svg { width: 12px; color: var(--mint); }
#annotationCanvas { position: absolute; z-index: 5; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#annotationCanvas.active { pointer-events: auto; cursor: crosshair; }
.remote-cursor { position: absolute; z-index: 7; display: none; align-items: center; gap: 5px; pointer-events: none; transition: left .04s linear, top .04s linear; }
.remote-cursor.show { display: flex; }
.remote-cursor span { width: 0; height: 0; border-top: 14px solid #7ee0bc; border-right: 8px solid transparent; filter: drop-shadow(0 2px 2px rgba(0,0,0,.3)); transform: rotate(-20deg); }
.remote-cursor small { padding: 2px 5px; border-radius: 4px; color: #14283a; background: #7ee0bc; font-size: 7.5px; font-weight: 700; }
.session-toast { position: absolute; z-index: 8; top: 20px; left: 50%; padding: 9px 13px; border-radius: 9px; color: #eaf0ff; background: rgba(24,34,64,.91); box-shadow: 0 10px 25px rgba(0,0,0,.18); font-size: 10px; opacity: 0; transform: translate(-50%,-7px); transition: .2s; pointer-events: none; }
.session-toast.show { opacity: 1; transform: translate(-50%,0); }
.chat-drawer { display: none; width: 300px; flex-direction: column; border-left: 1px solid rgba(255,255,255,.075); background: #111a31; }
.chat-drawer.open { display: flex; }
.drawer-heading { display: flex; align-items: center; justify-content: space-between; padding: 20px; border-bottom: 1px solid rgba(255,255,255,.075); }
.drawer-heading .eyebrow { color: #7c8ae5; font-size: 8px; }
.drawer-heading h3 { margin: 0; color: #f1f4ff; font-size: 15px; }
.drawer-heading .icon-button { color: #8490aa; }
.messages { display: flex; min-height: 0; flex: 1; flex-direction: column; gap: 10px; overflow-y: auto; padding: 16px; }
.system-message { display: flex; gap: 8px; padding: 10px; border-radius: 9px; color: #7f8ba6; background: rgba(255,255,255,.035); font-size: 9px; }
.system-message svg { width: 14px; flex: 0 0 auto; color: var(--mint); }
.message { display: grid; max-width: 85%; gap: 2px; align-self: flex-start; }
.message.own { align-self: flex-end; }
.message span { padding: 8px 10px; border-radius: 10px 10px 10px 3px; color: #dce2f2; background: #222e4b; font-size: 10.5px; }
.message.own span { border-radius: 10px 10px 3px; color: #fff; background: #5868e7; }
.message small { color: #65718c; font-size: 7.5px; }
.message.own small { text-align: right; }
.message-form { display: flex; gap: 7px; padding: 13px; border-top: 1px solid rgba(255,255,255,.075); }
.message-form input { height: 39px; border-color: rgba(255,255,255,.09); color: #eef2ff; background: rgba(255,255,255,.05); font-size: 10.5px; }
.message-form input:focus { border-color: #6878e8; box-shadow: none; }
.message-form button { display: grid; width: 39px; height: 39px; flex: 0 0 auto; place-items: center; border: 0; border-radius: 9px; color: #fff; background: var(--accent); cursor: pointer; }
.message-form button svg { width: 16px; }

@media (max-width: 1180px) {
  .content { padding-right: 32px; padding-left: 32px; }
  .device-cards { grid-template-columns: repeat(2,1fr); }
  .device-card:last-child { display: none; }
  .capability-grid { grid-template-columns: repeat(2,1fr); }
  .contact-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 920px) {
  .sidebar { transform: translateX(-100%); transition: transform .22s; }
  .sidebar.open { transform: none; }
  .workspace { margin-left: 0; }
  .menu-button { display: grid !important; margin-right: 14px; }
  .menu-button span { width: 16px; height: 1.5px; margin: 1.5px 0; background: currentColor; }
  .content { padding: 35px 24px 50px; }
  .connect-grid, .remote-choice-grid { grid-template-columns: 1fr; }
  .welcome-copy { align-items: flex-start; flex-direction: column; }
  .trust-chip { align-self: stretch; }
  .session-header .brand { width: auto; }
  .session-toolbar button span:not(.quality-bars) { display: none; }
  .session-toolbar button { min-width: 38px; }
  .session-identity { display: none; }
}

@media (max-width: 680px) {
  .topbar { height: 68px; padding: 0 16px; }
  .topbar-title span { display: none; }
  .topbar-actions .connection-badge { display: none; }
  .support-button { width: 38px; padding: 0; font-size: 0; }
  .support-button svg { width: 17px; }
  .content { padding: 28px 16px 44px; }
  h1 { font-size: 28px; }
  .welcome-copy { margin-bottom: 24px; }
  .panel, .identity-panel, .connect-panel, .feature-card { padding: 22px; }
  .credential-row { grid-template-columns: 1fr; }
  .credential + .credential { border-top: 1px solid var(--line); border-left: 0; }
  .identity-actions { align-items: stretch; flex-direction: column; }
  .device-cards, .stat-grid, .contact-grid { grid-template-columns: 1fr; }
  .device-card:last-child { display: flex; }
  .insight-strip .text-button { display: none; }
  .capability-grid { grid-template-columns: 1fr; }
  .page-head { align-items: stretch; flex-direction: column; }
  .list-toolbar { align-items: stretch; flex-direction: column; gap: 10px; }
  .search-box { width: 100%; }
  .table-card { overflow-x: auto; }
  .table-row { min-width: 770px; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { grid-template-columns: repeat(2,1fr); }
  .session-header { min-height: 58px; padding: 0 10px; }
  .session-header .brand > span:last-child { display: none; }
  .session-toolbar button[data-tool="quality"], .session-toolbar button[data-tool="clipboard"], .session-toolbar button[data-tool="annotate"] { display: none; }
  .chat-drawer { position: absolute; z-index: 10; inset: 0 0 0 auto; width: min(320px, 88vw); }
  .privacy-ribbon { white-space: nowrap; }
}

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