:root { --green:#15665f; --ink:#14232e; --muted:#5b6b78; --line:#d9e0e6; --bg:#f4f6f8; --card:#fff; --warn-bg:#fff8e6; --warn:#7a4b00; --bad:#b42318; }
* { box-sizing:border-box; }
html { -webkit-text-size-adjust:100%; }
body { margin:0; background:var(--bg); color:var(--ink); font:16px/1.45 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; }
#app { max-width:640px; margin:auto; padding:14px 14px calc(92px + env(safe-area-inset-bottom)); }
h1 { font-size:24px; margin:4px 0 12px; } h2 { font-size:17px; margin:0 0 8px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:14px; padding:14px; margin-bottom:12px; }
.row { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.grid2 { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
label.field { display:grid; gap:4px; font-size:14px; font-weight:600; margin-bottom:10px; min-width:0; }
input,select,textarea { width:100%; min-height:46px; padding:10px; border:1px solid #aab6c0; border-radius:9px; background:#fff; color:var(--ink); font:inherit; }
textarea { min-height:70px; resize:vertical; }
input:focus-visible,select:focus-visible,textarea:focus-visible,button:focus-visible { outline:3px solid #6fb7ae; outline-offset:1px; }
label.check { display:flex; gap:10px; align-items:center; font-weight:600; min-height:44px; margin-bottom:6px; }
label.check input { width:22px; min-height:22px; height:22px; }
button { min-height:48px; padding:0 16px; border:1px solid var(--line); border-radius:10px; background:#fff; color:var(--ink); font:600 15px system-ui,sans-serif; cursor:pointer; }
button.primary { background:var(--green); border-color:var(--green); color:#fff; }
button.link { border:0; background:none; color:var(--green); padding:0; min-height:40px; }
.actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; } .actions.one { grid-template-columns:1fr; }
.line { border:1px solid var(--line); border-radius:11px; padding:10px; margin-bottom:10px; }
.line-row { display:grid; grid-template-columns:72px 1fr; gap:8px; }
.line-foot { display:flex; justify-content:space-between; align-items:center; font-size:14px; color:var(--muted); }
.sum div { display:flex; justify-content:space-between; padding:3px 0; } .sum .big { font-size:21px; font-weight:800; color:var(--green); border-top:1px solid var(--line); margin-top:6px; padding-top:8px; }
.sum small { color:var(--muted); }
.notes { background:var(--warn-bg); color:var(--warn); border:1px solid #f1d58a; border-radius:11px; padding:10px 12px; font-size:14px; margin-bottom:12px; }
.notes ul { margin:4px 0 0; padding-left:18px; }
.error { color:var(--bad); font-weight:700; min-height:0; margin:0 0 8px; } .error:empty { display:none; }
.item { display:block; width:100%; text-align:left; padding:12px 14px; min-height:64px; margin-bottom:8px; border-radius:12px; }
.item .row { font-weight:700; } .item small { color:var(--muted); font-weight:400; }
.pill { font-size:12px; font-weight:700; padding:2px 8px; border-radius:99px; background:#e6edf2; } .pill.issued,.pill.saved { background:#d8f3e5; color:#075e3c; } .pill.void { background:#fde4e1; color:var(--bad); }
.tabs { position:fixed; left:0; right:0; bottom:0; display:grid; grid-template-columns:repeat(4,1fr); background:#fff; border-top:1px solid var(--line); padding-bottom:env(safe-area-inset-bottom); z-index:5; }
.tabs button { border:0; background:none; border-radius:0; min-height:62px; font-size:13px; color:var(--muted); padding:0 2px; } .tabs button.on { color:var(--green); font-weight:800; }
.banner { background:#e7f5f2; border:1px solid #a7d8d2; border-radius:10px; padding:8px 12px; margin-bottom:10px; font-size:14px; }
.login { max-width:400px; margin:9vh auto 0; } .brand { font-weight:800; color:var(--green); font-size:22px; margin-bottom:12px; }
.sheet { background:#fff; border:1px solid var(--line); border-radius:12px; padding:18px; margin-bottom:12px; font-size:14px; overflow-wrap:anywhere; }
.sheet h2 { font-size:21px; margin:0; } .sheet .parties { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin:14px 0; white-space:pre-line; }
.sheet table { width:100%; border-collapse:collapse; margin:10px 0; } .sheet th,.sheet td { text-align:left; padding:6px 3px; border-bottom:1px solid var(--line); vertical-align:top; } .sheet .num { text-align:right; white-space:nowrap; }
.sheet .statement { background:#eef2ff; padding:9px; border-radius:8px; margin-top:10px; font-weight:600; }
.tile { font-size:14px; color:var(--muted); } .tile strong { display:block; font-size:21px; color:var(--ink); }
.muted { color:var(--muted); font-size:14px; }
.linkbox { word-break:break-all; font-size:13px; background:#f0f3f5; padding:8px; border-radius:8px; margin:8px 0; }
@media print {
  body { background:#fff; } #app { max-width:none; padding:0; }
  .tabs,.no-print { display:none!important; } .sheet { border:0; padding:0; }
}
