:root {
  color-scheme: light;
  --blue: #246cf3;
  --blue-dark: #1557dc;
  --blue-soft: #eaf2ff;
  --ink: #101828;
  --muted: #667085;
  --line: #e4e9f1;
  --surface: rgba(255, 255, 255, .92);
  --background: #f5f7fb;
  --green: #20b45a;
  --turn: #367cf7;
  --warning: #f59e0b;
  --danger: #dc3545;
  --shadow: 0 14px 36px rgba(31, 52, 91, .09), 0 2px 8px rgba(31, 52, 91, .05);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { width: 100%; min-height: 100%; margin: 0; background: var(--background); color: var(--ink); }
body { overscroll-behavior: none; }
button, input { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.page {
  min-height: 100dvh;
  padding: max(22px, env(safe-area-inset-top)) 22px max(24px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 18% -10%, rgba(67, 133, 255, .09), transparent 31%),
    var(--background);
}

.auth-page { display: flex; flex-direction: column; justify-content: center; gap: 38px; max-width: 540px; margin: auto; }
.brand { display: flex; align-items: center; gap: 16px; }
.brand-login { padding: 0 18px; }
.brand-icon { width: 64px; height: 64px; border-radius: 17px; box-shadow: 0 10px 24px rgba(36, 108, 243, .20); }
.brand h1 { margin: 0; font-size: clamp(28px, 8vw, 38px); line-height: 1.08; letter-spacing: -.8px; }
.brand p { margin: 7px 0 0; color: var(--muted); font-size: 14px; }
.brand.compact { gap: 11px; min-width: 0; }
.brand.compact .brand-icon { width: 48px; height: 48px; border-radius: 13px; }
.brand.compact h1 { font-size: 23px; letter-spacing: -.4px; }
.brand.compact p { font-size: 11px; white-space: nowrap; }

.card {
  background: var(--surface);
  border: 1px solid rgba(218, 225, 236, .9);
  border-radius: 26px;
  box-shadow: var(--shadow);
}
.auth-card { padding: 28px; }
.section-title { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 27px; }
.section-title h2 { margin: 0; font-size: 26px; letter-spacing: -.4px; }
.section-title p { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.title-icon { width: 39px; height: 39px; flex: none; border-radius: 12px; background: var(--blue-soft); position: relative; }
.shield-icon::before {
  content: ""; position: absolute; inset: 9px 11px 8px; border: 2px solid var(--blue); border-radius: 9px 9px 11px 11px;
  clip-path: polygon(50% 0, 100% 20%, 91% 76%, 50% 100%, 9% 76%, 0 20%);
}
.shield-icon::after { content: ""; position: absolute; width: 4px; height: 7px; border: 2px solid var(--blue); border-top: 0; transform: rotate(45deg); left: 17px; top: 15px; }
.field { display: block; margin: 0 0 18px; }
.field > span:first-child { display: block; font-size: 14px; font-weight: 650; margin: 0 0 8px; }
.input-shell { position: relative; display: flex; align-items: center; }
.input-shell input {
  width: 100%; height: 56px; border-radius: 15px; border: 1px solid #d5dce7; outline: 0;
  padding: 0 48px; background: #fbfcfe; color: var(--ink); font-size: 17px;
  transition: border .18s, box-shadow .18s, background .18s;
}
.input-shell input:focus { border-color: var(--blue); background: white; box-shadow: 0 0 0 4px rgba(36, 108, 243, .10); }
.input-icon { position: absolute; left: 17px; width: 20px; height: 20px; z-index: 1; color: #7b8799; }
.user-icon::before { content: ""; position: absolute; width: 8px; height: 8px; border: 2px solid currentColor; border-radius: 50%; left: 5px; top: 1px; }
.user-icon::after { content: ""; position: absolute; width: 16px; height: 10px; border: 2px solid currentColor; border-radius: 10px 10px 4px 4px; border-bottom: 0; left: 1px; bottom: 0; }
.lock-icon::before { content: ""; position: absolute; width: 14px; height: 12px; border: 2px solid currentColor; border-radius: 4px; left: 2px; top: 7px; }
.lock-icon::after { content: ""; position: absolute; width: 8px; height: 8px; border: 2px solid currentColor; border-bottom: 0; border-radius: 8px 8px 0 0; left: 5px; top: 1px; }
.icon-button { border: 0; background: transparent; }
.password-toggle { position: absolute; right: 10px; width: 38px; height: 38px; color: #7d8797; }
.password-toggle::before { content: ""; position: absolute; left: 8px; top: 12px; width: 19px; height: 12px; border: 2px solid currentColor; border-radius: 50% 10% 50% 10%; transform: rotate(-3deg); }
.password-toggle::after { content: ""; position: absolute; left: 15px; top: 16px; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.password-toggle.visible::before { border-color: var(--blue); }
.password-toggle.visible::after { background: var(--blue); }

.button { min-height: 46px; padding: 0 20px; border-radius: 13px; border: 1px solid transparent; font-weight: 650; }
.button.large { width: 100%; min-height: 54px; font-size: 17px; }
.button + .button.large { margin-top: 12px; }
.button.primary { color: white; background: linear-gradient(135deg, #327cff, #1762ea); box-shadow: 0 8px 20px rgba(36, 108, 243, .22); }
.button.primary:active { transform: translateY(1px); box-shadow: 0 4px 12px rgba(36, 108, 243, .18); }
.button.secondary { color: var(--blue); border-color: #bcd3ff; background: #f8fbff; }
.button.danger-outline { color: var(--danger); border-color: #f1c3c8; background: #fffafa; }
.button:disabled { opacity: .55; cursor: default; }
.auth-footnote { margin: 22px 0 0; text-align: center; color: #8c96a5; font-size: 13px; }

.dashboard-page { max-width: 760px; margin: auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 3px 2px 24px; }
.account-button { width: 46px; height: 46px; flex: none; border-radius: 50%; border: 1px solid #dce3ed; background: rgba(255,255,255,.88); color: var(--ink); box-shadow: 0 3px 10px rgba(31,52,91,.04); position: relative; }
.account-button .user-icon { position: absolute; width: 20px; height: 20px; left: 12px; top: 11px; }
.summary-pill {
  min-height: 55px; display: flex; align-items: center; gap: 12px; padding: 0 18px; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 5px 16px rgba(31,52,91,.04);
}
.headset-icon { width: 20px; height: 18px; border: 2px solid var(--green); border-bottom: 0; border-radius: 12px 12px 0 0; position: relative; }
.headset-icon::before, .headset-icon::after { content: ""; position: absolute; width: 4px; height: 8px; border-radius: 4px; background: var(--green); top: 7px; }
.headset-icon::before { left: -3px; } .headset-icon::after { right: -3px; }
.device-section { margin-top: 34px; }
.heading-row { display: flex; align-items: center; gap: 11px; padding: 0 3px 16px; }
.heading-row h2 { margin: 0; font-size: 23px; }
.heading-row .text-button { margin-left: auto; }
.text-button { border: 0; background: transparent; color: var(--blue); font-weight: 600; padding: 8px; }
.desktop-heading-icon { width: 25px; height: 18px; border: 2px solid currentColor; border-radius: 2px; position: relative; display: inline-block; }
.desktop-heading-icon::before { content: ""; position: absolute; width: 8px; height: 2px; background: currentColor; left: 6px; bottom: -6px; }
.desktop-heading-icon::after { content: ""; position: absolute; width: 16px; height: 2px; background: currentColor; left: 2px; bottom: -8px; }
.device-list { display: grid; gap: 16px; }
.device-card { padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 23px; box-shadow: var(--shadow); }
.device-main { display: flex; align-items: center; gap: 15px; min-width: 0; }
.computer-tile { width: 68px; height: 68px; flex: none; border-radius: 18px; background: linear-gradient(145deg, #eaf3ff, #f6f9ff); display: grid; place-items: center; color: var(--blue); }
.computer-icon { width: 37px; height: 25px; border: 2.5px solid currentColor; border-radius: 3px; position: relative; box-shadow: inset 0 -5px rgba(36,108,243,.07); }
.computer-icon::before { content: ""; position: absolute; width: 10px; height: 7px; border-left: 2px solid currentColor; border-right: 2px solid currentColor; left: 11px; bottom: -9px; }
.computer-icon::after { content: ""; position: absolute; width: 22px; height: 2.5px; border-radius: 2px; background: currentColor; left: 5px; bottom: -11px; }
.device-info { min-width: 0; flex: 1; }
.device-name { margin: 0 0 8px; font-size: 21px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.online-line { display: flex; align-items: center; gap: 7px; color: var(--green); font-size: 15px; }
.online-line.offline { color: #98a2b3; }
.state-dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.device-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.device-actions .wide { grid-column: 1 / -1; }
.device-action {
  min-height: 48px; border: 1px solid #d9e1ed; background: #fff; color: #344054; border-radius: 13px; font-weight: 650;
  display: flex; justify-content: center; align-items: center; gap: 8px;
}
.device-action.primary-action { background: linear-gradient(135deg, #327cff, #1762ea); border-color: transparent; color: white; }
.device-action:active { transform: scale(.985); }
.action-icon { width: 18px; height: 18px; position: relative; }
.power-icon::before { content: ""; position: absolute; width: 13px; height: 13px; border: 2px solid currentColor; border-radius: 50%; left: 1px; top: 3px; clip-path: polygon(0 0, 38% 0, 38% 45%, 62% 45%, 62% 0, 100% 0, 100% 100%, 0 100%); }
.power-icon::after { content: ""; position: absolute; width: 2px; height: 9px; background: currentColor; left: 8px; top: 0; border-radius: 2px; }
.screen-icon { border: 1.8px solid currentColor; border-radius: 2px; }
.screen-icon::after { content: ""; position: absolute; width: 10px; height: 2px; background: currentColor; left: 3px; bottom: -4px; }
.folder-icon::before { content: ""; position: absolute; inset: 4px 1px 1px; border: 1.8px solid currentColor; border-radius: 3px; }
.folder-icon::after { content: ""; position: absolute; width: 8px; height: 4px; border: 1.8px solid currentColor; border-bottom: 0; border-radius: 2px 2px 0 0; left: 2px; top: 1px; }
.empty-state { text-align: center; padding: 55px 28px; color: var(--muted); }
.empty-state > span { color: #98a2b3; transform: scale(1.6); margin-bottom: 22px; }
.empty-state h3 { color: var(--ink); margin: 18px 0 8px; }
.empty-state p { margin: 0; line-height: 1.6; font-size: 14px; }

.utility-page { padding: 0; height: var(--visual-height, 100dvh); overflow: hidden; background: #111827; position: fixed; inset: 0; z-index: 10; }
.utility-header {
  height: calc(62px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 13px 0; display: flex; align-items: center; gap: 10px;
  color: white; background: rgba(17,24,39,.96); border-bottom: 1px solid rgba(255,255,255,.08); position: relative; z-index: 5;
}
.utility-header.light { color: var(--ink); background: rgba(248,250,253,.96); border-color: var(--line); }
.back-button { width: 42px; height: 42px; border: 0; border-radius: 50%; background: transparent; color: currentColor; position: relative; }
.back-button::before { content: ""; position: absolute; width: 11px; height: 11px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); left: 16px; top: 14px; }
.utility-title { min-width: 0; flex: 1; }
.utility-title h1 { margin: 0; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.transport-label { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 11px; color: #aeb8c7; }
.utility-header.light .transport-label { color: var(--muted); }
.transport-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(32,180,90,.12); }
.transport-dot.turn { background: var(--turn); box-shadow: 0 0 0 3px rgba(54,124,247,.12); }
.transport-dot.connecting { background: var(--warning); box-shadow: 0 0 0 3px rgba(245,158,11,.12); animation: pulse 1.2s infinite; }
.transport-dot.failed { background: var(--danger); box-shadow: 0 0 0 3px rgba(220,53,69,.12); animation: none; }
@keyframes pulse { 50% { opacity: .35; } }
.round-menu-button, .round-upload-button { width: 41px; height: 41px; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; color: white; background: rgba(255,255,255,.06); position: relative; }
.round-menu-button::before, .round-menu-button::after, .round-menu-button { background-image: radial-gradient(circle, currentColor 2px, transparent 2.5px); background-size: 7px 7px; background-position: center; background-repeat: repeat-x; }
.round-upload-button { color: var(--blue); border-color: #dbe4f1; background: white; }
.round-upload-button::before { content: ""; position: absolute; width: 14px; height: 12px; border: 1.8px solid currentColor; border-top: 0; left: 12px; top: 16px; border-radius: 0 0 3px 3px; }
.round-upload-button::after { content: "↑"; position: absolute; font-weight: 700; left: 13px; top: 4px; font-size: 20px; }

.screen-viewport { height: calc(100% - 62px - env(safe-area-inset-top)); position: relative; overflow: hidden; touch-action: none; background: #080b11; }
.screen-stage { position: absolute; transform-origin: 0 0; will-change: transform; }
#remoteCanvas { display: block; background: #0d1118; box-shadow: 0 10px 32px rgba(0,0,0,.35); }
.screen-loading { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; color: white; gap: 10px; background: #0b1018; z-index: 2; }
.screen-loading small { color: #8e9aad; }
.spinner { width: 34px; height: 34px; border: 3px solid rgba(255,255,255,.18); border-top-color: var(--blue); border-radius: 50%; animation: spin .85s linear infinite; margin-bottom: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
.remote-cursor { width: 17px; height: 22px; position: absolute; left: 0; top: 0; pointer-events: none; filter: drop-shadow(0 1px 2px rgba(0,0,0,.65)); }
.remote-cursor::before { content: ""; position: absolute; inset: 0; background: white; clip-path: polygon(0 0, 0 90%, 25% 69%, 42% 100%, 55% 94%, 39% 64%, 70% 63%); }
.remote-cursor::after { content: ""; position: absolute; inset: 2px; background: #111; clip-path: polygon(0 0, 0 80%, 24% 60%, 43% 93%, 49% 89%, 32% 56%, 63% 55%); }
.tap-ripple { position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 2px solid rgba(255,255,255,.95); border-radius: 50%; background: rgba(48,123,255,.2); pointer-events: none; z-index: 5; }
.tap-ripple.animate { animation: tap-feedback .38s ease-out forwards; }
@keyframes tap-feedback { from { opacity: 1; transform: scale(.35); } to { opacity: 0; transform: scale(1.45); } }
.screen-tools {
  position: absolute; right: max(12px, env(safe-area-inset-right)); top: calc(78px + env(safe-area-inset-top));
  width: 58px; padding: 8px 5px; display: grid; gap: 3px; background: rgba(20,28,42,.91); border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px; backdrop-filter: blur(18px); box-shadow: 0 12px 30px rgba(0,0,0,.3); z-index: 7;
  transform-origin: top right; transition: opacity .18s, transform .18s;
}
.screen-tools.collapsed { opacity: 0; transform: scale(.72) translate(10px,-12px); pointer-events: none; }
.screen-tools button { border: 0; border-radius: 12px; background: transparent; color: white; min-height: 49px; padding: 6px 2px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.screen-tools button:active { background: rgba(255,255,255,.11); }
.screen-tools em { font-size: 9px; font-style: normal; color: #cad2df; }
.screen-tools span { width: 18px; height: 18px; position: relative; display: block; }
.tool-fit::before { content: ""; position: absolute; inset: 2px; border: 1.5px solid currentColor; border-radius: 2px; }
.tool-display::before { content: ""; position: absolute; inset: 2px 0 4px; border: 1.5px solid currentColor; border-radius: 2px; }
.tool-display::after { content: ""; position: absolute; width: 10px; height: 1.5px; background: currentColor; left: 4px; bottom: 1px; }
.tool-rotate { transition: transform .22s ease; }
.tool-rotate::before { content: ""; position: absolute; width: 13px; height: 13px; border: 1.6px solid currentColor; border-left-color: transparent; border-radius: 50%; left: 2px; top: 2px; }
.tool-rotate::after { content: ""; position: absolute; width: 0; height: 0; border-top: 3px solid transparent; border-bottom: 3px solid transparent; border-right: 5px solid currentColor; left: 0; top: 3px; transform: rotate(-22deg); }
.orientation-spinning .tool-rotate { transform: rotate(180deg); }
.tool-mouse::before { content: ""; position: absolute; width: 12px; height: 16px; border: 1.5px solid currentColor; border-radius: 7px; left: 2px; top: 0; }
.tool-mouse::after { content: ""; position: absolute; width: 1.5px; height: 6px; border-radius: 2px; background: currentColor; left: 8px; top: 1px; }
.tool-unlock::before { content: ""; position: absolute; width: 13px; height: 10px; border: 1.5px solid currentColor; border-radius: 3px; left: 2px; bottom: 1px; }
.tool-unlock::after { content: ""; position: absolute; width: 7px; height: 8px; border: 1.5px solid currentColor; border-bottom: 0; border-radius: 7px 7px 0 0; left: 5px; top: 0; transform: translateX(2px); }
.tool-keyboard::before { content: ""; position: absolute; inset: 3px 0; border: 1.5px solid currentColor; border-radius: 2px; background: repeating-linear-gradient(90deg, transparent 0 3px, currentColor 3px 4px); opacity: .9; }
.tool-close::before, .tool-close::after { content: ""; position: absolute; width: 20px; height: 1.5px; background: currentColor; left: -1px; top: 8px; transform: rotate(45deg); }
.tool-close::after { transform: rotate(-45deg); }

.virtual-mouse {
  position: absolute; left: max(10px, env(safe-area-inset-left)); top: 50%; width: 164px; border: 1px solid rgba(96,165,250,.38);
  border-radius: 20px; background: rgba(15,23,42,.94); color: white; box-shadow: 0 14px 34px rgba(0,0,0,.38);
  backdrop-filter: blur(18px); z-index: 6; overflow: hidden; transform: translateY(-50%); transition: width .18s, border-radius .18s, opacity .18s;
}
.virtual-mouse.collapsed { width: 54px; height: 54px; border-radius: 50%; overflow: hidden; }
.virtual-mouse-handle { width: 100%; height: 46px; padding: 0 12px; border: 0; background: transparent; color: white; display: flex; align-items: center; gap: 8px; text-align: left; }
.virtual-mouse.collapsed .virtual-mouse-handle { width: 54px; height: 54px; padding: 0; justify-content: center; background: linear-gradient(145deg,#347eff,#185be7); }
.virtual-mouse-handle em { flex: 1; white-space: nowrap; font-size: 12px; font-weight: 700; font-style: normal; }
.virtual-mouse-handle i { width: 7px; height: 7px; border-right: 1.5px solid #94a3b8; border-bottom: 1.5px solid #94a3b8; transform: rotate(45deg) translateY(-3px); }
.virtual-mouse.collapsed .virtual-mouse-handle em, .virtual-mouse.collapsed .virtual-mouse-handle i { display: none; }
.mouse-glyph { width: 17px; height: 22px; border: 1.7px solid currentColor; border-radius: 9px; position: relative; flex: none; }
.mouse-glyph::after { content: ""; position: absolute; width: 1.5px; height: 7px; border-radius: 1px; background: currentColor; left: 6px; top: 1px; }
.virtual-mouse-body { padding: 0 10px 11px; }
.virtual-mouse.collapsed .virtual-mouse-body { display: none; }
.virtual-trackpad { height: 108px; border: 1px solid #334155; border-radius: 16px; background: #1e293b; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 18px; touch-action: none; user-select: none; }
.virtual-trackpad.active { border-color: #60a5fa; background: #253756; }
.trackpad-mark { width: 16px; height: 16px; border: 1.5px solid #64748b; border-radius: 50%; position: relative; }
.trackpad-mark::before, .trackpad-mark::after { content: ""; position: absolute; background: #64748b; }
.trackpad-mark::before { width: 42px; height: 1.5px; left: -14px; top: 6px; }
.trackpad-mark::after { width: 1.5px; height: 42px; left: 6px; top: -14px; }
.virtual-trackpad small { color: #94a3b8; font-size: 9px; }
.virtual-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 8px; }
.virtual-buttons button { height: 42px; border: 0; border-radius: 12px; color: white; background: #263449; font-size: 11px; font-weight: 700; }
.virtual-buttons button.active { background: #2563eb; }
.virtual-scroll { height: 38px; margin-top: 7px; border-radius: 12px; background: #1e293b; display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; text-align: center; color: #94a3b8; font-size: 9px; }
.virtual-scroll button { height: 100%; border: 0; background: transparent; color: #dbeafe; font-size: 16px; }

#screenView.simulated-landscape, #screenView.simulated-portrait { right: auto; bottom: auto; transform-origin: 0 0; }
#screenView.simulated-landscape { width: var(--physical-height); height: var(--physical-width); left: var(--physical-width); top: 0; transform: rotate(90deg); }
#screenView.simulated-portrait { width: var(--physical-height); height: var(--physical-width); left: 0; top: var(--physical-height); transform: rotate(-90deg); }
.keyboard-bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 8; display: flex; gap: 7px; padding: 9px max(10px, env(safe-area-inset-right)) calc(9px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  background: rgba(248,250,253,.97); border-top: 1px solid var(--line); backdrop-filter: blur(18px);
}
.keyboard-bar button { border: 1px solid #d6deea; background: white; border-radius: 9px; padding: 0 10px; color: #344054; font-size: 12px; }
.keyboard-bar .send-key { color: white; background: var(--blue); border-color: var(--blue); }
.keyboard-bar input { flex: 1; min-width: 0; height: 42px; border: 1px solid #ccd6e5; border-radius: 11px; padding: 0 12px; outline: 0; font-size: 15px; }

.files-page { background: var(--background); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.folder-title-icon { display: inline-block; width: 19px; height: 15px; margin-right: 8px; vertical-align: -1px; border: 2px solid var(--blue); border-radius: 3px; position: relative; }
.folder-title-icon::before { content: ""; position: absolute; width: 8px; height: 4px; left: -2px; top: -5px; border: 2px solid var(--blue); border-bottom: 0; border-radius: 3px 3px 0 0; }
.breadcrumb-bar { display: flex; align-items: center; gap: 11px; padding: 15px 18px; background: white; border-bottom: 1px solid var(--line); }
.breadcrumb-bar button { width: 39px; height: 39px; flex: none; border: 0; border-radius: 12px; background: var(--blue-soft); color: var(--blue); position: relative; }
.breadcrumb-bar button::before { content: ""; position: absolute; width: 10px; height: 10px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); left: 15px; top: 13px; }
.breadcrumb-bar small { display: block; color: #98a2b3; margin-bottom: 3px; }
.breadcrumb-bar strong { display: block; max-width: calc(100vw - 100px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.file-status { color: var(--muted); font-size: 12px; padding: 12px 20px 5px; }
.file-list { padding: 6px 14px calc(25px + env(safe-area-inset-bottom)); }
.file-row { display: flex; align-items: center; min-height: 68px; background: white; border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; margin-bottom: 9px; box-shadow: 0 3px 12px rgba(31,52,91,.035); }
.file-row-icon { width: 43px; height: 43px; flex: none; display: grid; place-items: center; border-radius: 12px; background: #eef4ff; color: var(--blue); margin-right: 11px; }
.file-row-icon.folder::before { content: ""; width: 23px; height: 17px; border-radius: 3px; background: currentColor; clip-path: polygon(0 12%, 39% 12%, 47% 0, 100% 0, 100% 100%, 0 100%); }
.file-row-icon.file::before { content: ""; width: 18px; height: 23px; border: 2px solid currentColor; border-radius: 2px; background: white; clip-path: polygon(0 0, 65% 0, 100% 30%, 100% 100%, 0 100%); }
.file-row-icon.drive::before { content: ""; width: 24px; height: 17px; border: 2px solid currentColor; border-radius: 4px; box-shadow: inset 0 -5px rgba(36,108,243,.12); }
.file-row-info { flex: 1; min-width: 0; }
.file-row-name { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-row-meta { color: #98a2b3; font-size: 11px; margin-top: 4px; }
.file-row-action { width: 38px; height: 38px; border: 0; background: transparent; color: #98a2b3; position: relative; flex: none; }
.file-row-action.open::before { content: ""; position: absolute; width: 8px; height: 8px; border-right: 2px solid currentColor; border-top: 2px solid currentColor; transform: rotate(45deg); left: 12px; top: 13px; }
.file-row-action.download::before { content: "↓"; font-size: 24px; color: var(--blue); position: absolute; left: 9px; top: 3px; }
.folder-empty-icon { display: inline-block; width: 33px; height: 25px; border: 3px solid #98a2b3; border-radius: 4px; }

dialog { border: 0; padding: 0; color: var(--ink); }
dialog::backdrop { background: rgba(15,23,42,.46); backdrop-filter: blur(2px); }
.sheet-dialog { width: min(100% - 24px, 460px); margin: auto auto max(12px, env(safe-area-inset-bottom)); border-radius: 24px; padding: 13px 22px 22px; box-shadow: 0 26px 80px rgba(0,0,0,.22); }
.sheet-handle { width: 42px; height: 4px; border-radius: 4px; background: #d5dbe5; margin: 0 auto 20px; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; }
.dialog-heading small { color: var(--muted); }
.dialog-heading h2 { margin: 5px 0 0; }
.dialog-close { width: 38px; height: 38px; border: 0; border-radius: 50%; background: #f1f4f8; position: relative; }
.dialog-close::before, .dialog-close::after { content: ""; position: absolute; width: 15px; height: 1.5px; background: #667085; left: 11px; top: 18px; transform: rotate(45deg); }
.dialog-close::after { transform: rotate(-45deg); }
.account-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 20px 0 13px; }
.account-meta > div { padding: 14px; background: #f7f9fc; border: 1px solid var(--line); border-radius: 14px; }
.account-meta span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 6px; }
.account-meta strong { font-size: 14px; }
.dialog-tip { color: var(--muted); background: var(--blue-soft); border-radius: 13px; padding: 12px 13px; font-size: 12px; line-height: 1.55; margin: 0 0 18px; }
.confirm-dialog { width: min(100% - 40px, 360px); border-radius: 23px; padding: 25px; text-align: center; box-shadow: 0 25px 75px rgba(0,0,0,.22); }
.confirm-icon { width: 48px; height: 48px; display: block; margin: 0 auto 15px; border-radius: 15px; background: var(--blue-soft); color: var(--blue); position: relative; }
.confirm-icon::before { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid currentColor; border-radius: 50%; left: 13px; top: 13px; }
.confirm-icon::after { content: ""; position: absolute; width: 2px; height: 9px; background: currentColor; left: 23px; top: 10px; }
.confirm-dialog h2 { margin: 0 0 8px; font-size: 20px; }
.confirm-dialog p { margin: 0; color: var(--muted); line-height: 1.55; font-size: 14px; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.toast {
  position: fixed; z-index: 100; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 25px);
  width: max-content; max-width: calc(100% - 36px); border-radius: 13px; padding: 12px 16px; color: white; background: rgba(17,24,39,.93);
  box-shadow: 0 12px 30px rgba(0,0,0,.22); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; font-size: 13px; text-align: center;
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 620px) {
  .device-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-page { padding-left: 0; padding-right: 0; }
}

@media (max-width: 370px) {
  .page { padding-left: 16px; padding-right: 16px; }
  .auth-card { padding: 22px; }
  .brand.compact p { display: none; }
  .device-card { padding: 16px; }
  .computer-tile { width: 60px; height: 60px; }
}

@media (orientation: landscape) and (max-height: 560px) {
  .utility-header { height: calc(52px + env(safe-area-inset-top)); }
  .screen-viewport { height: calc(var(--visual-height, 100dvh) - 52px - env(safe-area-inset-top)); }
  .screen-tools { top: calc(60px + env(safe-area-inset-top)); }
}
