:root { --navy: #0f2f52; --navy2: #0a2240; --amber: #f2b33d; --bg: #f4f6f9; --card: #fff; --line: #dfe4ec; --text: #1c2433; --muted: #5f6b7d; --green: #1e7d45; --greenbg: #e3f4ea; --red: #b42318; --redbg: #fde7e5; --yellow: #fff4d1; }
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--text); background: var(--bg); }
a { color: var(--navy); }
h1 { font-size: 1.6rem; margin: 0 0 10px; } h2 { font-size: 1.15rem; margin: 0 0 10px; } h3 { font-size: 1rem; margin: 14px 0 6px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; } .main { padding-top: 22px; padding-bottom: 60px; min-height: 70vh; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .nowrap { white-space: nowrap; } .r { text-align: right; }
.top { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 20; }
.topin { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; gap: 10px; align-items: center; color: #fff; text-decoration: none; } .brand b { display: block; } .brand small { display: block; opacity: .75; font-size: .75rem; }
.logo { width: 38px; height: 38px; border-radius: 8px; background: var(--amber); color: var(--navy); display: grid; place-items: center; font-weight: 800; flex: none; }
.nav { display: flex; gap: 2px; align-items: center; flex-wrap: wrap; } .nav a, .linkbtn { color: #dbe5f1; text-decoration: none; padding: 7px 11px; border-radius: 7px; background: none; border: 0; font: inherit; cursor: pointer; }
.nav a:hover, .nav a.on, .nav .linkbtn:hover { background: rgba(255,255,255,.13); color: #fff; }
.menu-btn { display: none; background: none; border: 1px solid rgba(255,255,255,.4); color: #fff; font-size: 1.2rem; border-radius: 7px; padding: 4px 10px; }
.badge { background: var(--amber); color: var(--navy); font-size: .72rem; font-weight: 700; border-radius: 9px; padding: 1px 7px; }
.tag { background: #eef1f5; color: var(--muted); font-size: .72rem; border-radius: 5px; padding: 1px 7px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px; margin-bottom: 16px; }
.narrow { max-width: 460px; margin-left: auto; margin-right: auto; }
.titlebar { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .stack { display: grid; gap: 12px; } .inline { display: inline; }
.grid2 { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px; }
.cards3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; margin-bottom: 16px; } .cards3 .card { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--navy); border-radius: 10px; padding: 12px 14px; text-decoration: none; color: inherit; }
.stat b { display: block; font-size: 1.7rem; } .stat span { color: var(--muted); font-size: .85rem; } .stat.warn { border-left-color: var(--amber); }
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; color: var(--text); padding: 7px 14px; border-radius: 8px; cursor: pointer; text-decoration: none; font: inherit; font-size: .92rem; }
.btn:hover { border-color: #b4bfd0; } .btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; } .btn.primary:hover { background: var(--navy2); }
.btn.danger { color: var(--red); border-color: #f1c0bb; } .btn.sm { padding: 3px 9px; font-size: .82rem; } .btn.big { padding: 11px 20px; font-size: 1rem; }
input, select, textarea { font: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; width: 100%; min-width: 0; }
textarea { min-height: 80px; } input[type=checkbox] { width: auto; }
.f { display: grid; gap: 4px; font-size: .85rem; } .f > span { font-weight: 600; color: var(--muted); }
.form { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px 16px; } .form .full, .form h3, .form p.full { grid-column: 1 / -1; }
.row input[type=search], .row select { width: auto; flex: 1; min-width: 160px; }
.tw { overflow-x: auto; } table { width: 100%; border-collapse: collapse; } th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: .9rem; }
th { font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); } tr.hdr td { background: var(--yellow); font-weight: 600; }
table.inputs td { padding: 4px; } table.inputs input { padding: 6px 8px; }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; } .flash.ok { background: var(--greenbg); color: var(--green); } .flash.err { background: var(--redbg); color: var(--red); }
.drop { border: 2px dashed #b4bfd0; border-radius: 10px; padding: 18px; text-align: center; background: #fbfcfe; margin-bottom: 12px; } .drop.over { border-color: var(--navy); background: #e8f0fb; }
.upload .f { margin-bottom: 10px; }
.hero { background: linear-gradient(135deg, var(--navy), #1b4a7a); color: #fff; border-radius: 14px; padding: 42px 32px; margin-bottom: 18px; }
.hero h1 { font-size: 2rem; max-width: 760px; } .hero .lead { font-size: 1.1rem; opacity: .9; max-width: 680px; } .hero .btn { border-color: rgba(255,255,255,.5); }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; } .kv dt { color: var(--muted); } .kv dd { margin: 0; }
.foot { border-top: 1px solid var(--line); padding: 18px 0; color: var(--muted); font-size: .88rem; background: #fff; }
.logo-prev { max-height: 70px; max-width: 220px; border: 1px solid var(--line); border-radius: 6px; padding: 4px; background: #fff; }
.sticky-total { position: sticky; bottom: 0; box-shadow: 0 -4px 14px rgba(0,0,0,.06); display: grid; gap: 10px; }
.totals { display: flex; gap: 22px; flex-wrap: wrap; font-size: 1.05rem; } .totals .net b { color: var(--green); font-size: 1.3rem; }
/* chat */
.chat-fab { position: fixed; right: 16px; bottom: 16px; background: var(--amber); color: var(--navy); border: 0; border-radius: 24px; padding: 11px 18px; font-weight: 700; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.2); z-index: 40; }
.chat { position: fixed; right: 16px; bottom: 16px; width: min(380px, calc(100vw - 32px)); height: min(540px, calc(100vh - 100px)); background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25); display: flex; flex-direction: column; z-index: 41; }
.chat[hidden] { display: none; } .chat-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: var(--navy); color: #fff; border-radius: 14px 14px 0 0; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.msg { padding: 8px 12px; border-radius: 12px; max-width: 88%; white-space: pre-wrap; font-size: .9rem; } .msg.me { align-self: flex-end; background: var(--navy); color: #fff; } .msg.bot { align-self: flex-start; background: #eef2f7; } .msg.err { background: var(--redbg); color: var(--red); }
.chat-form { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--line); } .chat-note { font-size: .72rem; color: var(--muted); padding: 0 12px 10px; }
/* statement (mirrors the Excel layout) */
.stmt { background: #fff; max-width: 860px; margin: 0 auto; padding: 18px; border: 1px solid var(--line); color: #1a1a1a; font-size: 13px; }
.st-band { background: #0d2b4e; color: #fff; text-align: center; font-weight: 800; font-size: 20px; padding: 6px; }
.st-head { display: flex; gap: 24px; align-items: center; padding: 10px 0; border-bottom: 3px solid #0d2b4e; }
.st-logo img { max-height: 70px; max-width: 220px; } .st-co { color: #0d2b4e; font-size: 12px; line-height: 1.45; }
.st-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-top: 8px; }
.st-title { font-size: 18px; font-weight: 800; color: #0d2b4e; padding-top: 6px; }
.st-meta th, .st-driver th { background: #dff1d8; color: #0d2b4e; font-size: 12px; text-transform: none; letter-spacing: 0; padding: 3px 8px; border: 0; white-space: nowrap; }
.st-meta td { background: #fff7d6; padding: 3px 10px; min-width: 120px; border: 0; } .st-meta { width: auto; }
.st-driver { width: auto; margin: 10px 0; } .st-driver td { padding: 3px 10px; border: 0; }
.st-sec { background: #0d2b4e; color: #fff; font-weight: 700; font-size: 12px; text-align: center; padding: 3px; margin-top: 10px; } .st-sec.two { display: grid; grid-template-columns: 1fr 2fr; }
.st-loads th { font-size: 11px; padding: 4px 6px; } .st-loads td { padding: 4px 6px; font-size: 12px; } .st-loads .tot td { font-weight: 700; background: #f3f6fa; }
.st-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0; } .st-grid table th { text-transform: none; letter-spacing: 0; color: #1a1a1a; font-size: 12px; font-weight: 400; padding: 3px 6px; border: 0; }
.st-grid table td { background: #fff7d6; text-align: right; padding: 3px 8px; border: 0; font-size: 12px; } .st-grid .tot th, .st-grid .tot td { font-weight: 700; background: #dbe9f6; color: #0d2b4e; }
.st-totals { display: grid; grid-template-columns: 1fr 1fr 1fr; margin-top: 10px; text-align: center; } .st-totals span { display: block; font-weight: 700; color: #0d2b4e; background: #f2f2f2; padding: 3px; font-size: 12px; }
.st-totals b { display: block; padding: 5px; font-size: 16px; background: #fdc02f; color: #0d2b4e; } .st-totals .net b { background: #8fd14f; }
.st-note { margin: 10px 0 0; font-style: italic; } .st-prep { text-align: center; color: #3a6b80; font-size: 11px; font-weight: 600; margin: 18px 0 8px; }
.st-foot { background: #0d2b4e; color: #fff; text-align: center; font-size: 11px; padding: 6px; line-height: 1.4; }
@media print {
  @page { size: letter; margin: 0.4in; }
  body { background: #fff; } .top, .foot, .noprint, .chat-fab, .chat, .flash { display: none !important; } .main { padding: 0; } .wrap { max-width: none; padding: 0; }
  .stmt { border: 0; padding: 0; max-width: none; } * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media (max-width: 860px) {
  .menu-btn { display: block; } .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; } .nav.open { display: flex; } .topin { flex-wrap: wrap; }
  .grid2, .cards3, .form { grid-template-columns: minmax(0,1fr); } .stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .hero { padding: 26px 18px; } .hero h1 { font-size: 1.5rem; } .kv { grid-template-columns: 1fr; }
  .st-grid, .st-totals { grid-template-columns: 1fr; } .st-row, .st-head { flex-direction: column; align-items: flex-start; } .st-sec.two { grid-template-columns: 1fr 1fr; }
}
