:root {
  color-scheme: light;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: #f2efe8;
  color: #19231f;
  --ink: #19231f;
  --muted: #66716c;
  --paper: #fffdf8;
  --line: #d7d3c8;
  --green: #24664f;
  --green-soft: #dcebe3;
  --amber: #a36b1d;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 10% 0%, #fffdf8 0, transparent 34rem), #f2efe8;
}

main {
  width: min(72rem, calc(100% - 2rem));
  margin: 0 auto;
}

h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: -0.05em; margin-bottom: .5rem; }
h2 { margin-bottom: .35rem; }
.eyebrow { color: var(--green); font: 700 .72rem/1.2 ui-monospace, monospace; letter-spacing: .16em; }
.muted { color: var(--muted); }
.login-shell { min-height: 100vh; display: grid; place-items: center; }
.login-card { width: min(26rem, calc(100vw - 3rem)); padding: clamp(1.5rem, 5vw, 3rem); border: 1px solid var(--line); border-radius: 1.5rem; background: color-mix(in srgb, var(--paper) 92%, transparent); box-shadow: 0 24px 70px rgba(25,35,31,.10); }
.stack { display: grid; gap: 1rem; }
label { display: grid; gap: .45rem; color: var(--muted); font-size: .9rem; }
input, select, textarea { box-sizing: border-box; width: 100%; border: 1px solid var(--line); border-radius: .75rem; padding: .85rem 1rem; background: white; color: var(--ink); font: inherit; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(36,102,79,.18); border-color: var(--green); }
textarea { resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; line-height: 1.5; }
button { border: 0; border-radius: .75rem; padding: .85rem 1.1rem; background: var(--green); color: white; font: 700 .95rem/1 inherit; cursor: pointer; }
button.quiet { background: transparent; color: var(--green); border: 1px solid var(--line); }
.button-link { display: inline-flex; align-items: center; justify-content: center; border-radius: .75rem; padding: .75rem 1rem; background: var(--green); color: white; text-decoration: none; font-weight: 700; }
.button-link.quiet { background: transparent; color: var(--green); border: 1px solid var(--line); }
.actions { display: flex; align-items: center; gap: .6rem; }
.alert { margin: 1rem 0; padding: .8rem 1rem; border-radius: .75rem; }
.alert.error { background: #f8e4df; color: #8c2f20; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 2rem 0 1.25rem; }
.status-card { border-radius: 1.25rem; padding: 1.5rem; background: var(--ink); color: white; display: grid; gap: .5rem; }
.status-card strong { font: 700 clamp(1.5rem, 4vw, 2.5rem)/1 ui-monospace, monospace; color: #b9e3ce; }
.status-card p { color: #c9d1cd; margin-bottom: 0; }
.status-dot { display: inline-block; width: .6rem; height: .6rem; margin-right: .5rem; border-radius: 50%; background: #efb950; box-shadow: 0 0 0 .25rem rgba(239,185,80,.15); }
.allocation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; padding: 1rem 0 3rem; }
.allocation-card { display: flex; align-items: center; gap: 1rem; min-height: 8rem; padding: 1rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--paper); }
.allocation-ring { display: grid; place-items: center; flex: 0 0 4.5rem; aspect-ratio: 1; border-radius: 50%; background: conic-gradient(var(--green) calc(var(--target) * 1%), var(--green-soft) 0); }
.allocation-ring::before { content: ""; grid-area: 1/1; width: 3.25rem; aspect-ratio: 1; border-radius: 50%; background: var(--paper); }
.allocation-ring span { grid-area: 1/1; z-index: 1; font-weight: 800; }
.allocation-card p { margin-bottom: .2rem; }
.three-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; padding-bottom: 1rem; }
.panel { padding: 1.25rem; margin-bottom: 1rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--paper); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.form-action { display: flex; align-items: center; gap: 1rem; grid-column: 1 / -1; }
.form-action p { margin: 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .8rem; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
@media (max-width: 700px) { .allocation-grid { grid-template-columns: 1fr; } .topbar { align-items: flex-start; } }
@media (max-width: 900px) { .three-columns { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } .form-action { align-items: stretch; flex-direction: column; } }
