@font-face { font-family: Montserrat; font-weight: 400; src: url(fonts/montserrat-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: Montserrat; font-weight: 600; src: url(fonts/montserrat-latin-600-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: Montserrat; font-weight: 700; src: url(fonts/montserrat-latin-700-normal.woff2) format("woff2"); font-display: swap; }
:root { --navy: #1C4587; --gold: #FBBC04; --goldfill: #FFD966; --gray: #EFEFEF; --red: #D00000; --ink: #111; --muted: #595959; --line: #BFBFBF; }
* { box-sizing: border-box; }
html, body { margin: 0; background: #fff; color: var(--ink); font: 15px/1.4 Montserrat, Arial, sans-serif; -webkit-tap-highlight-color: transparent; }
.top { background: var(--navy); padding: 12px 14px calc(12px) 14px; padding-top: max(12px, env(safe-area-inset-top)); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.logo { height: 30px; width: auto; max-width: 62vw; }
.sync { color: #fff; font-size: 11px; font-weight: 600; border: 1px solid rgba(255,255,255,.4); border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.sync[data-s="synced"]::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #5BD97A; margin-right: 6px; }
.sync[data-s="error"], .sync[data-s="signedout"] { background: #fff; color: var(--red); }
.tabs { display: flex; background: var(--gray); position: sticky; top: 0; z-index: 5; border-bottom: 2px solid var(--navy); }
.tabs button { flex: 1; border: 0; background: none; padding: 12px 4px; font: 600 13px Montserrat, Arial; color: var(--navy); }
.tabs button.on { background: var(--navy); color: var(--gold); }
main { padding: 12px 12px 110px; max-width: 760px; margin: 0 auto; }
.bar { background: var(--navy); color: var(--gold); font-weight: 700; font-size: 12.5px; letter-spacing: .5px; text-align: center; padding: 6px 8px; margin: 18px 0 10px; }
main > .bar:first-child { margin-top: 4px; }
.row { display: flex; align-items: center; } .wrap { flex-wrap: wrap; } .gap { gap: 8px; } .grow { flex: 1; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
@media (max-width: 380px) { .grid2 { grid-template-columns: 1fr; } }
.fld { display: flex; flex-direction: column; gap: 3px; flex: 1 1 100%; min-width: 0; margin: 4px 0; }
.fld.sm { flex: 1 1 130px; } .fld.xs { flex: 0 0 90px; margin: 0; }
.fld span { font-size: 11.5px; font-weight: 700; color: var(--navy); }
.fld input, .fld select, .fld textarea { font: 16px Montserrat, Arial; padding: 9px 10px; border: 1px solid var(--line); border-bottom: 2px solid var(--navy); border-radius: 4px; background: #fff; width: 100%; color: var(--ink); }
.fld.hl input { background: #FFF8DD; border-color: var(--gold); border-bottom-color: var(--navy); font-weight: 700; }
.chk { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--navy); font-weight: 600; }
.chk input { width: 20px; height: 20px; accent-color: var(--navy); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 14px; border: 1.5px solid var(--navy); background: #fff; color: var(--navy); font: 700 14px Montserrat, Arial; border-radius: 6px; text-decoration: none; cursor: pointer; }
.btn.primary { background: var(--navy); color: #fff; } .btn.gold { background: var(--goldfill); border-color: var(--gold); color: var(--ink); }
.btn.sm { min-height: 38px; padding: 6px 10px; font-size: 13px; } .btn.danger { color: var(--red); border-color: var(--red); }
.btn.link { border: 0; background: none; padding: 4px 0; min-height: 30px; text-decoration: underline; font-weight: 600; font-size: 13px; }
.btn[disabled] { opacity: .45; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.muted { color: var(--muted); font-size: 12.5px; } .small { font-size: 12px; } .center { text-align: center; } .red { color: var(--red); }
.cathead { background: var(--navy); color: var(--gold); font-weight: 700; font-size: 13px; letter-spacing: .6px; text-transform: uppercase; margin: 16px -12px 2px; padding: 9px 14px; border-left: 6px solid var(--gold); }
.item { display: flex; align-items: center; gap: 8px; padding: 8px 2px; border-bottom: 1px solid #E3E3E3; flex-wrap: nowrap; }
.item-txt { flex: 1 1 0; min-width: 0; } .item-name { font-weight: 600; font-size: 14px; }
.stepper { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.sbtn { width: 40px; height: 40px; border-radius: 6px; border: 1.5px solid var(--navy); background: #fff; color: var(--navy); font: 700 22px/1 Montserrat, Arial; }
.sbtn:active { background: var(--navy); color: #fff; }
.sqty { width: 50px; height: 40px; text-align: center; font: 700 16px Montserrat, Arial; border: 1px solid var(--line); border-bottom: 2px solid var(--navy); border-radius: 4px; }
.unitlbl { margin-left: 2px; }
.line { border: 1px solid var(--line); border-left: 4px solid var(--navy); border-radius: 4px; padding: 10px; margin: 8px 0; }
.line-top { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 6px; } .line-name { font-weight: 700; } .line-amt { font-weight: 700; font-size: 16px; white-space: nowrap; }
.seg { display: inline-flex; border: 1.5px solid var(--navy); border-radius: 6px; overflow: hidden; }
.seg button { border: 0; background: #fff; color: var(--navy); font: 700 13px Montserrat, Arial; padding: 8px 14px; } .seg button.on { background: var(--navy); color: #fff; }
.totals { border-top: 1px solid var(--line); margin-top: 6px; }
.trow { display: flex; justify-content: space-between; padding: 7px 4px; font-weight: 600; font-size: 14px; }
.trow.gold { background: var(--goldfill); border-bottom: 2px solid var(--gold); font-size: 16px; font-weight: 700; padding: 10px 8px; }
.trow.red { color: var(--red); }
.warn { background: #FFF3CD; border-left: 4px solid var(--gold); padding: 8px 10px; font-size: 13px; margin: 6px 0; }
.totalbar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--navy); color: #fff; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; padding-bottom: max(10px, env(safe-area-inset-bottom)); z-index: 10; }
.totalbar .bt { font-size: 20px; font-weight: 700; color: var(--goldfill); } .totalbar .bd { font-size: 12px; opacity: .9; }
.hist { display: flex; gap: 10px; justify-content: space-between; border: 1px solid var(--line); border-left: 4px solid var(--navy); border-radius: 4px; padding: 10px; margin: 8px 0; cursor: pointer; }
.hist-name { font-weight: 700; } .hist-top { display: flex; gap: 8px; align-items: center; color: var(--navy); }
.hist-side { text-align: right; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; } .hist-total { font-weight: 700; font-size: 16px; }
.hist-side .row { gap: 6px; }
.chip { font-size: 10.5px; font-weight: 700; text-transform: uppercase; border-radius: 999px; padding: 2px 8px; background: var(--gray); color: var(--muted); }
.chip-sent { background: #DCE6F7; color: var(--navy); } .chip-approved { background: var(--goldfill); color: var(--ink); }
.doc { border: 1px solid var(--line); padding: 12px; }
.doc-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; } .doc-head img { width: 52%; max-width: 240px; } .doc-info { font-size: 11px; color: var(--navy); text-align: right; font-weight: 600; }
.doc-title { background: var(--gray); color: var(--navy); font-weight: 700; display: flex; justify-content: space-between; padding: 6px 8px; margin: 10px 0; font-size: 12.5px; flex-wrap: wrap; gap: 6px; }
.doc-client { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; font-size: 12.5px; margin-bottom: 10px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; } .tbl th { background: var(--navy); color: #fff; padding: 6px; text-align: left; } .tbl th:not(:first-child), .tbl td:not(:first-child) { text-align: right; white-space: nowrap; }
.tbl td { border: 1px solid var(--line); padding: 6px; vertical-align: top; } .tbl tr.red td { color: var(--red); font-weight: 700; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 90px; background: #222; color: #fff; padding: 10px 14px; border-radius: 6px; font-size: 13px; z-index: 20; max-width: 90vw; }
.card { display: flex; flex-direction: column; gap: 10px; }
body.login main { max-width: 420px; padding-top: 30px; }
[hidden] { display: none !important; }
.toggle { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.added { background: var(--goldfill); color: var(--ink); font-weight: 700; font-size: 12px; border-radius: 999px; padding: 4px 10px; }
.addbtn { min-width: 132px; }
.sqty:focus { outline: 2px solid var(--gold); }
