:root {
  color-scheme: light;
  --navy-950: #0d1726;
  --navy-900: #132238;
  --navy-800: #1b304d;
  --ink-950: #142033;
  --ink-900: #1a293d;
  --ink-850: #223147;
  --ink-800: #27364b;
  --ink-750: #35465c;
  --ink-700: #43546a;
  --ink-650: #516177;
  --ink-600: #617086;
  --ink-500: #7a8798;
  --line: #dbe2eb;
  --line-soft: #e9eef4;
  --page: #f4f7fa;
  --surface: #ffffff;
  --surface-muted: #fafbfd;
  --surface-soft: #f6f8fb;
  --surface-hover: #f0f5fc;
  --grid-line: #e5ebf2;
  --blue: #3977e8;
  --blue-dark: #2c63c4;
  --blue-soft: #edf4ff;
  --accent-rgb: 57, 119, 232;
  --green: #1d9b72;
  --green-soft: #e8f7f1;
  --red: #c45260;
  --red-soft: #fbecef;
  --amber: #c18424;
  --shadow: 0 8px 28px rgba(20, 32, 51, .055);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; color: var(--ink-950); background: var(--page); font-size: 13px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.eyebrow, .step-label { margin: 0 0 10px; color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .15em; }

.brand { width: max-content; display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand-mark { width: 39px; height: 39px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, color-mix(in srgb, var(--blue) 68%, white), var(--blue-dark)); border-radius: 10px; box-shadow: 0 10px 28px rgba(var(--accent-rgb), .3); font-size: 19px; font-weight: 850; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; letter-spacing: -.02em; }
.brand small { margin-top: 1px; color: #96a8be; font-size: 8px; font-weight: 800; letter-spacing: .22em; }
.brand-light { color: #edf4fd; }

/* Account setup and sign in */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(330px, 38%) 1fr; background: var(--surface); }
.identity-panel { min-height: 100vh; display: flex; flex-direction: column; padding: clamp(32px, 5vw, 70px); color: #e9eff7; background: radial-gradient(circle at 18% 18%, #203f66 0, transparent 33%), linear-gradient(145deg, var(--navy-950), var(--navy-900)); }
.identity-copy { max-width: 510px; margin: auto 0; padding-block: 60px; }
.identity-copy .eyebrow { color: #7ca9f8; }
.identity-copy h1 { margin: 0; color: #fff; font-size: clamp(38px, 4vw, 62px); line-height: 1.03; letter-spacing: -.055em; }
.identity-copy > p:last-child { max-width: 470px; margin: 23px 0 0; color: #acbbcd; font-size: 15px; line-height: 1.7; }
.controller-state { display: flex; align-items: center; gap: 11px; padding-top: 21px; border-top: 1px solid rgba(255,255,255,.1); }
.controller-state strong, .controller-state small { display: block; }
.controller-state strong { font-size: 12px; }
.controller-state small { margin-top: 3px; color: #91a1b5; font-size: 10px; }
.pulse { width: 8px; height: 8px; flex: 0 0 auto; display: inline-block; background: #45d7a5; border: 3px solid rgba(69,215,165,.18); border-radius: 50%; box-sizing: content-box; }
.auth-content { min-width: 0; display: grid; place-items: center; padding: clamp(24px, 5vw, 72px); }
.auth-card { width: min(100%, 430px); padding: clamp(28px, 4vw, 42px); background: var(--surface); border: 1px solid var(--line-soft); border-radius: 16px; box-shadow: 0 18px 55px rgba(22, 34, 53, .09); }
.auth-card h2 { margin: 0; font-size: 27px; letter-spacing: -.035em; }
.auth-card > p:not(.step-label) { margin: 10px 0 25px; color: var(--ink-500); line-height: 1.6; }
.spinner { width: 30px; height: 30px; display: block; margin-bottom: 22px; border: 3px solid #dbe5f5; border-top-color: var(--blue); border-radius: 50%; animation: spin 800ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

form { display: grid; gap: 14px; }
label { display: grid; gap: 7px; color: var(--ink-650); font-size: 11px; font-weight: 720; }
label > span { color: var(--ink-500); font-weight: 500; }
input, select, textarea { width: 100%; min-height: 42px; padding: 0 12px; color: var(--ink-950); background: var(--surface-muted); border: 1px solid var(--line); border-radius: 8px; outline: 0; }
textarea { padding-block: 10px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .11); }
.remember { display: flex; grid-template-columns: auto 1fr; align-items: center; gap: 8px; font-weight: 500; }
.remember input { width: 15px; min-height: 15px; margin: 0; }
.password-hint { margin: -3px 0 0; color: var(--ink-500); font-size: 10px; line-height: 1.5; }
.form-error, .form-success { color: #b6404e; font-size: 11px; line-height: 1.45; }
.form-error:empty, .form-success:empty { display: none; }
.form-success { color: #14785c; }
.recovery-result { display: grid; gap: 9px; padding: 12px; color: #14785c; background: #eaf8f3; border: 1px solid #cdece1; border-radius: 8px; font-size: 10px; }
.recovery-result code { overflow-wrap: anywhere; color: var(--ink-950); user-select: all; }

.primary-button, .quiet-button, .ghost-button, .danger-button, .back-button, .icon-action { min-height: 39px; padding: 0 15px; border-radius: 8px; font-size: 11px; font-weight: 750; }
.primary-button { color: #fff; background: var(--blue); border: 1px solid var(--blue); box-shadow: 0 6px 17px rgba(var(--accent-rgb), .18); }
.primary-button:hover { background: var(--blue-dark); }
.quiet-button, .ghost-button, .icon-action { color: var(--ink-650); background: var(--surface); border: 1px solid var(--line); }
.quiet-button:hover, .ghost-button:hover, .icon-action:hover { color: var(--blue-dark); background: var(--blue-soft); border-color: #cad9f4; }
.danger-button { color: var(--red); background: var(--surface); border: 1px solid #efcbd0; }
.danger-button:hover { background: var(--red-soft); }
button:disabled { cursor: wait; opacity: .6; }

/* Main management app */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 94px minmax(0, 1fr); align-items: start; }
.sidebar {
  width: 68px;
  height: calc(100vh - 28px);
  height: calc(100dvh - 28px);
  position: sticky;
  z-index: 200;
  top: 14px;
  align-self: start;
  display: flex;
  flex-direction: column;
  margin: 14px 0 14px 14px;
  padding: 11px 10px;
  overflow: visible;
  isolation: isolate;
  color: #dfe8f3;
  background: linear-gradient(165deg, rgba(22, 40, 64, .98), rgba(11, 22, 36, .97));
  border: 1px solid rgba(168, 194, 226, .13);
  border-radius: 22px;
  box-shadow: 0 18px 48px rgba(9, 19, 32, .22), 0 2px 8px rgba(9, 19, 32, .16), inset 0 1px rgba(255, 255, 255, .065);
  backdrop-filter: blur(18px) saturate(135%);
  animation: sidebar-rail-enter 520ms cubic-bezier(.18, 1.28, .32, 1) both;
}
.sidebar::before { content: ""; position: absolute; z-index: -1; inset: 12% -8px 46%; background: rgba(68, 129, 234, .16); border-radius: 30px; filter: blur(18px); opacity: .7; pointer-events: none; }
.sidebar-brand { position: relative; width: 46px; height: 46px; flex: 0 0 auto; justify-content: center; margin: 0 auto 24px; border-radius: 15px; outline: 0; transition: transform 260ms cubic-bezier(.18, 1.35, .32, 1), filter 180ms ease; }
.sidebar-brand:hover { transform: translateY(-2px) scale(1.045); filter: brightness(1.08); }
.sidebar-brand:active { transform: scale(.94); }
.sidebar-brand:focus-visible { box-shadow: 0 0 0 3px rgba(117, 166, 250, .34); }
.sidebar-brand .brand-mark { width: 42px; height: 42px; border-radius: 13px; box-shadow: 0 9px 25px rgba(46, 105, 205, .38); transition: box-shadow 220ms ease; }
.primary-nav { width: 100%; display: grid; justify-items: center; gap: 8px; }
.nav-label { width: 1px; height: 1px; position: absolute; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.nav-button { width: 46px; min-height: 46px; position: relative; display: grid; place-items: center; padding: 0; color: #8fa2ba; background: transparent; border: 1px solid transparent; border-radius: 15px; outline: 0; font-size: 11px; font-weight: 720; animation: sidebar-item-enter 420ms cubic-bezier(.18, 1.3, .32, 1) both; transition: color 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 220ms ease, transform 260ms cubic-bezier(.18, 1.4, .32, 1); }
.nav-button:nth-of-type(2) { animation-delay: 35ms; }
.nav-button:nth-of-type(3) { animation-delay: 70ms; }
.nav-button:nth-of-type(4) { animation-delay: 105ms; }
.nav-button:nth-of-type(5) { animation-delay: 140ms; }
.nav-button:nth-of-type(6) { animation-delay: 175ms; }
.nav-button::before { content: ""; width: 3px; height: 20px; position: absolute; left: -11px; top: 50%; background: linear-gradient(#84b2ff, #3977e8); border-radius: 0 4px 4px 0; box-shadow: 0 0 14px rgba(93, 153, 255, .7); opacity: 0; transform: translate(-4px, -50%) scaleY(.4); transition: opacity 180ms ease, transform 300ms cubic-bezier(.18, 1.4, .32, 1); }
.nav-button:hover { color: #eef5ff; background: rgba(112, 157, 229, .1); border-color: rgba(155, 187, 233, .11); transform: translateY(-2px) scale(1.045); }
.nav-button:active { transform: scale(.92); transition-duration: 90ms; }
.nav-button:focus-visible { color: #fff; background: rgba(112, 157, 229, .12); border-color: rgba(137, 178, 244, .4); box-shadow: 0 0 0 3px rgba(83, 142, 237, .22); }
.nav-button.active { color: #fff; background: linear-gradient(145deg, rgba(80, 137, 232, .34), rgba(61, 112, 200, .2)); border-color: rgba(130, 174, 247, .24); box-shadow: 0 10px 24px rgba(12, 26, 45, .22), inset 0 1px rgba(255,255,255,.09); }
.nav-button.active::before { opacity: 1; transform: translate(0, -50%) scaleY(1); }
.nav-glyph { width: 23px; height: 23px; display: grid; place-items: center; transition: transform 300ms cubic-bezier(.18, 1.45, .32, 1); }
.nav-glyph svg, .profile-signout svg { width: 21px; height: 21px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.nav-button:hover .nav-glyph, .nav-button:focus-visible .nav-glyph { transform: scale(1.09); }
.nav-button.active .nav-glyph { color: #b9d2ff; }
.nav-button small { min-width: 18px; height: 18px; position: absolute; top: -4px; right: -5px; display: grid; place-items: center; padding: 0 5px; color: #eaf3ff; background: #3977e8; border: 2px solid #14243a; border-radius: 10px; box-shadow: 0 4px 10px rgba(16, 37, 66, .35); font-size: 7px; line-height: 1; text-align: center; }
.sidebar-brand-copy, .nav-text, .sidebar-flyout, .profile-copy { min-width: max-content; position: absolute; z-index: 210; left: calc(100% + 15px); top: 50%; display: block; padding: 8px 11px; color: #eaf2fc; background: rgba(13, 25, 41, .97); border: 1px solid rgba(166, 192, 225, .16); border-radius: 10px; box-shadow: 0 12px 30px rgba(8, 18, 31, .24); opacity: 0; visibility: hidden; transform: translate(-9px, -50%) scale(.92); transform-origin: left center; pointer-events: none; transition: opacity 130ms ease, visibility 130ms ease, transform 300ms cubic-bezier(.16, 1.42, .3, 1); }
.sidebar-brand-copy::before, .nav-text::before, .sidebar-flyout::before, .profile-copy::before { content: ""; width: 8px; height: 8px; position: absolute; left: -5px; top: 50%; background: rgba(13, 25, 41, .97); border-left: 1px solid rgba(166, 192, 225, .16); border-bottom: 1px solid rgba(166, 192, 225, .16); transform: translateY(-50%) rotate(45deg); }
.sidebar-brand-copy { padding: 9px 12px; }
.sidebar-brand-copy strong { color: #f5f8fd; font-size: 11px; }
.sidebar-brand-copy small { color: #8396af; font-size: 7px; }
.nav-text { font-size: 10px; line-height: 1; letter-spacing: .01em; }
.sidebar-brand:hover .sidebar-brand-copy, .sidebar-brand:focus-visible .sidebar-brand-copy, .nav-button:hover .nav-text, .nav-button:focus-visible .nav-text, .relay-health:hover .sidebar-flyout, .relay-health:focus .sidebar-flyout, .profile-card:hover .profile-copy, .profile-card:focus-within .profile-copy { opacity: 1; visibility: visible; transform: translate(0, -50%) scale(1); }
.sidebar-spacer { flex: 1; min-height: 20px; }
.relay-health { width: 46px; height: 40px; position: relative; display: grid; place-items: center; flex: 0 0 auto; margin: 0 auto 8px; border-radius: 13px; outline: 0; transition: background 180ms ease, transform 250ms cubic-bezier(.18, 1.35, .32, 1); }
.relay-health:hover { background: rgba(255,255,255,.045); transform: translateY(-1px); }
.relay-health:focus-visible { box-shadow: 0 0 0 3px rgba(83, 142, 237, .22); }
.relay-health .pulse { box-shadow: 0 0 0 0 rgba(69, 215, 165, .34); animation: sidebar-health-pulse 2.8s ease-out infinite; }
.relay-health strong, .relay-health small { display: block; }
.relay-health strong { font-size: 10px; }
.relay-health small { margin-top: 3px; color: #8295ad; font-size: 8px; }
.profile-card { width: 46px; min-width: 0; position: relative; display: grid; justify-items: center; gap: 7px; margin: 0 auto; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.075); }
.avatar { width: 36px; height: 36px; display: grid; place-items: center; color: #e3efff; background: linear-gradient(145deg, #31577f, #263f5e); border: 1px solid rgba(157,190,230,.13); border-radius: 12px; box-shadow: 0 7px 17px rgba(7, 17, 29, .2); font-size: 9px; font-weight: 800; transition: transform 260ms cubic-bezier(.18, 1.4, .32, 1), border-color 180ms ease; }
.profile-card:hover .avatar, .profile-card:focus-within .avatar { border-color: rgba(143, 184, 244, .34); transform: scale(1.045); }
.profile-copy { min-width: 132px; }
.profile-copy strong, .profile-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy strong { font-size: 10px; }
.profile-copy small { margin-top: 3px; color: #8295ad; font-size: 8px; }
.profile-signout { width: 36px; height: 34px; display: grid; place-items: center; padding: 0; color: #8295ad; background: transparent; border: 1px solid transparent; border-radius: 11px; outline: 0; transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 240ms cubic-bezier(.18, 1.35, .32, 1); }
.profile-signout svg { width: 18px; height: 18px; }
.profile-signout:hover { color: #fff; background: rgba(255,255,255,.055); border-color: rgba(255,255,255,.07); transform: translateY(-1px); }
.profile-signout:active { transform: scale(.92); }
.profile-signout:focus-visible { color: #fff; border-color: rgba(137, 178, 244, .4); box-shadow: 0 0 0 3px rgba(83, 142, 237, .22); }
@keyframes sidebar-rail-enter { from { opacity: 0; transform: translateX(-18px) scale(.96); } 72% { opacity: 1; transform: translateX(2px) scale(1.008); } to { opacity: 1; transform: none; } }
@keyframes sidebar-item-enter { from { opacity: 0; transform: translateX(-9px) scale(.9); } 75% { opacity: 1; transform: translateX(1px) scale(1.02); } to { opacity: 1; transform: none; } }
@keyframes sidebar-health-pulse { 0%, 42% { box-shadow: 0 0 0 0 rgba(69, 215, 165, .3); } 72%, 100% { box-shadow: 0 0 0 7px rgba(69, 215, 165, 0); } }
@keyframes sidebar-dock-enter { from { opacity: 0; transform: translate(-50%, 18px) scale(.96); } 72% { opacity: 1; transform: translate(-50%, -2px) scale(1.008); } to { opacity: 1; transform: translateX(-50%); } }

.workspace { min-width: 0; padding: 34px clamp(24px, 3.3vw, 54px) 70px; }
.app-page, .recovery-banner { width: min(100%, 1460px); margin-inline: auto; }
.workspace.desktop-wide { padding-inline: clamp(18px, 1.5vw, 34px); padding-bottom: 0; }
.workspace.desktop-wide #page-devices { width: 100%; max-width: none; }
.workspace.desktop-wide .device-header,
.workspace.desktop-wide .device-tabs,
.workspace.desktop-wide .desktop-toolbar { width: min(100%, 1680px); margin-inline: auto; }
.workspace.desktop-wide .desktop-toolbar { position: sticky; z-index: 60; top: 0; }
.workspace.desktop-wide #device-detail-view > .back-button { margin-left: max(0px, calc((100% - 1680px) / 2)); }
.workspace.desktop-wide .desktop-surface { width: 100%; }
.page-header { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 24px; }
.page-header h1, .device-header h1 { margin: 0; font-size: clamp(26px, 3vw, 35px); line-height: 1.05; letter-spacing: -.045em; }
.page-header > div > p:last-child { margin: 9px 0 0; color: var(--ink-500); line-height: 1.55; }
.page-header .primary-button { min-width: 128px; }
.recovery-banner { display: grid; grid-template-columns: 1fr minmax(220px, 1fr) auto; align-items: center; gap: 18px; margin-bottom: 17px; padding: 15px 17px; background: #fff8e6; border: 1px solid #ecd9a9; border-radius: 10px; }
.recovery-banner strong, .recovery-banner span { display: block; }
.recovery-banner span { margin-top: 3px; color: var(--ink-500); font-size: 9px; }
.recovery-banner code { overflow-wrap: anywhere; padding: 9px 11px; background: rgba(255,255,255,.72); border: 1px solid #ead8b1; border-radius: 7px; user-select: all; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 18px; }
.stat-card { min-width: 0; display: flex; align-items: center; gap: 14px; padding: 17px 18px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 11px; box-shadow: var(--shadow); }
.stat-card p { margin: 0; color: var(--ink-500); font-size: 9px; font-weight: 700; }
.stat-card strong { display: inline-block; margin-top: 4px; font-size: 24px; letter-spacing: -.04em; }
.stat-card small { margin-left: 7px; color: var(--ink-500); font-size: 8px; }
.stat-icon { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; font-size: 10px; font-weight: 850; }
.stat-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stat-icon.online { color: var(--green); background: var(--green-soft); }
.stat-icon.offline { color: #68788b; background: #eef2f6; }
.stat-icon.groups { color: #6f56bd; background: #f0edfb; }
.stat-icon.total { color: var(--blue); background: var(--blue-soft); }

.group-strip { display: flex; gap: 9px; margin-bottom: 17px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.group-chip { min-width: 152px; display: flex; align-items: center; gap: 10px; padding: 9px 12px; color: var(--ink-650); background: var(--surface); border: 1px solid var(--line); border-radius: 9px; text-align: left; }
.group-chip:hover { border-color: #bfcde0; }
.group-chip.active { color: var(--blue-dark); background: var(--blue-soft); border-color: #c7d8f5; }
.group-glyph { width: 28px; height: 28px; flex: 0 0 auto; display: grid; place-items: center; color: #5c6f85; background: #edf2f7; border-radius: 7px; font-size: 9px; font-weight: 800; }
.group-glyph svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.group-chip.active .group-glyph { color: white; background: var(--blue); }
.group-chip strong, .group-chip small { display: block; }
.group-chip strong { font-size: 10px; }
.group-chip small { margin-top: 3px; color: var(--ink-500); font-size: 8px; }

.panel { overflow: hidden; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 11px; box-shadow: var(--shadow); }
.panel-heading { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); }
.panel-heading h2, .panel-heading h3 { margin: 0; font-size: 13px; letter-spacing: -.015em; }
.panel-heading p { margin: 4px 0 0; color: var(--ink-500); font-size: 9px; }
.search-box { position: relative; display: block; width: min(330px, 42vw); }
.search-box span { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-500); font-size: 8px; font-weight: 750; text-transform: uppercase; }
.search-box input { min-height: 36px; padding-left: 55px; font-size: 10px; }
.connection-key { min-height: 39px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 18px; color: var(--ink-500); background: var(--surface-muted); border-bottom: 1px solid var(--line-soft); font-size: 8px; }
.connection-key > span { color: var(--ink-650); font-weight: 750; }
.connection-key div { display: flex; align-items: center; gap: 6px; }
.connection-key i { width: 12px; height: 4px; display: inline-block; margin-left: 9px; border-radius: 3px; }
.connection-key i.connected { background: #8fc5ed; }
.connection-key i.remote { background: #32b481; }
.connection-key i.offline { background: #e5eaf0; border: 1px solid #d8dee7; }
.device-table-wrap { overflow-x: auto; }
.device-table { width: 100%; border-collapse: collapse; }
.device-table th { padding: 11px 14px; color: var(--ink-500); background: var(--surface-muted); border-bottom: 1px solid var(--line-soft); font-size: 8px; font-weight: 780; letter-spacing: .04em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.device-table td { min-width: 100px; padding: 13px 14px; border-bottom: 1px solid var(--line-soft); color: var(--ink-650); font-size: 9px; }
.device-table tbody tr { cursor: pointer; outline: 0; }
.device-table tbody tr:hover, .device-table tbody tr:focus { background: var(--surface-hover); }
.device-table tbody tr:last-child td { border-bottom: 0; }
.device-table td:first-child { min-width: 285px; display: flex; align-items: center; gap: 10px; }
.device-icon { width: 31px; height: 31px; flex: 0 0 auto; display: grid; place-items: center; color: #5f7288; background: #edf2f7; border-radius: 8px; }
.device-icon[data-platform="windows"], .device-icon-large[data-platform="windows"] { background: #edf5ff; border-color: #d5e6fb; }
.device-icon[data-platform="apple"], .device-icon-large[data-platform="apple"] { background: #f0f3f7; border-color: #dbe2ea; }
.device-icon[data-platform="android"], .device-icon-large[data-platform="android"] { background: #eaf8f1; border-color: #cdebdc; }
.device-icon[data-platform="linux"], .device-icon-large[data-platform="linux"] { background: #fff7e5; border-color: #f1dfb8; }
.platform-logo { width: 18px; height: 18px; display: block; max-width: 100%; max-height: 100%; object-fit: contain; pointer-events: none; user-select: none; }
.device-icon-large .platform-logo { width: 29px; height: 29px; }
.platform-logo-fallback { width: 17px; height: 12px; position: relative; display: block; border: 1.5px solid currentColor; border-radius: 3px; }
.platform-logo-fallback::before { content: ""; width: 5px; height: 1.5px; position: absolute; left: 50%; bottom: -4px; background: currentColor; border-radius: 2px; transform: translateX(-50%); }
.platform-logo-fallback::after { content: ""; width: 10px; height: 1.5px; position: absolute; left: 50%; bottom: -6px; background: currentColor; border-radius: 2px; transform: translateX(-50%); }
.device-name { min-width: 0; flex: 1 1 auto; }
.device-name strong, .device-name small { display: block; }
.device-name strong { color: var(--ink-950); font-size: 10px; }
.device-name small { margin-top: 3px; color: var(--ink-500); font-size: 8px; }
.device-session-indicators { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; margin-left: auto; }
.device-session-indicator { width: 28px; height: 27px; min-height: 0; position: relative; display: grid; place-items: center; padding: 0; background: var(--surface); border: 1px solid #dbe3ec; border-radius: 8px; box-shadow: 0 2px 7px rgba(26, 42, 64, .06); }
.device-session-indicator::after { content: ""; width: 6px; height: 6px; position: absolute; top: -2px; right: -2px; background: #2ab284; border: 2px solid white; border-radius: 50%; }
.device-session-indicator.pending::after { background: #d69a39; }
.device-session-indicator svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; }
.device-session-indicator.desktop { color: #2e73d2; background: #f2f7ff; border-color: #cfe0f8; }
.device-session-indicator.terminal { color: #7356bd; background: #f7f3ff; border-color: #dfd5f4; }
.device-session-indicator.files { color: #b56c22; background: #fff8ed; border-color: #f0ddc1; }
.device-session-indicator:hover { filter: brightness(.98); transform: translateY(-1px); }
.device-session-indicator:focus-visible { outline: 2px solid rgba(76, 143, 251, .5); outline-offset: 2px; }
.device-session-count { min-width: 13px; height: 13px; position: absolute; right: -6px; bottom: -6px; display: grid; place-items: center; padding: 0 3px; color: white; background: #52667f; border: 2px solid white; border-radius: 999px; font-size: 6px; font-weight: 850; line-height: 1; }
.os-cell { max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-label { display: inline-flex; align-items: center; gap: 7px; font-size: 9px; font-weight: 720; text-transform: capitalize; }
.status-dot { width: 7px; height: 7px; display: inline-block; background: #9aa6b4; border-radius: 50%; }
.status-online .status-dot, .status-dot.status-online { background: var(--green); box-shadow: 0 0 0 3px rgba(29,155,114,.1); }
.status-offline .status-dot, .status-dot.status-offline { background: #9aa6b4; }
.status-revoked .status-dot, .status-dot.status-revoked { background: var(--red); }
.connection-track { position: relative; min-width: 150px; height: 9px; overflow: hidden; background: #eef2f6; border: 1px solid #e2e7ed; border-radius: 5px; }
.connection-segment { position: absolute; inset: 0; border-radius: 4px; }
.connection-segment.connected { background: #91c7ef; }
.connection-segment.remote { background: #32b481; }
.row-open { width: 27px; height: 27px; padding: 0; color: #718197; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; }
.device-session-dialog { width: min(500px, calc(100vw - 28px)); overflow: hidden; border-radius: 15px; }
.device-session-dialog form { display: flex; flex-direction: column; }
.device-session-dialog form > header { align-items: center; padding: 16px 18px; }
.device-session-dialog header h2 { margin: 0; color: var(--ink-900); font-size: 14px; letter-spacing: -.015em; }
.device-session-dialog header p { margin: 4px 0 0; color: var(--ink-500); font-size: 8px; }
.device-session-dialog-list { display: grid; max-height: min(55vh, 430px); overflow-y: auto; padding: 6px 18px; }
.device-session-dialog-row { min-width: 0; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto 31px; align-items: center; gap: 11px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.device-session-dialog-row:last-child { border-bottom: 0; }
.device-session-dialog-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; }
.device-session-dialog-icon.desktop { color: #2e73d2; background: #edf5ff; }
.device-session-dialog-icon.terminal { color: #7356bd; background: #f5f0ff; }
.device-session-dialog-icon.files { color: #b56c22; background: #fff5e7; }
.device-session-dialog-icon svg, .device-session-end-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; }
.device-session-dialog-identity { min-width: 0; }
.device-session-dialog-identity strong, .device-session-dialog-identity small { display: block; }
.device-session-dialog-identity strong { overflow: hidden; color: var(--ink-850); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.device-session-dialog-identity small { margin-top: 4px; color: var(--ink-500); font-size: 8px; }
.device-session-dialog-state { padding: 5px 7px; color: #8a6228; background: #fff3df; border-radius: 999px; font-size: 7px; font-weight: 750; }
.device-session-dialog-state.active { color: #16755d; background: #e5f7f0; }
.device-session-end-button { width: 31px; height: 31px; min-height: 0; display: grid; place-items: center; padding: 0; color: #b64c57; background: #fff3f4; border: 1px solid #f0d2d5; border-radius: 8px; }
.device-session-end-button:hover:not(:disabled) { color: #9e3540; background: #ffe9eb; }
.device-session-end-button.ending { cursor: wait; opacity: .5; }
.device-session-dialog footer { align-items: center; }
.device-session-dialog footer p { flex: 1 1 auto; margin: 0; color: #a64747; font-size: 8px; }
.empty-state { display: grid; justify-items: center; padding: 60px 22px; text-align: center; }
.empty-state h3 { margin: 13px 0 6px; font-size: 15px; }
.empty-state p { max-width: 440px; margin: 0 0 18px; color: var(--ink-500); line-height: 1.6; }
.empty-icon { width: 48px; height: 48px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 13px; font-weight: 850; }

/* Device workspace */
.back-button { margin-bottom: 17px; padding-left: 0; color: var(--ink-500); background: transparent; border: 0; }
.back-button:hover { color: var(--blue); }
.device-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.device-title { display: flex; align-items: center; gap: 15px; }
.device-icon-large { width: 54px; height: 54px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border: 1px solid #d7e4fa; border-radius: 13px; }
.status-line { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; color: var(--ink-500); font-size: 9px; }
.device-header p { margin: 7px 0 0; color: var(--ink-500); }
.device-actions { display: flex; align-items: center; gap: 9px; }
.group-policy-control select { min-height: 30px; padding: 5px 25px 5px 8px; color: var(--ink-700); background: var(--surface); border: 1px solid var(--line); border-radius: 7px; font-size: 8px; }
.agent-update-control { display: flex; align-items: flex-end; flex-direction: column; gap: 4px; }
.agent-update-control small { max-width: 260px; color: var(--ink-500); font-size: 7px; line-height: 1.3; text-align: right; }
.agent-update-control .quiet-button { min-width: 132px; }
.secure-badge { min-height: 31px; display: inline-flex; align-items: center; padding: 0 10px; color: var(--green); background: var(--green-soft); border: 1px solid #cdebe0; border-radius: 8px; font-size: 8px; font-weight: 750; }
.device-tabs { display: flex; gap: 3px; overflow-x: auto; margin-bottom: 17px; padding: 0 5px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 10px; box-shadow: var(--shadow); }
.device-tabs button { min-height: 46px; padding: 0 15px; color: var(--ink-500); background: transparent; border: 0; border-bottom: 2px solid transparent; font-size: 10px; font-weight: 680; white-space: nowrap; }
.device-tabs button:hover { color: var(--ink-800); }
.device-tabs button.active { color: var(--blue); border-bottom-color: var(--blue); }
.device-settings-layout { width: min(100%, 820px); }
.device-settings-panel { overflow: hidden; }
.software-updates-layout { width: min(100%, 1040px); margin: 0 auto; display: grid; gap: 12px; }
.software-updates-panel { overflow: hidden; }
.software-updates-heading { min-height: 78px; padding: 16px 18px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 13px; }
.software-updates-heading h2, .software-update-empty h3, .software-update-item h3 { margin: 0; }
.software-updates-heading p, .software-update-empty p, .software-update-item p, .software-update-note p { margin: 4px 0 0; color: var(--muted); line-height: 1.5; }
.software-updates-glyph, .software-update-empty-icon { width: 38px; height: 38px; border-radius: 11px; color: var(--blue); background: var(--blue-soft); display: grid; place-items: center; }
.software-updates-glyph svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.software-update-platform-empty { min-height: 220px; padding: 36px 24px; display: grid; grid-template-columns: auto minmax(0, 420px); justify-content: center; align-items: center; gap: 14px; }
.software-update-platform-empty h3 { margin: 0; font-size: 16px; }
.software-update-platform-empty p { margin: 4px 0 0; color: var(--muted); line-height: 1.5; }
.software-update-current { padding: 14px 18px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.software-update-current > div { display: grid; gap: 3px; }
.software-update-current small, .software-update-item-badges span, .software-update-attempt-copy > span { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.software-update-current strong { font-size: 16px; }
.software-update-current span { color: var(--muted); font-size: 12px; }
.software-update-sources { padding: 14px 18px 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 12px; }
.software-update-list { display: grid; }
.software-update-source { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--surface) 96%, var(--blue) 4%); }
.software-update-source > header { min-height: 68px; padding: 13px 15px 10px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.software-update-source > header h3 { margin: 0; font-size: 15px; }
.software-update-source > header p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.software-update-source > header > span { min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); font-size: 12px; font-weight: 800; }
.software-update-item { padding: 15px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; }
.software-update-item:last-child { border-bottom: 0; }
.software-update-item h3 { font-size: 15px; }
.software-update-item-version { color: var(--muted); font-size: 12px; }
.software-update-item-badges { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 7px; }
.software-update-item-badges span { padding: 4px 7px; border: 1px solid var(--line); border-radius: 999px; letter-spacing: .03em; text-transform: none; }
.software-update-item-badges .restart { color: #b76615; border-color: color-mix(in srgb, #e28a32 35%, var(--line)); background: color-mix(in srgb, #e28a32 9%, transparent); }
.software-update-attempt { margin: 14px 18px 0; padding: 14px 15px; border: 1px solid color-mix(in srgb, var(--blue) 28%, var(--line)); border-radius: 10px; background: var(--blue-soft); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; }
.software-update-attempt.failed { border-color: color-mix(in srgb, #db5264 38%, var(--line)); background: color-mix(in srgb, #db5264 9%, transparent); }
.software-update-attempt-copy { display: grid; gap: 3px; }
.software-update-attempt-copy small { color: var(--muted); }
#software-update-attempt-percent { align-self: center; font-weight: 800; color: var(--blue); }
.software-update-attempt.indeterminate #software-update-attempt-percent { color: var(--muted); font-size: 12px; }
.software-update-progress { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; grid-column: 1 / -1; }
.software-update-progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--blue); transition: width .35s ease; }
.software-update-progress.indeterminate i { width: 38%; animation: software-update-indeterminate 1.15s cubic-bezier(.65, 0, .35, 1) infinite; }
@keyframes software-update-indeterminate {
  from { transform: translateX(-115%); }
  to { transform: translateX(275%); }
}
.software-update-empty { min-height: 230px; padding: 42px 24px; display: grid; justify-items: center; align-content: center; text-align: center; }
.software-update-empty.compact { min-height: 82px; padding: 13px 15px 15px; grid-template-columns: auto minmax(0, 1fr); justify-items: start; align-items: center; align-content: initial; gap: 11px; text-align: left; }
.software-update-empty.compact .software-update-empty-icon { width: 32px; height: 32px; margin: 0; border-radius: 10px; font-size: 14px; }
.software-update-empty.compact h3 { font-size: 14px; }
.software-update-empty.compact p { margin-top: 2px; font-size: 12px; }
.software-update-empty[data-state="error"] .software-update-empty-icon { color: var(--red); background: color-mix(in srgb, var(--red) 12%, transparent); }
.software-update-empty[data-state="busy"] .software-update-empty-icon { animation: software-update-breathe 1.1s ease-in-out infinite alternate; }
@keyframes software-update-breathe { to { transform: scale(.88); opacity: .58; } }
.software-update-empty-icon { margin-bottom: 13px; font-size: 19px; font-weight: 900; }
.software-update-empty p { max-width: 540px; }
.software-update-status { min-height: 18px; margin: 0; padding: 0 18px 16px; color: var(--muted); font-size: 12px; }
.software-update-status.error { color: var(--red); }
.software-update-note { padding: 12px 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 12px; }
.software-update-note p { display: inline; margin-left: 7px; }
@media (prefers-reduced-motion: reduce) {
  .software-update-progress.indeterminate i { width: 58%; transform: none; animation: none; }
  .software-update-empty[data-state="busy"] .software-update-empty-icon { animation: none; }
}
html[data-motion="reduced"] .software-update-progress.indeterminate i { width: 58%; transform: none; animation: none; }
html[data-motion="reduced"] .software-update-empty[data-state="busy"] .software-update-empty-icon { animation: none; }
@media (max-width: 820px) {
  .software-update-sources { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .software-updates-heading { grid-template-columns: auto minmax(0, 1fr); }
  .software-updates-heading .quiet-button { grid-column: 1 / -1; width: 100%; }
  .software-update-current, .software-update-item, .software-update-platform-empty { grid-template-columns: 1fr; }
  .software-update-platform-empty { justify-items: center; text-align: center; }
  .software-update-item .quiet-button { width: 100%; }
}

/* Controller-wide agent updates */
.updates-page-header { align-items: center; }
.updates-header-actions { display: flex; align-items: center; gap: 8px; }
.agent-update-summary { display: grid; grid-template-columns: repeat(3, max-content); gap: 9px; margin-bottom: 14px; }
.agent-update-summary article { min-width: 166px; display: flex; align-items: center; gap: 11px; padding: 10px 13px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 10px; box-shadow: var(--shadow); }
.agent-update-summary strong, .agent-update-summary small { display: block; }
.agent-update-summary strong { font-size: 19px; line-height: 1; letter-spacing: -.035em; }
.agent-update-summary small { margin-top: 4px; color: var(--ink-500); font-size: 8px; font-weight: 700; }
.agent-update-summary-icon { width: 31px; height: 31px; flex: 0 0 auto; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 9px; }
.agent-update-summary-icon svg, .agent-update-page-empty svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.agent-update-summary-icon.active { color: var(--amber); background: color-mix(in srgb, var(--amber) 12%, transparent); }
.agent-update-summary-icon.current { color: var(--green); background: var(--green-soft); }
.agent-update-workspace { min-height: 250px; }
.agent-update-list-heading { min-height: 61px; }
.agent-update-last-checked { color: var(--ink-500); font-size: 8px; white-space: nowrap; }
.agent-update-page-error { margin: 13px 16px 0; padding: 10px 12px; color: var(--red); background: var(--red-soft); border: 1px solid color-mix(in srgb, var(--red) 28%, var(--line)); border-radius: 8px; font-size: 10px; }
.global-agent-update-list { display: grid; }
.global-agent-update-list[aria-busy="true"]:empty { min-height: 170px; background: linear-gradient(100deg, transparent 18%, color-mix(in srgb, var(--blue) 7%, transparent) 40%, transparent 62%) 0 0 / 220% 100%; animation: agent-update-loading 1.35s linear infinite; }
.global-agent-update-row { --update-row-index: 0; min-width: 0; display: grid; grid-template-columns: minmax(250px, 1.2fr) minmax(205px, .85fr) minmax(270px, 1.25fr) auto; align-items: center; gap: 18px; padding: 15px 17px; border-bottom: 1px solid var(--line-soft); }
.global-agent-update-row.entering { animation: agent-update-row-enter 430ms calc(var(--update-row-index) * 38ms) cubic-bezier(.18, 1.25, .32, 1) both; }
.global-agent-update-row:last-child { border-bottom: 0; }
.global-agent-update-row[data-state="failed"], .global-agent-update-row[data-state="rolledback"] { background: color-mix(in srgb, var(--red) 3%, transparent); }
.agent-update-device { min-width: 0; display: flex; align-items: center; gap: 11px; }
.agent-update-device-icon { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 10px; }
.agent-update-device-copy { min-width: 0; }
.agent-update-device-copy strong, .agent-update-device-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-update-device-copy strong { font-size: 11px; }
.agent-update-device-copy small { margin-top: 3px; color: var(--ink-500); font-size: 8px; }
.agent-update-version { min-width: 0; display: grid; gap: 4px; }
.agent-update-version-line { display: flex; align-items: center; gap: 7px; font-size: 10px; font-variant-numeric: tabular-nums; }
.agent-update-version-line span { color: var(--ink-500); }
.agent-update-version-line svg { width: 13px; height: 13px; color: var(--ink-500); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.agent-update-version > small { color: var(--ink-500); font-size: 8px; }
.agent-update-state { min-width: 0; display: grid; gap: 7px; }
.agent-update-state-line { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.agent-update-state-line strong { overflow: hidden; color: var(--ink-700); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.agent-update-state-line small { flex: 0 0 auto; color: var(--ink-500); font-size: 8px; font-variant-numeric: tabular-nums; }
.agent-update-progress { height: 6px; position: relative; overflow: hidden; background: var(--line); border-radius: 999px; }
.agent-update-progress i { width: var(--update-progress, 0%); height: 100%; display: block; position: relative; overflow: hidden; background: linear-gradient(90deg, var(--blue-dark), var(--blue)); border-radius: inherit; transition: width 600ms cubic-bezier(.18, 1.15, .32, 1); }
.global-agent-update-row[data-active="true"] .agent-update-progress i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 18%, rgba(255,255,255,.48) 48%, transparent 78%); transform: translateX(-105%); animation: agent-update-progress-glint 1.25s ease-in-out infinite; }
.global-agent-update-row[data-state="failed"] .agent-update-progress i, .global-agent-update-row[data-state="rolledback"] .agent-update-progress i { background: var(--red); }
.agent-update-detail { overflow: hidden; color: var(--ink-500); font-size: 8px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.agent-update-action { min-width: 98px; }
.agent-update-action:disabled:not(.busy) { cursor: default; }
.agent-update-action.busy::before { content: ""; width: 10px; height: 10px; display: inline-block; margin-right: 7px; vertical-align: -1px; border: 1.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 700ms linear infinite; }
.agent-update-page-empty { min-height: 190px; display: grid; grid-template-columns: auto minmax(0, 330px); place-content: center; align-items: center; gap: 13px; padding: 28px; text-align: left; }
.agent-update-page-empty > span { width: 40px; height: 40px; display: grid; place-items: center; color: var(--green); background: var(--green-soft); border-radius: 12px; }
.agent-update-page-empty h3 { margin: 0; font-size: 14px; }
.agent-update-page-empty p { margin: 4px 0 0; color: var(--ink-500); font-size: 10px; line-height: 1.5; }
@keyframes agent-update-loading { to { background-position: -220% 0; } }
@keyframes agent-update-row-enter { from { opacity: 0; transform: translateY(9px) scale(.992); } 75% { opacity: 1; transform: translateY(-1px) scale(1.002); } to { opacity: 1; transform: none; } }
@keyframes agent-update-progress-glint { 45%, 100% { transform: translateX(120%); } }

@media (max-width: 1050px) {
  .global-agent-update-row { grid-template-columns: minmax(220px, 1fr) minmax(180px, .8fr) minmax(220px, 1fr); }
  .agent-update-action { grid-column: 3; justify-self: end; }
}
@media (max-width: 760px) {
  .updates-header-actions { width: 100%; }
  .updates-header-actions button { flex: 1; }
  .agent-update-summary { grid-template-columns: 1fr; }
  .agent-update-summary article { min-width: 0; }
  .global-agent-update-row { grid-template-columns: 1fr; gap: 12px; }
  .agent-update-action { width: 100%; grid-column: auto; justify-self: stretch; }
  .agent-update-page-empty { grid-template-columns: 1fr; justify-items: center; text-align: center; }
}
.device-setting-row { display: grid; grid-template-columns: minmax(0, 1fr) 230px; align-items: center; gap: 32px; padding: 20px; border-top: 1px solid var(--line-soft); }
.device-setting-row h3 { margin: 0 0 6px; color: var(--ink-850); font-size: 12px; }
.device-setting-row p { max-width: 530px; margin: 0; color: var(--ink-500); font-size: 9px; line-height: 1.55; }
.device-setting-row small { display: block; margin-top: 7px; color: var(--ink-500); font-size: 8px; }
.device-setting-row label { display: grid; gap: 6px; color: var(--ink-500); font-size: 7px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.device-setting-row select, .device-setting-row input { width: 100%; min-height: 38px; padding: 7px 30px 7px 10px; color: var(--ink-750); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; font-size: 9px; }
.device-setting-row input { padding-right: 10px; }
.device-group-setting { min-width: 0; display: grid; gap: 8px; }
.device-setting-actions { min-height: 32px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.device-setting-actions small { min-width: 0; flex: 1; margin: 0; overflow-wrap: anywhere; text-align: right; }
.device-setting-actions small.error { color: var(--red); }
.device-setting-actions .quiet-button { min-height: 32px; flex: 0 0 auto; padding: 0 12px; font-size: 9px; }
.device-name-form { display: grid; gap: 9px; }
.device-name-actions { min-height: 32px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.device-name-actions small { flex: 1; margin: 0; color: var(--ink-500); text-align: right; }
.device-name-actions small.error { color: #b6404e; }
.device-name-actions .quiet-button { min-height: 32px; padding: 0 12px; font-size: 9px; }
.overview-summary { min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; margin-bottom: 14px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 11px; box-shadow: var(--shadow); }
.overview-summary-item { min-width: 0; padding: 12px 16px; border-left: 1px solid var(--line-soft); }
.overview-summary-item:first-child { border-left: 0; }
.overview-summary-label { display: block; margin-bottom: 5px; color: var(--ink-500); font-size: 8px; font-weight: 750; letter-spacing: .025em; text-transform: uppercase; }
.overview-summary-item strong { display: block; overflow: hidden; color: var(--ink-850); font-size: 14px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.overview-summary-item small { display: block; overflow: hidden; margin-top: 3px; color: var(--ink-500); font-size: 8.5px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.overview-summary-value { min-width: 0; display: flex; align-items: center; gap: 7px; }
.overview-summary-value strong { min-width: 0; }
.overview-columns { display: grid; grid-template-columns: .9fr 1.1fr; align-items: start; gap: 14px; }
.overview-column { min-width: 0; display: grid; align-content: start; gap: 14px; }
.overview-network-panel { margin-top: 14px; }
#device-overview .panel-heading { min-height: 72px; padding: 15px 20px; }
#device-overview .panel-heading h2 { font-size: 15px; }
#device-overview .panel-heading p { font-size: 10px; }
#device-overview .panel-heading > small { font-size: 9px; }
.detail-list { display: grid; grid-template-columns: 1fr 1fr; margin: 0; padding: 7px 18px 16px; }
.detail-list div { min-width: 0; padding: 14px 10px 14px 0; border-bottom: 1px solid var(--line-soft); }
.detail-list div:nth-last-child(-n+2) { border-bottom: 0; }
.detail-list dt { color: var(--ink-500); font-size: 9px; font-weight: 750; text-transform: uppercase; }
.detail-list dd { margin: 6px 0 0; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.history-panel { padding-bottom: 14px; }
.history-axis { display: grid; grid-template-columns: repeat(5, 1fr); padding: 15px 20px 8px 96px; color: var(--ink-500); font-size: 8.5px; }
.history-axis span:last-child { text-align: right; }
.history-days { display: grid; gap: 6px; padding: 0 18px; }
.history-row { display: grid; grid-template-columns: 66px 1fr; align-items: center; gap: 12px; }
.history-row time { color: var(--ink-500); font-size: 9px; }
.history-row .connection-track { width: 100%; min-width: 0; }
.history-note { margin: 14px 18px 0 96px; color: var(--ink-500); font-size: 9px; line-height: 1.5; }
.inventory-list { display: grid; gap: 0; padding: 0 18px 14px; }
.inventory-row { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.inventory-row:last-child { border-bottom: 0; }
.inventory-row strong, .inventory-row small { display: block; }
.inventory-row strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.inventory-row small { margin-top: 5px; color: var(--ink-500); font-size: 9px; line-height: 1.4; }
.inventory-row > span:last-child { color: var(--ink-600); font-size: 9px; text-align: right; white-space: nowrap; }
.inventory-capacity { height: 5px; margin-top: 7px; overflow: hidden; background: #e8edf3; border-radius: 999px; }
.inventory-capacity i { height: 100%; display: block; background: #3d7ced; border-radius: inherit; }
.inventory-empty { margin: 0; padding: 16px 0 4px; color: var(--ink-500); font-size: 9px; }
.network-list { grid-template-columns: 1fr 1fr; column-gap: 22px; }
.network-list .inventory-row:nth-last-child(-n+2) { border-bottom: 0; }
.feature-placeholder { min-height: 430px; display: grid; place-content: center; justify-items: center; padding: 44px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 11px; box-shadow: var(--shadow); text-align: center; }
.feature-placeholder > span { width: 54px; height: 54px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 14px; font-size: 14px; font-weight: 850; }
.feature-placeholder h2 { margin: 17px 0 7px; font-size: 21px; }
.feature-placeholder p { max-width: 490px; margin: 0; color: var(--ink-500); line-height: 1.65; }
.file-workspace { min-width: 0; }
.file-session-bar { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 12px; padding: 9px 12px 9px 16px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 10px; box-shadow: var(--shadow); }
.file-session-identity { min-width: 0; display: flex; align-items: center; gap: 10px; }
.file-session-identity strong, .file-session-identity small { display: block; }
.file-session-identity strong { color: var(--ink-850); font-size: 10px; }
.file-session-identity small { max-width: 590px; margin-top: 3px; overflow: hidden; color: var(--ink-500); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.file-session-identity small.error { color: #a64747; }
.file-status-dot { width: 9px; height: 9px; flex: 0 0 auto; background: #aab5c2; border-radius: 999px; box-shadow: 0 0 0 4px #eef1f5; }
.file-workspace.active .file-status-dot { background: #26b987; box-shadow: 0 0 0 4px #e4f8f1; }
.file-workspace.pending .file-status-dot { background: #d79a39; box-shadow: 0 0 0 4px #fff3df; }
.file-session-actions { display: flex; gap: 7px; }
.file-unavailable { min-height: 500px; display: grid; place-content: center; justify-items: center; padding: 50px; color: var(--ink-500); background: var(--surface); border: 1px solid var(--line-soft); border-radius: 11px; box-shadow: var(--shadow); text-align: center; }
.file-unavailable > span { width: 58px; height: 58px; display: grid; place-items: center; color: #3977e8; background: #eaf2ff; border-radius: 15px; font-size: 16px; font-weight: 850; }
.file-unavailable h2 { margin: 17px 0 7px; color: var(--ink-850); font-size: 21px; }
.file-unavailable p { max-width: 520px; margin: 0; font-size: 10px; line-height: 1.65; }
.file-explorer { min-height: 590px; display: grid; grid-template-columns: 205px minmax(0, 1fr); overflow: hidden; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 11px; box-shadow: var(--shadow); }
.file-sidebar { padding: 15px 10px; background: #f8fafc; border-right: 1px solid var(--line-soft); }
.file-sidebar-heading { padding: 3px 10px 11px; }
.file-sidebar-heading strong, .file-sidebar-heading small { display: block; }
.file-sidebar-heading strong { font-size: 10px; }
.file-sidebar-heading small { margin-top: 3px; color: var(--ink-500); font-size: 7px; }
#file-roots { display: grid; gap: 3px; }
#file-roots button { width: 100%; display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 9px; padding: 8px 9px; color: var(--ink-650); background: transparent; border: 0; border-radius: 7px; text-align: left; }
#file-roots button:hover { background: #edf2f7; }
#file-roots button.active { color: #1f5fbf; background: #e7f0ff; }
#file-roots button > span:last-child { min-width: 0; }
#file-roots strong, #file-roots small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#file-roots strong { font-size: 8px; }
#file-roots small { margin-top: 3px; color: var(--ink-500); font-size: 7px; }
.file-drive-glyph { width: 29px; height: 25px; display: grid; place-items: center; color: #3977e8; background: var(--surface); border: 1px solid #cdd9e8; border-radius: 5px; box-shadow: inset 0 -4px 0 #e5edf7; font-size: 7px; font-weight: 850; }
.file-main { min-width: 0; display: grid; grid-template-rows: auto auto minmax(430px, 1fr) auto; }
.file-navigation { display: grid; grid-template-columns: auto minmax(220px, 1fr) minmax(170px, .35fr); align-items: center; gap: 9px; padding: 9px 12px; border-bottom: 1px solid var(--line-soft); }
.file-nav-buttons { display: flex; gap: 3px; }
.file-nav-buttons button { width: 29px; height: 29px; padding: 0; color: #52667f; background: transparent; border: 0; border-radius: 6px; font-size: 14px; }
.file-nav-buttons button:hover:not(:disabled) { background: #edf2f7; }
.file-nav-buttons button:disabled { color: #bbc3cd; }
.file-breadcrumbs { min-width: 0; height: 32px; display: flex; align-items: center; overflow: hidden; padding: 0 7px; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; white-space: nowrap; }
.file-breadcrumbs button { min-width: 0; max-width: 220px; overflow: hidden; padding: 5px 7px; color: var(--ink-650); background: transparent; border: 0; border-radius: 4px; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.file-breadcrumbs button:hover { color: var(--blue-dark); background: var(--blue-soft); }
.file-breadcrumbs span { color: #9eabba; font-size: 8px; }
.file-search { height: 32px; display: flex; align-items: center; gap: 7px; padding: 0 9px; border: 1px solid var(--line); border-radius: 7px; }
.file-search span { color: #8794a5; font-size: 7px; }
.file-search input { min-width: 0; width: 100%; padding: 0; color: var(--ink-700); background: transparent; border: 0; outline: 0; font-size: 8px; }
.file-command-bar { min-height: 43px; display: flex; align-items: center; gap: 3px; padding: 6px 12px; border-bottom: 1px solid var(--line-soft); }
.file-command-bar button { min-height: 29px; display: flex; align-items: center; gap: 6px; padding: 0 8px; color: var(--ink-650); background: transparent; border: 0; border-radius: 6px; font-size: 8px; }
.file-command-bar button:hover:not(:disabled) { color: var(--ink-850); background: #edf2f7; }
.file-command-bar button:disabled { color: #b6bec8; }
.file-command-bar button span { color: #3977e8; font-size: 12px; }
.file-command-bar i { width: 1px; height: 20px; margin: 0 4px; background: var(--line); }
.file-command-bar .file-delete-command:not(:disabled) { color: #a64747; }
.file-list-wrap { min-height: 430px; position: relative; overflow: auto; }
.file-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.file-table th { position: sticky; top: 0; z-index: 2; padding: 0; color: var(--ink-500); background: var(--surface-muted); border-bottom: 1px solid var(--line-soft); text-align: left; }
.file-table th:nth-child(1) { width: 46%; }
.file-table th:nth-child(2) { width: 22%; }
.file-table th:nth-child(3) { width: 20%; }
.file-table th:nth-child(4) { width: 12%; }
.file-table th button { width: 100%; min-height: 30px; display: flex; align-items: center; gap: 4px; padding: 0 10px; color: inherit; background: transparent; border: 0; font-size: 7px; font-weight: 750; text-align: left; }
.file-table th button:hover, .file-table th button.active { color: #285fba; background: #f0f5fc; }
.file-table tbody tr { height: 40px; color: var(--ink-650); border-bottom: 1px solid #f0f2f5; outline: 0; }
.file-table tbody tr:hover { background: #f6f9fd; }
.file-table tbody tr.selected { background: #e7f0ff; }
.file-table tbody tr:focus { box-shadow: inset 0 0 0 1px #86aff0; }
.file-table tbody tr.muted { opacity: .66; }
.file-table td { overflow: hidden; padding: 6px 10px; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.file-table td.file-size { text-align: right; }
.file-entry-name { display: flex; align-items: center; gap: 9px; }
.file-entry-name > span:last-child { min-width: 0; }
.file-entry-name strong, .file-entry-name small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-entry-name strong { font-size: 8px; font-weight: 650; }
.file-entry-name small { margin-top: 2px; color: var(--ink-500); font-size: 6px; }
.file-entry-icon { width: 27px; height: 27px; position: relative; flex: 0 0 auto; display: grid; place-items: center; color: white; border-radius: 4px; font-size: 5px; font-weight: 850; letter-spacing: -.02em; }
.file-entry-icon.folder { height: 20px; margin-top: 5px; background: #eab84f; border-radius: 3px; box-shadow: inset 0 -3px 0 rgba(151, 95, 11, .13); }
.file-entry-icon.folder::before { content: ""; width: 12px; height: 5px; position: absolute; left: 2px; top: -4px; background: #eab84f; border-radius: 3px 3px 0 0; }
.file-entry-icon.file { color: #45627f; background: #e8eef5; border: 1px solid #c7d2df; }
.file-entry-icon.file::after { content: ""; width: 7px; height: 7px; position: absolute; right: -1px; top: -1px; background: var(--surface); border-left: 1px solid #c7d2df; border-bottom: 1px solid #c7d2df; }
.file-entry-icon.file.image { color: white; background: #43a381; border-color: #34866a; }
.file-entry-icon.file.archive { color: white; background: #9b6dcc; border-color: #8054b0; }
.file-entry-icon.file.executable { color: white; background: #3977e8; border-color: #285fbd; }
.file-entry-icon.file.document { color: white; background: #5b86bd; border-color: #466e9f; }
.file-list-message { min-height: 330px; display: grid; place-content: center; justify-items: center; gap: 9px; color: var(--ink-500); text-align: center; }
.file-list-message strong { color: var(--ink-750); font-size: 11px; }
.file-list-message small { font-size: 8px; }
.file-empty-glyph { width: 44px; height: 36px; display: grid; place-items: center; color: #ad791f; background: #f4ca6e; border-radius: 7px; font-size: 9px; font-weight: 850; }
.file-drop-overlay { position: absolute; z-index: 5; inset: 10px; display: grid; place-content: center; justify-items: center; color: #285fba; background: rgba(235, 243, 255, .96); border: 2px dashed #78a4e8; border-radius: 10px; text-align: center; }
.file-drop-overlay > span { width: 45px; height: 45px; display: grid; place-items: center; background: var(--surface); border-radius: 50%; font-size: 21px; }
.file-drop-overlay strong { margin-top: 10px; font-size: 13px; }
.file-drop-overlay small { margin-top: 5px; color: #6280a8; font-size: 8px; }
.file-status-bar { min-height: 28px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 12px; color: var(--ink-500); background: var(--surface-muted); border-top: 1px solid var(--line-soft); font-size: 7px; }
.file-transfers { margin-top: 12px; overflow: hidden; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 11px; box-shadow: var(--shadow); }
.file-transfers > header { min-height: 45px; display: flex; align-items: center; justify-content: space-between; padding: 0 15px; border-bottom: 1px solid var(--line-soft); }
.file-transfers > header strong, .file-transfers > header small { display: block; }
.file-transfers > header strong { font-size: 10px; }
.file-transfers > header small { margin-top: 2px; color: var(--ink-500); font-size: 7px; }
.file-transfers > header button { color: #54708f; background: transparent; border: 0; font-size: 7px; }
#file-transfer-list { display: grid; max-height: 250px; overflow: auto; }
.file-transfer { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 15px; border-bottom: 1px solid var(--line-soft); }
.file-transfer:last-child { border-bottom: 0; }
.file-transfer-glyph { width: 28px; height: 28px; display: grid; place-items: center; color: #3977e8; background: #eaf2ff; border-radius: 7px; font-size: 12px; font-weight: 850; }
.file-transfer.complete .file-transfer-glyph { color: #16805f; background: #e4f7ef; }
.file-transfer.failed .file-transfer-glyph, .file-transfer.paused .file-transfer-glyph { color: #a55d25; background: #fff0df; }
.file-transfer-copy { min-width: 0; }
.file-transfer-copy strong, .file-transfer-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-transfer-copy strong { font-size: 8px; }
.file-transfer-copy small { margin-top: 3px; color: var(--ink-500); font-size: 7px; }
.file-transfer.failed .file-transfer-copy small { color: #a64747; }
.file-transfer-progress { height: 3px; margin-top: 6px; overflow: hidden; background: #e8edf3; border-radius: 9px; }
.file-transfer-progress i { height: 100%; display: block; background: #3977e8; border-radius: inherit; transition: width .2s ease; }
.file-transfer.complete .file-transfer-progress i { background: #26a87f; }
.file-transfer-actions { display: flex; gap: 5px; }
.file-transfer-actions button { min-height: 26px; padding: 0 8px; color: #45627f; background: #f7f9fb; border: 1px solid var(--line); border-radius: 6px; font-size: 7px; }
.file-context-menu { width: 165px; position: fixed; z-index: 50; display: grid; margin: 0; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 14px 35px rgba(24, 39, 60, .22); }
.file-context-menu button { min-height: 29px; padding: 0 9px; color: var(--ink-650); background: transparent; border: 0; border-radius: 5px; font-size: 8px; text-align: left; }
.file-context-menu button:hover { background: #edf2f7; }
.file-context-menu button.danger { color: #a64747; }
.file-context-menu hr { width: 100%; margin: 4px 0; border: 0; border-top: 1px solid var(--line-soft); }
.finder-window-controls { display: none; }
.file-workspace.finder-mode .file-explorer { grid-template-columns: 190px minmax(0, 1fr); overflow: hidden; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif; background: #f7f7f8; border-color: rgba(78, 78, 86, .22); border-radius: 13px; box-shadow: 0 22px 55px rgba(24, 28, 35, .18); }
.file-workspace.finder-mode .file-sidebar { padding: 13px 9px; background: linear-gradient(180deg, rgba(233, 236, 241, .96), rgba(222, 226, 233, .94)); border-right-color: rgba(94, 96, 104, .18); backdrop-filter: blur(22px) saturate(1.3); }
.file-workspace.finder-mode .file-sidebar-heading { padding: 5px 9px 8px; }
.file-workspace.finder-mode .file-sidebar-heading strong { color: #707078; font-size: 7px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.file-workspace.finder-mode .file-sidebar-heading small { display: none; }
.file-workspace.finder-mode #file-roots { gap: 1px; }
.file-workspace.finder-mode #file-roots button { grid-template-columns: 25px minmax(0, 1fr); gap: 6px; min-height: 30px; padding: 5px 8px; color: #26262b; border-radius: 6px; }
.file-workspace.finder-mode #file-roots button:hover { background: rgba(120, 124, 132, .11); }
.file-workspace.finder-mode #file-roots button.active { color: #16161a; background: rgba(78, 145, 224, .23); }
.file-workspace.finder-mode #file-roots strong { font-size: 8px; font-weight: 600; }
.file-workspace.finder-mode #file-roots small { display: none; }
.file-workspace.finder-mode .file-drive-glyph { width: 23px; height: 22px; color: #1684e8; background: transparent; border: 0; border-radius: 4px; box-shadow: none; font-size: 9px; font-weight: 800; }
.file-workspace.finder-mode .file-main { background: #fff; }
.file-workspace.finder-mode .file-navigation { grid-template-columns: auto auto minmax(180px, 1fr) minmax(150px, .32fr); gap: 8px; min-height: 47px; padding: 7px 10px; background: linear-gradient(#f5f5f6, #e9e9eb); border-bottom-color: #cfcfd2; }
.file-workspace.finder-mode .finder-window-controls { display: flex; gap: 6px; padding: 0 4px 0 1px; }
.file-workspace.finder-mode .finder-window-controls i { width: 10px; height: 10px; background: #ff5f57; border: 1px solid #e0443e; border-radius: 50%; }
.file-workspace.finder-mode .finder-window-controls i:nth-child(2) { background: #febc2e; border-color: #d89d22; }
.file-workspace.finder-mode .finder-window-controls i:nth-child(3) { background: #28c840; border-color: #20a934; }
.file-workspace.finder-mode .file-nav-buttons button { width: 27px; height: 27px; color: #505057; border: 1px solid transparent; font-size: 13px; }
.file-workspace.finder-mode .file-nav-buttons button:hover:not(:disabled) { background: rgba(255, 255, 255, .65); border-color: rgba(80, 80, 86, .18); }
.file-workspace.finder-mode .file-breadcrumbs { height: 28px; justify-content: center; background: transparent; border: 0; }
.file-workspace.finder-mode .file-breadcrumbs button { color: #39393f; font-size: 8px; font-weight: 600; }
.file-workspace.finder-mode .file-breadcrumbs button:hover { color: #075fab; background: rgba(10, 132, 255, .09); }
.file-workspace.finder-mode .file-search { height: 27px; background: rgba(255, 255, 255, .72); border-color: rgba(95, 95, 102, .24); border-radius: 7px; }
.file-workspace.finder-mode .file-search span { display: none; }
.file-workspace.finder-mode .file-command-bar { min-height: 38px; padding: 4px 10px; background: #f4f4f5; border-bottom-color: #d7d7da; }
.file-workspace.finder-mode .file-command-bar button { min-height: 27px; color: #38383d; border-radius: 5px; }
.file-workspace.finder-mode .file-command-bar button:hover:not(:disabled) { background: #e1e1e4; }
.file-workspace.finder-mode .file-command-bar button span { color: #087ee2; }
.file-workspace.finder-mode .file-table th { color: #696970; background: #f6f6f7; border-bottom-color: #d7d7da; }
.file-workspace.finder-mode .file-table th button { min-height: 25px; padding-inline: 8px; font-size: 7px; font-weight: 600; }
.file-workspace.finder-mode .file-table tbody tr { height: 32px; color: #28282d; border-bottom: 0; }
.file-workspace.finder-mode .file-table tbody tr:nth-child(even) { background: #f5f7fa; }
.file-workspace.finder-mode .file-table tbody tr:hover { background: #e8f1fb; }
.file-workspace.finder-mode .file-table tbody tr.selected { color: white; background: #0a84ff; }
.file-workspace.finder-mode .file-table tbody tr.selected small { color: rgba(255, 255, 255, .78); }
.file-workspace.finder-mode .file-table tbody tr.muted:not(.selected) { opacity: .55; }
.file-workspace.finder-mode .file-table td { padding: 4px 8px; font-size: 8px; }
.file-workspace.finder-mode .file-entry-name { gap: 7px; }
.file-workspace.finder-mode .file-entry-name strong { font-weight: 500; }
.file-workspace.finder-mode .file-entry-icon { width: 23px; height: 23px; }
.file-workspace.finder-mode .file-entry-icon.folder { height: 16px; margin-top: 4px; background: linear-gradient(#58b9ff, #2395e9); box-shadow: inset 0 -2px 0 rgba(0, 72, 139, .14); }
.file-workspace.finder-mode .file-entry-icon.folder::before { width: 10px; height: 4px; background: #58b9ff; }
.file-workspace.finder-mode .file-entry-icon.file { color: #55606d; background: linear-gradient(#fff, #e7ebef); border-color: #b8c0c8; }
.file-workspace.finder-mode .file-status-bar { min-height: 24px; justify-content: center; color: #73737b; background: #f3f3f4; border-top-color: #d7d7da; }
.file-workspace.finder-mode .file-status-bar span + span::before { content: "•"; margin-right: 12px; color: #a4a4aa; }
.file-workspace.finder-mode .file-context-menu { background: rgba(248, 248, 249, .96); border-color: rgba(90, 90, 96, .26); border-radius: 7px; box-shadow: 0 14px 38px rgba(20, 20, 25, .3); backdrop-filter: blur(20px); }
.file-workspace.finder-mode .file-context-menu button:hover { color: white; background: #0a84ff; }
.file-dialog { width: min(520px, calc(100vw - 30px)); padding: 0; color: var(--ink-750); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 24px 70px rgba(20, 34, 52, .3); }
.file-dialog::backdrop { background: rgba(16, 28, 45, .35); backdrop-filter: blur(2px); }
.file-dialog form > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 17px 19px; border-bottom: 1px solid var(--line-soft); }
.file-dialog header strong, .file-dialog header small { display: block; }
.file-dialog header strong { font-size: 12px; }
.file-dialog header small { margin-top: 4px; color: var(--ink-500); font-size: 8px; }
.file-dialog header button { color: var(--ink-500); background: transparent; border: 0; font-size: 18px; }
.file-dialog label { display: grid; gap: 6px; margin: 17px 19px 0; color: var(--ink-500); font-size: 8px; font-weight: 750; }
.file-dialog label input[type="text"], .file-dialog label input:not([type]) { width: 100%; padding: 10px; color: var(--ink-750); border: 1px solid var(--line); border-radius: 7px; font: 9px "Cascadia Mono", Consolas, monospace; }
.file-dialog .file-overwrite-option { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.file-dialog .file-overwrite-option input { width: auto; }
#file-dialog-error { min-height: 16px; margin: 10px 19px 0; color: #a64747; font-size: 8px; }
.file-dialog footer { display: flex; justify-content: flex-end; gap: 7px; padding: 14px 19px 18px; }
.screen-reader-only { width: 1px; height: 1px; position: absolute; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.desktop-workspace { min-width: 0; }
.desktop-toolbar { min-height: 48px; position: relative; z-index: 60; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; padding: 7px 8px 7px 12px; background: rgba(255, 255, 255, .94); border: 1px solid #e4e9f0; border-radius: 11px; box-shadow: 0 7px 22px rgba(27, 43, 65, .06); }
.desktop-identity { min-width: 180px; display: flex; align-items: center; gap: 9px; }
.desktop-identity strong, .desktop-identity small { display: block; }
.desktop-identity strong { font-size: 9px; }
.desktop-identity small { max-width: 460px; margin-top: 2px; overflow: hidden; color: var(--ink-500); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.desktop-identity small.error { color: #c55a64; }
.desktop-status-dot { width: 7px; height: 7px; flex: 0 0 auto; background: #aab5c2; border-radius: 999px; box-shadow: 0 0 0 3px #eef1f5; }
.desktop-workspace.active .desktop-status-dot { background: #26b987; box-shadow: 0 0 0 3px #e4f8f1; }
.desktop-workspace.pending .desktop-status-dot { background: #d79a39; box-shadow: 0 0 0 3px #fff3df; }
.desktop-controls { display: flex; align-items: center; justify-content: flex-end; gap: 4px; flex-wrap: nowrap; }
.desktop-controls button { min-height: 30px; padding-inline: 10px; border-radius: 8px; font-size: 8px; box-shadow: none; }
.desktop-view-only-toggle { min-height: 30px; display: flex; align-items: center; gap: 7px; padding: 0 8px; color: var(--ink-600); background: transparent; border: 0; border-radius: 8px; cursor: pointer; font-size: 8px; font-weight: 750; user-select: none; transition: color .15s ease, background .15s ease; }
.desktop-view-only-toggle:hover:not(.disabled) { color: var(--ink-800); background: #f3f6fa; }
.desktop-view-only-toggle.checked { color: #246b55; background: #eff9f5; }
.desktop-view-only-toggle.disabled { cursor: not-allowed; opacity: .58; }
.desktop-view-only-toggle input, .desktop-overlay-view-only input { width: 1px; height: 1px; position: absolute; overflow: hidden; opacity: 0; pointer-events: none; }
.desktop-view-only-box { width: 27px; height: 16px; position: relative; display: block; flex: 0 0 auto; background: #cbd4df; border: 0; border-radius: 999px; transition: background .16s ease; }
.desktop-view-only-box::after { content: ""; width: 12px; height: 12px; position: absolute; top: 2px; left: 2px; background: white; border-radius: 999px; box-shadow: 0 1px 3px rgba(24, 39, 59, .28); transition: transform .16s ease; }
.desktop-view-only-toggle.checked .desktop-view-only-box { background: #2eaa83; }
.desktop-view-only-toggle.checked .desktop-view-only-box::after { transform: translateX(11px); }
.desktop-view-only-toggle:focus-within { outline: 2px solid rgba(76, 143, 251, .38); outline-offset: 2px; }
.desktop-session-button { min-width: 82px; }
.desktop-session-button.session-active:disabled { cursor: default; opacity: 1; color: #276b56; background: #edf8f4; border-color: #cfe9df; }
.desktop-session-button.session-pending:disabled { cursor: wait; opacity: 1; color: #8a6228; background: #fff6e8; border-color: #f1debd; }
.desktop-session-actions { display: flex; align-items: center; padding: 2px; background: #f4f6f9; border: 1px solid #e5eaf0; border-radius: 9px; }
.desktop-icon-button { width: 28px; height: 26px; min-height: 0 !important; display: grid; place-items: center; padding: 0 !important; color: #64748a; background: transparent; border: 0; border-radius: 7px !important; }
.desktop-icon-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.desktop-icon-button:hover:not(:disabled) { color: #245da7; background: white; box-shadow: 0 1px 5px rgba(32, 49, 73, .12); }
.desktop-icon-button.destructive { color: #b9555f; }
.desktop-icon-button.destructive:hover:not(:disabled) { color: #a83e49; background: #fff0f1; }
.desktop-icon-button:disabled { cursor: not-allowed; opacity: .38; }
.desktop-inline-tools { min-width: 0; display: flex; flex: 1 1 auto; align-items: center; justify-content: center; }
.desktop-surface { position: relative; }
.desktop-tools-drawer { width: 34px; position: absolute; z-index: 25; top: 8px; right: auto; left: 8px; display: none; transform: none; }
.desktop-tools-drawer > summary, .desktop-action-menu > summary { list-style: none; cursor: pointer; user-select: none; }
.desktop-tools-drawer > summary::marker, .desktop-action-menu > summary::marker { content: ""; }
.desktop-tools-drawer > summary::-webkit-details-marker, .desktop-action-menu > summary::-webkit-details-marker { display: none; }
.desktop-tools-drawer > summary { width: 34px; height: 34px; min-height: 0; display: grid; place-items: center; padding: 0; color: #dce6f4; background: rgba(12, 21, 34, .86); border: 1px solid rgba(147, 168, 197, .26); border-radius: 10px; box-shadow: 0 7px 20px rgba(2, 8, 20, .25); backdrop-filter: blur(14px); transition: color .15s ease, background .15s ease, transform .15s ease; }
.desktop-tools-drawer > summary:hover, .desktop-tools-drawer[open] > summary { color: white; background: rgba(19, 32, 50, .96); }
.desktop-tools-drawer[open] > summary { transform: translateY(1px); }
.desktop-tools-icon { width: 17px; height: 17px; fill: #7faaff; stroke: currentColor; stroke-width: 1.35; stroke-linecap: round; }
.desktop-tools-icon circle { stroke: rgba(12, 21, 34, .96); stroke-width: 2.5; }
.desktop-menu-chevron { width: 14px; height: 14px; margin-left: auto; color: #8193ab; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .38s cubic-bezier(.34, 1.56, .64, 1); }
.desktop-tools-drawer[open] > summary .desktop-menu-chevron, .desktop-action-menu[open] > summary .desktop-menu-chevron { transform: rotate(180deg); }
.desktop-command-bar { width: min(268px, calc(100vw - 24px)); max-height: min(72vh, 590px); position: absolute; top: calc(100% + 8px); right: auto; left: 0; display: block; overflow-x: hidden; overflow-y: auto; padding: 7px; color: #e8eef8; background: rgba(11, 19, 31, .9); border: 1px solid rgba(137, 157, 185, .28); border-radius: 14px; box-shadow: 0 20px 48px rgba(1, 7, 18, .4); backdrop-filter: blur(18px); scrollbar-color: #405169 transparent; scrollbar-width: thin; }
.desktop-command-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 5px 7px 9px; }
.desktop-command-heading span { color: #f3f6fb; font-size: 9px; font-weight: 800; }
.desktop-command-heading small { color: #71839c; font-size: 6px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.desktop-native-choice { display: none !important; }
.desktop-action-menu { position: relative; }
.desktop-action-menu > summary { min-height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 8px; color: #cbd6e5; border-radius: 8px; font-size: 8px; font-weight: 750; }
.desktop-action-menu > summary:hover, .desktop-action-menu[open] > summary { color: white; background: #1e2d42; }
.desktop-action-menu.unavailable:not([open]) > summary { opacity: .55; }
.desktop-tools-footer { display: grid; gap: 2px; margin-top: 6px; padding-top: 7px; border-top: 1px solid #27374d; }
.desktop-fullscreen-exit { display: none; }
.desktop-overlay-action { width: 100%; min-height: 35px; display: flex; align-items: center; gap: 8px; padding: 0 8px; color: #cbd6e5; background: transparent; border: 0; border-radius: 8px; font-size: 8px; font-weight: 750; text-align: left; }
.desktop-overlay-action:hover:not(:disabled) { color: white; background: #1e2d42; }
.desktop-overlay-action:disabled { cursor: not-allowed; opacity: .4; }
.desktop-overlay-action.destructive { color: #f2a2aa; }
.desktop-overlay-action.destructive:hover:not(:disabled) { color: #ffc1c7; background: #3a222c; }
.desktop-overlay-view-only { position: relative; cursor: pointer; user-select: none; }
.desktop-overlay-view-only:hover:not(.disabled) { color: white; background: #1e2d42; }
.desktop-overlay-view-only.checked { color: #baf4df; background: #173f35; }
.desktop-overlay-view-only.disabled { cursor: not-allowed; opacity: .4; }
.desktop-overlay-view-only .desktop-view-only-box { width: 27px; height: 16px; margin-right: 1px; background: #47586f; }
.desktop-overlay-view-only.checked .desktop-view-only-box { background: #61caa6; }
.desktop-overlay-view-only.checked .desktop-view-only-box::after { transform: translateX(11px); }
.desktop-overlay-view-only:focus-within { outline: 2px solid rgba(113, 167, 255, .65); outline-offset: -1px; }
.desktop-action-icon { width: 17px; height: 17px; flex: 0 0 auto; color: #8fb6f4; fill: none; stroke: currentColor; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; }
.desktop-action-icon circle, .desktop-action-icon rect { fill: none; }
.desktop-action-popover { width: auto; position: static; overflow: hidden; margin: 1px 0 6px; padding: 4px; color: #e6edf7; background: #0c1522; border: 1px solid #26364a; border-radius: 9px; box-shadow: none; transform: none; transform-origin: top center; }
.desktop-action-popover button { width: 100%; min-height: 39px; display: grid; gap: 2px; padding: 6px 8px; color: #e6edf7; background: transparent; border: 0; border-radius: 7px; text-align: left; }
.desktop-action-popover button:hover:not(:disabled) { background: #1d2b40; }
.desktop-action-popover button.selected { color: white; background: #243a59; box-shadow: inset 2px 0 #6d9ff2; }
.desktop-action-popover button:disabled { cursor: not-allowed; opacity: .38; }
.desktop-action-popover button span { font-size: 8px; font-weight: 750; }
.desktop-action-popover button small { color: #8fa0b8; font-size: 7px; }
.desktop-action-popover button.destructive span { color: #ff9ca4; }
.desktop-shortcut-popover { width: auto; max-height: min(48vh, 390px); display: block; overflow-y: auto; }
.desktop-shortcut-popover section { min-width: 0; padding: 3px; }
.desktop-shortcut-popover section > strong { display: block; padding: 3px 7px 6px; color: #7f93ae; font-size: 6px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.desktop-shortcut-popover button { min-height: 32px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 5px; }
.desktop-shortcut-popover kbd { flex: 0 0 auto; padding: 3px 5px; color: #9eb0c8; background: #0b1421; border: 1px solid #2c3b50; border-radius: 4px; font-family: inherit; font-size: 6px; font-weight: 700; }
.desktop-inline-tools > .desktop-command-bar { width: auto; max-width: 100%; max-height: none; position: static; display: flex; align-items: center; gap: 3px; overflow: visible; padding: 0; color: var(--ink-700); background: transparent; border: 0; border-radius: 0; box-shadow: none; backdrop-filter: none; }
.desktop-inline-tools .desktop-command-heading, .desktop-inline-tools .desktop-tools-footer { display: none; }
.desktop-inline-tools .desktop-action-menu { position: relative; }
.desktop-inline-tools .desktop-action-menu > summary { width: 30px; height: 30px; min-height: 30px; justify-content: center; gap: 0; padding: 0; color: #64748a; border-radius: 8px; }
.desktop-inline-tools .desktop-action-menu > summary:hover, .desktop-inline-tools .desktop-action-menu[open] > summary { color: #245da7; background: #edf4ff; }
.desktop-inline-tools .desktop-action-menu > summary > span, .desktop-inline-tools .desktop-action-menu > summary > .desktop-menu-chevron { display: none; }
.desktop-inline-tools .desktop-action-icon { width: 16px; height: 16px; color: currentColor; }
.desktop-inline-tools .desktop-action-popover { width: 248px; position: absolute; z-index: 40; top: calc(100% + 8px); left: 50%; overflow: hidden; margin: 0; padding: 5px; color: var(--ink-750); background: rgba(255, 255, 255, .98); border: 1px solid #dce3ec; border-radius: 11px; box-shadow: 0 16px 38px rgba(22, 37, 57, .2); transform: translateX(-50%); transform-origin: top center; }
.desktop-inline-tools .desktop-action-popover button { color: var(--ink-750); }
.desktop-inline-tools .desktop-action-popover button:hover:not(:disabled) { background: #f0f5fc; }
.desktop-inline-tools .desktop-action-popover button.selected { color: #174f9c; background: #edf4ff; box-shadow: inset 2px 0 #6d9ff2; }
.desktop-inline-tools .desktop-action-popover button small { color: var(--ink-500); }
.desktop-inline-tools .desktop-action-popover button.destructive span { color: #b44450; }
.desktop-inline-tools .desktop-shortcut-popover { width: min(590px, calc(100vw - 48px)); max-height: min(68vh, 520px); display: grid; grid-template-columns: repeat(3, minmax(150px, 1fr)); gap: 3px; overflow-y: auto; }
.desktop-inline-tools .desktop-shortcut-popover section > strong { color: #738196; }
.desktop-inline-tools .desktop-shortcut-popover kbd { color: #64748a; background: #f3f6fa; border-color: #dce3ec; }
.desktop-stream-stats { min-width: 0; display: flex; align-items: center; gap: 3px; margin-left: 3px; padding-left: 6px; border-left: 1px solid var(--line-soft); pointer-events: none; }
.desktop-stream-stats span { min-height: 18px; display: inline-flex; align-items: center; padding: 0 5px; color: var(--ink-600); background: var(--surface-soft); border: 1px solid var(--line-soft); border-radius: 6px; box-shadow: 0 1px 3px rgba(24, 39, 59, .05); font: 6px/1 "Cascadia Mono", Consolas, monospace; white-space: nowrap; }
.desktop-stream-stats span:first-child { color: #245da7; background: #edf4ff; border-color: #d6e5fb; }
#desktop-tools-drawer .desktop-stream-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin: 6px 0 0; padding: 7px 0 0; border-top: 1px solid #27374d; border-left: 0; }
#desktop-tools-drawer .desktop-stream-stats span { min-height: 24px; justify-content: center; color: #cbd6e5; background: #111d2c; border-color: #26364a; box-shadow: none; }
#desktop-tools-drawer .desktop-stream-stats span:first-child { color: #9cc1ff; background: #14243a; border-color: #294568; }
.desktop-choice-popover { max-height: min(55vh, 330px); overflow-y: auto; }
.desktop-action-menu[open] > .desktop-action-popover,
.desktop-tools-drawer[open] > .desktop-command-bar,
.file-context-menu:not(.hidden) { transform-origin: top center; animation: northstar-dropdown-spring .48s both; will-change: translate, scale, opacity; }
.desktop-tools-drawer[open] > .desktop-command-bar,
.file-context-menu:not(.hidden) { transform-origin: top left; }
@keyframes northstar-dropdown-spring {
  0% { opacity: 0; translate: 0 -8px; scale: 1 .86; }
  42% { opacity: 1; translate: 0 2px; scale: 1 1.045; }
  62% { translate: 0 -1px; scale: 1 .982; }
  78% { translate: 0 .6px; scale: 1 1.012; }
  90% { translate: 0 -.25px; scale: 1 .996; }
  100% { opacity: 1; translate: 0 0; scale: 1 1; }
}
.desktop-empty { min-height: 520px; display: grid; place-content: center; justify-items: center; padding: 50px; color: var(--ink-500); background: var(--surface); border: 1px solid var(--line-soft); border-radius: 11px; box-shadow: var(--shadow); text-align: center; }
.desktop-empty-glyph { width: 62px; height: 62px; display: grid; place-items: center; color: #8db6ff; background: #12223a; border: 1px solid #2b4568; border-radius: 16px; font-size: 10px; font-weight: 850; }
.desktop-empty h2 { margin: 18px 0 7px; color: var(--ink-850); font-size: 21px; }
.desktop-empty p { max-width: 650px; margin: 0; font-size: 10px; line-height: 1.7; }
.desktop-empty small { margin-top: 13px; color: var(--ink-500); font-size: 8px; }
.desktop-stage { overflow: hidden; background: #080c12; border: 1px solid #26344a; border-radius: 11px; box-shadow: 0 18px 45px rgba(16, 27, 44, .25); }
.desktop-android-navigation { width: max-content; min-height: 42px; display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0; padding: 5px 10px; background: rgba(10, 17, 27, .94); border: 1px solid rgba(115, 139, 174, .28); border-radius: 15px; box-shadow: 0 10px 28px rgba(5, 12, 22, .26); backdrop-filter: blur(12px); }
.desktop-android-navigation button { width: 42px; height: 32px; display: grid; place-items: center; padding: 0; color: #c7d1df; background: transparent; border: 0; border-radius: 999px; transition: color .14s ease, background .14s ease, transform .08s ease; }
.desktop-android-navigation button:hover:not(:disabled) { color: white; background: rgba(116, 151, 201, .16); }
.desktop-android-navigation button:active:not(:disabled) { color: white; background: rgba(116, 151, 201, .24); transform: scale(.9); }
.desktop-android-navigation button:focus-visible { outline: 2px solid #75a8ff; outline-offset: 1px; }
.desktop-android-navigation button:disabled { cursor: not-allowed; opacity: .3; }
.desktop-android-navigation svg { width: 19px; height: 19px; display: block; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.desktop-android-navigation svg[data-android-glyph="triangle"] { width: 18px; height: 18px; fill: currentColor; stroke: none; }
.desktop-surface.android-navigation-active .desktop-android-navigation { position: absolute; z-index: 26; top: 50%; left: min(calc(100% - 54px), calc(50% + var(--desktop-fit-half-width, 230px) + 10px)); flex-direction: column; padding: 6px 5px; transform: translateY(-50%); }
.desktop-viewport { min-height: 520px; height: clamp(520px, 70vh, 900px); position: relative; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 50% 45%, #172337, #080c12 62%); }
#desktop-video { position: absolute; left: 50%; top: 50%; width: auto; height: auto; max-width: 100%; max-height: 100%; display: block; transform: translate(-50%, -50%); }
#desktop-video.hidden { display: none; }
#desktop-canvas { position: relative; z-index: 1; width: auto; height: auto; max-width: 100%; max-height: 100%; display: block; }
.desktop-vnc-view { position: relative; z-index: 1; width: 100%; height: 100%; overflow: hidden; outline: none; }
.desktop-vnc-view > div { width: 100% !important; height: 100% !important; }
.desktop-vnc-view canvas { max-width: 100%; max-height: 100%; pointer-events: auto; touch-action: none; user-select: none; }
.desktop-stage.desktop-vnc-active #desktop-canvas,
.desktop-stage.desktop-vnc-active #desktop-video { display: none; }
.desktop-stage:not(.desktop-vnc-active) .desktop-vnc-view { display: none; }
.desktop-stage.desktop-mse-active #desktop-canvas { opacity: 0; }
.desktop-surface.fit-width .desktop-viewport.aspect-known { min-height: 0; height: auto; max-height: none; aspect-ratio: var(--desktop-aspect-ratio); }
.desktop-surface.fit-width .desktop-viewport.aspect-known #desktop-canvas, .desktop-surface.fit-width .desktop-viewport.aspect-known #desktop-video { width: 100%; height: auto; max-height: none; }
.desktop-surface.fit-width .desktop-viewport.aspect-known .desktop-vnc-view { width: 100%; height: 100%; }
.desktop-surface.fit-window:not(:fullscreen) .desktop-viewport.aspect-known { min-height: 0; height: var(--desktop-fit-height, clamp(360px, 70vh, 900px)); max-height: none; aspect-ratio: auto; }
.desktop-surface.fit-window:not(:fullscreen) .desktop-viewport.aspect-known #desktop-canvas,
.desktop-surface.fit-window:not(:fullscreen) .desktop-viewport.aspect-known #desktop-video { width: var(--desktop-fit-width, auto); height: var(--desktop-fit-height, auto); max-width: none; max-height: none; object-fit: contain; }
.desktop-surface.fit-window:not(:fullscreen) .desktop-viewport.aspect-known .desktop-vnc-view { width: var(--desktop-fit-width, 100%); height: var(--desktop-fit-height, 100%); }
.desktop-surface.android-viewer.portrait-stream:not(:fullscreen) .desktop-stage { width: min(100%, clamp(340px, 32vw, 460px)); margin-inline: auto; }
.desktop-surface.android-viewer.portrait-stream:not(:fullscreen) .desktop-viewport.aspect-known { min-height: 0; width: 100%; height: auto; max-height: none; aspect-ratio: var(--desktop-aspect-ratio); }
.desktop-surface.android-viewer.portrait-stream:not(:fullscreen) .desktop-viewport.aspect-known #desktop-canvas,
.desktop-surface.android-viewer.portrait-stream:not(:fullscreen) .desktop-viewport.aspect-known #desktop-video { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; }
#desktop-surface.fit-window:not(:fullscreen) .desktop-viewport.aspect-known { min-height: 0; width: 100%; height: var(--desktop-fit-height, clamp(360px, 70vh, 900px)); max-height: none; aspect-ratio: auto; }
#desktop-surface.fit-window:not(:fullscreen) .desktop-viewport.aspect-known #desktop-canvas,
#desktop-surface.fit-window:not(:fullscreen) .desktop-viewport.aspect-known #desktop-video { width: var(--desktop-fit-width, auto); height: var(--desktop-fit-height, auto); max-width: none; max-height: none; object-fit: contain; }
#desktop-surface.fit-window:not(:fullscreen) .desktop-viewport.aspect-known .desktop-vnc-view { width: var(--desktop-fit-width, 100%); height: var(--desktop-fit-height, 100%); }
#desktop-canvas:focus { outline: 2px solid rgba(103, 155, 245, .82); outline-offset: -2px; }
.desktop-stage.control-enabled #desktop-canvas { cursor: none; }
.desktop-stage.control-enabled.local-control-cursor #desktop-canvas { cursor: default; }
.desktop-stage.remote-cursor-visible #desktop-canvas { cursor: none; }
.desktop-host-cursor { position: absolute; z-index: 4; width: 24px; height: 32px; pointer-events: none; transform: translate(-2px, -2px); filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .55)); }
.desktop-host-cursor svg { width: 100%; height: 100%; display: block; overflow: visible; }
.desktop-host-cursor path { fill: #111; stroke: #fff; stroke-width: 1.7; stroke-linejoin: round; }
.desktop-controls button.active { color: #176a51; background: #e4f8f1; border-color: #a9e5d1; }
.desktop-controls button.latched { color: #174f9c; background: #eaf2ff; border-color: #b8d2fb; }
.desktop-waiting { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; color: #a9b7ca; text-align: center; }
.desktop-waiting .spinner { width: 25px; height: 25px; margin-bottom: 14px; border-color: #263b58; border-top-color: #75a8ff; }
.desktop-waiting strong { color: #e6edf7; font-size: 12px; }
.desktop-waiting small { max-width: 430px; margin-top: 6px; color: #75859a; font-size: 8px; }
.desktop-surface:fullscreen { width: 100vw; height: 100vh; display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; background: #080c12; }
#desktop-surface:fullscreen .desktop-toolbar { width: 100%; min-height: 48px; position: relative; z-index: 60; grid-row: 1; top: auto; margin: 0; padding-inline: 12px 8px; background: rgba(255, 255, 255, .96); border-width: 0 0 1px; border-radius: 0; box-shadow: 0 8px 22px rgba(1, 7, 18, .2); backdrop-filter: blur(16px); }
.desktop-surface:fullscreen .desktop-stage { width: 100%; height: 100%; min-height: 0; grid-row: 2; border: 0; border-radius: 0; }
.desktop-surface:fullscreen .desktop-viewport { min-height: 0; height: 100%; }
.desktop-surface.android-navigation-active:fullscreen .desktop-stage { width: 100%; height: 100%; min-height: 0; }
.desktop-surface.android-navigation-active:fullscreen .desktop-viewport { min-height: 0; height: 100%; }
.desktop-surface.fit-width:fullscreen .desktop-viewport.aspect-known { min-height: 0; height: 100%; max-height: none; aspect-ratio: auto; }
.desktop-surface.android-navigation-active.fit-width:fullscreen .desktop-viewport.aspect-known { height: 100%; }
.desktop-surface.fit-width:fullscreen .desktop-viewport.aspect-known #desktop-canvas, .desktop-surface.fit-width:fullscreen .desktop-viewport.aspect-known #desktop-video { width: auto; height: auto; max-width: 100%; max-height: 100%; }
.desktop-surface.fit-width:fullscreen .desktop-viewport.aspect-known .desktop-vnc-view { width: 100%; height: 100%; }
.desktop-surface.android-viewer.portrait-stream:fullscreen .desktop-stage { display: grid; grid-template-rows: minmax(0, 1fr); }
.desktop-surface.android-viewer.portrait-stream:fullscreen .desktop-viewport.aspect-known { min-height: 0; width: 100%; height: 100%; max-height: none; aspect-ratio: auto; }
.desktop-surface.android-viewer.portrait-stream:fullscreen .desktop-viewport.aspect-known #desktop-canvas,
.desktop-surface.android-viewer.portrait-stream:fullscreen .desktop-viewport.aspect-known #desktop-video { width: auto; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; }
.desktop-surface.android-viewer.portrait-stream:fullscreen .desktop-viewport.aspect-known #desktop-canvas { position: absolute; inset: 0; margin: auto; }
#desktop-surface.fit-window:fullscreen .desktop-viewport.aspect-known { min-height: 0; width: 100%; height: 100%; max-height: none; aspect-ratio: auto; }
#desktop-surface.fit-window:fullscreen .desktop-viewport.aspect-known #desktop-canvas,
#desktop-surface.fit-window:fullscreen .desktop-viewport.aspect-known #desktop-video { width: var(--desktop-fit-width, auto); height: var(--desktop-fit-height, auto); max-width: none; max-height: none; object-fit: contain; }
#desktop-surface.fit-window:fullscreen .desktop-viewport.aspect-known .desktop-vnc-view { width: var(--desktop-fit-width, 100%); height: var(--desktop-fit-height, 100%); }
#desktop-surface.fit-window:fullscreen .desktop-viewport.aspect-known #desktop-canvas { position: relative; inset: auto; margin: 0; }
.desktop-surface:fullscreen .desktop-tools-drawer,
.desktop-surface:fullscreen .desktop-fullscreen-exit { display: none; }
.desktop-clipboard-dialog { width: min(460px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: hidden; border-radius: 14px; }
.desktop-clipboard-dialog form { max-height: calc(100dvh - 24px); display: flex; flex-direction: column; gap: 0; }
.desktop-clipboard-dialog form > header { flex: 0 0 auto; align-items: center; padding: 15px 18px; }
.desktop-clipboard-dialog header h2, .desktop-clipboard-dialog header p { margin: 0; }
.desktop-clipboard-dialog header h2 { color: var(--ink-900); font-size: 13px; letter-spacing: -.015em; }
.desktop-clipboard-dialog header p { margin-top: 3px; color: var(--ink-500); font-size: 8px; }
.desktop-dialog-close { width: 28px; height: 28px; min-height: 0; display: grid; flex: 0 0 auto; place-items: center; padding: 0; border-radius: 8px; }
.desktop-dialog-close:hover { color: var(--ink-800); background: #f1f4f8; }
.desktop-dialog-close svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; }
.desktop-clipboard-body { min-height: 0; overflow-y: auto; padding: 15px 18px 12px; }
.file-dialog .desktop-clipboard-body label { margin: 0; }
.desktop-clipboard-dialog textarea { width: 100%; min-height: 190px; max-height: 44vh; resize: none; padding: 11px 12px; color: var(--ink-750); background: #f7f9fc; border: 1px solid var(--line); border-radius: 9px; font: 9px/1.55 "Cascadia Mono", Consolas, monospace; }
.desktop-clipboard-read-dialog textarea { min-height: 230px; background: #f9fbfd; }
.desktop-clipboard-dialog textarea:focus { background: white; }
.desktop-clipboard-status { min-height: 16px; margin: 8px 0 0; color: var(--ink-500); font-size: 8px; line-height: 1.45; }
.desktop-clipboard-status.error { color: #a64747; }
.desktop-clipboard-dialog footer { flex: 0 0 auto; padding: 11px 14px 14px; background: #fbfcfe; border-top: 1px solid var(--line-soft); }
.desktop-clipboard-dialog footer button { min-width: 112px; }
.desktop-custom-profile-dialog { width: min(610px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: hidden; border-radius: 14px; }
.desktop-custom-profile-dialog form { max-height: calc(100dvh - 24px); display: flex; flex-direction: column; gap: 0; }
.desktop-custom-profile-dialog form > header { flex: 0 0 auto; align-items: center; padding: 15px 18px; }
.desktop-custom-profile-dialog header h2, .desktop-custom-profile-dialog header p { margin: 0; }
.desktop-custom-profile-dialog header h2 { color: var(--ink-900); font-size: 13px; letter-spacing: -.015em; }
.desktop-custom-profile-dialog header p { margin-top: 3px; color: var(--ink-500); font-size: 8px; }
.desktop-custom-profile-body { min-height: 0; overflow-y: auto; padding: 15px 18px 12px; }
.desktop-custom-capture { display: grid; grid-template-columns: minmax(150px, .75fr) minmax(220px, 1.25fr); align-items: center; gap: 8px 18px; padding: 11px 12px; background: var(--surface-soft); border: 1px solid var(--line-soft); border-radius: 9px; }
.desktop-custom-capture div { display: grid; gap: 3px; }
.desktop-custom-capture span { color: var(--ink-500); font-size: 7px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.desktop-custom-capture strong { color: var(--ink-850); font-size: 10px; }
.desktop-custom-capture small { color: var(--ink-500); font-size: 8px; line-height: 1.45; }
.desktop-custom-settings { display: grid; margin-top: 8px; }
.file-dialog .desktop-custom-settings label { min-height: 58px; grid-template-columns: minmax(150px, .9fr) minmax(170px, 1.25fr) 58px; align-items: center; gap: 15px; margin: 0; padding: 9px 2px; border-bottom: 1px solid var(--line-soft); }
.file-dialog .desktop-custom-settings label:last-child { border-bottom: 0; }
.desktop-custom-settings label > span { display: grid; gap: 3px; }
.desktop-custom-settings label strong { color: var(--ink-800); font-size: 9px; }
.desktop-custom-settings label small { color: var(--ink-500); font-size: 7px; font-weight: 500; line-height: 1.35; }
.desktop-custom-settings input[type="range"] { min-height: 24px; height: 24px; padding: 0; accent-color: var(--blue); border: 0; box-shadow: none; }
.desktop-custom-settings output { min-width: 54px; justify-self: end; padding: 6px 7px; color: var(--blue-dark); background: var(--blue-soft); border: 1px solid color-mix(in srgb, var(--blue) 20%, var(--line)); border-radius: 7px; font: 750 8px/1 "Cascadia Mono", Consolas, monospace; text-align: center; white-space: nowrap; }
.desktop-custom-settings .desktop-custom-encoding select { min-height: 34px; padding: 0 30px 0 10px; font-size: 9px; }
.desktop-custom-settings .desktop-custom-encoding { grid-template-columns: minmax(150px, .9fr) minmax(228px, 1.25fr); }
.desktop-custom-settings .desktop-custom-encoding select { grid-column: 2 / 4; }
.desktop-custom-profile-dialog footer { flex: 0 0 auto; align-items: center; padding: 11px 14px 14px; background: #fbfcfe; border-top: 1px solid var(--line-soft); }
.desktop-custom-footer-spacer { flex: 1 1 auto; }
.terminal-workspace { min-width: 0; }
.terminal-toolbar { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 12px; padding: 10px 13px 10px 16px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 10px; box-shadow: var(--shadow); }
.terminal-identity { min-width: 190px; display: flex; align-items: center; gap: 10px; }
.terminal-identity strong, .terminal-identity small { display: block; }
.terminal-identity strong { font-size: 10px; }
.terminal-identity small { max-width: 360px; margin-top: 3px; overflow: hidden; color: var(--ink-500); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.terminal-status-dot { width: 9px; height: 9px; flex: 0 0 auto; background: #aab5c2; border-radius: 999px; box-shadow: 0 0 0 4px #eef1f5; }
.terminal-workspace.active .terminal-status-dot { background: #26b987; box-shadow: 0 0 0 4px #e4f8f1; }
.terminal-workspace.pending .terminal-status-dot { background: #d79a39; box-shadow: 0 0 0 4px #fff3df; }
.terminal-controls { display: flex; align-items: flex-end; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.terminal-controls label { display: grid; gap: 4px; color: var(--ink-500); font-size: 7px; font-weight: 750; text-transform: uppercase; }
.terminal-controls select { min-width: 150px; padding: 7px 28px 7px 9px; color: var(--ink-700); background: var(--surface); border: 1px solid var(--line); border-radius: 7px; font-size: 9px; text-transform: none; }
.terminal-controls button { min-height: 32px; padding-inline: 11px; }
.terminal-empty { min-height: 500px; display: grid; place-content: center; justify-items: center; padding: 50px; color: var(--ink-500); background: var(--surface); border: 1px solid var(--line-soft); border-radius: 11px; box-shadow: var(--shadow); text-align: center; }
.terminal-empty-glyph { width: 58px; height: 58px; display: grid; place-items: center; color: #dbe8ff; background: #12223a; border-radius: 14px; font: 800 14px/1 "Cascadia Mono", Consolas, monospace; }
.terminal-empty h2 { margin: 18px 0 7px; color: var(--ink-850); font-size: 21px; }
.terminal-empty p { max-width: 590px; margin: 0; font-size: 10px; line-height: 1.7; }
.terminal-empty small { margin-top: 13px; color: var(--ink-500); font-size: 8px; }
.terminal-stage { overflow: hidden; background: #0b1220; border: 1px solid #26344a; border-radius: 11px; box-shadow: 0 18px 45px rgba(16, 27, 44, .22); }
#terminal-host { height: clamp(430px, 65vh, 760px); padding: 13px 14px 6px; }
#terminal-host .xterm { height: 100%; font-feature-settings: "liga" 0; }
#terminal-host .xterm-viewport { scrollbar-color: #42516a #111a2a; scrollbar-width: thin; }
.terminal-stage footer { min-height: 34px; display: flex; align-items: center; gap: 18px; padding: 0 14px; color: #7f8ea5; background: #111a2a; border-top: 1px solid #26344a; font-size: 7px; }
.terminal-stage footer span:first-child { margin-right: auto; color: #aebbd0; }
.performance-toolbar { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 13px; padding: 0 16px; color: var(--ink-500); background: var(--surface); border: 1px solid var(--line-soft); border-radius: 10px; box-shadow: var(--shadow); font-size: 9px; }
.performance-toolbar > div { display: flex; align-items: center; gap: 8px; }
.performance-toolbar strong { color: var(--ink-800); }
.performance-toolbar small { padding-left: 8px; border-left: 1px solid var(--line); }
.performance-range { display: flex; align-items: center; gap: 8px; color: var(--ink-500); font-size: 8px; font-weight: 700; }
.performance-range select { padding: 6px 25px 6px 8px; color: var(--ink-700); background: var(--surface); border: 1px solid var(--line); border-radius: 7px; font: inherit; }
.performance-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 13px; margin-bottom: 13px; }
.performance-summary article { min-width: 0; display: flex; align-items: center; gap: 12px; padding: 15px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 11px; box-shadow: var(--shadow); }
.performance-summary small, .performance-summary strong, .performance-summary p { display: block; }
.performance-summary small { color: var(--ink-500); font-size: 8px; font-weight: 750; text-transform: uppercase; }
.performance-summary strong { margin-top: 3px; font-size: 18px; letter-spacing: -.03em; }
.performance-summary p { margin: 3px 0 0; overflow: hidden; color: var(--ink-500); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.performance-glyph { width: 39px; height: 39px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; font-size: 8px; font-weight: 850; }
.performance-glyph.cpu { color: #2f70dc; background: #eaf2ff; }
.performance-glyph.memory { color: #7b56c6; background: #f1ecfb; }
.performance-glyph.gpu { color: #16856b; background: #e7f7f1; }
.performance-glyph.storage { color: #b06b20; background: #fff3e4; }
.performance-glyph.battery { color: #147552; background: #e3f8ef; }
.performance-glyph.thermal { color: #b44b34; background: #fff0ec; }
.performance-chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.telemetry-chart { min-width: 0; padding: 16px 17px 12px; }
.telemetry-chart header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.telemetry-chart header > div:first-child { min-width: 0; }
.telemetry-chart header small { color: var(--ink-500); font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.telemetry-chart header h2 { margin: 4px 0 0; overflow: hidden; font-size: 12px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.telemetry-chart header > strong { font-size: 18px; letter-spacing: -.035em; }
.telemetry-chart svg { width: 100%; height: 150px; display: block; margin-top: 13px; overflow: visible; background: repeating-linear-gradient(to bottom, #eef2f6 0 1px, transparent 1px 40px), repeating-linear-gradient(to right, #f1f4f7 0 1px, transparent 1px 75px); border: 1px solid var(--line-soft); border-radius: 7px; }
.telemetry-line { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.telemetry-area { stroke: none; opacity: .14; }
.telemetry-line.cpu { stroke: #3977e8; }
.telemetry-area.cpu { fill: #3977e8; }
.telemetry-line.memory { stroke: #825cca; }
.telemetry-area.memory { fill: #825cca; }
.telemetry-line.gpu { stroke: #1d9b72; }
.telemetry-area.gpu { fill: #1d9b72; }
.telemetry-line.storage { stroke: #c18424; }
.telemetry-area.storage { fill: #c18424; }
.telemetry-line.battery { stroke: #16845f; }
.telemetry-area.battery { fill: #2ab481; }
.telemetry-line.network-receive { stroke: #3977e8; }
.telemetry-line.network-transmit { stroke: #1d9b72; }
.telemetry-line.temperature-cpu { stroke: #e45d45; }
.telemetry-line.temperature-gpu { stroke: #8c5bc4; }
.telemetry-line.temperature-battery { stroke: #d69b2d; }
.telemetry-chart footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 7px; color: var(--ink-500); font-size: 7px; }
.telemetry-specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 10px; margin: 13px 0 0; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.telemetry-specs div { min-width: 0; }
.telemetry-specs dt { color: var(--ink-500); font-size: 7px; font-weight: 700; }
.telemetry-specs dd { margin: 4px 0 0; overflow: hidden; color: var(--ink-800); font-size: 9px; font-weight: 750; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.network-chart { grid-column: 1 / -1; }
.network-values { display: flex; align-items: center; gap: 14px; color: var(--ink-500); font-size: 8px; }
.network-values strong { display: block; margin-top: 3px; color: var(--ink-800); font-size: 12px; }
.network-chart footer i { width: 7px; height: 2px; display: inline-block; margin: 0 3px 2px 8px; }
.network-chart footer i.receive { background: #3977e8; }
.network-chart footer i.transmit { background: #1d9b72; }
.optional-telemetry-chart footer i { width: 7px; height: 2px; display: inline-block; margin: 0 3px 2px 8px; }
.optional-telemetry-chart footer i.temperature-cpu { background: #e45d45; }
.optional-telemetry-chart footer i.temperature-gpu { background: #8c5bc4; }
.optional-telemetry-chart footer i.temperature-battery { background: #d69b2d; }
.performance-empty { margin-top: 13px; padding: 18px; color: var(--ink-500); background: var(--surface); border: 1px dashed #cad5e2; border-radius: 10px; text-align: center; }
.performance-empty strong, .performance-empty span, .performance-empty small { display: block; }
.performance-empty strong { color: var(--ink-800); font-size: 11px; }
.performance-empty span { margin-top: 5px; font-size: 9px; }
.performance-empty textarea { width: min(100%, 920px); min-height: 58px; margin: 13px auto 10px; padding: 9px 11px; display: block; resize: vertical; color: var(--ink-700); background: var(--surface); border: 1px solid var(--line); border-radius: 7px; font: 8px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; }
.performance-empty small { margin-top: 7px; font-size: 8px; }
.activity-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 13px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 10px; box-shadow: var(--shadow); }
.activity-heading > div { min-width: 0; display: flex; align-items: center; gap: 12px; }
.activity-heading h2 { margin: 0; font-size: 13px; }
.activity-heading p { margin: 4px 0 0; color: var(--ink-500); font-size: 8px; line-height: 1.45; }
.activity-glyph { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; color: #2f70dc; background: #eaf2ff; border-radius: 10px; font-size: 10px; font-weight: 850; }
.activity-spec-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 13px; }
.activity-spec-grid article { min-width: 0; display: flex; align-items: center; gap: 11px; padding: 14px 15px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 11px; box-shadow: var(--shadow); }
.activity-spec-grid article > div { min-width: 0; }
.activity-spec-grid small, .activity-spec-grid strong { display: block; }
.activity-spec-grid small { color: var(--ink-500); font-size: 7px; font-weight: 750; text-transform: uppercase; }
.activity-spec-grid strong { margin-top: 5px; overflow: hidden; font-size: 9px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.session-list { display: grid; padding: 0 18px 14px; }
.session-row { min-width: 0; display: grid; grid-template-columns: minmax(150px, 1.2fr) minmax(100px, .7fr) minmax(150px, 1fr) auto; align-items: center; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.session-row:last-child { border-bottom: 0; }
.session-row strong, .session-row small { display: block; }
.session-row strong { font-size: 9px; }
.session-row small { margin-top: 4px; color: var(--ink-500); font-size: 8px; }
.session-state { width: fit-content; padding: 5px 8px; color: var(--ink-600); background: var(--surface); border-radius: 999px; font-size: 8px; font-weight: 750; }
.session-state.active { color: #16755d; background: #e5f7f0; }
.session-state.approvalpending { color: #96611d; background: #fff3df; }
.session-state.failed, .session-state.expired, .session-state.rejected { color: #a64747; background: #faecec; }

/* Groups and enrollment */
.access-layout { display: grid; grid-template-columns: minmax(250px, 320px) minmax(0, 1fr); gap: 15px; align-items: start; }
.selection-list { display: grid; padding: 7px 11px; }
.selection-row { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 11px; padding: 10px; color: var(--ink-650); background: transparent; border: 0; border-radius: 8px; text-align: left; }
.selection-row:hover { background: var(--surface-soft); }
.selection-row.active { color: var(--blue-dark); background: var(--blue-soft); }
.selection-glyph { width: 32px; height: 32px; display: grid; place-items: center; color: #5e7188; background: #edf2f7; border-radius: 8px; font-size: 9px; font-weight: 800; }
.selection-row.active .selection-glyph { color: white; background: var(--blue); }
.selection-row strong, .selection-row small { display: block; }
.selection-row strong { font-size: 10px; }
.selection-row small { margin-top: 3px; color: var(--ink-500); font-size: 8px; }
.selection-arrow { color: #9ba7b5; }
.list-empty { margin: 18px; color: var(--ink-500); text-align: center; }
.panel-form { padding: 18px; }
.panel-form h3 { margin: 0 0 2px; font-size: 12px; }
.group-panel .panel-form { border-top: 0; }
.key-panel { min-height: 430px; }
.key-empty { min-height: 360px; display: grid; place-content: center; justify-items: center; padding: 35px; text-align: center; }
.key-empty > span { width: 48px; height: 48px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 13px; font-weight: 850; }
.key-empty h3 { margin: 14px 0 5px; }
.key-empty p { margin: 0; color: var(--ink-500); }
.key-content { display: grid; }
.group-policy-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 15px; background: var(--surface-muted); border: 1px solid var(--line-soft); border-radius: 10px; }
.group-policy-control strong { display: block; font-size: 11px; }
.group-policy-control p { margin: 5px 0 0; color: var(--ink-500); font-size: 8px; line-height: 1.5; }
.group-policy-control label { display: grid; gap: 5px; color: var(--ink-500); font-size: 7px; font-weight: 750; text-transform: uppercase; }
.key-callout { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 15px; background: var(--blue-soft); border: 1px solid #cbdcf7; border-radius: 10px; }
.field-label { display: block; margin-bottom: 7px; color: #6683aa; font-size: 8px; font-weight: 800; letter-spacing: .09em; }
.key-callout code { display: block; overflow: hidden; color: #23466f; font-family: "Cascadia Mono", Consolas, monospace; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; user-select: all; }
.icon-action { min-height: 32px; padding: 0 10px; background: rgba(255,255,255,.78); }
.key-explanation { margin: 0; color: var(--ink-500); font-size: 10px; line-height: 1.65; }
.command-field textarea { color: #31445d; background: #f7f9fb; font-family: "Cascadia Mono", Consolas, monospace; font-size: 9px; user-select: all; }
.install-detection-status { display: flex; align-items: center; gap: 9px; margin: 16px 2px 0; color: var(--ink-650); }
.install-detection-indicator { width: 8px; height: 8px; flex: 0 0 auto; background: #7e9bc4; border: 3px solid rgba(91, 135, 197, .14); border-radius: 50%; box-sizing: content-box; box-shadow: 0 0 0 4px rgba(91, 135, 197, .06); transition: background 180ms ease, border-color 180ms ease, box-shadow 220ms ease; }
.install-detection-status strong, .install-detection-status small { display: inline; font-size: 9px; }
.install-detection-status strong { color: var(--ink-800); }
.install-detection-status small { margin-left: 7px; color: var(--ink-500); }
.install-detection-status.detected .install-detection-indicator { background: #25a87c; border-color: rgba(37, 168, 124, .15); box-shadow: 0 0 0 4px rgba(37, 168, 124, .07); }
.install-detection-status.manual .install-detection-indicator { background: var(--blue); border-color: rgba(57, 119, 232, .14); box-shadow: 0 0 0 4px rgba(57, 119, 232, .07); }
.install-detection-status.unsupported .install-detection-indicator { background: #d1912d; border-color: rgba(209, 145, 45, .15); box-shadow: 0 0 0 4px rgba(209, 145, 45, .07); }
.install-target { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.install-target label { display: grid; gap: 7px; color: #8491a4; font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.install-target select { width: 100%; border: 1px solid #dce4ee; border-radius: 9px; background: #fff; color: #253852; padding: 9px 10px; font: inherit; letter-spacing: 0; }
.command-note { margin: -7px 0 0; color: var(--ink-500); font-size: 9px; line-height: 1.55; }
.key-actions { display: flex; align-items: center; gap: 9px; }
.key-actions .danger-button { margin-left: auto; }
.key-updated { margin: -4px 0 0; color: var(--ink-500); font-size: 8px; }

/* Compact group and user management */
.management-layout { min-width: 0; }
.management-master-panel, .management-detail-panel { min-width: 0; overflow: hidden; }
.management-master-panel { position: sticky; top: 24px; }
.management-panel-heading { gap: 14px; }
.management-panel-heading > div { min-width: 0; }
.management-heading-actions { display: flex; align-items: center; gap: 8px; }
.management-heading-actions .ghost-button { min-height: 31px; padding-inline: 10px; font-size: 8px; }
.management-selection-list { max-height: min(54vh, 520px); overflow: auto; scrollbar-width: thin; }
.management-create-control { border-top: 1px solid var(--line-soft); }
.management-create-control > summary { min-height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 17px; color: var(--blue-dark); background: var(--surface-muted); outline: 0; cursor: pointer; font-size: 9px; font-weight: 800; list-style: none; transition: color 160ms ease, background 180ms ease; }
.management-create-control > summary::-webkit-details-marker { display: none; }
.management-create-control > summary::marker { content: ""; }
.management-create-control > summary span { width: 22px; height: 22px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 7px; font-size: 15px; font-weight: 500; line-height: 1; }
.management-create-control > summary:hover, .management-create-control[open] > summary { background: var(--surface-hover); }
.management-create-control > summary:focus-visible { box-shadow: inset 0 0 0 3px rgba(var(--accent-rgb), .2); }
.management-create-control[open] > summary { border-bottom: 1px solid var(--line-soft); }
.compact-management-form { gap: 11px; padding: 14px 16px 16px; }
.compact-management-form label { gap: 5px; font-size: 9px; }
.compact-management-form input, .compact-management-form select { min-height: 36px; font-size: 9px; }
.management-form-actions { min-height: 32px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.management-form-actions .management-status { min-width: 0; flex: 1; margin: 0; }
.management-form-actions .primary-button, .management-form-actions .quiet-button, .management-form-actions .danger-button { min-height: 32px; padding-inline: 11px; font-size: 8px; }
.management-group-content { padding: 0; }
.management-inline-editor { gap: 11px; padding: 14px 17px; background: var(--surface-muted); border-bottom: 1px solid var(--line-soft); }
.management-inline-editor label { font-size: 9px; }
.management-tabs { min-width: 0; display: flex; gap: 3px; overflow-x: auto; padding: 5px 12px 0; border-bottom: 1px solid var(--line-soft); }
.management-tabs button { min-height: 39px; display: inline-flex; align-items: center; gap: 7px; padding: 0 11px; color: var(--ink-500); background: transparent; border: 0; border-bottom: 2px solid transparent; font-size: 9px; font-weight: 750; white-space: nowrap; }
.management-tabs button:hover { color: var(--ink-800); }
.management-tabs button.active { color: var(--blue); border-bottom-color: var(--blue); }
.management-tabs button span { min-width: 20px; height: 20px; display: grid; place-items: center; padding-inline: 5px; color: var(--ink-500); background: var(--surface-muted); border: 1px solid var(--line-soft); border-radius: 999px; font-size: 7px; }
.management-tabs button.active span { color: var(--blue-dark); background: var(--blue-soft); border-color: color-mix(in srgb, var(--blue) 22%, var(--line)); }
.management-tab-panel { display: grid; gap: 12px; padding: 16px 17px 18px; }
#group-enrollment-panel { gap: 17px; }
.management-section-heading { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.management-section-heading h3 { margin: 0; color: var(--ink-850); font-size: 11px; }
.management-section-heading p { margin: 4px 0 0; color: var(--ink-500); font-size: 8px; line-height: 1.45; }
.management-section-heading .quiet-button { min-height: 31px; padding-inline: 10px; font-size: 8px; }
.management-entity-list { display: grid; border: 1px solid var(--line-soft); border-radius: 9px; overflow: hidden; }
.management-list-empty { margin: 0; padding: 24px 18px; color: var(--ink-500); font-size: 9px; line-height: 1.5; text-align: center; }
.management-entity-row { min-width: 0; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 11px; border-bottom: 1px solid var(--line-soft); }
.management-entity-row:last-child { border-bottom: 0; }
.management-entity-row strong, .management-entity-row small { display: block; }
.management-entity-row strong { overflow: hidden; color: var(--ink-850); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.management-entity-row small { margin-top: 3px; color: var(--ink-500); font-size: 8px; }
.organization-management-copy { min-width: 0; }
.organization-management-actions { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.organization-management-actions select { width: auto; min-width: 112px; min-height: 32px; padding-block: 5px; font-size: 8px; }
.organization-management-actions .quiet-button, .organization-management-actions .icon-action { min-height: 32px; padding-inline: 9px; font-size: 8px; }
.organization-management-actions .icon-action.danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 28%, var(--line)); }
.organization-management-copy .management-status { margin-top: 3px; }
.management-member-picker { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(120px, .7fr) auto; align-items: end; gap: 8px; padding: 11px; background: var(--surface-muted); border: 1px solid var(--line-soft); border-radius: 9px; }
.management-member-picker label { gap: 5px; font-size: 8px; }
.management-member-picker select, .management-member-picker button { min-height: 34px; font-size: 8px; }
.management-status { display: block; margin: 0; color: var(--ink-500); font-size: 8px; line-height: 1.45; }
.management-status.error { color: var(--red); }

/* Users and server */
.users-layout { display: grid; grid-template-columns: minmax(250px, 320px) minmax(0, 1fr); gap: 15px; align-items: start; }
.server-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; align-items: start; }
.user-list { display: grid; padding: 7px 18px; }
.user-list.management-selection-list { padding: 7px 10px; }
.user-row { width: 100%; min-width: 0; display: grid; grid-template-columns: 35px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 11px 8px; color: var(--ink-750); background: transparent; border: 0; border-bottom: 1px solid var(--line-soft); border-radius: 8px; text-align: left; }
.user-row:last-child { border-bottom: 0; }
.user-row:hover { background: var(--surface-soft); }
.user-row.active { color: var(--blue-dark); background: var(--blue-soft); border-bottom-color: transparent; }
.user-avatar { width: 35px; height: 35px; display: grid; place-items: center; color: #536c8a; background: #edf2f7; border-radius: 9px; font-size: 9px; font-weight: 800; }
.user-row.active .user-avatar { color: white; background: var(--blue); }
.user-row strong, .user-row small { display: block; }
.user-row strong { font-size: 10px; }
.user-row small { margin-top: 4px; overflow: hidden; color: var(--ink-500); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.user-state { padding: 4px 7px; color: var(--green); background: var(--green-soft); border-radius: 9px; font-size: 8px; }
.user-state.disabled { color: var(--red); background: var(--red-soft); }
.split-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.user-detail-panel { min-height: 430px; }
.management-empty { min-height: 430px; display: grid; place-content: center; justify-items: center; padding: 34px; text-align: center; }
.management-empty > span { width: 46px; height: 46px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 13px; font-size: 11px; font-weight: 850; }
.management-empty h3 { margin: 13px 0 5px; font-size: 13px; }
.management-empty p { max-width: 310px; margin: 0; color: var(--ink-500); font-size: 9px; line-height: 1.55; }
.user-editor { display: grid; }
.user-profile-form { gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line-soft); }
.user-profile-form label { font-size: 9px; }
.account-enabled-control { align-content: end; }
.compact-toggle { min-height: 42px; display: flex; align-items: center; gap: 9px; padding-inline: 10px; color: var(--ink-650); background: var(--surface-muted); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.compact-toggle input { width: 1px; min-height: 1px; position: absolute; opacity: 0; pointer-events: none; }
.compact-toggle i { width: 34px; height: 20px; position: relative; flex: 0 0 auto; background: #cbd4df; border-radius: 999px; transition: background 180ms ease; }
.compact-toggle i::after { content: ""; width: 14px; height: 14px; position: absolute; left: 3px; top: 3px; background: white; border-radius: 50%; box-shadow: 0 2px 5px rgba(20, 34, 52, .22); transition: transform 220ms cubic-bezier(.18, 1.35, .32, 1); }
.compact-toggle input:checked + i { background: var(--blue); }
.compact-toggle input:checked + i::after { transform: translateX(14px); }
.compact-toggle input:focus-visible + i { outline: 3px solid rgba(var(--accent-rgb), .25); outline-offset: 2px; }
.compact-toggle strong { color: var(--ink-750); font-size: 9px; }
.user-membership-section { display: grid; gap: 12px; padding: 16px 18px 18px; }
.membership-matrix { display: grid; border: 1px solid var(--line-soft); border-radius: 9px; overflow: hidden; }
.membership-edit-row { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(120px, .7fr); gap: 8px; }
.user-membership-row { min-width: 0; display: grid; grid-template-columns: minmax(130px, 1fr) minmax(120px, .65fr); align-items: center; gap: 10px; padding: 10px 11px; border-bottom: 1px solid var(--line-soft); }
.user-membership-row:last-child { border-bottom: 0; }
.user-membership-choice { min-width: 0; display: flex; align-items: center; grid-template-columns: none; gap: 9px; color: var(--ink-750); font-size: 9px; cursor: pointer; }
.user-membership-choice input { width: 16px; min-height: 16px; flex: 0 0 auto; margin: 0; accent-color: var(--blue); }
.user-membership-choice span { min-width: 0; overflow: hidden; color: inherit; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.user-membership-row select { min-height: 34px; font-size: 8px; }
.membership-row { min-width: 0; display: grid; grid-template-columns: minmax(130px, 1fr) minmax(120px, .65fr) auto; align-items: center; gap: 10px; padding: 10px 11px; border-bottom: 1px solid var(--line-soft); }
.membership-row:last-child { border-bottom: 0; }
.membership-row strong, .membership-row small { display: block; }
.membership-row strong { color: var(--ink-850); font-size: 9px; }
.membership-row small { margin-top: 3px; color: var(--ink-500); font-size: 8px; }
.membership-row select { min-height: 34px; font-size: 8px; }
.management-membership-editor { display: grid; gap: 8px; padding: 11px; background: var(--surface-muted); border: 1px solid var(--line-soft); border-radius: 9px; }
.management-membership-editor .management-section-heading h3 { font-size: 9px; }
.new-user-membership-list { display: grid; }
.server-status-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; margin-bottom: 15px; }
.server-status-grid article { display: flex; align-items: center; gap: 13px; padding: 18px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 11px; box-shadow: var(--shadow); }
.server-status-grid small, .server-status-grid strong, .server-status-grid p { display: block; }
.server-status-grid small { color: var(--ink-500); font-size: 8px; font-weight: 750; }
.server-status-grid strong { margin-top: 4px; font-size: 11px; }
.server-status-grid p { margin: 4px 0 0; color: var(--ink-500); font-size: 8px; }
.server-icon { width: 33px; height: 33px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 8px; font-size: 8px; font-weight: 850; }

/* Global settings */
.settings-layout { width: min(100%, 980px); }
.settings-panel { overflow: visible; }
.settings-preference-row { min-height: 112px; display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 20px 22px; border-bottom: 1px solid var(--line-soft); }
.settings-preference-row:last-child { border-bottom: 0; }
.settings-preference-identity { min-width: 0; display: flex; align-items: center; gap: 15px; }
.settings-preference-identity h3 { margin: 0; color: var(--ink-900); font-size: 13px; }
.settings-preference-identity p { max-width: 560px; margin: 6px 0 0; color: var(--ink-500); font-size: 9px; line-height: 1.55; }
.settings-preference-identity small { display: block; margin-top: 7px; color: var(--ink-500); font-size: 8px; }
.theme-preview { width: 44px; height: 44px; flex: 0 0 auto; display: grid; place-items: center; overflow: hidden; background: linear-gradient(145deg, #edf5ff, #dbe8fb); border: 1px solid #cfdef3; border-radius: 13px; transition: background .28s ease, border-color .28s ease, transform .34s cubic-bezier(.18, 1.35, .32, 1); }
.theme-preview i { width: 15px; height: 15px; display: block; background: #f0ad31; border-radius: 50%; box-shadow: 0 0 0 4px rgba(240, 173, 49, .17); transition: background .28s ease, box-shadow .28s ease, transform .38s cubic-bezier(.18, 1.45, .32, 1); }
.theme-toggle { min-width: 116px; position: relative; display: flex; align-items: center; justify-content: flex-end; gap: 9px; color: var(--ink-650); cursor: pointer; font-size: 9px; user-select: none; }
.theme-toggle input { width: 1px; height: 1px; min-height: 0; position: absolute; overflow: hidden; margin: 0; padding: 0; opacity: 0; pointer-events: none; }
.theme-toggle-track { width: 39px; height: 22px; position: relative; display: block; flex: 0 0 auto; background: #c9d3df; border: 1px solid #b8c4d1; border-radius: 999px; box-shadow: inset 0 1px 2px rgba(25, 42, 62, .08); transition: background .2s ease, border-color .2s ease, box-shadow .2s ease; }
.theme-toggle-track::after { content: ""; width: 16px; height: 16px; position: absolute; left: 2px; top: 50%; background: #fff; border-radius: 50%; box-shadow: 0 2px 5px rgba(20, 34, 52, .25); transform: translateY(-50%); transition: transform .28s cubic-bezier(.18, 1.35, .32, 1); }
.theme-toggle input:checked + .theme-toggle-track { background: var(--blue); border-color: var(--blue); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .09); }
.theme-toggle input:checked + .theme-toggle-track::after { transform: translate(17px, -50%); }
.theme-toggle input:focus-visible + .theme-toggle-track { outline: 3px solid rgba(76, 143, 251, .38); outline-offset: 2px; }
.theme-toggle:hover .theme-toggle-track { border-color: #8ca5c4; }
.theme-toggle strong { min-width: 58px; color: var(--ink-750); font-size: 9px; text-align: left; }
.settings-reset-button { min-height: 30px; padding: 0 10px; color: var(--ink-500); background: transparent; border: 1px solid transparent; border-radius: 7px; font-size: 9px; font-weight: 750; }
.settings-reset-button:hover { color: var(--blue-dark); background: var(--blue-soft); border-color: color-mix(in srgb, var(--blue) 24%, var(--line)); }
.appearance-preview { width: 44px; height: 44px; flex: 0 0 auto; display: grid; place-content: center; place-items: center; overflow: hidden; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 13px; }
.accent-preview { grid-template-columns: repeat(3, 7px); gap: 3px; }
.accent-preview i { width: 7px; height: 24px; background: color-mix(in srgb, var(--blue) 36%, var(--surface)); border-radius: 5px; transition: height .35s cubic-bezier(.18, 1.35, .32, 1), background .2s ease; }
.accent-preview i:nth-child(2) { height: 31px; background: var(--blue); }
.accent-preview i:nth-child(3) { height: 18px; background: color-mix(in srgb, var(--blue) 68%, var(--surface)); }
.density-preview { align-content: center; gap: 4px; padding: 10px; }
.density-preview i { width: 25px; height: 3px; display: block; background: var(--blue); border-radius: 4px; opacity: .84; transition: margin .24s ease; }
:root[data-density="compact"] .density-preview i + i { margin-top: -2px; }
:root[data-density="spacious"] .density-preview i + i { margin-top: 3px; }
.corner-preview i { width: 24px; height: 24px; display: block; background: var(--blue-soft); border: 2px solid var(--blue); border-radius: 7px; transition: border-radius .24s ease; }
:root[data-corners="crisp"] .corner-preview i { border-radius: 2px; }
:root[data-corners="rounded"] .corner-preview i { border-radius: 11px; }
.motion-preview { grid-template-columns: repeat(3, 5px); gap: 3px; }
.motion-preview i { width: 5px; height: 5px; display: block; background: var(--blue); border-radius: 50%; }
.motion-preview i:first-child { opacity: .28; transform: translateY(7px); }
.motion-preview i:nth-child(2) { opacity: .58; }
.motion-preview i:last-child { transform: translateY(-7px); }
:root[data-motion="playful"] .motion-preview i { animation: appearance-motion 1.6s ease-in-out infinite alternate; }
:root[data-motion="playful"] .motion-preview i:nth-child(2) { animation-delay: -520ms; }
:root[data-motion="playful"] .motion-preview i:last-child { animation-delay: -1.04s; }
@keyframes appearance-motion { to { transform: translateY(-7px); opacity: 1; } }
.accent-options { display: grid; grid-template-columns: repeat(6, minmax(42px, 1fr)); gap: 5px; }
.accent-options button { min-width: 44px; min-height: 54px; display: grid; place-items: center; gap: 5px; padding: 6px 5px; color: var(--ink-500); background: transparent; border: 1px solid transparent; border-radius: 9px; font-size: 7px; }
.accent-options button span { --swatch: var(--blue); width: 22px; height: 22px; display: block; background: var(--swatch); border: 3px solid var(--surface); border-radius: 50%; box-shadow: 0 0 0 1px color-mix(in srgb, var(--swatch) 35%, var(--line)); transition: transform .3s cubic-bezier(.18, 1.4, .32, 1), box-shadow .2s ease; }
.accent-options button strong { font-size: 7px; font-weight: 700; }
.accent-options button:hover { color: var(--ink-750); background: var(--surface-hover); }
.accent-options button:hover span { transform: translateY(-2px) scale(1.08); }
.accent-options button.selected { color: var(--ink-850); background: var(--blue-soft); border-color: color-mix(in srgb, var(--blue) 26%, var(--line)); }
.accent-options button.selected span { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--blue); }
.appearance-segments { display: flex; align-items: center; gap: 3px; padding: 3px; background: var(--surface-soft); border: 1px solid var(--line-soft); border-radius: 10px; }
.appearance-segments button { min-height: 31px; padding: 0 11px; color: var(--ink-500); background: transparent; border: 0; border-radius: 7px; font-size: 8px; font-weight: 720; transition: color .15s ease, background .18s ease, box-shadow .24s cubic-bezier(.18, 1.35, .32, 1), transform .24s cubic-bezier(.18, 1.35, .32, 1); }
.appearance-segments button:hover { color: var(--ink-800); }
.appearance-segments button.selected { color: var(--blue-dark); background: var(--surface); box-shadow: 0 2px 8px rgba(20, 32, 51, .09); transform: translateY(-1px); }
.accent-options button:focus-visible,
.appearance-segments button:focus-visible,
.settings-reset-button:focus-visible { outline: 3px solid rgba(var(--accent-rgb), .28); outline-offset: 2px; }

/* Dark theme */
:root[data-theme="dark"] {
  color-scheme: dark;
  --navy-950: #080e18;
  --navy-900: #0c1726;
  --navy-800: #15273e;
  --ink-950: #edf3fb;
  --ink-900: #e5edf8;
  --ink-850: #dce6f3;
  --ink-800: #cfdaea;
  --ink-750: #c0cde0;
  --ink-700: #b3c1d5;
  --ink-650: #a5b4c9;
  --ink-600: #94a4ba;
  --ink-500: #8191a8;
  --line: #34445a;
  --line-soft: #26364a;
  --page: #0c1522;
  --surface: #142236;
  --surface-muted: #101c2c;
  --surface-soft: #18283d;
  --surface-hover: #1a2d45;
  --grid-line: #26384f;
  --blue: #6d9ff2;
  --blue-dark: #91b8ff;
  --blue-soft: #1a3151;
  --accent-rgb: 109, 159, 242;
  --green: #54c69e;
  --green-soft: #17382f;
  --red: #ee8995;
  --red-soft: #44242d;
  --amber: #e3b45d;
  --shadow: 0 10px 32px rgba(0, 5, 14, .28);
}
:root[data-accent="indigo"] { --blue: #6366f1; --blue-dark: #4f46e5; --blue-soft: #eef0ff; --accent-rgb: 99, 102, 241; }
:root[data-accent="violet"] { --blue: #8b5cf6; --blue-dark: #7c3aed; --blue-soft: #f4efff; --accent-rgb: 139, 92, 246; }
:root[data-accent="teal"] { --blue: #0f9f9a; --blue-dark: #0b7f7b; --blue-soft: #e8f8f7; --accent-rgb: 15, 159, 154; }
:root[data-accent="emerald"] { --blue: #15976f; --blue-dark: #0d7958; --blue-soft: #e7f7f0; --accent-rgb: 21, 151, 111; }
:root[data-accent="rose"] { --blue: #e05272; --blue-dark: #c83f60; --blue-soft: #fff0f4; --accent-rgb: 224, 82, 114; }
:root[data-theme="dark"][data-accent="indigo"] { --blue: #8587ff; --blue-dark: #aaaaff; --blue-soft: #29294e; }
:root[data-theme="dark"][data-accent="violet"] { --blue: #aa82ff; --blue-dark: #c5a8ff; --blue-soft: #32264d; }
:root[data-theme="dark"][data-accent="teal"] { --blue: #48c7c1; --blue-dark: #78ddd7; --blue-soft: #173b3b; }
:root[data-theme="dark"][data-accent="emerald"] { --blue: #50c99b; --blue-dark: #7cddb9; --blue-soft: #173a31; }
:root[data-theme="dark"][data-accent="rose"] { --blue: #f17c96; --blue-dark: #ff9eb1; --blue-soft: #472631; }
:root[data-theme="dark"] .auth-shell { background: var(--page); }
:root[data-theme="dark"] .auth-card { box-shadow: 0 20px 58px rgba(0, 5, 14, .32); }
:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea { caret-color: #9fc1ff; }
:root[data-theme="dark"] input::placeholder,
:root[data-theme="dark"] textarea::placeholder { color: #687b95; }
:root[data-theme="dark"] .quiet-button:hover,
:root[data-theme="dark"] .ghost-button:hover,
:root[data-theme="dark"] .icon-action:hover { background: #1b3150; border-color: #3c5d89; }
:root[data-theme="dark"] .danger-button { border-color: #69404a; }
:root[data-theme="dark"] .recovery-banner { background: #332a17; border-color: #67542c; }
:root[data-theme="dark"] .recovery-banner code { background: rgba(10, 18, 29, .72); border-color: #64542f; }
:root[data-theme="dark"] .stat-icon.offline,
:root[data-theme="dark"] .group-glyph,
:root[data-theme="dark"] .selection-glyph,
:root[data-theme="dark"] .user-avatar { color: #aebbd0; background: #23334a; }
:root[data-theme="dark"] .stat-icon.groups { color: #c0a7ff; background: #30284a; }
:root[data-theme="dark"] .group-chip:hover { border-color: #50647f; }
:root[data-theme="dark"] .group-chip.active { border-color: #3c5f91; }
:root[data-theme="dark"] .connection-key i.offline { background: #34445a; border-color: #475970; }
:root[data-theme="dark"] .connection-track,
:root[data-theme="dark"] .inventory-capacity,
:root[data-theme="dark"] .file-transfer-progress { background: #26364a; border-color: #34455c; }
:root[data-theme="dark"] .device-icon[data-platform="windows"],
:root[data-theme="dark"] .device-icon-large[data-platform="windows"] { background: #dceaff; border-color: #b8cff0; }
:root[data-theme="dark"] .device-icon[data-platform="apple"],
:root[data-theme="dark"] .device-icon-large[data-platform="apple"] { background: #e1e6ed; border-color: #bec8d5; }
:root[data-theme="dark"] .device-icon[data-platform="android"],
:root[data-theme="dark"] .device-icon-large[data-platform="android"] { background: #d7f0e4; border-color: #aed8c3; }
:root[data-theme="dark"] .device-icon[data-platform="linux"],
:root[data-theme="dark"] .device-icon-large[data-platform="linux"] { background: #f0e2bb; border-color: #d6c38d; }
:root[data-theme="dark"] .device-session-indicator::after,
:root[data-theme="dark"] .device-session-count { border-color: var(--surface); }
:root[data-theme="dark"] .device-session-indicator.desktop,
:root[data-theme="dark"] .device-session-dialog-icon.desktop { color: #8bb8ff; background: #1b3150; border-color: #31517c; }
:root[data-theme="dark"] .device-session-indicator.terminal,
:root[data-theme="dark"] .device-session-dialog-icon.terminal { color: #bea7f0; background: #30284b; border-color: #554579; }
:root[data-theme="dark"] .device-session-indicator.files,
:root[data-theme="dark"] .device-session-dialog-icon.files { color: #e2ad69; background: #3b2c1d; border-color: #67472b; }
:root[data-theme="dark"] .device-session-dialog-state,
:root[data-theme="dark"] .session-state.approvalpending { color: #e5bb72; background: #3b2e1d; }
:root[data-theme="dark"] .device-session-dialog-state.active,
:root[data-theme="dark"] .session-state.active { color: #75d7b5; background: #173a31; }
:root[data-theme="dark"] .device-session-end-button { color: #ee8f99; background: #40232b; border-color: #68404a; }
:root[data-theme="dark"] .device-session-end-button:hover:not(:disabled) { color: #ffabb3; background: #512933; }
:root[data-theme="dark"] .file-status-dot,
:root[data-theme="dark"] .terminal-status-dot,
:root[data-theme="dark"] .desktop-status-dot { box-shadow: 0 0 0 4px #26364a; }
:root[data-theme="dark"] .file-workspace.active .file-status-dot,
:root[data-theme="dark"] .terminal-workspace.active .terminal-status-dot,
:root[data-theme="dark"] .desktop-workspace.active .desktop-status-dot { box-shadow: 0 0 0 4px #183b32; }
:root[data-theme="dark"] .file-workspace.pending .file-status-dot,
:root[data-theme="dark"] .terminal-workspace.pending .terminal-status-dot,
:root[data-theme="dark"] .desktop-workspace.pending .desktop-status-dot { box-shadow: 0 0 0 4px #40311d; }
:root[data-theme="dark"] .file-sidebar { background: #101c2c; }
:root[data-theme="dark"] #file-roots button:hover,
:root[data-theme="dark"] .file-nav-buttons button:hover:not(:disabled),
:root[data-theme="dark"] .file-command-bar button:hover:not(:disabled),
:root[data-theme="dark"] .file-context-menu button:hover { background: #22344c; }
:root[data-theme="dark"] #file-roots button.active,
:root[data-theme="dark"] .file-table tbody tr.selected { color: #b9d4ff; background: #1a365c; }
:root[data-theme="dark"] .file-table th button:hover,
:root[data-theme="dark"] .file-table th button.active { color: #9fc1ff; background: #192d47; }
:root[data-theme="dark"] .file-table tbody tr { border-bottom-color: #213147; }
:root[data-theme="dark"] .file-table tbody tr:hover { background: #192a40; }
:root[data-theme="dark"] .file-entry-icon.file { color: #9eb0c7; background: #26384f; border-color: #42546a; }
:root[data-theme="dark"] .file-entry-icon.file::after { border-color: #42546a; }
:root[data-theme="dark"] .file-drop-overlay { color: #a8c8ff; background: rgba(21, 44, 75, .96); border-color: #5e8ed8; }
:root[data-theme="dark"] .file-drop-overlay small { color: #8fa9cc; }
:root[data-theme="dark"] .file-transfer-actions button { color: #b3c1d5; background: #1b2b40; }
:root[data-theme="dark"] .file-dialog::backdrop { background: rgba(2, 7, 14, .68); }
:root[data-theme="dark"] .desktop-toolbar { background: rgba(20, 34, 54, .96); border-color: #2e4057; box-shadow: 0 8px 24px rgba(0, 5, 14, .25); }
:root[data-theme="dark"] #desktop-surface:fullscreen .desktop-toolbar { background: rgba(20, 34, 54, .96); border-color: #2e4057; box-shadow: 0 8px 24px rgba(0, 5, 14, .38); }
:root[data-theme="dark"] .desktop-view-only-toggle:hover:not(.disabled),
:root[data-theme="dark"] .desktop-dialog-close:hover { background: #22344c; }
:root[data-theme="dark"] .desktop-view-only-toggle.checked,
:root[data-theme="dark"] .desktop-session-button.session-active:disabled,
:root[data-theme="dark"] .desktop-controls button.active { color: #7bd9b8; background: #173a31; border-color: #2b5d4f; }
:root[data-theme="dark"] .desktop-session-button.session-pending:disabled { color: #e2b86f; background: #3b2d1c; border-color: #624a2a; }
:root[data-theme="dark"] .desktop-session-actions { background: #101c2c; border-color: #2d3e54; }
:root[data-theme="dark"] .desktop-icon-button:hover:not(:disabled) { color: #9fc1ff; background: #21344e; box-shadow: none; }
:root[data-theme="dark"] .desktop-icon-button.destructive:hover:not(:disabled) { color: #ffa1aa; background: #41242c; }
:root[data-theme="dark"] .desktop-inline-tools .desktop-action-menu > summary { color: #9eacc0; }
:root[data-theme="dark"] .desktop-inline-tools .desktop-action-menu > summary:hover,
:root[data-theme="dark"] .desktop-inline-tools .desktop-action-menu[open] > summary { color: #a9c9ff; background: #1b3150; }
:root[data-theme="dark"] .desktop-inline-tools .desktop-stream-stats span:first-child { color: #a9c9ff; background: #1b3150; border-color: #31547e; }
:root[data-theme="dark"] .desktop-inline-tools .desktop-action-popover { color: var(--ink-750); background: rgba(18, 31, 49, .98); border-color: #34465d; box-shadow: 0 18px 42px rgba(0, 5, 14, .48); }
:root[data-theme="dark"] .desktop-inline-tools .desktop-action-popover button:hover:not(:disabled) { background: #223650; }
:root[data-theme="dark"] .desktop-inline-tools .desktop-action-popover button.selected { color: #b9d4ff; background: #1e3b61; }
:root[data-theme="dark"] .desktop-inline-tools .desktop-shortcut-popover kbd { color: #b7c5d9; background: #0f1b2b; border-color: #34465d; }
:root[data-theme="dark"] .desktop-clipboard-dialog textarea,
:root[data-theme="dark"] .desktop-clipboard-read-dialog textarea,
:root[data-theme="dark"] .desktop-clipboard-dialog textarea:focus { background: var(--surface-muted); }
:root[data-theme="dark"] .desktop-clipboard-dialog footer { background: #101c2c; }
:root[data-theme="dark"] .desktop-custom-capture { background: #101c2c; border-color: #2b3c52; }
:root[data-theme="dark"] .desktop-custom-settings output { color: #b9d4ff; background: #1b3150; border-color: #31547e; }
:root[data-theme="dark"] .desktop-custom-profile-dialog footer { background: #101c2c; }
:root[data-theme="dark"] .telemetry-chart svg { background: repeating-linear-gradient(to bottom, #27394f 0 1px, transparent 1px 40px), repeating-linear-gradient(to right, #223348 0 1px, transparent 1px 75px); }
:root[data-theme="dark"] .performance-glyph.cpu,
:root[data-theme="dark"] .activity-glyph { color: #91baff; background: #1b3151; }
:root[data-theme="dark"] .performance-glyph.memory { color: #c5adf6; background: #30274b; }
:root[data-theme="dark"] .performance-glyph.gpu,
:root[data-theme="dark"] .performance-glyph.battery { color: #72d8b3; background: #173a31; }
:root[data-theme="dark"] .performance-glyph.storage { color: #e4b575; background: #3a2b1d; }
:root[data-theme="dark"] .performance-glyph.thermal { color: #f39a84; background: #442824; }
:root[data-theme="dark"] .performance-empty { border-color: #40526a; }
:root[data-theme="dark"] .selection-row.active { color: #b9d4ff; }
:root[data-theme="dark"] .key-callout { border-color: #35557d; }
:root[data-theme="dark"] .field-label { color: #91aed2; }
:root[data-theme="dark"] .key-callout code { color: #b9d4ff; }
:root[data-theme="dark"] .icon-action { background: rgba(20, 34, 54, .8); }
:root[data-theme="dark"] .command-field textarea,
:root[data-theme="dark"] .install-target select { color: var(--ink-750); background: var(--surface-muted); border-color: var(--line); }
:root[data-theme="dark"] .secure-badge { border-color: #285847; }
:root[data-theme="dark"] .compact-toggle i { background: #40516a; }
:root[data-theme="dark"] .management-create-control > summary:hover,
:root[data-theme="dark"] .management-create-control[open] > summary { background: #1b2b40; }
:root[data-theme="dark"] .theme-preview { background: linear-gradient(145deg, #243754, #17263b); border-color: #354b68; transform: none; }
:root[data-theme="dark"] .theme-preview i { width: 18px; height: 18px; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23edf3ff' d='M20.5 15.1A8.5 8.5 0 0 1 8.9 3.5 8.5 8.5 0 1 0 20.5 15.1Z'/%3E%3C/svg%3E") center / 18px 18px no-repeat; box-shadow: none; filter: drop-shadow(0 0 4px rgba(237, 243, 255, .18)); transform: none; }

/* Finder keeps its macOS character while matching Northstar dark mode. */
:root[data-theme="dark"] .file-workspace.finder-mode .file-explorer { color: #e4e4e9; background: #1e1e21; border-color: #414147; box-shadow: 0 22px 58px rgba(0, 0, 0, .38); }
:root[data-theme="dark"] .file-workspace.finder-mode .file-sidebar { background: linear-gradient(180deg, rgba(48, 49, 55, .98), rgba(37, 38, 43, .98)); border-right-color: #484950; }
:root[data-theme="dark"] .file-workspace.finder-mode .file-sidebar-heading strong { color: #a1a1aa; }
:root[data-theme="dark"] .file-workspace.finder-mode #file-roots button { color: #dedee4; }
:root[data-theme="dark"] .file-workspace.finder-mode #file-roots button:hover { background: rgba(255, 255, 255, .07); }
:root[data-theme="dark"] .file-workspace.finder-mode #file-roots button.active { color: #fff; background: rgba(52, 125, 210, .42); }
:root[data-theme="dark"] .file-workspace.finder-mode .file-main { background: #1e1e21; }
:root[data-theme="dark"] .file-workspace.finder-mode .file-navigation { background: linear-gradient(#343438, #2a2a2e); border-bottom-color: #4a4a50; }
:root[data-theme="dark"] .file-workspace.finder-mode .file-nav-buttons button { color: #c0c0c7; }
:root[data-theme="dark"] .file-workspace.finder-mode .file-nav-buttons button:hover:not(:disabled) { background: rgba(255, 255, 255, .08); border-color: #55565c; }
:root[data-theme="dark"] .file-workspace.finder-mode .file-breadcrumbs button { color: #dddde2; }
:root[data-theme="dark"] .file-workspace.finder-mode .file-search { background: rgba(24, 24, 27, .7); border-color: #56575e; }
:root[data-theme="dark"] .file-workspace.finder-mode .file-command-bar { background: #29292d; border-bottom-color: #45464c; }
:root[data-theme="dark"] .file-workspace.finder-mode .file-command-bar button { color: #d8d8de; }
:root[data-theme="dark"] .file-workspace.finder-mode .file-command-bar button:hover:not(:disabled) { background: #3a3a40; }
:root[data-theme="dark"] .file-workspace.finder-mode .file-table th { color: #a6a6ae; background: #26262a; border-bottom-color: #45464c; }
:root[data-theme="dark"] .file-workspace.finder-mode .file-table tbody tr { color: #e2e2e7; }
:root[data-theme="dark"] .file-workspace.finder-mode .file-table tbody tr:nth-child(even) { background: #232328; }
:root[data-theme="dark"] .file-workspace.finder-mode .file-table tbody tr:hover { background: #2c3642; }
:root[data-theme="dark"] .file-workspace.finder-mode .file-table tbody tr.selected { color: #fff; background: #1769bd; }
:root[data-theme="dark"] .file-workspace.finder-mode .file-entry-icon.file { color: #b6bec8; background: linear-gradient(#41434a, #303239); border-color: #5a5d65; }
:root[data-theme="dark"] .file-workspace.finder-mode .file-status-bar { color: #a8a8b0; background: #29292d; border-top-color: #45464c; }
:root[data-theme="dark"] .file-workspace.finder-mode .file-context-menu { background: rgba(42, 42, 47, .97); border-color: #606168; }

/* Personalization presets */
:root[data-density="compact"] .workspace { padding-top: 24px; padding-bottom: 48px; }
:root[data-density="compact"] .stats-grid { gap: 10px; }
:root[data-density="compact"] .stat-card { gap: 11px; padding: 13px 14px; }
:root[data-density="compact"] .panel-heading { min-height: 56px; padding: 11px 15px; }
:root[data-density="compact"] .device-table td { padding-block: 10px; }
:root[data-density="compact"] .overview-summary-item { padding: 9px 13px; }
:root[data-density="compact"] .detail-list div,
:root[data-density="compact"] .inventory-row { padding-block: 10px; }
:root[data-density="compact"] .settings-preference-row { min-height: 94px; padding-block: 15px; }
:root[data-density="spacious"] .workspace { padding-top: 42px; padding-bottom: 84px; }
:root[data-density="spacious"] .stats-grid { gap: 18px; }
:root[data-density="spacious"] .stat-card { gap: 17px; padding: 21px 22px; }
:root[data-density="spacious"] .panel-heading { min-height: 74px; padding: 17px 21px; }
:root[data-density="spacious"] .device-table td { padding-block: 16px; }
:root[data-density="spacious"] .overview-summary-item { padding: 15px 19px; }
:root[data-density="spacious"] .detail-list div,
:root[data-density="spacious"] .inventory-row { padding-block: 17px; }
:root[data-density="spacious"] .settings-preference-row { min-height: 124px; padding-block: 25px; }

:root[data-corners="crisp"] :is(.auth-card, .panel, .stat-card, .overview-summary, .server-status-grid article, .group-policy-control, .key-callout) { border-radius: 6px; }
:root[data-corners="crisp"] :is(input, select, textarea, .primary-button, .quiet-button, .ghost-button, .danger-button, .back-button, .icon-action, .appearance-segments, .accent-options button) { border-radius: 5px; }
:root[data-corners="rounded"] :is(.auth-card, .panel, .stat-card, .overview-summary, .server-status-grid article, .group-policy-control, .key-callout) { border-radius: 17px; }
:root[data-corners="rounded"] :is(input, select, textarea, .primary-button, .quiet-button, .ghost-button, .danger-button, .back-button, .icon-action, .appearance-segments, .accent-options button) { border-radius: 12px; }

:root[data-motion="subtle"] :is(.nav-button, .nav-glyph, .appearance-segments button, .accent-options button span, .desktop-icon-button, .desktop-action-popover, .file-context-menu) { animation-timing-function: ease !important; transition-timing-function: ease !important; }
:root[data-motion="subtle"] .motion-preview i { animation: none; }
:root[data-motion="reduced"] *,
:root[data-motion="reduced"] *::before,
:root[data-motion="reduced"] *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
:root[data-motion="reduced"] .motion-preview i { animation: none; }

@media (max-width: 1100px) {
  .stats-grid, .performance-summary, .activity-spec-grid { grid-template-columns: 1fr 1fr; }
  .overview-summary { grid-template-columns: 1fr 1fr; }
  .overview-summary-item:nth-child(3) { border-left: 0; }
  .overview-summary-item:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
  .overview-columns, .access-layout, .users-layout { grid-template-columns: 1fr; }
  .management-master-panel { position: static; }
  .performance-chart-grid { grid-template-columns: 1fr; }
  .network-chart { grid-column: auto; }
  .key-panel { min-height: auto; }
  .file-explorer { grid-template-columns: 165px minmax(0, 1fr); }
  .file-navigation { grid-template-columns: auto minmax(180px, 1fr); }
  .file-search { grid-column: 1 / -1; }
  .file-command-bar { overflow-x: auto; }
  .file-command-bar button { flex: 0 0 auto; }
  .desktop-toolbar { flex-wrap: wrap; }
  .desktop-inline-tools { order: 3; flex: 1 0 100%; justify-content: flex-start; padding-top: 4px; border-top: 1px solid #edf0f4; }
}

@media (max-width: 780px) {
  .auth-shell { grid-template-columns: 1fr; }
  .identity-panel { min-height: auto; padding: 28px; }
  .identity-copy { margin: 48px 0; padding: 0; }
  .identity-copy h1 { font-size: 38px; }
  .app-shell { display: block; }
  .sidebar { width: min(calc(100vw - 24px), 420px); height: 64px; position: fixed; inset: auto auto max(12px, env(safe-area-inset-bottom)) 50%; align-self: auto; flex-direction: row; margin: 0; padding: 8px 10px; border-radius: 20px; transform: translateX(-50%); animation-name: sidebar-dock-enter; }
  .sidebar::before, .sidebar-brand, .nav-label, .sidebar-spacer, .relay-health, .profile-card { display: none; }
  .primary-nav { width: 100%; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
  .nav-button { width: 100%; min-height: 46px; grid-template-rows: 22px auto; gap: 2px; border-radius: 13px; }
  .nav-button::before { width: 18px; height: 3px; left: 50%; top: auto; bottom: -7px; border-radius: 4px 4px 0 0; opacity: 0; transform: translateX(-50%) scaleX(.4); }
  .nav-button.active::before { opacity: 1; transform: translateX(-50%) scaleX(1); }
  .nav-glyph { width: 21px; height: 21px; }
  .nav-glyph svg { width: 19px; height: 19px; }
  .nav-text { min-width: 0; position: static; z-index: auto; padding: 0; color: currentColor; background: transparent; border: 0; border-radius: 0; box-shadow: none; opacity: 1; visibility: visible; transform: none; pointer-events: none; font-size: 7px; line-height: 1; }
  .nav-text::before { display: none; }
  .nav-button:hover .nav-text, .nav-button:focus-visible .nav-text { transform: none; }
  .nav-button small { top: -1px; right: max(3px, calc(50% - 23px)); }
  .workspace { padding: 25px 16px calc(98px + env(safe-area-inset-bottom)); }
  .workspace.desktop-wide { padding-inline: 16px; padding-bottom: calc(98px + env(safe-area-inset-bottom)); }
  .page-header, .device-header { align-items: flex-start; flex-direction: column; }
  .users-layout, .server-layout { grid-template-columns: 1fr; }
  .server-status-grid { grid-template-columns: 1fr; }
  .recovery-banner { grid-template-columns: 1fr; }
  .terminal-toolbar { align-items: flex-start; flex-direction: column; }
  .desktop-shortcut-popover { max-height: min(56vh, 440px); }
  .terminal-controls { justify-content: flex-start; width: 100%; }
  .terminal-stage footer { align-items: flex-start; flex-wrap: wrap; padding-block: 9px; }
  .file-session-bar { align-items: flex-start; flex-direction: column; }
  .file-explorer { grid-template-columns: 1fr; }
  .file-sidebar { border-right: 0; border-bottom: 1px solid var(--line-soft); }
  #file-roots { display: flex; overflow-x: auto; }
  #file-roots button { min-width: 170px; }
}

@media (max-width: 540px) {
  .primary-nav { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .stats-grid, .performance-summary, .activity-spec-grid { grid-template-columns: 1fr; }
  .overview-summary { grid-template-columns: 1fr; }
  .overview-summary-item { border-top: 1px solid var(--line-soft); border-left: 0; }
  .overview-summary-item:first-child { border-top: 0; }
  .performance-toolbar { align-items: flex-start; flex-direction: column; padding-block: 12px; }
  .performance-toolbar > div { align-items: flex-start; flex-wrap: wrap; }
  .stat-card strong { font-size: 20px; }
  .panel-heading { align-items: flex-start; flex-direction: column; }
  .search-box { width: 100%; }
  .connection-key { align-items: flex-start; flex-direction: column; padding-block: 10px; }
  .connection-key div { flex-wrap: wrap; }
  .device-actions { align-items: stretch; flex-direction: column; width: 100%; }
  .agent-update-control { align-items: stretch; }
  .agent-update-control small { max-width: none; text-align: left; }
  .detail-list { grid-template-columns: 1fr; }
  .detail-list div:nth-last-child(2) { border-bottom: 1px solid var(--line-soft); }
  .split-fields { grid-template-columns: 1fr; }
  .membership-edit-row, .membership-row, .user-membership-row, .management-member-picker { grid-template-columns: 1fr; }
  .management-section-heading { align-items: flex-start; }
  .management-entity-row { grid-template-columns: 34px minmax(0, 1fr); }
  .management-entity-row .organization-management-actions { grid-column: 1 / -1; justify-content: stretch; }
  .management-entity-row .organization-management-actions select { min-width: 0; flex: 1 1 140px; }
  .install-target { grid-template-columns: 1fr; }
  .key-callout { grid-template-columns: 1fr 1fr; }
  .group-policy-control { grid-template-columns: 1fr; }
  .device-setting-row { grid-template-columns: 1fr; gap: 18px; }
  .settings-preference-row { align-items: flex-start; flex-direction: column; gap: 18px; }
  .accent-options { width: 100%; grid-template-columns: repeat(3, minmax(54px, 1fr)); }
  .appearance-segments { max-width: 100%; flex-wrap: wrap; }
  .theme-toggle { justify-content: flex-start; }
  .key-callout > div { grid-column: 1 / -1; }
  .key-actions { align-items: stretch; flex-direction: column; }
  .key-actions .danger-button { margin-left: 0; }
  .management-heading-actions, .management-form-actions { width: 100%; flex-wrap: wrap; }
  .management-heading-actions > *, .management-form-actions button { flex: 1 1 auto; }
  .management-tabs { padding-inline: 8px; }
  .management-tab-panel { padding-inline: 13px; }
  .history-note { margin-left: 18px; }
  .network-list { grid-template-columns: 1fr; }
  .network-list .inventory-row:nth-last-child(2) { border-bottom: 1px solid var(--line-soft); }
  .session-row { grid-template-columns: 1fr; gap: 8px; }
  .terminal-controls label, .terminal-controls select, .terminal-controls button { width: 100%; }
  .desktop-toolbar { flex-wrap: wrap; }
  .desktop-identity { min-width: min(180px, 100%); }
  .desktop-identity small { max-width: min(340px, calc(100vw - 90px)); }
  .desktop-controls { width: 100%; justify-content: space-between; }
  .desktop-command-bar { width: min(268px, calc(100vw - 16px)); }
  .desktop-shortcut-popover { max-height: min(54vh, 400px); }
  .desktop-inline-tools > .desktop-command-bar { width: 100%; flex-wrap: wrap; justify-content: flex-start; }
  .desktop-inline-tools .desktop-action-popover { left: 0; transform: none; }
  .desktop-inline-tools .desktop-shortcut-popover { width: min(300px, calc(100vw - 24px)); grid-template-columns: 1fr; }
  .desktop-viewport { min-height: 360px; height: 62vh; }
  .desktop-stream-stats { margin-left: 1px; padding-left: 4px; }
  .desktop-stream-stats span { padding-inline: 4px; }
  .desktop-clipboard-dialog footer { flex-wrap: wrap; }
  .desktop-clipboard-dialog footer button { min-width: 0; flex: 1 1 140px; }
  .desktop-custom-capture { grid-template-columns: 1fr; }
  .file-dialog .desktop-custom-settings label { grid-template-columns: minmax(120px, 1fr) 58px; gap: 7px 12px; }
  .desktop-custom-settings input[type="range"] { grid-column: 1 / 2; }
  .desktop-custom-settings output { grid-column: 2; grid-row: 1 / 3; }
  .desktop-custom-settings .desktop-custom-encoding { grid-template-columns: 1fr; }
  .desktop-custom-settings .desktop-custom-encoding select { grid-column: 1; }
  .desktop-custom-profile-dialog footer { flex-wrap: wrap; }
  .desktop-custom-profile-dialog footer button { flex: 1 1 auto; }
  .desktop-custom-footer-spacer { display: none; }
  .file-navigation { grid-template-columns: 1fr; }
  .file-nav-buttons { order: 1; }
  .file-breadcrumbs { order: 2; }
  .file-search { order: 3; grid-column: auto; }
  .file-table th:nth-child(2), .file-table td:nth-child(2), .file-table th:nth-child(3), .file-table td:nth-child(3) { display: none; }
  .file-table th:nth-child(1) { width: 75%; }
  .file-table th:nth-child(4) { width: 25%; }
}

@media (max-width: 780px) {
  :root[data-density="compact"] .workspace,
  :root[data-density="comfortable"] .workspace,
  :root[data-density="spacious"] .workspace { padding: 25px 16px calc(98px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  .spinner,
  .sidebar,
  .nav-button,
  .relay-health .pulse,
  .desktop-action-menu[open] > .desktop-action-popover,
  .desktop-tools-drawer[open] > .desktop-command-bar,
  .global-agent-update-list[aria-busy="true"]:empty,
  .global-agent-update-row,
  .global-agent-update-row[data-active="true"] .agent-update-progress i::after,
  .agent-update-action.busy::before,
  .file-context-menu:not(.hidden) { animation: none; }
  .sidebar-brand,
  .sidebar-brand .brand-mark,
  .nav-button,
  .nav-button::before,
  .nav-glyph,
  .sidebar-brand-copy,
  .nav-text,
  .sidebar-flyout,
  .profile-copy,
  .relay-health,
  .avatar,
  .profile-signout,
  .desktop-menu-chevron,
  .theme-preview,
  .theme-preview i,
  .appearance-preview i,
  .accent-options button span,
  .appearance-segments button,
  .theme-toggle-track,
  .agent-update-progress i,
  .theme-toggle-track::after { transition-duration: 0s; }
}

html[data-motion="reduced"] .global-agent-update-list[aria-busy="true"]:empty,
html[data-motion="reduced"] .global-agent-update-row,
html[data-motion="reduced"] .global-agent-update-row[data-active="true"] .agent-update-progress i::after,
html[data-motion="reduced"] .agent-update-action.busy::before { animation: none; }
html[data-motion="reduced"] .agent-update-progress i { transition-duration: 0s; }

@media (forced-colors: active) {
  .theme-toggle-track { border: 1px solid ButtonText; }
  .theme-toggle input:checked + .theme-toggle-track { background: Highlight; }
  .theme-toggle input:focus-visible + .theme-toggle-track { outline-color: Highlight; }
  .accent-options button.selected,
  .appearance-segments button.selected { border: 2px solid Highlight; }
}
