:root {
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #17283f;
  background: #f5f7fb;
  font-size: 14px;
  --teal: #009b80;
  --line: #dfe5ed;
  --muted: #718097;
  --card: #fff;
  --danger: #c84d48;
}
* { box-sizing: border-box; }
body { margin: 0; background: #f5f7fb; }
.shell { min-height: 100vh; display: flex; }
.sidebar { width: 228px; background: #fff; border-right: 1px solid #e3e8ef; padding: 22px 14px; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; padding: 5px 10px 28px; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--teal); color: #fff; font-size: 12px; }
.nav-item { display: block; width: 100%; border: 0; background: transparent; text-align: left; padding: 12px 13px; border-radius: 8px; color: #4d6076; cursor: pointer; font-size: 14px; margin-bottom: 5px; }
.nav-item:hover, .nav-item.active { background: #e9f7f3; color: #007d68; font-weight: 600; }
.sidebar-foot { margin-top: auto; padding: 15px 10px; color: #a2adba; font-size: 12px; }
.content { flex: 1; min-width: 0; padding: 30px 36px; }
.topbar, .section-head, .panel-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.topbar { margin-bottom: 24px; }
.eyebrow { color: var(--teal); font-size: 11px; font-weight: 700; letter-spacing: 2px; }
.topbar h1 { margin: 8px 0 0; font-size: 28px; }
.top-actions, .toolbar, .filters, .bulk-row, .inline-fields, .dialog-actions { display: flex; align-items: center; gap: 10px; }
.button { border: 1px solid var(--line); border-radius: 7px; background: #fff; color: #30445d; padding: 9px 14px; cursor: pointer; font-weight: 600; white-space: nowrap; }
.button:hover { border-color: #8ecfc0; }
.button.primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.button.danger { color: var(--danger); }
.button:disabled { opacity: .5; cursor: not-allowed; }
.status-pill { font-size: 12px; border-radius: 20px; padding: 7px 12px; background: #e9f7f3; color: #007d68; }
.status-pill.busy { background: #fff3db; color: #a16b00; }
.view { display: none; }
.view.active { display: block; }
.hero { display: flex; justify-content: space-between; align-items: center; background: linear-gradient(110deg, #e9f8f4, #f7fbff); border: 1px solid #d7eee9; border-radius: 12px; padding: 28px; margin-bottom: 18px; }
.hero h2 { margin: 0 0 8px; }
.hero p, .section-head p { color: var(--muted); margin: 0; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat, .panel { background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.stat { padding: 17px 20px; }
.stat-label { color: #5c7088; }
.stat-value { font-size: 29px; font-weight: 700; margin: 8px 0; }
.stat-note, .muted { color: var(--muted); font-size: 12px; }
.panel { padding: 14px; overflow: hidden; }
.panel-head h3 { margin: 0; }
.section-head { margin-bottom: 18px; }
.section-head h2 { margin: 0 0 7px; font-size: 24px; }
.empty { padding: 38px; text-align: center; color: var(--muted); }
.filters { margin-bottom: 14px; flex-wrap: wrap; }
.input { border: 1px solid #d5dde7; border-radius: 6px; background: #fff; color: #273b54; padding: 9px 10px; min-width: 150px; }
.input.grow { flex: 1; min-width: 240px; }
.input.date { min-width: 142px; }
.input.time { min-width: 104px; padding: 7px 8px; }
.right { margin-left: auto; }
.pagination { display: flex; align-items: center; gap: 10px; padding: 14px 4px 2px; }
.bulk-row { padding: 0 2px 12px; }
.check-label { display: flex; align-items: center; gap: 7px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 800px; }
th, td { text-align: left; border-bottom: 1px solid #edf0f4; padding: 13px 10px; vertical-align: middle; }
th { color: #667a91; font-size: 12px; font-weight: 600; white-space: nowrap; }
td { color: #243b56; }
tbody tr:hover { background: #fbfcfd; }
.sub { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }
.state-good { color: #008b73; }
.state-muted { color: #75869a; }
.state-warn { color: #bd7526; }
.switch-row { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.switch-row input { display: none; }
.slider { width: 36px; height: 20px; border-radius: 20px; background: #c8d1db; position: relative; transition: .2s; }
.slider:after { content: ""; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px #8e9aaa; }
.switch-row input:checked + .slider { background: var(--teal); }
.switch-row input:checked + .slider:after { transform: translateX(16px); }
.switch-action { padding: 7px 10px; font-size: 12px; }
.defaults { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.defaults label { display: flex; align-items: center; gap: 6px; }
.select-list { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 7px; padding: 8px; }
.select-option { display: flex; gap: 8px; padding: 8px; }
.select-option:hover { background: #f2f7f7; }
.dialog-actions { justify-content: flex-end; margin-top: 18px; }
.dialog-actions .button { min-width: 78px; }
dialog { border: 0; border-radius: 12px; padding: 0; width: min(650px, calc(100vw - 28px)); box-shadow: 0 18px 60px #18375b33; }
dialog::backdrop { background: #0d1f342e; }
dialog form { padding: 24px; display: grid; gap: 12px; }
dialog h3 { margin: 0; font-size: 20px; }
.textarea { min-height: 180px; resize: vertical; border: 1px solid #d5dde7; border-radius: 7px; padding: 10px; font: inherit; }
.toast { position: fixed; right: 26px; top: 24px; background: #17283f; color: white; padding: 12px 16px; border-radius: 8px; box-shadow: 0 8px 25px #0d1f3433; opacity: 0; pointer-events: none; transition: .2s; max-width: 380px; }
.toast.show { opacity: 1; }
.toast.error { background: #a33b37; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(135deg, #e9f8f4, #f5f7fb 48%, #eaf1fb); }
.login-card { width: min(410px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 32px; box-shadow: 0 18px 60px #18375b1f; }
.login-brand { padding: 0 0 25px; }
.login-card h1 { margin: 0 0 8px; font-size: 26px; }
.login-card form { display: grid; gap: 14px; margin-top: 22px; }
.login-card label { display: grid; gap: 7px; color: #4d6076; font-weight: 600; }
.login-card .button { width: 100%; margin-top: 4px; }
.login-error { min-height: 18px; color: var(--danger); font-size: 13px; }
.login-hint { color: var(--muted); font-size: 12px; margin: 22px 0 0; }
@media (max-width: 900px) { .sidebar { width: 180px; } .content { padding: 24px 20px; } .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .defaults { flex-wrap: wrap; } }
@media (max-width: 650px) { .shell { display: block; } .sidebar { width: auto; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); } .brand { padding: 5px 5px 12px; } .nav-item { display: inline-block; width: auto; margin-right: 3px; padding: 8px; } .sidebar-foot { display: none; } .content { padding: 20px 12px; } .topbar { align-items: flex-end; } .topbar h1 { font-size: 23px; } .hero, .section-head { display: block; } .hero .button, .section-head .toolbar { margin-top: 15px; } .stats { gap: 8px; } .stat { padding: 13px; } .stat-value { font-size: 23px; } .filters { gap: 7px; } .input.grow { min-width: 100%; } .defaults { align-items: flex-start; } .defaults .muted { width: 100%; } }
