:root {
  color-scheme: dark;
  --bg: #06100e;
  --bg-soft: #0b1714;
  --surface: rgba(13, 27, 23, 0.86);
  --surface-strong: rgba(17, 36, 31, 0.96);
  --line: rgba(198, 255, 226, 0.14);
  --line-strong: rgba(226, 190, 94, 0.36);
  --text: #f1fff9;
  --muted: #93aaa2;
  --gold: #e3bd63;
  --gold-2: #f6dda0;
  --green: #22c55e;
  --cyan: #5eead4;
  --danger: #ff7373;
  --warning: #f59e0b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --radius: 8px;
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-body: 14px;
  --fs-panel: 19px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    linear-gradient(180deg, rgba(2, 8, 7, 0.34), rgba(2, 8, 7, 0.68)),
    radial-gradient(circle at 51% 14%, rgba(226, 190, 94, 0.2), transparent 32%),
    radial-gradient(circle at 80% -10%, rgba(226, 190, 94, 0.12), transparent 35%),
    radial-gradient(circle at 10% 22%, rgba(94, 234, 212, 0.1), transparent 30%),
    url("assets/ai-city-bg.png") center top / cover fixed no-repeat,
    linear-gradient(155deg, #050c0b 0%, #0b1714 48%, #07110f 100%);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(2, 8, 7, 0.5), transparent 30%, transparent 68%, rgba(2, 8, 7, 0.5)),
    linear-gradient(180deg, rgba(2, 8, 7, 0.12), rgba(2, 8, 7, 0.6));
  z-index: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px;
  border-right: 1px solid var(--line);
  background: rgba(5, 14, 12, 0.9);
  backdrop-filter: blur(22px);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--gold-2);
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  padding: 0;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 12px;
  object-fit: cover;
}

.brand-name {
  font-size: 17px;
  font-weight: 800;
}

.brand-sub {
  margin-top: 3px;
  font-size: var(--fs-xs);
  color: var(--muted);
}

.nav {
  display: grid;
  gap: 6px;
}

.nav-item {
  color: var(--muted);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 11px 12px;
  font-size: var(--fs-body);
  line-height: 1.35;
  transition: 0.18s ease;
}

.nav-item:hover,
.nav-item.active {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.05);
}

.side-card {
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.side-card-title {
  color: var(--gold-2);
  font-weight: 700;
  margin-bottom: 12px;
}

.main {
  padding: 22px;
  display: grid;
  gap: 18px;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
}

.admin-lite .main {
  max-width: 1320px;
  gap: 14px;
}

.admin-lite .sidebar {
  gap: 18px;
}

.admin-lite .nav {
  gap: 8px;
}

.admin-lite .nav-item {
  min-height: 42px;
  display: flex;
  align-items: center;
}

.compact-side {
  margin-top: auto;
  display: grid;
  gap: 10px;
}

.compact-side .ghost-btn {
  width: 100%;
}

.admin-header {
  min-height: 138px;
  display: flex;
  align-items: center;
  padding: 24px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(14, 31, 27, 0.95), rgba(7, 17, 15, 0.76)),
    linear-gradient(90deg, transparent, rgba(226, 190, 94, 0.08));
  box-shadow: var(--shadow);
}

.admin-header h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
}

.admin-header p {
  margin: 10px 0 0;
  color: #b6cbc4;
  font-size: 15px;
  line-height: 1.6;
}

.task-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.task-card {
  min-height: 118px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(197, 255, 225, 0.14);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
    rgba(13, 25, 22, 0.86);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.task-card:hover {
  transform: translateY(-1px);
  border-color: rgba(226, 190, 94, 0.42);
  background:
    linear-gradient(145deg, rgba(226, 190, 94, 0.12), rgba(94, 234, 212, 0.055)),
    rgba(13, 25, 22, 0.9);
}

.task-card span {
  width: 34px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(216, 179, 91, 0.34);
  border-radius: var(--radius);
  color: var(--gold-2);
  font-size: var(--fs-xs);
  font-weight: 900;
}

.task-card strong {
  font-size: 17px;
  line-height: 1.25;
}

.task-card small {
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.55;
}

.work-section {
  scroll-margin-top: 18px;
}

.compact-stats {
  grid-template-columns: repeat(6, minmax(120px, 1fr));
}

.compact-stats .stat {
  padding: 12px;
}

.compact-stats .value {
  font-size: 22px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 14px;
}

.admin-lite .panel {
  padding: 16px;
}

.admin-lite .panel-head {
  margin-bottom: 12px;
}

.admin-lite .trend-box {
  min-height: 0;
}

.admin-lite .trend-bars {
  min-height: 128px;
  gap: 8px;
}

.admin-lite .trend-column {
  height: 76px;
}

.lite-cards-grid {
  grid-template-columns: minmax(300px, 0.82fr) minmax(360px, 1.18fr);
}

.lite-cards-grid textarea {
  min-height: 190px;
}

.inline-editor {
  margin: 10px 0;
  border: 1px solid rgba(197, 255, 225, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
}

.inline-editor summary {
  cursor: pointer;
  padding: 12px 14px;
  color: var(--gold-2);
  font-weight: 800;
}

.inline-editor .grid-form {
  padding: 0 14px 14px;
}

.compact-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-table {
  margin: 12px 0;
}

.readiness-badge {
  min-width: 58px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(94, 234, 212, 0.28);
  border-radius: var(--radius);
  color: var(--cyan);
  background: rgba(94, 234, 212, 0.07);
  font-size: 14px;
}

.plan-sales-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.sales-plan-card {
  min-height: 198px;
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(197, 255, 225, 0.12);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(226, 190, 94, 0.08), rgba(94, 234, 212, 0.04)),
    rgba(255, 255, 255, 0.035);
}

.sales-plan-card div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.sales-plan-card strong,
.sales-plan-card span,
.sales-plan-card small,
.sales-plan-card em {
  display: block;
}

.sales-plan-card strong {
  font-size: 16px;
  line-height: 1.3;
}

.sales-plan-card span,
.sales-plan-card small,
.sales-plan-card em {
  color: var(--muted);
  font-size: var(--fs-xs);
  line-height: 1.5;
  font-style: normal;
}

.sales-plan-card b {
  color: var(--gold-2);
  font-size: 24px;
  line-height: 1;
}

.sales-plan-card p {
  margin: 0;
  color: #cde2dc;
  font-size: var(--fs-sm);
  line-height: 1.55;
}

.tiny-note {
  margin-top: 4px;
  color: var(--muted);
  font-size: var(--fs-xs);
  line-height: 1.45;
}

.compact-table table {
  min-width: 640px;
}

.compact-table th,
.compact-table td {
  padding: 9px 10px;
}

.delivery-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.delivery-card {
  display: grid;
  gap: 5px;
  min-height: 94px;
  padding: 12px;
  border: 1px solid rgba(198, 255, 226, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.delivery-card span,
.delivery-card small {
  color: var(--muted);
  font-size: var(--fs-xs);
  line-height: 1.45;
}

.delivery-card strong {
  color: var(--gold-2);
  font-size: 17px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.delivery-toolbox {
  display: grid;
  gap: 12px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid rgba(198, 255, 226, 0.14);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(94, 234, 212, 0.07), rgba(226, 190, 94, 0.06)),
    rgba(255, 255, 255, 0.035);
}

.delivery-toolbox-head,
.delivery-toolbox-actions {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.delivery-toolbox-head strong {
  display: block;
  color: var(--gold-2);
  font-size: 15px;
}

.delivery-toolbox-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: var(--fs-xs);
  line-height: 1.5;
}

.delivery-toolbox label {
  display: grid;
  gap: 6px;
  min-width: 210px;
  color: #d9ebe5;
  font-size: var(--fs-xs);
  font-weight: 800;
}

.delivery-toolbox select,
.handoff-output {
  border: 1px solid rgba(198, 255, 226, 0.16);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(3, 10, 9, 0.62);
  outline: none;
}

.delivery-toolbox select {
  min-height: 38px;
  padding: 0 10px;
}

.compact-switch {
  min-width: 0 !important;
  display: inline-flex !important;
  align-items: center;
  gap: 7px !important;
}

.handoff-output {
  width: 100%;
  padding: 12px;
  resize: vertical;
  line-height: 1.55;
  font-size: var(--fs-sm);
}

.table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 18px 0 10px;
}

.table-toolbar strong {
  color: var(--gold-2);
}

.ghost-link,
.inline-link {
  color: var(--gold-2);
  text-decoration: none;
}

.ghost-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(216, 179, 91, 0.28);
  border-radius: var(--radius);
  background: rgba(216, 179, 91, 0.08);
  font-size: var(--fs-sm);
  font-weight: 800;
}

.inline-link:hover,
.ghost-link:hover {
  color: #fff1b8;
}

.more-panel {
  display: block;
}

.more-panel > summary {
  cursor: pointer;
  color: var(--gold-2);
  font-weight: 900;
  list-style-position: inside;
}

.more-panel[open] > summary {
  margin-bottom: 14px;
}

.more-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 14px;
}

.more-grid h3 {
  margin: 0 0 12px;
  color: var(--gold-2);
  font-size: 16px;
}

.hidden-admin-tables {
  display: none;
}

body[data-role="merchant"] #commercial .panel:first-child,
body[data-role="merchant"] #commercial #merchantForm,
body[data-role="merchant"] #opsGuard .panel:first-child {
  display: none;
}

body[data-role="merchant"] #commercial {
  grid-template-columns: minmax(0, 1fr);
}


.ship-panel {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid rgba(216, 179, 91, 0.24);
  border-radius: var(--radius);
  background: rgba(216, 179, 91, 0.065);
}

.ship-panel strong {
  color: var(--gold-2);
  font-size: 15px;
}

.ship-panel span {
  color: #c7d8d1;
  font-size: var(--fs-sm);
  line-height: 1.6;
}

.hero {
  min-height: 320px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: center;
  padding: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(14, 31, 27, 0.95), rgba(7, 17, 15, 0.76)),
    linear-gradient(90deg, transparent, rgba(226, 190, 94, 0.08));
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(216, 179, 91, 0.08);
  border-radius: 8px;
  pointer-events: none;
}

.hero-kicker {
  color: var(--gold-2);
  font-weight: 800;
  margin-bottom: 12px;
  font-size: var(--fs-sm);
}

.hero h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 78px);
  line-height: 1;
  letter-spacing: 0;
}

.hero p {
  max-width: 720px;
  color: #b6cbc4;
  font-size: 16px;
  line-height: 1.75;
  margin: 18px 0 0;
}

.logout-btn {
  margin-top: 18px;
}

.hero-card {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 16px;
  background:
    linear-gradient(145deg, rgba(94, 234, 212, 0.08), rgba(226, 190, 94, 0.08)),
    rgba(5, 13, 12, 0.58);
  display: grid;
  justify-items: center;
  gap: 12px;
  z-index: 1;
}

.hero-card-label,
.hero-card-foot,
.panel-hint,
.subhead,
.contact-line {
  color: var(--muted);
  font-size: var(--fs-sm);
}

.qr,
.qr-large,
.wechat-float-qr {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.qr {
  max-width: 210px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 12px;
}

.stat,
.metric-card,
.report-box,
.contact-card,
.privacy-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
}

.stat {
  padding: 14px;
}

.stat .label,
.metric-label {
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 700;
}

.stat .value,
.metric-value {
  margin-top: 8px;
  color: var(--gold-2);
  font-size: 26px;
  font-weight: 900;
}

.panel {
  padding: 18px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.panel h2 {
  margin: 0;
  font-size: var(--fs-panel);
  line-height: 1.25;
  letter-spacing: 0;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric-card {
  padding: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
    rgba(13, 27, 23, 0.86);
}

.trend-box {
  margin-top: 14px;
  min-height: 90px;
}

.grid-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.grid-form.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 0;
}

.redeem-grid {
  margin-top: 18px;
}

.grid-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: var(--fs-sm);
}

.full-row {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(197, 255, 225, 0.16);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--text);
  background: rgba(3, 10, 9, 0.58);
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(216, 179, 91, 0.62);
  box-shadow: 0 0 0 3px rgba(216, 179, 91, 0.1);
}

textarea {
  resize: vertical;
  min-height: 250px;
}

.primary-btn,
.ghost-btn,
.bubble-button,
.icon-btn {
  border-radius: 8px;
  min-height: 40px;
  border: 1px solid transparent;
  padding: 10px 14px;
  color: var(--text);
  font-size: var(--fs-body);
}

.primary-btn {
  background: linear-gradient(135deg, var(--gold-2), #75e6c8);
  color: #09110f;
  font-weight: 800;
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line);
}

.row-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.bubble-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-color: rgba(34, 197, 94, 0.34);
  background: rgba(34, 197, 94, 0.12);
}

.bubble-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 14px var(--green);
}

.table-wrap {
  overflow-x: auto;
  margin: 12px 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 11px 10px;
  border-bottom: 1px solid rgba(197, 255, 225, 0.08);
  font-size: var(--fs-sm);
  vertical-align: top;
}

th {
  color: #b7c8c2;
  background: rgba(255, 255, 255, 0.04);
  white-space: nowrap;
  font-weight: 700;
}

tr:last-child td {
  border-bottom: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: var(--fs-xs);
  background: rgba(255, 255, 255, 0.06);
}

.ok {
  color: #8ff8bb;
}

.bad {
  color: #ff9494;
}

.warn {
  color: #ffd38a;
}

.cards-grid,
.report-grid,
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 16px;
}

.card-output,
.report-box,
.contact-card,
.privacy-card {
  padding: 16px;
}

.result-box {
  margin: 0;
  min-height: 120px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  padding: 14px;
  overflow: auto;
}

.bar-list {
  display: grid;
  gap: 12px;
}

.empty-state {
  min-height: 112px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 18px;
  border: 1px dashed rgba(197, 255, 225, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
}

.empty-state strong {
  color: #e9fff5;
  font-size: 16px;
}

.empty-state span,
.empty-cell {
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.55;
}

.empty-cell {
  padding: 6px 0;
}

.bar-item {
  display: grid;
  gap: 8px;
}

.bar-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #d9eee7;
  font-size: var(--fs-sm);
}

.bar-track {
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--green));
}

.trend-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  min-height: 190px;
}

.trend-item {
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: var(--fs-xs);
}

.trend-column {
  height: 130px;
  width: 100%;
  max-width: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.trend-fill {
  width: 100%;
  min-height: 6px;
  border-radius: inherit;
  background: linear-gradient(180deg, var(--gold-2), var(--cyan));
}

.privacy-card {
  display: grid;
  gap: 16px;
}

.privacy-section h3 {
  margin: 0 0 8px;
  color: var(--gold-2);
  font-size: 15px;
}

.privacy-section ul {
  margin: 0;
  padding-left: 20px;
  color: #c6d9d2;
  line-height: 1.75;
}

.qr-large {
  max-width: 360px;
}

.contact-copy {
  display: grid;
  align-content: center;
  gap: 12px;
}

.contact-title {
  color: var(--gold-2);
  font-size: 26px;
  font-weight: 900;
}

.bubble-row {
  margin-top: 10px;
}

.wechat-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 280px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 14px;
  background: rgba(5, 14, 12, 0.96);
  box-shadow: var(--shadow);
  transform: translateY(16px);
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
  z-index: 20;
}

.wechat-float.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.wechat-float-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
  margin-bottom: 10px;
}

.wechat-float-title {
  color: var(--gold-2);
  font-weight: 800;
}

.wechat-float-sub,
.wechat-float-line {
  color: var(--muted);
  font-size: var(--fs-sm);
}

.login-page {
  min-height: 100vh;
}

.login-shell {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 22px;
  align-items: center;
  padding: 34px 0;
}

.login-brand,
.login-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.login-brand {
  min-height: 520px;
  display: grid;
  align-content: center;
  padding: 40px;
  background:
    linear-gradient(135deg, rgba(14, 31, 27, 0.95), rgba(7, 17, 15, 0.76)),
    linear-gradient(90deg, transparent, rgba(226, 190, 94, 0.08));
}

.login-back {
  width: fit-content;
  margin-bottom: 26px;
  color: var(--muted);
  text-decoration: none;
  font-size: var(--fs-sm);
}

.login-back:hover {
  color: var(--gold-2);
}

.login-brand h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: 0;
}

.login-brand p {
  max-width: 620px;
  margin: 18px 0 0;
  color: #b6cbc4;
  font-size: 16px;
  line-height: 1.75;
}

.login-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.login-points span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(216, 179, 91, 0.24);
  border-radius: 999px;
  padding: 0 13px;
  color: var(--gold-2);
  background: rgba(216, 179, 91, 0.08);
  font-size: var(--fs-sm);
  font-weight: 800;
}

.login-card {
  padding: 26px;
}

.login-card .brand-mark {
  margin-bottom: 20px;
}

.login-card h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
}

.login-card p {
  margin: 8px 0 20px;
  color: var(--muted);
  font-size: var(--fs-sm);
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: var(--fs-sm);
}

.login-form .primary-btn {
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
}

.login-error {
  border: 1px solid rgba(255, 107, 107, 0.32);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: #ffb4b4;
  background: rgba(255, 107, 107, 0.08);
  font-size: var(--fs-sm);
}

.login-help {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(94, 234, 212, 0.2);
  border-radius: var(--radius);
  background: rgba(94, 234, 212, 0.055);
}

.login-help.subtle {
  margin-top: 10px;
  border-color: rgba(216, 179, 91, 0.22);
  background: rgba(216, 179, 91, 0.055);
}

.login-help strong {
  display: block;
  color: var(--cyan);
  font-size: 14px;
  line-height: 1.25;
}

.login-help.subtle strong {
  color: var(--gold-2);
}

.login-help p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.login-help a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(94, 234, 212, 0.26);
  border-radius: var(--radius);
  color: var(--cyan);
  background: rgba(94, 234, 212, 0.07);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  text-decoration: none;
}

.login-help.subtle a {
  border-color: rgba(216, 179, 91, 0.3);
  color: var(--gold-2);
  background: rgba(216, 179, 91, 0.075);
}

.icon-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--line);
}

.wechat-float-line {
  margin-top: 10px;
  text-align: center;
}

.switch-row {
  display: flex !important;
  align-items: center;
  gap: 9px !important;
}

.switch-row input {
  width: 18px;
  height: 18px;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .stats-grid,
  .overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-brand {
    min-height: 360px;
  }

  .dashboard-grid,
  .lite-cards-grid,
  .plan-sales-grid,
  .more-grid,
  .task-board {
    grid-template-columns: 1fr;
  }

  .compact-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .main {
    padding: 14px;
  }

  .hero {
    padding: 22px;
  }

  .login-shell {
    width: min(100% - 28px, 1120px);
  }

  .login-brand,
  .login-card {
    padding: 22px;
  }

  .login-help {
    grid-template-columns: 1fr;
  }

  .grid-form,
  .grid-form.compact,
  .compact-form,
  .cards-grid,
  .report-grid,
  .contact-grid,
  .plan-sales-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid,
  .overview-grid,
  .nav,
  .compact-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compact-table table {
    min-width: 560px;
  }
}

@media (max-width: 560px) {
  .stats-grid,
  .overview-grid,
  .nav,
  .compact-stats {
    grid-template-columns: 1fr;
  }

  .app-shell {
    min-width: 0;
  }

  .main,
  .sidebar,
  .panel,
  .admin-header {
    min-width: 0;
  }

  .table-wrap {
    max-width: 100%;
  }

  .hero h1 {
    font-size: 40px;
  }

  .wechat-float {
    left: 14px;
    right: 14px;
    bottom: 14px;
    width: auto;
  }
}
