:root {
  --bg: #f6f8fb;
  --panel: #ffffff;
  --text: #18212f;
  --muted: #667085;
  --line: #d9e2ec;
  --primary: #0f766e;
  --primary-2: #115e59;
  --accent: #facc15;
  --danger: #b42318;
  --success: #027a48;
  --shadow: 0 18px 40px rgba(15, 23, 42, .08);
}

* { box-sizing: border-box; }
html {
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100%;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
  overscroll-behavior-y: none;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }

.shell { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 280px 1fr; transition: grid-template-columns .2s ease; }
body.sidebar-collapsed .shell { grid-template-columns: 82px 1fr; }
.sidebar {
  background: #0b1720;
  color: #eef6f7;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
body.sidebar-collapsed .sidebar { padding: 18px 12px; }
body.sidebar-collapsed .sidebar-label { display: none; }
body.sidebar-collapsed .brand { justify-content: center; }
body.sidebar-collapsed .nav a { justify-content: center; padding: 10px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand.big { margin-bottom: 28px; }
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 800;
  flex: 0 0 auto;
  overflow: hidden;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand strong { display: block; font-size: 18px; }
.brand span { display: block; color: #a8bbc3; font-size: 12px; margin-top: 3px; }
.nav { display: grid; gap: 5px; }
.nav a, .nav-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #c9d7dc;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.nav a:hover, .nav a.active, .nav-toggle:hover, .nav-toggle.active { background: rgba(255,255,255,.09); color: white; }
.nav-group { display: grid; gap: 5px; }
.nav-caret { margin-left: auto; display: inline-flex; transition: transform .16s ease; }
.nav-caret .svg-icon { width: 16px; height: 16px; }
.nav-group.open .nav-caret { transform: rotate(90deg); }
.nav-sub { display: none; gap: 4px; padding-left: 18px; }
.nav-group.open .nav-sub { display: grid; }
.nav-sub a { min-height: 38px; padding: 9px 12px; font-size: 14px; background: rgba(255,255,255,.03); }
.nav-sub .svg-icon { width: 18px; height: 18px; }
body.sidebar-collapsed .nav-sub { padding-left: 0; }
.main { min-width: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.topbar {
  min-height: 76px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 22px;
  position: sticky;
  top: 0;
  z-index: 5;
}
.topbar h1 { margin: 0; font-size: 24px; }
.topbar p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.firm-chip {
  min-height: 44px;
  max-width: 260px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfc;
}
.firm-chip strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}
.firm-chip span {
  color: var(--primary-2);
  font-size: 12px;
  font-weight: 800;
}
.header-context {
  display: flex;
  align-items: end;
  gap: 10px;
}
.header-context label {
  width: 190px;
  gap: 4px;
}
.header-context label span {
  font-size: 11px;
}
.header-context select {
  min-height: 36px;
  padding: 6px 9px;
}
.content { flex: 1 1 auto; padding: 22px 22px 76px; display: grid; gap: 18px; align-content: start; min-width: 0; }
.footer {
  position: fixed;
  left: 280px;
  right: 0;
  bottom: 0;
  z-index: 4;
  background: var(--panel);
  padding: 14px 22px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  transition: left .2s ease;
}
body.sidebar-collapsed .footer { left: 82px; }

.grid, .tile-grid, .pricing-grid, .form-grid { display: grid; gap: 16px; }
.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat, .panel, .tile, .price-card, .login-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.stat { padding: 18px; }
.stat span, .muted { color: var(--muted); }
.stat strong { display: block; font-size: 34px; margin-top: 8px; }
.panel { padding: 18px; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-head h2 { margin: 0; font-size: 20px; }
.panel-head p { margin: 5px 0 0; }
.panel-head.compact { margin-top: 18px; }
.tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tab {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.tab:hover, .tab.active { color: var(--primary-2); border-bottom-color: var(--primary); }
.tab-panel { display: block; }
.settings-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.settings-summary div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 13px;
  min-height: 78px;
}
.settings-summary .wide { grid-column: span 3; }
.settings-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}
.settings-summary strong {
  display: block;
  color: var(--text);
  overflow-wrap: anywhere;
}
.guide-list {
  margin: 10px 0 0;
  padding-left: 22px;
  line-height: 1.7;
}
.guide-list li {
  margin: 2px 0;
}
.tile-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tile { padding: 18px; min-height: 150px; display: grid; align-content: start; gap: 10px; }
.tile strong { font-size: 18px; }
.tile p, .price-card p { margin: 0; color: var(--muted); line-height: 1.45; }
.dashboard-page {
  display: grid;
  gap: 12px;
}
.dashboard-hero {
  min-height: 104px;
  border-radius: 8px;
  border: 1px solid #bfe3db;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, .94), rgba(17, 94, 89, .88)),
    repeating-linear-gradient(45deg, rgba(255,255,255,.08) 0 1px, transparent 1px 14px);
  color: white;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: 0 14px 34px rgba(15, 118, 110, .15);
}
.dashboard-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 8px;
  color: #e9fffb;
  font-size: 12px;
  font-weight: 700;
}
.dashboard-hero h2 {
  margin: 10px 0 5px;
  font-size: 26px;
  letter-spacing: 0;
}
.dashboard-hero p {
  margin: 0;
  color: #d8fffb;
  font-weight: 700;
}
.hero-btn {
  background: white;
  color: #0f766e;
  box-shadow: 0 12px 26px rgba(0,0,0,.16);
}
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.dashboard-stat {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 13px 16px;
  min-height: 88px;
  display: grid;
  align-content: space-between;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.dashboard-stat::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: currentColor;
}
.dashboard-stat span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #435066;
  font-weight: 700;
  font-size: 13px;
}
.dashboard-stat strong {
  display: block;
  color: var(--text);
  font-size: 26px;
  line-height: 1.05;
  margin-top: 8px;
}
.stat-teal { color: #0f766e; background: #f0fdfa; }
.stat-blue { color: #2563eb; background: #eff6ff; }
.stat-green { color: #15803d; background: #f0fdf4; }
.stat-amber { color: #b45309; background: #fffbeb; }
.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 328px;
  gap: 12px;
  align-items: start;
}
.dashboard-main {
  display: grid;
  gap: 12px;
}
.dashboard-section,
.dashboard-side {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.section-title-row h3 {
  margin: 0;
  font-size: 17px;
}
.section-title-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.quick-action-grid,
.dashboard-module-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.quick-action,
.dashboard-module {
  text-decoration: none;
  border: 1px solid color-mix(in srgb, currentColor 24%, white);
  border-radius: 8px;
  background: white;
  color: var(--text);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.quick-action:hover,
.dashboard-module:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, .12);
}
.quick-action {
  min-height: 72px;
  padding: 12px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
}
.quick-action span,
.module-icon {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: color-mix(in srgb, currentColor 13%, white);
  color: currentColor;
}
.quick-action strong {
  color: var(--text);
}
.dashboard-module {
  min-height: 128px;
  padding: 13px;
  display: grid;
  align-content: start;
  gap: 7px;
}
.dashboard-module .module-meta {
  color: currentColor;
  font-size: 12px;
  font-weight: 800;
}
.dashboard-module strong {
  font-size: 17px;
  color: var(--text);
}
.dashboard-module p {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}
.tone-teal { color: #0f766e; background: #f0fdfa; }
.tone-blue { color: #2563eb; background: #eff6ff; }
.tone-green { color: #15803d; background: #f0fdf4; }
.tone-amber { color: #b45309; background: #fffbeb; }
.tone-violet { color: #7c3aed; background: #f5f3ff; }
.tone-cyan { color: #0891b2; background: #ecfeff; }
.tone-rose { color: #be123c; background: #fff1f2; }
.tone-slate { color: #475569; background: #f8fafc; }
.recent-list {
  display: grid;
  gap: 8px;
}
.recent-item,
.recent-empty {
  border: 1px solid #e6edf3;
  border-radius: 8px;
  padding: 10px;
  background: #fbfdff;
}
.recent-type {
  display: inline-block;
  color: #0f766e;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.recent-item strong {
  display: block;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.recent-item small,
.recent-empty {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}
.pricing-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.price-card { padding: 18px; }
.price-card h3 { margin: 0 0 12px; }
.price-card strong { font-size: 22px; }

.btn, .icon-btn {
  border: 0;
  border-radius: 8px;
  min-height: 40px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  gap: 8px;
  font-weight: 700;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, color .16s ease;
}
.btn:hover, .icon-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, .12);
}
.btn.primary {
  background: linear-gradient(135deg, #0f766e, #0891b2);
  color: white;
  box-shadow: 0 10px 20px rgba(15, 118, 110, .18);
}
.btn.primary:hover { background: linear-gradient(135deg, #115e59, #0e7490); }
.btn.danger-btn {
  background: linear-gradient(135deg, #dc2626, #b42318);
  color: white;
}
.btn.ghost {
  background: #eaf7f6;
  color: #0f766e;
  border: 1px solid #b7e4dd;
}
.btn.ghost:hover {
  background: #d9f2ef;
  color: #115e59;
}
.btn.full { width: 100%; }
.btn.small { min-height: 32px; padding: 0 10px; background: #eaf7f6; }
.btn.icon-only { width: 34px; min-width: 34px; padding: 0; }
.btn.icon-only svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn.action-edit { background: #dbeafe; color: #1d4ed8; }
.btn.action-edit:hover { background: #bfdbfe; }
.btn.action-add { background: #dcfce7; color: #15803d; }
.btn.action-add:hover { background: #bbf7d0; }
.btn.action-view { background: #e0f2fe; color: #0369a1; }
.btn.action-view:hover { background: #bae6fd; }
.btn.action-whatsapp { background: #dcfce7; color: #15803d; }
.btn.action-whatsapp:hover { background: #bbf7d0; }
.btn.action-password { background: #fef3c7; color: #92400e; }
.btn.action-password:hover { background: #fde68a; }
.btn.action-status { background: #e0f2fe; color: #0369a1; }
.btn.action-status:hover { background: #bae6fd; }
.btn.action-delete { background: #fee2e2; color: #b42318; }
.btn.action-delete:hover { background: #fecaca; }
.table-actions { display: flex; gap: 8px; align-items: center; }
.icon-btn { width: 42px; padding: 0; background: #eef4f6; }
.mobile-menu { display: none; }
.collapse-menu { display: inline-flex; }
.pill { background: #e6f4f1; color: var(--primary-2); border-radius: 999px; padding: 7px 10px; font-size: 12px; text-transform: capitalize; white-space: nowrap; }
.pill.warn { background: #fff8db; color: #854d0e; }
.alert { padding: 12px 14px; border-radius: 8px; background: #eef4ff; border: 1px solid #c7d7fe; margin-bottom: 12px; }
.alert.danger { color: var(--danger); background: #fff1f0; border-color: #fecdca; }
.alert.success { color: var(--success); background: #ecfdf3; border-color: #abefc6; }
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .06);
  font-weight: 700;
}
.alert::before {
  content: "!";
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  background: currentColor;
  color: white;
  font-size: 13px;
}

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #f8fafc; font-size: 13px; color: var(--muted); }
.actions-cell { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.actions-cell form { margin: 0; }
.block { display: block; margin-top: 3px; }
.accounts-head { align-items: flex-start; }
.list-tools {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 12px;
}
.list-tools.voucher-tools {
  grid-template-columns: minmax(240px, 1fr) 160px 160px auto auto;
}
.list-tools.statement-tools {
  grid-template-columns: minmax(280px, 1fr) 160px 160px auto;
}
.outstanding-page {
  display: grid;
  gap: 10px;
  padding-top: 14px;
}
.outstanding-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.summary-card {
  border: 1px solid color-mix(in srgb, currentColor 24%, white);
  border-radius: 8px;
  padding: 12px 14px;
  min-height: 82px;
  display: grid;
  align-content: space-between;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}
.summary-card span {
  color: #435066;
  font-size: 12px;
  font-weight: 800;
}
.summary-card strong {
  color: var(--text);
  font-size: 24px;
  line-height: 1.05;
}
.list-tools.outstanding-tools {
  grid-template-columns: minmax(210px, 1fr) 150px auto auto auto auto;
  align-items: end;
  margin-bottom: 0;
  padding: 10px;
  border: 1px solid #d8e4ef;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}
.list-tools.outstanding-tools .btn {
  min-height: 40px;
  padding-inline: 14px;
  white-space: nowrap;
}
.page-jump {
  display: inline-flex;
  align-items: end;
  gap: 8px;
  margin-left: auto;
}
.page-jump label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.page-jump input {
  width: 82px;
  min-height: 34px;
}
.progress-strip {
  display: none;
  position: relative;
  overflow: hidden;
  min-height: 38px;
  align-items: center;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  background: #ecfdf5;
  color: #065f46;
  font-size: 13px;
  font-weight: 800;
  padding: 9px 12px;
}
.progress-strip.active {
  display: flex;
}
.progress-strip span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 35%;
  background: linear-gradient(90deg, rgba(20, 184, 166, .08), rgba(20, 184, 166, .45), rgba(20, 184, 166, .08));
  animation: progressSweep 1.1s infinite linear;
}
.progress-strip strong {
  position: relative;
  z-index: 1;
}
@keyframes progressSweep {
  from { transform: translateX(-110%); }
  to { transform: translateX(310%); }
}
.outstanding-meta {
  margin: 0;
}
.outstanding-table {
  min-width: 700px;
  font-size: 13px;
}
.outstanding-table .num {
  text-align: right;
}
.outstanding-table th {
  background: #0f766e;
  color: #fff;
  font-weight: 800;
  padding: 10px 12px;
  position: sticky;
  top: 0;
  z-index: 1;
}
.outstanding-table td {
  padding: 10px 12px;
}
.outstanding-table tbody tr:hover {
  background: #f0fdfa;
}
.outstanding-table tbody tr:nth-child(even) {
  background: #fbfdff;
}
.qty-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 10px;
  background: #ecfeff;
  color: #0e7490;
  font-weight: 800;
}
.activity-page {
  display: grid;
  gap: 12px;
}
.activity-hero {
  border: 1px solid #bfe3db;
  border-radius: 8px;
  padding: 14px 18px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, .96), rgba(8, 145, 178, .9)),
    repeating-linear-gradient(45deg, rgba(255,255,255,.08) 0 1px, transparent 1px 14px);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: 0 14px 34px rgba(15, 118, 110, .14);
}
.activity-hero h2 {
  margin: 8px 0 4px;
  font-size: 26px;
}
.activity-hero p {
  margin: 0;
  color: #d8fffb;
  font-weight: 700;
}
.activity-hero-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.activity-hero-stats span {
  min-width: 104px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 8px;
  padding: 9px 12px;
  background: rgba(255,255,255,.13);
  color: #e9fffb;
  font-size: 12px;
  font-weight: 800;
}
.activity-hero-stats b {
  display: block;
  color: white;
  font-size: 21px;
}
.list-tools.activity-tools {
  grid-template-columns: minmax(200px, 1fr) 148px 112px 112px 118px 118px 72px 72px;
  align-items: end;
  gap: 8px;
  margin-bottom: 0;
}
.activity-tools label {
  gap: 4px;
  font-size: 12px;
}
.activity-tools input,
.activity-tools select,
.activity-tools .btn {
  min-height: 38px;
}
.activity-tools input,
.activity-tools select {
  padding: 8px 10px;
}
.activity-tools .btn {
  padding: 0 10px;
}
.activity-tools .search-field {
  max-width: none;
}
.activity-tools .clear-btn {
  min-width: 86px;
}
.activity-count {
  background: #ecfeff;
  color: #0e7490;
}
.activity-table-wrap {
  border-color: #cfe8e4;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .04);
}
.activity-table {
  min-width: 900px;
}
.activity-table th {
  background: #eef7f6;
  color: #334155;
  font-weight: 800;
}
.activity-table tbody tr:hover {
  background: #fbfdff;
}
.activity-table td {
  vertical-align: middle;
}
.role-pill {
  background: #eef2ff;
  color: #4338ca;
}
.module-badge,
.action-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.module-badge {
  background: #f1f5f9;
  color: #334155;
}
.action-badge {
  background: #e0f2fe;
  color: #0369a1;
}
.action-login,
.action-create {
  background: #dcfce7;
  color: #15803d;
}
.action-update,
.action-status,
.action-password {
  background: #fef3c7;
  color: #92400e;
}
.action-delete,
.action-logout {
  background: #fee2e2;
  color: #b42318;
}
.search-field { max-width: 560px; }
.branding-panel .form-grid {
  align-items: start;
}
.branding-upload {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #d8e4ef;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}
.branding-preview {
  width: 118px;
  height: 74px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #cfe0eb;
  border-radius: 8px;
  background: #eef7f6;
  color: #0f766e;
}
.branding-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.branding-preview.icon-preview,
.branding-preview.app-icon-preview {
  width: 76px;
  height: 76px;
}
.branding-preview.app-icon-preview {
  border-radius: 18px;
}
.list-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.summary-pills,
.field-action-row,
.inline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.field-action-row {
  justify-content: space-between;
  color: var(--muted);
}
.inline-actions { gap: 6px; }
.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.page-link {
  min-width: 34px;
  min-height: 34px;
  border-radius: 8px;
  border: 1px solid var(--line);
  display: inline-grid;
  place-items: center;
  padding: 0 10px;
  background: white;
}
.page-link.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}
.disabled {
  opacity: .55;
  pointer-events: none;
}

.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 900px; }
.span-2 { grid-column: span 2; }
label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; }
label.check { display: flex; align-items: center; gap: 8px; min-height: 42px; }
label.check input { width: 18px; min-height: 18px; }
.form-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.permission-matrix {
  display: grid;
  gap: 12px;
}
.permission-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfdfe;
}
.permission-group h4 {
  margin: 0 0 10px;
  font-size: 14px;
}
.permission-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 8px 12px;
}
.permission-check {
  min-height: 34px;
  padding: 7px 8px;
  border: 1px solid #e6edf3;
  border-radius: 8px;
  background: white;
}
.print-action-select {
  min-width: 220px;
  max-width: 280px;
}
.format-action-form {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}
.format-action-form label {
  min-width: 240px;
}
.format-action-form .btn {
  min-height: 42px;
}
.qr-preview-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.qr-preview-box img {
  width: 92px;
  height: 92px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 6px;
}
.qr-preview-box img[src=""] { display: none; }
.print-editor-modal {
  width: min(1480px, calc(100vw - 20px));
  height: calc(100vh - 20px);
  max-height: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
}
.print-editor-modal .panel-head {
  position: relative;
  z-index: 12;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: white;
}
.print-editor-modal .print-designer-form {
  min-height: 0;
  max-height: calc(100vh - 92px);
  overflow: auto;
  padding: 14px 20px 0;
}
.print-editor-modal .print-designer-form > .form-actions {
  position: sticky;
  bottom: 0;
  z-index: 12;
  margin: 12px -20px 0;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
}
.print-editor-grid {
  max-width: none;
}
.format-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 14px;
  display: grid;
  gap: 12px;
  align-content: start;
}
.format-section h3 {
  margin: 0;
  font-size: 16px;
}
.parameter-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.param-chip {
  border: 1px solid #b7e4dd;
  border-radius: 999px;
  background: #eef7f6;
  color: var(--primary-2);
  padding: 7px 10px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}
.param-chip:hover {
  background: #d9f2ef;
}
.designer-shell {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}
.designer-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.designer-toolbar select,
.designer-toolbar input {
  width: auto;
  min-width: 78px;
}
.designer-toolbar input[data-font-size] {
  width: 76px;
}
.designer-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 12px;
  align-items: start;
}
.parameter-panel {
  order: 2;
  display: flex;
  align-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 620px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: white;
}
.parameter-panel::before {
  content: "Parameters";
  flex-basis: 100%;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.designer-canvas-wrap {
  order: 1;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #dfe7ee;
  padding: 18px;
  max-height: calc(100vh - 250px);
}
.designer-page {
  min-width: 190px;
  min-height: 420px;
  margin: 0 auto;
  background: white;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .18);
  display: grid;
  grid-template-rows: var(--designer-header-height, 150px) var(--designer-detail-height, 360px) var(--designer-footer-height, 150px);
  gap: 10px;
  transition: width .18s ease, height .18s ease;
}
.designer-page[data-size^="Thermal"] {
  grid-template-rows: var(--designer-header-height, 110px) var(--designer-detail-height, 360px) var(--designer-footer-height, 120px);
}
.designer-section {
  position: relative;
  overflow: hidden;
  border: 1px dashed #94a3b8;
  border-radius: 6px;
  background:
    linear-gradient(rgba(15, 118, 110, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 118, 110, .045) 1px, transparent 1px),
    #fff;
  background-size: 20px 20px;
}
.designer-section.selected {
  border-color: #0f766e;
  box-shadow: inset 0 0 0 2px rgba(15, 118, 110, .12);
}
.designer-section[data-section="detail"] {
  background:
    repeating-linear-gradient(0deg, rgba(15, 118, 110, .10) 0 1px, transparent 1px 32px),
    linear-gradient(rgba(15, 118, 110, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 118, 110, .045) 1px, transparent 1px),
    #fff;
  background-size: auto, 20px 20px, 20px 20px;
}
.designer-section > span {
  position: absolute;
  top: 6px;
  right: 8px;
  z-index: 1;
  color: #64748b;
  background: rgba(255,255,255,.9);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 800;
  pointer-events: none;
}
.designer-section-resize {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 9px;
  z-index: 5;
  cursor: ns-resize;
  background: linear-gradient(180deg, transparent, rgba(15, 118, 110, .12));
}
.designer-section-resize::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 3px;
  width: 42px;
  border-top: 2px solid rgba(15, 118, 110, .55);
  transform: translateX(-50%);
}
.designer-element {
  position: absolute;
  z-index: 2;
  min-width: 44px;
  min-height: 22px;
  padding: 3px 6px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: rgba(255,255,255,.88);
  color: #0f172a;
  cursor: move;
  outline: none;
  user-select: text;
  white-space: pre-wrap;
  overflow: hidden;
}
.designer-element.locked-param {
  background: #eef7f6;
  border-color: #b7e4dd;
  color: #0f766e;
  font-weight: 700;
}
.designer-element.repeat-source::after {
  content: "Repeats";
  position: absolute;
  right: 3px;
  bottom: 2px;
  font-size: 9px;
  color: #64748b;
  background: rgba(255,255,255,.75);
}
.designer-repeat-preview {
  position: absolute;
  z-index: 1;
  padding: 3px 6px;
  color: #64748b;
  border-bottom: 1px dotted rgba(100, 116, 139, .25);
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
}
.designer-element:hover {
  border-color: #8edbd3;
}
.designer-element.selected {
  border-color: #0f766e;
  background: #fff7cc;
  box-shadow: 0 0 0 2px rgba(15, 118, 110, .16);
}
.designer-element:focus {
  border-color: #0f766e;
  background: #fff7cc;
}
.voucher-entry { display: grid; gap: 16px; }
.voucher-band {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfdff;
}
.voucher-band h3 {
  margin: 0 0 12px;
  font-size: 16px;
}
.voucher-header-grid,
.voucher-footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.balance-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.balance-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #eef7f6;
  color: var(--primary-2);
  font-size: 13px;
  font-weight: 700;
}
.voucher-line-editor {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(4, minmax(90px, 130px)) auto;
  gap: 10px;
  align-items: end;
}
.voucher-line-editor.no-days {
  grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(100px, 150px)) auto;
}
.journal-line-editor {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 110px 140px minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: end;
}
.date-help {
  color: var(--primary-2);
  font-size: 12px;
  font-weight: 700;
}
.entry-table { min-width: 760px; }
.entry-table th { background: #0f766e; color: white; }
.entry-table td { vertical-align: middle; }
.statement-report.panel {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 166px);
  overflow: hidden;
  padding-bottom: 0;
}
.statement-report .panel-head,
.statement-report .statement-tools,
.statement-report .statement-totals {
  flex: 0 0 auto;
}
.statement-report .table-wrap {
  flex: 1 1 auto;
  min-height: 210px;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.statement-table {
  min-width: 0;
  table-layout: fixed;
  font-size: 11.2px;
  width: 100%;
}
.statement-table th,
.statement-report table.statement-table thead th {
  background: #0f766e !important;
  color: white;
  font-size: 11.2px;
  font-weight: 700;
  text-align: center;
  padding: 6px 2px;
  line-height: 1.15;
  position: sticky;
  top: 0;
  z-index: 2;
}
.statement-table td {
  padding: 6px 2px;
  line-height: 1.18;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.statement-table td:nth-child(n+4) { text-align: right; }
.statement-table .date-short { display: none; }
.statement-table th:nth-child(1), .statement-table td:nth-child(1),
.statement-table th:nth-child(2), .statement-table td:nth-child(2) { width: 7.5%; }
.statement-table th:nth-child(3), .statement-table td:nth-child(3) {
  text-align: left;
  width: 7%;
}
.statement-table th:nth-child(4), .statement-table td:nth-child(4),
.statement-table th:nth-child(6), .statement-table td:nth-child(6),
.statement-table th:nth-child(7), .statement-table td:nth-child(7),
.statement-table th:nth-child(8), .statement-table td:nth-child(8),
.statement-table th:nth-child(10), .statement-table td:nth-child(10),
.statement-table th:nth-child(12), .statement-table td:nth-child(12) { width: 8.5%; }
.statement-table th:nth-child(5), .statement-table td:nth-child(5),
.statement-table th:nth-child(9), .statement-table td:nth-child(9),
.statement-table th:nth-child(11), .statement-table td:nth-child(11) { width: 5.5%; }
.statement-totals {
  display: grid;
  grid-template-columns: repeat(9, minmax(92px, 1fr));
  gap: 8px;
  margin: 0 -18px;
  padding: 11px 12px;
  border: 1px solid #b7e4dd;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 0 0 8px 8px;
  background: #fffdf0;
  box-shadow: 0 -8px 20px rgba(15, 23, 42, .08), inset 0 1px 0 rgba(255,255,255,.9);
  position: relative;
  z-index: 3;
  overflow: visible;
}
.statement-totals label {
  gap: 5px;
  color: #344054;
  font-size: 11.5px;
}
.statement-totals input {
  min-height: 32px;
  padding: 6px 7px;
  border-color: #b7e4dd;
  background: white;
  color: #0f766e;
  text-align: right;
  font-weight: 700;
  font-size: 12.5px;
}
.pwa-install-btn {
  position: fixed;
  right: 18px;
  bottom: 78px;
  z-index: 30;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 14px 34px rgba(15, 118, 110, .28);
  cursor: pointer;
  font-weight: 800;
  min-height: 42px;
  padding: 10px 16px;
}
.mt { margin-top: 16px; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 42px;
  padding: 9px 11px;
  color: var(--text);
  background: white;
}
textarea { resize: vertical; font: inherit; }
input:focus, textarea:focus, .search-combo-input:focus {
  border-color: #0f766e;
  background: #fff7cc;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .16);
  outline: none;
}
input[readonly], textarea[readonly] {
  background: #f3f7f9;
  color: var(--muted);
  cursor: default;
}
input[readonly]:focus, textarea[readonly]:focus {
  background: #f3f7f9;
  box-shadow: 0 0 0 3px rgba(102, 112, 133, .12);
}
input.manual-edit {
  background: #fff7cc;
  color: var(--text);
  cursor: text;
}
.password-field { position: relative; display: block; width: 100%; }
.password-field input { padding-right: 44px; }
.password-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.password-toggle:hover { background: #eef4f6; color: var(--text); }
.password-toggle .svg-icon { width: 18px; height: 18px; }
.native-search-select {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.search-combo {
  position: relative;
  width: 100%;
}
.search-combo-input {
  padding-right: 34px;
}
.search-combo::after {
  content: "";
  position: absolute;
  right: 13px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}
.search-combo-list {
  position: absolute;
  z-index: 60;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow-y: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .16);
  padding: 6px;
  display: none;
}
.search-combo.open .search-combo-list {
  display: grid;
  gap: 3px;
}
.search-combo-option {
  border: 0;
  background: white;
  border-radius: 7px;
  min-height: 36px;
  padding: 8px 10px;
  text-align: left;
  color: var(--text);
  cursor: pointer;
}
.search-combo-option:hover,
.search-combo-option.active,
.search-combo-option[aria-selected="true"] {
  background: #e6f4f1;
  color: var(--primary-2);
}
.search-combo-empty {
  color: var(--muted);
  padding: 10px;
  font-size: 13px;
}
.filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 260px));
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.steps div { border: 1px solid var(--line); border-radius: 8px; padding: 14px; display: grid; gap: 8px; }
.steps b { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); }
.empty-state { min-height: 240px; display: grid; place-items: center; align-content: center; text-align: center; color: var(--muted); }
.empty-state strong { color: var(--text); font-size: 20px; }
.code { overflow-x: auto; background: #0b1720; color: #e7f7f5; padding: 14px; border-radius: 8px; }
.duplicate-box { margin-top: 16px; border: 1px solid #fecdca; background: #fff8f7; border-radius: 8px; padding: 16px; }
.duplicate-box h3 { margin: 0 0 8px; }
.choice-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.soft-sep {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 20px 0;
}
.inline-action {
  margin-left: 10px;
  color: var(--primary-2);
  font-weight: 800;
  text-decoration: none;
}
.inline-action:hover { text-decoration: underline; }
.mini-switch {
  width: auto;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  background: white;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}
.mini-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.mini-switch span {
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: #d8e2e7;
  position: relative;
  transition: background .18s ease;
}
.mini-switch span::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .22);
  transition: transform .18s ease;
}
.mini-switch input:checked + span { background: var(--primary); }
.mini-switch input:checked + span::after { transform: translateX(16px); }
.mini-switch b { color: var(--text); font-size: 13px; }

.guest-body { min-height: 100vh; min-height: 100dvh; background: #0b1720; }
.login-wrap { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login-panel { width: min(980px, 100%); display: grid; grid-template-columns: 1fr .92fr; background: #f8fafc; border-radius: 14px; overflow: hidden; box-shadow: 0 28px 80px rgba(0,0,0,.22); }
.login-copy { padding: 44px; background: #0b1720; color: white; display: grid; align-content: center; }
.login-copy h2 { font-size: 34px; line-height: 1.12; margin: 0 0 16px; }
.login-copy p { color: #bed0d6; max-width: 460px; }
.login-card { border: 0; border-radius: 0; box-shadow: none; padding: 44px; display: grid; gap: 12px; align-content: center; background: #fff; }
.login-card h1 { margin: 0 0 12px; }
.quick-login { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth-switch {
  display: flex;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  flex-wrap: wrap;
}
.auth-switch a { color: var(--primary-2); font-weight: 800; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }
.remember-login {
  color: var(--text);
  font-size: 14px;
  justify-content: flex-start;
}
.remember-login input {
  accent-color: var(--primary);
}
@media (min-width: 621px) {
  .login-copy h2,
  .login-copy p {
    display: block;
  }
}
.signup-panel { width: min(1120px, 100%); }
.signup-steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 4px;
}
.signup-steps span {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
}
.signup-steps .active {
  border-color: rgba(15, 118, 110, .22);
  background: #e6f4f1;
  color: var(--primary-2);
}
.form-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.organization-card { align-content: start; }

.svg-icon { width: 20px; height: 20px; display: inline-block; flex: 0 0 auto; }
.ico { width: 20px; height: 20px; display: inline-block; position: relative; flex: 0 0 auto; }
.ico::before { content: ""; position: absolute; inset: 2px; border: 2px solid currentColor; border-radius: 4px; }
.ico-menu::before { border-left: 0; border-right: 0; border-radius: 0; height: 12px; top: 4px; }
.ico-menu::after { content: ""; position: absolute; left: 2px; right: 2px; top: 9px; border-top: 2px solid currentColor; }
.ico-users::before { border-radius: 50%; width: 8px; height: 8px; left: 5px; top: 2px; }
.ico-users::after { content: ""; position: absolute; left: 2px; right: 2px; bottom: 2px; height: 7px; border: 2px solid currentColor; border-radius: 8px 8px 3px 3px; }
.ico-card::before { height: 12px; top: 4px; }
.ico-chart::after { content: ""; position: absolute; left: 5px; bottom: 4px; width: 3px; height: 7px; background: currentColor; box-shadow: 5px -4px 0 currentColor, 10px -8px 0 currentColor; }

.profile-menu { position: relative; }
.profile-btn {
  border: 1px solid var(--line);
  background: white;
  border-radius: 999px;
  min-height: 44px;
  padding: 4px 12px 4px 4px;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #164e63);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 800;
  overflow: hidden;
  border: 2px solid white;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .16);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.xl { width: 88px; height: 88px; font-size: 34px; border-width: 4px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.profile-title { display: grid; gap: 2px; text-align: left; }
.profile-name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-role { color: #b42318; font-size: 11px; font-weight: 700; line-height: 1; }
.profile-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 220px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 8px;
  display: none;
  z-index: 30;
}
.profile-dropdown.open { display: grid; }
.profile-dropdown a {
  min-height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
}
.profile-dropdown a:hover { background: #f3f7f8; }
.profile-meta {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}
.profile-meta strong { display: block; }
.profile-meta span { color: var(--muted); font-size: 13px; margin-top: 3px; display: block; }
.profile-hero {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.profile-cover { height: 120px; background: linear-gradient(135deg, #0f766e, #164e63 55%, #facc15); }
.profile-summary { padding: 0 22px 22px; display: flex; align-items: end; gap: 16px; margin-top: -44px; }
.profile-summary h2 { margin: 0 0 5px; }
.profile-summary p { margin: 0; color: var(--muted); }
.profile-edit-panel .form-grid {
  align-items: start;
}
.profile-photo-editor {
  display: grid;
  gap: 12px;
  justify-items: start;
  grid-row: span 4;
  padding: 16px;
  border: 1px solid #d8e4ef;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(240, 253, 250, .82), #ffffff),
    linear-gradient(135deg, rgba(15, 118, 110, .08), rgba(14, 165, 233, .08));
}
.profile-photo-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.profile-photo-row strong,
.profile-photo-row span,
.profile-photo-row small {
  display: block;
}
.profile-photo-row strong {
  color: var(--text);
  font-size: 18px;
}
.profile-photo-row span {
  margin-top: 4px;
  color: var(--muted);
  word-break: break-word;
}
.profile-photo-row small {
  width: fit-content;
  margin-top: 8px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #e6f4f1;
  color: var(--primary-2);
  font-weight: 800;
}
.profile-photo-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.profile-photo-actions label.btn {
  cursor: pointer;
}
.profile-photo-actions label.btn.remove-selected {
  outline: 2px solid #ef4444;
  outline-offset: 2px;
}
.confirm-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 23, 32, .55);
  display: none;
  place-items: center;
  padding: 18px;
  z-index: 80;
}
.confirm-backdrop.open { display: grid; }
.confirm-dialog {
  width: min(430px, 100%);
  background: white;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
  border: 1px solid var(--line);
  padding: 20px;
}
.confirm-dialog h3 { margin: 0 0 8px; }
.confirm-dialog p { color: var(--muted); line-height: 1.45; margin: 0; }
.confirm-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fee2e2;
  color: #b42318;
  margin-bottom: 12px;
}
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.confirm-backdrop [data-confirm-close] { display: none; }
.confirm-backdrop.blocked [data-confirm-cancel],
.confirm-backdrop.blocked [data-confirm-ok] { display: none; }
.confirm-backdrop.blocked [data-confirm-close] { display: inline-flex; }
.whatsapp-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 23, 32, .55);
  display: none;
  place-items: center;
  padding: 18px;
  z-index: 100;
}
.whatsapp-backdrop.open { display: grid; }
.whatsapp-dialog {
  width: min(430px, 100%);
  background: white;
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
  border: 1px solid var(--line);
  padding: 20px;
}
.whatsapp-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #dcfce7;
  color: #15803d;
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 12px;
}
.whatsapp-dialog h3 { margin: 0 0 8px; }
.whatsapp-dialog p {
  color: var(--muted);
  line-height: 1.45;
  margin: 0 0 14px;
}
.whatsapp-number-field {
  display: grid;
  gap: 6px;
  color: #344054;
  font-weight: 700;
}
.whatsapp-number-field input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
}
.whatsapp-save-field {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 12px;
  color: #344054;
  font-size: 13px;
  line-height: 1.35;
}
.whatsapp-save-field.disabled {
  opacity: .55;
}
.whatsapp-save-field input {
  margin-top: 2px;
}
.whatsapp-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}
.print-choice-backdrop {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(11, 23, 32, .58);
}
.print-choice-backdrop.open { display: grid; }
.print-choice-dialog {
  width: min(460px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
  padding: 22px;
}
.print-choice-dialog h3 {
  margin: 0 0 8px;
  font-size: 21px;
}
.print-choice-dialog p {
  margin: 0;
  color: var(--muted);
}
.print-choice-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 18px;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(11, 23, 32, .58);
}
.modal-backdrop.open { display: grid; }
.settings-modal {
  width: min(760px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 26px 80px rgba(15, 23, 42, .30);
  padding: 20px;
}
.settings-modal .panel-head { align-items: flex-start; }
.settings-modal .form-grid { max-width: none; }
.settings-modal.print-editor-modal {
  width: calc(100vw - 14px);
  height: calc(100vh - 14px);
  max-width: none;
  max-height: none;
  overflow: hidden;
  padding: 0;
}
.settings-modal.print-editor-modal .designer-canvas-wrap {
  max-height: calc(100vh - 250px);
}
.settings-modal.print-editor-modal .designer-page {
  margin: 0;
}

@media (max-width: 1100px) {
  .stats, .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-stats,
  .quick-action-grid,
  .dashboard-module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-layout { grid-template-columns: 1fr; }
  .pricing-grid, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .header-context { display: none; }
  .firm-chip { max-width: 220px; }
  .designer-body { grid-template-columns: 1fr; }
  .parameter-panel { max-height: 170px; }
  .list-tools.outstanding-tools {
    grid-template-columns: minmax(180px, 1fr) 150px auto auto auto auto;
  }
  .list-tools.outstanding-tools .btn {
    padding-inline: 12px;
  }
}

@media (max-width: 820px) {
  html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: auto;
  }
  body {
    width: 100%;
    max-width: 100%;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: visible;
    overscroll-behavior-y: auto;
    touch-action: pan-y;
  }
  * {
    -webkit-tap-highlight-color: transparent;
  }
  html.mobile-sidebar-open,
  body.mobile-sidebar-open {
    overflow: hidden;
    overscroll-behavior: none;
  }
  body.mobile-sidebar-open {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
  }
  body.mobile-sidebar-open::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 19;
    background: rgba(11, 23, 32, .48);
    backdrop-filter: blur(2px);
  }
  .shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(310px, 88vw);
    z-index: 20;
    transform: translateX(-105%);
    transition: transform .2s ease;
    padding-top: max(18px, env(safe-area-inset-top));
    padding-bottom: max(18px, env(safe-area-inset-bottom));
    box-shadow: 24px 0 60px rgba(15, 23, 42, .28);
    height: 100dvh;
    max-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
  }
  .sidebar.open { transform: translateX(0); }
  body.sidebar-collapsed .shell { grid-template-columns: 1fr; }
  body.sidebar-collapsed .sidebar-label { display: inline; }
  .mobile-menu { display: inline-flex; }
  .collapse-menu { display: none; }
  .main {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }
  .topbar {
    position: sticky;
    top: 0;
    gap: 10px;
    min-height: 68px;
    padding: max(10px, env(safe-area-inset-top)) 14px 10px;
    z-index: 15;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
  }
  .topbar > div:not(.top-actions) { min-width: 0; }
  .topbar h1 {
    font-size: 20px;
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .topbar p { font-size: 12px; }
  .top-actions { gap: 8px; min-width: 0; }
  .top-actions .pill { display: none; }
  .firm-chip { max-width: 150px; padding: 6px 9px; }
  .firm-chip strong { font-size: 12px; }
  .firm-chip span { font-size: 11px; }
  .profile-name { display: none; }
  .profile-btn { padding: 5px 7px; }
  .profile-dropdown {
    max-width: calc(100vw - 28px);
    right: 0;
  }
  .content {
    width: 100%;
    max-width: 100vw;
    padding: 12px 12px calc(92px + env(safe-area-inset-bottom));
    overflow: visible;
    touch-action: pan-y;
  }
  .footer {
    left: 0;
    padding: 10px 14px max(10px, env(safe-area-inset-bottom));
    font-size: 13px;
    box-shadow: 0 -8px 24px rgba(15, 23, 42, .06);
  }
  body.sidebar-collapsed .footer { left: 0; }
  .login-panel { grid-template-columns: 1fr; }
  .login-copy, .login-card { padding: 28px; }
  .login-copy h2 { font-size: 26px; }
  .form-pair { grid-template-columns: 1fr; }
  .settings-summary { grid-template-columns: 1fr; }
  .settings-summary .wide { grid-column: auto; }
  .panel {
    padding: 14px;
    border-radius: 10px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .07);
    width: 100%;
    max-width: 100%;
    overflow: visible;
  }
  .panel-head {
    gap: 10px;
    margin-bottom: 12px;
  }
  .dashboard-hero {
    min-height: 150px;
    padding: 18px;
    align-items: start;
    flex-direction: column;
  }
  .activity-hero {
    padding: 16px;
    align-items: stretch;
    flex-direction: column;
  }
  .outstanding-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .summary-card {
    min-height: 78px;
    padding: 11px 12px;
  }
  .summary-card strong {
    font-size: 20px;
  }
  .activity-hero h2 {
    font-size: 23px;
  }
  .activity-hero-stats {
    justify-content: stretch;
  }
  .activity-hero-stats span {
    flex: 1 1 120px;
    min-width: 0;
  }
  .dashboard-hero h2 {
    font-size: 24px;
  }
  .hero-btn {
    width: 100%;
  }
  .dashboard-stats,
  .quick-action-grid,
  .dashboard-module-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-stat {
    min-height: 100px;
  }
  .dashboard-section,
  .dashboard-side {
    padding: 14px;
    border-radius: 10px;
  }
  .quick-action {
    min-height: 72px;
    grid-template-columns: auto 1fr;
    align-items: center;
  }
  .dashboard-module {
    min-height: 138px;
  }
  .btn, .icon-btn, input, select, textarea, .search-combo-input {
    min-height: 44px;
    font-size: 16px;
  }
  .btn.small {
    min-height: 38px;
    font-size: 14px;
  }
  .btn.icon-only {
    width: 40px;
    min-width: 40px;
  }
  .form-grid,
  .account-form,
  .money-voucher-form,
  .voucher-header-grid,
  .voucher-footer-grid,
  .voucher-line-editor,
  .voucher-line-editor.no-days,
  .journal-line-editor,
  .filters,
  .settings-summary,
  .list-tools,
  .list-tools.activity-tools,
  .list-tools.outstanding-tools,
  .list-tools.statement-tools,
  .list-tools.voucher-tools {
    grid-template-columns: 1fr;
    max-width: none;
    width: 100%;
  }
  .span-2 {
    grid-column: auto;
  }
  .form-actions {
    position: sticky;
    bottom: calc(58px + env(safe-area-inset-bottom));
    z-index: 8;
    margin: 12px -14px -14px;
    padding: 10px 14px max(10px, env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .96);
    border-top: 1px solid var(--line);
    box-shadow: 0 -12px 28px rgba(15, 23, 42, .08);
  }
  .form-actions .btn {
    flex: 1 1 150px;
  }
  .balance-strip {
    gap: 8px;
  }
  .balance-strip span {
    flex: 1 1 100%;
    min-width: 0;
  }
  .table-wrap {
    max-width: 100%;
    overflow-x: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    overscroll-behavior-x: contain;
  }
  .table-wrap > table:not(.statement-table):not(.entry-table):not(.outstanding-table) {
    min-width: 0;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
  }
  .table-wrap > table:not(.statement-table):not(.entry-table):not(.outstanding-table) thead {
    display: none;
  }
  .table-wrap > table:not(.statement-table):not(.entry-table):not(.outstanding-table) tbody,
  .table-wrap > table:not(.statement-table):not(.entry-table):not(.outstanding-table) tr,
  .table-wrap > table:not(.statement-table):not(.entry-table):not(.outstanding-table) td {
    display: block;
  }
  .table-wrap > table:not(.statement-table):not(.entry-table):not(.outstanding-table) tbody tr {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
    overflow: hidden;
  }
  .activity-table-wrap {
    border: 0;
    box-shadow: none;
  }
  .activity-table {
    min-width: 0;
  }
  .activity-table td[data-label="Details"] {
    text-align: left;
  }
  .table-wrap > table:not(.statement-table):not(.entry-table):not(.outstanding-table) td:not([data-label])::before {
    display: none;
  }
  .table-wrap > table:not(.statement-table):not(.entry-table):not(.outstanding-table) td:not([data-label]):not([colspan]) {
    display: block;
    text-align: left;
  }
  .table-wrap > table:not(.statement-table):not(.entry-table):not(.outstanding-table) td {
    border-bottom: 1px solid #eef2f7;
    padding: 9px 12px;
  }
  .table-wrap > table:not(.statement-table):not(.entry-table):not(.outstanding-table) td:not(.actions-cell):not([colspan]) {
    display: grid;
    grid-template-columns: minmax(90px, 38%) minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    text-align: right;
  }
  .table-wrap > table:not(.statement-table):not(.entry-table):not(.outstanding-table) td:not(.actions-cell):not([colspan])::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-align: left;
    text-transform: uppercase;
  }
  .table-wrap > table:not(.statement-table):not(.entry-table):not(.outstanding-table) td:last-child {
    border-bottom: 0;
  }
  .table-wrap > table:not(.statement-table):not(.entry-table):not(.outstanding-table) td[colspan] {
    text-align: center;
    color: var(--muted);
  }
  th, td {
    padding: 10px;
  }
  .actions-cell,
  .table-actions {
    gap: 8px;
    flex-wrap: wrap;
  }
  .table-wrap > table:not(.statement-table):not(.entry-table):not(.outstanding-table) .actions-cell {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 12px;
    background: #f8fbfc;
  }
  .table-wrap > table:not(.statement-table):not(.entry-table) .actions-cell::before {
    content: attr(data-label);
    margin-right: auto;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
  }
  .table-wrap > table:not(.statement-table):not(.entry-table) .actions-cell .btn.icon-only {
    width: 40px;
    min-width: 40px;
    height: 40px;
  }
  .entry-table {
    min-width: 620px;
    font-size: 12px;
  }
  .entry-table th,
  .entry-table td {
    padding: 7px 8px;
    white-space: nowrap;
  }
  .entry-table .btn.icon-only {
    width: 36px;
    min-width: 36px;
    height: 36px;
  }
  .tabs {
    overflow-x: auto;
    padding-bottom: 2px;
    white-space: nowrap;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar {
    display: none;
  }
  .tab {
    min-height: 46px;
    flex: 0 0 auto;
    padding: 0 12px;
  }
  .print-editor-modal {
    width: calc(100vw - 10px);
    height: calc(100vh - 10px);
  }
  .print-editor-modal .panel-head { padding: 12px 14px; }
  .print-editor-modal .print-designer-form {
    max-height: calc(100vh - 72px);
    padding: 12px 14px 0;
  }
  .print-editor-modal .print-designer-form > .form-actions {
    margin-left: -14px;
    margin-right: -14px;
    padding: 12px 14px;
  }
  .designer-toolbar select,
  .designer-toolbar input,
  .designer-toolbar .btn { flex: 1 1 120px; }
  .designer-canvas-wrap { padding: 10px; max-height: 62vh; }
  .statement-report.panel {
    max-height: none;
    overflow: hidden;
    padding-bottom: 0;
  }
  .statement-report .table-wrap {
    max-height: none;
    overflow-x: hidden;
    overflow-y: visible;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
  }
  .statement-table {
    min-width: 0;
    width: 100%;
    display: table;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 7px;
  }
  .statement-table th,
  .statement-report table.statement-table thead th,
  .statement-table td {
    padding: 4px 0;
    border-right: 1px solid #dbe6ea;
    line-height: 1.15;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
    text-overflow: clip;
  }
  .statement-table th:last-child,
  .statement-table td:last-child {
    border-right: 0;
  }
  .statement-table .date-full {
    display: none;
  }
  .statement-table .date-short {
    display: inline;
  }
  .statement-table th,
  .statement-report table.statement-table thead th {
    font-size: 6.5px;
  }
  .statement-table td {
    font-size: 7px;
    letter-spacing: -.25px;
  }
  .statement-table th:nth-child(1), .statement-table td:nth-child(1),
  .statement-table th:nth-child(2), .statement-table td:nth-child(2) { width: 9%; }
  .statement-table th:nth-child(3), .statement-table td:nth-child(3) { width: 7%; }
  .statement-table th:nth-child(4), .statement-table td:nth-child(4),
  .statement-table th:nth-child(7), .statement-table td:nth-child(7),
  .statement-table th:nth-child(8), .statement-table td:nth-child(8) { width: 7.4%; }
  .statement-table th:nth-child(6), .statement-table td:nth-child(6),
  .statement-table th:nth-child(10), .statement-table td:nth-child(10) { width: 9.6%; }
  .statement-table th:nth-child(12), .statement-table td:nth-child(12) { width: 10.3%; }
  .statement-table th:nth-child(5), .statement-table td:nth-child(5),
  .statement-table th:nth-child(9), .statement-table td:nth-child(9),
  .statement-table th:nth-child(11), .statement-table td:nth-child(11) { width: 5.2%; }
  .statement-table th:nth-child(4),
  .statement-table th:nth-child(5),
  .statement-table th:nth-child(6),
  .statement-table th:nth-child(7),
  .statement-table th:nth-child(8),
  .statement-table th:nth-child(9),
  .statement-table th:nth-child(10),
  .statement-table th:nth-child(11),
  .statement-table th:nth-child(12),
  .statement-table td:nth-child(4),
  .statement-table td:nth-child(5),
  .statement-table td:nth-child(6),
  .statement-table td:nth-child(7),
  .statement-table td:nth-child(8),
  .statement-table td:nth-child(9),
  .statement-table td:nth-child(10),
  .statement-table td:nth-child(11),
  .statement-table td:nth-child(12) {
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
    font-variant-numeric: tabular-nums;
  }
  .statement-table td:nth-child(6),
  .statement-table td:nth-child(10),
  .statement-table td:nth-child(12) {
    font-size: 6.4px;
    letter-spacing: -.45px;
  }
  .statement-table td[colspan] {
    padding: 12px;
    text-align: center;
  }
  .statement-totals {
    grid-template-columns: repeat(3, minmax(96px, 1fr));
    margin-left: 0;
    margin-right: 0;
    overflow-x: auto;
  }
  .settings-modal {
    width: calc(100vw - 18px);
    max-height: calc(100dvh - 18px);
    overflow: auto;
    border-radius: 14px;
  }
  .pwa-install-btn {
    bottom: 72px;
    left: 14px;
    right: 14px;
    width: auto;
  }
}

@media (max-width: 620px) {
  .stats, .tile-grid, .pricing-grid, .steps, .form-grid, .filters { grid-template-columns: 1fr; }
  .panel-head { align-items: stretch; flex-direction: column; }
  .panel-head .btn {
    justify-content: center;
  }
  .btn { width: 100%; }
  .icon-btn,
  .btn.icon-only,
  .table-actions .btn.icon-only,
  .actions-cell .btn.icon-only {
    width: 40px;
    flex: 0 0 40px;
  }
  .actions-cell .btn:not(.icon-only),
  .table-actions .btn:not(.icon-only) {
    width: auto;
    flex: 0 0 auto;
  }
  .topbar {
    align-items: center;
    min-height: 66px;
  }
  .topbar h1 {
    font-size: 18px;
    line-height: 1.15;
  }
  .firm-chip {
    max-width: 112px;
    min-height: 42px;
  }
  .avatar {
    width: 34px;
    height: 34px;
  }
  .panel-head.accounts-head,
  .panel-head.sub-head {
    gap: 10px;
  }
  .list-tools {
    align-items: stretch;
    gap: 10px;
  }
  .list-tools .search-field,
  .list-tools label,
  .list-tools input,
  .list-tools select {
    min-width: 0;
  }
  .profile-summary { align-items: center; flex-direction: column; text-align: center; }
  .list-tools, .list-tools.statement-tools, .list-tools.voucher-tools { grid-template-columns: 1fr; }
  .list-tools.activity-tools {
    grid-template-columns: 1fr 1fr;
  }
  .list-tools.outstanding-tools {
    grid-template-columns: 1fr;
  }
  .outstanding-summary {
    grid-template-columns: 1fr 1fr;
  }
  .progress-strip {
    font-size: 12px;
  }
  .outstanding-table-wrap {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
  }
  .outstanding-table {
    min-width: 640px;
    font-size: 12px;
  }
  .outstanding-table th,
  .outstanding-table td {
    padding: 8px;
  }
  .outstanding-table .num {
    text-align: right;
  }
  .list-tools.activity-tools .search-field,
  .list-tools.activity-tools label:first-child,
  .list-tools.activity-tools .btn {
    grid-column: span 2;
  }
  .list-tools.activity-tools .clear-btn {
    grid-column: span 2;
  }
  .list-meta {
    align-items: center;
    gap: 8px;
  }
  .list-meta .muted {
    margin-left: auto;
  }
  .pagination { justify-content: stretch; }
  .pagination .btn, .page-link { flex: 1 1 auto; }
  .page-jump {
    flex: 1 1 100%;
    margin-left: 0;
  }
  .page-jump label {
    flex: 1;
  }
  .page-jump input {
    width: 100%;
  }
  .voucher-header-grid,
  .voucher-footer-grid,
  .voucher-line-editor,
  .voucher-line-editor.no-days,
  .journal-line-editor { grid-template-columns: 1fr; }
  .voucher-band {
    padding: 12px;
    border-radius: 10px;
  }
  .voucher-band h3 {
    font-size: 15px;
  }
  .permission-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .login-wrap {
    align-items: start;
    padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
  }
  .login-panel {
    min-height: auto;
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(0,0,0,.24);
  }
  .login-copy {
    padding: 20px 22px 16px;
    align-content: start;
    gap: 10px;
  }
  .login-copy .brand.big { margin-bottom: 8px; }
  .login-copy h2 {
    font-size: 22px;
    margin-bottom: 6px;
    display: none;
  }
  .login-copy p {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    display: none;
  }
  .login-card {
    padding: 24px 22px 26px;
    align-content: start;
    border-radius: 0;
  }
  .login-card h1 {
    font-size: 32px;
    margin-bottom: 8px;
  }
  .quick-login {
    grid-template-columns: 1fr 1fr;
  }
}

@media (display-mode: standalone) {
  .topbar {
    padding-top: max(12px, env(safe-area-inset-top));
  }
}
