:root { color-scheme: light; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif; color: #203334; background: #f5f7f8; font-synthesis: none; --accent: #0e7167; --accent-light: #e7f4f1; --line: #dde5e6; --muted: #637679; --danger: #b63835; --warning: #875b0b; }
* { box-sizing: border-box; letter-spacing: 0; }
body { margin: 0; font-size: 14px; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
button, input, select, textarea { border-radius: 6px; }
button:focus-visible, a:focus-visible { outline: 3px solid #5ac1b6; outline-offset: 3px; }
input:focus, textarea:focus, select:focus { outline: 2px solid #0e7167; outline-offset: 1px; }
input, textarea, select { color: #203334; background: #fff; border: 1px solid #b9cacc; min-width: 0; max-width: 100%; }
input, select { min-height: 46px; padding: 10px 12px; }
textarea { padding: 11px 12px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #7b8b8d; }
a { color: var(--accent); text-decoration: none; }
button { touch-action: manipulation; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 22px; line-height: 1.4; margin-bottom: 6px; }
h2 { font-size: 18px; line-height: 1.4; margin-bottom: 12px; }
h3 { font-size: 15px; margin-bottom: 6px; }
svg { width: 20px; height: 20px; flex: 0 0 auto; stroke-width: 1.8; }
.app-header { position: sticky; top: 0; z-index: 20; min-height: 78px; padding: 14px max(18px, calc((100% - 920px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.97); }
.brand { display: flex; gap: 11px; align-items: center; min-width: 0; color: inherit; }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; background: var(--accent); color: #fff; border-radius: 7px; flex: 0 0 auto; }
.brand-mark svg { width: 26px; height: 26px; }
.brand strong { font-size: 17px; font-weight: 750; display: block; }
.brand small { color: var(--muted); font-size: 11px; display: block; }
.header-actions { display: flex; gap: 4px; }
.icon-button { background: transparent; border: 1px solid transparent; min-height: 44px; width: 44px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; color: #496368; }
.icon-button:hover { background: #ecf2f3; }
#main { max-width: 956px; margin: 0 auto; padding: 24px 18px 108px; outline: 0; }
.page-heading { display: flex; align-items: flex-start; gap: 12px; justify-content: space-between; margin-bottom: 20px; }
.page-heading > div { min-width: 0; }
.page-heading p { color: var(--muted); margin-bottom: 0; font-size: 12px; overflow-wrap: anywhere; }
.page-heading .icon-button { margin-top: -3px; }
.heading-with-back { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.heading-with-back > div { min-width: 0; }
.heading-with-back > button { margin-left: -10px; }
.heading-with-back h1 { font-size: 19px; overflow-wrap: anywhere; }
.button { min-height: 46px; padding: 11px 17px; border: 1px solid var(--accent); color: #fff; background: var(--accent); display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 650; text-align: center; overflow-wrap: anywhere; }
.button:hover:not(:disabled) { background: #0b6057; border-color: #0b6057; }
.button.secondary { background: #fff; color: var(--accent); border-color: #bbd1cf; }
.button.secondary:hover:not(:disabled) { background: #eaf5f2; }
.button.compact { min-height: 42px; padding: 9px 13px; }
.button.danger { color: var(--danger); background: #fff; border-color: #e3c1bf; }
.button.neutral { color: #425d63; background: #fff; border-color: #c3d1d3; }
.button.text { padding: 8px 0; background: transparent; color: var(--accent); border-color: transparent; }
.full-width { width: 100%; }
.login-layout { max-width: 420px; margin: 34px auto 0; }
.login-layout h1 { font-size: 25px; margin-bottom: 27px; }
.login-eyebrow { color: var(--accent); font-size: 12px; margin: 0 0 10px; font-weight: 700; }
.login-form { display: grid; gap: 20px; }
.field { display: grid; gap: 8px; color: #3d5559; font-size: 13px; font-weight: 600; min-width: 0; }
.field input, .field textarea { width: 100%; font-size: 16px; font-weight: 400; }
.password-field { position: relative; }
.password-field input { padding-right: 50px; }
.password-field .icon-button { position: absolute; top: 1px; right: 1px; }
.form-error { color: var(--danger); background: #fff0ef; padding: 11px 12px; margin: 0; font-size: 13px; overflow-wrap: anywhere; border-left: 3px solid var(--danger); }
.search-form { display: flex; gap: 8px; margin-bottom: 18px; }
.search-input { display: flex; align-items: center; position: relative; flex: 1; min-width: 0; }
.search-input > svg { position: absolute; left: 12px; color: #6d8386; pointer-events: none; width: 18px; }
.search-input input { width: 100%; padding-left: 39px; background: #fff; font-size: 15px; }
.list-meta { display: flex; align-items: center; justify-content: space-between; min-height: 32px; margin-bottom: 6px; font-size: 12px; color: var(--muted); gap: 10px; }
.record-list { border-top: 1px solid var(--line); }
.record-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 17px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; border-radius: 0; color: inherit; }
.record-row > .record-content { flex: 1; min-width: 0; }
.record-row > svg { color: #71888a; width: 18px; }
.record-row:hover { background: #ecf4f2; }
.record-title { font-size: 15px; font-weight: 650; display: block; overflow-wrap: anywhere; }
.record-sub { color: var(--muted); font-size: 12px; margin-top: 4px; display: block; overflow-wrap: anywhere; }
.record-kicker { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.heading-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.row-avatar { width: 40px; height: 40px; background: #e7edef; display: grid; place-items: center; border-radius: 6px; color: #4d737a; flex-shrink: 0; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; color: #52696e; background: #e8eff1; border-radius: 4px; font-size: 11px; white-space: nowrap; }
.badge.success { color: #096451; background: #dcf0e6; }
.badge.warning { color: var(--warning); background: #fff1ce; }
.badge.danger { color: var(--danger); background: #fbe7e5; }
.load-more { margin: 20px auto 0; display: flex; }
.empty-state { text-align: center; padding: 48px 15px; color: var(--muted); }
.empty-state > svg { width: 34px; height: 34px; stroke-width: 1.3; color: #8aa2a5; margin-bottom: 12px; }
.empty-state p { margin-bottom: 14px; }
.empty-state .button { margin: 0 auto; }
.initial-loading { min-height: 250px; }
.bottom-nav { position: fixed; bottom: 0; z-index: 30; left: 0; right: 0; display: flex; justify-content: center; padding-bottom: env(safe-area-inset-bottom, 0px); background: rgba(255,255,255,.98); border-top: 1px solid var(--line); }
.bottom-nav button { border: 0; border-radius: 0; background: transparent; flex: 1; max-width: 460px; min-height: 65px; color: #6c8185; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; font-size: 11px; }
.bottom-nav button.active { color: var(--accent); font-weight: 700; box-shadow: inset 0 3px 0 var(--accent); }
.bottom-nav button svg { width: 21px; height: 21px; }
.filter-row { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; }
.filter-row select { flex: 1; }
.customer-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; padding: 17px 0 21px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.customer-details dt { color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.customer-details dd { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.section-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin: 24px 0 10px; }
.section-heading h2 { margin: 0; font-size: 16px; }
.metric-band { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 16px 0; gap: 14px; margin-bottom: 20px; }
.metric-band > div { min-width: 0; }
.metric-band dt { color: var(--muted); font-size: 11px; margin: 0 0 2px; }
.metric-band dd { margin: 0; font-size: 25px; font-weight: 720; line-height: 1.25; overflow-wrap: anywhere; }
.metric-band .warning dd { color: #93660d; }
.capture-panel { background: #fff; border: 1px solid #cddcde; padding: 15px; border-radius: 7px; }
.capture-toolbar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.manual-form { display: grid; grid-template-columns: minmax(0, 1fr) 83px; gap: 10px; }
.selected-product { grid-column: 1 / -1; min-height: 42px; padding: 11px 12px; border: 1px solid #cddcde; border-radius: 5px; background: #f5f9f8; color: var(--muted); overflow-wrap: anywhere; }
.selected-product:not(:empty) { color: var(--ink); font-weight: 650; }
.manual-form .button { grid-column: 1 / -1; }
.manual-form input { padding: 10px; }
.scanner { position: relative; margin-bottom: 15px; aspect-ratio: 4 / 3; background: #14282a; border-radius: 5px; overflow: hidden; }
.scanner video { display: block; width: 100%; height: 100%; object-fit: cover; }
.scan-guide { position: absolute; width: 75%; height: 42%; border: 2px solid #fff; top: 29%; left: 12.5%; pointer-events: none; box-shadow: 0 0 0 100px rgba(0,0,0,.12); border-radius: 5px; }
.scanner .scan-stop { position: absolute; top: 8px; right: 8px; color: #fff; background: #183237cc; }
.scanner-status { position: absolute; bottom: 9px; left: 0; right: 0; text-align: center; font-size: 12px; color: #fff; text-shadow: 0 1px 2px #000; }
.capture-message { margin: 12px 0 0; font-size: 12px; color: var(--accent); min-height: 20px; overflow-wrap: anywhere; }
.task-actions { display: flex; gap: 10px; margin: 15px 0 24px; }
.task-actions .button { flex: 1; }
.task-actions .icon-button { border: 1px solid #bcced0; background: #fff; min-height: 46px; width: 46px; }
.detail-tabs { display: flex; border-bottom: 1px solid #bcced0; margin-top: 22px; gap: 0; overflow-x: auto; }
.detail-tabs button { flex: 1; border-radius: 0; border: 0; background: transparent; color: #657b7e; min-height: 45px; padding: 9px 11px; border-bottom: 3px solid transparent; white-space: nowrap; font-size: 13px; }
.detail-tabs button.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 700; }
.stock-row { display: flex; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: center; }
.stock-row > div:first-child { min-width: 0; }
.stock-row strong { font-size: 14px; overflow-wrap: anywhere; }
.stock-row .quantity { font-size: 19px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stock-row small { color: var(--muted); font-size: 11px; margin-left: 2px; }
.stock-row .button { flex: 0 0 auto; font-size: 12px; }
.stock-row .amount { text-align: right; flex-shrink: 0; }
.stock-row .amount .record-sub { font-size: 11px; }
.quantity-edit { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.quantity-edit input { width: 78px; padding: 9px 7px; text-align: right; }
.quantity-edit .icon-button { width: 36px; height: 36px; border: 1px solid #bcced0; background: #fff; }
.record-note { color: #51666b; white-space: pre-wrap; overflow-wrap: anywhere; border-left: 3px solid #91afae; padding: 8px 12px; margin-top: 18px; font-size: 13px; }
.network-banner { background: #fff0ce; color: #805a12; padding: 8px 18px; text-align: center; font-size: 12px; }
.pending-banner { max-width: 956px; margin: 14px auto 0; padding: 12px 18px; background: #fff0ce; color: #79500e; display: flex; gap: 15px; justify-content: space-between; align-items: center; }
.pending-banner > div { min-width: 0; }
.pending-banner strong, .pending-banner span { display: block; font-size: 12px; overflow-wrap: anywhere; }
.pending-banner .button { flex-shrink: 0; border-color: #79500e; background: transparent; color: #79500e; }
.toast { position: fixed; left: 50%; bottom: calc(83px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 100; background: #213b3b; color: #fff; padding: 11px 16px; border-radius: 6px; width: max-content; max-width: calc(100% - 36px); box-shadow: 0 4px 20px #17333320; font-size: 13px; overflow-wrap: anywhere; }
.toast.error { background: #a23431; }
.sheet-dialog { width: min(480px, calc(100% - 24px)); max-height: calc(100dvh - 40px); border: 1px solid var(--line); border-radius: 8px; padding: 19px; box-shadow: 0 15px 60px #183c3e33; color: inherit; overflow-y: auto; }
.sheet-dialog::backdrop { background: #142d3066; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -6px -6px 18px 0; }
.dialog-heading h2 { margin: 0; font-size: 18px; }
.account-details { margin-bottom: 23px; }
.account-details strong { font-size: 18px; }
.account-details p { font-size: 13px; color: var(--muted); margin: 6px 0; }
.share-help { color: var(--muted); font-size: 13px; line-height: 1.6; margin: -4px 0 12px; }
.share-link { display: block; width: 100%; min-height: 92px; box-sizing: border-box; resize: vertical; border: 1px solid var(--line); border-radius: 6px; padding: 10px; color: #28494b; background: #f7fbfb; font: inherit; font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; margin-bottom: 12px; }
.product-results { min-height: 80px; max-height: 52dvh; overflow-y: auto; }
.product-results .record-row { padding: 13px 0; }
.product-results .record-title { font-size: 14px; }
.submit-summary { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0 20px; }
.submit-summary > span { color: var(--muted); font-size: 12px; }
.submit-summary strong { color: #203334; display: block; font-size: 20px; }
#submitForm { display: grid; gap: 19px; }
.file-input { display: flex; gap: 9px; align-items: center; justify-content: center; min-height: 70px; border: 1px dashed #91aaa9; color: var(--accent); position: relative; border-radius: 6px; font-size: 14px; cursor: pointer; }
.file-input input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.import-preview { margin: 16px 0; }
.import-preview .field { margin-bottom: 15px; }
.import-preview select { width: 100%; }
.import-preview table { width: 100%; font-size: 12px; border-collapse: collapse; }
.import-preview td, .import-preview th { padding: 9px 5px; border-bottom: 1px solid var(--line); text-align: left; overflow-wrap: anywhere; }
.import-preview th { color: var(--muted); font-weight: 500; }
.import-preview .record-sub { margin-bottom: 10px; }
.comparison-summary { display: flex; gap: 15px; flex-wrap: wrap; padding: 16px 0; color: #537176; font-size: 12px; border-bottom: 1px solid var(--line); }
.diff-positive { color: #ab6e0b; }
.diff-negative { color: var(--danger); }
.notice { font-size: 12px; padding: 12px; border-left: 3px solid #a4babd; background: #edf2f3; margin-top: 16px; color: #526b70; overflow-wrap: anywhere; }
.noscript-message { padding: 24px; text-align: center; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (min-width: 700px) { #main { padding-top: 30px; } .capture-panel { padding: 20px; } .task-workspace { display: grid; grid-template-columns: minmax(270px, .9fr) minmax(0, 1.3fr); gap: 32px; align-items: start; } .task-workspace .detail-tabs { margin-top: 0; } .manual-form { grid-template-columns: minmax(0, 1fr) 85px; } .record-row { padding: 19px 10px; } }
@media (max-width: 359px) { .app-header { padding-left: 12px; padding-right: 12px; } #main { padding-left: 12px; padding-right: 12px; } .brand strong { font-size: 15px; } .brand-mark { width: 35px; height: 35px; } .header-actions { gap: 0; } .header-actions .icon-button { width: 39px; } .capture-panel { padding: 12px; } .detail-tabs button { font-size: 12px; padding-inline: 8px; } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } }
