* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.theme-a {
  --bg: #070b14;
  --bg2: #0a1020;
  --panel: rgba(15, 23, 42, .72);
  --panel-strong: #0d1526;
  --card: rgba(17, 26, 44, .86);
  --card-2: rgba(23, 33, 55, .7);
  --border: rgba(148, 163, 184, .15);
  --border-strong: rgba(148, 163, 184, .26);
  --text: #e9eff9;
  --sub: #93a3bc;
  --muted: #64748b;
  --accent: #5b8cff;
  --accent-2: #22d3ee;
  --accent-3: #8b5cf6;
  --accent-grad: linear-gradient(135deg, #5b8cff 0%, #22d3ee 100%);
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;
  --soft: rgba(255, 255, 255, .04);
  --soft-2: rgba(255, 255, 255, .07);
  --hover: rgba(255, 255, 255, .06);
  --inset: rgba(0, 0, 0, .22);
  --topbar: rgba(7, 11, 20, .78);
  --overlay: rgba(3, 7, 18, .66);
  --shadow: 0 28px 90px rgba(0, 0, 0, .5);
  --shadow-soft: 0 14px 40px rgba(0, 0, 0, .25);
  --radius: 18px;
  --radius-sm: 12px;
  --glass: blur(18px) saturate(140%);
  --mono: "Cascadia Mono", "Consolas", "SFMono-Regular", monospace;
}
body.theme-b {
  --bg: #050916;
  --bg2: #0a1226;
  --panel: rgba(19, 28, 56, .58);
  --panel-strong: #0c1429;
  --card: rgba(20, 30, 58, .8);
  --card-2: rgba(29, 40, 74, .62);
  --border: rgba(129, 140, 248, .22);
  --border-strong: rgba(129, 140, 248, .36);
  --text: #eef3ff;
  --sub: #a4b1ce;
  --muted: #7081a3;
  --accent: #7c8cff;
  --accent-2: #22d3ee;
  --accent-3: #a78bfa;
  --accent-grad: linear-gradient(135deg, #8b5cf6 0%, #4f8cff 46%, #22d3ee 100%);
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #fb7185;
  --soft: rgba(255, 255, 255, .055);
  --soft-2: rgba(255, 255, 255, .09);
  --hover: rgba(255, 255, 255, .085);
  --inset: rgba(0, 0, 0, .26);
  --topbar: rgba(6, 10, 24, .72);
  --overlay: rgba(2, 5, 14, .68);
  --shadow: 0 32px 110px rgba(38, 55, 150, .3), 0 20px 60px rgba(0, 0, 0, .4);
  --shadow-soft: 0 18px 50px rgba(0, 0, 0, .3);
  --radius: 22px;
  --radius-sm: 14px;
  --glass: blur(24px) saturate(150%);
  --mono: "Cascadia Mono", "Consolas", "SFMono-Regular", monospace;
}
body.theme-c {
  --bg: #f2f5fa;
  --bg2: #ffffff;
  --panel: rgba(255, 255, 255, .82);
  --panel-strong: #ffffff;
  --card: #ffffff;
  --card-2: #f8fafc;
  --border: #e3e9f2;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --sub: #56657c;
  --muted: #94a3b8;
  --accent: #2563eb;
  --accent-2: #0891b2;
  --accent-3: #7c3aed;
  --accent-grad: linear-gradient(135deg, #2563eb 0%, #0891b2 100%);
  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;
  --soft: rgba(15, 23, 42, .035);
  --soft-2: rgba(15, 23, 42, .06);
  --hover: rgba(15, 23, 42, .05);
  --inset: rgba(15, 23, 42, .04);
  --topbar: rgba(255, 255, 255, .86);
  --overlay: rgba(15, 23, 42, .32);
  --shadow: 0 28px 80px rgba(15, 23, 42, .12);
  --shadow-soft: 0 14px 40px rgba(15, 23, 42, .08);
  --radius: 20px;
  --radius-sm: 13px;
  --glass: blur(20px) saturate(120%);
  --mono: "Cascadia Mono", "Consolas", "SFMono-Regular", monospace;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1000px 700px at 10% -10%, rgba(99, 102, 241, .24), transparent 62%),
    radial-gradient(900px 620px at 100% 0%, rgba(34, 211, 238, .14), transparent 58%),
    radial-gradient(900px 800px at 50% 115%, rgba(124, 58, 237, .14), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg2));
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .022) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 72%);
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 72%);
}
body.theme-c::before {
  background:
    radial-gradient(1000px 700px at 8% -10%, rgba(37, 99, 235, .10), transparent 62%),
    radial-gradient(900px 620px at 100% 0%, rgba(8, 145, 178, .08), transparent 58%),
    radial-gradient(800px 700px at 55% 115%, rgba(124, 58, 237, .06), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg2));
}
body.theme-c::after {
  background-image:
    linear-gradient(rgba(15, 23, 42, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, .035) 1px, transparent 1px);
}
button, input { font: inherit; }
button { cursor: pointer; }
img { display: block; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.sub { color: var(--sub); }
.mono { font-family: var(--mono); }
.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.i.lg { width: 22px; height: 22px; }
.i.sm { width: 15px; height: 15px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); display: inline-block; }
.dot.ok { background: var(--success); box-shadow: 0 0 0 4px rgba(52, 211, 153, .12); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.grad-text { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand-icon { width: 44px; height: 44px; border-radius: 12px; box-shadow: 0 12px 32px rgba(34, 211, 238, .16); }
.brand-icon.sm { width: 34px; height: 34px; border-radius: 9px; }
.brand-name { font-weight: 700; letter-spacing: .2px; font-size: 18px; line-height: 1.15; }
.brand-cn { font-size: 10px; color: var(--muted); letter-spacing: 3px; margin-top: 3px; }
.theme-b .brand-icon { box-shadow: 0 16px 44px rgba(99, 102, 241, .42); }
.theme-c .brand-icon { box-shadow: 0 12px 28px rgba(37, 99, 235, .18); }

.btn {
  border: 1px solid var(--border);
  background: var(--soft);
  color: var(--text);
  height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .1px;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}
.btn:hover { background: var(--hover); }
.btn-primary {
  border: none;
  background: var(--accent-grad);
  color: #fff;
  box-shadow: 0 12px 30px rgba(34, 211, 238, .18);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 16px 36px rgba(34, 211, 238, .24); }
.btn-ghost { background: transparent; }
.btn-sm { height: 34px; border-radius: 10px; padding: 0 12px; font-size: 12px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 11px;
  border: 1px solid var(--border); background: var(--soft); color: var(--sub);
  display: inline-grid; place-items: center; transition: .16s ease;
}
.icon-btn:hover { color: var(--text); background: var(--hover); }
.icon-btn.ghost { border-color: transparent; background: transparent; }
.chip {
  height: 32px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--border);
  background: transparent; color: var(--sub); font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
}
.chip.active { color: var(--text); background: var(--soft-2); border-color: var(--border-strong); }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 11px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--soft);
  font-size: 11.5px; color: var(--sub); font-weight: 600; white-space: nowrap;
}
.status-pill.success { color: var(--success); border-color: rgba(52, 211, 153, .22); background: rgba(52, 211, 153, .07); }
.theme-c .status-pill.success { color: var(--success); border-color: rgba(5, 150, 105, .22); background: rgba(5, 150, 105, .06); }
.kbd {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px;
  border: 1px solid var(--border); border-bottom-color: var(--border-strong); border-radius: 6px;
  background: var(--soft); color: var(--sub); font-size: 10.5px; font-family: var(--mono);
}
.divider-v { width: 1px; height: 16px; background: var(--border); display: inline-block; }

/* login */
.login-wrap {
  min-height: 100vh; max-width: 1560px; margin: 0 auto;
  display: grid; grid-template-columns: 1.12fr .88fr; gap: 44px;
  padding: 46px clamp(34px, 6vw, 96px); align-items: center;
}
.brand-pane { min-height: calc(100vh - 92px); display: flex; flex-direction: column; justify-content: space-between; position: relative; padding: 8px 0; }
.brand-pane .brand { position: relative; z-index: 2; }
.brand-pane .brand-icon { width: 58px; height: 58px; border-radius: 16px; }
.brand-pane .brand-name { font-size: 22px; }
.brand-pane .brand-cn { font-size: 11px; letter-spacing: 5px; }
.hero { position: relative; z-index: 2; padding: 24px 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--sub); font-size: 12px; font-weight: 600; letter-spacing: .6px; margin-bottom: 22px; }
.eyebrow .dot { background: var(--accent-2); box-shadow: 0 0 0 4px rgba(34, 211, 238, .1); }
.hero h1 { font-size: clamp(44px, 5.2vw, 76px); line-height: 1.02; letter-spacing: -2.5px; margin: 0 0 22px; font-weight: 750; }
.hero p { max-width: 520px; margin: 0; font-size: 15.5px; line-height: 1.85; color: var(--sub); }
.feature-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.feature {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--soft);
  color: var(--sub); font-size: 12.5px; font-weight: 500;
}
.brand-footer { position: relative; z-index: 2; color: var(--muted); font-size: 11.5px; letter-spacing: .2px; }
.aurora-orb {
  position: absolute; right: 6%; top: 6%; width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(124, 58, 237, .32), rgba(34, 211, 238, .08) 48%, transparent 70%);
  filter: blur(12px); opacity: .9; pointer-events: none;
}
.aurora-ring {
  position: absolute; right: 1%; top: 1%; width: 440px; height: 440px; border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, .12); pointer-events: none;
}
.aurora-ring::after { content: ""; position: absolute; inset: 46px; border-radius: 50%; border: 1px solid rgba(148, 163, 184, .09); }
.theme-a .aurora-orb { opacity: .45; }
.theme-c .aurora-orb { background: radial-gradient(circle at 35% 30%, rgba(37, 99, 235, .10), rgba(8, 145, 178, .04) 50%, transparent 70%); opacity: 1; }
.theme-c .aurora-ring, .theme-c .aurora-ring::after { border-color: rgba(15, 23, 42, .07); }
.theme-b .login-card { background: linear-gradient(180deg, rgba(28, 39, 78, .7), rgba(10, 16, 36, .86)); border-color: rgba(129, 140, 248, .3); }
.theme-b .login-card::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(135deg, rgba(139, 92, 246, .35), transparent 35%, transparent 65%, rgba(34, 211, 238, .25));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; padding: 1px;
}
.login-pane { display: flex; justify-content: center; }
.login-card {
  width: min(438px, 100%); position: relative; border: 1px solid var(--border);
  background: var(--panel); backdrop-filter: var(--glass);
  border-radius: 26px; padding: 30px; box-shadow: var(--shadow);
}
.login-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 26px; }
.login-head .tiny { font-size: 11px; color: var(--muted); }
.login-card h2 { margin: 0 0 8px; font-size: 25px; letter-spacing: -.5px; }
.login-card > p { margin: 0 0 24px; color: var(--sub); font-size: 13px; line-height: 1.6; }
.field-label { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--sub); margin-bottom: 8px; }
.field-label a { color: var(--accent); text-decoration: none; font-size: 11.5px; }
.input-wrap {
  height: 48px; display: flex; align-items: center; gap: 10px; padding: 0 14px;
  border: 1px solid var(--border-strong); border-radius: 13px; background: var(--soft);
  color: var(--sub); transition: .16s ease;
}
.input-wrap:focus-within { border-color: rgba(91, 140, 255, .7); box-shadow: 0 0 0 4px rgba(91, 140, 255, .1); }
.input-wrap input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); letter-spacing: 3px; font-size: 14px; }
.login-card .btn-primary { width: 100%; height: 48px; margin-top: 16px; border-radius: 13px; font-size: 14px; }
.or-line { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: var(--muted); font-size: 11px; }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.qr-row {
  display: flex; align-items: center; gap: 13px; padding: 12px;
  border: 1px solid var(--border); border-radius: 14px; background: var(--soft);
}
.qr-img { width: 64px; height: 64px; border-radius: 9px; background: #fff; padding: 5px; }
.qr-row strong { display: block; font-size: 12.5px; margin-bottom: 4px; }
.qr-row p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.qr-row .i { margin-left: auto; color: var(--muted); }
.login-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--border); color: var(--muted); font-size: 11.5px; }
.login-meta strong { color: var(--sub); font-weight: 600; }
.login-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 18px; color: var(--muted); font-size: 10.5px; line-height: 1.55; }
.login-note .i { color: var(--success); margin-top: 1px; }

/* shared viewer chrome */
.viewer-page { height: 100vh; overflow: hidden; }
.topbar {
  height: 68px; display: flex; align-items: center; gap: 14px; padding: 0 22px;
  background: var(--topbar); backdrop-filter: var(--glass); border-bottom: 1px solid var(--border);
  position: relative; z-index: 10;
}
.device { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.device b { font-size: 13.5px; font-weight: 650; letter-spacing: .1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.device span { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.top-status { display: flex; align-items: center; gap: 10px; margin-left: 8px; font-size: 11.5px; color: var(--sub); }
.stat { color: var(--muted); font-family: var(--mono); font-size: 10.5px; }
.stat b { color: var(--sub); font-weight: 500; }
.top-actions { display: flex; align-items: center; gap: 7px; margin-left: auto; }
.top-actions .btn { height: 36px; border-radius: 10px; font-size: 12px; padding: 0 12px; }
.top-actions .btn.primary-soft { color: var(--accent-2); border-color: rgba(34, 211, 238, .25); background: rgba(34, 211, 238, .07); }
.theme-c .top-actions .btn.primary-soft { color: var(--accent); border-color: rgba(37, 99, 235, .2); background: rgba(37, 99, 235, .05); }
.stage { height: calc(100vh - 68px); display: flex; gap: 16px; padding: 16px; position: relative; }
.screen-wrap {
  flex: 1; min-width: 0; position: relative; overflow: hidden;
  border-radius: var(--radius); border: 1px solid var(--border-strong);
  background: #040711; box-shadow: var(--shadow-soft);
}
.remote-screen { position: absolute; inset: 0; overflow: hidden; background: #0b1020; }
.wallpaper {
  position: absolute; inset: 0;
  background:
    radial-gradient(1000px 620px at 72% 18%, rgba(124, 58, 237, .62), transparent 60%),
    radial-gradient(900px 620px at 18% 84%, rgba(6, 182, 212, .42), transparent 60%),
    linear-gradient(135deg, #090e20 0%, #171239 48%, #071421 100%);
}
.wallpaper::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .16) .7px, transparent .7px);
  background-size: 26px 26px; opacity: .18;
}
.desk-window {
  position: absolute; left: 6.5%; top: 10%; width: 66%; height: 66%;
  border-radius: 12px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .13);
  background: rgba(9, 15, 29, .86); backdrop-filter: blur(12px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
.win-title { height: 40px; display: flex; align-items: center; gap: 10px; padding: 0 14px; background: rgba(255, 255, 255, .04); border-bottom: 1px solid rgba(255, 255, 255, .08); color: #c9d5ea; font-size: 11.5px; }
.win-title .file-ico { width: 16px; height: 16px; color: #fbbf24; }
.win-title .win-ctrl { margin-left: auto; display: flex; gap: 14px; color: #8fa0bb; font-size: 12px; }
.win-body { display: grid; grid-template-columns: 158px 1fr; height: calc(100% - 40px); }
.win-side { background: rgba(255, 255, 255, .025); border-right: 1px solid rgba(255, 255, 255, .06); padding: 12px 9px; }
.side-item { display: flex; align-items: center; gap: 9px; height: 32px; padding: 0 10px; border-radius: 8px; color: #8fa2c1; font-size: 11px; }
.side-item.active { background: rgba(91, 140, 255, .16); color: #dbe8ff; }
.side-item .sq { width: 8px; height: 8px; border-radius: 2px; background: #5b8cff; opacity: .8; }
.side-item:nth-child(2) .sq { background: #22d3ee; }
.side-item:nth-child(3) .sq { background: #a78bfa; }
.side-item:nth-child(4) .sq { background: #fbbf24; }
.side-label { margin: 14px 10px 6px; font-size: 9px; letter-spacing: 1.4px; color: #5c6d8c; }
.win-content { padding: 20px 24px; min-width: 0; }
.win-content h3 { margin: 0 0 4px; font-size: 18px; color: #edf3ff; letter-spacing: -.2px; }
.win-content .crumb { font-size: 10px; color: #7284a3; margin-bottom: 16px; }
.win-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.win-card { border: 1px solid rgba(255, 255, 255, .08); background: rgba(255, 255, 255, .045); border-radius: 9px; padding: 11px; }
.win-card span { display: block; font-size: 9.5px; color: #8294b3; margin-bottom: 7px; }
.win-card b { font-size: 15px; color: #e7efff; font-weight: 600; }
.win-card em { display: block; margin-top: 6px; font-size: 9px; color: #4ade80; font-style: normal; }
.win-table { border: 1px solid rgba(255, 255, 255, .07); border-radius: 9px; overflow: hidden; }
.win-tr { display: grid; grid-template-columns: 2.2fr 1fr 1fr; padding: 8px 12px; font-size: 10px; color: #9fb0cc; border-bottom: 1px solid rgba(255, 255, 255, .055); }
.win-tr:last-child { border-bottom: 0; }
.win-tr.head { color: #647796; background: rgba(255, 255, 255, .025); font-size: 9px; letter-spacing: .5px; }
.win-tr .ok { color: #4ade80; }
.taskbar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 52px;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  background: rgba(7, 12, 24, .72); border-top: 1px solid rgba(255, 255, 255, .07); backdrop-filter: blur(18px);
}
.tb-start { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #e8f1ff; }
.tb-app { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: rgba(255, 255, 255, .05); color: #a8b8d4; }
.tb-app.active { background: rgba(91, 140, 255, .18); color: #dce9ff; }
.tb-time { position: absolute; right: 16px; text-align: right; font-size: 9px; line-height: 1.45; color: #97a8c4; }
.cursor-arrow { position: absolute; left: 61%; top: 51%; width: 22px; height: 30px; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .55)); }
.session-chip {
  position: absolute; left: 16px; bottom: 15px; display: inline-flex; align-items: center; gap: 8px;
  height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(6, 11, 23, .58); color: #b7c7e0; font-size: 10px; backdrop-filter: blur(10px);
}
.stage-hint {
  position: absolute; right: 16px; bottom: 15px; display: flex; align-items: center; gap: 6px;
  padding: 7px 10px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--panel); backdrop-filter: var(--glass); color: var(--muted); font-size: 10px;
}
.theme-c .session-chip { background: rgba(255, 255, 255, .82); border-color: rgba(15, 23, 42, .08); color: #475569; }
.theme-c .stage-hint { color: var(--muted); }

/* file drawer */
.file-drawer {
  flex: 0 0 356px; width: 356px; display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel);
  backdrop-filter: var(--glass); box-shadow: var(--shadow-soft);
}
.drawer-head { display: flex; align-items: flex-start; gap: 10px; padding: 18px 18px 14px; border-bottom: 1px solid var(--border); }
.drawer-head h3 { margin: 0 0 5px; font-size: 14px; letter-spacing: -.1px; }
.drawer-head p { margin: 0; font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 250px; }
.drawer-head .icon-btn { margin-left: auto; width: 30px; height: 30px; border-radius: 8px; }
.drawer-tools { display: flex; align-items: center; gap: 7px; padding: 11px 18px; }
.drawer-tools .spacer { flex: 1; }
.drawer-tools .icon-btn { width: 30px; height: 30px; border-radius: 8px; }
.file-list { flex: 1; overflow: hidden; padding: 2px 9px 6px; }
.file-row { display: flex; align-items: center; gap: 10px; padding: 9px 9px; border-radius: 9px; color: var(--sub); }
.file-row:hover { background: var(--soft); }
.file-row .fi { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--soft-2); color: var(--accent); }
.file-row .fi.folder { color: var(--warning); }
.file-row .fi.img { color: var(--accent-3); }
.file-row .fi.zip { color: var(--accent-2); }
.file-row .meta { min-width: 0; flex: 1; }
.file-row .meta b { display: block; color: var(--text); font-size: 11.5px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-row .meta span { display: block; color: var(--muted); font-size: 9.5px; margin-top: 3px; }
.file-row > em { font-style: normal; font-size: 9.5px; color: var(--muted); }
.upload-card { margin: 8px 14px 0; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--soft); }
.upload-card .row { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--sub); margin-bottom: 8px; }
.upload-card .row span:last-child { font-family: var(--mono); color: var(--accent-2); }
.bar { height: 4px; border-radius: 99px; background: var(--soft-2); overflow: hidden; }
.bar i { display: block; height: 100%; width: 68%; border-radius: inherit; background: var(--accent-grad); }
.drawer-foot { display: flex; gap: 8px; padding: 14px 18px 16px; border-top: 1px solid var(--border); }
.drawer-foot .btn { flex: 1; height: 36px; font-size: 11.5px; }
.theme-c .file-row .meta b { font-weight: 600; }

/* mobile */
.mobile-page { height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
.m-topbar {
  height: 56px; display: flex; align-items: center; gap: 9px; padding: 0 14px;
  border-bottom: 1px solid var(--border); background: var(--topbar); backdrop-filter: var(--glass); flex: 0 0 auto;
}
.m-topbar .brand-icon { width: 28px; height: 28px; border-radius: 8px; }
.m-device { min-width: 0; flex: 1; }
.m-device b { display: block; font-size: 11.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-device span { display: flex; align-items: center; gap: 5px; font-size: 9px; color: var(--muted); margin-top: 2px; }
.m-stage { flex: 1; margin: 9px; border-radius: 15px; overflow: hidden; position: relative; border: 1px solid var(--border-strong); background: #040711; min-height: 0; }
.m-stage .remote-screen { position: absolute; inset: 0; }
.m-stage .desk-window { left: 5%; top: 8%; width: 84%; height: 66%; }
.m-stage .win-body { grid-template-columns: 1fr; }
.m-stage .win-side { display: none; }
.m-stage .win-content { padding: 13px 14px; }
.m-stage .win-content h3 { font-size: 13px; }
.m-stage .win-cards { gap: 6px; margin-bottom: 9px; }
.m-stage .win-card { padding: 7px; border-radius: 7px; }
.m-stage .win-card span { font-size: 7px; margin-bottom: 3px; }
.m-stage .win-card b { font-size: 11px; }
.m-stage .win-card em { font-size: 7px; margin-top: 3px; }
.m-stage .win-tr { font-size: 7.5px; padding: 5px 8px; }
.m-stage .win-tr.head { font-size: 7px; }
.m-stage .win-title { height: 28px; padding: 0 9px; font-size: 8px; }
.m-stage .win-title .win-ctrl { gap: 8px; font-size: 9px; }
.m-stage .taskbar { height: 36px; gap: 6px; }
.m-stage .tb-start, .m-stage .tb-app { width: 22px; height: 22px; border-radius: 6px; }
.m-stage .tb-time { font-size: 7px; right: 10px; }
.m-stage .cursor-arrow { width: 16px; height: 22px; left: 58%; top: 49%; }
.m-stage .session-chip { left: 9px; bottom: 9px; height: 24px; font-size: 8px; padding: 0 8px; }
.m-toast {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 48px; white-space: nowrap;
  display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 8px;
  background: rgba(6, 11, 23, .62); border: 1px solid rgba(255, 255, 255, .1);
  color: #aebed8; font-size: 8.5px; backdrop-filter: blur(10px);
}
.theme-c .m-toast { background: rgba(255, 255, 255, .86); border-color: rgba(15, 23, 42, .08); color: #64748b; }
.m-controls { flex: 0 0 auto; padding: 0 9px 10px; display: flex; flex-direction: column; gap: 7px; }
.m-modes {
  display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 14px;
  border: 1px solid var(--border); background: var(--panel); backdrop-filter: var(--glass);
}
.m-mode {
  flex: 1; height: 46px; border: 0; background: transparent; color: var(--muted);
  border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: 8.5px; font-weight: 600;
}
.m-mode .i { width: 17px; height: 17px; }
.m-mode.active { color: var(--text); background: var(--soft-2); }
.m-mode.accent { color: var(--accent-2); }
.theme-c .m-mode.accent { color: var(--accent); }
.m-keys { display: flex; gap: 5px; overflow: hidden; height: 30px; align-items: center; }
.m-keys .kbd { flex: 0 0 auto; min-width: 28px; height: 26px; font-size: 9px; border-radius: 7px; color: var(--sub); }
.m-sheet-backdrop { position: fixed; inset: 0; background: var(--overlay); backdrop-filter: blur(3px); z-index: 20; }
.m-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; height: 72vh; z-index: 21;
  border-radius: 22px 22px 0 0; border: 1px solid var(--border); border-bottom: 0;
  background: var(--panel-strong); box-shadow: 0 -20px 60px rgba(0, 0, 0, .35);
  display: flex; flex-direction: column; overflow: hidden;
}
.sheet-handle { width: 36px; height: 4px; border-radius: 9px; background: var(--border-strong); margin: 8px auto 2px; }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px 12px; border-bottom: 1px solid var(--border); }
.sheet-head h3 { margin: 0 0 4px; font-size: 14px; }
.sheet-head p { margin: 0; font-size: 9.5px; color: var(--muted); }
.sheet-head .icon-btn { margin-left: auto; width: 32px; height: 32px; }
.sheet-list { flex: 1; overflow: hidden; padding: 6px 10px; }
.sheet-foot { display: flex; gap: 8px; padding: 10px 14px 16px; border-top: 1px solid var(--border); }
.sheet-foot .btn { flex: 1; height: 40px; }

/* native panel */
.panel-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; overflow: auto; }
.native-window {
  width: min(1120px, 100%); height: min(760px, calc(100vh - 48px)); min-height: 620px;
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--border-strong); border-radius: 14px; background: var(--panel-strong);
  box-shadow: var(--shadow);
}
.win-bar {
  height: 46px; display: flex; align-items: center; gap: 10px; padding: 0 14px;
  background: var(--soft); border-bottom: 1px solid var(--border); color: var(--sub); flex: 0 0 auto;
}
.win-bar .brand-icon { width: 24px; height: 24px; border-radius: 7px; box-shadow: none; }
.win-bar b { font-size: 12px; color: var(--text); font-weight: 650; }
.win-bar .win-sub { font-size: 9.5px; color: var(--muted); margin-left: 2px; }
.win-controls { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.win-controls span { width: 30px; height: 26px; display: grid; place-items: center; border-radius: 6px; color: var(--muted); font-size: 11px; }
.win-controls span:hover { background: var(--hover); color: var(--text); }
.panel-body { flex: 1; display: grid; grid-template-columns: 190px 1fr; min-height: 0; }
.panel-nav { border-right: 1px solid var(--border); padding: 16px 11px; display: flex; flex-direction: column; gap: 4px; background: var(--soft); }
.nav-item { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 12px; border-radius: 9px; color: var(--sub); font-size: 12px; font-weight: 550; }
.nav-item.active { background: var(--soft-2); color: var(--text); }
.nav-item .i { width: 16px; height: 16px; }
.nav-sep { flex: 1; }
.nav-foot { padding: 10px 12px; color: var(--muted); font-size: 9.5px; line-height: 1.6; }
.panel-main { padding: 24px 26px; overflow: auto; min-width: 0; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.panel-head h1 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.5px; }
.panel-head p { margin: 0; color: var(--muted); font-size: 11px; }
.panel-grid { display: grid; grid-template-columns: 1.14fr .86fr; gap: 15px; }
.card {
  min-width: 0; border: 1px solid var(--border); border-radius: 15px;
  background: var(--card); padding: 17px; box-shadow: 0 8px 26px rgba(0, 0, 0, .08);
}
.theme-a .card, .theme-b .card { box-shadow: 0 10px 30px rgba(0, 0, 0, .16); }
.card-head { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.card-head h3 { margin: 0; font-size: 12.5px; letter-spacing: .1px; }
.card-head .i { color: var(--accent); }
.card-head .spacer { flex: 1; }
.addr-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); }
.addr-row:first-of-type { border-top: 0; }
.addr-tag { width: 58px; flex: 0 0 58px; font-size: 9.5px; color: var(--muted); }
.addr-val { flex: 1; min-width: 0; font-family: var(--mono); font-size: 10.5px; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.addr-val b { color: var(--text); font-weight: 500; }
.addr-row .copy { color: var(--muted); }
.pwd-row { display: flex; align-items: center; gap: 8px; padding: 9px; margin-top: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--soft); }
.pwd-row .mono { font-size: 13px; letter-spacing: 2px; color: var(--text); }
.pwd-row .i { color: var(--muted); }
.pwd-row .spacer { flex: 1; }
.conn-actions { display: flex; gap: 8px; margin-top: 13px; }
.conn-actions .btn { flex: 1; height: 36px; font-size: 11px; }
.qr-tile { display: flex; align-items: center; gap: 13px; margin-top: 13px; padding: 10px; border: 1px solid var(--border); border-radius: 11px; background: var(--soft); }
.qr-tile img { width: 66px; height: 66px; border-radius: 7px; background: #fff; padding: 4px; }
.qr-tile strong { display: block; font-size: 11px; margin-bottom: 4px; }
.qr-tile p { margin: 0; font-size: 9.5px; color: var(--muted); line-height: 1.5; }
.info-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 37px; border-top: 1px solid var(--border); font-size: 10.5px; color: var(--muted); }
.info-row:first-of-type { border-top: 0; }
.info-row b { color: var(--text); font-weight: 550; font-size: 11px; }
.toggle { width: 34px; height: 20px; border-radius: 99px; background: var(--soft-2); border: 1px solid var(--border); position: relative; flex: 0 0 auto; }
.toggle::after { content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); top: 2px; left: 2px; }
.toggle.on { background: rgba(34, 211, 238, .18); border-color: rgba(34, 211, 238, .35); }
.toggle.on::after { background: var(--accent-2); left: 16px; }
.theme-c .toggle.on { background: rgba(37, 99, 235, .12); border-color: rgba(37, 99, 235, .3); }
.theme-c .toggle.on::after { background: var(--accent); }
.seg { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--border); border-radius: 9px; background: var(--soft); }
.seg span { height: 24px; padding: 0 9px; display: grid; place-items: center; font-size: 9.5px; color: var(--muted); border-radius: 6px; }
.seg span.active { background: var(--soft-2); color: var(--text); }
.log-card { grid-column: 1 / -1; }
.log-lines { display: flex; flex-direction: column; gap: 0; font-family: var(--mono); font-size: 9.5px; line-height: 1.9; color: var(--muted); }
.log-lines div { display: flex; gap: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log-lines time { color: var(--muted); opacity: .7; }
.log-lines .ok { color: var(--success); }
.log-lines .info { color: var(--accent-2); }
.theme-c .log-lines .info { color: var(--accent); }
.panel-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 15px; color: var(--muted); font-size: 9.5px; }

@media (max-width: 1180px) {
  .login-wrap { grid-template-columns: 1fr; gap: 28px; padding: 34px; }
  .brand-pane { min-height: 0; gap: 24px; }
  .hero h1 { font-size: 48px; }
  .brand-footer { display: none; }
  .login-pane { justify-content: flex-start; }
}
@media (max-width: 980px) {
  .file-drawer { position: absolute; right: 24px; top: 24px; bottom: 24px; z-index: 8; }
  .panel-grid { grid-template-columns: 1fr; }
  .log-card { grid-column: auto; }
  .top-status .stat:nth-of-type(2) { display: none; }
}

/* theme B: stronger aurora branding */
body.theme-b::before {
  background:
    radial-gradient(1200px 800px at 2% -8%, rgba(124, 58, 237, .38), transparent 62%),
    radial-gradient(1000px 700px at 105% 0%, rgba(34, 211, 238, .22), transparent 55%),
    radial-gradient(900px 800px at 50% 120%, rgba(59, 130, 246, .25), transparent 60%),
    linear-gradient(180deg, #050916, #0a1226);
}
body.theme-b .aurora-orb {
  width: 500px; height: 500px; right: 3%; top: 2%; opacity: 1;
  background: radial-gradient(circle at 35% 30%, rgba(139, 92, 246, .5), rgba(34, 211, 238, .12) 48%, transparent 70%);
  filter: blur(16px);
}
body.theme-b .aurora-ring { width: 540px; height: 540px; right: 0; top: 0; border-color: rgba(139, 92, 246, .22); }
body.theme-b .brand-pane::before {
  content: ""; position: absolute; left: -8%; top: 18%; width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, .24), transparent 65%);
  filter: blur(24px); pointer-events: none;
}
body.theme-b .login-card { background: linear-gradient(180deg, rgba(33, 44, 86, .72), rgba(9, 15, 34, .9)); }
body.theme-b .login-card::before {
  background: linear-gradient(135deg, rgba(167, 139, 250, .85), rgba(79, 140, 255, .25) 45%, rgba(34, 211, 238, .55));
}
body.theme-b .topbar { background: rgba(6, 10, 24, .64); }

/* theme B: viewer branding */
body.theme-b .screen-wrap {
  border-color: rgba(129, 140, 248, .38);
  box-shadow: 0 0 0 1px rgba(129, 140, 248, .1), 0 28px 80px rgba(79, 70, 229, .26);
}
body.theme-b .file-drawer {
  background: linear-gradient(180deg, rgba(25, 35, 70, .66), rgba(9, 16, 36, .82));
  border-color: rgba(129, 140, 248, .28);
}
body.theme-b .chip.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, .22), rgba(34, 211, 238, .12));
  border-color: rgba(139, 92, 246, .4);
}
body.theme-b .upload-card .bar i { background: linear-gradient(90deg, #a78bfa, #4f8cff, #22d3ee); }
body.theme-b .topbar { border-bottom-color: rgba(129, 140, 248, .22); }
body.theme-b .m-modes { border-color: rgba(129, 140, 248, .3); }
