@charset "UTF-8";
:root {
  color-scheme: light;
  --ink: #17243b;
  --ink-soft: #42526b;
  --muted: #6c7d96;
  --canvas: #f4f7fb;
  --surface: rgba(255, 255, 255, .88);
  --surface-solid: #fff;
  --surface-muted: #f4f7fc;
  --line: rgba(113, 137, 171, .2);
  --line-strong: rgba(95, 121, 158, .34);
  --primary: #2563eb;
  --primary-dark: #194cc0;
  --primary-soft: #eaf0ff;
  --accent: #ea580c;
  --accent-dark: #bc4207;
  --accent-soft: #fff0e7;
  --success: #087f5b;
  --success-soft: #e7f8f1;
  --warning: #a65b00;
  --warning-soft: #fff4dc;
  --danger: #c92a2a;
  --danger-soft: #fff0f0;
  --nav: #10213b;
  --nav-soft: #1b3559;
  --shadow-sm: 0 8px 24px rgba(31, 54, 86, .07);
  --shadow-md: 0 22px 60px rgba(31, 54, 86, .13);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --font: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-display: ui-rounded, "Arial Rounded MT Bold", "PingFang SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 5%, rgba(37, 99, 235, .13), transparent 32rem),
    radial-gradient(circle at 92% 18%, rgba(234, 88, 12, .10), transparent 26rem),
    linear-gradient(145deg, #f8fbff 0%, var(--canvas) 48%, #eef4fb 100%);
  font: 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, input, select, textarea, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .6; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .42);
  outline-offset: 3px;
}
.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;
}
.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.glass-panel {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, .82);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--accent); }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font: 750 23px/1 var(--font-display);
  letter-spacing: -.02em;
}
.brand-mark {
  width: 39px;
  height: 39px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(145deg, #3b82f6, #1d4ed8);
  box-shadow: 0 9px 24px rgba(37, 99, 235, .28);
}
.brand-mark .icon { width: 22px; height: 22px; }
.brand small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font: 700 10px/1.3 var(--font);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.button {
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 720;
  text-decoration: none;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:active:not(:disabled) { transform: translateY(0); }
.button-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 10px 24px rgba(37, 99, 235, .24);
}
.button-accent {
  color: #fff;
  background: linear-gradient(135deg, #f97316, var(--accent-dark));
  box-shadow: 0 10px 24px rgba(234, 88, 12, .22);
}
.button-secondary {
  color: var(--ink-soft);
  background: rgba(255, 255, 255, .8);
  border-color: var(--line-strong);
}
.button-ghost { color: var(--primary); background: transparent; border-color: transparent; }
.button-danger { color: var(--danger); background: var(--danger-soft); border-color: rgba(201, 42, 42, .22); }
.button-small { min-height: 38px; padding: 7px 12px; border-radius: 9px; font-size: 13px; }
.field { display: grid; gap: 7px; }
.field label, .field-label { color: var(--ink-soft); font-size: 13px; font-weight: 720; }
.field-hint { color: var(--muted); font-size: 12px; line-height: 1.55; }
.input, .select, .textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 11px 13px;
  color: var(--ink);
  background: rgba(255, 255, 255, .86);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.textarea { min-height: 96px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: #9aa8bb; }
.input:focus, .select:focus, .textarea:focus {
  border-color: rgba(37, 99, 235, .72);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .1);
  background: #fff;
  outline: none;
}
.password-row { display: flex; position: relative; }
.password-row .input { padding-right: 54px; }
.password-toggle {
  position: absolute;
  inset: 4px 4px 4px auto;
  min-width: 44px;
  min-height: 40px;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
}
.password-toggle:hover { color: var(--primary); background: var(--primary-soft); }
.field-error, .error-text { color: var(--danger); font-size: 12px; font-weight: 650; }
.form-error-summary {
  border: 1px solid rgba(201, 42, 42, .25);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--danger);
  background: var(--danger-soft);
  font-size: 13px;
}
.status-line {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.status-line[data-state="success"] { color: var(--success); }
.status-line[data-state="error"] { color: var(--danger); }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 27px;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-muted);
  font-size: 12px;
  font-weight: 720;
  white-space: nowrap;
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.success { color: var(--success); background: var(--success-soft); }
.pill.warning { color: var(--warning); background: var(--warning-soft); }
.pill.danger { color: var(--danger); background: var(--danger-soft); }
.pill.primary { color: var(--primary); background: var(--primary-soft); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(255,255,255,.7); }
.data-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.data-table th {
  padding: 13px 15px;
  text-align: left;
  color: var(--muted);
  background: rgba(244, 247, 252, .88);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}
.data-table td { padding: 15px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 13px; vertical-align: middle; }
.data-table tr:hover td { background: rgba(234, 240, 255, .35); }
.empty-state { padding: 44px 24px; text-align: center; color: var(--muted); }
.empty-state strong { display: block; color: var(--ink-soft); font-size: 16px; margin-bottom: 6px; }
.loading-block { display: grid; place-items: center; min-height: 180px; color: var(--muted); gap: 12px; }
.spinner {
  width: 26px;
  height: 26px;
  border: 3px solid rgba(37, 99, 235, .18);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.toast-stack { position: fixed; z-index: 80; right: 22px; bottom: 22px; display: grid; gap: 10px; width: min(360px, calc(100vw - 28px)); }
.toast {
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  border-radius: 12px;
  padding: 13px 15px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--shadow-md);
  font-size: 13px;
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.dialog {
  width: min(680px, calc(100vw - 28px));
  max-height: min(86vh, 860px);
  overflow: auto;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 22px;
  padding: 0;
  color: var(--ink);
  background: #fdfefe;
  box-shadow: 0 30px 100px rgba(19, 38, 65, .3);
}
.dialog::backdrop { background: rgba(13, 31, 56, .5); backdrop-filter: blur(4px); }
.dialog-header { position: sticky; z-index: 2; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 22px; border-bottom: 1px solid var(--line); background: rgba(253,254,254,.95); backdrop-filter: blur(12px); }
.dialog-header h2 { margin: 0; font-size: 20px; }
.dialog-body { padding: 22px; display: grid; gap: 18px; }
.dialog-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.icon-button { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; display: grid; place-items: center; color: var(--muted); background: #fff; }
.icon-button:hover { color: var(--primary); border-color: rgba(37, 99, 235, .35); }
.meter { height: 8px; border-radius: 999px; background: #e8eef7; overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), #60a5fa); }
.money { font-variant-numeric: tabular-nums; font-weight: 750; color: var(--ink); }
@media (max-width: 720px) {
  body { font-size: 15px; }
  .button { min-height: 48px; }
  .toast-stack { right: 14px; bottom: 14px; }
  .dialog { border-radius: 18px 18px 0 0; width: 100%; max-width: none; margin: auto 0 0; max-height: 92vh; }
  .dialog::backdrop { align-items: end; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
