:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #f5f5f7;
  --sidebar: rgba(250, 250, 252, .94);
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #6e6e73;
  --separator: rgba(0, 0, 0, .08);
  --input: rgba(0, 0, 0, .035);
  --chip: rgba(0, 0, 0, .055);
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --blue-soft: rgba(0, 113, 227, .1);
  --green: #248a3d;
  --green-soft: rgba(52, 199, 89, .13);
  --red: #d70015;
  --red-soft: rgba(255, 59, 48, .12);
  --orange: #b45309;
  --focus: rgba(0, 113, 227, .18);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .04), 0 1px 3px rgba(0, 0, 0, .05);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, .07), 0 1px 2px rgba(0, 0, 0, .04);
  --topbar: rgba(245, 245, 247, .78);
  --radius: 18px;
  --radius-sm: 12px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --surface: #1c1c1e;
  --surface-2: #2c2c2e;
  --sidebar: rgba(22, 22, 24, .94);
  --text: #f5f5f7;
  --text-2: #a1a1a6;
  --text-3: #a1a1a6;
  --separator: rgba(255, 255, 255, .1);
  --input: rgba(255, 255, 255, .065);
  --chip: rgba(255, 255, 255, .085);
  --blue: #0a84ff;
  --blue-hover: #409cff;
  --blue-soft: rgba(10, 132, 255, .18);
  --green: #30d158;
  --green-soft: rgba(48, 209, 88, .16);
  --red: #ff453a;
  --red-soft: rgba(255, 69, 58, .16);
  --orange: #ffb340;
  --focus: rgba(10, 132, 255, .24);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-md: 0 10px 34px rgba(0, 0, 0, .42);
  --topbar: rgba(28, 28, 30, .78);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: radial-gradient(900px 420px at 0 0, var(--blue-soft), transparent 55%), var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--blue-soft); color: var(--text); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; box-shadow: 0 0 0 4px var(--focus); }

.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.admin-brand-icon { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px; box-shadow: 0 2px 8px rgba(94,92,230,.24); }

.field { display: grid; gap: 7px; margin-top: 16px; color: var(--text-2); font-size: 13px; font-weight: 600; }

input { width: 100%; height: 42px; border: 1px solid transparent; border-radius: 10px; padding: 0 12px; outline: none; background: var(--input); color: var(--text); transition: border-color .16s, background-color .16s, box-shadow .16s; }
input::placeholder { color: var(--text-3); }
input:hover { background: var(--chip); }
input:focus { border-color: rgba(0,113,227,.55); background: var(--surface); box-shadow: 0 0 0 4px var(--focus); }

.btn { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 999px; padding: 0 16px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: transform .15s, background-color .15s, color .15s, opacity .15s; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--blue-hover); }
.btn-secondary { background: var(--chip); color: var(--text); }
.btn-secondary:hover:not(:disabled) { background: var(--separator); }
.btn-ghost { background: transparent; color: var(--blue); }
.btn-ghost:hover:not(:disabled) { background: var(--blue-soft); }
.btn-block { width: 100%; min-height: 44px; margin-top: 22px; }
.icon-button { width: 36px; height: 36px; display: inline-grid; flex: 0 0 36px; place-items: center; border: 0; border-radius: 50%; padding: 0; background: var(--chip); color: var(--text-2); transition: background-color .15s, color .15s, transform .15s; }
.icon-button:hover { background: var(--blue-soft); color: var(--blue); }
.icon-button:active { transform: scale(.95); }

.public-view { position: relative; min-height: 100vh; overflow: clip; isolation: isolate; background: radial-gradient(720px 520px at 8% 18%, color-mix(in srgb, var(--blue) 7%, transparent), transparent 72%), radial-gradient(680px 480px at 92% 66%, rgba(94, 92, 230, .055), transparent 74%), var(--bg); }
.public-view > main, .public-view > footer { position: relative; z-index: 1; }
.particle-field { position: fixed; inset: 64px 0 0; z-index: 0; width: 100%; height: calc(100vh - 64px); pointer-events: none; }
.landing-container { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.landing-header { position: sticky; top: 0; z-index: 60; height: 64px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(22px) saturate(170%); -webkit-backdrop-filter: blur(22px) saturate(170%); box-shadow: inset 0 -1px var(--separator); }
.landing-nav { height: 100%; display: flex; align-items: center; gap: 28px; }
.landing-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-size: 15px; font-weight: 700; letter-spacing: -.015em; text-decoration: none; white-space: nowrap; }
.landing-brand img { width: 32px; height: 32px; border-radius: 9px; }
.landing-links { display: flex; align-items: center; gap: 26px; margin-right: auto; }
.landing-links a { color: var(--text-2); font-size: 13px; font-weight: 550; text-decoration: none; transition: color .15s; }
.landing-links a:hover { color: var(--text); }
.landing-actions { display: flex; align-items: center; gap: 8px; }
.landing-actions .btn { min-height: 36px; }
.landing-download-button { display: none; }

.landing-hero { min-height: min(760px, calc(100vh - 64px)); display: grid; grid-template-columns: minmax(0, .92fr) minmax(440px, 1.08fr); align-items: center; gap: clamp(44px, 7vw, 96px); padding-block: clamp(76px, 10vw, 122px); }
.hero-copy { position: relative; z-index: 2; animation: enter .52s cubic-bezier(.22,1,.36,1) both; }
.hero-kicker { display: inline-flex; align-items: center; min-height: 28px; border-radius: 999px; padding: 0 11px; background: var(--blue-soft); color: var(--blue); font-size: 12px; font-weight: 700; letter-spacing: .035em; }
.hero-copy h1 { max-width: 700px; margin: 22px 0 20px; font-size: clamp(3rem, 5.4vw, 4.75rem); line-height: .99; letter-spacing: -.04em; }
.hero-copy > p { max-width: 510px; margin: 0; color: var(--text-2); font-size: clamp(16px, 1.7vw, 19px); line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 32px; }
.hero-actions .btn { min-height: 46px; padding-inline: 21px; }
.hero-primary .icon { width: 17px; height: 17px; }
.hero-support { display: block; margin-top: 14px; color: var(--text-3); font-size: 12px; }
.hero-product { position: relative; animation: enter .58s .08s cubic-bezier(.22,1,.36,1) both; }
.hero-product::before { content: ""; position: absolute; z-index: -1; inset: 9% 2% -5%; border-radius: 50%; background: radial-gradient(circle, rgba(94,92,230,.24), rgba(191,90,242,.08) 46%, transparent 70%); filter: blur(24px); }
.preview-window { overflow: hidden; border: 1px solid var(--separator); border-radius: 22px; background: var(--surface); box-shadow: 0 32px 80px rgba(31,35,48,.16), 0 4px 18px rgba(31,35,48,.08); transform: perspective(1200px) rotateY(-4deg) rotateX(1.5deg); transform-origin: center; }
html[data-theme="dark"] .preview-window { box-shadow: 0 32px 90px rgba(0,0,0,.58), 0 4px 20px rgba(0,0,0,.36); }
.preview-titlebar { height: 48px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 16px; border-bottom: 1px solid var(--separator); background: var(--surface-2); color: var(--text-2); font-size: 11px; }
.preview-titlebar strong { color: var(--text); font-size: 12px; }
.preview-dots { display: flex; gap: 6px; }
.preview-dots i { width: 9px; height: 9px; border-radius: 50%; background: #ff5f57; }
.preview-dots i:nth-child(2) { background: #febc2e; }
.preview-dots i:nth-child(3) { background: #28c840; }
.preview-user { justify-self: end; }
.preview-body { min-height: 354px; padding: 26px; background: var(--surface); }
.preview-brand { display: flex; align-items: center; gap: 11px; }
.preview-brand img { width: 40px; height: 40px; border-radius: 11px; }
.preview-brand div { display: grid; }
.preview-brand strong { font-size: 14px; }
.preview-brand span { color: var(--text-3); font-size: 11px; }
.preview-create { display: grid; grid-template-columns: 1.05fr 1fr auto; align-items: center; gap: 8px; margin-top: 26px; }
.preview-create span, .preview-port { height: 36px; display: flex; align-items: center; overflow: hidden; border: 1px solid var(--separator); border-radius: 9px; padding: 0 10px; background: var(--input); color: var(--text-3); font-size: 10px; white-space: nowrap; }
.preview-create b { height: 36px; display: inline-flex; align-items: center; border-radius: 999px; padding: 0 14px; background: var(--blue); color: #fff; font-size: 11px; }
.preview-divider { height: 1px; margin: 22px 0; background: var(--separator); }
.preview-tunnel { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 18px; border: 1px solid var(--separator); border-radius: 14px; padding: 16px; box-shadow: var(--shadow-sm); }
.preview-tunnel > div { min-width: 0; display: grid; gap: 4px; }
.preview-tunnel strong, .preview-tunnel span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-tunnel strong { font-size: 12px; }
.preview-tunnel > div span { color: var(--text-3); font-size: 9px; }
.preview-tunnel em { border-radius: 999px; padding: 3px 8px; background: var(--chip); color: var(--text-2); font-size: 9px; font-style: normal; }
.preview-port { width: 156px; margin-top: 10px; grid-column: 1; }
.preview-tunnel button { width: 30px; height: 30px; display: grid; place-items: center; grid-column: 2; grid-row: 2; border: 0; border-radius: 50%; background: var(--blue); color: #fff; pointer-events: none; }
.preview-tunnel button .icon { width: 14px; height: 14px; }

.feature-section { padding-block: clamp(78px, 9vw, 120px); border-top: 1px solid var(--separator); }
.section-heading { max-width: 660px; }
.section-heading h2, .download-intro h2 { margin: 0; font-size: clamp(2rem, 3.2vw, 3.25rem); line-height: 1.12; letter-spacing: -.035em; }
.section-heading p, .download-intro p { margin: 16px 0 0; color: var(--text-2); font-size: 16px; line-height: 1.7; }
.feature-rail { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 56px; border-block: 1px solid var(--separator); }
.feature-rail article { min-width: 0; display: flex; gap: 16px; padding: 28px clamp(18px, 3vw, 34px); }
.feature-rail article + article { border-left: 1px solid var(--separator); }
.feature-rail article:first-child { padding-left: 0; }
.feature-rail article:last-child { padding-right: 0; }
.feature-rail .icon { width: 22px; height: 22px; flex: 0 0 22px; margin-top: 2px; color: var(--blue); }
.feature-rail h3 { margin: 0; font-size: 15px; }
.feature-rail p { margin: 7px 0 0; color: var(--text-2); font-size: 13px; line-height: 1.65; }

.download-section { display: grid; grid-template-columns: minmax(280px, .72fr) minmax(500px, 1.28fr); gap: clamp(60px, 10vw, 140px); padding-block: clamp(78px, 10vw, 132px); border-top: 1px solid var(--separator); }
.download-intro > span { display: block; margin-bottom: 12px; color: var(--blue); font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.download-intro > a { display: inline-block; margin-top: 22px; color: var(--blue); font-size: 13px; text-decoration: none; }
.download-intro > a:hover { text-decoration: underline; text-underline-offset: 3px; }
.download-list { border-top: 1px solid var(--separator); }
.download-row { min-height: 104px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; border-bottom: 1px solid var(--separator); }
.platform-mark { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-sm); color: var(--blue); font-size: 15px; font-weight: 750; }
.download-row h3 { margin: 0; font-size: 15px; }
.download-row p { margin: 3px 0 0; color: var(--text-2); font-size: 12px; }
.client-version { margin-inline-start: 5px; color: var(--text); font-variant-numeric: tabular-nums; font-weight: 650; white-space: nowrap; }
.download-row .btn { min-width: 112px; min-height: 44px; }
.landing-footer { border-top: 1px solid var(--separator); }
.landing-footer > div { min-height: 82px; display: flex; align-items: center; justify-content: space-between; color: var(--text-3); font-size: 12px; }
.landing-footer button { border: 0; padding: 8px 0; background: transparent; color: var(--text-2); font: inherit; }
.landing-footer button:hover { color: var(--text); }

.login-dialog { position: fixed; width: min(400px, calc(100% - 32px)); max-height: calc(100dvh - 32px); margin: auto; overflow-y: auto; border: 1px solid var(--separator); border-radius: 22px; padding: 36px; background: var(--surface); color: var(--text); box-shadow: 0 30px 90px rgba(0,0,0,.25); text-align: center; }
.login-dialog[open] { animation: dialog-enter .24s cubic-bezier(.22,1,.36,1) both; }
.login-dialog::backdrop { background: rgba(0,0,0,.42); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.dialog-close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 50%; padding: 0; background: var(--chip); color: var(--text-2); }
.dialog-close:hover { background: var(--separator); color: var(--text); }
.dialog-close .icon { width: 15px; height: 15px; }
.dialog-brand-icon { width: 58px; height: 58px; border-radius: 16px; }
.login-dialog h2 { margin: 16px 0 4px; font-size: 25px; letter-spacing: -.03em; }
.login-dialog > p { margin: 0 0 24px; color: var(--text-2); }
.login-dialog form { text-align: left; }
.login-dialog .form-message { margin-bottom: -8px; text-align: center; }

@keyframes dialog-enter { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

.topbar { position: sticky; top: 0; z-index: 50; min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 24px; background: var(--topbar); backdrop-filter: blur(22px) saturate(180%); -webkit-backdrop-filter: blur(22px) saturate(180%); box-shadow: inset 0 -1px var(--separator); }
.brand { min-width: 0; display: inline-flex; align-items: center; gap: 10px; border: 0; padding: 0; background: transparent; color: var(--text); font: inherit; font-size: 15px; font-weight: 650; letter-spacing: -.015em; text-align: left; cursor: pointer; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.avatar-chip { max-width: 180px; min-height: 36px; display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 4px 12px 4px 4px; background: var(--chip); color: var(--text-2); font-size: 13px; }
.avatar-chip > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar-dot { width: 28px; height: 28px; display: grid; flex: 0 0 28px; place-items: center; border-radius: 50%; background: linear-gradient(145deg, #bf5af2, #5e5ce6); color: #fff; font-size: 11px; font-weight: 700; }
.theme-toggle .sun { display: none; }
html[data-theme="dark"] .theme-toggle .moon { display: none; }
html[data-theme="dark"] .theme-toggle .sun { display: block; }

.app-layout { min-height: calc(100vh - 56px); display: grid; grid-template-columns: 220px minmax(0, 1fr); }
.sidebar { position: sticky; top: 56px; height: calc(100vh - 56px); display: flex; flex-direction: column; padding: 22px 14px 16px; background: var(--sidebar); box-shadow: inset -1px 0 var(--separator); }
.sidebar-nav { display: grid; gap: 5px; }
.nav-link { width: 100%; min-height: 40px; display: flex; align-items: center; gap: 11px; border: 0; border-radius: 10px; padding: 0 12px; background: transparent; color: var(--text-2); font: inherit; font-weight: 550; text-align: left; cursor: pointer; transition: background-color .15s, color .15s; }
.nav-link .icon { width: 17px; height: 17px; }
.nav-link:hover { background: var(--chip); color: var(--text); }
.nav-link.active { background: var(--blue-soft); color: var(--blue); font-weight: 650; }
.sidebar-note { display: flex; align-items: center; gap: 7px; margin-top: auto; padding: 10px 12px; color: var(--text-3); font-size: 11px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }

.main-shell { min-width: 0; padding: 34px clamp(20px, 3vw, 42px) 58px; }
.content-wrap { width: min(1240px, 100%); margin: 0 auto; }
.view-section { min-width: 0; }
.view-section > .panel { margin-bottom: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.page-head h1 { margin: 0; font-size: 28px; line-height: 1.2; letter-spacing: -.035em; }
.page-head p { margin: 6px 0 0; color: var(--text-2); }
.page-badge, .count-chip { min-height: 28px; display: inline-flex; align-items: center; border-radius: 999px; padding: 0 11px; background: var(--chip); color: var(--text-2); font-size: 12px; white-space: nowrap; }

.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.stat-card { position: relative; min-width: 0; display: grid; gap: 6px; padding: 20px; overflow: hidden; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); animation: enter .42s cubic-bezier(.22,1,.36,1) both; }
.stat-card:nth-child(2) { animation-delay: .04s; }
.stat-card:nth-child(3) { animation-delay: .08s; }
.stat-label, .stat-foot { overflow: hidden; color: var(--text-2); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.stat-foot { color: var(--text-3); }
.stat-card strong { overflow: hidden; font-size: 28px; line-height: 1.15; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
.stat-card strong.domain { color: var(--blue); font-size: 18px; letter-spacing: -.02em; }

.panel { min-width: 0; margin-bottom: 18px; overflow: hidden; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); scroll-margin-top: 74px; }
.panel-head { min-height: 76px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 19px 20px 14px; }
.panel-head h2 { margin: 0; font-size: 16px; line-height: 1.4; letter-spacing: -.015em; }
.panel-head p { margin: 4px 0 0; color: var(--text-2); font-size: 13px; }
.panel-head-actions { align-items: center; }
.panel-icon { width: 34px; height: 34px; display: grid; flex: 0 0 34px; place-items: center; border-radius: 50%; background: var(--blue-soft); color: var(--blue); }
.panel-icon .icon { width: 17px; height: 17px; }
.panel-body { padding: 0 20px 20px; }
.download-links { display: flex; flex-wrap: wrap; gap: 8px; }
.security-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.user-create input { width: 150px; height: 38px; }
.user-table { min-width: 760px; }
.quota-editor { display: inline-flex; align-items: center; gap: 6px; }
.quota-used, .quota-unlimited { color: var(--text-2); font-size: 12px; white-space: nowrap; }
.quota-input { width: 58px; height: 32px; border-radius: 8px; padding-inline: 8px; text-align: center; appearance: textfield; -moz-appearance: textfield; }
.quota-input::-webkit-inner-spin-button, .quota-input::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
.quota-save { min-height: 32px; border: 0; border-radius: 999px; padding-inline: 11px; background: var(--blue-soft); color: var(--blue); font-size: 11px; font-weight: 650; }
.quota-save:hover:not(:disabled) { background: var(--blue); color: #fff; }
.quota-save:disabled { opacity: .45; cursor: not-allowed; }

.table-scroll { overflow-x: auto; border-top: 1px solid var(--separator); }
.table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 13px; }
.table th { padding: 11px 20px; background: var(--surface-2); color: var(--text-2); font-size: 12px; font-weight: 600; text-align: left; white-space: nowrap; }
.table td { padding: 14px 20px; border-top: 1px solid var(--separator); vertical-align: middle; }
.table tbody tr:first-child td { border-top: 0; }
.table tbody tr:hover td { background: var(--blue-soft); }
.table a { color: var(--blue); text-decoration: none; }
.table a:hover { text-decoration: underline; text-underline-offset: 3px; }
.tag { min-height: 24px; display: inline-flex; align-items: center; border-radius: 999px; padding: 0 9px; background: var(--chip); color: var(--text-2); font-size: 11px; font-weight: 650; }
.tag.green { background: var(--green-soft); color: var(--green); }
.del { width: 30px; height: 30px; display: inline-grid; place-items: center; border: 0; border-radius: 50%; padding: 0; background: transparent; color: var(--red); }
.del:hover { background: var(--red-soft); }
.del .icon { width: 15px; height: 15px; }
code.url { display: inline-block; max-width: 240px; overflow: hidden; border-radius: 7px; padding: 3px 8px; background: var(--blue-soft); color: var(--blue); font: 12px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; text-overflow: ellipsis; vertical-align: middle; white-space: nowrap; }
.muted { color: var(--text-3); font-size: 13px; }
.form-message { min-height: 20px; margin-top: 10px; color: var(--text-2); font-size: 13px; }
.form-message.ok { color: var(--green); }
.form-message.err, .err { color: var(--red); }

.toast { position: fixed; z-index: 80; left: 50%; bottom: 24px; max-width: calc(100vw - 32px); border-radius: 999px; padding: 10px 16px; background: rgba(29,29,31,.94); color: #fff; box-shadow: var(--shadow-md); opacity: 0; pointer-events: none; transform: translate(-50%, 10px); transition: opacity .18s, transform .18s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes enter { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }

@media (max-width: 960px) {
  .landing-hero { grid-template-columns: minmax(0, .88fr) minmax(380px, 1.12fr); gap: 36px; }
  .preview-body { min-height: 330px; padding: 22px; }
  .download-section { gap: 54px; }
  .app-layout { display: block; }
  .sidebar { position: sticky; top: 56px; z-index: 40; height: auto; padding: 8px 14px; overflow-x: auto; box-shadow: inset 0 -1px var(--separator); }
  .sidebar-nav { display: flex; gap: 6px; width: max-content; }
  .nav-link { width: auto; min-height: 36px; padding: 0 12px; white-space: nowrap; }
  .sidebar-note { display: none; }
  .main-shell { padding-top: 28px; }
}

@media (max-width: 760px) {
  .landing-container { width: min(100% - 36px, 620px); }
  .landing-header { height: 60px; }
  .landing-nav { gap: 12px; }
  .landing-links { display: none; }
  .landing-actions { margin-left: auto; }
  .landing-admin-button { display: none; }
  .landing-download-button { display: inline-flex; }
  .landing-hero { min-height: 0; grid-template-columns: 1fr; gap: 58px; padding-block: 70px 86px; text-align: center; }
  .hero-copy h1 { margin-inline: auto; font-size: clamp(2.8rem, 12vw, 4.5rem); }
  .hero-copy > p { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .hero-product { width: min(540px, 100%); margin-inline: auto; }
  .preview-window { transform: none; }
  .feature-section { padding-block: 74px; }
  .section-heading { text-align: center; }
  .feature-rail { grid-template-columns: 1fr; margin-top: 38px; }
  .feature-rail article { padding: 24px 2px; }
  .feature-rail article + article { border-top: 1px solid var(--separator); border-left: 0; }
  .feature-rail article:first-child, .feature-rail article:last-child { padding-inline: 2px; }
  .download-section { grid-template-columns: 1fr; gap: 38px; padding-block: 74px 84px; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { padding: 17px 18px; }
  .security-form { grid-template-columns: 1fr; }
  .panel-head-actions { align-items: stretch; flex-direction: column; }
  .user-create { width: 100%; }
  .user-create input { flex: 1 1 145px; width: auto; }
}

@media (max-width: 520px) {
  .landing-container { width: calc(100% - 28px); }
  .landing-brand span { display: none; }
  .landing-actions .btn { min-height: 36px; padding-inline: 13px; font-size: 12px; }
  .landing-hero { gap: 44px; padding-block: 54px 68px; }
  .hero-kicker { font-size: 11px; }
  .hero-copy h1 { margin-block: 18px 16px; font-size: clamp(2.5rem, 13vw, 3.65rem); line-height: 1.02; }
  .hero-copy > p { font-size: 15px; line-height: 1.7; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .preview-titlebar { height: 42px; padding-inline: 12px; }
  .preview-body { min-height: 278px; padding: 16px; }
  .preview-brand img { width: 34px; height: 34px; }
  .preview-create { grid-template-columns: 1fr auto; margin-top: 20px; }
  .preview-create span:nth-child(2) { display: none; }
  .preview-divider { margin-block: 16px; }
  .preview-tunnel { gap: 8px; padding: 13px; }
  .preview-port { width: min(150px, 100%); }
  .section-heading h2, .download-intro h2 { font-size: 2.15rem; }
  .download-row { min-height: 94px; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding-block: 12px; }
  .download-row .btn { width: 100%; grid-column: 1 / -1; }
  .login-dialog { padding: 32px 22px 26px; }
  .topbar { padding-inline: 14px; }
  .brand > span:last-child { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .avatar-chip { max-width: 105px; padding-right: 8px; }
  .main-shell { padding: 24px 14px 42px; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .page-badge { display: none; }
  .page-head h1 { font-size: 24px; }
  .user-create { display: grid; grid-template-columns: 1fr; }
  .user-create input, .user-create .btn { width: 100%; }
  .download-links .btn { flex: 1 1 120px; }
}

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

@media (prefers-reduced-transparency: reduce) {
  .topbar, .landing-header { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .login-dialog::backdrop { backdrop-filter: none; -webkit-backdrop-filter: none; }
}
