/* Garage: same look as the other Gins apps (Plus Jakarta Sans, brand #0B6B4E). Crimson #B91C1C only on the icon tile and avatar. */
:root {
  --bg: #F4F7F5; --card: #FFFFFF; --line: #E1E8E4; --line2: #EEF2F0; --fg: #0E1C17; --muted: #52625C;
  --brand: #0B6B4E; --brand-fg: #FFFFFF; --hero: #0B3D2E; --hero-2: #072B20; --hero-sub: #CFE6DC; --soft: #E3ECE7;
  --ok-fg: #166534; --ok-bg: #DCFCE7; --warn-fg: #92400E; --warn-bg: #FEF3C7; --bad-fg: #991B1B; --bad-bg: #FEE2E2; --none-fg: #475569; --none-bg: #EEF2F6;
  --input: #C9D4CF; --accent: #B91C1C; --shadow: 0 1px 2px rgba(7, 43, 32, .06), 0 6px 18px rgba(7, 43, 32, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A1310; --card: #121E19; --line: #23332C; --line2: #1A2822; --fg: #E6EFEA; --muted: #9DB2A9;
    --brand: #3CC58F; --brand-fg: #062117; --hero: #0F3B2D; --hero-2: #0A2A20; --hero-sub: #BFDCCF; --soft: #1C2B25;
    --ok-fg: #6EE7A0; --ok-bg: #11291C; --warn-fg: #FCD34D; --warn-bg: #2C220B; --bad-fg: #FCA5A5; --bad-bg: #2E1515; --none-fg: #B4C0CC; --none-bg: #1E2630;
    --input: #33463E; --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0A1310; --card: #121E19; --line: #23332C; --line2: #1A2822; --fg: #E6EFEA; --muted: #9DB2A9;
  --brand: #3CC58F; --brand-fg: #062117; --hero: #0F3B2D; --hero-2: #0A2A20; --hero-sub: #BFDCCF; --soft: #1C2B25;
  --ok-fg: #6EE7A0; --ok-bg: #11291C; --warn-fg: #FCD34D; --warn-bg: #2C220B; --bad-fg: #FCA5A5; --bad-bg: #2E1515; --none-fg: #B4C0CC; --none-bg: #1E2630;
  --input: #33463E; --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--fg); font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overflow-x: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand); }
h1, h2, h3, p { margin: 0; }
svg { flex: none; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-weight: 600; letter-spacing: .04em; }
.muted { color: var(--muted); } .small { font-size: 12px; } .center { text-align: center; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

/* ---------- shell: bottom tabs on a phone, icon rail on iPad, sidebar on desktop ---------- */
.shell { min-height: 100vh; min-height: 100dvh; }
.main { width: 100%; max-width: 760px; margin: 0 auto; padding: calc(12px + env(safe-area-inset-top)) 16px calc(104px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; }
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: space-around; align-items: flex-end;
  background: var(--card); border-top: 1px solid var(--line); padding: 6px 4px calc(8px + env(safe-area-inset-bottom)); }
.nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 60px; min-height: 48px; padding: 4px 0; color: var(--muted);
  font-size: 11px; font-weight: 600; text-decoration: none; border-radius: 12px; }
.nav a svg { width: 22px; height: 22px; }
.nav a[aria-current="page"] { color: var(--brand); font-weight: 700; }
.nav .addic { width: 54px; height: 54px; margin-top: -24px; border-radius: 18px; background: var(--brand); color: var(--brand-fg); display: grid; place-items: center; box-shadow: 0 6px 16px rgba(11, 107, 78, .35); }
.nav .addic svg { width: 26px; height: 26px; }
.nav .addbtn { color: var(--fg); }
.nav .brand, .nav .wideonly { display: none; }
@media (min-width: 700px) {
  .main { padding: 24px 28px 40px calc(104px + 28px); max-width: 980px; }
  .nav { top: 0; right: auto; width: 96px; flex-direction: column; justify-content: flex-start; align-items: center; gap: 8px; border-top: 0; border-right: 1px solid var(--line); padding: 18px 0; overflow-y: auto; }
  .nav .phoneonly { display: none; }
  .nav .wideonly { display: flex; }
  .nav .brand { display: flex; flex-direction: column; align-items: center; margin-bottom: 6px; }
  .nav .brand span:last-child { display: none; }
  .nav .addic { margin-top: 0; width: 48px; height: 48px; border-radius: 16px; }
  .nav a { min-width: 80px; }
}
@media (min-width: 1024px) {
  .main { padding-left: calc(248px + 32px); max-width: none; padding-right: 32px; }
  .main > * { max-width: 1180px; }
  .nav { width: 248px; align-items: stretch; padding: 20px 14px; gap: 4px; }
  .nav a { flex-direction: row; gap: 12px; min-height: 44px; padding: 0 12px; font-size: 14px; font-weight: 500; color: var(--fg); }
  .nav a[aria-current="page"] { background: var(--soft); color: var(--brand); font-weight: 700; }
  .nav .brand { flex-direction: row; gap: 12px; padding: 0 8px 12px; }
  .nav .brand span:last-child { display: flex; flex-direction: column; }
  .nav .brand small { color: var(--muted); font-size: 12px; }
  .nav .addbtn { order: -1; justify-content: center; background: var(--brand); color: var(--brand-fg) !important; font-weight: 700 !important; margin: 0 0 8px; }
  .nav .addbtn .addic { width: auto; height: auto; background: none; box-shadow: none; color: inherit; }
  .nav .addbtn .addic svg { width: 20px; height: 20px; }
  .nav .brand { order: -2; }
}
.tile { width: 44px; height: 44px; border-radius: 14px; background: var(--accent); color: #fff; display: grid; place-items: center; }
.tile svg { width: 24px; height: 24px; }

/* ---------- headers, banners ---------- */
.top { display: flex; align-items: center; gap: 12px; min-height: 48px; }
.top h1 { flex: 1; font-size: 26px; font-weight: 800; letter-spacing: -.02em; display: flex; flex-direction: column; }
.top h1 .sub { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.iconbtn { width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--fg); display: grid; place-items: center; flex: none; text-decoration: none; }
.iconbtn.bare { border: 0; background: none; }
.iconbtn svg { width: 22px; height: 22px; }
.banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--none-bg); color: var(--none-fg); font-size: 13px; }
.banner.warn { background: var(--warn-bg); color: var(--warn-fg); } .banner.bad { background: var(--bad-bg); color: var(--bad-fg); }
.banner svg { width: 18px; height: 18px; } .banner span { flex: 1; }
.linkbtn { background: none; border: 0; padding: 0; min-height: 32px; color: var(--brand); font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }

/* ---------- cards, rows ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; box-shadow: var(--shadow); }
.card.list { padding: 2px 16px; }
.card.empty, .empty { color: var(--muted); text-align: center; padding: 22px 16px; }
.section { display: flex; flex-direction: column; gap: 8px; }
.section .head h2 { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.irow { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line2); text-decoration: none; color: inherit; width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; }
.card.list > .irow:first-child, .card.list > :first-child .irow { border-top: 0; }
.irow.sel { background: var(--soft); margin: 0 -16px; padding: 11px 16px; width: calc(100% + 32px); }
.irow .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.irow .t1 { font-size: 14px; font-weight: 600; } .irow .t2 { font-size: 12px; color: var(--muted); }
.irow .end { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.irow .chev { width: 16px; height: 16px; color: var(--muted); }
.logo { width: 36px; height: 36px; border-radius: 12px; background: var(--line2); color: var(--muted); display: grid; place-items: center; flex: none; }
.logo svg { width: 19px; height: 19px; }
.logo.bad { background: var(--bad-bg); color: var(--bad-fg); } .logo.warn { background: var(--warn-bg); color: var(--warn-fg); } .logo.brand { background: var(--soft); color: var(--brand); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; flex: none; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--ok-bg); color: var(--ok-fg); } .pill.warn { background: var(--warn-bg); color: var(--warn-fg); }
.pill.bad { background: var(--bad-bg); color: var(--bad-fg); } .pill.none { background: var(--none-bg); color: var(--none-fg); }
.pend { font-style: normal; font-size: 11px; font-weight: 600; color: var(--warn-fg); background: var(--warn-bg); padding: 1px 6px; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.vchip { padding: 0 14px; min-height: 38px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); font-weight: 600; font-size: 13px; }
.vchip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-fg); }
.seg { display: inline-flex; gap: 6px; }
.seg button { min-height: 38px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-weight: 600; font-size: 13px; }
.seg button[aria-pressed="true"] { border: 1.5px solid var(--brand); background: var(--soft); color: var(--brand); }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--none-bg); color: var(--none-fg); font-size: 13px; }
.note.warn { background: var(--warn-bg); color: var(--warn-fg); }
.note svg { width: 18px; height: 18px; margin-top: 1px; }
.badge { font-size: 12px; font-weight: 600; color: var(--brand); background: var(--soft); padding: 4px 10px; border-radius: 99px; text-decoration: none; white-space: nowrap; }

/* ---------- Home ---------- */
.vcards { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) { .vcards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .vcards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.vhead { display: flex; align-items: center; gap: 12px; }
.vic { width: 44px; height: 44px; border-radius: 14px; background: var(--soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.vic svg { width: 24px; height: 24px; }
.vt { flex: 1; min-width: 0; display: flex; flex-direction: column; } .vt b { font-size: 16px; } .vt small { font-size: 12px; color: var(--muted); }
.srows { margin-top: 6px; }
.srow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line2); text-decoration: none; color: inherit; }
.srow .lab { display: flex; flex-direction: column; min-width: 0; font-size: 14px; font-weight: 500; }
.srow .lab small { font-size: 12px; color: var(--muted); font-weight: 400; }
.vfoot { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--line); font-size: 14px; }
.vfoot .muted { font-size: 13px; }

/* ---------- Add ---------- */
.ttiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 700px) { .ttiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.ttile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; min-height: 72px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); color: var(--fg); font-weight: 600; font-size: 13px; }
.ttile svg { width: 24px; height: 24px; color: var(--muted); }
.ttile[aria-pressed="true"] { border: 1.5px solid var(--brand); background: var(--soft); color: var(--brand); }
.ttile[aria-pressed="true"] svg { color: var(--brand); }
.form { display: flex; flex-direction: column; gap: 12px; }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; min-width: 0; }
.field input, .field textarea, .field select { width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--input); background: var(--card); font-size: 16px; font-weight: 600; }
.field input:disabled { opacity: .5; }
.field small { font-weight: 400; color: var(--muted); font-size: 12px; min-height: 16px; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.toggle span { display: flex; flex-direction: column; font-size: 14px; } .toggle small { color: var(--muted); font-size: 12px; }
.toggle input { appearance: none; -webkit-appearance: none; width: 50px; height: 30px; border-radius: 99px; background: var(--input); position: relative; flex: none; margin: 0; cursor: pointer; }
.toggle input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .15s; }
.toggle input:checked { background: var(--brand); } .toggle input:checked::after { transform: translateX(20px); }
.paid { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.paid legend { font-size: 13px; font-weight: 600; padding: 0; margin-bottom: 6px; }
.rchip input { position: absolute; opacity: 0; pointer-events: none; }
.rchip span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-weight: 600; font-size: 13px; cursor: pointer; }
.rchip input:checked + span { border: 1.5px solid var(--brand); background: var(--soft); color: var(--brand); }
.rchip input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 2px; }
.err { color: var(--bad-fg); font-size: 13px; min-height: 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 14px; border: 0; font-weight: 700; font-size: 15px; text-decoration: none; }
.btn svg { width: 20px; height: 20px; }
.btn.primary { background: var(--brand); color: var(--brand-fg); } .btn.primary:disabled { opacity: .5; }
.btn.line { background: transparent; border: 1.5px solid var(--brand); color: var(--brand); }
.btn.block { width: 100%; }
.btnrow { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- Service, Loan hero ---------- */
.hero { background: var(--soft); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.hero .k { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); }
.hero .hrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.hero .title { font-size: 20px; font-weight: 800; } .hero .title.big { font-size: 32px; letter-spacing: -.02em; }
.hero p { font-size: 13px; color: var(--muted); }
.stats2, .stats3 { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stats3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat b { font-size: 19px; font-weight: 800; overflow-wrap: anywhere; } .stat small { font-size: 12px; color: var(--muted); }
.bar { height: 9px; border-radius: 99px; background: var(--card); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }

/* ---------- Costs ---------- */
.bignum { display: flex; flex-direction: column; } .bignum small { font-size: 13px; color: var(--muted); } .bignum b { font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 190px; }
.barc { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: 0; padding: 0; color: inherit; }
.barc .bv { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.barc .bb { flex: 1; width: 70%; max-width: 64px; display: flex; align-items: flex-end; }
.barc .bb i { display: block; width: 100%; border-radius: 8px 8px 3px 3px; background: var(--soft); }
.barc[aria-pressed="true"] .bb i { background: var(--brand); }
.barc .bl { font-size: 12px; font-weight: 600; color: var(--muted); }
.crow { display: flex; flex-direction: column; gap: 6px; padding: 8px 0; border-top: 1px solid var(--line2); }
.crow:first-child { border-top: 0; }
.cl { display: flex; justify-content: space-between; font-size: 14px; }
.cbar { height: 6px; border-radius: 99px; background: var(--line2); } .cbar i { display: block; height: 100%; border-radius: 99px; background: var(--brand); }
.kmpl { width: 100%; height: 100px; color: var(--brand); }

/* ---------- Documents ---------- */
.cpost .cphead, .detail .cphead { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 6px; }
.cpost .k { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cpost .reg { font-size: 30px; font-weight: 800; letter-spacing: .04em; }
.cpost small, .detail small { font-size: 13px; color: var(--muted); }
.detail h2 { font-size: 20px; font-weight: 800; margin-top: 2px; }
.cpost, .detail { display: flex; flex-direction: column; gap: 10px; }
.kv .r { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line2); }
.kv .r:last-child { border-bottom: 0; }
.kv .lab { font-size: 13px; color: var(--muted); flex: none; max-width: 45%; }
.kv .val { font-size: 14px; font-weight: 600; text-align: right; display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; min-width: 0; overflow-wrap: anywhere; }
.card.kv { padding: 4px 16px; }
.mask { letter-spacing: .1em; color: var(--muted); }
.split { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 20px; align-items: start; }
.split .col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* ---------- To-do ---------- */
.todo { display: flex; gap: 12px; align-items: flex-start; padding: 11px 0; border-top: 1px solid var(--line2); }
.card.list > .todo:first-child { border-top: 0; }
.todo .tick { width: 30px; height: 30px; flex: none; border-radius: 9px; border: 2px solid var(--brand); background: transparent; display: grid; place-items: center; padding: 0; color: #fff; }
.todo.done .tick { background: var(--brand); } .todo .tick svg { width: 16px; height: 16px; }
.todo .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; } .todo .t1 { font-size: 14px; font-weight: 600; } .todo .t2 { font-size: 12px; color: var(--muted); }
.todo.done .t1 { text-decoration: line-through; opacity: .6; }
.fold summary { cursor: pointer; font-weight: 700; font-size: 14px; min-height: 32px; }
.wrap { white-space: normal; }

.spin { display: inline-block; width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: sp 0.8s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
@media (max-width: 380px) { .stats3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .top h1 { font-size: 23px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
