:root {
  color-scheme: dark;
  --ink: #050c14;
  --ink-2: #07111f;
  --panel: #0c1928;
  --panel-2: #102236;
  --panel-3: #132b40;
  --lime: #b7f34a;
  --mint: #5de0a2;
  --blue: #57a8ff;
  --coral: #ff6658;
  --gold: #f2b94b;
  --paper: #edf3f5;
  --muted: #8294a8;
  --line: rgba(186, 216, 235, .14);
  --line-strong: rgba(186, 216, 235, .26);
  --shadow: 0 24px 70px rgba(0, 0, 0, .3);
  --accent: var(--lime);
  --green: var(--mint);
  --red: var(--coral);
  --amber: var(--gold);
  --bg: var(--ink-2);
  --card: var(--panel);
  --border: var(--line);
  --text: var(--paper);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; background: var(--ink); }
body {
  margin: 0;
  min-height: 100vh;
  font-size: 16px;
  color: var(--paper);
  background:
    radial-gradient(circle at 50% -20%, #193955 0, #07111f 44%, #040a11 100%);
  font-family: Bahnschrift, "Microsoft YaHei UI", "PingFang SC", Arial, sans-serif;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .018) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, #000 0, transparent 88%);
}

a { color: var(--lime); text-decoration: none; }
a:hover { color: #d4ff81; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 14, 24, .92);
  backdrop-filter: blur(18px);
}
.topbar {
  min-height: 80px;
  padding: 0 clamp(16px, 2.4vw, 42px);
  display: flex;
  align-items: center;
  gap: clamp(16px, 4vw, 64px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--paper);
  min-width: max-content;
}
.brand:hover { color: var(--paper); }
.brand-mark {
  width: 68px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(183, 243, 74, .52);
  color: var(--paper);
  font-weight: 950;
  font-size: 15px;
  letter-spacing: .02em;
  clip-path: polygon(0 0, 82% 0, 100% 18%, 100% 100%, 18% 100%, 0 82%);
  background: linear-gradient(145deg, rgba(183, 243, 74, .2), transparent);
  box-shadow: inset 0 0 28px rgba(183, 243, 74, .06);
}
.brand-mark span { color: var(--lime); }
.brand-copy strong { display: block; font-size: 20px; letter-spacing: .06em; }
.brand-copy small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: .08em;
}
.main-nav { display: flex; align-self: stretch; align-items: stretch; gap: 4px; }
.main-nav a {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 18px;
  color: #8da0b4;
  font-size: 18px;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  height: 2px;
  background: var(--lime);
  transform: scaleX(0);
  transition: transform .2s ease;
}
.main-nav a:hover,
.main-nav a.active { color: #fff; }
.main-nav a:hover::after,
.main-nav a.active::after { transform: scaleX(1); }
.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}
.room-badge {
  min-height: 40px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 112, 55, .38);
  border-radius: 5px;
  background: linear-gradient(110deg, rgba(255, 103, 48, .16), rgba(255, 103, 48, .035));
}
.room-badge i {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ff6b35;
  color: #fff;
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 0 16px rgba(255, 107, 53, .28);
}
.room-badge b,
.room-badge small { display: block; line-height: 1.1; }
.room-badge b { color: #fff; font-size: 12px; letter-spacing: .06em; }
.room-badge small { margin-top: 3px; color: #ffb08f; font-size: 11px; letter-spacing: .08em; }
.account-cluster { display: flex; align-items: center; gap: 11px; color: #a8b7c4; font-size: 15px; }
.account-avatar {
  position: relative;
  overflow: hidden;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.account-avatar > span { position: relative; z-index: 0; }
.account-avatar > img { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.account-avatar.has-image { background: #102b3b; box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); }
.account-avatar:hover,
.account-avatar:focus-visible {
  color: var(--ink);
  filter: brightness(1.06);
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(183, 243, 74, .32);
}
.account-cluster form { display: inline; }
.header-admin-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid rgba(168, 193, 211, .2);
  border-radius: 4px;
  color: #c6d4de;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}
.header-admin-link:hover { border-color: rgba(183, 243, 74, .48); color: var(--lime); }
.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--lime);
  cursor: pointer;
  font-size: 15px;
}
.status-rail {
  min-height: 34px;
  padding: 0 clamp(16px, 2.4vw, 42px);
  display: flex;
  align-items: center;
  gap: 22px;
  border-top: 1px solid rgba(255, 255, 255, .025);
  background: #071521;
  color: #7f91a4;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.status-rail strong { color: #fff; }
.status-rail b { color: var(--lime); font-weight: 700; margin-right: auto; }
.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(255, 102, 88, .12);
  animation: pulse 1.8s infinite;
}

.site-main {
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: clamp(24px, 3.2vw, 48px) clamp(14px, 3.2vw, 48px) 72px;
}
.panel,
.card {
  position: relative;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(17, 37, 57, .94), rgba(7, 18, 30, .97));
  box-shadow: var(--shadow);
}
.card { padding: 24px; margin-bottom: 18px; }
.panel-header,
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.eyebrow {
  display: block;
  color: var(--lime);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.page-heading h1 {
  margin: 8px 0 10px;
  font-size: clamp(32px, 4vw, 58px);
  letter-spacing: -.035em;
}
.page-heading p { margin: 0; color: #9bacba; font-size: 16px; line-height: 1.75; }
.muted { color: var(--muted); }
.numeric { font-variant-numeric: tabular-nums; }

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 24px 0;
}
.metric {
  min-height: 98px;
  padding: 16px;
  border: 1px solid var(--line);
  background: rgba(9, 25, 39, .78);
}
.metric span { color: #91a3b2; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.metric strong { display: block; margin: 8px 0 3px; font-size: 28px; }
.metric small { color: #92a4b3; font-size: 13px; }
.metric.live strong { color: var(--lime); }

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: .04em;
}
.pill.open { color: var(--mint); border-color: rgba(93, 224, 162, .5); background: rgba(93, 224, 162, .08); }
.pill.sold { color: var(--lime); border-color: rgba(183, 243, 74, .45); background: rgba(183, 243, 74, .08); }
.pill.unsold,
.pill.cancelled { color: #9cacb9; }
.pill.draft { color: var(--gold); border-color: rgba(242, 185, 75, .45); background: rgba(242, 185, 75, .08); }
.pill.sealed { color: var(--gold); }
.pill.legend { color: #fff1ba; border-color: rgba(242, 185, 75, .45); }

button.primary,
button.secondary,
button.danger,
button.ghost,
a.button-link {
  min-height: 48px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 3px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .04em;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}
button.primary,
a.button-link.primary { background: var(--lime); color: var(--ink); }
button.primary:hover,
a.button-link.primary:hover { background: #caff68; color: var(--ink); transform: translateY(-1px); }
button.secondary,
a.button-link.secondary { border-color: rgba(255, 255, 255, .12); background: #152a3c; color: #dce5e9; }
button.danger { border-color: rgba(255, 102, 88, .32); background: rgba(255, 102, 88, .12); color: #ff9b93; }
button.ghost { border-color: var(--line); background: transparent; color: #a9bbc9; }
button:disabled { opacity: .42; cursor: not-allowed; transform: none !important; }

input[type="number"],
input[type="text"],
input[type="password"],
input[type="search"],
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #06101a;
  color: var(--paper);
  padding: 10px 13px;
  font-size: 16px;
}
input::placeholder { color: #4f6476; }
label > span,
.field-label {
  display: block;
  margin-bottom: 6px;
  color: #9badbb;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.table-scroll { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: #9badbb; font-size: 13px; font-weight: 700; letter-spacing: .05em; }
tr:last-child td { border-bottom: 0; }

.flash-stack {
  position: fixed;
  top: 92px;
  left: 50%;
  z-index: 120;
  display: grid;
  gap: 8px;
  width: min(560px, calc(100vw - 28px));
  pointer-events: none;
  transform: translateX(-50%);
}
.flash-message {
  padding: 12px 16px;
  border: 1px solid rgba(242, 185, 75, .56);
  border-left: 4px solid var(--gold);
  border-radius: 4px;
  background: rgba(7, 21, 33, .97);
  box-shadow: 0 16px 46px rgba(0, 0, 0, .42);
  color: #f0e0bb;
  font-size: 15px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity .22s ease, transform .22s ease;
}
.flash-message.show { opacity: 1; transform: translateY(0); }
.flash-message.success { border-color: rgba(93, 224, 162, .56); border-left-color: var(--mint); color: var(--mint); }
.flash-message.error { border-color: rgba(255, 102, 88, .58); border-left-color: var(--coral); color: #ffaaa2; }
.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  z-index: 100;
  max-width: min(520px, calc(100vw - 28px));
  padding: 13px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: rgba(8, 21, 33, .96);
  box-shadow: 0 16px 50px rgba(0, 0, 0, .46);
  color: var(--paper);
  font-size: 16px;
  opacity: 0;
  transform: translate(-50%, -12px);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.success { border-color: rgba(93, 224, 162, .58); color: var(--mint); }
.toast.warning { border-color: rgba(242, 185, 75, .58); color: var(--gold); }
.toast.danger { border-color: rgba(255, 102, 88, .58); color: #ff9c94; }

.empty-state { padding: 48px 18px; text-align: center; color: #91a4b3; font-size: 15px; }
.empty-state strong { display: block; margin-bottom: 8px; color: #b8c6d0; font-size: 18px; }
.inline-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes pulse { 50% { opacity: .32; } }
@keyframes softGlow { 50% { box-shadow: 0 0 34px rgba(183, 243, 74, .18); } }

@media (max-width: 980px) {
  .main-nav { display: none; }
  .metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .topbar { min-height: 66px; padding: 0 14px; }
  .brand-copy small,
  .room-badge { display: none; }
  .account-cluster { gap: 7px; }
  .account-cluster > span:nth-child(2) { display: none; }
  .header-admin-link { min-height: 28px; padding-inline: 6px; font-size: 11px; }
  .status-rail { padding: 0 14px; gap: 10px; }
  .status-rail span:not(:first-child),
  .status-rail b { display: none; }
  .site-main { padding: 24px 12px 56px; }
  .metric-strip { grid-template-columns: 1fr 1fr; }
  .metric { min-height: 84px; padding: 13px; }
  .metric strong { font-size: 20px; }
  .card { padding: 15px; }
}

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

@media (min-width: 2560px) {
  body { font-size: 22px; }
  .site-main { width: min(2300px, 100%); }
  .topbar { min-height: 104px; }
  .brand-mark { width: 86px; height: 64px; font-size: 19px; }
  .brand-copy strong { font-size: 25px; }
  .brand-copy small { font-size: 17px; }
  .main-nav a { font-size: 21px; }
  button.primary,
  button.secondary,
  button.danger,
  button.ghost,
  a.button-link { min-height: 62px; font-size: 20px; }
  input[type="number"],
  input[type="text"],
  input[type="password"],
  input[type="search"],
  select,
  textarea { min-height: 62px; font-size: 21px; }
  label > span,
  .field-label { font-size: 18px; }
}

@media (min-width: 3000px) {
  .site-main { width: min(3000px, calc(100% - 96px)); }
  .topbar { padding-inline: 48px; gap: 80px; }
  .room-badge { min-height: 58px; padding: 9px 16px; gap: 12px; }
  .room-badge i { width: 38px; height: 38px; font-size: 17px; }
  .room-badge b { font-size: 20px; }
  .room-badge small { font-size: 17px; }
  .account-cluster { gap: 14px; font-size: 20px; }
  .account-avatar { width: 48px; height: 48px; }
  .link-button { font-size: 20px; }
  .eyebrow { font-size: 18px; }
  .metric-strip { gap: 16px; margin: 32px 0; }
  .metric { min-height: 140px; padding: 24px; }
  .metric span,
  .metric small { font-size: 18px; }
  .metric strong { margin-top: 12px; font-size: 40px; }
  .pill { min-height: 36px; padding: 6px 14px; font-size: 18px; }
  table { font-size: 20px; }
  th { font-size: 18px; }
  .toast { max-width: 760px; padding: 18px 26px; font-size: 22px; }
  .flash-stack { top: 120px; }
  .empty-state { font-size: 20px; }
  .empty-state strong { font-size: 26px; }
}
