:root {
  --bg: #f4f6f9;
  --bg-2: #eef2f6;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --line: #d9e1ea;
  --ink: #1b2430;
  --muted: #5b6b7c;
  --brand: #0f5f8b;
  --brand-2: #1479b0;
  --saffron: #0f5f8b;
  --saffron-2: #1479b0;
  --mint: #0f7a4a;
  --violet: #3d5a80;
  --amber: #b45309;
  --rose: #b42318;
  --sky: #0f5f8b;
  --ok: #0f7a4a;
  --warn: #b45309;
  --err: #b42318;
  --white: #ffffff;
  --shadow: 0 1px 2px rgba(27, 36, 48, 0.06), 0 8px 24px rgba(27, 36, 48, 0.06);
  --radius: 8px;
  --sidebar: 232px;
  --glow: none;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  font-family: "Plus Jakarta Sans", "Noto Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  letter-spacing: 0;
}
h1, h2, h3, .brand, .display, .page-title {
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-2); text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

.hidden { display: none !important; }
.muted { color: var(--muted); }
.right { text-align: right; }
.center { text-align: center; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

.btn {
  background: var(--brand);
  color: #fff;
  border: 0;
  padding: 9px 16px;
  border-radius: 6px;
  font-weight: 650;
  letter-spacing: 0;
  box-shadow: none;
  transition: background 0.12s ease;
  text-decoration: none;
}
.btn:hover { background: var(--brand-2); filter: none; transform: none; text-decoration: none; color: #fff; }
.btn.gold {
  background: #0f7a4a;
  color: #fff;
  box-shadow: none;
}
.btn.gold:hover { background: #0c643d; color: #fff; }
.btn.ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}
.btn.ghost:hover { border-color: var(--brand); color: var(--brand); background: #f3f8fb; }
.btn.small { padding: 6px 10px; font-size: 13px; box-shadow: none; }
.btn.danger {
  background: var(--err);
  box-shadow: none;
}
.btn.danger:hover { background: #8f1c14; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }

.field { display: flex; flex-direction: column; gap: 4px; }
.field label {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: none;
  color: #445566;
}
.field input, .field select, .field textarea {
  background: #fff;
  border: 1px solid #c5d0dc;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--ink);
  box-shadow: none;
  min-height: 38px;
}
.field textarea { min-height: 72px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 0;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 95, 139, 0.12);
}
.field .hint { font-size: 11px; color: var(--muted); }
.form-section {
  margin: 0 0 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.form-section h3 {
  margin: 0 0 2px;
  font-size: 14px;
}
.form-section .sec-sub {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--muted);
}
.check-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 0 4px;
}
.check-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
}
.preview-box {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}
.company-switch {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 7px 9px;
  border-radius: 6px;
  margin-top: 8px;
}
.alert {
  padding: 10px 12px;
  border-radius: 6px;
  background: #fdecec;
  color: #8f1c14;
  border: 1px solid #f3c4c0;
  font-size: 14px;
}
.alert.ok {
  background: #e8f6ee;
  color: #0c643d;
  border-color: #b7e0c8;
}
.alert.warn {
  background: #fef4e6;
  color: #8a4208;
  border-color: #f3d5a8;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 18px;
  border-radius: var(--radius);
  backdrop-filter: none;
}
.stamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 800;
  box-shadow: none;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.data th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  background: var(--surface-2);
}
table.data td {
  padding: 10px 8px;
  border-bottom: 1px solid #edf1f5;
  vertical-align: middle;
}
table.data tr:hover td { background: #f5f8fb; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data a { color: var(--brand); font-weight: 650; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-radius: 4px;
  background: #eef2f6;
  color: var(--muted);
}
.badge.paid { color: #0c643d; background: #e8f6ee; }
.badge.unpaid { color: #8f1c14; background: #fdecec; }
.badge.partial { color: #8a4208; background: #fef4e6; }
.badge.cancelled { color: var(--muted); text-decoration: line-through; }

.hero-wrap {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #f7fafc 0%, #eef3f8 100%);
}
.hero-wrap::before { display: none; }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 7vw;
  position: relative;
  z-index: 2;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.topbar nav a { color: var(--ink); font-weight: 600; margin-right: 8px; text-decoration: none; }
.brand {
  font-size: 20px;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand:hover { text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--brand);
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  box-shadow: none;
}
.brand small {
  display: block;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--brand);
  font-weight: 650;
}
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  padding: 56px 7vw 64px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero h1 {
  font-size: clamp(32px, 4.4vw, 48px);
  margin: 10px 0 16px;
  line-height: 1.15;
  background: none;
  color: var(--ink);
  -webkit-background-clip: unset;
  background-clip: unset;
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 4px;
  background: #e8f2f8;
  border: 1px solid #c5dde9;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--brand);
  font-weight: 750;
}
.hero p.lead { font-size: 17px; max-width: 540px; color: var(--muted); }
.invoice-mock {
  background: #fff;
  border: 1px solid var(--line);
  padding: 22px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  transform: none;
  backdrop-filter: none;
}
.invoice-mock .head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 12px;
}
.features {
  padding: 8px 7vw 64px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  position: relative;
  z-index: 1;
}
.feature {
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 168px;
  box-shadow: none;
}
.feature .ico {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 800;
  margin-bottom: 12px;
  background: #e8f2f8 !important;
  color: var(--brand) !important;
}
.feature h3 { margin: 0 0 8px; font-size: 17px; }
.feature p { margin: 0; color: var(--muted); }

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}
.auth-art {
  background: #0f3d5c;
  color: #fff;
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.auth-art .muted { color: #c5d7e4; }
.auth-art .brand { color: #fff; }
.auth-art h1 { font-size: clamp(30px, 4vw, 44px); margin: 12px 0; color: #fff; }
.auth-form {
  padding: 56px 48px;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-form h2 { margin-top: 0; font-size: 28px; }
.oauth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  padding: 11px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 650;
  border-radius: 6px;
}
.oauth:hover { background: var(--surface-2); text-decoration: none; }

.app {
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  min-height: 100vh;
  background: var(--bg);
}
.side {
  background: #fff;
  color: var(--ink);
  padding: 14px 10px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  border-right: 1px solid var(--line);
}
.side .brand {
  color: var(--ink);
  padding: 8px 10px 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #334155;
  text-decoration: none;
  padding: 8px 10px;
  font-weight: 600;
  font-size: 13px;
  border-radius: 6px;
  margin: 1px 0;
}
.nav a:hover, .nav a.active {
  background: #e8f2f8;
  color: var(--brand);
  text-decoration: none;
}
.nav .sec {
  padding: 14px 10px 4px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7a8a9a;
}
.main { padding: 20px 24px 88px; }
.page-title { margin: 0; font-size: 24px; }
.page-head { margin-bottom: 14px; }
.kicker-inline {
  margin: 0 0 2px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--brand);
}
.card.tight { padding: 4px 10px 8px; }
.kpi {
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}
.kpi::after { display: none; }
.kpi b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; position: relative; color: var(--ink); }
.kpi span { font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); font-weight: 700; }

.toolbar { margin-bottom: 16px; }
.search {
  min-width: 220px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
}

.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(27, 36, 48, 0.45);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  z-index: 40;
  overflow: auto;
  backdrop-filter: none;
}
.modal {
  width: min(980px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  padding: 20px;
  box-shadow: var(--shadow);
  border-radius: 10px;
}
.modal.wide { width: min(1180px, 100%); }

.bill-paper {
  background: white;
  color: #111;
  border: 1px solid #d8deea;
  padding: 24px;
  max-width: 800px;
  margin: 0 auto;
  font-size: 13px;
  border-radius: 8px;
}
.bill-paper h2 { margin: 0; text-align: center; letter-spacing: 0.08em; color: #111; }
.bill-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
.bill-paper table { width: 100%; border-collapse: collapse; }
.bill-paper td, .bill-paper th { border: 1px solid #cfd6e4; padding: 6px; color: #111; }
.bill-words { font-style: italic; margin-top: 10px; }

.chart {
  height: 150px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 8px 0 22px;
}
.chart .bar {
  flex: 1;
  background: var(--brand);
  min-height: 4px;
  position: relative;
  border-radius: 3px 3px 0 0;
}
.chart .bar span {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--muted);
}

.line-table input, .line-table select {
  width: 100%;
  padding: 5px 8px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 4px;
  color: var(--ink);
  min-height: 32px;
}
.line-table input:focus, .line-table select:focus {
  outline: 0;
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 2px rgba(15, 95, 139, 0.12);
}
.line-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.line-table th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: left;
  padding: 8px 6px;
  color: var(--muted);
  background: #f1f5f9;
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 1px solid var(--line);
}
.line-table td { padding: 2px 4px; border-bottom: 1px solid #edf1f5; }
.line-table .ln, .line-table th.ln { width: 36px; text-align: center; color: var(--muted); font-size: 12px; }
.line-table th:nth-child(2), .line-table td:nth-child(2) { width: 22%; }
.line-table th:nth-child(3), .line-table td:nth-child(3) { width: 9%; }
.line-table th:nth-child(4), .line-table td:nth-child(4) { width: 7%; }
.line-table th:nth-child(5), .line-table td:nth-child(5) { width: 7%; }
.line-table th:nth-child(6), .line-table td:nth-child(6) { width: 9%; }
.line-table th:nth-child(7), .line-table td:nth-child(7) { width: 7%; }
.line-table th:nth-child(8), .line-table td:nth-child(8) { width: 7%; }
.line-table th:nth-child(9), .line-table td:nth-child(9) { width: 10%; }
.line-table th:nth-child(10), .line-table td:nth-child(10) { width: 11%; }
.line-table th:nth-child(11), .line-table td:nth-child(11) { width: 36px; }
.cf-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.cf-table th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: left;
  padding: 6px 8px;
  color: var(--muted);
}
.cf-table td { padding: 4px; }
.cf-table input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 7px 9px;
  min-height: 34px;
  background: #fff;
}
.line-table tr.line:hover td { background: #f7fafc; }
.line-amt { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.rm-cell { text-align: center; }
.icon-btn {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-weight: 700;
  padding: 0;
}
.icon-btn:hover { color: var(--err); border-color: var(--err); }

.ws { display: flex; flex-direction: column; gap: 0; }
.ws-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}
.ws-sub { margin-top: 4px; font-size: 12px; }
.ws-head-actions { display: flex; align-items: center; gap: 8px; }
.ws-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 272px;
  gap: 16px;
  align-items: start;
}
.ws-main { min-width: 0; }
.ws-meta {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px 10px;
}
.ws-meta .span-2 { grid-column: span 2; }
.ws-meta.eway { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 10px; }
.ws .field { gap: 4px; }
.ws .field label { font-size: 11px; letter-spacing: 0; }
.ws .field input, .ws .field select, .ws .field textarea {
  padding: 7px 9px;
  min-height: 36px;
  border-radius: 6px;
}
.ws .field textarea { min-height: 60px; }
.ws-snap {
  margin: 8px 0 6px;
  padding: 8px 12px;
  border-radius: 6px;
  background: #eef6fb;
  border: 1px solid #cfe0ea;
  font-size: 12px;
  color: #1b3a4d;
}
.ws-toggles {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 10px;
}
.ws-toggles label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
}
.ws-lines {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
  background: #fff;
  max-height: min(52vh, 520px);
}
.ws-line-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0 6px;
}
.ws-fold {
  margin: 8px 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px 12px;
  background: #fff;
}
.ws-fold summary {
  cursor: pointer;
  font-weight: 650;
  font-size: 13px;
  color: var(--ink);
  padding: 4px 0;
}
.ws-rail {
  position: sticky;
  top: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.ws-rail-title {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 750;
  margin-bottom: 10px;
}
.ws .preview-box {
  background: transparent;
  border: 0;
  padding: 0;
  border-radius: 0;
}
.tot-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: 13px;
  color: var(--muted);
  border-bottom: 1px solid #edf1f5;
}
.tot-row b { color: var(--ink); font-variant-numeric: tabular-nums; }
.tot-row.grand {
  margin-top: 6px;
  padding-top: 10px;
  border-bottom: 0;
  color: var(--ink);
  font-size: 15px;
}
.tot-row.grand b { color: var(--brand); font-size: 20px; }
.tot-words { margin-top: 8px; font-size: 12px; }
.ws-pay { display: grid; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.ws-sticky {
  position: fixed;
  left: var(--sidebar);
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  background: #fff;
  border-top: 1px solid var(--line);
  backdrop-filter: none;
  z-index: 20;
}
.ws-sticky b { font-size: 20px; font-variant-numeric: tabular-nums; color: var(--brand); }

.menu-btn {
  display: none;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 6px;
  padding: 8px 10px;
  font-weight: 700;
}
.chip {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 3px 9px;
  border-radius: 4px;
  background: #e8f6ee;
  color: #0c643d;
  font-size: 12px;
  font-weight: 650;
}

.faq {
  padding: 8px 7vw 48px;
  max-width: 920px;
}
.faq h2 { margin: 0 0 16px; font-size: 24px; }
.faq details {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 0 0 10px;
  background: #fff;
}
.faq summary { cursor: pointer; font-weight: 650; }
.faq details p { margin: 8px 0 0; color: var(--muted); }

/* Public Header & Responsive Nav */
.public-nav { display: flex; gap: 14px; align-items: center; }
.public-nav a { color: var(--ink); font-weight: 600; font-size: 14px; text-decoration: none; padding: 6px 10px; border-radius: 6px; transition: all 0.15s ease; }
.public-nav a:hover, .public-nav a.nav-active { color: var(--brand); background: var(--bg-2); }
.public-actions { display: flex; gap: 8px; align-items: center; }

/* Mobile Hamburger Toggle */
.mobile-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 8px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  z-index: 1002;
}
.mobile-nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: all 0.2s ease;
}

/* Mobile Navigation Drawer */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 85%;
  max-width: 320px;
  background: #ffffff;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
  z-index: 1005;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  padding: 20px;
}
.mobile-nav-drawer.open {
  transform: translateX(0);
}
.mobile-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.mobile-drawer-close {
  background: none;
  border: none;
  font-size: 28px;
  color: var(--muted);
  cursor: pointer;
  padding: 0 6px;
  line-height: 1;
}
.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 0;
  flex: 1;
}
.mobile-nav-link {
  display: block;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.15s ease;
}
.mobile-nav-link:hover, .mobile-nav-link.nav-active {
  background: var(--bg-2);
  color: var(--brand);
}
.mobile-nav-footer {
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(2px);
  z-index: 1004;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.mobile-drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* App Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 62px;
  background: #ffffff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  z-index: 99;
  justify-content: space-around;
  align-items: center;
  padding: 4px 8px env(safe-area-inset-bottom, 4px);
}
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--muted);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  transition: color 0.15s ease;
  min-width: 54px;
}
.bottom-nav-item .icon { font-size: 18px; line-height: 1; }
.bottom-nav-item.active {
  color: var(--brand);
}
.bottom-nav-item:hover {
  text-decoration: none;
  color: var(--brand);
}

/* Mobile Floating Action Button (FAB) */
.mobile-fab {
  display: none;
  position: fixed;
  right: 18px;
  bottom: 74px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 18px rgba(15, 95, 139, 0.35);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease;
}
.mobile-fab:hover {
  transform: scale(1.06);
  color: #fff;
  text-decoration: none;
}

/* Footer Layout */
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; }
.foot-links { list-style: none; padding: 0; margin: 8px 0 0; }
.foot-links li { margin: 0 0 6px; font-size: 13px; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--brand); text-decoration: underline; }

/* Tally Prime Style Go-To Command Palette */
.goto-back {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 10vh;
  z-index: 1010;
}
.goto-card {
  background: #fff;
  width: 90%;
  max-width: 640px;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  border: 1px solid var(--line);
}
.goto-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}
.goto-input {
  flex: 1;
  border: 0;
  background: transparent;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  outline: none;
}
.goto-list {
  max-height: 380px;
  overflow-y: auto;
  padding: 8px;
}
.goto-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.1s ease;
}
.goto-item:hover, .goto-item.selected {
  background: var(--bg-2);
  color: var(--brand);
}
.goto-item .tag {
  font-size: 11px;
  padding: 2px 6px;
  background: #e2e8f0;
  border-radius: 4px;
  color: #475569;
  font-weight: 600;
}
.goto-item .shortcut {
  font-size: 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-weight: 700;
  color: var(--brand);
}

/* Modal Popup & Mobile Bottom Sheet */
.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(3px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1008;
  padding: 16px;
}
.modal {
  background: #fff;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  padding: 24px;
  border: 1px solid var(--line);
}

/* Thermal POS Print Mode */
.thermal-mode .bill-paper {
  max-width: 320px;
  margin: 0 auto;
  padding: 10px;
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  border: 1px dashed #999;
}
.thermal-mode .bill-meta {
  display: block;
  font-size: 11px;
}
.thermal-mode table {
  font-size: 11px;
}
.thermal-mode h2 {
  font-size: 16px;
  margin: 4px 0;
}

/* Responsive Table Scroll Container */
.ws-lines, .data-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 12px;
  border-radius: 6px;
}
.line-table, .data-table {
  min-width: 680px;
}

/* Media Queries: Large Tablets & Laptops (max-width: 1180px) */
@media (max-width: 1180px) {
  .ws-body { grid-template-columns: 1fr; }
  .ws-rail { position: relative; top: 0; }
  .ws-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Media Queries: Tablets & Mobile (max-width: 980px) */
@media (max-width: 980px) {
  .hero, .auth-shell, .app, .features { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }

  /* Slide-Over App Sidebar on Mobile/Tablet */
  .side {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    height: 100vh;
    background: #ffffff;
    z-index: 1006;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18);
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: block;
    overflow-y: auto;
  }
  .side.open {
    transform: translateX(0);
  }

  .side-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
    z-index: 1005;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }
  .side-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }

  .app { display: block; }
  .menu-btn { display: inline-flex; }
  .mobile-bottom-nav { display: flex; }
  .mobile-fab { display: flex; }

  .public-nav, .public-actions { display: none; }
  .mobile-nav-toggle { display: flex; }

  .hero h1 { font-size: 30px; line-height: 1.25; }
  .invoice-mock { transform: none; margin-top: 24px; }
  .main { padding: 16px 14px 100px; }
  .ws-meta, .ws-meta.eway { grid-template-columns: 1fr 1fr; }
  .ws-meta .span-2 { grid-column: span 2; }
  .ws-sticky { left: 0; padding: 10px 16px; bottom: 62px; }
}

/* Media Queries: Mobile Phones (max-width: 640px) */
@media (max-width: 640px) {
  .hero h1 { font-size: 26px; }
  .page-title { font-size: 20px; }
  .grid-4, .grid-3, .foot-grid { grid-template-columns: 1fr; }
  .ws-meta, .ws-meta.eway { grid-template-columns: 1fr; }
  .ws-meta .span-2 { grid-column: auto; }
  .topbar { padding: 12px 16px; }
  .hero { padding: 32px 16px 40px; }
  .modal { padding: 18px 14px; border-radius: 10px; }
  .field input, .field select, .field textarea {
    font-size: 16px; /* Prevents iOS auto-zoom on input focus */
    min-height: 42px;
  }
  .btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .ws-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .ws-head-actions {
    width: 100%;
    justify-content: space-between;
  }
}

@media print {
  .side, .toolbar, .btn, .topbar, .no-print, .menu-btn, .ws-sticky, .ws-rail, .ws-toggles, .goto-back, .modal-back, .mobile-bottom-nav, .mobile-fab, .mobile-nav-drawer, .mobile-drawer-backdrop { display: none !important; }
  .app, .main { display: block; padding: 0; background: white; }
  body { background: white; color: #111; }
  .bill-paper { box-shadow: none; border: none; padding: 0; }
}

