.kv .subtotal dt,
.kv .subtotal dd {
  border-top: 1px solid #ccc;
  padding-top: 6px;
  margin-top: 6px;
  font-weight: 600;
}
/* Subtotal rows in settlement / sidebar */
.kv .subtotal dt,
.kv .subtotal dd,
.summary-list .subtotal dt,
.summary-list .subtotal dd {
  font-weight: 600;
  border-top: 1px solid #ccc;
  padding-top: 6px;
  margin-top: 6px;
}

/* Payment pending pill next to mode toggle */
.mode-badge-pending {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  margin-left: 8px;
  background: #fee2e2; /* Light red background */
  color: #dc2626;      /* Dark red text */
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
  vertical-align: middle;
}
/* =====================================================================
   ERMS — Master Stylesheet (Reorganized)
   ---------------------------------------------------------------------
   TABLE OF CONTENTS
   01. Design Tokens (:root)
   02. Reset & Base
   03. Layout (sidebar, content, footer)
   04. Typography & Utility
   05. Cards
   06. Buttons & Icon Buttons
   07. Forms & Fields
   08. Tables
   09. Badges, Chips, Pills, Tags
   10. Alerts & Flashes
   11. Tabs
   12. Filters & Filter Panel
   13. KPI Grids
   14. Progress Bars
   15. Charts (CSS Bars)
   16. Funnel & Split Lists
   17. Timelines
   18. Key/Value Lists
   19. Thumbs & Media
   20. Action Blocks & Inline Details
   21. Auth (Login) Page
   22. Modals
   23. Receipt & Thermal Print
   24. Wizard & Stepper
   25. Equipment View (ev-*)
   26. Rentals View (rv-*)
   27. Rentals New — Wizard UI (rn-*)
   28. List Mode Toggle & Quick Flags
   29. WhatsApp Share Card
   30. Settings (Switch, Hero, Grouped Tabs)
   31. Phone Validation States
   32. Customer Duplicate Warning
   33. Print Rules
   34. Responsive (Global Breakpoints)
   ===================================================================== */


/* =====================================================================
   01. DESIGN TOKENS
   ===================================================================== */
:root {
  --primary: #3b5bfd;
  --primary-dark: #2c48d1;
  --ok: #12b76a;
  --warn: #f79009;
  --danger: #f04438;
  --info: #2e90fa;

  --sidebar: #101828;
  --sidebar-hover: #1d2939;

  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #101828;
  --muted: #667085;
  --border: #eaecf0;

  --radius: 12px;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 4px 12px rgba(16,24,40,.06);
}


/* =====================================================================
   02. RESET & BASE
   ===================================================================== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.45;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1 { font-size: 22px; margin: 0 0 4px; font-weight: 700; }
h2 { font-size: 16px; margin: 0; font-weight: 600; }
p  { margin: 0 0 8px; }

code {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 12px;
  background: #f2f4f7;
  padding: 2px 6px;
  border-radius: 4px;
  color: #344054;
}

img, video, iframe, svg, canvas { max-width: 100%; height: auto; }


/* =====================================================================
   03. LAYOUT
   ===================================================================== */
.layout { display: flex; min-height: 100vh; }

/* ---- Sidebar ---- */
.sidebar {
  width: 240px;
  background: var(--sidebar);
  color: #eaecf0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px;
  border-bottom: 1px solid #1f2937;
}
.brand-logo {
  width: 38px; height: 38px;
  border-radius: 10px;
  object-fit: contain;
  background: #1f2937;
  flex-shrink: 0;
}
.brand-badge {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}
.brand-badge.lg { width: 56px; height: 56px; font-size: 20px; border-radius: 14px; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-text small { color: #98a2b3; font-size: 11px; }

.nav {
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow-y: auto;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #cbd5e1;
  font-weight: 500;
  transition: background .12s;
}
.nav-item:hover {
  background: var(--sidebar-hover);
  color: #fff;
  text-decoration: none;
}
.nav-item.is-active { background: var(--primary); color: #fff; }
.nav-item .icon { flex-shrink: 0; }

.user-chip {
  border-top: 1px solid #1f2937;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #344054;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
}
.user-meta { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.user-meta strong { font-size: 13px; color: #eaecf0; }
.user-meta small  { color: #98a2b3; font-size: 11px; }

/* ---- Content ---- */
.content {
  flex: 1;
  min-width: 0;
  padding: 26px 30px 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.page-head .muted { color: var(--muted); }

.footer {
  margin-top: 30px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

/* ---- Mobile hamburger + backdrop ---- */
.sidebar-toggle { display: none; }

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(16,24,40,.55);
  z-index: 45;
  opacity: 0;
  transition: opacity .25s ease;
}
.sidebar-backdrop.is-open { display: block; opacity: 1; }

.sidebar-close {
  display: none;
  margin-left: auto;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: #1f2937;
  color: #fff;
  border: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

@media (min-width: 821px) {
  .sidebar { transform: none !important; }
  .sidebar-backdrop { display: none !important; }
}


/* =====================================================================
   04. TYPOGRAPHY & UTILITY
   ===================================================================== */
.muted { color: var(--muted); }
.small { font-size: 12px; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 14px; }
.mt-sm { margin-top: 10px; }
.list-tight { padding-left: 18px; margin: 6px 0 0; }
.pre-wrap { white-space: pre-wrap; }
.inline { display: inline-block; }
.inline-details { display: inline-block; position: relative; }
.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kpi-sub { font-size: 11px; color: var(--muted); }
.btn-block { display: flex; justify-content: center; width: 100%; }
.hide-on-mobile { display: inline; }


/* =====================================================================
   05. CARDS
   ===================================================================== */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
}
.card-head.mt { margin-top: 18px; }
.card-head form.inline select {
  padding: 5px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font: inherit;
  font-size: 13px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.grid-form {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 18px;
  align-items: start;
}


/* =====================================================================
   06. BUTTONS & ICON BUTTONS
   ===================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 9px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background .12s, border-color .12s, color .12s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost   { background: #fff; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: #f9fafb; }
.btn-danger  { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #c6362c; }
.btn-sm { padding: 6px 10px; font-size: 13px; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  cursor: pointer;
}
.icon-btn:hover { background: #f9fafb; text-decoration: none; }
.icon-btn.danger { color: var(--danger); }
.icon-btn.danger:hover { background: #fef3f2; }

.row-actions {
  display: inline-flex;
  gap: 4px;
  flex-wrap: nowrap;
  justify-content: flex-end;
}


/* =====================================================================
   07. FORMS & FIELDS
   ===================================================================== */
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.form-grid.field-span, .field-span { grid-column: 1 / -1; }
.field-span-2 { grid-column: span 2; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12px; color: var(--muted); font-weight: 500; }

input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="date"], input[type="time"],
input[type="file"], select, textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59,91,253,.15);
}
textarea { resize: vertical; font-family: inherit; }
input[type="color"] {
  border: 1px solid var(--border);
  border-radius: 9px;
  width: 100%;
  cursor: pointer;
}

.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  padding-top: 6px;
}

.field-inline {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}
.field-inline select {
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  font: inherit;
}


/* =====================================================================
   08. TABLES
   ===================================================================== */
.table-wrap { overflow-x: auto; margin: 0 -6px; padding: 0 6px; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th {
  text-align: left;
  font-weight: 600;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 10px 10px;
  border-bottom: 1px solid var(--border);
  background: #f9fafb;
  white-space: nowrap;
}
.table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table .right  { text-align: right; }
.table .center { text-align: center; }
.table .nowrap { white-space: nowrap; }
.table tr:hover td { background: #fafbfc; }
.table code { background: #f2f4f7; }

.row-danger td { background: #fff6f5; }
.row-muted td  { color: var(--muted); }

.thumb-cell { width: 46px; }
.mini-thumb {
  width: 38px; height: 38px;
  border-radius: 8px;
  object-fit: cover;
  background: #f2f4f7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.mini-thumb.placeholder { border: 1px solid var(--border); }

.th-link {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}
.th-link:hover { color: var(--primary); text-decoration: none; }


/* =====================================================================
   09. BADGES, CHIPS, PILLS, TAGS
   ===================================================================== */
.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: #f2f4f7;
  color: #344054;
}
.badge-ok     { background: #e7f8f0; color: #067647; }
.badge-warn   { background: #fff4e5; color: #b54708; }
.badge-danger { background: #fee4e2; color: #b42318; box-shadow: 0 0 0 1px rgba(240,68,56,.35) inset; }
.badge-info   { background: #e6f1ff; color: #175cd3; }
.badge-muted  { background: #f2f4f7; color: #475467; }

.page-head h1 .badge { vertical-align: middle; margin-left: 4px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #f2f4f7;
  font-size: 13px;
  color: #344054;
}
.chip b { color: var(--text); }
.chip-warn   { background: #fff4e5; color: #b54708; }
.chip-danger { background: #fee4e2; color: #b42318; }
.chip-ok     { background: #e7f8f0; color: #067647; }
.chip-info   { background: #e6f1ff; color: #175cd3; }
.chip-info b { color: #175cd3; }
.chip-method b { color: var(--primary); }
.chip-active { background: var(--primary); color: #fff; }
.chip-active:hover { color: #fff; text-decoration: none; }
.chip[title] { cursor: help; }

.rv-pill {
  display: inline-block;
  min-width: 26px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}
.rv-pill-ok    { background: #e7f8f0; color: #067647; }
.rv-pill-warn  { background: #fff4e5; color: #b54708; }
.rv-pill-muted { background: #f2f4f7; color: #475467; }

.rv-code {
  display: inline-block;
  padding: 3px 8px;
  background: #f2f4f7;
  border-radius: 6px;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 12px;
  color: #344054;
}
.rv-eq-name { font-weight: 500; }
.rv-eq-tag {
  display: inline-block;
  font-size: 10.5px;
  padding: 2px 8px;
  border-radius: 999px;
  margin-top: 4px;
  font-weight: 600;
  letter-spacing: .02em;
}
.rv-eq-tag-partial { background: #fff4e5; color: #b54708; }
.rv-eq-tag-done    { background: #e7f8f0; color: #067647; }

.amount-ok     { color: var(--ok);     font-weight: 600; }
.amount-warn   { color: var(--warn);   font-weight: 600; }
.amount-danger { color: var(--danger); font-weight: 600; }


/* =====================================================================
   10. ALERTS & FLASHES
   ===================================================================== */
.flashes { display: flex; flex-direction: column; gap: 8px; }
.alert {
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
}
.alert a { margin-left: 6px; font-weight: 500; }
.alert-success { background: #e7f8f0; color: #067647; border-color: #abefc6; }
.alert-danger  { background: #fee4e2; color: #b42318; border-color: #fecdca; }
.alert-warn    { background: #fff4e5; color: #b54708; border-color: #fedf89; }
.alert-info    { background: #e6f1ff; color: #175cd3; border-color: #b2ddff; }
.alert-danger a { color: inherit; text-decoration: underline; }


/* =====================================================================
   11. TABS
   ===================================================================== */
.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
}
.tab {
  padding: 9px 14px;
  border-radius: 9px 9px 0 0;
  color: var(--muted);
  font-weight: 500;
  border-bottom: 2px solid transparent;
  font-size: 14px;
}
.tab:hover { text-decoration: none; color: var(--text); }
.tab.is-active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: #fff;
}
.tab .count {
  background: #f2f4f7;
  color: #475467;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  margin-left: 6px;
}
.tab.is-active .count { background: var(--primary); color: #fff; }


/* =====================================================================
   12. FILTERS & FILTER PANEL
   ===================================================================== */
.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  align-items: end;
}
.filters-actions { display: flex; gap: 8px; align-items: center; }
.quick-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-left: 4px; }

.filter-panel > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: var(--text);
}
.filter-panel > summary::-webkit-details-marker { display: none; }
.filter-panel .filter-summary-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.filter-panel[open] > summary { margin-bottom: 4px; }
.filter-panel .filters.form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}
.check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
}
.check input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--primary);
}


/* =====================================================================
   13. KPI GRIDS
   ===================================================================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}
.kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.kpi-label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.kpi-value { font-size: 22px; font-weight: 700; }
.kpi-danger { background: #fff4f4; border-color: #fecdca; }
.kpi-danger .kpi-value { color: var(--danger); }

.customer-view .kpi-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }


/* =====================================================================
   14. PROGRESS BARS
   ===================================================================== */
.progress {
  height: 8px;
  background: #f2f4f7;
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #6b83ff);
  border-radius: 999px;
  transition: width .2s ease;
}
.progress-fill.fill-ok     { background: linear-gradient(90deg, var(--ok), #4be0a0); }
.progress-fill.fill-info   { background: linear-gradient(90deg, var(--info), #78b8ff); }
.progress-fill.fill-warn   { background: linear-gradient(90deg, var(--warn), #ffbb55); }
.progress-fill.fill-danger { background: linear-gradient(90deg, var(--danger), #ff857c); }

.util-list { display: flex; flex-direction: column; gap: 12px; }
.util-row {
  display: grid;
  grid-template-columns: 220px 1fr 100px;
  gap: 12px;
  align-items: center;
}
.util-label { font-size: 13px; }
.util-label .badge { margin-left: 6px; }
.util-val { font-size: 12px; color: var(--muted); text-align: right; }


/* =====================================================================
   15. CHARTS (CSS BARS)
   ===================================================================== */
.chart {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  height: 240px;
  padding: 12px 4px 46px;
  position: relative;
}
.chart-bar {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}
.chart-bar-fill {
  width: 100%;
  background: linear-gradient(180deg, #3b5bfd 0%, #5b78ff 100%);
  border-radius: 6px 6px 0 0;
  transition: filter .15s;
  min-height: 6px;
}
.chart-bar:hover .chart-bar-fill { filter: brightness(1.1); }
.chart-bar-label {
  position: absolute;
  bottom: -34px;
  font-size: 11px;
  color: var(--muted);
  transform: rotate(-25deg);
  white-space: nowrap;
}
.chart-bar-val {
  position: absolute;
  top: -18px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.chart-tight { height: 200px; padding-bottom: 38px; }

.chart-bar-fill.fill-info   { background: linear-gradient(180deg, #2e90fa 0%, #64b2ff 100%); }
.chart-bar-fill.fill-ok     { background: linear-gradient(180deg, #12b76a 0%, #46d18a 100%); }
.chart-bar-fill.fill-warn   { background: linear-gradient(180deg, #f79009 0%, #fbb043 100%); }
.chart-bar-fill.fill-danger { background: linear-gradient(180deg, #f04438 0%, #f77d72 100%); }
.chart-bar-fill.fill-today  {
  background: linear-gradient(180deg, #f04438 0%, #f77d72 100%);
  box-shadow: 0 0 0 2px #ffe5e3;
}
.chart-bar-fill.fill-empty { background: #e5e7eb; min-height: 2px; }

.chart-14 { gap: 6px; }
.chart-14 .chart-bar-label {
  font-size: 10px;
  transform: none;
  bottom: -30px;
  line-height: 1.1;
  text-align: center;
}
.chart-14 .chart-bar-val { font-size: 10px; }

.chart-monthly { gap: 5px; padding-bottom: 46px; }
.chart-monthly .chart-bar-label {
  font-size: 10px;
  transform: none;
  bottom: -38px;
  text-align: center;
  line-height: 1.15;
}
.chart-monthly .chart-bar-label small {
  display: block;
  color: var(--muted);
  font-size: 9px;
}
.chart-monthly .chart-bar-val { font-size: 9px; top: -16px; }


/* =====================================================================
   16. FUNNEL & SPLIT LISTS
   ===================================================================== */
.funnel { display: flex; flex-direction: column; gap: 12px; }
.funnel-row {
  display: grid;
  grid-template-columns: 180px 1fr 160px;
  gap: 12px;
  align-items: center;
}
.funnel-label { display: flex; align-items: center; gap: 8px; }
.funnel-label b { font-weight: 600; }
.funnel-val { font-size: 12px; color: var(--muted); text-align: right; }
.funnel-val b { color: var(--text); }

.split { display: flex; flex-direction: column; gap: 12px; }
.split-row {
  display: grid;
  grid-template-columns: 220px 1fr 160px;
  gap: 12px;
  align-items: center;
}
.split-label { font-size: 13px; display: flex; align-items: center; gap: 6px; }
.split-val {
  text-align: right;
  font-size: 13px;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  align-items: baseline;
}
.split-val b { font-weight: 600; }


/* =====================================================================
   17. TIMELINES
   ===================================================================== */
.rv-timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}
.rv-timeline::before {
  content: "";
  position: absolute;
  left: 7px; top: 8px; bottom: 8px;
  width: 2px;
  background: #eef2f6;
  border-radius: 2px;
}
.rv-timeline-item {
  position: relative;
  padding-left: 26px;
  margin-bottom: 14px;
}
.rv-timeline-item:last-child { margin-bottom: 0; }
.rv-timeline-dot {
  position: absolute;
  left: 0; top: 4px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #cbd5e1;
}
.rv-timeline-item.is-done .rv-timeline-dot {
  background: var(--ok); border-color: var(--ok);
}
.rv-timeline-item.is-current .rv-timeline-dot {
  background: var(--primary); border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(59,91,253,.18);
}
.rv-timeline-item.is-overdue .rv-timeline-dot {
  background: var(--danger); border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(240,68,56,.18);
}
.rv-timeline-title { font-weight: 600; font-size: 13px; }
.rv-timeline-date  { font-size: 12.5px; color: var(--muted); }
.rv-timeline-note  { font-size: 11.5px; color: var(--primary); margin-top: 2px; }
.rv-timeline-compact .rv-timeline-item { margin-bottom: 10px; }


/* =====================================================================
   18. KEY/VALUE LISTS
   ===================================================================== */
.kv-list { list-style: none; padding: 0; margin: 0; }
.kv-list li {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.kv-list li:last-child { border-bottom: none; }
.kv-list span { color: var(--muted); }
.kv-list b { font-weight: 600; }

.kv, .summary-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  font-size: 14px;
}
.kv > div, .summary-list > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
}
.kv dt, .summary-list dt { color: var(--muted); margin: 0; }
.kv dd, .summary-list dd { margin: 0; font-weight: 500; text-align: right; }
.kv .total, .summary-list .total {
  border-bottom: none;
  border-top: 2px solid var(--border);
  padding-top: 10px;
  font-size: 16px;
}
.summary-list .total dd { font-weight: 700; color: var(--primary); }


/* =====================================================================
   19. THUMBS & MEDIA
   ===================================================================== */
.thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.thumb {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #fafbfc;
}
.thumb img { width: 100%; height: 110px; object-fit: cover; display: block; }
.thumb-doc {
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: #f2f4f7;
}
.thumb-meta { padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.thumb-meta > span {
  font-size: 12px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.thumb-actions { display: flex; gap: 6px; }

.logo-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.logo-preview { width: 60px; height: 60px; object-fit: contain; border-radius: 12px; }


/* =====================================================================
   20. ACTION BLOCKS & INLINE DETAILS
   ===================================================================== */
.action-block, .rv-action {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 10px;
  background: #fafbfc;
}
.action-block summary, .rv-action summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  list-style: none;
}
.action-block summary::-webkit-details-marker,
.rv-action summary::-webkit-details-marker { display: none; }
.rv-action summary::before {
  content: "+";
  display: inline-block;
  width: 16px;
  margin-right: 6px;
  color: var(--muted);
  font-weight: 700;
}
.rv-action[open] summary::before { content: "-"; }
.rv-action-danger { border-color: #fecdca; background: #fff8f7; }
.rv-action-danger summary { color: var(--danger); }

.inline-details > summary { list-style: none; cursor: pointer; }
.inline-details > summary::-webkit-details-marker { display: none; }
.inline-details > form {
  position: absolute;
  right: 0;
  top: 100%;
  min-width: 260px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  z-index: 6;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.inline-details > form .field { gap: 4px; }
.inline-details > form .field > span { font-size: 11px; }

#payment-form { scroll-margin-top: 20px; }


/* =====================================================================
   21. AUTH (LOGIN) PAGE
   ===================================================================== */
.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(140deg, #101828 0%, #1d2939 60%, #3b5bfd 130%);
  padding: 20px;
}
.auth-card {
  background: #fff;
  padding: 34px 30px;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.28);
  max-width: 400px;
  width: 100%;
}
.auth-brand {
  text-align: center;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.auth-brand h1 { font-size: 22px; margin: 6px 0 0; }
.auth-brand p { color: var(--muted); font-size: 13px; margin: 0; }
.auth-logo {
  width: 60px; height: 60px;
  object-fit: contain;
  border-radius: 14px;
  background: #fff;
}
.auth-form { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.auth-card .center.small { margin-top: 16px; color: var(--muted); }


/* =====================================================================
   22. MODALS
   ===================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
  animation: modal-fade .15s ease;
}
.modal-backdrop[hidden] { display: none; }

.modal {
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
  display: flex;
  flex-direction: column;
  max-height: 92vh;
  overflow: hidden;
  animation: modal-pop .18s cubic-bezier(.2,.8,.3,1.1);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.modal-head h2 { font-size: 16px; margin: 0; }
.modal-head .icon-btn { font-size: 18px; line-height: 1; }
.modal-body { padding: 16px 18px; overflow-y: auto; }
.modal-body .kv { gap: 6px; }
.modal-body .kv > div { padding: 5px 0; }
.modal-body .kv dd { font-weight: 600; }
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: #fafbfc;
}
body.modal-open { overflow: hidden; }
.modal .alert.small { padding: 8px 10px; font-size: 12px; margin: 12px 0 0; }

@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-pop {
  from { transform: translateY(6px) scale(.98); opacity: 0; }
  to   { transform: none; opacity: 1; }
}


/* =====================================================================
   23. RECEIPT & THERMAL PRINT
   ===================================================================== */
.receipt-card .card-head { align-items: center; }
.receipt-controls { display: flex; gap: 10px; align-items: end; }

.receipt-scroll {
  display: flex;
  justify-content: center;
  padding: 20px 0 8px;
  background: #f0f0f0;
  border-radius: 10px;
  overflow-x: auto;
}

.receipt {
  background: #fff;
  color: #000;
  font-family: 'Courier New', 'Lucida Console', monospace, 'Segoe UI';
  font-size: 12px;
  line-height: 1.35;
  padding: 12px 14px 18px;
  box-shadow: 0 4px 18px rgba(0,0,0,.14);
  border-radius: 4px;
}
.receipt.receipt-58 { width: 58mm; max-width: 58mm; }
.receipt.receipt-80 { width: 80mm; max-width: 80mm; font-size: 12.5px; padding: 14px 16px 20px; }

.receipt .rcpt-logo {
  display: block;
  margin: 0 auto 6px;
  max-width: 40mm;
  max-height: 20mm;
  object-fit: contain;
  filter: grayscale(1);
}

.rcpt-header { text-align: center; }
.rcpt-company { font-weight: 700; font-size: 14px; letter-spacing: .02em; }
.rcpt-tagline { font-size: 11px; }
.rcpt-line    { font-size: 11.5px; word-break: break-word; }
.rcpt-hr { border: 0; border-top: 1px dashed #000; margin: 8px 0; }
.rcpt-title {
  text-align: center;
  font-weight: 700;
  letter-spacing: .1em;
  margin-bottom: 4px;
}
.rcpt-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  margin: 1px 0;
}
.rcpt-row b { font-weight: 700; }
.rcpt-strong { font-weight: 700; }
.rcpt-total {
  font-weight: 700;
  font-size: 13px;
  border-top: 1px solid #000;
  padding-top: 4px;
  margin-top: 4px;
}
.rcpt-block-title {
  font-weight: 700;
  letter-spacing: .08em;
  font-size: 11px;
  margin-bottom: 3px;
}
.rcpt-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.rcpt-table th, .rcpt-table td { padding: 2px 0; vertical-align: top; }
.rcpt-table .right { text-align: right; }
.rcpt-table .c-item { width: 46%; }
.rcpt-table .c-qty  { width: 10%; }
.rcpt-table .c-rate { width: 20%; }
.rcpt-table .c-amt  { width: 24%; }
.rcpt-item-name { font-weight: 600; }
.rcpt-item-sub  { font-size: 10.5px; color: #333; }
.rcpt-pre    { white-space: pre-wrap; font-size: 11px; }
.rcpt-terms  { font-size: 10.5px; margin-bottom: 6px; }
.rcpt-thanks { text-align: center; font-size: 11px; margin-top: 6px; }
.rcpt-sign   { text-align: center; font-size: 11px; margin-top: 10px; }
.rcpt-hash   { text-align: center; font-size: 10px; color: #555; margin-top: 4px; }

/* ---- Receipt QR — Xprinter 58/80 mm ---- */
.rcpt-qr {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed #000;
  text-align: center;
}
.rcpt-qr img {
  display: block;
  margin: 6px auto 4px;
  /* 30mm wide → about 30% of an 80mm roll, leaves room for text */
  width: 30mm;
  height: 30mm;
  object-fit: contain;
  /* Thermal printers reproduce black on white best */
  filter: grayscale(1) contrast(1.35);
  image-rendering: pixelated;
  background: #fff;
}
.rcpt-qr-label {
  font-size: 10px;
  line-height: 1.3;
  margin-top: 2px;
}
.rcpt-qr-label strong {
  display: block;
  font-weight: 700;
}
.rcpt-qr-label small {
  display: block;
  font-size: 9px;
  word-break: break-all;
  color: #333;
}


/* =====================================================================
   24. WIZARD & STEPPER
   ===================================================================== */
.stepper {
  list-style: none;
  display: flex;
  gap: 12px;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}
.step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
  box-shadow: var(--shadow);
}
.step-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f2f4f7;
  color: #475467;
  font-weight: 600;
  font-size: 12px;
}
.step.todo    { opacity: .75; }
.step.current { border-color: var(--primary); color: var(--text); }
.step.current .step-num { background: var(--primary); color: #fff; }
.step.done    { color: var(--ok); border-color: #abefc6; background: #f4fcf8; }
.step.done .step-num { background: var(--ok); color: #fff; }

.step-panel { display: flex; flex-direction: column; gap: 14px; }
.wizard-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  margin-top: 6px;
}
.wizard-controls .spacer { flex: 1; }

.review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.review-h {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin: 0 0 8px;
}


/* =====================================================================
   25. EQUIPMENT VIEW (ev-*)
   ===================================================================== */
.ev-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 22px 24px;
  border-radius: 16px;
  background: linear-gradient(135deg, #101828 0%, #1d2939 60%, #3b5bfd 140%);
  color: #fff;
  box-shadow: 0 10px 30px rgba(16,24,40,.15);
  position: relative;
  overflow: hidden;
}
.ev-hero::after {
  content: "";
  position: absolute;
  right: -60px; top: -60px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(59,91,253,.5), transparent 70%);
  pointer-events: none;
}
.ev-hero-left { min-width: 0; flex: 1; }
.ev-hero-code {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 13px;
  letter-spacing: .08em;
  color: #c7d2fe;
  margin-bottom: 4px;
}
.ev-hero-name {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 10px;
  color: #fff;
  line-height: 1.2;
}
.ev-hero-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.ev-hero-pills .badge { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.15); }
.ev-hero-pills .badge-ok     { background: rgba(18,183,106,.22); border-color: rgba(18,183,106,.5); }
.ev-hero-pills .badge-warn   { background: rgba(247,144,9,.22); border-color: rgba(247,144,9,.5); }
.ev-hero-pills .badge-danger { background: rgba(240,68,56,.25); border-color: rgba(240,68,56,.5); }
.ev-hero-pills .badge-info   { background: rgba(46,144,250,.22); border-color: rgba(46,144,250,.5); }
.ev-hero-pills .badge-muted  { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: #cbd5e1; }
.ev-hero-meta {
  display: flex; flex-wrap: wrap; gap: 16px;
  font-size: 12.5px;
  color: #cbd5e1;
}
.ev-hero-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.ev-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; flex-shrink: 0; }
.ev-hero-actions .btn-ghost {
  background: rgba(255,255,255,.08);
  color: #fff;
  border-color: rgba(255,255,255,.2);
}
.ev-hero-actions .btn-ghost:hover { background: rgba(255,255,255,.16); color: #fff; }
.ev-hero-actions .btn-primary { background: #fff; color: var(--primary); }
.ev-hero-actions .btn-primary:hover { background: #eef2ff; color: var(--primary-dark); }

.ev-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 4px 14px rgba(16,24,40,.04);
}
.ev-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 10px;
}
.ev-card-head h2 { font-size: 15px; margin: 0; }
.ev-note { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }

.ev-main-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 16px;
  align-items: start;
}
.ev-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.ev-dep-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.ev-dep-item {
  background: #fafbfc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ev-dep-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.ev-dep-value { font-size: 16px; font-weight: 700; }
.ev-dep-sub   { font-size: 11px; color: var(--muted); }


/* =====================================================================
   26. RENTALS VIEW (rv-*)
   ===================================================================== */
.rv-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 22px 24px;
  border-radius: 16px;
  background: linear-gradient(135deg, #101828 0%, #1d2939 60%, #3b5bfd 140%);
  color: #fff;
  box-shadow: 0 10px 30px rgba(16,24,40,.15);
  position: relative;
  overflow: hidden;
}
.rv-hero::after {
  content: "";
  position: absolute;
  right: -60px; top: -60px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(59,91,253,.5), transparent 70%);
  pointer-events: none;
}
.rv-hero-left { min-width: 0; flex: 1; }
.rv-hero-code {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: .02em;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  word-break: break-all;
}
.rv-hero-pills { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 12px; }
.rv-hero-pills .badge { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.15); }
.rv-hero-pills .badge-danger { background: rgba(240,68,56,.25); border-color: rgba(240,68,56,.5); }
.rv-hero-pills .badge-ok     { background: rgba(18,183,106,.22); border-color: rgba(18,183,106,.5); }
.rv-hero-pills .badge-warn   { background: rgba(247,144,9,.22); border-color: rgba(247,144,9,.5); }
.rv-hero-pills .badge-info   { background: rgba(46,144,250,.22); border-color: rgba(46,144,250,.5); }
.rv-hero-pills .badge-muted  { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: #cbd5e1; }
.rv-hero-meta {
  display: flex; flex-wrap: wrap; gap: 16px;
  font-size: 12.5px;
  color: #cbd5e1;
}
.rv-hero-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.rv-hero-link { color: #fff; text-decoration: underline; text-decoration-color: rgba(255,255,255,.35); }
.rv-hero-link:hover { text-decoration-color: #fff; }
.rv-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; flex-shrink: 0; }
.rv-hero-actions .btn-ghost {
  background: rgba(255,255,255,.08);
  color: #fff;
  border-color: rgba(255,255,255,.2);
}
.rv-hero-actions .btn-ghost:hover { background: rgba(255,255,255,.16); color: #fff; }
.rv-hero-actions .btn-primary { background: #fff; color: var(--primary); }
.rv-hero-actions .btn-primary:hover { background: #eef2ff; color: var(--primary-dark); }

.rv-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.rv-kpi {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 1px 2px rgba(16,24,40,.04);
}
.rv-kpi-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.rv-kpi-value { font-size: 20px; font-weight: 700; }
.rv-kpi-sub   { font-size: 11.5px; color: var(--muted); }
.rv-kpi-ok    { border-color: #abefc6; background: #f4fcf8; }
.rv-kpi-warn  { border-color: #fedf89; background: #fffaf0; }
.rv-kpi-bar {
  margin-top: 4px;
  height: 4px;
  background: #eef2f6;
  border-radius: 999px;
  overflow: hidden;
}
.rv-kpi-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--ok), #4be0a0);
  border-radius: 999px;
}

.rv-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 4px 14px rgba(16,24,40,.04);
}
.rv-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 10px;
}
.rv-card-head h2 { font-size: 15px; margin: 0; }

.rv-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.rv-customer { display: flex; gap: 14px; align-items: flex-start; }
.rv-avatar {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), #6b83ff);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(59,91,253,.35);
}
.rv-customer-name { font-weight: 600; font-size: 15px; }
.rv-customer-line {
  font-size: 12.5px;
  color: var(--text);
  display: flex; align-items: center; gap: 5px;
  margin-top: 3px;
}
.rv-customer-line.muted { color: var(--muted); }

.rv-main-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 16px;
  align-items: start;
}
.rv-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.rv-payment-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}
.rv-payment-form .btn { height: 40px; white-space: nowrap; }

.rv-field { display: flex; flex-direction: column; gap: 4px; }
.rv-field > span { font-size: 12px; color: var(--muted); font-weight: 500; }
.rv-field input, .rv-field select {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
  font: inherit;
  font-size: 14px;
}
.rv-field input:focus, .rv-field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59,91,253,.15);
}

.rv-list { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.rv-list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: #fafbfc;
  border-radius: 9px;
  border: 1px solid var(--border);
}
.rv-list-title  { font-weight: 600; font-size: 13px; }
.rv-list-sub    { font-size: 11.5px; color: var(--muted); }
.rv-list-amount { font-weight: 700; font-size: 14px; }

.rv-kv { display: flex; flex-direction: column; gap: 0; margin: 0; font-size: 13.5px; }
.rv-kv > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
  gap: 12px;
}
.rv-kv > div:last-child { border-bottom: none; }
.rv-kv dt { color: var(--muted); margin: 0; }
.rv-kv dd { margin: 0; text-align: right; font-weight: 500; }
.rv-kv-total {
  border-bottom: none !important;
  border-top: 2px solid var(--border);
  padding-top: 12px !important;
  margin-top: 4px;
  font-size: 15px;
}
.rv-kv-total dd { font-weight: 700; }

.rv-table th { background: transparent; border-bottom: 1px solid var(--border); }
.rv-table tbody tr:hover td { background: #fafbfc; }
.rv-table tfoot td {
  background: #f9fafb;
  border-top: 1px solid var(--border);
  font-size: 13px;
}
.rv-total-row td { background: #f2f4f7; font-size: 14px; }


/* =====================================================================
   27. RENTALS NEW — WIZARD UI (rn-*)
   ===================================================================== */
.rn-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 22px 24px;
  border-radius: 16px;
  background: linear-gradient(135deg, #101828 0%, #1d2939 60%, #3b5bfd 140%);
  color: #fff;
  box-shadow: 0 10px 30px rgba(16,24,40,.15);
  position: relative;
  overflow: hidden;
}
.rn-hero::after {
  content: "";
  position: absolute;
  right: -60px; top: -60px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(59,91,253,.5), transparent 70%);
  pointer-events: none;
}
.rn-hero-left { min-width: 0; flex: 1; }
.rn-hero-eyebrow {
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #c7d2fe;
  margin-bottom: 4px;
}
.rn-hero-title { font-size: 22px; font-weight: 700; margin: 0 0 4px; color: #fff; }
.rn-hero-sub   { font-size: 13px; color: #cbd5e1; margin: 0; max-width: 56ch; }
.rn-hero-actions { display: flex; gap: 8px; flex-shrink: 0; }
.rn-hero-actions .btn-ghost {
  background: rgba(255,255,255,.08);
  color: #fff;
  border-color: rgba(255,255,255,.2);
}
.rn-hero-actions .btn-ghost:hover { background: rgba(255,255,255,.16); color: #fff; }

.rn-stepper {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.rn-step {
  position: relative;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: border-color .15s, background .15s;
  box-shadow: 0 1px 2px rgba(16,24,40,.04);
}
.rn-step::before {
  content: "";
  position: absolute;
  left: -10px; top: 50%;
  width: 10px; height: 2px;
  background: var(--border);
  transform: translateY(-50%);
}
.rn-step:first-child::before { display: none; }
.rn-step-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #f2f4f7;
  color: #475467;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}
.rn-step-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.rn-step.is-todo    { opacity: .72; }
.rn-step.is-current {
  border-color: var(--primary);
  background: linear-gradient(180deg, #f5f7ff 0%, #ffffff 100%);
}
.rn-step.is-current .rn-step-num { background: var(--primary); color: #fff; }
.rn-step.is-current .rn-step-label { color: var(--text); }
.rn-step.is-done {
  border-color: #abefc6;
  background: #f4fcf8;
}
.rn-step.is-done .rn-step-num { background: var(--ok); color: #fff; }
.rn-step.is-done .rn-step-label { color: #067647; }

.rn-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: start;
  width: 100%;
}
.rn-panel {
  min-width: 0;
  width: 100%;
}

.rn-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 4px 14px rgba(16,24,40,.04);
}
.rn-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 10px;
}
.rn-card-head h2 { font-size: 15px; margin: 0; }

.rn-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(16,24,40,.04);
}
.rn-controls-spacer { flex: 1; }

.rn-summary {
  width: 100%;
  max-width: 360px;
  position: sticky;
  top: 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 4px 14px rgba(16,24,40,.04);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.rn-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.rn-summary-head h2 { font-size: 15px; margin: 0; }
.rn-summary-badge {
  font-size: 11px;
  padding: 3px 9px;
  background: #eef2ff;
  color: var(--primary);
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: .03em;
}
.rn-summary-list { display: flex; flex-direction: column; margin: 0; font-size: 13.5px; }
.rn-summary-list > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
  gap: 12px;
}
.rn-summary-list > div:last-child { border-bottom: none; }
.rn-summary-list dt { color: var(--muted); margin: 0; }
.rn-summary-list dd { margin: 0; text-align: right; font-weight: 500; }
.rn-summary-list .total {
  border-top: 2px solid var(--border);
  border-bottom: none;
  padding-top: 12px;
  font-size: 15px;
  margin-top: 4px;
}
.rn-summary-list .total dd { font-weight: 700; color: var(--primary); }

.rn-summary-help {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.rn-summary-help-row { display: flex; align-items: center; gap: 8px; }
.rn-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.rn-dot-1 { background: var(--primary); }
.rn-dot-2 { background: var(--info); }
.rn-dot-3 { background: var(--warn); }
.rn-dot-4 { background: var(--ok); }


/* =====================================================================
   28. LIST MODE TOGGLE & QUICK FLAGS
   ===================================================================== */
.list-mode-toggle {
  display: flex;
  gap: 6px;
  padding: 4px;
  background: #f2f4f7;
  border-radius: 12px;
  width: fit-content;
  box-shadow: inset 0 0 0 1px var(--border);
}
.list-mode-toggle .mode {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 9px;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--muted);
  text-decoration: none;
  transition: background .12s, color .12s;
}
.list-mode-toggle .mode:hover { background: #e8ecf3; color: var(--text); text-decoration: none; }
.list-mode-toggle .mode.is-active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(16,24,40,.08);
}
.list-mode-toggle .count {
  background: rgba(0,0,0,.06);
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}
.list-mode-toggle .mode.is-active .count { background: var(--primary); color: #fff; }

.quick-flags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: -4px 0 4px;
}
.quick-flags .chip { cursor: pointer; transition: background .12s, color .12s; }
.quick-flags .chip.chip-active { background: var(--primary); color: #fff; }
.quick-flags .chip.chip-active:hover { color: #fff; }


/* =====================================================================
   29. WHATSAPP SHARE CARD
   ===================================================================== */
.whatsapp-share-card {
  border-left: 4px solid #25d366;
  background: linear-gradient(180deg, #f4fdf8 0%, #ffffff 40%);
}
.wa-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0;
}
.wa-btn {
  background: #25d366;
  color: #fff !important;
  border-color: #25d366;
  font-weight: 600;
}
.wa-btn:hover { background: #1da851; border-color: #1da851; color: #fff !important; }
.wa-btn svg { margin-right: 2px; }
.wa-steps { padding-left: 20px; margin: 8px 0 0; }
.wa-steps li { margin-bottom: 4px; line-height: 1.45; }


/* =====================================================================
   30. SETTINGS (Switch, Hero, Grouped Tabs)
   ===================================================================== */

/* ---- Switch (fixed: checkbox on top layer) ---- */
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  vertical-align: middle;
}
.switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  margin: 0;
  padding: 0;
  cursor: pointer;
  z-index: 2;              /* sit ON TOP of the slider */
}
.switch-slider {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 999px;
  transition: background .15s;
  z-index: 1;
  pointer-events: none;    /* let clicks reach the checkbox */
}
.switch-slider::before {
  content: "";
  position: absolute;
  height: 18px; width: 18px;
  left: 2px; top: 2px;
  background: #fff;
  border-radius: 50%;
  transition: transform .15s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch input:checked + .switch-slider { background: var(--primary); }
.switch input:checked + .switch-slider::before { transform: translateX(18px); }

.switch-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0;
}

/* ---- Grouped tab bar ---- */
.tabs-grouped {
  flex-wrap: wrap;
  gap: 4px;
}

/* ---- Section title inside forms ---- */
.settings-group-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 12px 0 0;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

/* ---- Company hero card ---- */
.settings-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f5f7ff 0%, #eef2ff 100%);
  border: 1px solid #e0e7ff;
  flex-wrap: wrap;
}
.settings-hero-left {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
}
.settings-hero-logo,
.settings-hero-badge {
  width: 60px; height: 60px;
  border-radius: 12px;
  object-fit: contain;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 22px;
  color: var(--primary);
  box-shadow: 0 2px 6px rgba(16,24,40,.08);
}
.settings-hero h2 {
  font-size: 18px;
  margin: 0 0 2px;
}
.settings-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- Hidden file input trick ---- */
.file-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
.file-hidden-submit {
  display: none;
}
.file-hidden:not(:placeholder-shown) ~ .file-hidden-submit {
  display: inline-flex;
}
.settings-hero-actions .inline {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

@media (max-width: 820px) {
  .settings-hero { flex-direction: column; align-items: flex-start; }
  .settings-hero-actions { width: 100%; }
}


/* =====================================================================
   31. PHONE VALIDATION STATES
   ===================================================================== */
input[type="text"].is-valid,
input[type="tel"].is-valid {
  border-color: var(--ok);
  box-shadow: 0 0 0 3px rgba(18,183,106,.12);
}
input[type="text"].is-invalid,
input[type="tel"].is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(240,68,56,.12);
}

.phone-hint {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  transition: color .12s;
}
.phone-hint.is-ok  { color: var(--ok);     font-weight: 500; }
.phone-hint.is-bad { color: var(--danger); font-weight: 500; }


/* =====================================================================
   32. CUSTOMER DUPLICATE WARNING
   ===================================================================== */
.dup-warning {
  background: #fff8f7;
  border: 1px solid #fecdca;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: dup-fade .2s ease;
}
@keyframes dup-fade {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}

/* Respect the [hidden] attribute even when display is set by a class */
.dup-warning[hidden] {
  display: none !important;
}
.dup-warning-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dup-warning-head strong {
  color: #b42318;
  font-size: 14px;
}
.dup-warning-head .icon-btn {
  width: 26px; height: 26px;
  background: transparent;
  border: 0;
  color: #b42318;
  font-size: 18px;
  line-height: 1;
}

.dup-warning-body { font-size: 13px; color: #7a271a; }
.dup-warning-body ul { margin: 4px 0 8px 18px; padding: 0; }
.dup-warning-body li { margin: 2px 0; }
.dup-warning-body a { color: #b42318; text-decoration: underline; }

.dup-group + .dup-group { margin-top: 8px; }

.dup-warning-continue {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #7a271a;
  padding-top: 6px;
  border-top: 1px dashed #fecdca;
}

/* Highlight the form when a duplicate is detected */
form.has-duplicate {
  box-shadow: 0 0 0 1px #fecdca inset;
  border-radius: 12px;
}

/* Mobile tweak */
@media (max-width: 640px) {
  .dup-warning { padding: 12px 14px; }
  .dup-warning-body { font-size: 12.5px; }
}


/* =====================================================================
   33. PRINT RULES
   ===================================================================== */

/* --- Receipt-only printing (thermal 58/80 mm) --- */
@media print {
  @page { size: auto; margin: 0; }

  body.printing-receipt .sidebar,
  body.printing-receipt .footer,
  body.printing-receipt .page-head,
  body.printing-receipt .alert,
  body.printing-receipt .no-print,
  body.printing-receipt .receipt-card > .card-head,
  body.printing-receipt .receipt-scroll > *:not(#receipt) {
    display: none !important;
  }
  body.printing-receipt { background: #fff !important; }
  body.printing-receipt .content {
    padding: 0 !important;
    margin: 0 !important;
    background: #fff !important;
  }
  body.printing-receipt .layout { display: block !important; }
  body.printing-receipt .card {
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #fff !important;
  }
  .receipt {
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 4px 6px 8px !important;
    margin: 0 auto !important;
    background: #fff !important;
    color: #000 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .receipt.receipt-58 { width: 58mm; }
  .receipt.receipt-80 { width: 80mm; }
}

/* --- Generic print: hide chrome, flatten cards --- */
@media print {
  .no-print, form.filters, .page-actions button,
  .sidebar, .footer, .page-actions, .sidebar-toggle,
  .sidebar-backdrop, .sidebar-close {
    display: none !important;
  }
  body { background: #fff; }
  .card {
    box-shadow: none;
    border: 1px solid #ddd;
    page-break-inside: avoid;
  }
  .kpi-grid, .rv-kpi-grid { grid-template-columns: repeat(4, 1fr); }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .chart  { height: 200px; }
  .customer-view .kpi-grid { grid-template-columns: repeat(5, 1fr); }
  .whatsapp-share-card { display: none !important; }
}


/* =====================================================================
   34. RESPONSIVE (GLOBAL BREAKPOINTS)
   ===================================================================== */
@media (max-width: 1280px) {
  .kpi-grid,
  .rv-kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .customer-view .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  .rn-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .rn-summary {
    max-width: none;
  }
}

@media (max-width: 820px) {
  .layout {
    display: block !important;
    flex-direction: column !important;
  }

  /* Sidebar as fixed drawer */
  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 280px !important;
    max-width: 84vw !important;
    height: 100dvh !important;
    z-index: 50 !important;
    transform: translateX(-100%) !important;
    transition: transform .25s ease !important;
    box-shadow: 12px 0 40px rgba(0,0,0,.4) !important;
    overflow-y: auto !important;
  }
  .sidebar.is-open {
    transform: translateX(0) !important;
  }
  .sidebar .brand { padding: 16px; display: flex; align-items: center; gap: 10px; }
  .sidebar-close { display: inline-flex; }

  /* Content takes full width */
  .content {
    width: 100% !important;
    margin-left: 0 !important;
    padding: 68px 16px 28px !important;
    flex: none !important;
  }
  .page-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .page-head .page-actions { width: 100%; display: flex; flex-wrap: wrap; gap: 6px; }
  .page-head .page-actions .btn { flex: 1 1 auto; justify-content: center; }

  /* Backdrop */
  .sidebar-backdrop {
    display: none !important;
  }
  .sidebar-backdrop.is-open {
    display: block !important;
    opacity: 1 !important;
  }

  /* Hamburger button */
  .sidebar-toggle {
    display: inline-flex !important;
    position: fixed !important;
    top: 12px !important;
    left: 12px !important;
    z-index: 60 !important;
    width: 44px !important;
    height: 44px !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 12px !important;
    background: #101828 !important;
    color: #fff !important;
    border: 1px solid #1f2937 !important;
    box-shadow: 0 4px 14px rgba(0,0,0,.25) !important;
    cursor: pointer !important;
  }
  .sidebar-toggle svg {
    width: 22px !important;
    height: 22px !important;
    display: block !important;
  }

  /* Close (×) inside the sidebar */
  .sidebar-close {
    display: inline-flex !important;
    margin-left: auto !important;
    width: 36px !important;
    height: 36px !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 10px !important;
    background: #1f2937 !important;
    color: #fff !important;
    border: 0 !important;
    cursor: pointer !important;
  }

  .nav {
    flex-direction: column;
    overflow-x: visible;
    padding: 10px 12px;
  }
  .nav-item { padding: 12px 14px; font-size: 14px; }

  .user-chip {
    position: sticky;
    bottom: 0;
    background: var(--sidebar);
    border-top: 1px solid #1f2937;
    padding: 12px 16px;
  }

  .kpi-grid,
  .rv-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .customer-view .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .form-grid { grid-template-columns: 1fr; }
  .field-span-2 { grid-column: 1 / -1; }
  .util-row  { grid-template-columns: 1fr; }

  .filter-panel .filters.form-grid { grid-template-columns: 1fr !important; }

  .rv-hero,
  .ev-hero,
  .rn-hero { flex-direction: column; padding: 18px 16px; }
  .rv-hero-code,
  .ev-hero-name,
  .rn-hero-title { font-size: 20px; }
  .rv-hero-actions,
  .ev-hero-actions,
  .rn-hero-actions { width: 100%; }
  .rv-hero-actions .btn,
  .ev-hero-actions .btn,
  .rn-hero-actions .btn { flex: 1; justify-content: center; }

  .rv-info-grid { grid-template-columns: 1fr; }
  .rv-payment-form { grid-template-columns: 1fr; }
  .review-grid { grid-template-columns: 1fr; }

  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -14px;
    padding: 0 14px 6px;
    background-image: linear-gradient(to right,
      rgba(255,255,255,0) 0%,
      rgba(255,255,255,0) 92%,
      rgba(16,24,40,.06) 100%);
    background-repeat: no-repeat;
    background-position: right center;
    background-size: 24px 100%;
  }
  .table th, .table td { padding: 10px 8px; font-size: 13px; white-space: nowrap; }
  .table th { font-size: 11px; }
  .table th:first-child,
  .table td:first-child {
    position: sticky; left: 0;
    background: #fff;
    z-index: 1;
  }

  .rv-eq-cell { min-width: 120px; max-width: 180px; }
  .rv-eq-name { display: none; }
  .rv-eq-item { gap: 4px; }

  .wa-actions { flex-direction: column; }
  .wa-actions .btn { width: 100%; justify-content: center; }
}

@media (max-width: 720px) {
  .kpi, .rv-kpi { padding: 12px 14px; }
  .kpi-value, .rv-kpi-value { font-size: 18px; }
}

@media (max-width: 640px) {
  .chips { gap: 6px; }
  .chip  { font-size: 12px; padding: 5px 10px; }

  .tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex-shrink: 0; padding: 9px 12px; font-size: 13px; }

  .stepper { flex-direction: column; gap: 8px; }
  .step { width: 100%; justify-content: flex-start; padding: 9px 12px; font-size: 13px; }

  .form-actions, .wizard-controls, .rn-controls { flex-direction: column; gap: 8px; }
  .form-actions .btn, .wizard-controls .btn, .rn-controls .btn {
    width: 100%; justify-content: center;
  }
  .wizard-controls .spacer, .rn-controls-spacer { display: none; }

  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal {
    max-width: 100%;
    width: 100%;
    border-radius: 18px 18px 0 0;
    max-height: 92dvh;
  }
  .modal-foot { flex-wrap: wrap; gap: 8px; }
  .modal-foot .btn { flex: 1 1 auto; justify-content: center; }

  .rv-eq-cell { min-width: 100px; }
  .rv-eq-item { font-size: 11.5px; }
  .rv-eq-code { font-size: 10px; padding: 1px 4px; }
}

@media (max-width: 480px) {
  .kpi-grid,
  .rv-kpi-grid { grid-template-columns: 1fr; }
  .customer-view .kpi-grid { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .list-mode-toggle { width: 100%; }
  .list-mode-toggle .mode { flex: 1; justify-content: center; padding: 8px 10px; font-size: 12.5px; }
  .auth-card { padding: 24px 20px; }
  .auth-logo, .brand-badge.lg { width: 54px; height: 54px; }
  .thumbs { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
  .thumb img { height: 84px; }
  .thumb-doc { height: 84px; }
}

@media (max-width: 400px) {
  .rv-kpi-grid { grid-template-columns: 1fr; }
}

/* Desktop: hide the hamburger, ensure sidebar is normal */
@media (min-width: 821px) {
  .sidebar-toggle    { display: none !important; }
  .sidebar-backdrop  { display: none !important; }
  .sidebar-close     { display: none !important; }
  .sidebar           { transform: none !important; }
}