:root {
  --ink: #17211f;
  --muted: #6a7773;
  --line: #dfe7e2;
  --panel: #ffffff;
  --soft: #f3f7f4;
  --brand: #138a65;
  --brand-dark: #0c624a;
  --accent: #f2a23a;
  --danger: #c95151;
  --shadow: 0 18px 50px rgba(31, 56, 46, .1);
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #eef4f0;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 1024px; background: #eef4f0; }
button, input, select { font: inherit; }
button { cursor: pointer; border: 0; }
.hidden { display: none !important; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 32px; background: radial-gradient(circle at 20% 20%, #d8efe4 0, transparent 40%), #eef4f0; }
.login-card { width: 420px; background: var(--panel); border: 1px solid #e4ece7; border-radius: 18px; padding: 34px; box-shadow: var(--shadow); }
.brand-mark { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .02em; color: var(--brand-dark); }
.brand-dot { width: 28px; height: 28px; border-radius: 8px; background: var(--brand); position: relative; }
.brand-dot:after { content: ""; position: absolute; width: 11px; height: 11px; border: 3px solid white; border-radius: 50%; left: 6px; top: 6px; }
.login-card h1 { margin: 28px 0 8px; font-size: 28px; }
.subtle { color: var(--muted); font-size: 13px; }
.field { display: grid; gap: 7px; margin-top: 18px; }
.field label { font-size: 13px; font-weight: 700; color: #3d4b46; }
.field input, .field select { width: 100%; border: 1px solid var(--line); background: #fbfdfc; border-radius: 9px; padding: 11px 12px; outline: none; }
.field input:focus, .field select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(19,138,101,.12); }
.primary { background: var(--brand); color: #fff; padding: 11px 17px; border-radius: 9px; font-weight: 700; }
.primary:hover { background: var(--brand-dark); }
.secondary { background: #edf4f0; color: var(--brand-dark); padding: 10px 14px; border-radius: 9px; font-weight: 700; }
.ghost { background: transparent; color: var(--muted); padding: 8px 10px; border-radius: 8px; }
.ghost:hover { background: var(--soft); color: var(--ink); }
.danger { color: var(--danger); }
.login-actions { margin-top: 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.login-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 22px; padding: 4px; background: var(--soft); border-radius: 9px; }
.login-tabs button { background: transparent; color: var(--muted); padding: 8px 5px; border-radius: 7px; font-size: 12px; }
.login-tabs button.active { background: #fff; color: var(--brand-dark); box-shadow: 0 1px 4px rgba(31,56,46,.12); font-weight: 700; }
.qr-panel { text-align: center; padding: 20px 0 8px; }
.qr-placeholder { width: 150px; height: 150px; margin: 0 auto 16px; border: 1px dashed #9ecbb8; border-radius: 8px; display: grid; place-content: center; gap: 7px; color: var(--brand-dark); background: repeating-linear-gradient(45deg,#f2faf6,#f2faf6 4px,#e8f5ef 4px,#e8f5ef 8px); }
.qr-placeholder span { font-size: 12px; }
.qr-placeholder b { font-size: 17px; }
.demo-box { margin-top: 22px; background: var(--soft); border-radius: 10px; padding: 13px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 244px 1fr; }
.sidebar { background: #123c31; color: #d9eee5; padding: 26px 16px; display: flex; flex-direction: column; }
.sidebar .brand-mark { color: #fff; padding: 0 10px 28px; }
.sidebar .brand-dot { background: #5cd0a8; }
.nav { display: grid; gap: 6px; }
.nav button { background: transparent; color: #b8d4c8; text-align: left; padding: 12px 13px; border-radius: 9px; display: flex; gap: 11px; align-items: center; font-size: 14px; }
.nav button.active, .nav button:hover { background: #1e5b48; color: #fff; }
.nav-icon { width: 18px; text-align: center; opacity: .9; }
.sidebar-foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,.12); padding: 16px 10px 0; font-size: 12px; color: #9cc0b1; }
.main { min-width: 0; }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 34px; background: #fff; border-bottom: 1px solid var(--line); }
.topbar h2 { margin: 0; font-size: 18px; }
.user-chip { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #d6eee4; color: var(--brand-dark); font-weight: 800; }
.content { padding: 28px 34px 44px; max-width: 1500px; }
.view { display: none; }
.view.active { display: block; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 23px; gap: 20px; }
.page-head h1 { margin: 0 0 6px; font-size: 26px; }
.page-head p { margin: 0; color: var(--muted); font-size: 13px; }
.head-actions { display: flex; gap: 10px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-bottom: 20px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.stat .label { color: var(--muted); font-size: 12px; }
.stat .value { margin-top: 12px; font-size: 25px; font-weight: 800; }
.stat .delta { margin-top: 7px; color: var(--brand); font-size: 12px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-bottom: 18px; }
.panel-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.panel-title h3 { margin: 0; font-size: 15px; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th { text-align: left; color: var(--muted); font-weight: 700; background: #f7faf8; }
th, td { padding: 12px 13px; border-bottom: 1px solid #edf1ef; white-space: nowrap; }
tbody tr:hover { background: #fbfdfc; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.status:before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.green { color: #19805e; background: #e3f5ed; }
.status.orange { color: #b97822; background: #fff1dc; }
.status.blue { color: #3b6ea8; background: #e7f0fb; }
.status.gray { color: #74817d; background: #edf1ef; }
.grid-2 { display: grid; grid-template-columns: 1.25fr .75fr; gap: 18px; }
.quote-layout { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; align-items: start; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 15px; }
.toolbar input, .toolbar select { border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; background: #fff; }
.toolbar input { min-width: 220px; }
.quote-lines td input { width: 84px; border: 1px solid var(--line); border-radius: 6px; padding: 6px 7px; }
.quote-lines td select { border: 1px solid var(--line); border-radius: 6px; padding: 6px 7px; }
.total-box { background: #133f32; color: #fff; border-radius: 11px; padding: 18px; }
.total-box .muted { color: #a9cabe; font-size: 12px; }
.total-box .total { font-size: 31px; font-weight: 800; margin: 6px 0 17px; }
.total-row { display: flex; justify-content: space-between; padding-top: 10px; margin-top: 10px; border-top: 1px solid rgba(255,255,255,.15); font-size: 13px; }
.notice { padding: 11px 13px; background: #fff8e9; border: 1px solid #f3dfad; color: #8e681f; border-radius: 8px; font-size: 12px; line-height: 1.6; }
.role-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.role-card { border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.role-card strong { font-size: 14px; }
.role-card p { color: var(--muted); font-size: 12px; line-height: 1.6; min-height: 38px; }
.role-card .tag { display: inline-block; color: var(--brand-dark); background: #e4f4ed; border-radius: 5px; padding: 3px 7px; margin: 3px 3px 0 0; font-size: 11px; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.inline { display: flex; gap: 10px; align-items: center; }
.inline input { flex: 1; }
.empty { text-align: center; color: var(--muted); padding: 30px; }
.toast { position: fixed; right: 26px; bottom: 24px; background: #143d31; color: #fff; padding: 12px 16px; border-radius: 9px; box-shadow: var(--shadow); font-size: 13px; transform: translateY(20px); opacity: 0; pointer-events: none; transition: .25s; }
.toast.show { transform: translateY(0); opacity: 1; }
@media (max-width: 1100px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } .role-grid { grid-template-columns: repeat(2, 1fr); } .quote-layout, .grid-2, .settings-grid { grid-template-columns: 1fr; } }
@media print { body { min-width: 0; background: #fff; } .sidebar, .topbar, .page-head, .head-actions, .toolbar, .total-box, .toast, .no-print { display: none !important; } .app-shell { display: block; } .content { padding: 0; } .view { display: none !important; } #view-quotes { display: block !important; } .panel { border: 0; } }
