/* ============================================
   ECO Account System - Design System
   Deep Night + Warm Gold
   ============================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* --- Color Tokens --- */
  --night-deepest: #07090f;
  --night-deep:    #0b0f1a;
  --night:         #101828;
  --night-light:   #1a2332;
  --surface:       #1e293b;
  --surface-light: #263348;

  --gold:          #d4a853;
  --gold-light:    #f0d68a;
  --gold-dim:      #a07c2e;
  --gold-glow:     rgba(212, 168, 83, 0.15);

  --silver:        #94a3b8;
  --silver-light:  #cbd5e1;
  --ice:           #f1f5f9;

  --crimson:       #ef4444;
  --emerald:       #10b981;
  --sky:           #38bdf8;

  /* --- Semantic Aliases --- */
  --color-primary:    var(--gold);
  --color-primary-hover: var(--gold-light);
  --bg-body:          var(--night-deep);
  --bg-card:          var(--night);
  --bg-input:         var(--night-light);
  --bg-surface:       var(--surface);
  --text-primary:     var(--ice);
  --text-secondary:   var(--silver);
  --text-muted:       #556580;
  --border-color:     rgba(255, 255, 255, 0.06);
  --border-active:    rgba(212, 168, 83, 0.4);

  /* --- Shadows --- */
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.3);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg:    0 12px 40px rgba(0,0,0,0.5);
  --shadow-gold:  0 4px 24px rgba(212,168,83,0.12);

  /* --- Typography --- */
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  /* --- Spacing --- */
  --sp-1: 4px;   --sp-2: 8px;   --sp-3: 12px;  --sp-4: 16px;
  --sp-5: 20px;  --sp-6: 24px;  --sp-8: 32px;  --sp-10: 40px;
  --sp-12: 48px; --sp-16: 64px;

  /* --- Radius --- */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 20px;

  /* --- Transitions --- */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration: 0.25s;
}

/* ---------- Body & Background ---------- */
body {
  font-family: var(--font-sans);
  background: var(--bg-body);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

/* Subtle gradient background texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(212,168,83,0.04) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 90%, rgba(56,189,248,0.03) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ---------- Navigation ---------- */
.nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1);
  padding: var(--sp-4) var(--sp-6);
  background: rgba(11, 15, 26, 0.8);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid var(--border-color);
}

.nav-bar .nav-brand {
  position: absolute;
  left: var(--sp-6);
  font-size: 15px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.nav-brand svg {
  width: 22px;
  height: 22px;
}

.nav-tab {
  position: relative;
  padding: var(--sp-2) var(--sp-5);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: color var(--duration) var(--ease-out);
  text-decoration: none;
}

.nav-tab:hover {
  color: var(--text-secondary);
}

.nav-tab.active {
  color: var(--gold);
}

.nav-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--gold);
  border-radius: 1px;
}

/* Theme toggle in nav */
.nav-theme-toggle {
  position: absolute;
  right: var(--sp-6);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--r-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--duration) var(--ease-out);
  font-size: 14px;
}

.nav-theme-toggle:hover {
  background: rgba(255,255,255,0.08);
  color: var(--gold);
  border-color: var(--border-active);
}

/* ---------- Container ---------- */
.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

/* ---------- Auth Layout (Login / Register / Forgot) ---------- */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 80px var(--sp-6) var(--sp-10);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: cardEnter 0.5s var(--ease-out) both;
}

@keyframes cardEnter {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-card-header {
  padding: var(--sp-8) var(--sp-8) 0;
  text-align: center;
}

.auth-card-header .auth-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--sp-4);
  background: var(--gold-glow);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
}

.auth-card-header .auth-icon svg {
  width: 24px;
  height: 24px;
}

.auth-card-header h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--sp-1);
  letter-spacing: -0.02em;
}

.auth-card-header p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.auth-card-body {
  padding: var(--sp-6) var(--sp-8) var(--sp-8);
}

/* ---------- Alerts ---------- */
.alert {
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: var(--sp-5);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  line-height: 1.5;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-info {
  background: rgba(56, 189, 248, 0.08);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.15);
}

/* ---------- Form ---------- */
.form-group {
  margin-bottom: var(--sp-5);
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--sp-2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"] {
  width: 100%;
  height: 44px;
  padding: 0 var(--sp-4);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--r-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  transition: all var(--duration) var(--ease-out);
  outline: none;
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.form-group input:hover {
  border-color: rgba(255,255,255,0.12);
}

.form-group input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
  background: rgba(26, 35, 50, 0.8);
}

.form-group small {
  display: block;
  margin-top: var(--sp-1);
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
}

.form-group small.text-warning {
  color: #fbbf24;
}

/* Verification input group */
.verification-group {
  display: flex;
  gap: var(--sp-2);
}

.verification-group input {
  flex: 1;
}

.verification-group button {
  flex-shrink: 0;
  height: 44px;
  padding: 0 var(--sp-4);
  background: transparent;
  color: var(--gold);
  border: 1px solid rgba(212,168,83,0.3);
  border-radius: var(--r-md);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--duration) var(--ease-out);
  letter-spacing: 0.02em;
}

.verification-group button:hover:not(:disabled) {
  background: var(--gold-glow);
  border-color: var(--gold);
}

.verification-group button:disabled {
  color: var(--text-muted);
  border-color: var(--border-color);
  cursor: not-allowed;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  height: 44px;
  padding: 0 var(--sp-6);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--duration) var(--ease-out);
  text-decoration: none;
  letter-spacing: 0.02em;
  outline: none;
  user-select: none;
}

.btn:focus-visible {
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dim) 100%);
  color: #0b0f1a;
  box-shadow: var(--shadow-gold);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(212,168,83,0.2);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.12);
}

.btn-small {
  height: 34px;
  padding: 0 var(--sp-4);
  font-size: 12px;
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.btn-small:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
}

.btn-outline-gold {
  background: transparent;
  color: var(--gold);
  border: 1px solid rgba(212,168,83,0.3);
}

.btn-outline-gold:hover {
  background: var(--gold-glow);
  border-color: var(--gold);
}

/* ---------- Form Actions ---------- */
.form-actions {
  display: flex;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
}

.form-actions .btn-primary {
  flex: 1;
  width: auto;
}

.form-actions .btn-secondary {
  flex-shrink: 0;
}

/* ---------- Auth Footer / Links ---------- */
.auth-footer {
  padding: var(--sp-5) var(--sp-8);
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.auth-footer p {
  font-size: 13px;
  color: var(--text-muted);
  margin: var(--sp-1) 0;
}

.auth-footer a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--duration);
}

.auth-footer a:hover {
  color: var(--gold-light);
}

/* ---------- Dashboard Layout ---------- */
.dash-page {
  padding: 72px 0 0;
  min-height: 100vh;
}

.dash-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 72px);
}

/* Sidebar */
.dash-sidebar {
  background: var(--bg-card);
  border-right: 1px solid var(--border-color);
  padding: var(--sp-8) var(--sp-6);
  display: flex;
  flex-direction: column;
}

.dash-sidebar-brand {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--sp-8);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.dash-sidebar-brand svg {
  width: 18px;
  height: 18px;
}

.dash-user-card {
  flex: 1;
}

.dash-user-card .user-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--sp-1);
}

.dash-user-card .user-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: var(--sp-6);
  letter-spacing: -0.01em;
}

.dash-sidebar-footer {
  padding-top: var(--sp-6);
  border-top: 1px solid var(--border-color);
}

.dash-sidebar-footer .server-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--sp-2);
}

.dash-sidebar-footer .server-addr {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: var(--sp-1);
}

/* Main content */
.dash-main {
  padding: var(--sp-8) var(--sp-10);
  overflow-y: auto;
}

.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-8);
}

.dash-header h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.dash-header-right {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

/* ---------- Info Cards Grid ---------- */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-5);
  margin-bottom: var(--sp-6);
}

.info-block {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  transition: border-color var(--duration) var(--ease-out);
}

.info-block:hover {
  border-color: rgba(255,255,255,0.1);
}

.info-block-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.info-block-title svg {
  width: 16px;
  height: 16px;
  color: var(--gold);
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border-color);
}

.info-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.info-row:first-of-type {
  padding-top: 0;
}

.info-row-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.info-row-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.info-row-value.highlight {
  color: var(--gold);
}

/* ---------- Action Section ---------- */
.action-block {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  margin-bottom: var(--sp-5);
}

.action-block-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.action-block-title svg {
  width: 16px;
  height: 16px;
  color: var(--gold);
}

.action-btn-row {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.action-btn-row .btn {
  flex: 0 0 auto;
  min-width: 140px;
}

/* ---------- Connection Info ---------- */
.connection-block {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  border-left: 3px solid var(--gold);
}

.connection-block-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.connection-block-title svg {
  width: 16px;
  height: 16px;
  color: var(--gold);
}

.connection-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-2) 0;
}

.connection-row-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.connection-row-value {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
}

.connection-note {
  margin-top: var(--sp-4);
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
}

/* ---------- Password Tips ---------- */
.password-tips {
  margin-top: var(--sp-6);
  padding: var(--sp-5);
  background: rgba(251, 191, 36, 0.05);
  border: 1px solid rgba(251, 191, 36, 0.15);
  border-radius: var(--r-md);
}

.password-tips h4 {
  font-size: 12px;
  font-weight: 600;
  color: #fbbf24;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--sp-3);
}

.password-tips ul {
  margin-left: var(--sp-5);
}

.password-tips li {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: var(--sp-1);
  line-height: 1.6;
}

/* ---------- Text Utilities ---------- */
.text-muted {
  color: var(--text-muted) !important;
  font-size: 12px;
}

.text-center {
  text-align: center;
}

/* ---------- Divider ---------- */
.divider {
  height: 1px;
  background: var(--border-color);
  margin: var(--sp-5) 0;
}

/* ---------- 404 Page ---------- */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding: var(--sp-8);
}

.error-code {
  font-size: 96px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: var(--sp-4);
  opacity: 0.7;
}

.error-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
}

.error-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: var(--sp-8);
}

/* ---------- Step Indicator ---------- */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
}

.step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  transition: all var(--duration) var(--ease-out);
}

.step-dot.active {
  background: var(--gold);
  color: var(--night-deep);
  border-color: var(--gold);
}

.step-dot.done {
  background: var(--emerald);
  color: white;
  border-color: var(--emerald);
}

.step-line {
  width: 32px;
  height: 1px;
  background: var(--border-color);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .dash-layout {
    grid-template-columns: 1fr;
  }

  .dash-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding: var(--sp-6);
    flex-direction: row;
    align-items: center;
    gap: var(--sp-8);
  }

  .dash-user-card {
    display: flex;
    gap: var(--sp-6);
    align-items: center;
  }

  .dash-user-card .user-label {
    margin-bottom: 0;
    margin-right: var(--sp-2);
  }

  .dash-user-card .user-value {
    margin-bottom: 0;
    font-size: 16px;
  }

  .dash-sidebar-footer {
    border-top: none;
    padding-top: 0;
    margin-left: auto;
  }

  .dash-main {
    padding: var(--sp-6);
  }

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

@media (max-width: 640px) {
  .nav-bar {
    padding: var(--sp-3) var(--sp-4);
  }

  .nav-bar .nav-brand {
    display: none;
  }

  .nav-theme-toggle {
    right: var(--sp-4);
  }

  .auth-page {
    padding: 64px var(--sp-4) var(--sp-6);
  }

  .auth-card-header {
    padding: var(--sp-6) var(--sp-5) 0;
  }

  .auth-card-body {
    padding: var(--sp-5);
  }

  .auth-footer {
    padding: var(--sp-4) var(--sp-5);
  }

  .dash-sidebar {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-4);
  }

  .dash-user-card {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-1);
  }

  .dash-main {
    padding: var(--sp-4);
  }

  .dash-header h1 {
    font-size: 20px;
  }

  .info-grid {
    gap: var(--sp-4);
  }

  .verification-group {
    flex-direction: column;
  }

  .verification-group button {
    height: 40px;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn-secondary {
    width: 100%;
  }

  .action-btn-row {
    flex-direction: column;
  }

  .action-btn-row .btn {
    width: 100%;
  }

  .step-indicator {
    gap: var(--sp-2);
  }

  .step-line {
    width: 20px;
  }
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.2);
}

/* ---------- Selection ---------- */
::selection {
  background: rgba(212,168,83,0.3);
  color: var(--text-primary);
}

/* ---------- Focus Visible ---------- */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

input:focus-visible {
  outline: none;
}

/* ---------- Modal / 弹窗 ---------- */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  width: 90%;
  max-width: 580px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: modalIn 0.25s ease-out;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--gold);
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color .15s;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 16px 24px 8px;
}

.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 8px 24px 20px;
}

.modal-footer .btn {
  white-space: nowrap;
  min-width: 90px;
  flex-shrink: 0;
}

.modal-footer .btn-primary {
  width: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* ---------- 子账号表格 ---------- */
.sub-account-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
  font-size: 14px;
}

.sub-account-table thead th {
  text-align: left;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color);
}

.sub-account-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.sub-account-table tbody tr:last-child td {
  border-bottom: none;
}

.sub-account-table tbody tr:hover {
  background: var(--gold-glow);
}

.sub-account-table code {
  background: var(--bg-input);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--gold-light);
}
