﻿* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif; background: #f4f7f8; color: #17242a; }
body { -webkit-font-smoothing: antialiased; padding-bottom: calc(34px + env(safe-area-inset-bottom)); }
button, input, select { font: inherit; }
button { border: 0; border-radius: 8px; min-height: 44px; padding: 0 14px; background: #e8eef1; color: #12313a; font-weight: 700; }
button.primary { background: #1677ff; color: #fff; width: 100%; }
button.ghost { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.28); }
input, select { width: 100%; height: 44px; border: 1px solid #cfd8dd; border-radius: 8px; padding: 0 12px; background: #fff; outline: none; }
input:focus, select:focus { border-color: #1677ff; box-shadow: 0 0 0 3px rgba(22,119,255,.12); }
.hidden { display: none !important; }
.login-view { min-height: 100vh; padding: 38px 18px 24px; background: linear-gradient(180deg, #12313a 0, #12313a 34%, #f4f7f8 34%); }
.brand { color: #fff; margin: 18px 6px 28px; }
.brand h1 { margin: 0 0 6px; font-size: 32px; letter-spacing: 0; }
.brand p { margin: 0; font-size: 16px; color: #b9d5dd; }
.login-card, .form-card { background: #fff; border: 1px solid #dce4e8; border-radius: 10px; padding: 18px; box-shadow: 0 8px 24px rgba(18,49,58,.08); }
.login-card label { display: block; margin: 12px 0 7px; font-weight: 800; }
.login-card .primary { margin-top: 18px; }
.msg { min-height: 22px; color: #c0392b; font-size: 14px; }
.main-view, .detail-view { min-height: 100vh; }
.topbar, .detail-header { background: #12313a; color: #fff; padding: calc(14px + env(safe-area-inset-top)) 14px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.topbar h1, .detail-header h1 { margin: 0; font-size: 22px; }
.topbar p, .detail-header p { margin: 4px 0 0; color: #b9d5dd; font-size: 13px; }
.toolbar { display: grid; grid-template-columns: 1fr 72px 72px; gap: 10px; padding: 12px; background: #fff; border-bottom: 1px solid #dfe7eb; }
.toolbar.no-create { grid-template-columns: 1fr 72px; }
.toolbar .new-order-btn { background: #12313a; color: #fff; }
.toolbar .new-order-btn.hidden { display: none !important; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 12px; background: #fff; border-bottom: 1px solid #dfe7eb; }
.chips button { min-width: auto; white-space: nowrap; min-height: 36px; padding: 0 12px; background: #eef3f5; }
.chips button.active { background: #12313a; color: #fff; }
.order-list { padding: 12px; display: grid; gap: 10px; }
.order-card { background: #fff; border: 1px solid #dce4e8; border-radius: 10px; padding: 13px; box-shadow: 0 3px 14px rgba(18,49,58,.05); }
.order-card.overdue { border-color: #c62828; background: #fff4f4; }
.order-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.order-no { font-size: 13px; color: #60727a; }
.order-card h2 { margin: 6px 0 4px; font-size: 19px; line-height: 1.25; }
.meta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; margin-top: 10px; font-size: 14px; color: #33464d; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-height: 28px; padding: 0 9px; border-radius: 999px; background: #e8eef1; color: #12313a; font-weight: 800; white-space: nowrap; }
.badge.red { background: #b71c1c; color: #fff; }
.badge.blue { background: #0d6efd; color: #fff; }
.deadline-dots { display: flex; gap: 2px; height: 9px; margin-top: 8px; }
.deadline-dots span { width: 9px; height: 9px; background: #e6ecef; }
.deadline-dots span.hot { background: #c62828; }
.card-progress { margin-top: 10px; display: grid; grid-template-columns: 1fr 42px; gap: 8px; align-items: center; }
.progress-bar { height: 18px; background: #e3e6e8; border: 1px solid #d1d6d9; overflow: hidden; }
.progress-bar span { display: block; height: 100%; width: 0; background: #17b84f; }
.detail-header { justify-content: flex-start; }
.detail-header .ghost { flex: 0 0 70px; }
.attention { margin: 12px; padding: 12px; border-radius: 8px; background: #fff5cc; color: #6a4f0b; font-weight: 800; line-height: 1.5; }
.tabs { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: repeat(4,1fr); background: #fff; border-bottom: 1px solid #dfe7eb; }
.tab { border-radius: 0; background: #fff; border-bottom: 3px solid transparent; min-height: 48px; }
.tab.active { color: #1677ff; border-bottom-color: #1677ff; }
.tab-page { padding: 12px; }
.info-grid { display: grid; gap: 10px; }
.info-row { background: #fff; border: 1px solid #dce4e8; border-radius: 8px; padding: 10px 12px; }
.info-row label { display: block; font-size: 13px; color: #66777e; margin-bottom: 4px; }
.info-row strong { font-size: 17px; line-height: 1.4; word-break: break-word; }
.progress-wrap { display: grid; grid-template-columns: 1fr 70px; gap: 12px; align-items: center; margin-bottom: 12px; }
.progress-wrap .progress-bar { height: 24px; }
.progress-wrap strong { font-size: 18px; }
.process-list { display: grid; gap: 9px; padding-bottom: 74px; }
.process-row { background: #fff; border: 1px solid #dce4e8; border-radius: 10px; padding: 11px; }
.process-row.current { border-color: #1677ff; background: #edf6ff; }
.process-main { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.process-main h2 { margin: 0; font-size: 18px; }
.process-inputs { display: grid; grid-template-columns: 1fr 92px; gap: 8px; margin-bottom: 9px; }
.process-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.process-actions button { color: #fff; }
.need-btn { background: #aeb7bc; }
.need-btn.on { background: #c62828; }
.done-btn { background: #aeb7bc; }
.done-btn.on { background: #178d43; }
.sticky-action { position: fixed; left: 12px; right: 12px; bottom: calc(46px + env(safe-area-inset-bottom)); width: auto !important; box-shadow: 0 8px 22px rgba(0,0,0,.18); }
.icp-footer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; min-height: calc(34px + env(safe-area-inset-bottom)); padding: 7px 12px calc(7px + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: center; background: rgba(18,49,58,.96); border-top: 1px solid rgba(255,255,255,.12); }
.icp-footer a { color: #c9dce2; font-size: 12px; line-height: 20px; text-decoration: none; }
.icp-footer a:active { color: #fff; }
.records { display: grid; gap: 8px; margin-bottom: 12px; }
.record { background: #fff; border: 1px solid #dce4e8; border-radius: 8px; padding: 10px; line-height: 1.45; white-space: pre-wrap; }
.form-card h2 { margin: 0 0 12px; font-size: 18px; }
.form-card input, .form-card select { margin-bottom: 9px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (min-width: 760px) {
  body { max-width: 760px; margin: 0 auto; background: #dde6ea; }
  #app { min-height: 100vh; background: #f4f7f8; }
}
