:root {
  color-scheme: light;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #172033;
  background: #f3f7f8;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: #f3f7f8; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(440px, 100%); padding: 32px; background: #fff; border: 1px solid #dbe5e8; border-radius: 20px; box-shadow: 0 20px 50px #11313c1a; }
.brand { display: flex; gap: 12px; align-items: center; margin-bottom: 24px; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; color: #fff; font-weight: 800; background: linear-gradient(135deg,#0f766e,#2563eb); border-radius: 13px; }
.brand h1 { margin: 0; font-size: 21px; }
.brand p { margin: 4px 0 0; color: #64748b; font-size: 13px; }
.field { display: grid; gap: 7px; margin: 14px 0; color: #334155; font-size: 14px; font-weight: 600; }
input, select, textarea { width: 100%; padding: 10px 12px; color: #172033; background: #fff; border: 1px solid #cbd5e1; border-radius: 9px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: #0f766e; box-shadow: 0 0 0 3px #0f766e1a; }
textarea { min-height: 76px; resize: vertical; }
.primary, .secondary, .danger, .quiet { border: 0; padding: 9px 13px; border-radius: 8px; font-weight: 700; }
.primary { color: #fff; background: #0f766e; }
.primary:hover { background: #0b5f59; }
.secondary { color: #075f58; background: #dff6f2; }
.danger { color: #b42318; background: #fee4e2; }
.quiet { color: #475569; background: #e9eff3; }
.wide { width: 100%; margin-top: 10px; }
.hint { margin: 16px 0 0; padding: 11px 12px; border-radius: 9px; color: #4b5563; background: #f6f8fa; font-size: 12px; line-height: 1.6; }

.page { max-width: 1500px; margin: auto; padding: 18px; }
.topbar { display: flex; justify-content: space-between; gap: 14px; align-items: center; margin-bottom: 18px; padding: 14px 16px; background: #fff; border: 1px solid #dce7e9; border-radius: 15px; }
.topbar .brand { margin: 0; }
.topbar-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.online { display: inline-flex; align-items: center; gap: 6px; color: #166534; font-size: 12px; font-weight: 700; }
.online::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }
.offline { color: #9a3412; }
.offline::before { background: #f97316; }
.queue-badge { color: #92400e; background: #fef3c7; padding: 4px 7px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.notice { margin: 0 0 14px; padding: 11px 14px; border-radius: 10px; color: #075f58; background: #ddf5f1; font-size: 14px; }
.notice.warn { color: #9a3412; background: #ffedd5; }
.layout { display: grid; grid-template-columns: minmax(280px, 360px) 1fr; gap: 18px; align-items: start; }
.panel, .order-card, .metric { background: #fff; border: 1px solid #dce7e9; border-radius: 13px; }
.panel { padding: 17px; }
.panel h2 { margin: 0 0 14px; font-size: 17px; }
.panel p { color: #64748b; font-size: 13px; line-height: 1.6; }
.orders { display: grid; gap: 12px; }
.order-card { padding: 15px; }
.order-head { display: flex; gap: 10px; justify-content: space-between; align-items: start; }
.order-code { margin: 0; font-size: 16px; }
.order-product { margin: 5px 0 0; color: #475569; font-size: 13px; }
.meta-grid { display: grid; grid-template-columns: repeat(4, minmax(100px,1fr)); gap: 9px; margin: 13px 0; }
.meta { padding: 8px; background: #f7fafb; border-radius: 8px; }
.meta span { display: block; color: #708090; font-size: 11px; }
.meta strong { display: block; margin-top: 3px; font-size: 13px; overflow-wrap: anywhere; }
.status { display: inline-flex; white-space: nowrap; padding: 4px 8px; color: #075f58; background: #dff6f2; border-radius: 999px; font-size: 12px; font-weight: 700; }
.status.done { color: #166534; background: #dcfce7; }
.status.issue { color: #b42318; background: #fee4e2; }
.status.wait { color: #9a6700; background: #fef3c7; }
.route { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: #475569; font-size: 12px; }
.route span { padding: 4px 7px; background: #eef4f6; border-radius: 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.actions button { padding: 7px 10px; font-size: 12px; }
.empty { padding: 42px 16px; text-align: center; color: #64748b; background: #fff; border: 1px dashed #bdcdd3; border-radius: 12px; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.metric { padding: 14px; }
.metric span { color: #64748b; font-size: 12px; }
.metric strong { display: block; margin-top: 6px; font-size: 25px; }
.issue { margin-top: 10px; padding: 8px 10px; color: #9f1239; background: #fff1f2; border-radius: 8px; font-size: 12px; }
.muted { color: #64748b; font-size: 12px; }

@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } .side-panel { order: 2; } .meta-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .page { padding: 10px; } .topbar { align-items: flex-start; flex-direction: column; } .topbar-actions { justify-content: flex-start; } .metrics { grid-template-columns: repeat(2, 1fr); } .login-card { padding: 23px; } }
