:root {
  color-scheme: light;
  --ink: #17212b;
  --muted: #637080;
  --line: #d8dee6;
  --surface: #ffffff;
  --canvas: #f4f7f9;
  --teal: #087a72;
  --teal-dark: #075e59;
  --red: #b42318;
  --gold: #9a6700;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 14px/1.45 Arial, "Microsoft YaHei", sans-serif; }
.topbar { height: 60px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(24px, calc((100vw - 1240px) / 2)); background: #102c32; color: #fff; }
.brand, .account { display: flex; gap: 12px; align-items: center; }
.brand { font-weight: 700; letter-spacing: 0; }
.brand-mark { display: grid; place-items: center; width: 27px; height: 27px; background: #37b7a5; color: #072421; font-weight: 800; }
.account { font-size: 13px; color: #d8e7e6; }
.content { width: min(1240px, calc(100% - 40px)); margin: 32px auto 56px; }
.page-heading { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin: 0 0 24px; }
.page-heading.compact { align-items: center; }
.page-heading h1 { margin: 3px 0 0; font-size: 28px; line-height: 1.15; font-weight: 700; }
.page-heading p { margin: 5px 0 0; color: var(--muted); }
.eyebrow { margin: 0; color: var(--teal); font-size: 12px; font-weight: 700; letter-spacing: 0; text-transform: uppercase; }
.inline-form { display: flex; min-width: 360px; gap: 8px; }
.inline-form input { flex: 1; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--surface); margin-bottom: 24px; }
.metric { min-height: 122px; padding: 20px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric span, .metric small { display: block; color: var(--muted); }
.metric strong { display: inline-block; margin: 10px 6px 0 0; font-size: 27px; line-height: 1; font-variant-numeric: tabular-nums; }
.metric small { display: inline-block; font-size: 11px; }
.section { margin-top: 24px; background: var(--surface); border: 1px solid var(--line); }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.section-heading h2, .action-form h2 { margin: 0; font-size: 16px; }
.section-heading span { color: var(--muted); font-size: 12px; text-align: right; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 13px 20px; border-bottom: 1px solid #edf0f3; text-align: left; vertical-align: middle; }
th { background: #f8fafb; color: var(--muted); font-size: 12px; font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }
td strong, td small { display: block; }
td small { color: var(--muted); margin-top: 2px; }
.empty { color: var(--muted); padding: 28px 20px; text-align: center; }
input { width: 100%; height: 38px; padding: 8px 10px; border: 1px solid #b9c4cf; border-radius: 3px; background: #fff; color: var(--ink); font: inherit; }
input:focus { outline: 2px solid #9ed8d0; border-color: var(--teal); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 7px 12px; border: 1px solid transparent; border-radius: 3px; cursor: pointer; font: inherit; font-weight: 600; text-decoration: none; white-space: nowrap; }
.button.primary { background: var(--teal); color: #fff; }
.button.primary:hover { background: var(--teal-dark); }
.button.secondary { background: #fff; border-color: #aebbc7; color: #263542; }
.button.secondary:hover { background: #f1f5f6; }
.button.danger { color: var(--red); }
.full { width: 100%; }
.status { display: inline-block; padding: 3px 7px; border-radius: 3px; font-size: 12px; font-weight: 600; }
.status.active { background: #e4f5ef; color: #086748; }
.notice { margin-bottom: 16px; padding: 11px 13px; border-left: 3px solid; background: #fff; }
.notice.success { border-color: #117a52; color: #075d3d; }
.notice.error { border-color: var(--red); color: #8f1b13; }
.action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 24px; }
.action-form { padding: 20px; border: 1px solid var(--line); background: var(--surface); }
.action-form label, .login-form label { display: grid; gap: 6px; margin: 18px 0; color: var(--muted); font-size: 12px; font-weight: 600; }
.quota-form { display: flex; min-width: 220px; gap: 8px; }
.back { color: var(--teal); font-size: 13px; font-weight: 600; text-decoration: none; }
.login-layout { display: grid; place-items: center; min-height: calc(100vh - 180px); }
.login-form { width: min(390px, 100%); padding: 30px; border: 1px solid var(--line); background: var(--surface); }
.login-form h1 { margin: 4px 0 4px; font-size: 24px; }

@media (max-width: 760px) {
  .topbar { padding: 0 20px; }
  .account > span { display: none; }
  .content { width: min(100% - 24px, 1240px); margin-top: 22px; }
  .page-heading, .section-heading { align-items: flex-start; flex-direction: column; }
  .inline-form { min-width: 0; width: 100%; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .action-grid { grid-template-columns: 1fr; }
}

