/* PLUS Expense — white + maroon glass theme */
:root {
  --maroon: #7A1E2C;
  --maroon-2: #9B2C3E;
  --maroon-dark: #561421;
  --ink: #2A1418;
  --muted: #7C6A6D;
  --glass: rgba(255,255,255,.62);
  --edge: rgba(255,255,255,.85);
  --edge-tint: rgba(122,30,44,.10);
  --line: rgba(122,30,44,.09);
  --maroon-soft: rgba(122,30,44,.08);
  --maroon-line: rgba(122,30,44,.22);
  --mglass: linear-gradient(140deg, rgba(138,36,52,.94) 0%, rgba(92,20,34,.90) 100%);
  --green: #1E7A4C; --green-soft: rgba(30,122,76,.11);
  --amber: #A86400; --amber-soft: rgba(214,140,20,.14);
  --blue: #23589A; --blue-soft: rgba(35,88,154,.11);
  --red: #B3261E; --red-soft: rgba(179,38,30,.10);
  --radius: 18px;
  --blur: blur(20px) saturate(170%);
  --shadow: 0 8px 26px rgba(122,30,44,.10), 0 1px 2px rgba(122,30,44,.06), inset 0 1px 0 rgba(255,255,255,.9);
  --mshadow: 0 12px 30px rgba(92,20,34,.35), inset 0 1px 0 rgba(255,255,255,.25);
  --nav-h: 66px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: #F8F2F3; }
body {
  margin: 0; color: var(--ink); min-height: 100vh;
  font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  background: transparent;
}
/* soft pearl backdrop with maroon glows for the glass to sit on */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38vmax 38vmax at 100% -4%, rgba(122,30,44,.30), transparent 62%),
    radial-gradient(34vmax 34vmax at -8% 30%, rgba(214,90,112,.22), transparent 60%),
    radial-gradient(40vmax 40vmax at 104% 70%, rgba(155,44,62,.18), transparent 60%),
    radial-gradient(36vmax 36vmax at 10% 104%, rgba(232,160,170,.30), transparent 60%),
    linear-gradient(170deg, #FFFFFF 0%, #FBF4F5 45%, #F6ECEE 100%);
}
.hidden { display: none !important; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

/* white glass */
.card, .list, .tile, .alert-tile, .tab, .banner {
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--edge);
  box-shadow: var(--shadow);
}
/* maroon glass */
.hero, .claim-head {
  background: var(--mglass);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: var(--mshadow);
  color: #fff;
}

/* top bar — maroon glass */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 6px;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 12px 10px;
  background: rgba(122,30,44,.90); color: #fff;
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border-bottom: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 4px 18px rgba(92,20,34,.18);
}
.topbar h1 { flex: 1; margin: 0; font-size: 18px; font-weight: 680; letter-spacing: .2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: inherit; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); }
.icon-btn:active { background: rgba(255,255,255,.25); }
.icon-btn svg, .nav-item svg, .btn svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#topActions { display: flex; gap: 6px; }

main { max-width: 760px; margin: 0 auto; padding: 14px 16px calc(var(--nav-h) + var(--safe-b) + 140px); }
main.no-nav { padding-bottom: 40px; }

/* bottom dock — maroon glass */
.bottombar {
  position: fixed; left: 12px; right: 12px; bottom: calc(10px + var(--safe-b)); z-index: 30;
  height: var(--nav-h); max-width: 560px; margin: 0 auto;
  display: flex; justify-content: space-around; align-items: center;
  background: rgba(122,30,44,.88);
  -webkit-backdrop-filter: blur(24px) saturate(170%); backdrop-filter: blur(24px) saturate(170%);
  border: 1px solid rgba(255,255,255,.25); border-radius: 24px;
  box-shadow: 0 12px 30px rgba(92,20,34,.35), inset 0 1px 0 rgba(255,255,255,.22);
}
.nav-item {
  flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: rgba(255,255,255,.66); font-size: 11px; font-weight: 600; position: relative; z-index: 0;
}
.nav-item.active { color: #fff; }
.nav-item.active::before { content: ""; position: absolute; inset: 8px 10px; border-radius: 14px; background: rgba(255,255,255,.16); z-index: -1; }
.nav-item .badge { position: absolute; top: 6px; left: calc(50% + 6px); background: #fff; color: var(--maroon); font-size: 10.5px; font-weight: 800; min-width: 17px; height: 17px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; }
.nav-add {
  flex: 0 0 auto; width: 56px; height: 56px; margin-top: -30px; border-radius: 20px;
  background: linear-gradient(145deg, #FFFFFF, #F7E6E9); color: var(--maroon); display: grid; place-items: center;
  box-shadow: 0 10px 22px rgba(92,20,34,.35), inset 0 1px 0 #fff; border: 1px solid rgba(122,30,44,.15);
}
.nav-add svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }

/* cards & lists */
.card { border-radius: var(--radius); padding: 15px; margin-bottom: 12px; }
.section-title { font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .9px; margin: 20px 4px 9px; display: flex; justify-content: space-between; align-items: center; }
.section-title a, .link { color: var(--maroon); text-transform: none; letter-spacing: 0; font-weight: 680; text-decoration: none; font-size: 14px; }
.section-title span { text-transform: none; letter-spacing: 0; color: var(--ink); }
.list { border-radius: var(--radius); overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; padding: 13px 15px; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }
.row:last-child { border-bottom: 0; }
.row:active { background: var(--maroon-soft); }
.row .main { flex: 1; min-width: 0; }
.row .t { font-weight: 640; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .s { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .amt { font-weight: 720; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.row .amt small { display: block; font-weight: 500; font-size: 12px; margin-top: 3px; }
.empty { text-align: center; color: var(--muted); padding: 34px 16px; }
.empty b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }
.no-bill { color: var(--red); }

/* hero (maroon glass) */
.hero { position: relative; overflow: hidden; border-radius: 24px; padding: 20px 18px 18px; margin-bottom: 14px; }
.hero::after { content: ""; position: absolute; width: 230px; height: 230px; right: -70px; top: -95px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.26), transparent 65%); pointer-events: none; }
.hero .hi { color: rgba(255,255,255,.78); font-size: 14px; font-weight: 550; }
.hero .big { font-size: 34px; font-weight: 800; margin: 4px 0 0; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.hero .sub { color: rgba(255,255,255,.75); font-size: 13px; }
.hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; position: relative; z-index: 1; }
.hero-actions button { background: linear-gradient(145deg, #fff, #F8E8EB); color: var(--maroon); border-radius: 14px; padding: 12px 10px; font-weight: 750; display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 6px 16px rgba(40,0,10,.22); }
.hero-actions button.ghost { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.3); box-shadow: none; }
.hero-actions svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { border-radius: var(--radius); padding: 13px 14px; text-align: left; position: relative; overflow: hidden; }
.tile::after { content: ""; position: absolute; right: -30px; bottom: -40px; width: 100px; height: 100px; border-radius: 50%; background: radial-gradient(circle, rgba(122,30,44,.08), transparent 70%); pointer-events: none; }
.tile .k { font-size: 12.5px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 7px; }
.tile .v { font-size: 21px; font-weight: 780; margin-top: 6px; font-variant-numeric: tabular-nums; color: var(--ink); }
.tile .n { font-size: 12px; color: var(--muted); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.alert-tile { display: flex; align-items: center; gap: 12px; background: linear-gradient(120deg, rgba(255,236,205,.85), rgba(255,255,255,.6)); border-color: rgba(214,140,20,.3); border-radius: var(--radius); padding: 13px 15px; margin-bottom: 10px; width: 100%; text-align: left; }
.alert-tile b { font-size: 18px; color: #fff; min-width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(145deg, #D08A1E, #A86400); }
.alert-tile span { flex: 1; font-weight: 640; color: #6B4200; }

/* month panel */
.month-panel { display: grid; grid-template-columns: 112px 1fr; gap: 16px; align-items: center; }
.ring { width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center; position: relative; box-shadow: 0 6px 18px rgba(122,30,44,.18); }
.ring::after { content: ""; position: absolute; inset: 14px; border-radius: 50%; background: rgba(255,255,255,.92); box-shadow: inset 0 2px 6px rgba(122,30,44,.12); }
.ring div { position: relative; z-index: 1; text-align: center; }
.ring b { display: block; font-size: 15px; font-variant-numeric: tabular-nums; color: var(--maroon); }
.ring small { color: var(--muted); font-size: 11px; }
.legend { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.legend .li { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.legend .li span:nth-child(2) { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legend .li b { font-variant-numeric: tabular-nums; font-size: 13px; }
.legend i { width: 9px; height: 9px; border-radius: 3px; flex: 0 0 auto; }

/* chips */
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.st-draft { background: rgba(94,81,83,.10); color: #5E5153; }
.st-submitted { background: var(--amber-soft); color: var(--amber); }
.st-approved { background: var(--blue-soft); color: var(--blue); }
.st-paid { background: var(--green-soft); color: var(--green); }
.st-returned, .st-rejected { background: var(--red-soft); color: var(--red); }
.claim-head .chip { background: rgba(255,255,255,.92); }

.cat { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; font-weight: 780; font-size: 13px; flex: 0 0 auto; border: 1px solid rgba(255,255,255,.9); box-shadow: 0 2px 6px rgba(122,30,44,.08); }

/* tabs */
.tabs { display: flex; gap: 7px; overflow-x: auto; margin: 0 -16px 12px; padding: 2px 16px 8px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: 0 0 auto; padding: 8px 14px; border-radius: 20px; font-weight: 640; font-size: 14px; color: var(--muted); }
.tab.active { background: var(--mglass); color: #fff; border-color: rgba(255,255,255,.3); box-shadow: 0 6px 16px rgba(92,20,34,.3); }
.tab .c { margin-left: 5px; opacity: .75; }

/* forms */
.field { margin-bottom: 14px; }
.field label, .label { display: block; font-size: 12.5px; font-weight: 650; color: var(--muted); margin-bottom: 6px; letter-spacing: .2px; }
.input, select.input, textarea.input {
  width: 100%; padding: 12px 13px; border: 1px solid rgba(122,30,44,.14); border-radius: 14px; outline: none; min-height: 46px;
  background: rgba(255,255,255,.72); color: var(--ink);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 2px rgba(122,30,44,.05);
}
.input::placeholder, textarea::placeholder, .amount-input input::placeholder { color: #B3A3A6; }
.input:focus { border-color: var(--maroon); background: #fff; box-shadow: 0 0 0 3px rgba(122,30,44,.10); }
textarea.input { min-height: 70px; resize: vertical; }
.amount-input { display: flex; align-items: center; border: 1px solid var(--edge); border-radius: 18px; background: var(--glass); padding: 6px 16px; -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--shadow); }
.amount-input:focus-within { border-color: var(--maroon); box-shadow: 0 0 0 3px rgba(122,30,44,.10), var(--shadow); }
.amount-input span { font-size: 28px; font-weight: 700; color: var(--maroon); margin-right: 6px; }
.amount-input input { flex: 1; border: 0; outline: none; font-size: 32px; font-weight: 800; padding: 8px 0; width: 100%; background: transparent; color: var(--ink); font-variant-numeric: tabular-nums; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid2 > * { min-width: 0; }
input[type="date"].input { -webkit-appearance: none; appearance: none; }
.cats { display: flex; flex-wrap: wrap; gap: 8px; }
.cats button { padding: 8px 12px; border-radius: 20px; border: 1px solid var(--edge); background: rgba(255,255,255,.65); font-size: 13.5px; font-weight: 600; box-shadow: 0 2px 6px rgba(122,30,44,.06); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.cats button.on { background: var(--mglass); border-color: rgba(255,255,255,.3); color: #fff; box-shadow: 0 6px 14px rgba(92,20,34,.28); }
.check { display: flex; align-items: center; gap: 10px; padding: 12px 0; font-weight: 640; }
.check input { width: 20px; height: 20px; accent-color: var(--maroon); }
.check small { display: block; color: var(--muted); font-weight: 500; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 18px; border-radius: 14px; font-weight: 740; min-height: 48px; border: 1px solid transparent; }
.btn.primary { background: var(--mglass); color: #fff; border-color: rgba(255,255,255,.25); box-shadow: var(--mshadow); }
.btn.primary:active { filter: brightness(.92); }
.btn.outline { border-color: var(--maroon-line); color: var(--maroon); background: rgba(255,255,255,.7); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 2px 8px rgba(122,30,44,.06); }
.btn.soft { background: rgba(122,30,44,.07); color: var(--maroon); border-color: rgba(122,30,44,.08); }
.btn.danger { background: rgba(255,255,255,.7); color: var(--red); border-color: rgba(179,38,30,.25); }
.btn.green { background: linear-gradient(145deg, #2A9A63, #1A6E45); color: #fff; box-shadow: 0 8px 20px rgba(20,90,55,.28); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }

/* receipts */
.receipt-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.receipt-pick button { border: 1.5px dashed var(--maroon-line); background: rgba(255,255,255,.6); color: var(--maroon); border-radius: 18px; padding: 18px 8px; font-weight: 700; display: flex; flex-direction: column; align-items: center; gap: 7px; -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--shadow); }
.receipt-pick svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.thumb { position: relative; width: 74px; height: 74px; border-radius: 12px; overflow: hidden; border: 1px solid var(--edge); background: #fff; box-shadow: var(--shadow); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .x { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 14px; line-height: 22px; text-align: center; }
.ai-note { margin-top: 10px; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; font-weight: 640; display: flex; align-items: center; gap: 8px; }
.ai-note.busy { background: var(--blue-soft); color: var(--blue); }
.ai-note.ok { background: var(--green-soft); color: var(--green); }
.ai-note.warn { background: var(--amber-soft); color: var(--amber); }
.spinner { width: 18px; height: 18px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; color: var(--maroon); }
.ai-note .spinner { color: inherit; }
.empty .spinner { margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* claim header (maroon glass) */
.claim-head { position: relative; overflow: hidden; border-radius: 24px; padding: 17px; margin-bottom: 12px; }
.claim-head::after { content: ""; position: absolute; width: 200px; height: 200px; right: -60px; top: -80px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.24), transparent 65%); pointer-events: none; }
.claim-head .no { font-size: 12.5px; color: rgba(255,255,255,.75); font-weight: 650; letter-spacing: .3px; }
.claim-head .ttl { font-size: 19px; font-weight: 720; margin: 3px 0 8px; }
.claim-head .tot { font-size: 32px; font-weight: 820; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.claim-head .meta { font-size: 13px; color: rgba(255,255,255,.78); margin-top: 3px; }
.steps { display: flex; margin: 16px 0 2px; }
.step { flex: 1; text-align: center; font-size: 11px; font-weight: 650; color: rgba(255,255,255,.55); position: relative; padding-top: 19px; }
.step::before { content: ""; position: absolute; top: 4px; left: 50%; transform: translateX(-50%); width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,.25); border: 1px solid rgba(255,255,255,.4); z-index: 1; }
.step::after { content: ""; position: absolute; top: 9px; left: -50%; width: 100%; height: 2px; background: rgba(255,255,255,.2); }
.step:first-child::after { display: none; }
.step.done { color: #fff; }
.step.done::before { background: #fff; box-shadow: 0 0 10px rgba(255,255,255,.8); }
.step.done::after { background: rgba(255,255,255,.85); }
.banner { padding: 12px 14px; border-radius: 16px; margin-bottom: 12px; font-size: 14px; }
.banner b { display: block; margin-bottom: 2px; }
.banner.red { background: linear-gradient(120deg, rgba(255,226,223,.85), rgba(255,255,255,.6)); color: #7A1A14; }
.banner.red b { color: var(--red); }
.banner.blue { background: linear-gradient(120deg, rgba(222,233,250,.85), rgba(255,255,255,.6)); color: #1B3F6E; }
.banner.blue b { color: var(--blue); }
.banner.green { background: linear-gradient(120deg, rgba(219,242,229,.85), rgba(255,255,255,.6)); color: #14532F; }
.banner.green b { color: var(--green); }
.banner.amber { background: linear-gradient(120deg, rgba(255,236,205,.85), rgba(255,255,255,.6)); color: #6B4200; }
.banner.amber b { color: var(--amber); }

.action-bar { position: fixed; left: 12px; right: 12px; bottom: calc(var(--nav-h) + var(--safe-b) + 18px); z-index: 25; padding: 10px; border-radius: 20px; max-width: 560px; margin: 0 auto;
  background: rgba(255,255,255,.78); -webkit-backdrop-filter: blur(24px) saturate(170%); backdrop-filter: blur(24px) saturate(170%); border: 1px solid var(--edge); box-shadow: 0 10px 28px rgba(92,20,34,.18); }
.action-bar .inner { display: flex; gap: 10px; }
.action-bar .btn { flex: 1; }

.log { font-size: 13.5px; }
.log .e { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.log .e:last-child { border-bottom: 0; }
.log .when { color: var(--muted); font-size: 12px; white-space: nowrap; }

/* sheet — white glass */
.sheet-wrap { position: fixed; inset: 0; z-index: 60; background: rgba(60,15,25,.32); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 560px; border-radius: 26px 26px 0 0; padding: 20px 16px calc(18px + var(--safe-b)); max-height: 88vh; overflow-y: auto; animation: up .2s ease-out;
  background: rgba(255,255,255,.90); -webkit-backdrop-filter: blur(30px) saturate(170%); backdrop-filter: blur(30px) saturate(170%);
  border: 1px solid var(--edge); border-bottom: 0; box-shadow: 0 -10px 40px rgba(60,15,25,.25); }
.sheet::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; background: rgba(122,30,44,.2); margin: -8px auto 14px; }
.sheet h3 { margin: 0 0 12px; font-size: 18px; color: var(--maroon); }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + var(--safe-b) + 96px); z-index: 80; background: rgba(60,15,25,.92); color: #fff; padding: 11px 16px; border-radius: 14px; font-weight: 650; font-size: 14px; max-width: calc(100% - 32px); box-shadow: 0 10px 28px rgba(0,0,0,.25); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }

/* login */
.login { min-height: 100vh; display: flex; flex-direction: column; padding: calc(env(safe-area-inset-top,0px) + 44px) 22px 30px; max-width: 460px; margin: 0 auto; }
.login .logo { width: 78px; height: 78px; border-radius: 22px; display: grid; place-items: center; margin-bottom: 18px; box-shadow: 0 12px 28px rgba(92,20,34,.35); }
.login .logo img { width: 78px; height: 78px; border-radius: 22px; }
.login h2 { font-size: 28px; margin: 0; letter-spacing: -.3px; color: var(--maroon); }
.login p { color: var(--muted); margin: 6px 0 26px; }
.login .panel { border-radius: 24px; padding: 20px 18px; background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--edge); box-shadow: 0 16px 40px rgba(122,30,44,.14), inset 0 1px 0 #fff; }
.pin-boxes { display: flex; gap: 10px; justify-content: center; margin: 6px 0 14px; }
.pin-boxes input { width: 56px; height: 60px; text-align: center; font-size: 26px; font-weight: 750; border: 1px solid rgba(122,30,44,.16); border-radius: 14px; outline: none; background: rgba(255,255,255,.8); color: var(--maroon); -webkit-text-security: disc; }
.pin-boxes input:focus { border-color: var(--maroon); box-shadow: 0 0 0 3px rgba(122,30,44,.1); }
.err { color: var(--red); font-size: 14px; font-weight: 650; min-height: 20px; margin-bottom: 8px; }

/* reports */
.bar-row { margin-bottom: 11px; }
.bar-row:last-child { margin-bottom: 0; }
.bar-row .top { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 5px; gap: 8px; }
.bar-row .top span:last-child { font-weight: 720; font-variant-numeric: tabular-nums; }
.bar { height: 8px; border-radius: 4px; background: rgba(122,30,44,.08); overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, #E8A0AD, #7A1E2C); border-radius: 4px; }
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.filters .field { margin-bottom: 0; min-width: 0; }
.filters .input { min-width: 0; padding-left: 10px; padding-right: 8px; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }

.receipt-view img { width: 100%; border-radius: 14px; margin-bottom: 10px; border: 1px solid var(--line); }
.muted { color: var(--muted); }
.mt { margin-top: 12px; }
.center { text-align: center; }
.avatar { border-radius: 50% !important; background: var(--mglass); color: #fff; border-color: rgba(255,255,255,.3); }

/* phones without backdrop-filter: make glass more solid */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --glass: rgba(255,255,255,.94); }
}

@media (min-width: 700px) {
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .filters { grid-template-columns: repeat(4, 1fr); }
}

/* ===== v2 additions: upload, trip bundle, approvals, alerts ===== */
.small { font-size: 13px; }
.link { cursor: pointer; }
.icon-btn2 { width: 36px; height: 36px; border-radius: 11px; display: inline-grid; place-items: center; color: var(--maroon); background: rgba(122,30,44,.07); flex: 0 0 auto; position: relative; }
.icon-btn2 svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bell { position: relative; }
.bell .bdg, .icon-btn2 .bdg { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #fff; color: var(--maroon); font-size: 10.5px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.icon-btn2 .bdg { background: var(--maroon); color: #fff; }
.spinner.xs { width: 13px; height: 13px; border-width: 2px; display: inline-block; vertical-align: -2px; margin-right: 6px; }
.spinner.light { color: #fff; }
.receipt-pick button small { font-weight: 550; font-size: 11.5px; color: var(--muted); }
.alert-tile.resume { background: linear-gradient(120deg, rgba(222,233,250,.9), rgba(255,255,255,.6)); border-color: rgba(35,88,154,.25); }
.alert-tile.resume b { background: linear-gradient(145deg, #3A72B8, #23589A); }
.alert-tile.resume span { color: #1B3F6E; }
.banner.soft { background: rgba(255,255,255,.6); color: var(--ink); }
.banner.soft b { color: var(--maroon); }

/* file icons + upload list */
.ficon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-size: 10.5px; font-weight: 800; letter-spacing: .4px; flex: 0 0 auto; color: #fff; background: linear-gradient(145deg, #8A8A8A, #5E5E5E); }
.ficon.k-pdf { background: linear-gradient(145deg, #D4483B, #A52A20); }
.ficon.k-doc { background: linear-gradient(145deg, #3A72B8, #23589A); }
.ficon.k-image { background: linear-gradient(145deg, #2A9A63, #1A6E45); }
.thumb.sm { width: 40px; height: 40px; border-radius: 10px; box-shadow: none; }
.up-item .s { display: flex; align-items: center; }
.up-done { color: var(--green) !important; font-weight: 600; }
.up-warn, .up-manual { color: var(--amber) !important; font-weight: 600; }
.up-error { color: var(--red) !important; font-weight: 600; }
.x-btn { width: 30px; height: 30px; border-radius: 50%; background: rgba(122,30,44,.07); color: var(--maroon); font-size: 18px; line-height: 30px; flex: 0 0 auto; }

/* review groups */
.group { padding: 0; overflow: hidden; }
.g-head { display: flex; align-items: center; gap: 12px; padding: 14px 15px 10px; }
.g-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--mglass); color: #fff; flex: 0 0 auto; }
.g-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.g-main { flex: 1; min-width: 0; }
.g-title { width: 100%; border: 0; border-bottom: 1.5px dashed var(--maroon-line); background: transparent; font-weight: 720; font-size: 16px; color: var(--ink); padding: 2px 0 3px; outline: none; }
.g-title:focus { border-bottom-color: var(--maroon); }
.g-title-ro { font-weight: 720; font-size: 16px; }
.g-meta { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.g-total { font-weight: 800; font-size: 17px; color: var(--maroon); font-variant-numeric: tabular-nums; }
.group select.g-target { margin: 0 15px 10px; width: calc(100% - 30px); min-height: 40px; padding: 8px 10px; font-size: 13.5px; }
.g-rows { border-top: 1px solid var(--line); }
.file-link { display: inline-flex; align-items: center; gap: 6px; color: var(--maroon); font-weight: 650; font-size: 13.5px; text-decoration: none; margin-bottom: 12px; }
.file-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.att { position: relative; }
.att .thumb { width: 74px; height: 74px; }
.att-file { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.7); border: 1px solid var(--edge); border-radius: 12px; padding: 8px 30px 8px 8px; font-size: 13px; font-weight: 600; max-width: 260px; }
.att-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att .x { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 14px; line-height: 22px; text-align: center; }

/* trip header steps with level tags */
.step i { display: block; font-style: normal; font-size: 9.5px; opacity: .75; }
.step.cur { color: #fff; }
.step.cur::before { background: #FFCB7A; border-color: #fff; box-shadow: 0 0 0 3px rgba(255,203,122,.35); }
.lvl-tag { display: inline-block; font-size: 11px; font-weight: 750; color: var(--maroon); background: rgba(122,30,44,.08); padding: 2px 7px; border-radius: 10px; margin-right: 5px; }

/* consolidated table */
.ctable-card { padding: 6px 4px 12px; }
.ctable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ctable th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 700; padding: 8px 8px; border-bottom: 1px solid var(--line); }
.ctable td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ctable tbody tr { cursor: pointer; }
.ctable tbody tr:active { background: var(--maroon-soft); }
.ctable .n { color: var(--muted); width: 22px; }
.ctable .d { white-space: nowrap; color: var(--muted); font-weight: 600; }
.ctable .r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ctable .s { color: var(--muted); font-size: 12px; margin-top: 2px; }
.ctable tfoot td { border-bottom: 0; font-weight: 800; color: var(--maroon); font-size: 14.5px; padding-top: 12px; }
.cat-sum { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 8px 0; }
.pill { font-size: 12px; padding: 4px 10px; border-radius: 14px; background: rgba(122,30,44,.07); color: var(--ink); display: inline-flex; align-items: center; gap: 4px; }
.pill b { color: var(--maroon); }
.pill.place svg { width: 13px; height: 13px; fill: none; stroke: var(--maroon); stroke-width: 2; }

/* bills bundle */
.bill { padding: 12px; }
.bill-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.bill-no { background: var(--mglass); color: #fff; font-weight: 750; font-size: 12px; padding: 4px 9px; border-radius: 9px; flex: 0 0 auto; }
.bill-t { flex: 1; font-size: 13px; color: var(--muted); line-height: 1.45; }
.bill-t b { color: var(--ink); }
.bill-img { width: 100%; border-radius: 12px; border: 1px solid var(--line); display: block; background: #fff; }
.pdf-pages { display: flex; flex-direction: column; gap: 8px; }
.pdf-page { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); background: #fff; box-shadow: 0 2px 8px rgba(122,30,44,.08); }
.doc-prev pre { white-space: pre-wrap; word-break: break-word; font: 12.5px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; background: rgba(255,255,255,.75); border: 1px solid var(--line); border-radius: 12px; padding: 12px; max-height: 320px; overflow: auto; margin: 10px 0; }

/* approval trail */
.trail .tr-row { display: flex; gap: 12px; align-items: flex-start; padding: 9px 0; position: relative; }
.trail .tr-row:not(:last-child)::after { content: ""; position: absolute; left: 14px; top: 38px; bottom: -8px; width: 2px; background: var(--line); }
.tr-dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: 0 0 auto; background: rgba(122,30,44,.08); color: var(--maroon); }
.tr-row.done .tr-dot { background: linear-gradient(145deg, #2A9A63, #1A6E45); color: #fff; }
.tr-row.current .tr-dot { background: linear-gradient(145deg, #D08A1E, #A86400); color: #fff; box-shadow: 0 0 0 4px rgba(214,140,20,.18); }
.trail .s { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* search + filters */
.searchbar { display: flex; align-items: center; gap: 8px; background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--edge); box-shadow: var(--shadow); border-radius: 16px; padding: 6px 6px 6px 12px; margin-bottom: 10px; }
.searchbar > svg { width: 19px; height: 19px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; flex: 0 0 auto; }
.searchbar input { flex: 1; border: 0; outline: none; background: transparent; min-height: 36px; font-size: 15px; color: var(--ink); min-width: 0; }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 10px; }
.fchip { font-size: 12.5px; font-weight: 650; padding: 5px 10px; border-radius: 14px; background: var(--mglass); color: #fff; text-decoration: none; }
.sumline { display: flex; justify-content: space-between; align-items: center; padding: 12px 15px; }
.sumline b { font-size: 18px; color: var(--maroon); }
.amber { color: var(--amber); }

/* team table */
.table-card { padding: 6px 0 12px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ttable { border-collapse: collapse; font-size: 13.5px; min-width: 760px; width: 100%; }
.ttable th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 700; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ttable td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ttable tbody tr { cursor: pointer; }
.ttable tbody tr:active { background: var(--maroon-soft); }
.ttable td:first-child, .ttable th:first-child { position: sticky; left: 0; background: rgba(255,255,255,.92); padding-left: 14px; }
.ttable .r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ttable .s { color: var(--muted); font-size: 12px; margin-top: 2px; }
.ttable tfoot td { font-weight: 800; color: var(--maroon); border-bottom: 0; }
.table-card > p { padding: 0 14px; }

/* alerts */
.notif .msg { font-size: 14px; line-height: 1.4; white-space: normal; }
.notif.unread { background: rgba(122,30,44,.05); }
.notif.unread .msg { font-weight: 650; }
.nicon { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; flex: 0 0 auto; font-weight: 800; color: #fff; background: var(--mglass); align-self: flex-start; }
.nicon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.nicon.k-approve { background: linear-gradient(145deg, #D08A1E, #A86400); }
.nicon.k-pay { background: linear-gradient(145deg, #3A72B8, #23589A); }
.nicon.k-paid { background: linear-gradient(145deg, #2A9A63, #1A6E45); }
.nicon.k-returned, .nicon.k-rejected { background: linear-gradient(145deg, #D4483B, #A52A20); }

/* staff approval order editor */
.chain-edit { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; position: relative; }
.chain-edit .lvl { display: flex; align-items: center; gap: 10px; }
.chain-edit .lvl .input { flex: 1; }
.chain-edit .n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--mglass); color: #fff; flex: 0 0 auto; }
.chain-edit .lvl.off { opacity: .45; }
.chain-edit .final { background: rgba(30,122,76,.08); border-radius: 14px; padding: 10px; }
.chain-edit .final .n { background: linear-gradient(145deg, #2A9A63, #1A6E45); }
.chain-edit .final .s { color: var(--muted); font-size: 12.5px; }
.chain-s { color: var(--maroon) !important; font-weight: 600; }

/* reports */
.filters .wide { grid-column: 1 / -1; }
.bar-row.tap { cursor: pointer; }
@media (min-width: 700px) { .filters .wide { grid-column: span 2; } }
.ttable td:first-child { min-width: 150px; }
.ttable td:nth-child(2) { min-width: 120px; }

/* ===== v3: roles + accounts ===== */
.st-verified { background: rgba(30,122,76,.16); color: #14532F; }
.seg { display: flex; background: rgba(122,30,44,.07); border-radius: 14px; padding: 4px; margin-bottom: 16px; }
.seg button { flex: 1; padding: 10px; border-radius: 11px; font-weight: 700; color: var(--muted); }
.seg button.on { background: var(--mglass); color: #fff; box-shadow: 0 4px 12px rgba(92,20,34,.25); }
.age { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; align-content: center; flex: 0 0 auto; background: rgba(35,88,154,.1); color: var(--blue); line-height: 1; }
.age b { font-size: 16px; }
.age small { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; margin-top: 2px; }
.age.mid { background: rgba(214,140,20,.14); color: var(--amber); }
.age.old { background: rgba(179,38,30,.12); color: var(--red); }

/* ===== v4: reminders, big buttons, duplicates, payments, responsive ===== */
.small { font-size: 13px; }
.btn.small { min-height: 36px; padding: 7px 12px; font-size: 13.5px; border-radius: 11px; flex: 0 0 auto; }
.st-partpaid { background: var(--amber-soft); color: var(--amber); }
.chip.dup { background: rgba(179,38,30,.12); color: var(--red); }
.nav-add-label { display: none; }

/* reminders ("To do") */
.reminders { display: grid; gap: 10px; margin-bottom: 14px; }
.remind { border-radius: var(--radius); padding: 12px 12px 10px; border: 1px solid var(--edge); background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--shadow); }
.remind .rm-h { display: flex; align-items: center; gap: 10px; padding: 2px 2px 8px; }
.remind .rm-h b { font-size: 15px; line-height: 1.3; }
.rm-i { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: 0 0 auto; color: #fff; font-weight: 800; background: var(--mglass); }
.rm-i svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.rm-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 6px; border-top: 1px solid var(--line); }
.rm-row .main { flex: 1; min-width: 0; }
.rm-row .t { font-weight: 650; font-size: 14px; }
.rm-row .s { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rm-r { font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rm-row .go { color: var(--muted); font-size: 18px; }
.rm-btn { margin-top: 8px; }
.remind.hot { background: linear-gradient(135deg, rgba(42,154,99,.16), rgba(255,255,255,.72)); border-color: rgba(30,122,76,.35); animation: glow 2.4s ease-in-out infinite; }
.remind.hot .rm-i { background: linear-gradient(145deg, #2A9A63, #1A6E45); }
.remind.amber { background: linear-gradient(135deg, rgba(255,214,150,.45), rgba(255,255,255,.72)); border-color: rgba(214,140,20,.35); }
.remind.amber .rm-i { background: linear-gradient(145deg, #D08A1E, #A86400); }
.remind.red { background: linear-gradient(135deg, rgba(255,205,200,.5), rgba(255,255,255,.72)); border-color: rgba(179,38,30,.3); }
.remind.red .rm-i { background: linear-gradient(145deg, #D4483B, #A52A20); }
.remind.green .rm-i { background: linear-gradient(145deg, #2A9A63, #1A6E45); }
.remind.info .rm-i { background: linear-gradient(145deg, #3A72B8, #23589A); }
@keyframes glow { 0%, 100% { box-shadow: var(--shadow); } 50% { box-shadow: 0 0 0 4px rgba(42,154,99,.18), var(--shadow); } }

/* how it works */
.how b { font-size: 15px; }
.how-steps { display: grid; gap: 10px; margin-top: 10px; }
.how-steps > div { display: grid; grid-template-columns: 34px 1fr; column-gap: 10px; align-items: start; }
.how-steps span { grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; background: var(--mglass); color: #fff; display: grid; place-items: center; font-weight: 800; }
.how-steps small { color: var(--muted); font-size: 13px; }

/* donut text always fits */
.ring b { font-size: 14px; white-space: nowrap; }
.ring div { max-width: 78px; }

/* open trips with a big Edit button */
.open-trip { padding: 10px 10px 10px 15px; }
.open-trip > .main { text-align: left; }
.open-trip .s { margin-top: 3px; }
.btn.edit-big { flex: 0 0 auto; min-width: 84px; min-height: 56px; flex-direction: column; gap: 3px; padding: 8px 12px; background: var(--mglass); color: #fff; border-radius: 14px; box-shadow: var(--mshadow); font-size: 13px; }
.btn.edit-big svg { width: 20px; height: 20px; }

/* three big add buttons */
.receipt-pick.three { grid-template-columns: 1fr 1fr; }
.receipt-pick.three button:nth-child(3) { grid-column: 1 / -1; flex-direction: row; justify-content: center; gap: 10px; padding: 16px; border-style: solid; background: rgba(255,255,255,.75); }
.receipt-pick.three button:nth-child(3) small { display: none; }

/* trip page */
.dup-tag { margin-top: 5px; font-size: 12px; font-weight: 650; color: var(--red); background: rgba(179,38,30,.08); border-radius: 8px; padding: 4px 7px; }
.edit-pill { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 12px; font-weight: 700; color: #fff; background: var(--mglass); padding: 5px 10px; border-radius: 10px; }
.edit-pill svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.pays .e { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.pays .when { color: var(--muted); font-size: 12px; text-align: right; white-space: nowrap; }
.pay-sum { display: flex; justify-content: space-between; gap: 10px; padding-top: 10px; font-size: 14px; }
.pay-sum b { color: var(--maroon); }
.qs .q { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.qs .q:last-of-type { border-bottom: 0; }
.q-ask div, .q-ans div { margin-top: 2px; font-size: 14px; }
.q-ans { margin: 8px 0 0 14px; padding: 8px 10px; border-left: 3px solid var(--green); background: rgba(30,122,76,.06); border-radius: 0 10px 10px 0; }
.qs .btn.small { margin-top: 8px; }
.qs #askBtn { margin-top: 10px; }
.pay-box { display: flex; gap: 8px; margin: 4px 0 14px; }
.pay-box > div { flex: 1; background: rgba(122,30,44,.06); border-radius: 12px; padding: 9px 10px; }
.pay-box span { display: block; font-size: 11.5px; color: var(--muted); font-weight: 650; }
.pay-box b { font-variant-numeric: tabular-nums; }
.pay-box b.big { font-size: 18px; color: var(--maroon); }

/* login: first accounts login */
.first-acct { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 12px 14px; margin-bottom: 14px; border-radius: 14px; background: linear-gradient(120deg, rgba(255,214,150,.5), rgba(255,255,255,.7)); border: 1px solid rgba(214,140,20,.35); color: #6B4200; }
.first-acct b { display: block; }
.first-acct span { flex: 1; font-size: 13px; }
.row > button.main { text-align: left; }

/* ---------- tablet ---------- */
@media (min-width: 600px) {
  main { max-width: 880px; padding-left: 24px; padding-right: 24px; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .reminders { grid-template-columns: 1fr 1fr; }
  .receipt-pick.three { grid-template-columns: 1fr 1fr 1fr; }
  .receipt-pick.three button:nth-child(3) { grid-column: auto; flex-direction: column; border-style: dashed; }
  .receipt-pick.three button:nth-child(3) small { display: block; }
  .how-steps { grid-template-columns: repeat(3, 1fr); }
  .how-steps > div { grid-template-columns: 1fr; text-align: left; }
  .how-steps span { grid-row: auto; margin-bottom: 6px; }
  .sheet-wrap { align-items: center; }
  .sheet { border-radius: 26px; border-bottom: 1px solid var(--edge); max-height: 86vh; }
  .sheet::before { display: none; }
}

/* ---------- desktop / large tablet landscape: side navigation ---------- */
@media (min-width: 1024px) {
  body { padding-left: 236px; }
  .topbar { padding-left: 28px; padding-right: 28px; }
  .bottombar {
    left: 16px; top: 16px; bottom: 16px; right: auto; width: 204px; height: auto; max-width: none; margin: 0;
    flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 4px; padding: 14px 10px;
  }
  .bottombar::before { content: "PLUS Expense"; color: #fff; font-weight: 800; font-size: 16px; padding: 6px 12px 16px; letter-spacing: .2px; }
  .nav-item { flex: 0 0 auto; height: 46px; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 0 14px; font-size: 14.5px; border-radius: 14px; }
  .nav-item.active::before { inset: 0; border-radius: 14px; }
  .nav-item .badge { position: static; margin-left: auto; }
  .nav-add { order: -1; width: 100%; height: 48px; margin: 0 0 12px; border-radius: 14px; gap: 8px; display: flex; align-items: center; justify-content: center; font-weight: 750; }
  .nav-add svg { width: 22px; height: 22px; }
  .nav-add-label { display: inline; }
  main { max-width: 1160px; padding: 24px 36px 120px; }
  main.no-nav { padding-bottom: 40px; }
  .action-bar { left: 268px; right: 36px; bottom: 20px; max-width: 820px; margin: 0 auto; }
  .toast { left: calc(50% + 118px); bottom: 40px; }
  .reminders { grid-template-columns: repeat(3, 1fr); }
  .home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
  #bills { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  #bills .bill { margin-bottom: 0; }
  .hero { padding: 26px 28px 24px; }
  .hero-actions { max-width: 520px; }
  .login { padding-top: 70px; }
}
/* the login page has no side navigation */
body:has(main.no-nav) { padding-left: 0; }
@media (min-width: 1024px) { .bottombar::before { order: -2; } }
/* never wider than the screen */
.reminders > *, .home-grid > *, .tiles > *, .kpis > *, .grid2 > *, .filters > * { min-width: 0; }
.remind { overflow: hidden; }
.rm-row .s { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
main { overflow-x: clip; }
.sheet { max-height: 88dvh; }

/* v6: start fresh */
.card.danger-zone { border-color: rgba(179,38,30,.28); background: linear-gradient(160deg, rgba(255,240,238,.75), rgba(255,255,255,.6)); }
.card.danger-zone > b { color: var(--red); }

/* add bills: four big choices (2 x 2 on phones, one row on tablets and computers) */
.receipt-pick.four { grid-template-columns: 1fr 1fr; gap: 12px; }
.receipt-pick.four button { min-height: 132px; justify-content: center; padding: 18px 10px; font-size: 16px; text-align: center; }
.receipt-pick.four button svg { width: 32px; height: 32px; }
.receipt-pick.four button small { font-size: 12px; line-height: 1.3; max-width: 150px; }
.receipt-pick.four button.hand { border-style: solid; background: rgba(255,255,255,.8); }
.receipt-pick.tri { grid-template-columns: repeat(3, 1fr); gap: 8px; }
.receipt-pick.tri button { padding: 16px 4px; font-size: 14px; }
@media (min-width: 600px) {
  .receipt-pick.four { grid-template-columns: repeat(4, 1fr); }
}

/* ================= v7: daily allowance ================= */
.today-tile { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; padding: 16px; margin-bottom: 12px; border-radius: 20px; background: var(--mglass); color: #fff; box-shadow: var(--mshadow); border: 1px solid rgba(255,255,255,.25); }
.today-tile svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.today-tile div { flex: 1; } .today-tile b { display: block; font-size: 17px; } .today-tile small { opacity: .85; font-size: 13px; }
.today-tile .go { font-size: 24px; opacity: .8; }
.g-lbl { display: flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; color: var(--maroon); margin-bottom: 4px; }
.g-lbl svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.g-title.input { font-weight: 700; font-size: 15.5px; padding: 9px 12px; border: 1.5px solid var(--maroon-line); }
.ren-chip { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; margin-left: 6px; font-size: 12px; font-weight: 700; color: #fff; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.3); padding: 4px 10px; border-radius: 12px; }
.ren-chip svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.btn.big { padding: 16px; font-size: 16.5px; }
.link { color: var(--maroon); font-weight: 700; text-decoration: underline; background: none; border: 0; padding: 0; }
.spinner.sm { width: 13px; height: 13px; border-width: 2px; display: inline-block; vertical-align: -2px; }
.flag { display: inline-block; margin-top: 4px; font-size: 11.5px; font-weight: 700; color: var(--amber); background: var(--amber-soft); border-radius: 8px; padding: 3px 7px; }
.rej-note { margin-top: 4px; font-size: 12px; font-weight: 700; color: var(--red); }

/* calendar */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 10px; }
.cal-head b { font-size: 19px; }
.cal-head .icon-btn2.flip svg { transform: rotate(180deg); }
.cal-head .icon-btn2[disabled] { opacity: .35; }
.rate-strip { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; }
.rate-strip div { flex: 1; min-width: 0; } .rate-strip span { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.rate-strip b { font-size: 13.5px; color: var(--maroon); } .rate-strip em { font-style: normal; font-size: 22px; color: var(--maroon); }
.cal { background: var(--glass); border: 1px solid var(--edge); border-radius: 22px; padding: 10px 8px 12px; box-shadow: var(--shadow); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.cal-w { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 11.5px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.cal-w span:last-child { color: var(--maroon); }
.cal-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-d { position: relative; aspect-ratio: 1 / 1.12; min-height: 52px; border-radius: 13px; border: 1px solid rgba(122,30,44,.08); background: rgba(255,255,255,.7); display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 5px 2px 3px; gap: 1px; color: var(--ink); overflow: hidden; }
.cal-d.blank { background: transparent; border: 0; }
.cal-d b { font-size: 15px; font-weight: 750; line-height: 1.1; }
.cal-d small { font-size: 10.5px; font-weight: 700; line-height: 1.1; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.cal-d small.add { font-size: 16px; color: var(--maroon); opacity: .45; }
.cal-d em { position: absolute; top: 3px; right: 4px; font-style: normal; font-size: 9.5px; font-weight: 800; color: var(--blue); }
.cal-d .tick { font-style: normal; width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 900; color: #fff; background: var(--maroon); }
.cal-d.sun b { color: var(--maroon); }
.cal-d.today { border: 2px solid var(--maroon); box-shadow: 0 0 0 3px rgba(122,30,44,.12); }
.cal-d.future { opacity: .38; }
.cal-d.missing { background: rgba(255,240,240,.75); }
.cal-d.missing::after { content: ""; position: absolute; top: 5px; left: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.cal-d.t-hq { background: linear-gradient(160deg, rgba(122,30,44,.12), rgba(255,255,255,.75)); }
.cal-d.t-exhq { background: linear-gradient(160deg, rgba(214,140,20,.20), rgba(255,255,255,.75)); } .cal-d.t-exhq .tick { background: var(--amber); }
.cal-d.t-out { background: linear-gradient(160deg, rgba(35,88,154,.18), rgba(255,255,255,.75)); } .cal-d.t-out .tick { background: var(--blue); }
.cal-d.t-holiday, .cal-d.t-leave { background: rgba(240,236,237,.9); } .cal-d.t-holiday .tick, .cal-d.t-leave .tick { background: #9A8C8F; }
.cal-d.locked .tick { box-shadow: 0 0 0 2px #fff, 0 0 0 3px currentColor; }
.cal-d.st-paid .tick { background: var(--green); }
.cal-d.rej { outline: 2px solid var(--red); outline-offset: -2px; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 8px 12px; justify-content: center; margin-top: 10px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.cal-legend .lg::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; background: var(--maroon); }
.cal-legend .lg.t-exhq::before { background: var(--amber); } .cal-legend .lg.t-out::before { background: var(--blue); } .cal-legend .lg.t-holiday::before { background: #9A8C8F; }
.cal-legend .lg.missing::before { background: var(--red); border-radius: 50%; width: 7px; height: 7px; }
.fn .fn-h { display: flex; gap: 10px; align-items: flex-start; }
.fn .fn-h > div:first-child { flex: 1; min-width: 0; }
.fn .fn-h .s { font-size: 13px; color: var(--muted); margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.fn-amt { font-size: 19px; font-weight: 800; color: var(--maroon); white-space: nowrap; }
.fn-miss { margin: 10px 0 2px; font-size: 13px; font-weight: 700; color: var(--red); }
.fn .btn-row { margin-top: 10px; }

/* state / city type-ahead */
.field.ac { position: relative; }
.ac-list { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; margin-top: 4px; background: #fff; border: 1px solid var(--maroon-line); border-radius: 14px; box-shadow: 0 14px 30px rgba(92,20,34,.18); max-height: 260px; overflow-y: auto; }
.ac-list button { display: flex; width: 100%; justify-content: space-between; align-items: baseline; gap: 8px; padding: 11px 13px; text-align: left; font-size: 14.5px; font-weight: 600; border-bottom: 1px solid var(--line); background: #fff; }
.ac-list button:last-child { border-bottom: 0; }
.ac-list button small { font-size: 11.5px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.ac-list button:active, .ac-list button:hover { background: var(--maroon-soft); }

/* day form */
.dt-pick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 12px; }
.dt-pick button { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 9px; align-items: center; text-align: left; padding: 12px; border-radius: 16px; border: 1.5px solid var(--edge); background: rgba(255,255,255,.75); box-shadow: 0 2px 8px rgba(122,30,44,.07); min-height: 64px; }
.dt-pick button svg { grid-row: 1 / 3; width: 26px; height: 26px; fill: none; stroke: var(--maroon); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dt-pick button b { font-size: 14.5px; } .dt-pick button small { font-size: 12px; color: var(--muted); font-weight: 650; }
.dt-pick button.on { background: var(--mglass); color: #fff; border-color: rgba(255,255,255,.3); box-shadow: 0 8px 18px rgba(92,20,34,.28); }
.dt-pick button.on svg { stroke: #fff; } .dt-pick button.on small { color: rgba(255,255,255,.85); }
.dt-pick button:last-child:nth-child(odd) { grid-column: 1 / -1; }
.hq-note { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 13px; background: var(--maroon-soft); font-size: 14px; margin-bottom: 12px; }
.hq-note svg { width: 18px; height: 18px; fill: none; stroke: var(--maroon); stroke-width: 2; flex: 0 0 auto; }
.allow-amt { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; margin: 12px 0; border-radius: 16px; background: linear-gradient(120deg, rgba(222,244,232,.9), rgba(255,255,255,.7)); border: 1px solid rgba(30,122,76,.18); }
.allow-amt span { display: block; font-size: 12px; font-weight: 700; color: var(--green); text-transform: uppercase; letter-spacing: .04em; }
.allow-amt b { font-size: 24px; color: var(--green); } .allow-amt small { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.ex-head { margin: 16px 0 8px; } .ex-head b { display: block; font-size: 15px; } .ex-head small { font-size: 12.5px; color: var(--muted); }
.ex-row { border: 1px solid var(--edge); background: rgba(255,255,255,.75); border-radius: 16px; padding: 10px; margin-bottom: 8px; box-shadow: 0 2px 8px rgba(122,30,44,.06); }
.ex-row.rej { border-color: rgba(179,38,30,.35); }
.ex-top { display: grid; grid-template-columns: 1fr 120px 34px; gap: 8px; align-items: center; }
.ex-top select.input { padding: 9px 8px; font-size: 14px; min-width: 0; }
.amount-input.sm { padding: 2px 10px; border-radius: 13px; box-shadow: none; }
.amount-input.sm span { font-size: 16px; margin-right: 3px; } .amount-input.sm input { font-size: 18px; padding: 7px 0; }
.ex-x { width: 34px; height: 34px; border-radius: 10px; background: var(--red-soft); color: var(--red); font-size: 20px; font-weight: 700; }
.ex-note { margin-top: 8px; padding: 9px 11px; font-size: 14px; }
.ex-bill { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.ex-file { position: relative; width: 46px; height: 46px; border-radius: 10px; overflow: hidden; border: 1px solid var(--edge); background: #fff; display: grid; place-items: center; }
.ex-file img { width: 100%; height: 100%; object-fit: cover; }
.ex-file button { position: absolute; top: 1px; right: 1px; width: 18px; height: 18px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; line-height: 18px; }
.ex-up { display: flex; gap: 6px; }
.ex-up button { width: 40px; height: 40px; border-radius: 12px; border: 1.5px dashed var(--maroon-line); background: rgba(255,255,255,.7); color: var(--maroon); display: grid; place-items: center; }
.ex-up svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ex-st { font-size: 12px; color: var(--muted); font-weight: 600; }
.ex-add { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 4px; }
.ex-add button { padding: 9px 12px; border-radius: 20px; border: 1.5px dashed var(--maroon-line); background: rgba(255,255,255,.7); color: var(--maroon); font-weight: 700; font-size: 13.5px; }
.sheet-actions .btn.primary { flex: 2; }

/* home: today */
.today-card { border: 1.5px solid rgba(30,122,76,.25); background: linear-gradient(150deg, rgba(232,248,239,.9), rgba(255,255,255,.7)); }
.tc-h { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.tc-h svg { width: 26px; height: 26px; fill: none; stroke: var(--green); stroke-width: 2; flex: 0 0 auto; }
.tc-h b { display: block; font-size: 16px; } .tc-h small { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.tc-done { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.75); }
.tc-done div { flex: 1; } .tc-done b { display: block; } .tc-done small { color: var(--muted); font-weight: 600; }
.tick { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; font-weight: 900; flex: 0 0 auto; }
.tc-cal { display: block; text-align: right; margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--green); text-decoration: none; }

/* line-by-line review */
.rv { display: inline-flex; gap: 6px; margin-top: 6px; }
.rv button { width: 38px; height: 38px; border-radius: 12px; font-size: 18px; font-weight: 900; border: 1.5px solid var(--line); background: rgba(255,255,255,.85); }
.rv-ok { color: var(--green); } .rv-no { color: var(--red); }
.rv-ok.on { background: var(--green); color: #fff; border-color: var(--green); }
.rv-no.on { background: var(--red); color: #fff; border-color: var(--red); }
tr.rej td { background: rgba(179,38,30,.05); }
tr.rej td b s, .td-line.rej s { color: var(--red); }

/* allowance claim: tour report */
.tour-info { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.tour-info span { display: block; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.tour-info b { font-size: 14px; }
.tour-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.ts { background: var(--glass); border: 1px solid var(--edge); border-radius: 14px; padding: 9px 10px; box-shadow: var(--shadow); min-width: 0; }
.ts span { display: block; font-size: 11.5px; font-weight: 700; color: var(--muted); } .ts b { display: block; font-size: 16px; } .ts small { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.ts-hq b { color: var(--maroon); } .ts-exhq b { color: var(--amber); } .ts-out b { color: var(--blue); }
.tour { padding: 4px 12px; }
.td-row { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.td-row.tap { cursor: pointer; }
.td-date { flex: 0 0 40px; text-align: center; } .td-date b { display: block; font-size: 20px; line-height: 1.1; color: var(--maroon); } .td-date small { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.td-lines { flex: 1; min-width: 0; }
.td-line { display: grid; grid-template-columns: 1fr auto; column-gap: 8px; padding: 4px 0; }
.td-line + .td-line { border-top: 1px solid var(--line); padding-top: 7px; margin-top: 3px; }
.td-line .main { min-width: 0; } .td-line .main b { font-size: 14px; } .td-line .s { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.td-line .amt { text-align: right; font-weight: 750; white-space: nowrap; }
.td-line .rv { grid-column: 1 / -1; justify-content: flex-end; margin-top: 2px; }
.td-line.allow .main b::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--maroon); vertical-align: 1px; }
.td-line.t-exhq .main b::before { background: var(--amber); } .td-line.t-out .main b::before { background: var(--blue); }
.td-line.t-holiday .main b::before, .td-line.t-leave .main b::before { background: #9A8C8F; }
.td-line.rej { opacity: .8; }
.bill-link { color: var(--blue); font-weight: 700; display: block; }
.td-total { display: flex; justify-content: space-between; padding: 12px 0 8px; font-weight: 800; font-size: 16px; color: var(--maroon); }
.td-total span { font-size: 13px; color: var(--muted); font-weight: 700; }

/* settings: rates */
.rates-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
table.rates { border-collapse: separate; border-spacing: 4px; min-width: 860px; }
table.rates th { font-size: 11px; color: var(--muted); text-align: left; font-weight: 700; white-space: nowrap; }
table.rates td .input { padding: 7px 8px; font-size: 13.5px; }
table.rates td:first-child .input { min-width: 220px; }
table.rates td:nth-child(n+2):nth-child(-n+9) .input { width: 76px; }
.cls-list { font-size: 13px; } .cls-list div { padding: 6px 0; border-bottom: 1px dashed var(--line); } .cls-list b { display: block; color: var(--maroon); }

@media (min-width: 600px) {
  .cal-d { min-height: 72px; } .cal-d b { font-size: 17px; } .cal-d small { font-size: 12px; }
  .dt-pick { grid-template-columns: repeat(3, 1fr); }
  .dt-pick button:last-child:nth-child(odd) { grid-column: auto; }
  .tour-sum { grid-template-columns: repeat(6, 1fr); }
  .tour-info { grid-template-columns: repeat(4, 1fr); }
  .td-line { grid-template-columns: 1fr auto auto; align-items: start; }
  .td-line .rv { grid-column: auto; margin-top: 0; }
}
@media (min-width: 1024px) {
  .cal-d { min-height: 84px; }
}
/* calendar: tick in the corner so the amount always shows */
.cal-d { justify-content: center; gap: 2px; }
.cal-d .tick { position: absolute; top: 3px; right: 3px; width: 15px; height: 15px; font-size: 9px; }
.cal-d em { top: auto; bottom: 2px; right: 3px; }
@media (min-width: 600px) { .cal-d { aspect-ratio: auto; min-height: 70px; } .cal-d .tick { width: 18px; height: 18px; font-size: 11px; top: 5px; right: 5px; } }
@media (min-width: 1024px) { .cal { max-width: 900px; } .cal-d { min-height: 76px; } }
/* calendar cell: date top-left, tick top-right, amount at the bottom */
.cal-d:not(.blank) { align-items: stretch; justify-content: space-between; padding: 4px 4px 5px; }
.cal-d b { text-align: left; font-size: 13.5px; padding-left: 1px; }
.cal-d small { text-align: center; }
.cal-d.missing::after { left: auto; right: 6px; top: 6px; }
@media (min-width: 600px) { .cal-d b { font-size: 16px; } .cal-d:not(.blank) { padding: 6px 7px 7px; } }
.cal-d em { top: 20px; bottom: auto; right: 5px; }
.cal-d small.word { font-size: 9.5px; }
@media (min-width: 600px) { .cal-d em { top: 26px; right: 8px; } .cal-d small.word { font-size: 12px; } }

/* v8: install prompt, bill claims on an allowance day */
.install-bar { position: fixed; left: 12px; right: 12px; bottom: calc(var(--nav-h) + var(--safe-b) + 22px); z-index: 50; display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; border-radius: 18px; background: rgba(255,255,255,.94); border: 1px solid var(--edge); box-shadow: 0 16px 36px rgba(92,20,34,.28); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); animation: ibUp .35s ease-out; }
@keyframes ibUp { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.install-bar img { width: 44px; height: 44px; border-radius: 12px; flex: 0 0 auto; }
.ib-t { flex: 1; min-width: 0; } .ib-t b { display: block; font-size: 15px; } .ib-t small { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.ib-x { width: 30px; height: 30px; border-radius: 50%; background: var(--maroon-soft); color: var(--maroon); font-size: 19px; font-weight: 700; flex: 0 0 auto; }
body:has(main.no-nav) .install-bar { bottom: calc(16px + var(--safe-b)); }
.inst-steps { padding-left: 20px; margin: 4px 0 8px; } .inst-steps li { margin-bottom: 10px; line-height: 1.45; }
.ob-box { border: 1px solid var(--maroon-line); border-radius: 16px; padding: 10px 12px; margin: 10px 0 4px; background: rgba(255,255,255,.7); }
.ob-box > b { display: block; font-size: 13px; color: var(--maroon); margin-bottom: 4px; }
.ob { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 6px 0; border-top: 1px dashed var(--line); font-size: 14px; }
.ob small { color: var(--muted); font-weight: 600; } .ob .rej-note { grid-column: 1 / -1; margin-top: 0; }
.ob.bad b { color: var(--red); }
@media (min-width: 1024px) { .install-bar { left: auto; right: 24px; bottom: 24px; width: 430px; } }

/* ================= v9: no zoom, speed, reports ================= */
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* 16px text in boxes stops iPhone from zooming in when you tap them (that zoom made the bottom bar drift) */
@media (hover: none), (pointer: coarse), (max-width: 820px) {
  .input, select.input, textarea.input, .searchbar input, .ex-top select.input, .ex-note, table.rates td .input, .group select.g-target, .g-title.input, input, select, textarea { font-size: 16px; }
  .amount-input input { font-size: 32px; } .amount-input.sm input { font-size: 18px; }
}
.netbar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 90; pointer-events: none; opacity: 0; background: linear-gradient(90deg, transparent, #F3B9C3, #fff, #F3B9C3, transparent); background-size: 50% 100%; background-repeat: no-repeat; transition: opacity .2s; }
.netbar.on { opacity: 1; animation: netrun 1s linear infinite; }
@keyframes netrun { from { background-position: -50% 0; } to { background-position: 150% 0; } }
main.busy { opacity: .55; pointer-events: none; transition: opacity .15s .05s; }
#rep.dim { opacity: .5; pointer-events: none; transition: opacity .15s; }

.rep-filters .seg.rng { margin-bottom: 10px; }
.rep-filters .seg.rng button { padding: 9px 4px; font-size: 13px; }
.rep-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.rep-grid .field { margin-bottom: 8px; }
.kpis.k4 { grid-template-columns: 1fr 1fr; }
.p-table { display: none; }
.person-head { display: flex; gap: 12px; align-items: center; }
.person-head b { font-size: 17px; } .person-head .s { font-size: 13px; color: var(--muted); }
.brk { padding: 6px 15px; }
.brk-r { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: baseline; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14.5px; }
.brk-r:last-child { border-bottom: 0; }
.brk-r .muted { font-size: 12.5px; } .brk-r b { min-width: 90px; text-align: right; font-variant-numeric: tabular-nums; }
.brk-r.tot { font-weight: 800; color: var(--maroon); border-top: 1.5px solid var(--maroon-line); border-bottom: 0; }
.lines-det summary { cursor: pointer; font-weight: 700; color: var(--maroon); padding: 4px 0; }
.lines-det .ttable { min-width: 620px; margin-top: 8px; }
.ttable.small-t td { font-size: 12.5px; padding: 8px; } .ttable.small-t td.s { color: var(--muted); }
@media (min-width: 600px) {
  .rep-grid { grid-template-columns: repeat(4, 1fr); }
  .kpis.k4 { grid-template-columns: repeat(4, 1fr); }
  .p-cards { display: none; } .p-table { display: block; }
}
.rep-filters .seg.rng { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; }
.rep-filters .seg.rng button { padding: 9px 2px; font-size: 12.5px; white-space: nowrap; }
@media (min-width: 600px) { .rep-filters .seg.rng button { font-size: 14px; } }

/* v10 — WhatsApp */
.wa-card { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 34px 12px 12px; margin-bottom: 12px; border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(37,211,102,.10), rgba(255,255,255,.7)); border: 1px solid rgba(30,122,76,.22);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--shadow); }
.wa-card .wa-i { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #25D366; color: #fff; flex: 0 0 auto; }
.wa-card .wa-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; text-align: left; background: none; padding: 0; color: inherit; font: inherit; }
.wa-card .main { flex: 1; min-width: 0; }
.wa-card .main u { color: #157a45; text-decoration: none; font-weight: 700; }
.wa-card .main b { display: block; font-size: 15px; }
.wa-card .main small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; line-height: 1.35; }
.wa-card .btn { text-decoration: none; }
.wa-x { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; color: var(--muted); font-weight: 800; font-size: 11px; background: rgba(0,0,0,.04); }
.wa-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 8px; font-size: 10.5px; font-weight: 750; vertical-align: 2px;
  background: rgba(37,211,102,.14); color: #157a45; letter-spacing: .2px; }
.wa-how { display: grid; gap: 8px; }
.wa-how > div { padding: 10px 12px; border-radius: 12px; background: var(--maroon-soft); }
.wa-how > div > b { display: block; font-size: 14.5px; }
.wa-how small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.wa-link { padding: 12px; border-radius: 12px; border: 1px dashed var(--maroon-line); }
.wa-link b { display: block; } .wa-link small { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; }
.wa-code { font-size: 26px; font-weight: 800; letter-spacing: 3px; color: var(--maroon); margin: 8px 0 10px; font-variant-numeric: tabular-nums; }
.btn svg { vertical-align: -4px; margin-right: 4px; }
.wa-copy { display: flex; gap: 8px; } .wa-copy .input { flex: 1; min-width: 0; font-size: 13.5px; }
.ok-dot { color: var(--green); font-weight: 750; font-size: 12.5px; margin-left: 4px; }
.wa-steps summary { cursor: pointer; font-weight: 700; color: var(--maroon); padding: 4px 0 10px; }
a.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }

.wa-rem { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.wa-rem label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }
.wa-rem select.input { width: auto; padding: 6px 10px; min-height: 0; }
.wa-link .link, .wa-link button.link { background: none; border: 0; padding: 0; color: var(--maroon); font-weight: 700; text-decoration: underline; cursor: pointer; font-size: inherit; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* v11 — simpler homes */
.hero.simple .big { font-size: 34px; }
.hero .wa-hero { display: inline-flex; align-items: center; gap: 6px; background: #25D366; color: #fff; border-radius: 14px; padding: 11px 14px; font-weight: 750; text-decoration: none; }
.hero .wa-hero svg { width: 20px; height: 20px; }
.hero .hero-link { background: none; border: 0; color: rgba(255,255,255,.85); font-weight: 650; font-size: 13px; margin-top: 10px; padding: 0; cursor: pointer; }
.ready-card { border: 1px solid rgba(122,30,44,.22); }
.ready-card .rc-h { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.ready-card .rc-i { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--maroon-soft); font-size: 18px; }
.ready-card .rc-h b { display: block; font-size: 16px; } .ready-card .rc-h small { color: var(--muted); }
.ready-card .rc-list a { display: flex; justify-content: space-between; gap: 10px; padding: 8px 2px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; font-size: 14px; }
.ready-card .rc-warn { color: var(--red); font-weight: 650; font-size: 13.5px; margin: 8px 0 0; }
.ready-card .rc-note { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.ready-card .btn { margin-top: 12px; }
.acc-steps { display: grid; gap: 10px; margin: 4px 0 14px; }
@media (min-width: 820px) { .acc-steps { grid-template-columns: repeat(3, 1fr); } }
.acc-step { display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px; border-radius: var(--radius); border: 1px solid var(--line); background: rgba(255,255,255,.75);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--shadow); cursor: pointer; color: inherit; font: inherit; }
.acc-step.hot { border-color: rgba(122,30,44,.35); background: linear-gradient(145deg, rgba(122,30,44,.07), rgba(255,255,255,.85)); }
.acc-step .as-n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--maroon); color: #fff; font-weight: 800; flex: 0 0 auto; }
.acc-step:not(.hot) .as-n { background: #cbbfc2; }
.acc-step .main { flex: 1; min-width: 0; }
.acc-step .as-k { font-weight: 800; font-size: 16px; }
.acc-step .as-v { font-weight: 700; font-size: 14.5px; margin-top: 2px; }
.acc-step .as-s { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.acc-foot { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.acc-foot a { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.6); border: 1px solid var(--line); color: inherit; text-decoration: none; }
.acc-foot span { color: var(--muted); font-size: 12px; font-weight: 650; } .acc-foot b { font-size: 15px; } .acc-foot small { color: var(--muted); font-size: 11.5px; }
.hero-actions .wa-hero { grid-column: 1 / -1; justify-content: center; }
.hero .wa-hero svg { fill: currentColor; stroke: none; }

/* v12: install pop-up in the centre, PIN help, invites */
.install-pop { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px; background: rgba(40,8,16,.5); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: ipIn .25s ease-out; }
.ip-card { width: min(340px, 100%); background: #fff; border-radius: 26px; padding: 26px 22px 16px; text-align: center; box-shadow: 0 30px 70px rgba(60,10,22,.45); }
.ip-card img { width: 76px; height: 76px; border-radius: 20px; box-shadow: 0 10px 24px rgba(92,20,34,.3); }
.ip-card b { display: block; font-size: 20px; margin: 14px 0 6px; color: var(--ink); }
.ip-card p { margin: 0 0 18px; color: var(--muted); font-size: 14.5px; line-height: 1.45; }
.ip-no { display: block; width: 100%; margin-top: 6px; padding: 12px; background: none; border: 0; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
@keyframes ipIn { from { opacity: 0; } to { opacity: 1; } }
.btn.wa-go { background: #25d366; color: #fff; border-color: transparent; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn.wa-go.block { display: flex; }
.btn.wa-go svg { width: 20px; height: 20px; fill: currentColor; stroke: none; }
.pin-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.7); border: 1px solid var(--edge); }
.pin-row div { flex: 1; } .pin-row small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; line-height: 1.4; }
.invite-msg { white-space: pre-wrap; word-break: break-word; font: inherit; font-size: 13.5px; line-height: 1.5; background: #e9f9ee; border: 1px solid #c5ecd1; border-radius: 14px; padding: 12px 14px; margin: 0 0 12px; max-height: 260px; overflow: auto; }
.imp-cols { display: flex; flex-wrap: wrap; gap: 6px; } .imp-cols span { font-size: 12.5px; padding: 5px 9px; border-radius: 9px; background: rgba(255,255,255,.8); border: 1px solid var(--edge); }
.imp-cols b { color: var(--brand, #7b1e2d); margin-right: 5px; }

.past-sum { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; margin: 0 0 10px; border-radius: 16px; background: rgba(255,255,255,.75); border: 1px solid var(--edge); } .past-sum span { color: var(--muted); font-size: 13.5px; } .past-sum b { font-size: 18px; }

/* v13: accounts work list, bigger download and review buttons */
.acc-block { background: rgba(255,255,255,.78); border: 1px solid var(--edge); border-radius: 22px; margin: 0 0 12px; overflow: hidden; box-shadow: 0 8px 22px rgba(92,20,34,.06); }
.acc-block.hot { border-color: rgba(122,30,44,.35); }
.ab-h { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.ab-h b { display: block; font-size: 17px; } .ab-h small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.ab-h a { font-weight: 700; font-size: 13px; white-space: nowrap; }
.ab-h .as-n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: #c9bcbe; flex: 0 0 auto; }
.acc-block.hot .ab-h .as-n { background: #7a1e2c; }
.ab-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 16px; border: 0; border-top: 1px solid var(--line, #eee0e2); background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.ab-row .main { flex: 1; min-width: 0; } .ab-row .t { font-weight: 700; } .ab-row .s { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .ab-row .s.wrap { white-space: normal; }
.ab-amt { font-weight: 800; white-space: nowrap; }
.ab-row .btn.small { min-width: 68px; min-height: 40px; }
.ab-empty { padding: 12px 16px 14px 62px; color: var(--muted); font-size: 13.5px; border-top: 1px solid var(--line, #eee0e2); }
.dl-big { min-height: 54px; font-size: 16.5px; margin: 0 0 14px; }
.dl-opt { display: flex; gap: 14px; align-items: center; width: 100%; text-align: left; padding: 16px; margin: 0 0 10px; border-radius: 18px; border: 1.5px solid var(--edge); background: rgba(255,255,255,.85); font: inherit; color: inherit; cursor: pointer; }
.dl-opt:disabled { opacity: .5; } .dl-opt svg { width: 26px; height: 26px; flex: 0 0 auto; color: #7a1e2c; }
.dl-opt b { display: block; font-size: 16.5px; } .dl-opt small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; line-height: 1.4; }
.rv { gap: 8px; }
.rv button { width: auto; min-width: 64px; height: 46px; padding: 0 12px; border-radius: 14px; font-size: 17px; }
.rv button i { font-style: normal; font-size: 13.5px; font-weight: 800; }

.dl-opt svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ctable .rv { display: flex; margin-top: 10px; }
.ctable .rv button { flex: 0 0 auto; min-width: 84px; }

.sheet-x { position: sticky; top: 0; float: right; z-index: 3; width: 38px; height: 38px; margin: -6px -6px 0 8px; border-radius: 50%; border: 1px solid var(--edge); background: #fff; font-size: 17px; line-height: 1; color: var(--ink, #2a1a1d); cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.08); }

.mini-steps { display: flex; gap: 4px; margin-top: 10px; }
.mini-steps span { flex: 1; font-size: 10.5px; font-weight: 700; color: #b9a9ac; text-align: center; white-space: nowrap; }
.mini-steps i { display: block; height: 6px; border-radius: 4px; background: #eadfe1; margin-bottom: 4px; }
.mini-steps .done { color: #2e7d4f; } .mini-steps .done i { background: #3fa066; }
.mini-steps .cur { color: #7a1e2c; } .mini-steps .cur i { background: #7a1e2c; }
.mini-steps.bad .cur { color: #b3261e; } .mini-steps.bad .cur i { background: #b3261e; }
.mini-now { font-size: 12.5px; font-weight: 700; color: #7a1e2c; margin-top: 4px; } .mini-now.bad { color: #b3261e; }

.rej-list { margin: 10px 4px 2px; padding: 10px 12px; border-radius: 12px; background: #fdf0ee; color: #8f2219; font-size: 13px; line-height: 1.5; } .rej-list b { display: block; }

/* v14: reports page */
.rep-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 12px; }
.rep-tabs button { text-align: left; padding: 14px 16px; border-radius: 18px; border: 1.5px solid var(--edge); background: rgba(255,255,255,.75); font: inherit; color: inherit; cursor: pointer; }
.rep-tabs button b { display: block; font-size: 16px; } .rep-tabs button small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.rep-tabs button.on { background: linear-gradient(135deg, #8a2a3a, #6b1f2c); border-color: transparent; color: #fff; box-shadow: 0 8px 20px rgba(92,20,34,.28); }
.rep-tabs button.on small { color: rgba(255,255,255,.8); }
.rep-label { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 2px 8px; }
.rep-filters .seg.rng { display: flex; flex-wrap: wrap; gap: 8px; background: none; padding: 0; }
.rep-filters .seg.rng button { flex: 0 0 auto; padding: 9px 16px; border-radius: 999px; border: 1.5px solid var(--edge); background: #fff; font-size: 13.5px; color: var(--ink, #2a1a1d); }
.rep-filters .seg.rng button.on { background: #7a1e2c; border-color: #7a1e2c; color: #fff; box-shadow: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.fchip { padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--edge); background: #fff; font: inherit; font-size: 13.5px; font-weight: 700; color: var(--ink, #2a1a1d); cursor: pointer; }
.fchip b { color: var(--muted); margin-left: 4px; } .fchip.on { background: #7a1e2c; border-color: #7a1e2c; color: #fff; } .fchip.on b { color: rgba(255,255,255,.8); }

.dl-opt svg { fill: none; stroke: currentColor; stroke-width: 2; } .dl-opt#saInv svg { fill: #25d366; stroke: none; }
