@charset "UTF-8";

:root {
  color-scheme: light;
  --bg: #eef3f9;
  --bg-glow: #e2ecfc;
  --surface: #ffffff;
  --surface-soft: #f7faff;
  --surface-hover: #f2f6fd;
  --surface-glass: rgba(255, 255, 255, .82);
  --topbar-glass: rgba(238, 243, 249, .84);
  --ink: #14233b;
  --ink-strong: #0d1a2e;
  --muted: #52647e;
  --faint: #7789a4;
  --line: #dfe7f2;
  --line-soft: #ecf1f8;
  --line-strong: #cbd7e8;
  --glass-border: rgba(255, 255, 255, .88);
  --blue: #2158d6;
  --blue-dark: #1746b5;
  --blue-soft: #eaf1ff;
  --blue-ring: rgba(33, 88, 214, .18);
  --red: #b53a46;
  --red-soft: #fdedef;
  --red-border: #efc7ce;
  --green: #14755d;
  --green-soft: #e8f7f1;
  --amber: #8d6319;
  --amber-soft: #fff6e3;
  --amber-border: #eedcb4;
  --radius: 18px;
  --shadow: 0 12px 36px rgba(20, 42, 75, .05), 0 2px 6px rgba(20, 42, 75, .025);
  --shadow-float: 0 24px 80px rgba(15, 32, 58, .16), 0 4px 16px rgba(15, 32, 58, .06);
  --font: "Segoe UI Variable Text", "Segoe UI", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1520;
  --bg-glow: #17243a;
  --surface: #161f2e;
  --surface-soft: #1b2638;
  --surface-hover: #1f2c40;
  --surface-glass: rgba(22, 31, 46, .84);
  --topbar-glass: rgba(15, 21, 32, .84);
  --ink: #eaf0fa;
  --ink-strong: #f6f9ff;
  --muted: #93a5bf;
  --faint: #6f829e;
  --line: rgba(196, 214, 240, .11);
  --line-soft: rgba(196, 214, 240, .07);
  --line-strong: rgba(196, 214, 240, .19);
  --glass-border: rgba(218, 232, 252, .12);
  --blue: #65a2ff;
  --blue-dark: #4b8ef5;
  --blue-soft: rgba(101, 162, 255, .14);
  --blue-ring: rgba(101, 162, 255, .24);
  --red: #ff8e9b;
  --red-soft: rgba(235, 87, 105, .15);
  --red-border: rgba(255, 132, 148, .28);
  --green: #50d9a3;
  --green-soft: rgba(54, 198, 142, .14);
  --amber: #f3c46b;
  --amber-soft: rgba(240, 180, 65, .14);
  --amber-border: rgba(243, 196, 107, .28);
  --shadow: 0 14px 40px rgba(3, 7, 14, .34), inset 0 1px 0 rgba(255, 255, 255, .04);
  --shadow-float: 0 28px 90px rgba(2, 5, 11, .62), inset 0 1px 0 rgba(255, 255, 255, .07);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  background: radial-gradient(ellipse at 76% -8%, var(--bg-glow) 0, transparent 48%), var(--bg);
  min-height: 100vh;
  transition: background-color .22s var(--ease), color .18s var(--ease);
}

button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; color: inherit; border: 0; }
button:disabled { cursor: wait; opacity: .52; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-ring); }

h1, h2, h3, p { margin: 0; }
h1 { font-size: 29px; line-height: 1.28; letter-spacing: -.6px; font-weight: 650; color: var(--ink-strong); }
h2 { font-size: 18px; font-weight: 650; letter-spacing: -.2px; color: var(--ink-strong); }
h3 { font-size: 16px; font-weight: 650; color: var(--ink-strong); }

svg.icon { width: 19px; height: 19px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
button svg.icon { width: 18px; height: 18px; }

.skip-link { position: fixed; top: -100px; left: 20px; padding: 10px 14px; background: var(--surface); color: var(--ink); border-radius: 10px; box-shadow: var(--shadow); z-index: 100; }
.skip-link:focus { top: 12px; }

.boot { display: grid; min-height: 100vh; place-items: center; }
.loader { width: 26px; height: 26px; border: 3px solid var(--line); border-top-color: var(--blue); border-radius: 100%; animation: spin .72s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Sidebar Navigation */
.sidebar {
  position: fixed;
  left: 18px;
  top: 18px;
  bottom: 18px;
  width: 222px;
  display: flex;
  flex-direction: column;
  padding: 22px 13px 14px;
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  background: var(--surface-glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 13px 22px;
  color: var(--ink-strong);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.9px;
}
.brand img { width: 30px; height: 30px; filter: drop-shadow(0 3px 6px rgba(33, 88, 214, .2)); }
.brand a { color: inherit; }
.brand a:hover { text-decoration: none; }

.navigation { overflow: auto; scrollbar-width: thin; flex: 1; }
.nav-group + .nav-group { border-top: 1px solid var(--line); padding-top: 13px; margin-top: 13px; }
.nav-label { font-size: 14px; font-weight: 550; color: var(--muted); padding: 0 14px 8px; }

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border-radius: 11px;
  padding: 10px 14px;
  color: var(--muted);
  background: transparent;
  text-align: left;
  margin: 2px 0;
  font-size: 15px;
  transition: background-color .16s var(--ease), color .16s var(--ease);
}
.nav-item:hover { background: var(--surface-hover); color: var(--ink-strong); }
.nav-item.active { background: var(--blue-soft); color: var(--blue); font-weight: 650; }
.nav-item.active:before { content: ""; width: 3px; height: 16px; position: absolute; left: 2px; border-radius: 4px; background: var(--blue); }

.profile {
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 15px 6px 0;
  margin-top: 12px;
  min-width: 0;
}
.avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 650;
  border: 1px solid var(--line);
  border-radius: 12px;
  flex-shrink: 0;
}
.profile-copy { flex: 1; overflow: hidden; }
.profile-copy strong { display: block; font-size: 14px; color: var(--ink-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy span { font-size: 14px; color: var(--muted); }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  width: 36px;
  height: 36px;
  color: var(--muted);
  flex-shrink: 0;
  transition: background-color .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.icon-btn:hover { background: var(--surface-hover); border-color: var(--line); color: var(--ink-strong); }
.theme-btn { background: var(--surface-soft); border-color: var(--line); }

/* Workspace & Topbar */
.workspace { margin-left: 240px; padding: 0 38px 42px; max-width: 1920px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  height: 80px;
  border-bottom: 1px solid var(--line);
  background: var(--topbar-glass);
  backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
}
.breadcrumb { display: flex; align-items: center; gap: 11px; font-size: 14px; }
.breadcrumb b { font-weight: 600; color: var(--ink-strong); }
.topbar-right { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.role-chip {
  border: 1px solid var(--line-strong);
  background: var(--surface-soft);
  padding: 5px 12px;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 550;
}
.menu-toggle { display: none; }

.page { padding-top: 28px; animation: appear .2s var(--ease); }
@keyframes appear { from { opacity: .55; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.heading-copy p { font-size: 15px; color: var(--muted); margin-top: 6px; }
.actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.dialog-footer-actions { margin-top: 22px; justify-content: flex-end; }
.market-actions { margin-top: 16px; }

/* Buttons */
.btn {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  border-radius: 10px;
  padding: 9px 16px;
  min-height: 40px;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 550;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease), transform .15s var(--ease);
}
.btn:hover { background: var(--surface-hover); border-color: var(--blue); text-decoration: none; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn.primary {
  background: linear-gradient(180deg, var(--blue), var(--blue-dark));
  color: #ffffff;
  border-color: var(--blue-dark);
  box-shadow: 0 4px 12px var(--blue-ring), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn.primary:hover { filter: brightness(1.05); border-color: var(--blue-dark); }
:root[data-theme="dark"] .btn.primary { color: #091324; font-weight: 650; }
.btn.danger { color: var(--red); border-color: var(--red-border); background: var(--red-soft); }
.btn.danger:hover { border-color: var(--red); }
.btn.quiet { border-color: transparent; background: transparent; }
.btn.small { min-height: 34px; padding: 5px 11px; font-size: 14px; }
.btn.text { border: 0; background: transparent; color: var(--blue); padding: 5px 8px; min-height: 32px; box-shadow: none; }
.btn.text:hover { background: var(--blue-soft); }

/* Metric Cards */
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.metric {
  padding: 21px 23px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--surface), var(--surface-soft));
  box-shadow: var(--shadow);
  min-width: 0;
  transition: transform .18s var(--ease), border-color .18s var(--ease);
}
.metric:hover { border-color: var(--line-strong); }
.metric-title { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 15px; gap: 10px; font-weight: 500; }
.metric-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.metric-value { font-size: 32px; line-height: 1.18; font-weight: 650; letter-spacing: -.8px; margin-top: 14px; color: var(--ink-strong); font-variant-numeric: tabular-nums; }
.metric-label { font-size: 14px; color: var(--muted); }

/* Panels & Toolbars */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.panel + .panel { margin-top: 22px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line); gap: 15px; }
.panel-head .count { margin-left: 9px; font-size: 14px; padding: 3px 9px; background: var(--surface-soft); border-radius: 6px; color: var(--muted); font-weight: 500; }
.panel-body { padding: 24px; }

.toolbar { display: flex; justify-content: space-between; gap: 16px; padding: 16px 22px; border-bottom: 1px solid var(--line); align-items: center; background: var(--surface); }
.toolbar-filters { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; flex-wrap: wrap; }
.search { position: relative; max-width: 340px; width: 100%; display: flex; align-items: center; }
.search .icon { position: absolute; left: 12px; color: var(--faint); width: 18px; height: 18px; pointer-events: none; }
.search input { padding-left: 38px; background: var(--surface-soft); min-height: 40px; }
.platform-filter, .status-filter { width: auto; min-width: 144px; max-width: 190px; min-height: 40px; background: var(--surface-soft); flex-shrink: 0; }
.toolbar-info { white-space: nowrap; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
th {
  position: sticky;
  top: 0;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 14px;
  font-weight: 550;
  padding: 13px 22px;
  border-bottom: 1px solid var(--line);
}
td { padding: 16px 22px; border-bottom: 1px solid var(--line-soft); font-size: 14px; color: var(--ink); font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background-color .12s ease; }
tbody tr:hover { background: var(--surface-hover); }

.cell-main { color: var(--ink-strong); font-weight: 600; font-size: 15px; }
.cell-sub { display: block; color: var(--muted); font-size: 14px; margin-top: 3px; }
.ea-name { display: flex; align-items: center; gap: 12px; }
.file-symbol {
  width: 40px;
  height: 42px;
  border-radius: 10px;
  background: var(--blue-soft);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--blue);
  font-size: 14px;
  font-weight: 650;
  flex-shrink: 0;
}
.row-actions { display: flex; gap: 4px; align-items: center; }

/* Semantic Status Pills */
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}
.status:before { content: ""; width: 6px; height: 6px; border-radius: 100%; background: currentColor; }
.status.success { color: var(--green); background: var(--green-soft); border-color: transparent; }
.status.warning { color: var(--amber); background: var(--amber-soft); border-color: transparent; }
.status.danger { color: var(--red); background: var(--red-soft); border-color: transparent; }
.status.blue { color: var(--blue); background: var(--blue-soft); border-color: transparent; }

.mono { font-family: "Cascadia Mono", Consolas, "SFMono-Regular", monospace; font-size: 14px; letter-spacing: .1px; font-variant-numeric: tabular-nums; }

/* Empty / Loading / Error States */
.empty { text-align: center; padding: 56px 24px 60px; display: flex; flex-direction: column; align-items: center; gap: 12px; white-space: normal; }
.empty-symbol { width: 56px; height: 56px; color: var(--blue); border: 1px solid var(--line); border-radius: 18px; background: var(--blue-soft); display: grid; place-items: center; margin-bottom: 2px; }
.empty-symbol .icon { width: 26px; height: 26px; }
.empty h3 { font-size: 17px; }
.empty p { font-size: 15px; color: var(--muted); max-width: 420px; }
.empty .btn { margin-top: 6px; }
.error-panel { padding: 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid var(--red-border); background: var(--red-soft); color: var(--red); border-radius: 14px; }
.loading-panel { min-height: 220px; display: grid; place-items: center; }

/* Dashboard & Detail Layouts */
.two-column { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(260px, 1fr); gap: 22px; }
.two-column > .panel { margin-top: 0; }
.quick-list { display: flex; flex-direction: column; padding: 4px 22px; }
.quick-action {
  display: flex;
  align-items: center;
  text-align: left;
  gap: 13px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  font-size: 15px;
  font-weight: 550;
  transition: color .15s ease, transform .15s ease;
}
.quick-action:last-child { border-bottom: 0; }
.quick-action > svg:first-child { color: var(--blue); }
.quick-action span { flex: 1; }
.quick-action:hover { color: var(--blue); transform: translateX(2px); }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.detail-grid dt { color: var(--muted); font-size: 14px; margin-bottom: 4px; }
.detail-grid dd { margin: 0; color: var(--ink-strong); overflow-wrap: anywhere; }
.section-title { margin: 26px 0 14px; }

/* Tabs, Pricing, Market, Portal & Releases */
.tabbar { display: flex; gap: 24px; border-bottom: 1px solid var(--line); margin: 0 0 22px; overflow-x: auto; }
.tabbar button { padding: 0 2px 13px; background: none; border-bottom: 2px solid transparent; color: var(--muted); white-space: nowrap; font-size: 15px; }
.tabbar button:hover { color: var(--ink-strong); }
.tabbar button.active { border-color: var(--blue); color: var(--blue); font-weight: 600; }

.pricing-grid, .market-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 24px; }
.price-card, .market-card { background: var(--surface); border: 1px solid var(--line); padding: 25px; border-radius: 16px; box-shadow: var(--shadow); }
.price-card h3 { font-size: 18px; }
.price { font-size: 32px; letter-spacing: -.5px; font-weight: 650; margin: 18px 0 8px; color: var(--ink-strong); font-variant-numeric: tabular-nums; }
.price-card p { color: var(--muted); margin-bottom: 20px; }
.price-card .btn { width: 100%; }

.market-card h3 { font-size: 18px; margin: 16px 0 8px; }
.market-card p { color: var(--muted); min-height: 48px; white-space: pre-wrap; }
.market-bottom { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 20px; }
.market-bottom strong { font-size: 22px; color: var(--ink-strong); font-variant-numeric: tabular-nums; }
.market-card .status { margin-top: 14px; }

.portal-card { display: grid; gap: 16px; max-width: 760px; }
.portal-link-box { padding: 14px 16px; border-radius: 12px; background: var(--surface-soft); border: 1px solid var(--line); overflow-wrap: anywhere; }
.portal-note { color: var(--muted); font-size: 15px; line-height: 1.65; }

.notice { padding: 14px 18px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 12px; line-height: 1.65; color: var(--muted); margin-bottom: 20px; font-size: 14px; }
.notice.warning { background: var(--amber-soft); border-color: var(--amber-border); color: var(--amber); }
.notice.danger { background: var(--red-soft); border-color: var(--red-border); color: var(--red); }

.release-list { padding: 0 24px; }
.release-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.release-row:last-child { border-bottom: 0; }
.release-row h3 { font-size: 17px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.release-row p { color: var(--muted); margin: 10px 0; white-space: pre-line; }
.release-row time { font-size: 14px; color: var(--muted); }
.release-integrity { display: grid; gap: 16px; margin-top: 18px; }
.integrity-item { padding: 14px 16px; border-radius: 12px; background: var(--surface-soft); border: 1px solid var(--line); }
.release-integrity p { margin: 6px 0; color: var(--muted); font-size: 14px; }
.release-integrity code { display: block; overflow-wrap: anywhere; line-height: 1.6; color: var(--ink); }
details > summary { cursor: pointer; font-weight: 600; color: var(--ink-strong); }

/* Forms & Controls */
input, select, textarea {
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  padding: 10px 13px;
  width: 100%;
  min-width: 0;
  font-size: 14px;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:disabled, select:disabled { background: var(--surface-soft); color: var(--muted); cursor: not-allowed; opacity: .72; }
textarea { resize: vertical; min-height: 94px; }
input[type=checkbox] { accent-color: var(--blue); width: 17px; height: 17px; margin: 0; box-shadow: none; }
input[type=file] { background: var(--surface-soft); border-style: dashed; padding: 18px; cursor: pointer; }
input[type=file]::file-selector-button { font: inherit; color: var(--blue); background: var(--blue-soft); border: 0; padding: 7px 12px; border-radius: 7px; margin-right: 13px; cursor: pointer; font-weight: 550; }

.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field > label { font-weight: 550; color: var(--ink); font-size: 14px; }
.field .hint { font-size: 14px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field.wide, .form-grid > .wide { grid-column: 1 / -1; }
.checkbox-field { display: flex; align-items: center; gap: 10px; font-size: 15px; padding: 6px 0; cursor: pointer; }
.check-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface-soft); max-height: 250px; overflow: auto; }
.check-list label { display: flex; gap: 9px; align-items: center; font-size: 14px; }
.check-list label[hidden], .account-choice-hint:empty { display: none; }

.theme-segmented {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  border-radius: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  max-width: 420px;
}
.theme-choice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 6px 14px;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 550;
  transition: background-color .15s var(--ease), color .15s var(--ease), box-shadow .15s var(--ease);
}
.theme-choice:hover { color: var(--ink-strong); }
.theme-choice.active { background: var(--surface); color: var(--blue); box-shadow: var(--shadow); font-weight: 600; }

.form-error { color: var(--red); background: var(--red-soft); border: 1px solid var(--red-border); border-radius: 10px; padding: 11px 14px; font-size: 14px; margin: 0 0 18px; }
.form-error:empty { display: none; }
.form-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.settings-form { max-width: 680px; }
.settings-form .form-footer { justify-content: flex-start; }

.switch-line { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid var(--line); }
.switch-line input { appearance: none; width: 40px; height: 23px; background: var(--line-strong); border-radius: 30px; position: relative; border: 0; transition: background .18s ease; cursor: pointer; }
.switch-line input:checked { background: var(--blue); }
.switch-line input:before { content: ""; position: absolute; left: 3px; top: 3px; width: 17px; height: 17px; background: #ffffff; border-radius: 100%; box-shadow: 0 1px 4px rgba(10, 20, 38, .25); transition: transform .18s var(--ease); }
.switch-line input:checked:before { transform: translateX(17px); }

/* Server Picker */
.server-picker-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.server-picker-heading > label { font-weight: 550; color: var(--ink); font-size: 14px; }
.server-mode-button { background: transparent; color: var(--blue); font-size: 14px; padding: 0; min-height: 24px; white-space: nowrap; }
.server-mode-button:hover { text-decoration: underline; }
.server-picker-status { color: var(--muted); font-size: 14px; line-height: 1.5; }
.server-picker-status:empty, .server-picker [hidden] { display: none; }
.server-picker .server-manual-confirm { font-weight: 400; align-items: flex-start; padding: 4px 0; font-size: 14px; }
.server-manual-confirm input { flex: none; margin-top: 3px; }

/* Dialogs & Toast */
dialog {
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 0;
  background: var(--surface);
  box-shadow: var(--shadow-float);
  max-width: calc(100vw - 32px);
  width: 580px;
  max-height: calc(100dvh - 48px);
  color: var(--ink);
}
dialog[open] { animation: dialog-enter .2s var(--ease); }
@keyframes dialog-enter { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
dialog.wide { width: 940px; }
dialog::backdrop { background: rgba(12, 22, 40, .42); backdrop-filter: blur(6px); }
.dialog-head { padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 2; }
.dialog-head h2 { font-size: 19px; }
.dialog-body { padding: 22px 24px; overflow: auto; }
.dialog-body .panel { box-shadow: none; }
.dialog-body th, .dialog-body td { padding: 12px 15px; }
.dialog-body .notice { margin-top: 0; }
.dialog-body .notice.wide { margin-bottom: 0; }
.dialog-body .empty { padding: 28px; }
.dialog-body h3 { margin-bottom: 12px; }
.result-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }

#toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translate(-50%, 16px);
  background: #142640;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, .12);
  padding: 12px 22px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(10, 20, 38, .28);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
  max-width: calc(100vw - 30px);
  font-size: 14px;
}
#toast.visible { opacity: 1; transform: translate(-50%, 0); }
#toast.error { background: #a83244; }

/* Auth View */
.auth-view { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 44px 20px; position: relative; overflow: hidden; }
.auth-view:before { content: ""; position: absolute; width: 680px; height: 680px; border-radius: 100%; border: 1px solid var(--line); left: calc(50% - 340px); top: calc(50% - 340px); z-index: -1; }
.auth-view:after { content: ""; position: absolute; width: 940px; height: 940px; border-radius: 100%; border: 1px solid var(--line-soft); left: calc(50% - 470px); top: calc(50% - 470px); z-index: -1; }
.auth-card {
  width: 436px;
  background: var(--surface-glass);
  backdrop-filter: blur(22px);
  border: 1px solid var(--glass-border);
  padding: 36px;
  border-radius: 24px;
  box-shadow: var(--shadow-float);
}
.auth-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; }
.auth-card .brand { padding: 0; }
.auth-card h1 { font-size: 24px; letter-spacing: -.3px; margin-bottom: 22px; }
.auth-card .field { margin-bottom: 17px; }
.auth-card .btn.primary { width: 100%; margin-top: 8px; min-height: 44px; }
.auth-bottom { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 18px; display: flex; justify-content: center; gap: 8px; }
.auth-bottom .btn { font-weight: 500; }
.auth-card .notice { margin-top: -4px; }
.mobile-shade { display: none; }

/* Responsive Breakpoints */
@media (min-width: 1600px) {
  .workspace { padding-left: 48px; padding-right: 48px; }
  .page { padding-top: 34px; }
  .metric { padding: 24px 26px; }
  .page-heading { margin-bottom: 28px; }
}

@media (max-width: 1200px) {
  .sidebar { width: 196px; left: 14px; top: 14px; bottom: 14px; padding-left: 10px; padding-right: 10px; }
  .workspace { margin-left: 210px; padding-left: 24px; padding-right: 24px; }
  .brand { padding-left: 12px; }
  .metric { padding: 18px; }
  .metrics { gap: 12px; }
  .two-column { grid-template-columns: 1fr; }
  .pricing-grid, .market-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-column > .panel + .panel { margin-top: 0; }
  .topbar { height: 74px; }
}

@media (max-width: 900px) {
  .sidebar { width: 210px; transform: translateX(-240px); transition: transform .2s var(--ease); }
  .sidebar.open { transform: translateX(0); }
  .mobile-shade.open { display: block; position: fixed; inset: 0; background: rgba(12, 22, 40, .42); z-index: 19; backdrop-filter: blur(3px); }
  .workspace { margin-left: 0; padding: 0 22px 30px; }
  .menu-toggle { display: inline-flex; }
  .breadcrumb { gap: 8px; }
  .topbar { height: 68px; }
  .topbar-right .today { display: none; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-heading { align-items: flex-start; }
  .page-heading .actions { justify-content: flex-end; }
  .metric-value { font-size: 28px; }
}

@media (max-width: 600px) {
  body { font-size: 15px; }
  .workspace { padding: 0 16px 24px; }
  .topbar { height: 64px; }
  .breadcrumb > span { display: none; }
  .role-chip { font-size: 14px; }
  .page { padding-top: 22px; }
  .page-heading { flex-direction: column; gap: 16px; margin-bottom: 20px; }
  h1 { font-size: 24px; }
  .page-heading .actions { justify-content: flex-start; width: 100%; }
  .page-heading .actions .btn.primary { margin-left: auto; }
  .metrics { gap: 10px; margin-bottom: 18px; }
  .metric { border-radius: 14px; padding: 16px; }
  .metric-title { font-size: 14px; }
  .metric-icon { display: none; }
  .metric-value { font-size: 26px; margin-top: 10px; }
  .panel { border-radius: 14px; }
  .panel-head { padding: 17px; }
  .toolbar { padding: 14px 16px; flex-wrap: wrap; }
  .toolbar-filters { width: 100%; }
  .search, .platform-filter, .status-filter { max-width: none; width: 100%; }
  .toolbar-info { display: none; }
  th, td { padding: 14px 16px; }
  .panel-body { padding: 18px; }
  .two-column { gap: 18px; }
  .pricing-grid, .market-grid, .form-grid, .detail-grid, .check-list { grid-template-columns: 1fr; }
  .field.wide { grid-column: auto; }
  .dialog-head { padding: 18px; }
  .dialog-body { padding: 18px; }
  .dialog-body .form-footer { position: sticky; bottom: -18px; background: var(--surface); padding-bottom: 6px; }
  .auth-card { padding: 28px 22px; width: 100%; }
  .release-row { flex-direction: column; }
  .tabbar { gap: 18px; }
  .tabbar button { font-size: 14px; }
  .error-panel { flex-direction: column; align-items: flex-start; }
  .quick-list { padding: 0 18px; }
  .theme-segmented { max-width: none; width: 100%; }
  .dashboard-eas table { table-layout: fixed; width: 100%; }
  .dashboard-eas th, .dashboard-eas td { padding: 14px 11px; }
  .dashboard-eas th:nth-child(2) { width: 72px; }
  .dashboard-eas th:nth-child(3) { width: 66px; }
  .dashboard-eas td:first-child { white-space: normal; overflow-wrap: anywhere; }
  .dashboard-eas .ea-name { gap: 8px; min-width: 0; }
  .dashboard-eas .ea-name > div { min-width: 0; }
  .dashboard-eas .file-symbol { width: 34px; height: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
