/* PT Accounts 2.0 — pieces the live app adds: party picker, product lines, return routes,
   confirm box, roles, activity diff, login. Uses the Register tokens from style.css. */

/* ---------- searchable party picker ---------- */
.picker { position: relative; }
.picker-in { display: flex; align-items: center; gap: 8px; min-height: var(--ctl, 44px); padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--r-ctl); background: var(--surface); transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.picker-in:focus-within { border-color: var(--accent-text); box-shadow: 0 0 0 3px var(--accent-soft); }
.picker-in .i { color: var(--ink-3); flex: none; }
.field .picker-in input, .picker-in input { flex: 1; min-width: 0; border: 0 !important; box-shadow: none !important; padding: 10px 0 !important; background: none; outline: none; min-height: 0; }
.picker-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); max-height: 320px; overflow: auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; padding: 6px; box-shadow: 0 18px 40px -12px rgba(30, 30, 30, .25); animation: pickIn .22s var(--ease); }
@keyframes pickIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.picker-opt { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "av n chip" "av n b"; align-items: center; column-gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 12px; background: none; color: inherit; text-align: left; cursor: pointer; font: inherit; }
.picker-opt .av { grid-area: av; }
.picker-opt .chip { grid-area: chip; justify-self: end; }
.picker-n { grid-area: n; display: flex; flex-direction: column; min-width: 0; font-weight: 500; }
.picker-n small { color: var(--ink-3); font-weight: 400; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picker-b { grid-area: b; justify-self: end; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.picker-opt:hover, .picker-opt.is-sel { background: var(--accent-soft); }
.picker-empty { padding: 14px; color: var(--ink-3); font-size: 14px; }
.chip-both { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--pos); }
.chip-plain { background: var(--raised); color: var(--ink-2); }
.chip-supplier { background: var(--raised); color: var(--ink); }

/* ---------- product lines ---------- */
.lines { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.lines-h, .line { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.1fr) 36px; gap: 10px; align-items: center; }
.lines-h { font-size: 12px; font-weight: 500; color: var(--ink-3); padding: 0 2px; }
.line { animation: lineIn .3s var(--ease); }
@keyframes lineIn { from { opacity: 0; transform: translateY(-6px); } }
.line select, .line input, .rline input { width: 100%; min-height: 44px; padding: 8px 12px; border-radius: var(--r-ctl); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); outline: none; font: inherit; }
.line select:focus, .line input:focus, .rline input:focus { border-color: var(--accent-text); box-shadow: 0 0 0 3px var(--accent-soft); }
.line input[readonly], .line select:disabled { background: var(--raised); color: var(--ink-2); }
.line-t { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.line-h { grid-column: 1 / -1; font-size: 12px; color: var(--warn); margin-top: -4px; }
.line-h:empty { display: none; }
.line.is-out { animation: lineOut .22s var(--ease) forwards; }
@keyframes lineOut { to { opacity: 0; transform: translateX(16px); } }

/* ---------- return lines and routes ---------- */
.rlines { display: flex; flex-direction: column; gap: 8px; }
.rlines-h, .rline { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: center; }
.rlines-h { font-size: 12px; font-weight: 500; color: var(--ink-3); }
.rline-p { display: flex; flex-direction: column; min-width: 0; }
.rline-p small { color: var(--ink-3); font-size: 12px; }
.route .seg-b { position: relative; }
.route .seg-b input { display: block; position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.if-supplier, .if-client { display: none; }
form.route-supplier .if-supplier, form.route-client .if-client { display: flex; animation: lineIn .3s var(--ease); }
.form-sec { margin-top: 20px; }
.form-sec > h3, .form-sub { font-size: 14px; font-weight: 600; margin: 0 0 10px; }
.form-1 { grid-template-columns: 1fr; }
.form-notes { color: var(--ink-3); font-size: 13px; }
.form-total { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.form-err { margin-top: 16px; padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, var(--neg) 10%, transparent); color: var(--neg); font-size: 14px; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); color: var(--ink-2); font-size: 14px; margin-bottom: 16px; }
.notice > .i { color: var(--accent-text); flex: none; margin-top: 1px; }

/* ---------- date range filter ---------- */
.dates { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dates input { height: 38px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; }

/* ---------- confirm box ---------- */
.modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px; background: rgba(29, 32, 31, .4); opacity: 0; pointer-events: none; transition: opacity .2s var(--ease); }
.modal.is-on { opacity: 1; pointer-events: auto; }
.modal-box { width: min(420px, 100%); background: var(--surface); border-radius: 24px; padding: 24px; transform: translateY(12px) scale(.96); transition: transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.modal.is-on .modal-box { transform: none; }
.modal-box h2 { margin: 0 0 8px; font-size: 20px; }
.modal-box p { margin: 0; color: var(--ink-2); }
.btn-danger { color: var(--neg) !important; }
.btn-ghost.btn-danger { border-color: color-mix(in srgb, var(--neg) 50%, transparent); }
.btn-ghost.btn-danger:hover { background: var(--neg); color: #fff !important; border-color: var(--neg); }
.btn-danger-solid { background: var(--neg); color: #fff; border-color: var(--neg); }
.btn-danger-solid:hover { filter: brightness(1.08); }

/* ---------- loading, toasts, activity ---------- */
.boot { min-height: 100vh; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--ink-2); }
.boot-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--violet); animation: bootDot 1s ease-in-out infinite alternate; }
@keyframes bootDot { to { transform: translateY(-10px); background: var(--green); } }
.toast.is-err::before { background: var(--neg); }
.diff { margin: 6px 0 0; padding: 0; list-style: none; font-size: 12px; color: var(--ink-3); }
.diff li { overflow-wrap: anywhere; }
.diff del { color: var(--neg); } .diff ins { color: var(--pos); text-decoration: none; }
.exports { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- shell: org chip and the user's side panel ---------- */
.org > span { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.org small { font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.org-b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.balance-u { font-size: 28px; font-weight: 600; line-height: 1.15; margin: 4px 0; overflow-wrap: anywhere; }
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list .list-i { color: inherit; text-decoration: none; }
.side-list .list-i:hover .list-t { color: var(--accent-text); }
.dash-stats { margin-top: 16px; }
.dash-empty { padding: 16px 0; }

/* ---------- phone ---------- */
@media (max-width: 640px) {
  .lines-h { display: none; }
  .line { grid-template-columns: 1fr 1fr 36px; grid-template-areas: "p p del" "q r t"; padding: 10px; border: 1px solid var(--line); border-radius: 16px; }
  .line > .line-p { grid-area: p; } .line > label:nth-of-type(2) { grid-area: q; } .line > label:nth-of-type(3) { grid-area: r; }
  .line > .line-t { grid-area: t; grid-column: 3 / 4; white-space: nowrap; } .line > [data-del-line] { grid-area: del; }
  .line > .line-t { grid-area: auto; grid-column: 1 / -1; text-align: left; font-size: 13px; color: var(--ink-2); }
  .rlines-h { display: none; }
  .rline { grid-template-columns: 1fr 1fr; }
  .rline-p { grid-column: 1 / -1; }
  .org > span { display: none; }
  .dates input { width: 132px; }
}
@media print { .modal, .picker-list { display: none !important; } }
.toolbar .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.toolbar .seg::-webkit-scrollbar { display: none; }
.toolbar .seg-b { flex: none; }

/* polish: quiet native search clear, breathing room before the return route, a fade where the tab bar scrolls */
.picker-in input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
fieldset.form-sub { margin-top: 20px; }

/* ---------- sortable headers, list filters, statement period ---------- */
.th-sort { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; white-space: nowrap; }
.th-sort:hover, .th-sort.is-on { color: var(--ink); }
.th-arr { font-size: 11px; opacity: .45; transition: transform .25s var(--ease), opacity .2s; }
.th-sort.is-on .th-arr { opacity: 1; color: var(--accent-text); }
.th-sort:active .th-arr { transform: translateY(2px); }
th.num .th-sort { flex-direction: row-reverse; }
.picker-filter { flex: 0 1 200px; min-width: 160px; }
.picker-filter .picker-in { min-height: 38px; border-radius: 999px; padding: 0 12px; }
.picker-filter .picker-in input { padding: 6px 0 !important; font-size: 13px; }
.picker-filter .picker-list { min-width: 300px; }
.toolbar .sel select { height: 38px; border-radius: 999px; font-size: 13px; color: var(--ink); }
.chip-links { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.chip-link { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); font-size: 13px; text-decoration: none; transition: background-color .2s var(--ease), color .2s var(--ease), transform .2s cubic-bezier(.34, 1.56, .64, 1); }
.chip-link:hover { color: var(--ink); border-color: var(--ink-3); }
.chip-link:active { transform: scale(.95); }
.chip-link.is-on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.stmt-bar { justify-content: space-between; }
.row-bf td { color: var(--ink-2); font-style: italic; background: var(--raised); }
.adj-prev { margin: 4px 0 12px; padding: 12px 14px; border-radius: var(--r-ctl); background: var(--accent-soft); color: var(--ink-2); font-size: 14px; }
.adj-prev:empty { display: none; }
.adj-prev b { color: var(--ink); }

/* ---------- reports ---------- */
.rep-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 0 14px; padding-bottom: 2px; }
.rep-tabs::-webkit-scrollbar { display: none; }
.rep-tab { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-size: 13.5px; font-weight: 500; text-decoration: none; transition: background-color .2s var(--ease), color .2s var(--ease), transform .2s cubic-bezier(.34, 1.56, .64, 1); }
.rep-tab:hover { color: var(--ink); border-color: var(--line-2); transform: translateY(-1px); }
.rep-tab.is-on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.rep-tab .i { opacity: .8; }
.range-bar { justify-content: space-between; }
.acct-links { margin-bottom: 14px; }
.rep-note { font-size: 13px; margin: 12px 0 0; line-height: 1.5; }
.cell-sub { display: block; font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.share { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 96px; font-variant-numeric: tabular-nums; }
.share b { display: block; width: 48px; height: 6px; border-radius: 3px; background: var(--raised); overflow: hidden; }
.share i { display: block; height: 100%; border-radius: 3px; background: var(--c1); }
.tbl-pl .total td { font-size: 16px; }

/* ---------- charts ---------- */
.apx { min-height: 60px; margin: 0 -4px; }
.apx-dash { min-height: 260px; }
.apx-spark { margin: 10px -2px -6px; min-height: 44px; }
.apx-heat { min-height: 250px; }
.dash-seg { padding: 2px; }
.dash-seg .seg-b { height: 28px; font-size: 12.5px; }
.dash-h small { font-weight: 400; font-size: 13px; margin-left: 6px; }
.dash-more { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 13px; }
.an-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.an-grid .an-panel { margin: 0; }
.an-wide { grid-column: 1 / -1; }
.kpis .kpi { display: flex; flex-direction: column; overflow: hidden; }
.kpis .kpi .stat-n { min-height: 18px; }
.ph-actions .seg a.seg-b { text-decoration: none; }
.apexcharts-tooltip.apexcharts-theme-light { border: 1px solid var(--line-2) !important; background: var(--surface) !important; box-shadow: 0 8px 24px rgba(0, 0, 0, .08) !important; border-radius: 10px !important; }
.apexcharts-tooltip.apexcharts-theme-dark { background: var(--raised) !important; border: 1px solid var(--line-2) !important; border-radius: 10px !important; }
.apexcharts-tooltip-title { background: none !important; border-bottom: 1px solid var(--line) !important; font-weight: 600; }
.apexcharts-tooltip-text-y-value { font-variant-numeric: tabular-nums; }
.apexcharts-legend-text { font-family: inherit !important; }
.apexcharts-bar-area { cursor: pointer; }
@media (max-width: 900px) { .an-grid { grid-template-columns: 1fr; } }
@media print { .rep-tabs, .range-bar, .acct-links, .dash-seg { display: none !important; } .apexcharts-tooltip { display: none; } }

/* ---------- phone: one thumb-reach button for quick entries ---------- */
.fab-wrap { display: none; }
@media (max-width: 720px) {
  .fab-wrap { display: block; position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 40; }
  .fab { width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; box-shadow: 0 10px 28px rgba(118, 80, 238, .35); transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); }
  .fab-wrap.is-open .fab { transform: rotate(45deg); }
  .fab-sheet { position: absolute; right: 0; bottom: 68px; display: grid; grid-template-columns: repeat(3, 84px); gap: 8px; padding: 10px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: 0 16px 40px rgba(0, 0, 0, .16); opacity: 0; transform: translateY(10px) scale(.96); transform-origin: bottom right; pointer-events: none; transition: opacity .2s var(--ease), transform .25s var(--ease); }
  .fab-wrap.is-open .fab-sheet { opacity: 1; transform: none; pointer-events: auto; }
  .fab-sheet a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 14px; color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 500; }
  .fab-sheet a:active { background: var(--accent-soft); }
  .fab-sheet .i { color: var(--accent-text); }
  #view { padding-bottom: 88px; }
  .toolbar .picker-filter { flex: 1 1 100%; }
  .range-bar .dates, .stmt-bar .dates { width: 100%; }
}
@media print { .fab-wrap { display: none !important; } }

/* ---------- cash and bank, unpaid invoices, sharing, two-step ---------- */
[hidden] { display: none !important; }
.accts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.acct-tile { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-2); color: var(--ink); text-decoration: none; transition: border-color .2s var(--ease), transform .2s var(--ease); }
.acct-tile:hover { transform: translateY(-1px); }
.acct-tile.is-on { border-color: var(--accent-text); box-shadow: 0 0 0 1px var(--accent-text) inset; }
.acct-k { font-size: 12px; color: var(--ink-3); }
.acct-n { font-weight: 500; }
.acct-b { font-size: 20px; font-variant-numeric: tabular-nums; }
.alloc-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.alloc-h h3 { margin: 0; font-size: 15px; font-weight: 500; }
.allocs { display: grid; gap: 8px; }
.alloc { display: grid; grid-template-columns: 1fr 140px; gap: 12px; align-items: center; padding: 10px 12px; border-radius: var(--r-ctl); background: var(--raised); }
.alloc-n { display: flex; flex-direction: column; min-width: 0; }
.alloc-n small { color: var(--ink-3); font-size: 12px; }
.alloc input { text-align: right; }
.alloc-none { margin: 0; font-size: 14px; }
.share-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.btn-wa .i { color: #25a35a; }
.profit tfoot .total { font-size: 16px; }
.twostep .steps { margin: 0 0 16px; padding-left: 20px; color: var(--ink-2); line-height: 1.6; }
.qr { display: block; width: 200px; height: 200px; image-rendering: pixelated; border-radius: 12px; background: #fff; padding: 8px; margin-bottom: 8px; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; list-style: none; padding: 0; margin: 12px 0 16px; max-width: 360px; }
.codes li { padding: 8px 10px; border-radius: 10px; background: var(--raised); text-align: center; letter-spacing: .04em; }
.force-2fa { min-height: 100vh; display: grid; place-items: start center; padding: 40px 16px; background: var(--bg); }
.force-in { width: 100%; max-width: 560px; }
@media (max-width: 720px) {
  .alloc { grid-template-columns: 1fr 110px; }
  .accts { grid-template-columns: 1fr 1fr; }
}
@media print { .no-print, .share-row { display: none !important; } }
.list-moves .list-i a { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

/* ---------- tab bar: what fits is shown, the rest sits under "More"; the sidebar can be hidden on a computer ---------- */
.btn, .seg-b, .chip, .icon-btn, .quick a { flex-shrink: 0; }
.rip-box { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none; }
.tab-more-btn { height: 40px; padding: 0 14px; border-radius: 10px; display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; color: var(--ink); background: transparent; border: 0; position: relative; white-space: nowrap; cursor: pointer; }
.tab-more-btn:hover { background: var(--raised); }
.tab-more-btn.is-active { background: var(--accent-soft); color: var(--accent-text); }
.tab-more-btn .i { transition: transform .2s var(--ease); }
.tab-more-btn[aria-expanded="true"] .i { transform: rotate(180deg); }
.tab-menu { position: absolute; left: 0; top: calc(100% + 14px); min-width: 240px; max-height: 70vh; overflow-y: auto; padding: 6px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 12px 32px rgba(0,0,0,.14); z-index: 40; display: grid; gap: 2px; }
.tab-menu a { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border-radius: 10px; font-size: 14.5px; white-space: nowrap; }
.tab-menu a:hover { background: var(--raised); }
.tab-menu a.is-active { background: var(--accent-soft); color: var(--accent-text); }
.tab-menu .tab-sep { height: 1px; margin: 4px 6px; background: var(--line); }
@media (min-width: 961px) {
  .is-app.side-collapsed { grid-template-columns: minmax(0, 1fr); }
  .is-app.side-collapsed .side { display: none; }
  .is-app.side-collapsed .menu-btn { display: grid; }
}

/* Full exports: one card per list, CSV and PDF as two separate buttons */
.exports { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.export-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 12px 16px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); min-width: 0; }
.export-name { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 14px; font-weight: 500; }
.export-name > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.export-name .i { color: var(--ink-3); flex: none; }
.export-btns { display: flex; gap: 6px; flex: none; }
@media (max-width: 520px) { .exports { grid-template-columns: 1fr; } }
.btn-pair { display: inline-flex; gap: 6px; }

/* ---------- light/dark switch and sign out, on every screen ---------- */
[data-theme-toggle] .ic-sun { display: none; }
:root[data-theme="dark"] [data-theme-toggle] .ic-sun { display: block; }
:root[data-theme="dark"] [data-theme-toggle] .ic-moon { display: none; }
.shell-top .signout { display: inline-flex; align-items: center; width: auto; gap: 8px; padding: 0 12px; flex-shrink: 0; }
.signout-l { font-size: 14px; font-weight: 500; }
@media (max-width: 1280px) { .signout-l { display: none; } .shell-top .signout { width: 40px; padding: 0; justify-content: center; } }
.side-out { display: flex; align-items: center; gap: 10px; width: 100%; margin: auto 0 10px; padding: 10px 14px; border: 0; border-radius: 14px; background: transparent; color: var(--ink-2); font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.side-out:hover { background: var(--raised); color: var(--ink); }
.theme-fab { position: fixed; top: 16px; right: 16px; z-index: 5; background: var(--surface); }
.side-out + .side-new { margin-top: 0; }

/* ---------- get started (new business) ---------- */
.start { margin-bottom: 16px; }
.start .panel-h { align-items: flex-start; }
.start .panel-h > div { display: flex; flex-direction: column; gap: 2px; }
.start-bar { height: 6px; border-radius: 999px; background: var(--raised); overflow: hidden; margin: 4px 0 8px; }
.start-bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .5s var(--ease); }
.start-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.start-i { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--surface); }
.start-i.is-next { border-color: var(--accent-text); box-shadow: 0 0 0 1px var(--accent-text) inset; }
.start-i.is-done { opacity: .7; }
.start-n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--raised); color: var(--ink-2); font-size: 13px; font-weight: 600; }
.start-i.is-done .start-n { background: var(--pos, #49bca0); color: #fff; }
.start-i.is-next .start-n { background: var(--accent); color: #fff; }
.start-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.start-t b { font-weight: 500; }
.start-t small { color: var(--ink-3); font-size: 12.5px; }
.start-ok { font-size: 12.5px; color: var(--ink-3); }
.start-foot { margin: 12px 0 0; font-size: 13px; color: var(--ink-3); }
.start-foot a { color: var(--accent-text); }
.notice-start { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.notice-start > span { flex: 1 1 260px; }
[data-verify-note] { align-items: center; flex-wrap: wrap; } [data-verify-note] > span { flex: 1 1 260px; }
.side > * { flex-shrink: 0; }
@media (max-width: 720px) {
  .shell-top .signout { display: none; }
  .start-i { flex-wrap: wrap; }
  .start-t { flex: 1 1 calc(100% - 40px); }
  .start-i > .btn, .start-i > .start-ok { margin-left: 40px; }
}
@media (max-width: 1200px) { .shell-top .org > span { display: none; } .shell-top .org { padding: 0 6px; } }

/* The side panel scrolls on shorter screens: keep "New sale or purchase" in reach at its bottom */
@media (min-width: 961px) {
  .side { padding-bottom: 0; }
  .side-new { position: sticky; bottom: 20px; z-index: 1; background: var(--surface); box-shadow: 0 0 0 20px var(--surface); }
  .side-new:hover { background: var(--ink); }
  .side::after { content: ''; display: block; min-height: 0; margin-top: -4px; flex-shrink: 0; }
}

/* Every report tab visible: wrap on wide screens, swipe on phones */
@media (min-width: 641px) { .rep-tabs { flex-wrap: wrap; overflow: visible; } }
.export-name > span { white-space: normal; overflow: visible; line-height: 1.25; }
.exports { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
@media (max-width: 520px) { .exports { grid-template-columns: 1fr; } }

/* Long party names never run into the amount next to them */
.cell-party { max-width: 100%; }
.cell-party-n { overflow: hidden; text-overflow: ellipsis; }
.pay-row .cell-party { overflow: hidden; }

/* Phones: room under the last row so the round + button never covers it, no keyboard hints */
@media (max-width: 960px) {
  #view { padding-bottom: 96px; }
  .fab-wrap[hidden] { display: none; }
}
@media (hover: none), (max-width: 640px) { #view .hint { display: none; } }

/* Phone sale/purchase lines: say what the line figure is, and space "Add a product" from Notes */
@media (max-width: 640px) { .line > .line-t::before { content: 'Amount: Rs '; color: var(--ink-3); font-weight: 400; } }
[data-add-line] { margin-bottom: 8px; }

/* Users: actions wrap instead of running off the edge; on phones each person is a small card */
.users-tbl td.user-acts { white-space: normal; text-align: right; }
.users-tbl td.user-acts .btn { margin: 2px 0 2px 4px; }
@media (max-width: 640px) {
  .users-tbl thead { display: none; }
  .users-tbl tr { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .users-tbl td { border: 0; padding: 0 !important; height: auto; }
  .users-tbl td.hide-sm { display: none; }
  .users-tbl td.user-acts { grid-column: 1 / -1; text-align: left; }
  .users-tbl td.user-acts .btn { margin: 4px 6px 0 0; }
}
@media (min-width: 961px) {
  /* the header already has Sign out on wide screens */
  .side .side-out { display: none; }
  .side-out + .side-new, .side-new { margin-top: auto; }
  /* content scrolling under the pinned button fades out instead of being cut */
  .side-new::before { content: ''; position: absolute; left: -24px; right: -24px; bottom: calc(100% + 20px); height: 28px; background: linear-gradient(to bottom, transparent, var(--surface)); pointer-events: none; }
}
.cell-party-n { display: block; max-width: 100%; white-space: nowrap; }

/* Side panel fits one screen: quick actions, then compact account cards, then New sale */
.balance-quick .quick { border-top: 0; padding: 14px 8px; }
.side { gap: 20px; }
@media (min-width: 961px) { .side { padding-top: 24px; } }

/* Initials always sit in the middle of their circle, whatever list they are in */
.av { display: inline-grid !important; place-items: center; line-height: 1; text-align: center; }
:root[data-theme="dark"] .acct-cash { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
