@charset "UTF-8";
:root { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; color: #233c34; background: #f7f8f4; font-synthesis: none; --green: #226656; --muted: #738078; --line: #e2e8e0; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, input, select { font: inherit; }
button { cursor: pointer; touch-action: manipulation; }
button, input, select { -webkit-tap-highlight-color: transparent; }
button:disabled { opacity: .45; cursor: not-allowed; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #8cbaa5; outline-offset: 3px; }
svg { width: 22px; height: 22px; flex-shrink: 0; }
h1, h2, p { margin: 0; }
button { border: 0; }
.app-header { max-width: 860px; margin: auto; padding: 25px 30px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 19px; font-weight: 700; letter-spacing: .5px; display: flex; align-items: center; gap: 11px; }
.brand-mark { width: 36px; height: 38px; border-radius: 10px 10px 10px 3px; display: grid; place-items: center; color: #fffdf6; background: var(--green); font-size: 19px; }
.local-badge { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 20px; color: #65786b; font-size: 12px; background: #fff9; }
.local-badge > span { width: 6px; height: 6px; background: #719b79; border-radius: 50%; }
main { max-width: 800px; margin: 27px auto 0; outline: none; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 30px; }
.eyebrow { font-size: 12px; color: var(--muted); letter-spacing: 2px; margin-bottom: 12px; }
h1 { font-size: 30px; font-weight: 650; letter-spacing: 1px; }
.subtitle { font-size: 14px; line-height: 1.7; color: var(--muted); margin-top: 10px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 10px 17px; border-radius: 10px; font-size: 14px; font-weight: 550; line-height: 1.5; flex-shrink: 0; }
.button svg { width: 18px; height: 18px; }
.primary { color: white; background: var(--green); box-shadow: 0 3px 8px #22665612; }
.secondary { color: var(--green); background: white; border: 1px solid #d5e0d6; }
.soft { color: var(--green); background: #ecf4ee; }
.quiet { color: #627169; background: transparent; }
.text-danger { color: #9d665c; background: transparent; }
.danger { color: white; background: #a3483f; }
.filter-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 20px 22px; background: #eef1e9; border-radius: 14px; }
.filter-bar label { color: #657264; font-size: 12px; display: grid; gap: 8px; }
select, input[type="text"] { width: 100%; min-width: 0; background: #fff; color: #2b4338; border: 1px solid #dce4d9; border-radius: 9px; min-height: 46px; padding: 11px 12px; font-size: 16px; }
select { padding-right: 30px; text-overflow: ellipsis; }
input::placeholder { color: #9aa39d; }
.list-heading { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin: 27px 2px 12px; }
.list-heading > span:first-child { color: #556b5c; font-weight: 600; }
.record-list { display: grid; gap: 14px; }
.record-card { background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 21px 22px 10px; box-shadow: 0 3px 9px #253c3403; }
.record-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.customer-identity { display: flex; align-items: center; gap: 11px; min-width: 0; }
.customer-identity > div { min-width: 0; }
.avatar { display: grid; place-items: center; width: 39px; height: 39px; background: #f2f0e7; color: #867c59; border-radius: 12px; font-size: 16px; flex-shrink: 0; }
.record-card h2 { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
time { display: block; margin-top: 4px; font-size: 11px; color: #8a948d; }
.status { display: inline-flex; align-items: center; gap: 5px; border-radius: 6px; padding: 5px 9px; font-size: 12px; white-space: nowrap; }
.status svg { width: 13px; height: 13px; }
.unpaid { color: #987133; background: #fbf3e2; }
.paid { color: #577a66; background: #edf4ee; }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.record-detail { display: flex; justify-content: space-between; gap: 14px; margin: 20px 0; align-items: center; }
.record-detail > div { min-width: 0; }
.product-name { font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.calculation { margin-top: 5px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.record-amount { font-size: 21px; font-weight: 600; font-variant-numeric: tabular-nums; flex-shrink: 0; overflow-wrap: anywhere; max-width: 57%; }
.record-actions { display: flex; justify-content: space-between; border-top: 1px solid #edf0eb; padding-top: 9px; gap: 10px; }
.record-actions .button { font-size: 13px; min-height: 44px; padding: 8px 12px; }
.empty-state { text-align: center; padding: 64px 20px 53px; background: #fff9; border: 1px dashed #dce3d7; border-radius: 16px; margin-top: 22px; }
.empty-art { width: 82px; height: 88px; background: #edf2e8; border: 7px solid #f5f7f0; border-radius: 24px 24px 24px 6px; margin: 0 auto 24px; display: grid; place-items: center; transform: rotate(-5deg); color: #7f9c80; }
.empty-art svg { width: 40px; height: 40px; stroke-width: 1.2; }
.empty-state h2 { font-size: 18px; font-weight: 600; line-height: 1.6; }
.empty-state p { font-size: 13px; color: var(--muted); line-height: 1.8; margin: 9px auto 23px; max-width: 310px; }
.setup-actions { display: flex; justify-content: center; gap: 10px; }
.directory-list { background: white; border: 1px solid var(--line); border-radius: 15px; padding: 0 21px; }
.directory-row { display: flex; align-items: center; gap: 14px; padding: 21px 0; }
.directory-row + .directory-row { border-top: 1px solid #edf0eb; }
.directory-icon { display: grid; place-items: center; color: #6c8871; background: #f0f4ec; border-radius: 11px; width: 44px; height: 44px; flex-shrink: 0; }
.directory-icon.person { color: #867c59; background: #f4f1e7; }
.directory-info { flex: 1; min-width: 0; }
.directory-info h2 { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.directory-info p { margin-top: 6px; font-size: 14px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.price-label, .muted { color: var(--muted); font-size: 12px !important; }
.directory-actions { display: flex; flex-shrink: 0; gap: 4px; }
.directory-actions .button { padding: 10px; font-size: 13px; }
.directory-tip { font-size: 12px; color: var(--muted); margin: 17px 3px; line-height: 1.7; }
.storage-note { max-width: 800px; margin: 28px auto 125px; font-size: 11px; line-height: 1.9; color: #859086; text-align: center; padding: 0 22px; }
.bottom-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 860px; display: grid; grid-template-columns: repeat(3, 1fr); background: #fffffff5; border: 1px solid #e3e8df; border-bottom: 0; border-radius: 18px 18px 0 0; padding: 9px 28px calc(9px + env(safe-area-inset-bottom)); backdrop-filter: blur(16px); z-index: 5; box-shadow: 0 -5px 24px #314e3505; }
.bottom-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 7px; min-height: 56px; color: #89948c; background: transparent; font-size: 12px; border-radius: 12px; }
.bottom-nav button[aria-current="page"] { color: var(--green); background: #edf4ec; font-weight: 650; }
dialog { width: min(480px, calc(100% - 32px)); max-height: calc(100dvh - 40px); padding: 27px; border: 1px solid #dce5da; border-radius: 20px; color: #233c34; box-shadow: 0 25px 100px #142d3430; overflow: auto; }
dialog::backdrop { background: #19382e66; backdrop-filter: blur(3px); }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 25px; }
.dialog-heading h2 { font-size: 22px; font-weight: 650; line-height: 1.6; }
.dialog-heading p { color: var(--muted); font-size: 13px; line-height: 1.8; margin-top: 5px; }
.icon-button { display: grid; place-items: center; background: #f3f5ef; border-radius: 50%; width: 44px; height: 44px; flex-shrink: 0; color: #65776b; }
.icon-button svg { width: 19px; height: 19px; }
.field { display: grid; gap: 9px; font-size: 14px; margin-bottom: 20px; font-weight: 550; }
.field-hint { font-size: 12px; color: var(--muted); font-weight: 400; }
.form-actions { display: grid; grid-template-columns: 1fr 1.6fr; gap: 12px; margin-top: 25px; }
.form-actions .button { width: 100%; min-height: 47px; }
.amount-preview { background: #f2f5ed; padding: 17px; border-radius: 12px; margin: 2px 0 22px; }
.amount-preview > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 13px; color: #73806e; }
.amount-preview > div + div { margin-top: 14px; }
.amount-preview output { color: #284c39; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; min-width: 0; }
#total-price { font-size: 24px; font-weight: 650; }
.amount-preview p { font-size: 11px; margin-top: 12px; color: #82917b; line-height: 1.7; }
.amount-preview p.invalid { color: #a3483f; }
.paid-field { padding: 0; border: 0; margin: 0; }
.paid-field legend { font-size: 14px; margin-bottom: 11px; font-weight: 550; }
.paid-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.paid-options label { display: flex; align-items: center; gap: 9px; background: #fff; border: 1px solid #dce4d9; border-radius: 9px; padding: 12px; min-height: 46px; font-size: 14px; cursor: pointer; }
.paid-options label:has(input:checked) { background: #eef5ee; border-color: #91ac93; color: #226656; }
input[type="radio"] { accent-color: var(--green); width: 17px; height: 17px; margin: 0; }
.delete-detail { border-radius: 10px; background: #f7f3ee; padding: 15px; font-size: 16px; overflow-wrap: anywhere; }
.delete-note { color: var(--muted); font-size: 13px; line-height: 1.9; margin-top: 16px; }
.form-error, .error-banner { color: #963f37; background: #fff1ec; border-radius: 10px; padding: 13px 15px; font-size: 13px; line-height: 1.8; }
.form-error { margin-top: 17px; }
.error-banner { margin-bottom: 18px; }
.read-error { padding: 27px; border: 1px solid #efd7cb; border-radius: 14px; background: #fff9f4; }
.read-error h2 { font-size: 19px; }
.read-error p { margin: 14px 0 20px; color: #8e6051; line-height: 1.9; font-size: 14px; }
.prerequisites { display: grid; gap: 14px; }
.prerequisites > div { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: #f4f6ef; border-radius: 10px; padding: 13px; }
.prerequisites span { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.prerequisites svg { width: 19px; height: 19px; color: #79917a; }
.prerequisites .button { font-size: 13px; padding: 9px 11px; }
#toast { position: fixed; left: 50%; bottom: calc(99px + env(safe-area-inset-bottom)); transform: translate(-50%, 10px); max-width: calc(100% - 40px); background: #244f40; color: white; border-radius: 11px; font-size: 13px; padding: 13px 20px; text-align: center; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; z-index: 20; }
#toast.visible { opacity: 1; transform: translate(-50%, 0); }
noscript { display: block; padding: 24px; text-align: center; }
@media (hover: hover) { .primary:hover { background: #195244; } .secondary:hover, .quiet:hover { background: #f1f5ed; } .text-danger:hover { background: #faf1ed; } .soft:hover { background: #dfeddf; } }
@media (max-width: 880px) { main { margin: 24px 24px 0; } .app-header { padding: 23px 24px; } }
@media (max-width: 520px) {
  .app-header { padding: 20px; }
  .brand { font-size: 17px; gap: 9px; }
  .brand-mark { width: 32px; height: 34px; font-size: 17px; }
  main { margin: 19px 20px 0; }
  .page-heading { align-items: flex-start; flex-wrap: wrap; gap: 18px; margin-bottom: 23px; }
  .page-heading > div { flex: 1; min-width: 155px; }
  .page-heading > .button { margin-top: 26px; padding: 10px 13px; }
  h1 { font-size: 26px; }
  .eyebrow { font-size: 10px; letter-spacing: 1.2px; margin-bottom: 10px; }
  .subtitle { font-size: 12px; margin-top: 8px; max-width: 210px; }
  .filter-bar { gap: 12px; padding: 16px; border-radius: 12px; }
  .filter-bar select { font-size: 14px; }
  .empty-state { padding: 46px 15px 36px; }
  .empty-state h2 { font-size: 17px; }
  .empty-state p { font-size: 12px; }
  .record-card { padding: 17px 16px 9px; }
  .record-amount { font-size: 19px; }
  .record-detail { margin: 19px 0; }
  .directory-list { padding: 0 15px; }
  .directory-row { gap: 10px; padding: 18px 0; flex-wrap: wrap; }
  .directory-icon { width: 38px; height: 40px; }
  .directory-info { flex-basis: 100px; }
  .directory-info h2 { font-size: 15px; }
  .directory-actions { gap: 0; }
  .directory-actions .button { padding: 10px 8px; }
  .storage-note { margin: 24px 0 116px; text-align: left; padding: 0 23px; font-size: 10px; }
  .bottom-nav { padding-left: 17px; padding-right: 17px; border-radius: 16px 16px 0 0; }
  dialog { padding: 23px 21px; }
}
@media (max-width: 350px) {
  main { margin-left: 14px; margin-right: 14px; }
  .app-header { padding-left: 14px; padding-right: 14px; }
  .page-heading > div { min-width: 145px; }
  .page-heading > .button { padding: 10px; font-size: 12px; }
  .filter-bar { padding: 12px; gap: 9px; }
  .record-detail { align-items: flex-start; flex-direction: column; gap: 10px; }
  .record-amount { align-self: flex-end; max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
