/* VFI Counsellor Portal */
:root {
  --navy: #003163;
  --blue: #3060A8;
  --blue-2: #1878C0;
  --crimson: #901848;
  --bg: #F5F7FB;
  --card: #FFFFFF;
  --ink: #1B2333;
  --ink-2: #4A5568;
  --muted: #6B7689;
  --line: #E3E8F0;
  --line-2: #CFD6E4;
  --good: #1A7F37; --good-bg: #E7F5EC;
  --warn: #9A6700; --warn-bg: #FFF4D6;
  --bad: #B42318; --bad-bg: #FDECEA;
  --info: #3060A8; --info-bg: #E9F0FA;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .04);
  --side: 236px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 Roboto, system-ui, -apple-system, "Segoe UI", Arial, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--navy); line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: 20px; } h2 { font-size: 18px; } h3 { font-size: 15px; font-weight: 700; } h4 { font-size: 13px; margin-top: 1em; }
code { background: #EEF2F8; padding: 1px 5px; border-radius: 4px; font-size: 12.5px; word-break: break-all; }
.small { font-size: 13px; } .muted { color: var(--muted); } .center { text-align: center; } .nowrap { white-space: nowrap; } .strong { font-weight: 700; }
.pre { white-space: normal; }

/* Shell */
.shell { display: flex; min-height: 100vh; }
.side { width: var(--side); background: var(--navy); color: #C9D6EA; display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 30; transition: transform .2s; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px 14px; color: #fff; text-decoration: none !important; }
.mark { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; font: 700 14px/1 Georgia, "Times New Roman", serif; letter-spacing: .5px; color: #fff; background: linear-gradient(135deg, var(--blue-2), #603078 55%, var(--crimson)); flex: none; }
.mark.big { width: 52px; height: 52px; font-size: 19px; border-radius: 12px; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.2; }
.brand-txt strong { font-size: 14px; } .brand-txt small { font-size: 11px; color: #9FB3D1; }
.side nav { flex: 1; padding: 8px; overflow-y: auto; }
.side nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: #C9D6EA; font-weight: 500; text-decoration: none; margin-bottom: 2px; }
.side nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.side nav a.on { background: rgba(255, 255, 255, .13); color: #fff; box-shadow: inset 3px 0 0 var(--crimson); }
.side-foot { padding: 12px; border-top: 1px solid rgba(255, 255, 255, .1); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.me { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none !important; min-width: 0; }
.me span:last-child { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.me strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .me small { font-size: 11px; color: #9FB3D1; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--blue); display: grid; place-items: center; font-weight: 700; flex: none; }
.side .linkbtn { color: #9FB3D1; font-size: 12px; }
.main { flex: 1; margin-left: var(--side); min-width: 0; }
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; padding: 12px 24px; background: rgba(245, 247, 251, .92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.top h1 { margin: 0; font-size: 19px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .search input { width: 260px; }
.burger { display: none; background: none; border: 0; padding: 4px; color: var(--navy); cursor: pointer; }
.content { padding: 20px 24px 48px; max-width: 1400px; }
.scrim { display: none; }
.hello { color: var(--ink-2); margin: 0 0 14px; }

/* Cards and grids */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 16px; }
.card.flush { padding: 0; overflow: hidden; }
.card.empty { text-align: center; color: var(--muted); padding: 32px 18px; }
.card.notice { border-color: #F2C94C; background: #FFFBEA; }
.card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; align-items: start; }
.grid-side { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 16px; align-items: start; }
.grid-side > .card { margin-bottom: 0; }
.stack > * + * { margin-top: 12px; }
.stack > .card { margin-bottom: 0; }
.grid-side .stack > .card + .card { margin-top: 16px; }
.section { margin: 24px 0 12px; font-size: 16px; }
.form-narrow { max-width: 820px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.grow { flex: 1; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { display: flex; flex-direction: column; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); color: var(--ink); text-decoration: none !important; }
.kpi span { font-size: 12.5px; color: var(--muted); }
.kpi strong { font-size: 24px; color: var(--navy); font-weight: 700; line-height: 1.2; }
a.kpi:hover { border-color: var(--blue); }
.kpi.warn { border-left: 3px solid var(--crimson); }

/* Forms */
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
label.inline { flex-direction: row; align-items: center; gap: 6px; }
input, select, textarea { font: inherit; font-size: 14px; color: var(--ink); background: #fff; border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px; min-height: 38px; width: 100%; }
input[type=checkbox] { width: 16px; height: 16px; min-height: 0; accent-color: var(--blue); }
input[type=file] { padding: 6px; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(48, 96, 168, .25); border-color: var(--blue); }
textarea { resize: vertical; }
textarea.code { font: 12px/1.45 ui-monospace, Menlo, Consolas, monospace; background: #F8FAFD; }
fieldset.sub { border: 1px dashed var(--line-2); border-radius: 8px; padding: 10px 12px; }
legend { font-size: 13px; color: var(--muted); padding: 0 4px; }
.w-sm { width: 80px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: nowrap; }
.inline-form.wrap { flex-wrap: wrap; }
.inline-form input, .inline-form select { width: auto; }
.inline-form input[name=q], .inline-form input[name=item], .todo-form input[name=body] { min-width: 200px; }
form.inline { display: inline; }
.warnbox { background: var(--warn-bg); color: var(--warn); border-radius: 8px; padding: 8px 10px; }
.upload-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 4px; }
.upload-form select, .upload-form input { width: auto; flex: 1 1 160px; }
.upload-form input[type=file] { flex: 2 1 220px; }
details.sub { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
details summary { cursor: pointer; font-weight: 500; color: var(--blue); }
.copybox { background: #F8FAFD; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; white-space: pre-wrap; font-size: 14px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--blue); color: #fff; border: 1px solid var(--blue); border-radius: 8px; padding: 8px 14px; font: 500 14px/1.2 inherit; font-family: inherit; cursor: pointer; text-decoration: none !important; white-space: nowrap; min-height: 38px; }
.btn:hover { background: #26508F; }
.btn.ghost { background: #fff; color: var(--blue); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--blue); background: #F4F7FC; }
.btn.small { padding: 5px 10px; font-size: 13px; min-height: 32px; }
.btn-full { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--blue); cursor: pointer; font: inherit; }
.linkbtn.danger, .danger { color: var(--bad); }
.x { background: none; border: 0; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 4px; }
.x:hover { color: var(--bad); background: var(--bad-bg); }

/* Toolbar, tabs, segments */
.toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.seg { display: inline-flex; background: #fff; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; }
.seg a { padding: 7px 14px; color: var(--ink-2); font-weight: 500; text-decoration: none; }
.seg a.on { background: var(--navy); color: #fff; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 9px 14px; color: var(--ink-2); font-weight: 500; border-bottom: 2px solid transparent; white-space: nowrap; text-decoration: none; }
.tabs a.on { color: var(--navy); border-bottom-color: var(--crimson); }
.filters { padding: 12px 16px; }
.filters summary { font-size: 14px; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-top: 12px; align-items: end; }
.filter-actions { display: flex; gap: 8px; }

/* Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #FAFBFD; white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl.hover tbody tr:hover { background: #F7F9FD; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .cb { width: 34px; }
.tbl tr.muted td { color: var(--muted); }
.card:not(.flush) .tbl th { background: none; padding-left: 0; }
.card:not(.flush) .tbl td { padding-left: 0; }
.list-h { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.list-h h3 { margin: 0; }
.count { background: #EEF2F8; color: var(--ink-2); border-radius: 999px; padding: 0 8px; font-size: 12px; font-weight: 500; }
.bulk { display: inline-flex; gap: 6px; align-items: center; }
.bulk select { width: auto; min-height: 32px; padding: 4px 8px; }
.pager { display: flex; gap: 14px; align-items: center; justify-content: center; margin: 8px 0 16px; font-size: 13px; color: var(--muted); }
.wa { display: inline-block; font-size: 10.5px; font-weight: 700; background: #E7F5EC; color: #1A7F37; border-radius: 4px; padding: 0 5px; vertical-align: 1px; }

/* Lists */
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 9px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list.pad li { padding: 9px 14px; }
.dl { display: grid; grid-template-columns: 120px 1fr; gap: 6px 10px; margin: 0; font-size: 14px; }
.dl dt { color: var(--muted); } .dl dd { margin: 0; overflow-wrap: anywhere; }

/* Badges */
.badge { display: inline-block; font-size: 12px; font-weight: 500; line-height: 1.5; padding: 1px 8px; border-radius: 999px; background: #EEF2F8; color: var(--ink-2); white-space: nowrap; }
.badge.good { background: var(--good-bg); color: var(--good); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.muted { background: #F0F2F5; color: var(--muted); }

/* Flash */
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 14px; border: 1px solid transparent; }
.flash-ok { background: var(--good-bg); color: var(--good); border-color: #BFE3CB; }
.flash-warn { background: var(--warn-bg); color: var(--warn); border-color: #F2DFA6; }
.flash-bad { background: var(--bad-bg); color: var(--bad); border-color: #F5C2BC; }

/* Bars (dashboard) — single series, brand blue */
.bars { list-style: none; margin: 0; padding: 0; }
.bars li { display: grid; grid-template-columns: minmax(90px, 34%) 1fr 52px; align-items: center; gap: 10px; padding: 5px 0; font-size: 13px; }
.bars li:hover .bf { background: var(--navy); }
.bl { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt { height: 10px; background: transparent; }
.bf { display: block; height: 10px; background: var(--blue); border-radius: 0 4px 4px 0; transition: background .15s; }
.bv { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 500; }

/* Pipeline (lead stages) */
.pipeline { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; align-items: center; }
.pip { border: 1px solid var(--line-2); background: #fff; color: var(--ink-2); padding: 6px 12px; border-radius: 999px; font: 500 13px/1.2 inherit; font-family: inherit; cursor: pointer; }
.pip:hover { border-color: var(--blue); color: var(--blue); }
.pip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.pip.on.pip-won { background: var(--good); border-color: var(--good); }
.pip.on.pip-lost { background: var(--bad); border-color: var(--bad); }
.lost-reason { width: auto; min-height: 32px; padding: 4px 8px; font-size: 13px; }

/* Board */
.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; }
.col { flex: 0 0 260px; background: #EBEFF6; border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 220px); }
.col header { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; font-size: 13px; color: var(--navy); }
.col-won header { color: var(--good); } .col-lost header { color: var(--bad); }
.col-body { padding: 0 8px 8px; overflow-y: auto; min-height: 60px; }
.col.drop { outline: 2px dashed var(--blue); outline-offset: -2px; }
.lcard { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; margin-bottom: 8px; box-shadow: var(--shadow); cursor: grab; }
.lcard.dragging { opacity: .5; }
.lcard-f { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; gap: 6px; }

/* Feed */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { position: relative; padding: 8px 0 10px 16px; border-left: 2px solid var(--line); margin-left: 4px; }
.feed li::before { content: ""; position: absolute; left: -6px; top: 13px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--blue); }
.feed li.feed-stage::before { border-color: var(--line-2); }
.feed-h { font-size: 13px; color: var(--ink-2); }
.feed-b { font-size: 14px; margin-top: 2px; overflow-wrap: anywhere; }
.feed-due { margin-top: 4px; }

/* File timeline */
.file-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.file-head h2 { margin-bottom: 4px; }
.file-head p { margin: 2px 0; }
.file-status { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; gap: 0; overflow-x: auto; }
.timeline li { flex: 1 0 110px; position: relative; text-align: center; }
.timeline li::before { content: ""; position: absolute; top: 15px; left: 0; right: 0; height: 2px; background: var(--line-2); z-index: 0; }
.timeline li:first-child::before { left: 50%; } .timeline li:last-child::before { right: 50%; }
.timeline li.done::before, .timeline li.now::before { background: var(--blue); }
.timeline li.now::before { right: 50%; }
.timeline li.now:first-child::before { display: none; }
.timeline form { margin: 0; }
.tl-btn { position: relative; z-index: 1; background: none; border: 0; padding: 0 4px; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; font: inherit; cursor: pointer; color: var(--muted); }
.tl-btn.static { cursor: default; }
.dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--line-2); font-size: 13px; font-weight: 700; }
.tl-t { font-size: 12px; line-height: 1.3; }
.timeline li.done .dot { background: var(--blue); border-color: var(--blue); color: #fff; }
.timeline li.done .tl-t { color: var(--ink-2); }
.timeline li.now .dot { background: var(--crimson); border-color: var(--crimson); color: #fff; box-shadow: 0 0 0 4px rgba(144, 24, 72, .15); }
.timeline li.now .tl-t { color: var(--crimson); font-weight: 700; }
button.tl-btn:hover .dot { border-color: var(--blue); }
.next-step { margin-top: 16px; flex-wrap: wrap; }
.next-step input { flex: 1 1 220px; }
.prog { height: 6px; background: #E9EDF4; border-radius: 999px; overflow: hidden; margin-top: 4px; min-width: 90px; }
.prog span { display: block; height: 100%; background: var(--blue); border-radius: 999px; }
.prog.big { height: 8px; margin: 4px 0 10px; }

/* Checklist */
.checklist { list-style: none; margin: 0 0 10px; padding: 0; }
.checklist li { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.ck-form { flex: 1; margin: 0; }
.ck { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; padding: 7px 0; font: inherit; font-size: 14px; color: var(--ink); text-align: left; cursor: pointer; }
.ck.static { cursor: default; }
.box { width: 18px; height: 18px; border: 2px solid var(--line-2); border-radius: 5px; flex: none; display: grid; place-items: center; }
.checklist li.done .box { background: var(--good); border-color: var(--good); }
.checklist li.done .box::after { content: ""; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.checklist li.done .ck span:last-child { color: var(--muted); text-decoration: line-through; }

.money-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 10px; }
.money-row div { background: #F8FAFD; border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; }
.money-row span { font-size: 12px; color: var(--muted); }
.money-row strong { color: var(--navy); font-size: 15px; }
.money-row strong.due { color: var(--crimson); }
.role-help { background: #F8FAFD; border-radius: 8px; padding: 10px 12px; }

/* Login */
.bare { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(1200px 600px at 10% -10%, #DCE7F7, transparent), radial-gradient(900px 500px at 110% 110%, #F3DCE6, transparent), var(--bg); }
.login-wrap { width: 100%; max-width: 400px; }
.login-card { background: #fff; border-radius: 16px; box-shadow: 0 10px 30px rgba(0, 49, 99, .12); padding: 28px; border: 1px solid var(--line); }
.login-card.wide { max-width: 640px; }
.login-wrap:has(.wide) { max-width: 640px; }
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.login-brand h1 { margin: 0; font-size: 21px; }
.login-brand p { margin: 0; color: var(--muted); font-size: 13px; }
.login-tag { text-align: center; color: var(--navy); font-size: 12.5px; margin-top: 14px; letter-spacing: .02em; }
.login-card h3 { margin-top: 8px; }

/* Receipt */
.print-body { background: #fff; }
.receipt { max-width: 760px; margin: 24px auto; padding: 32px; border: 1px solid var(--line); border-radius: 12px; }
.r-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border-bottom: 3px solid var(--navy); padding-bottom: 16px; margin-bottom: 16px; }
.r-brand { display: flex; gap: 12px; align-items: center; }
.r-brand div { display: flex; flex-direction: column; } .r-brand strong { color: var(--navy); font-size: 17px; } .r-brand small { color: var(--muted); font-size: 11.5px; }
.r-title { text-align: right; } .r-title h1 { margin: 0; color: var(--crimson); font-size: 20px; text-transform: uppercase; letter-spacing: .05em; } .r-title p { margin: 2px 0 0; font-weight: 700; }
.r-meta, .r-lines, .r-sum { width: 100%; border-collapse: collapse; margin-bottom: 16px; font-size: 14px; }
.r-meta th { text-align: left; color: var(--muted); font-weight: 500; width: 18%; padding: 4px 0; } .r-meta td { padding: 4px 8px 4px 0; }
.r-lines th { background: var(--navy); color: #fff; text-align: left; padding: 8px 10px; font-weight: 500; } .r-lines td { padding: 10px; border-bottom: 1px solid var(--line); }
.r-lines .num { text-align: right; }
.r-sum { width: 50%; margin-left: auto; } .r-sum th { text-align: left; font-weight: 500; color: var(--ink-2); padding: 4px 0; } .r-sum td { text-align: right; padding: 4px 0; }
.r-due th, .r-due td { border-top: 2px solid var(--navy); font-weight: 700; color: var(--navy); padding-top: 8px; }
.r-sign { display: flex; justify-content: space-between; gap: 40px; margin: 48px 0 24px; font-size: 13px; color: var(--ink-2); }
.r-sign div { flex: 1; } .r-sign span { display: block; border-top: 1px solid var(--ink-2); margin-bottom: 4px; }
.r-foot { border-top: 1px solid var(--line); padding-top: 12px; text-align: center; font-size: 12px; color: var(--muted); }
.r-foot strong { color: var(--navy); font-size: 13px; }
@media print {
  .noprint { display: none; }
  .receipt { border: 0; margin: 0; padding: 0; }
  body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Responsive */
@media (max-width: 1100px) {
  .grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .grid-side { grid-template-columns: 1fr; }
  .top .search input { width: 180px; }
}
@media (max-width: 760px) {
  .side { transform: translateX(-100%); box-shadow: 4px 0 20px rgba(0, 0, 0, .2); }
  body.nav-open .side { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 20, 40, .4); z-index: 20; }
  .main { margin-left: 0; }
  .burger { display: block; }
  .top { padding: 10px 16px; }
  .top .search { display: none; }
  .content { padding: 16px 16px 40px; }
  .row2, .row3 { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi strong { font-size: 20px; }
  .inline-form { flex-wrap: wrap; }
  .inline-form input, .inline-form select { flex: 1 1 140px; }
  .inline-form input[name=q], .inline-form input[name=item], .todo-form input[name=body] { min-width: 0; }
  .todo-form { width: 100%; }
  .dl { grid-template-columns: 100px 1fr; }
  .money-row { grid-template-columns: 1fr 1fr 1fr; }
  .file-status { align-items: flex-start; }
  .receipt { padding: 16px; }
  .r-head { flex-direction: column; } .r-title { text-align: left; }
  .r-sum { width: 100%; }
  .col { flex-basis: 78vw; }
}
.inline-form select, .inline-form input { min-width: 0; flex: 0 1 auto; max-width: 100%; }
