:root {
  color-scheme: light;
  --ink: #15212b;
  --muted: #6d7b86;
  --line: #e7edf0;
  --surface: #fff;
  --bg: #f5f8fa;
  --brand: #117c72;
  --brand-dark: #0b5f58;
  --warning: #b56b12;
  --blue: #2d6cdf;
  --success: #14804a;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }
button, select, input { font: inherit; }
button, select { cursor: pointer; }
.login-overlay { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 24px; background: #edf4f4; }
.login-overlay.hidden { display: none; }
.login-box { width: min(100%, 380px); padding: 38px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 20px 60px rgba(20, 44, 54, .12); }
.login-box .logo-mark { width: 52px; height: 52px; margin-bottom: 22px; border-radius: 14px; display: grid; place-items: center; background: var(--brand); color: #fff; font-size: 25px; font-weight: 700; }
.login-box h1 { margin: 4px 0 26px; }
.login-box label { display: grid; gap: 6px; margin-top: 16px; color: var(--muted); font-size: 13px; }
.login-box input { min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; outline: none; }
.login-box input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(17, 124, 114, .12); }
.login-box .button { width: 100%; margin-top: 24px; }
.form-message { min-height: 20px; margin-top: 12px; color: #b3261e; font-size: 13px; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 232px; padding: 24px 14px; background: #17262d; color: #c5d2d6; display: flex; flex-direction: column; }
.brand { padding: 0 14px 30px; color: #fff; font-size: 18px; font-weight: 700; letter-spacing: .04em; }
.brand span { display: block; margin-top: 4px; color: #80b7b0; font-size: 12px; font-weight: 500; letter-spacing: 0; }
nav { display: grid; gap: 4px; }
.nav-item { padding: 11px 14px; border-radius: 8px; color: inherit; text-decoration: none; }
.nav-item:hover, .nav-item.active { color: #fff; background: var(--brand); }
.sidebar-foot { margin-top: auto; padding: 14px; color: #6f858b; font-size: 12px; }
.main { margin-left: 232px; min-height: 100vh; }
.topbar { min-height: 88px; padding: 18px 38px; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.eyebrow { margin: 0 0 2px; color: var(--muted); font-size: 12px; }
h1, h2, p { margin: 0; }
h1 { font-size: 24px; }
h2 { font-size: 18px; }
.top-actions, .toolbar { display: flex; gap: 10px; align-items: center; }
select, input[type="date"] { min-height: 38px; padding: 0 11px; background: #fff; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); }
.avatar { width: 38px; height: 38px; border: 0; border-radius: 50%; background: #e7f2f0; color: var(--brand-dark); font-weight: 700; }
.content { padding: 32px 38px; max-width: 1500px; margin: 0 auto; }
.page-heading, .panel-heading { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.page-heading { margin-bottom: 22px; }
.page-heading p, .panel-heading p, .split-panel p { margin-top: 4px; color: var(--muted); }
.date-control { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-card { padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 5px 20px rgba(20, 44, 54, .04); }
.stat-card span, .stat-card small { display: block; color: var(--muted); }
.stat-card strong { display: block; margin: 5px 0 1px; font-size: 30px; }
.stat-card.warning strong { color: var(--warning); }
.stat-card.blue strong { color: var(--blue); }
.stat-card.success strong { color: var(--success); }
.panel { margin-top: 22px; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 5px 20px rgba(20, 44, 54, .04); }
.panel-heading { margin-bottom: 18px; }
.button { min-height: 38px; padding: 0 15px; border: 0; border-radius: 8px; font-weight: 600; }
.button.primary { background: var(--brand); color: #fff; }
.button.primary:hover { background: var(--brand-dark); }
.button.secondary { background: #eaf3f2; color: var(--brand-dark); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 780px; }
th, td { padding: 13px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: 12px; font-weight: 600; background: #fbfcfc; }
td { font-size: 13px; }
.tag { display: inline-flex; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.tag.pending { color: #8b5a12; background: #fff5df; }
.tag.running { color: #225dbd; background: #eaf1ff; }
.tag.done { color: #137342; background: #e6f6ee; }
.tag.exception { color: #a12a22; background: #fdecea; }
.task-action { padding: 0; border: 0; background: none; color: var(--brand-dark); font-weight: 600; }
.split-panel { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 24px; }
.drop-card { padding: 22px; border: 1px dashed #b8d1ce; border-radius: 12px; background: #f6fbfa; display: grid; gap: 7px; }
.drop-card span { color: var(--muted); font-size: 13px; }
.import-mode { display: flex; gap: 18px; margin-top: 14px; color: var(--muted); }
.import-mode input { accent-color: var(--brand); }
.task-dialog { width: min(720px, calc(100% - 36px)); max-height: calc(100vh - 36px); padding: 0; border: 0; border-radius: 16px; box-shadow: 0 24px 80px rgba(20,44,54,.22); overflow: auto; }
.task-dialog::backdrop { background: rgba(15, 30, 36, .38); }
.dialog-card { position: relative; padding: 28px; }
.dialog-close { position: absolute; top: 12px; right: 16px; border: 0; background: none; color: var(--muted); font-size: 26px; }
.dialog-card h2 { padding-right: 32px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.detail-item { padding: 12px; border-radius: 10px; background: #f6f9fa; }
.detail-item small, .detail-event small { display: block; color: var(--muted); }
.detail-event { padding: 14px 0; border-top: 1px solid var(--line); }
.correction-row { display: grid; gap: 4px; padding: 12px; margin-top: 8px; border-radius: 10px; background: #f6f9fa; }
.correction-row small { color: var(--muted); overflow-wrap: anywhere; }
.photo-link { display: inline-block; margin: 8px 12px 0 0; padding: 0; border: 0; background: none; color: var(--brand-dark); font: inherit; font-weight: 600; text-decoration: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.form-field { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
.form-field.full { grid-column: 1 / -1; }
.form-field input, .form-field select, .form-field textarea { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; }
.form-field textarea { min-height: 80px; resize: vertical; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.row-action { margin-right: 10px; padding: 0; border: 0; background: none; color: var(--brand-dark); font-weight: 600; }
.management-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.management-grid > *, .split-panel > * { min-width: 0; }
.management-panel h3 { margin: 0 0 10px; font-size: 15px; }
.settings-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; max-width: 900px; }
.settings-field { display: grid; gap: 7px; max-width: 900px; margin-top: 14px; color: var(--muted); }
.settings-grid .settings-field { margin-top: 0; }
.settings-field input, .settings-field select, .settings-field textarea { min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.settings-field textarea { min-height: 100px; resize: vertical; }
.muted { color: var(--muted); }
@media (max-width: 880px) { .sidebar { position: static; width: auto; min-height: auto; padding: 16px; } .sidebar nav { display: flex; gap: 6px; overflow-x: auto; } .sidebar .nav-item { flex: 0 0 auto; white-space: nowrap; } .sidebar-foot { display: none; } .main { margin-left: 0; } .topbar, .content { padding-left: 18px; padding-right: 18px; } .topbar, .top-actions { flex-wrap: wrap; } .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .split-panel { grid-template-columns: 1fr; } .settings-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .page-heading, .panel-heading { display: grid; } .toolbar { flex-wrap: wrap; } .date-control { justify-content: space-between; } .management-grid, .form-grid { grid-template-columns: 1fr; } .form-field.full { grid-column: auto; } .login-box { padding: 28px; } }
