:root {
  --bg: #f2efe8;
  --bg-deep: #e9e2d6;
  --surface: #fffdf9;
  --surface-soft: #fbf7ef;
  --ink: #1d1b18;
  --muted: #7d7569;
  --soft: #a89e90;
  --line: #e6ddcf;
  --line-strong: #d8ccba;
  --accent: #ef5a35;
  --accent-dark: #d94a27;
  --accent-soft: #fff0e8;
  --teal: #169b82;
  --teal-soft: #e8f7f1;
  --violet: #7962c9;
  --violet-soft: #f0edff;
  --blue: #3f79d8;
  --blue-soft: #edf3ff;
  --sand: #a77a32;
  --sand-soft: #fbf2df;
  --sidebar: #17191e;
  --sidebar-2: #202329;
  --radius: 16px;
  --shadow: 0 18px 45px -34px rgba(73, 52, 27, .42);
}
* { box-sizing: border-box; }
html { min-width: 320px; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 86% -8%, rgba(239, 90, 53, .13), transparent 36%),
    radial-gradient(ellipse at 8% 108%, rgba(22, 155, 130, .08), transparent 35%),
    var(--bg);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
svg { display: block; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico.sm { width: 13px; height: 13px; }

/* Shell */
.app { display: flex; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; width: 256px; flex: none;
  display: flex; flex-direction: column;
  padding: 22px 14px 14px;
  color: #f4efe6;
  background: linear-gradient(180deg, var(--sidebar), #121419);
  box-shadow: 18px 0 50px -46px #000;
}
.main { min-width: 0; flex: 1; display: flex; flex-direction: column; }

/* Brand and workspace */
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 20px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px; flex: none;
  display: grid; place-items: center;
  color: #fff; font-size: 12px; font-weight: 850;
  background: linear-gradient(135deg, #ff805b, #e84a25);
  box-shadow: 0 8px 20px -12px #ff6a43;
}
.brand strong { display: block; font-size: 17px; line-height: 1.1; letter-spacing: -.5px; }
.brand small { display: block; margin-top: 4px; color: #9b9386; font-size: 8px; letter-spacing: 1.2px; }
.team-switch {
  display: flex; align-items: center; gap: 9px;
  margin: 0 2px 14px; padding: 10px;
  border: 1px solid #30333b; border-radius: 11px;
  background: #20232a;
}
.team-avatar {
  width: 29px; height: 29px; border-radius: 8px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #f7c65f, #e9a93b);
  color: #4b3006; font-size: 11px; font-weight: 850;
}
.team-copy { min-width: 0; flex: 1; }
.team-copy strong { display: block; color: #f8f2e7; font-size: 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.team-copy small { display: block; margin-top: 2px; color: #8f877a; font-size: 8.5px; }
.team-switch .ico { color: #878074; }

/* Navigation */
.nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; padding-right: 2px; }
.nav::-webkit-scrollbar { width: 0; }
.nav-label { padding: 13px 10px 5px; color: #6f685d; font-size: 9px; font-weight: 700; letter-spacing: .4px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  min-height: 36px; padding: 0 10px; border-radius: 8px;
  color: #bbb3a7; font-size: 11.5px; font-weight: 600;
  transition: background .15s ease, color .15s ease;
}
.nav-item .ico { color: #837b6f; }
.nav-item:hover { color: #fff9ef; background: #272a31; }
.nav-item:hover .ico { color: #ffc0aa; }
.nav-item.active {
  color: #fffdf8;
  background: linear-gradient(90deg, rgba(239,90,53,.22), rgba(239,90,53,.06));
  box-shadow: inset 2px 0 var(--accent);
}
.nav-item.active .ico { color: #ff8e6b; }

/* Sidebar footer */
.sidebar-foot { margin-top: auto; padding: 14px 5px 0; border-top: 1px solid #2c2f36; }
.capi-card {
  display: flex; align-items: center; gap: 9px;
  margin-bottom: 12px; padding: 9px;
  border: 1px solid #2c4038; border-radius: 9px;
  background: #1d2925;
}
.capi-card .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: #2ed6ae; box-shadow: 0 0 0 4px rgba(46,214,174,.10); }
.capi-card strong { display: block; color: #d9f6ed; font-size: 9px; }
.capi-card small { display: block; margin-top: 2px; color: #76a697; font-size: 8px; }
.user-line { display: flex; align-items: center; gap: 8px; }
.avatar { width: 29px; height: 29px; border-radius: 9px; flex: none; display: grid; place-items: center; background: #f0a07f; color: #542112; font-size: 11px; font-weight: 850; }
.user-copy { min-width: 0; flex: 1; }
.user-copy strong { display: block; color: #f6f0e6; font-size: 9.5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.user-copy small { display: block; margin-top: 2px; color: #888074; font-size: 8px; }
.logout { margin: 0 0 0 auto; padding: 0; border: 0; background: transparent; color: #8b8376; font-size: 8.5px; }
.logout:hover { color: #ffc0aa; }

/* Topbar */
.topbar {
  height: 64px; flex: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; gap: 16px;
  border-bottom: 1px solid rgba(206, 194, 178, .62);
  background: rgba(255, 253, 249, .38);
  backdrop-filter: blur(12px);
}
.crumb { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #8e8477; font-size: 10.5px; font-weight: 600; }
.crumb a { color: #312b24; font-weight: 750; }
.crumb span { margin: 0 7px; color: #c0b5a5; }
.top-actions { display: flex; align-items: center; gap: 9px; min-width: 0; }
.global-search {
  display: flex; align-items: center; gap: 7px;
  width: 300px; height: 34px; padding: 0 9px;
  border: 1px solid var(--line); border-radius: 8px;
  background: #fffdf9; color: #aaa092;
}
.global-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 10.5px; }
.global-search input::placeholder { color: #afa597; }
.global-search kbd { padding: 2px 4px; border: 1px solid #e9e0d2; border-radius: 4px; color: #b0a596; background: #faf6ef; font: 7.5px "SFMono-Regular", Consolas, monospace; }
.env { padding: 5px 9px; border-radius: 20px; color: #9b5e43; background: #f6e6dc; font-size: 8.5px; white-space: nowrap; }
.top-avatar { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: #1c1e23; color: #fbf5ea; font-size: 10px; font-weight: 800; }

/* Content */
.content { width: 100%; max-width: 1580px; padding: 30px 32px 30px; margin: 0 auto; flex: 1; }
.messages { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.message { padding: 9px 11px; border: 1px solid #c4e9dd; border-radius: 8px; color: #116a55; background: #e9f7f1; font-size: 10.5px; }
.message.warning, .message.error { border-color: #f1d2c7; color: #9e3e27; background: #fff0e9; }

/* Page heading for inner pages */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.eyebrow { color: var(--accent); font-size: 8px; font-weight: 850; letter-spacing: 1.3px; }
h1 { margin: 6px 0 5px; font-size: 32px; line-height: 1.12; letter-spacing: -1.2px; }
h2 { margin: 2px 0 0; font-size: 15px; letter-spacing: -.25px; }
.page-head p { margin: 0; color: var(--muted); font-size: 11px; }
.head-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 34px; padding: 0 13px;
  border: 1px solid var(--line); border-radius: 8px;
  color: var(--ink); background: var(--surface);
  font-size: 10.5px; font-weight: 700; white-space: nowrap;
  transition: .15s ease;
}
.button:hover { border-color: var(--line-strong); background: #faf5ed; }
.button.primary { border-color: var(--accent); color: #fff; background: var(--accent); box-shadow: 0 8px 18px -14px var(--accent); }
.button.primary:hover { border-color: var(--accent-dark); background: var(--accent-dark); }
.button.ghost { background: transparent; }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  margin-bottom: 14px; padding: 24px 26px;
  border: 1px solid #e4d8c7; border-radius: 20px;
  background:
    radial-gradient(ellipse at 95% 15%, rgba(239,90,53,.17), transparent 34%),
    linear-gradient(112deg, #fbf6ec, #f6eee1 62%, #f3eadc);
  box-shadow: var(--shadow);
}
.hero::after { content: ""; position: absolute; right: -50px; bottom: -90px; width: 250px; height: 250px; border-radius: 50%; border: 1px solid rgba(239,90,53,.14); }
.hero-copy { position: relative; z-index: 1; max-width: 680px; }
.hero h1 { margin: 7px 0 4px; font-size: 36px; letter-spacing: -1.5px; }
.hero p { margin: 0; color: #7d725f; font-size: 11.5px; }
.hero-meta { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 16px; }
.hero-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid #e7dac8; border-radius: 20px; color: #7d6d58; background: rgba(255,253,248,.72); font-size: 8.5px; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: #20b998; box-shadow: 0 0 0 3px rgba(32,185,152,.13); }
.hero-actions { position: relative; z-index: 1; display: flex; gap: 8px; flex: none; }

/* KPI */
.kpi-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi {
  display: flex; align-items: center; gap: 11px;
  min-height: 94px; padding: 15px 14px;
  border: 1px solid var(--line); border-radius: 13px;
  background: var(--surface); box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.kpi:hover { transform: translateY(-2px); box-shadow: 0 20px 48px -34px rgba(73,52,27,.55); }
.kpi-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.kpi-icon.orange { color: var(--accent); background: var(--accent-soft); }
.kpi-icon.teal { color: var(--teal); background: var(--teal-soft); }
.kpi-icon.violet { color: var(--violet); background: var(--violet-soft); }
.kpi-icon.blue { color: var(--blue); background: var(--blue-soft); }
.kpi-icon.sand { color: var(--sand); background: var(--sand-soft); }
.kpi-label { color: #81776a; font-size: 9.5px; white-space: nowrap; }
.kpi-value { margin: 1px 0 0; color: var(--ink); font-size: 27px; line-height: 1.1; font-weight: 780; letter-spacing: -1px; }
.kpi-note { margin-top: 1px; color: #aca194; font-size: 8.5px; white-space: nowrap; }

/* Dashboard layout */
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .78fr); gap: 14px; margin-bottom: 14px; align-items: start; }
.dashboard-grid.lower { grid-template-columns: minmax(0, 1.55fr) minmax(280px, .78fr); }
.dashboard-column { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.span-2 { min-width: 0; }
.side-stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.panel { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 18px 12px; }
.kicker { margin-bottom: 3px; color: #a3998b; font-size: 8px; font-weight: 800; letter-spacing: .9px; }
.link, .link-button { color: #b64c30; font-size: 10px; font-weight: 750; }
.link span { margin-left: 3px; }
.link:hover, .link-button:hover { color: var(--accent-dark); text-decoration: underline; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th { padding: 9px 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #9b9183; background: #fcf8f1; font-size: 9px; font-weight: 700; text-align: left; }
td { padding: 12px 18px; border-bottom: 1px solid #eee7db; color: #4a433a; font-size: 11px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fdfaf4; }
td small { display: block; margin-top: 3px; color: #9e9486; font-size: 8.5px; }
.strong-link { color: #28231d; font-weight: 750; }
.strong-link:hover { color: var(--accent-dark); }
.pill { display: inline-flex; align-items: center; min-height: 20px; padding: 3px 8px; border-radius: 20px; color: #61584c; background: #f1ebe1; font-size: 8.5px; font-weight: 700; white-space: nowrap; }
.pill.warm { color: #9b4c2f; background: #fff0e9; }
.empty { padding: 30px 18px !important; color: #9d9385; text-align: center; }
.progress { width: 105px; height: 5px; overflow: hidden; border-radius: 20px; background: #efe8dc; }
.progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #f5a083, var(--accent)); }
.progress-label { margin-top: 5px !important; color: #9e9486; font-size: 8.5px !important; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: "SFMono-Regular", Consolas, monospace; font-size: 10px; }
.muted { color: var(--soft); }

/* Dashboard side cards */
.todo-list { padding: 0 18px 12px; }
.todo-row { display: flex; align-items: center; gap: 9px; padding: 10px 0; border-top: 1px solid #f0e9de; }
.todo-row:first-child { border-top: 0; }
.todo-icon { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; color: #8b7c68; background: #f7f0e4; }
.todo-row span:nth-child(2) { min-width: 0; flex: 1; }
.todo-row strong { display: block; color: #3d372f; font-size: 10px; }
.todo-row small { display: block; margin-top: 2px; color: #a49a8c; font-size: 8.5px; }
.todo-row b { color: #40382e; font-size: 16px; font-weight: 780; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 18px 18px; }
.quick-action { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 9px; border: 1px solid #ede5d8; border-radius: 8px; color: #625849; background: #fcf8f1; font-size: 9px; font-weight: 700; }
.quick-action:hover { border-color: #e3c9b7; color: var(--accent-dark); background: #fff8ef; }
.quick-action .ico { color: #a58a6f; }
.flow-list { padding: 0 18px; }
.flow-row { display: flex; align-items: center; gap: 9px; padding: 10px 0; border-top: 1px solid #f0e9de; }
.flow-row:first-child { border-top: 0; }
.flow-index { width: 22px; color: #c1b3a0; font-size: 9px; font-weight: 750; }
.flow-row span:nth-child(2) { min-width: 0; flex: 1; }
.flow-row strong { display: block; color: #3d372f; font-size: 10px; }
.flow-row small { display: block; margin-top: 2px; color: #a49a8c; font-size: 8.5px; }
.flow-check { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: #17846d; background: #e8f7f1; font-size: 10px; font-weight: 800; }
.flow-link { display: flex; justify-content: space-between; margin: 4px 18px 18px; padding-top: 11px; border-top: 1px solid #f0e9de; color: #b64c30; font-size: 9.5px; font-weight: 700; }

/* Legacy stats (other pages) */
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.stats.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 760px; }
.stat { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.stat span { display: block; color: var(--muted); font-size: 9.5px; }
.stat strong { display: block; margin: 4px 0 2px; font-size: 25px; line-height: 1.1; letter-spacing: -1px; }
.stat small { color: #a59b8c; font-size: 8.5px; }
.grid-2 { display: grid; grid-template-columns: 1.2fr .8fr; gap: 14px; }

/* Filters */
.filters { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; padding: 10px; margin-bottom: 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.filters input, .filters select { height: 32px; padding: 0 9px; border: 1px solid var(--line); border-radius: 7px; outline: 0; color: var(--ink); background: #fffefa; font-size: 10px; }
.filters input { width: 250px; }
.filters input:focus, .filters select:focus { border-color: #d6a18b; }
.filter-count { margin-left: auto; color: var(--muted); font-size: 9px; }

/* Forms */
.form-card { max-width: 980px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.order-form { max-width: 1120px; padding: 0; border: 0; background: transparent; box-shadow: none; }
.order-form .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; }
.order-form .form-field input, .order-form .form-field select { height: 34px; padding: 7px 9px; font-size: 10.5px; }
.order-form .form-field textarea { min-height: 64px; padding: 8px 9px; font-size: 10.5px; }
.order-form .form-field label { font-size: 9px; }
.order-form .form-field small { font-size: 8px; line-height: 1.55; }
.order-form .form-section { margin-bottom: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.form-section-head { display: flex; gap: 10px; align-items: flex-start; padding: 13px 18px 12px; border-bottom: 1px solid rgba(220,209,193,.55); background: linear-gradient(180deg, #fffdf8, #fbf6ed); }
.form-section-head .step { flex: 0 0 auto; width: 21px; height: 21px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--accent); font: 800 10px/1 "SFMono-Regular", Consolas, monospace; box-shadow: 0 4px 10px rgba(239,90,53,.22); }
.form-section-head h2 { margin: 0; color: var(--ink); font-size: 12.5px; letter-spacing: -.01em; }
.form-section-head p { margin: 3px 0 0; color: var(--muted); font-size: 8.5px; line-height: 1.55; }
.form-section-body { padding: 14px 18px 16px; }
.order-form .form-actions { margin: 0; padding: 12px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.system-choice { margin-bottom: 14px; padding: 11px; border: 1px solid rgba(220,209,193,.7); border-radius: 10px; background: #fcf8f1; }
.system-choice-label { margin-bottom: 7px; color: #7d7365; font-size: 9px; font-weight: 650; }
.system-options { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.system-tile { display: flex; align-items: center; gap: 5px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fffefa; color: #5f574c; font-size: 9.5px; cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.system-tile:hover { border-color: #d9b7a6; }
.system-tile:has(input:checked) { border-color: #e89473; color: #8e2f18; background: #fff4ed; box-shadow: 0 0 0 3px rgba(239,90,53,.06); }
.system-choice input[type="radio"] { width: 12px; height: 12px; margin: 0; accent-color: var(--accent); }
.system-choice small { display: block; margin-top: 8px; color: var(--muted); font-size: 8.5px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 18px; }
.form-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.form-field.wide { grid-column: 1 / -1; }
.form-field label { color: #7d7365; font-size: 9.5px; font-weight: 650; }
.form-field label b { color: var(--accent); }
.form-field input, .form-field select, .form-field textarea { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; outline: 0; color: var(--ink); background: #fffefa; font-size: 11px; }
.form-field input, .form-field select { height: 37px; }
.form-field textarea { min-height: 78px; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: #d4a38f; box-shadow: 0 0 0 3px rgba(239,90,53,.06); }
.form-field input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--accent); }
.form-field small { color: var(--muted); font-size: 8.5px; }
.field-error, .form-errors { padding: 7px 9px; border-radius: 6px; color: #a33f27; background: #fff0e9; font-size: 9px; }
.form-errors { margin-bottom: 12px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.form-note { margin-top: 14px; padding: 10px 12px; border-radius: 8px; color: var(--muted); background: #fbf6ed; font-size: 9px; line-height: 1.8; }
.form-note .mono { color: var(--ink); }
.inline-form { display: inline; }
.row-actions { display: flex; align-items: center; gap: 9px; }
.row-actions form { margin: 0; }
.link.danger { color: #b42318; }
.link.danger:hover { color: #7a1a12; }
.link-button { padding: 0; border: 0; background: transparent; }

/* Footer */
.app-footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 30px; padding-top: 14px; border-top: 1px solid rgba(213,201,184,.65); color: #a1988b; font-size: 8.5px; }

/* Login */
.auth-body { display: grid; place-items: center; min-height: 100vh; background: radial-gradient(circle at 50% 0%, #fffaf0, #eee6d9); }
.auth-card { width: min(410px, calc(100vw - 32px)); padding: 30px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: 0 35px 80px -56px #3d2a16; }
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.auth-brand strong { display: block; font-size: 17px; }
.auth-brand small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; letter-spacing: 1.2px; }
.auth-card h1 { margin-top: 8px; font-size: 28px; }
.auth-sub { margin: 0 0 20px; color: var(--muted); font-size: 10.5px; line-height: 1.7; }
.auth-form { display: flex; flex-direction: column; gap: 7px; }
.auth-form label { margin-top: 6px; color: var(--muted); font-size: 9px; }
.auth-form input { height: 39px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; outline: 0; background: #fffefa; font-size: 11px; }
.auth-form input:focus { border-color: #d5a38e; }
.auth-submit { height: 39px; margin-top: 16px; }
.auth-error { margin-bottom: 12px; padding: 9px 11px; border-radius: 8px; color: #a33f27; background: #fff0e9; font-size: 10px; }
.auth-admin { display: inline-block; margin-top: 18px; color: var(--muted); font-size: 9px; }
.auth-admin:hover { color: var(--accent); }

/* Responsive */
@media (max-width: 1300px) {
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .global-search { width: 220px; }
  .dashboard-grid, .dashboard-grid.lower { grid-template-columns: minmax(0, 1.35fr) minmax(260px, .8fr); }
}
@media (max-width: 1080px) {
  .sidebar { width: 232px; }
  .content { padding: 26px 22px; }
  .topbar { padding: 0 22px; }
  .dashboard-grid, .dashboard-grid.lower { grid-template-columns: 1fr; }
  .side-stack { display: grid; grid-template-columns: 1fr 1fr; }
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .sidebar { width: 68px; padding: 16px 8px; }
  .brand span:last-child, .nav-label, .team-switch, .sidebar-foot { display: none; }
  .brand { justify-content: center; padding: 0 0 18px; }
  .nav-item { justify-content: center; width: 42px; height: 38px; padding: 0; margin: 0 auto; }
  .nav-item span { display: none; }
  .nav-item .ico { width: 17px; height: 17px; }
  .topbar { padding: 0 14px; }
  .crumb { font-size: 9.5px; }
  .global-search, .env { display: none; }
  .content { padding: 20px 14px; }
  .hero { align-items: flex-start; flex-direction: column; padding: 20px; }
  .hero h1 { font-size: 28px; }
  .hero-actions { width: 100%; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .side-stack { grid-template-columns: 1fr; }
  .page-head { align-items: flex-start; flex-direction: column; gap: 12px; }
  .page-head h1 { font-size: 27px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.wide { grid-column: auto; }
  .system-options { grid-template-columns: 1fr 1fr; }
  .form-section-head { padding: 14px 14px 12px; }
  .form-section-body { padding: 14px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats.compact { grid-template-columns: 1fr 1fr; }
  .app-footer { display: block; line-height: 1.8; }
}
@media (max-width: 500px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .kpi { min-height: 78px; }
  .filters input { width: 100%; }
  .filter-count { margin-left: 0; }
  .hero h1 { font-size: 25px; }
  .kpi-value { font-size: 24px; }
}

/* 列表分页 */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 18px 0 4px;
  flex-wrap: wrap;
}
.pager .button {
  padding: 7px 14px;
  font-size: 13px;
}
.pager .button.disabled {
  opacity: .45;
  pointer-events: none;
}
.pager-info {
  font-size: 12.5px;
  color: var(--muted);
}
