:root { --navy:#054872; --navy-dark:#043756; --rose:#c33c33; --rose-dark:#a02f28; --red:#054872; --red-dark:#043756; --ink:#1f2933; --muted:#6b7280; --line:#e5e7eb; --bg:#f5f6f8;
        --card:#fff; --ok:#2e7d32; --warn:#b26a00; --blue:#3b6aa0; }
* { box-sizing:border-box; }
body { margin:0; font:16px/1.45 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; color:var(--ink); background:var(--bg); }
header.top { background:#fff; color:var(--navy); padding:8px 16px; display:flex; flex-wrap:wrap; align-items:center; gap:6px 18px; border-bottom:4px solid var(--rose); }
.topline { height:4px; background:var(--rose); }
header.top a { color:var(--navy); text-decoration:none; font-weight:600; }
header.top .brand { margin-right:auto; display:flex; align-items:center; }
header.top .brand img { height:50px; width:auto; display:block; }
header.top nav { display:flex; flex-wrap:wrap; gap:4px 16px; align-items:center; font-size:15px; }
header.top button.link { background:none; border:0; color:var(--navy); font:inherit; cursor:pointer; padding:0; text-decoration:underline; }
a { color:var(--red-dark); }
main { max-width:860px; margin:0 auto; padding:16px; }
h1 { font-size:24px; margin:8px 0 14px; } h2 { font-size:18px; margin:22px 0 8px; } h3 { margin:0; font-size:16px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:12px; padding:14px; margin:0 0 10px; }
a.card { display:block; color:inherit; text-decoration:none; } a.card:hover { border-color:var(--rose); }
.row { display:flex; gap:10px; flex-wrap:wrap; align-items:center; } .grow { flex:1; } .right { text-align:right; }
.muted { color:var(--muted); font-size:14px; } .small { font-size:13px; }
.badge { display:inline-block; padding:2px 10px; border-radius:99px; font-size:13px; font-weight:600; background:#eee; }
.badge.draft { background:#eef2f7; color:#35506f; } .badge.awaiting_approval { background:#fff3d6; color:var(--warn); }
.badge.approved { background:#e2f4e4; color:var(--ok); } .badge.reimbursed { background:#d6efe0; color:#14532d; }
label { display:block; font-weight:600; font-size:14px; margin:12px 0 4px; }
input[type=text], input[type=email], input[type=password], input[type=time], input[type=date], input[type=number], select, textarea {
  width:100%; padding:11px 12px; font:inherit; border:1px solid #c9ced6; border-radius:8px; background:#fff; }
textarea { min-height:80px; }
input:focus, select:focus, textarea:focus { outline:2px solid #a9c4d8; border-color:var(--navy); }
.btn { display:inline-block; border:0; border-radius:10px; padding:12px 18px; font:inherit; font-weight:600; cursor:pointer;
       background:var(--red); color:#fff; text-decoration:none; text-align:center; }
.btn:hover { background:var(--red-dark); } .btn.alt { background:#fff; color:var(--navy); border:1px solid var(--navy); }
.btn.gray { background:#e9ecef; color:var(--ink); } .btn.danger { background:#fff; color:#b00020; border:1px solid #e3b4bb; }
.btn.small { padding:7px 12px; font-size:14px; } .btn.block { display:block; width:100%; }
.actions { display:flex; gap:10px; flex-wrap:wrap; margin:12px 0; }
.flash, .notice { padding:10px 14px; border-radius:10px; margin:10px 0; }
.flash { background:#e2f4e4; color:#14532d; } .notice.warn { background:#fff3d6; color:#6b4a00; }
.notice.err { background:#fde8e8; color:#8a1c1c; } .notice.info { background:#e8f0fa; color:#25476b; }
.line { display:flex; gap:12px; } .line .thumb { width:64px; height:64px; object-fit:cover; border-radius:8px; border:1px solid var(--line); background:#fafafa;
        display:flex; align-items:center; justify-content:center; font-size:12px; color:var(--muted); flex:none; }
.line .amt { font-weight:700; white-space:nowrap; }
table { width:100%; border-collapse:collapse; font-size:14px; } th,td { padding:8px 6px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; }
th { color:var(--muted); font-weight:600; } td.num, th.num { text-align:right; white-space:nowrap; }
.totals { font-size:17px; } .totals b { font-size:20px; }
canvas.pad { width:100%; height:170px; background:#fff; border:2px dashed #c9ced6; border-radius:10px; touch-action:none; }
.tabs { display:flex; gap:8px; margin:6px 0; } .tabs button { flex:1; }
.tabs button.on { background:var(--red); color:#fff; }
details summary { cursor:pointer; font-weight:600; } .checks { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:2px 12px; }
.checks label { font-weight:400; margin:4px 0; display:flex; gap:8px; align-items:center; }
.checks input { width:auto; }
.drop { border:2px dashed #c9ced6; border-radius:12px; padding:16px; text-align:center; background:#fff; }
#status { min-height:22px; margin-top:8px; font-size:14px; }
.login { max-width:420px; margin:32px auto; }
.login .logo { display:block; width:280px; max-width:80%; height:auto; margin:0 auto 6px; }
.login .tag { text-align:center; margin:0 0 18px; }
@media (max-width:520px) { main { padding:12px; } .hide-sm { display:none; } }
