:root {
  --brand: #1f4e78; --brand-2: #2e75b6; --bg: #f3f6fa; --card: #fff; --text: #1d2733; --muted: #6b7785;
  --line: #e4e9f0; --green: #16a34a; --green-bg: #e8f7ee; --red: #dc2626; --red-bg: #fdecec;
  --orange: #ea7c12; --orange-bg: #fff2e3; --blue: #2563eb; --blue-bg: #e9f0ff; --purple: #7c3aed; --purple-bg: #f1eaff;
  --teal: #0d9488; --teal-bg: #e3f7f5; --radius: 14px; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  --side: 220px; --top: 58px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--text); background: var(--bg); }
a { color: var(--brand-2); text-decoration: none; }
h1, h2, h3 { margin: 0 0 .6rem; line-height: 1.25; }
h2 { font-size: 1.1rem; } h3 { font-size: .95rem; margin-top: 1rem; color: var(--muted); }
.hidden { display: none !important; }
.muted { color: var(--muted); } .small { font-size: .85rem; }
.pos { color: var(--green); } .neg { color: var(--red); }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; height: var(--top); display: flex; align-items: center; gap: 10px; padding: 0 14px;
  background: var(--brand); color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.brand { display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 700; }
.logo { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #fff; color: var(--brand); font-weight: 800; font-size: .9rem; }
.biz-switch { flex: 1; min-width: 0; display: flex; justify-content: center; }
.biz-switch select { max-width: min(100%, 380px); background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; padding: 7px 14px; font-weight: 600; }
.biz-switch option { color: var(--text); }
.me { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.2); color: #fff; font-weight: 700; margin-left: auto; }

/* ---------- Navigation ---------- */
.sidebar { display: none; }
.bottombar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
  background: #fff; border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.bottombar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .72rem; color: var(--muted); padding: 4px 0; }
.bottombar a span { font-size: 1.3rem; line-height: 1; }
.bottombar a.active { color: var(--brand); font-weight: 700; }
.bottombar .fab span { display: grid; place-items: center; width: 56px; height: 56px; margin-top: -26px; border-radius: 50%; background: var(--brand-2);
  color: #fff; font-size: 2rem; box-shadow: 0 6px 16px rgba(46,117,182,.45); border: 4px solid var(--bg); }

.main { padding: 16px 14px calc(96px + env(safe-area-inset-bottom)); max-width: 1180px; margin: 0 auto; }
.page-title { font-size: 1.4rem; }
.hello { margin: -.3rem 0 .8rem; color: var(--muted); }

@media (min-width: 900px) {
  .bottombar { display: none; }
  .sidebar { display: flex; flex-direction: column; gap: 2px; position: fixed; top: var(--top); bottom: 0; left: 0; width: var(--side);
    background: #fff; border-right: 1px solid var(--line); padding: 14px 10px; overflow-y: auto; }
  .sidebar a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--text); font-weight: 500; }
  .sidebar a:hover { background: var(--bg); }
  .sidebar a.active { background: var(--blue-bg); color: var(--brand); font-weight: 700; }
  .sidebar .nav-add { background: var(--brand-2); color: #fff !important; margin: 4px 0 10px; justify-content: center; font-weight: 700; }
  .sidebar .nav-add:hover { background: var(--brand); }
  .sidebar .ico { width: 22px; text-align: center; }
  .main { margin-left: var(--side); padding: 24px 28px 40px; }
  .brand-name { display: inline; }
  .biz-switch { justify-content: flex-start; margin-left: calc(var(--side) - 150px); }
}
@media (max-width: 420px) { .brand-name { display: none; } }

/* ---------- Cards & KPIs ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.card-head h2 { margin: 0; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
.kpi { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; display: flex; flex-direction: column; gap: 4px; color: var(--text); min-width: 0; }
.kpi.selected { outline: 2px solid var(--brand-2); }
.kpi-label { font-size: .8rem; color: var(--muted); font-weight: 600; }
.kpi-value { font-size: 1.25rem; font-weight: 800; word-break: break-word; }
.kpi-note { font-size: .78rem; color: var(--muted); }
.kpi-hero, .kpi-me { grid-column: 1 / -1; }
.kpi-hero { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; margin-bottom: 14px; }
.kpis .kpi-hero { margin-bottom: 0; }
.kpi-hero .kpi-label, .kpi-hero .kpi-note, .kpi-hero .kpi-note a { color: rgba(255,255,255,.85); }
.kpi-hero .kpi-value { font-size: 1.9rem; }
.kpi-hero.bad { background: linear-gradient(135deg, #9b1c1c, var(--red)); }
.kpi-me { border-left: 5px solid var(--teal); }
@media (min-width: 700px) {
  .kpis { grid-template-columns: repeat(4, 1fr); }
  .kpi-hero, .kpi-me { grid-column: span 2; }
  .kpis-2 { grid-template-columns: repeat(2, 1fr); }
  .kpis-3 { grid-template-columns: repeat(3, 1fr); }
}
.sheet-card .card-head { background: var(--brand); color: #fff; margin: -16px -16px 12px; padding: 12px 16px; border-radius: var(--radius) var(--radius) 0 0; }
.sheet-card .card-head h2 { color: #fff; }
.sheet-card .card-head a { color: rgba(255,255,255,.85); }

.hero-block { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border-radius: 12px; padding: 14px; margin-bottom: 4px; }
.hero-block.bad { background: linear-gradient(135deg, #9b1c1c, var(--red)); }
.hero-block-label { font-weight: 800; margin-bottom: 8px; }
.hero-block .kpi-note { color: rgba(255,255,255,.85); margin-top: 8px; display: block; }

.hero-stats { display: flex; flex-wrap: wrap; gap: 16px; }
.hero-stat { flex: 1 1 140px; display: flex; flex-direction: column; gap: 4px; }
.hero-label { font-size: .78rem; color: rgba(255,255,255,.85); font-weight: 600; }
.hero-value { font-size: 1.6rem; font-weight: 800; word-break: break-word; }
.hero-stat-total { padding-left: 16px; border-left: 2px solid rgba(255,255,255,.35); }
@media (max-width: 480px) {
  .hero-stat-total { padding-left: 0; border-left: 0; border-top: 2px solid rgba(255,255,255,.35); padding-top: 8px; }
}

.grid-2 { display: grid; gap: 14px; }
.grid-2 > .card { margin: 0; }
@media (min-width: 1000px) { .grid-2 { grid-template-columns: 1fr 1.4fr; align-items: start; } }

/* ---------- Quick actions ---------- */
.quick { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; scrollbar-width: none; }
.quick-btn { flex: 1 0 74px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border-radius: var(--radius);
  background: var(--card); box-shadow: var(--shadow); font-size: 1.5rem; color: var(--text); border: 0; cursor: pointer; font-family: inherit; }
.quick-btn span { font-size: .78rem; font-weight: 600; }

/* ---------- Tones ---------- */
.tone-green { --tone: var(--green); --tone-bg: var(--green-bg); }
.tone-red { --tone: var(--red); --tone-bg: var(--red-bg); }
.tone-orange { --tone: var(--orange); --tone-bg: var(--orange-bg); }
.tone-blue { --tone: var(--blue); --tone-bg: var(--blue-bg); }
.tone-purple { --tone: var(--purple); --tone-bg: var(--purple-bg); }
.tone-teal { --tone: var(--teal); --tone-bg: var(--teal-bg); }
.tone-grey { --tone: var(--muted); --tone-bg: var(--bg); }
.quick-btn[class*="tone-"] { background: var(--tone-bg); }

/* ---------- Transaction list ---------- */
.txn-list { display: flex; flex-direction: column; }
.txn { display: flex; align-items: flex-start; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); color: var(--text); }
.txn:last-child { border-bottom: 0; }
a.txn:hover { background: #fafbfd; }
.txn-ico { flex: 0 0 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--tone-bg); font-size: 1.2rem; }
.txn-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.txn-title { font-weight: 600; }
.txn-sub { font-size: .8rem; color: var(--muted); }
.txn-details { display: block; color: var(--text); opacity: .8; }
.txn-by { display: block; font-size: .72rem; }
.txn-amt { text-align: right; font-weight: 700; white-space: nowrap; }
.txn-amt small { display: block; font-size: .72rem; font-weight: 600; }
.list-sep { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 14px 4px 4px; }

.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--blue-bg); color: var(--brand); font-size: .75rem; font-weight: 700; }
.pill-warn { background: var(--orange-bg); color: #9a4b00; }

/* ---------- Rows ---------- */
.row-line { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.row-line .right { text-align: right; } .row-line small { display: block; }
.row-line.total { border-bottom: 0; font-weight: 800; }
a.row-line.link-row { color: var(--text); border-radius: 8px; margin: 0 -6px; padding: 8px 6px; }
a.row-line.link-row:hover { background: var(--bg); }
.row-line.is-me { background: var(--blue-bg); border-radius: 8px; font-weight: 700; }
.row-line.is-me .pill { margin-left: 6px; }
.check { margin-top: 10px; padding: 8px 12px; border-radius: 10px; font-size: .85rem; font-weight: 600; }
.check.ok { background: var(--green-bg); color: var(--green); } .check.bad { background: var(--red-bg); color: var(--red); }

/* Collapsible card sections: collapsed behind a toggle on phones (less crowded), always open on desktop. */
.card-toggle { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: .82rem; }
.card-toggle .chev { display: inline-block; font-size: .7rem; transition: transform .15s; }
.card-toggle.open .chev { transform: rotate(90deg); }
.collapsible-body { margin-top: 4px; }
@media (min-width: 900px) {
  .collapsible-body { display: block !important; }
  .card-toggle { display: none; }
}

/* Tamil script renders visibly larger/taller than Latin at the same size in most phone system
   fonts, and crowds a narrow screen fast – so on phones only (desktop has room to spare) we
   shrink the type a touch, loosen line spacing a little (Tamil vowel signs need the extra room),
   and open up padding so things don't feel cramped. Scoped to html[lang="ta"] (set by
   inc/layout.php from the signed-in user's own language, or a guest's toggle on the login page). */
@media (max-width: 899px) {
  html[lang="ta"] body { font-size: 15px; line-height: 1.55; }
  html[lang="ta"] { font-size: 15px; }
  html[lang="ta"] .card { padding: 18px 16px; }
  html[lang="ta"] .sheet-card .card-head { padding: 14px 16px; }
  html[lang="ta"] .row-line { padding: 11px 0; }
  html[lang="ta"] .page-title { font-size: 1.2rem; }
  html[lang="ta"] h2 { font-size: 1rem; }
  html[lang="ta"] .kpi-value, html[lang="ta"] .hero-value { font-size: 1.1rem; }
  html[lang="ta"] .kpi-hero .kpi-value { font-size: 1.6rem; }
  html[lang="ta"] .hero-value.mini { font-size: .95rem; }
  html[lang="ta"] .tile-label { font-size: .8rem; }
  html[lang="ta"] .tile-hint { font-size: .68rem; line-height: 1.4; }
  html[lang="ta"] .quick-btn { padding: 14px 10px; }
  html[lang="ta"] .quick-btn span { font-size: .72rem; }
  html[lang="ta"] .btn { padding: 13px 18px; }
  html[lang="ta"] label { line-height: 1.5; }
  html[lang="ta"] input, html[lang="ta"] select, html[lang="ta"] textarea { font-size: 15px; padding: 13px 12px; }
  html[lang="ta"] .badge { font-size: .7rem; padding: 7px 10px; }
  html[lang="ta"] .bottombar a { font-size: .66rem; }
}

.partner-mini { display: block; padding: 12px 10px; border-radius: 10px; margin: 0 -6px 10px; border: 1px solid var(--line); color: var(--text); }
a.partner-mini.link-row:hover { background: var(--bg); }
.partner-mini-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.hero-stats-mini { gap: 10px; }
.hero-stats-mini .hero-label { color: var(--muted); }
.hero-value.mini { font-size: 1.1rem; font-weight: 700; color: var(--text); }
.hero-value.mini.pos { color: var(--green); } .hero-value.mini.neg { color: var(--red); }
.hero-stats-mini .hero-stat-total { border-left-color: var(--line); }
@media (max-width: 480px) {
  .hero-stats-mini .hero-stat-total { border-top-color: var(--line); }
}

.party-row { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--line); color: var(--text); }
.party-row:last-child { border-bottom: 0; }
.party-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.avatar { flex: 0 0 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-bg); color: var(--brand); font-weight: 800; }
.avatar.big { flex-basis: 52px; height: 52px; font-size: 1.3rem; }
.badge { text-align: right; font-size: .75rem; padding: 6px 10px; border-radius: 10px; background: var(--bg); color: var(--muted); line-height: 1.3; }
.badge b { font-size: .95rem; }
.badge-green { background: var(--green-bg); color: var(--green); } .badge-red { background: var(--red-bg); color: var(--red); }
.badge-orange { background: var(--orange-bg); color: #9a4b00; }
.row-actions { display: flex; gap: 6px; }

/* ---------- Partners ---------- */
.partner-grid { display: grid; gap: 14px; margin-bottom: 14px; }
.partner-grid .card { margin: 0; }
@media (min-width: 900px) { .partner-grid { grid-template-columns: repeat(2, 1fr); } }
.partner-card.is-me { border-top: 5px solid var(--teal); }
.partner-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.partner-head h2 { margin: 0 0 4px; }
.big-total { background: var(--bg); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; }
.big-total b { font-size: 1.6rem; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.share-form { background: var(--bg); padding: 14px; border-radius: 12px; margin-bottom: 14px; }
.share-line { display: flex !important; flex-direction: row !important; align-items: center; justify-content: space-between; gap: 10px; }
.share-line .pct { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.share-line .pct input { width: 90px; text-align: right; }
.share-line select { flex: 1; }
.share-total { font-size: 1.05rem; margin: 6px 0; }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 12px; }
.form label, .label { display: flex; flex-direction: column; gap: 6px; font-size: .88rem; font-weight: 600; color: #3c4855; }
input, select, textarea { font: inherit; font-size: 16px; padding: 12px 12px; border: 1.5px solid #d5dce5; border-radius: 10px; background: #fff; color: var(--text); width: 100%; min-height: 46px; }
input:focus, select:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(46,117,182,.15); }
.amount-input { font-size: 1.3rem; font-weight: 700; }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 46px; }
.pw-toggle { position: absolute; right: 2px; top: 2px; bottom: 2px; width: 42px; background: none; border: 0; font-size: 1.15rem; cursor: pointer; color: var(--muted); }
.field-row { display: grid; gap: 12px; }
@media (min-width: 600px) { .field-row { grid-template-columns: 1fr 1fr; } }
label.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 500; }
label.check input { width: 22px; height: 22px; min-height: 0; margin-top: 2px; flex: 0 0 22px; }

.step-label { font-weight: 800; color: var(--brand); margin-top: 4px; }
.type-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 600px) { .type-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .type-grid { grid-template-columns: repeat(5, 1fr); } }
.type-tile { position: relative; cursor: pointer; display: flex !important; flex-direction: column; gap: 2px !important; padding: 12px; border-radius: 12px;
  border: 2px solid var(--line); background: #fff; transition: .15s; }
.type-tile input { position: absolute; opacity: 0; pointer-events: none; }
.type-tile .tile-ico { font-size: 1.5rem; }
.type-tile .tile-label { font-weight: 700; color: var(--text); }
.type-tile .tile-hint { font-weight: 400; font-size: .75rem; color: var(--muted); }
.type-tile:has(input:checked) { border-color: var(--tone); background: var(--tone-bg); box-shadow: 0 0 0 3px var(--tone-bg); }
.type-tile:has(input:checked)::after { content: "✓"; position: absolute; top: 8px; right: 10px; width: 22px; height: 22px; border-radius: 50%; background: var(--tone); color: #fff; display: grid; place-items: center; font-size: .8rem; }
.details-block { display: flex; flex-direction: column; gap: 12px; }

.item-line { display: grid; gap: 10px; padding: 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--bg); margin-bottom: 10px; }
@media (min-width: 760px) { .item-line { grid-template-columns: 2fr 1fr 1fr 1fr auto; align-items: end; } }
.item-line label { margin: 0; }
.item-line .line-remove, .item-line .oline-remove { height: 46px; }
.line-new-item-wrap, .oline-new-item-wrap { grid-column: 1 / -1; }
@media (min-width: 760px) { .order-item-line { grid-template-columns: 2fr 1fr auto; } }
.type-tile.tab-active { border-color: var(--tone); background: var(--tone-bg); box-shadow: 0 0 0 3px var(--tone-bg); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; display: inline-flex !important; flex-direction: row !important; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { padding: 10px 16px; border-radius: 999px; border: 2px solid var(--line); background: #fff; font-weight: 600; color: var(--text); }
.chip input:checked + span { border-color: var(--brand-2); background: var(--blue-bg); color: var(--brand); }
.chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(46,117,182,.25); }
.hint-box { font-size: .82rem; color: #4b5563; background: var(--bg); border-radius: 10px; padding: 10px 12px; font-weight: 400; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 18px; border-radius: 12px; border: 0; font: inherit; font-weight: 700;
  cursor: pointer; text-align: center; min-height: 46px; }
.btn-primary { background: var(--brand-2); color: #fff; } .btn-primary:hover { background: var(--brand); }
.btn-light { background: #fff; color: var(--brand); border: 1.5px solid #d5dce5; }
.btn-sm { padding: 7px 12px; min-height: 0; font-size: .85rem; border-radius: 10px; }
.btn-lg { font-size: 1.1rem; padding: 14px 24px; }
.btn-block { width: 100%; }
.btn-danger-link { background: none; color: var(--red); font-weight: 600; }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand-2); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; }
.more-types-toggle { display: block; margin: 10px 0 16px; min-height: 44px; text-align: left; }
.amount-echo { font-size: .85rem; font-weight: 700; color: var(--brand); margin-top: 4px; min-height: 1.2em; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.form-actions .btn-lg { flex: 1; }
@media (max-width: 899px) {
  .sticky-actions { position: sticky; bottom: calc(70px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, #fff 30%); padding-top: 14px; margin: 0 -16px -16px; padding: 14px 16px 16px; }
}
.danger-zone { text-align: center; margin-bottom: 20px; }

/* ---------- Attachments ---------- */
.attach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; margin-bottom: 14px; }
.attach-item { display: flex; flex-direction: column; gap: 6px; background: var(--bg); border-radius: 12px; padding: 8px; text-align: center; }
.attach-thumb { display: grid; place-items: center; height: 90px; border-radius: 8px; overflow: hidden; background: #fff; border: 1px solid var(--line); }
.attach-thumb img { width: 100%; height: 100%; object-fit: cover; }
.attach-ico { font-size: 2rem; }
.attach-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-form { flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.upload-form label { flex: 1 1 220px; }

/* ---------- Filters, tabs, tables ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; }
.filters select, .filters input { flex: 1 1 150px; width: auto; min-height: 42px; padding: 8px 10px; }
.summary-strip { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .85rem; font-weight: 600; margin: 0 4px 10px; }
.summary-strip a { margin-left: auto; }
.tabs { display: flex; gap: 6px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; border-radius: 999px; background: #fff; color: var(--text); font-weight: 600; font-size: .9rem; box-shadow: var(--shadow); }
.tabs a.active { background: var(--brand); color: #fff; }
.push-right { margin-left: auto; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; }
.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th, .table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { font-size: .75rem; text-transform: uppercase; color: var(--muted); letter-spacing: .03em; white-space: nowrap; }
.table .num { text-align: right; white-space: nowrap; }

.mobile-only { display: block; }
.desktop-only { display: none; }
@media (min-width: 900px) {
  .mobile-only { display: none; }
  .desktop-only { display: block; }
}
.txn-table tbody tr[data-href] { cursor: pointer; }
.txn-table tbody tr:hover { background: var(--bg); }
.txn-table tbody tr { border-left: 4px solid transparent; }
.txn-table .tone-row-green  { border-left-color: var(--green); }
.txn-table .tone-row-orange { border-left-color: var(--orange); }
.txn-table .tone-row-red    { border-left-color: var(--red); }
.txn-table .tone-row-blue   { border-left-color: var(--blue); }
.txn-table .tone-row-teal   { border-left-color: var(--teal); }
.txn-table .tone-row-purple { border-left-color: var(--purple); }
.party-name-cell { color: var(--brand); }
.total-row td { border-bottom: 0; border-top: 2px solid var(--line); background: var(--bg); }

/* ---------- Misc ---------- */
.flash { padding: 12px 14px; border-radius: 12px; margin-bottom: 12px; font-weight: 600; transition: opacity .4s; }
.flash-ok { background: var(--green-bg); color: #166534; }
.flash-err { background: var(--red-bg); color: #991b1b; }
.empty { text-align: center; padding: 20px 10px; }
.big-ico { font-size: 2.6rem; }
.auth-wrap { max-width: 420px; margin: 4vh auto; }
.auth-logo { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 18px; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 800; font-size: 1.4rem; }
.lang-switch { display: flex; justify-content: center; gap: 10px; margin-bottom: 16px; }
.lang-switch a { font-weight: 600; font-size: .85rem; color: var(--muted); padding: 4px 10px; border-radius: 999px; }
.lang-switch a.active { background: var(--blue-bg); color: var(--brand); }
.menu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.menu-tile { display: flex; flex-direction: column; gap: 6px; padding: 18px 14px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); color: var(--text); font-weight: 600; }
.menu-tile span { font-size: 1.7rem; }
@media (min-width: 900px) { .guest .main { margin-left: auto; } }
