:root {
  --sidebar-w: 240px;
  --primary: #005dab;
  --primary-light: #e6f3ff;
  --primary-dark: #003f73;
  --accent: #78be20;
  --accent-light: #eff9e7;
  --green: #78be20;
  --green-light: #eff9e7;
  --red: #ef4444;
  --red-light: #fef2f2;
  --orange: #f2a900;
  --orange-light: #fff7de;
  --white: #ffffff;
  --bg: #f4f8fb;
  --bg-2: #eaf2f8;
  --text: #102a43;
  --text-2: #243b53;
  --text-3: #627d98;
  --border: #d6e4ef;
  --border-2: #b8ccd9;
  --veedesk-navy: #061b33;
  --veedesk-navy-2: #0b2949;
  --veedesk-blue: #005dab;
  --veedesk-blue-bright: #0073cf;
  --veedesk-green: #78be20;
  --veedesk-sky: #e6f3ff;

  /* Badge & Alert Base Colors */
  --success-text: #065f46;
  --success-border: #a7f3d0;
  --error-text: #991b1b;
  --error-border: #fca5a5;
  --warn-text: #92400e;
  --warn-border: #fcd34d;
  --info-text: #1e40af;
  --info-border: #bfdbfe;

  --shadow-sm: 0 2px 8px rgba(6, 27, 51, 0.08);
  --shadow: 0 10px 28px rgba(6, 27, 51, 0.1);
  --shadow-lg: 0 18px 48px rgba(6, 27, 51, 0.14);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;

  --font-body: 'Noto Sans', 'Inter', sans-serif;
  --font-heading: 'Noto Sans', 'Inter', sans-serif;
  --bg-page: #f4f8fb;
  /* Dynamic page background */
}

/* v107 TRUE EOF: Flash Label Pro 100mm × 150mm full-label thermal output */
@media print {
  @page {
    size: var(--thermal-paper-width, 3.94in) var(--thermal-paper-length, 5.91in) !important;
    margin: 0 !important;
  }

  html:has(body.print-thermal),
  body.print-thermal {
    width: var(--thermal-paper-width, 3.94in) !important;
    min-width: var(--thermal-paper-width, 3.94in) !important;
    max-width: var(--thermal-paper-width, 3.94in) !important;
    height: var(--thermal-paper-length, 5.91in) !important;
    min-height: var(--thermal-paper-length, 5.91in) !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #ffffff !important;
  }

  body.print-thermal #invoice-modal,
  body.print-thermal #estimate-print-modal,
  body.print-thermal .modal-overlay.open,
  body.print-thermal .modal,
  body.print-thermal #invoice-content,
  body.print-thermal #estimate-modal-content {
    box-sizing: border-box !important;
    width: var(--thermal-paper-width, 3.94in) !important;
    min-width: var(--thermal-paper-width, 3.94in) !important;
    max-width: var(--thermal-paper-width, 3.94in) !important;
    height: var(--thermal-paper-length, 5.91in) !important;
    min-height: var(--thermal-paper-length, 5.91in) !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    background: #ffffff !important;
    box-shadow: none !important;
    transform: none !important;
  }

  body.print-thermal #print-zone.thermal-print-sheet,
  body.print-thermal .thermal-print-sheet {
    box-sizing: border-box !important;
    display: block !important;
    width: var(--thermal-paper-width, 3.94in) !important;
    min-width: var(--thermal-paper-width, 3.94in) !important;
    max-width: var(--thermal-paper-width, 3.94in) !important;
    height: var(--thermal-paper-length, 5.91in) !important;
    min-height: var(--thermal-paper-length, 5.91in) !important;
    max-height: var(--thermal-paper-length, 5.91in) !important;
    margin: 0 !important;
    padding: 1.5mm 1.8mm 1.5mm !important;
    overflow: hidden !important;
    background: #ffffff !important;
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    box-shadow: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    page-break-before: avoid !important;
    page-break-after: avoid !important;
    page-break-inside: avoid !important;
    break-before: avoid !important;
    break-after: avoid !important;
    break-inside: avoid !important;
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
  }

  body.print-thermal .thermal-logo-wrap {
    margin: 0 auto 1mm !important;
    text-align: center !important;
  }

  body.print-thermal .thermal-logo-wrap img {
    width: 36mm !important;
    max-width: 36mm !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
  }

  body.print-thermal .thermal-shop {
    font-size: 17px !important;
    line-height: 1.08 !important;
    font-weight: 950 !important;
    letter-spacing: .2px !important;
    margin: 0 0 1mm !important;
  }

  body.print-thermal .thermal-shop-meta,
  body.print-thermal .thermal-generated,
  body.print-thermal .thermal-muted,
  body.print-thermal .thermal-item-row small {
    font-size: 12px !important;
    line-height: 1.18 !important;
    font-weight: 900 !important;
  }

  body.print-thermal .thermal-line {
    margin: 1.5mm 0 !important;
    border-top: 1.4px dashed #000000 !important;
  }

  body.print-thermal .thermal-row,
  body.print-thermal .thermal-item-row {
    font-size: 15px !important;
    line-height: 1.18 !important;
    font-weight: 950 !important;
    gap: 2mm !important;
    margin: .8mm 0 !important;
  }

  body.print-thermal .thermal-row>span,
  body.print-thermal .thermal-item-row>span {
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }

  body.print-thermal .thermal-row>strong,
  body.print-thermal .thermal-item-row>strong {
    flex: 0 0 auto !important;
    text-align: right !important;
    white-space: nowrap !important;
  }

  body.print-thermal .thermal-total,
  body.print-thermal .thermal-total span,
  body.print-thermal .thermal-total strong {
    font-size: 17px !important;
    line-height: 1.12 !important;
    font-weight: 950 !important;
  }
}

/* v120 TRUE EOF: workforce app and payroll surfaces */
.workforce-dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.workforce-dashboard-hero h2 {
  margin: 10px 0 6px;
  font-size: 1.35rem;
  line-height: 1.2;
}

.workforce-dashboard-hero p {
  margin: 0;
  color: var(--text-3);
  max-width: 680px;
}

.workforce-preview-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.workforce-preview-row:last-child {
  border-bottom: 0;
}

.workforce-preview-row span {
  color: var(--text-2);
  font-weight: 650;
}

.payroll-form {
  align-items: end;
}

.payroll-notes {
  grid-column: span 2;
}

.payroll-action {
  justify-content: end;
}

.payroll-action .btn {
  min-height: 44px;
  width: 100%;
}

@media (max-width: 760px) {
  .workforce-dashboard-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .payroll-notes {
    grid-column: span 1;
  }
}

/* v108 TRUE EOF: winning Flash Label Pro 100mm × 150mm thermal print layout */
@media print {
  @page {
    size: var(--thermal-paper-width, 3.94in) var(--thermal-paper-length, 5.91in) !important;
    margin: 0 !important;
  }

  html:has(body.print-thermal),
  body.print-thermal {
    width: var(--thermal-paper-width, 3.94in) !important;
    min-width: var(--thermal-paper-width, 3.94in) !important;
    max-width: var(--thermal-paper-width, 3.94in) !important;
    height: var(--thermal-paper-length, 5.91in) !important;
    min-height: var(--thermal-paper-length, 5.91in) !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #ffffff !important;
  }

  body.print-thermal #invoice-modal,
  body.print-thermal #estimate-print-modal,
  body.print-thermal .modal-overlay.open,
  body.print-thermal .modal,
  body.print-thermal #invoice-content,
  body.print-thermal #estimate-modal-content,
  body.print-thermal #print-zone.thermal-print-sheet,
  body.print-thermal .thermal-print-sheet {
    box-sizing: border-box !important;
    width: var(--thermal-paper-width, 3.94in) !important;
    min-width: var(--thermal-paper-width, 3.94in) !important;
    max-width: var(--thermal-paper-width, 3.94in) !important;
    height: var(--thermal-paper-length, 5.91in) !important;
    min-height: var(--thermal-paper-length, 5.91in) !important;
    max-height: var(--thermal-paper-length, 5.91in) !important;
    margin: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    background: #ffffff !important;
    box-shadow: none !important;
    transform: none !important;
  }

  body.print-thermal #invoice-content,
  body.print-thermal #estimate-modal-content {
    padding: 0 !important;
  }

  body.print-thermal #print-zone.thermal-print-sheet,
  body.print-thermal .thermal-print-sheet {
    padding: 1.5mm 1.8mm !important;
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    border-radius: 0 !important;
    page-break-before: avoid !important;
    page-break-after: avoid !important;
    page-break-inside: avoid !important;
    break-before: avoid !important;
    break-after: avoid !important;
    break-inside: avoid !important;
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
  }

  body.print-thermal .thermal-logo-wrap {
    margin: 0 auto 1mm !important;
    text-align: center !important;
  }

  body.print-thermal .thermal-logo-wrap img {
    width: 36mm !important;
    max-width: 36mm !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
  }

  body.print-thermal .thermal-shop {
    font-size: 17px !important;
    line-height: 1.08 !important;
    font-weight: 950 !important;
    letter-spacing: .2px !important;
    margin: 0 0 1mm !important;
  }

  body.print-thermal .thermal-shop-meta,
  body.print-thermal .thermal-generated,
  body.print-thermal .thermal-muted,
  body.print-thermal .thermal-item-row small {
    font-size: 12px !important;
    line-height: 1.18 !important;
    font-weight: 900 !important;
  }

  body.print-thermal .thermal-line {
    margin: 1.5mm 0 !important;
    border-top: 1.4px dashed #000000 !important;
  }

  body.print-thermal .thermal-row,
  body.print-thermal .thermal-item-row {
    font-size: 15px !important;
    line-height: 1.18 !important;
    font-weight: 950 !important;
    gap: 2mm !important;
    margin: .8mm 0 !important;
  }

  body.print-thermal .thermal-row>span,
  body.print-thermal .thermal-item-row>span {
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }

  body.print-thermal .thermal-row>strong,
  body.print-thermal .thermal-item-row>strong {
    flex: 0 0 auto !important;
    text-align: right !important;
    white-space: nowrap !important;
  }

  body.print-thermal .thermal-total,
  body.print-thermal .thermal-total span,
  body.print-thermal .thermal-total strong {
    font-size: 17px !important;
    line-height: 1.12 !important;
    font-weight: 950 !important;
  }
}

.dashboard-widget-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.dashboard-welcome {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.dashboard-welcome .page-heading {
  margin: 0;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  line-height: 1.2;
}

.dashboard-welcome .sub-message {
  margin-top: 6px;
  color: var(--text-2);
  font-size: 0.88rem;
}

.dashboard-welcome .page-sub {
  margin: 0;
  white-space: nowrap;
  color: var(--primary);
  font-weight: 800;
}

.dashboard-widget-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.dashboard-widget-top .page-heading,
.dashboard-widget-top .page-sub {
  margin-bottom: 0;
}

.dashboard-widget-top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.dashboard-widget-config-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 12px;
}

.dashboard-widget-config-card {
  padding: 18px;
  border-radius: 18px;
}

.dashboard-widget-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.dashboard-widget-option {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--white);
  color: var(--text);
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.dashboard-widget-option:hover {
  border-color: rgba(0, 104, 74, 0.35);
  box-shadow: var(--shadow-sm);
}

.dashboard-widget-option:has(input:checked) {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary-light) 72%, var(--white));
  box-shadow: 0 8px 22px rgba(0, 104, 74, 0.10);
}

.dashboard-widget-option input {
  appearance: none;
  -webkit-appearance: none;
  margin: 2px 0 0;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border: 1px solid var(--border-2);
  border-radius: 6px;
  background: var(--white);
  display: grid;
  place-items: center;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.dashboard-widget-option input::after {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) scale(0);
  transform-origin: center;
  transition: transform 140ms ease;
}

.dashboard-widget-option input:checked {
  border-color: var(--primary);
  background: var(--primary);
}

.dashboard-widget-option input:checked::after {
  transform: rotate(-45deg) scale(1);
}

.dashboard-widget-option input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}

.invoice-theme-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.invoice-theme-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 430px);
  gap: 16px;
  align-items: start;
  margin-top: 14px;
}

.invoice-theme-color-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 18px;
}

.invoice-theme-color-picker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--white);
  cursor: pointer;
}

.invoice-theme-color-picker input {
  width: 44px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.invoice-theme-color-picker span {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.invoice-theme-card {
  padding: 18px;
  border-radius: 18px;
}

.invoice-theme-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.invoice-theme-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--white);
  color: var(--text);
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.invoice-theme-option:hover {
  border-color: rgba(0, 104, 74, 0.35);
  box-shadow: var(--shadow-sm);
}

.invoice-theme-option:has(input:checked) {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary-light) 72%, var(--white));
  box-shadow: 0 8px 22px rgba(0, 104, 74, 0.10);
}

.invoice-theme-option input {
  appearance: none;
  -webkit-appearance: none;
  margin: 2px 0 0;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  background: var(--white);
  display: grid;
  place-items: center;
}

.invoice-theme-option input::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #fff;
  transform: scale(0);
  transition: transform 140ms ease;
}

.invoice-theme-option input:checked {
  border-color: var(--primary);
  background: var(--primary);
}

.invoice-theme-option input:checked::after {
  transform: scale(1);
}

.invoice-theme-option input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}

.invoice-theme-option span {
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1.25;
}

.invoice-theme-option strong {
  font-size: 0.88rem;
  font-weight: 750;
}

.invoice-theme-option small {
  color: var(--text-3);
  font-size: 0.74rem;
}

.invoice-theme-preview-card {
  position: sticky;
  top: 86px;
  padding: 18px;
  border-radius: 18px;
}

.invoice-theme-preview-head {
  margin-bottom: 12px;
}

.invoice-theme-preview-stage {
  position: relative;
  min-height: 430px;
  max-height: calc(100vh - 220px);
  overflow: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px 28px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: repeating-linear-gradient(45deg, var(--bg-page), var(--bg-page) 12px, color-mix(in srgb, var(--bg-page) 82%, var(--border)) 12px, color-mix(in srgb, var(--bg-page) 82%, var(--border)) 24px);
}

.invoice-theme-preview-stage .invoice-theme-sample.invoice-sheet {
  width: 100% !important;
  min-height: auto !important;
  max-width: 315px !important;
  margin: 0 !important;
  padding: 14px !important;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16) !important;
  transform-origin: top center;
}

.invoice-theme-preview-stage .invoice-theme-sample .inv-shop-name img {
  width: 120px !important;
  height: auto !important;
  max-height: 42px !important;
}

.invoice-theme-preview-stage .invoice-theme-sample .inv-header {
  gap: 12px;
}

.invoice-theme-preview-stage .invoice-theme-sample .inv-table th,
.invoice-theme-preview-stage .invoice-theme-sample .inv-table td {
  font-size: 0.66rem !important;
  padding: 6px !important;
}

.invoice-theme-preview-stage .tax-invoice-sheet.invoice-theme-sample {
  width: 100% !important;
  max-width: 320px !important;
  min-height: auto !important;
  padding: 9px !important;
  font-size: 6.2px !important;
  line-height: 1.2 !important;
  overflow: hidden !important;
}

.invoice-theme-preview-stage .tax-invoice-sheet.invoice-theme-sample .tax-company-row {
  grid-template-columns: 80px 1fr;
  min-height: auto;
}

.invoice-theme-preview-stage .tax-invoice-sheet.invoice-theme-sample .tax-logo-box img {
  width: 58px;
  max-height: 36px;
}

.invoice-theme-preview-stage .tax-invoice-sheet.invoice-theme-sample .tax-company-name {
  font-size: 10px;
}

.invoice-theme-preview-stage .tax-invoice-sheet.invoice-theme-sample .tax-items-table th,
.invoice-theme-preview-stage .tax-invoice-sheet.invoice-theme-sample .tax-items-table td {
  padding: 3px !important;
  font-size: 6.6px !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

.invoice-theme-preview-stage .tax-invoice-sheet.invoice-theme-sample .tax-items-table {
  table-layout: fixed !important;
  width: 100% !important;
}

.invoice-theme-preview-stage .tax-invoice-sheet.invoice-theme-sample .tax-product {
  max-width: 90px !important;
  overflow-wrap: anywhere !important;
}

.invoice-theme-sample-thermal {
  width: 205px;
  padding: 18px 14px 20px;
  background: #fff;
  color: #111;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  line-height: 1.45;
  border-left: 1px solid rgba(0, 0, 0, 0.035);
  border-right: 1px solid rgba(0, 0, 0, 0.045);
  box-shadow:
    inset 8px 0 12px -14px rgba(0, 0, 0, 0.35),
    inset -8px 0 12px -14px rgba(0, 0, 0, 0.30),
    0 18px 38px rgba(15, 23, 42, 0.18);
}

.thermal-logo-wrap {
  display: flex;
  justify-content: center;
  margin: 0 auto 5px;
}

.thermal-logo-wrap img {
  display: block;
  width: 86px;
  max-width: 70%;
  height: auto;
  filter: grayscale(1) contrast(2.1) brightness(0.58);
  mix-blend-mode: multiply;
}

.thermal-shop {
  text-align: center;
  font-weight: 900;
  font-size: 13px;
}

.thermal-shop-meta,
.thermal-generated {
  text-align: center;
  color: #444;
  font-size: 8.5px;
  line-height: 1.35;
  margin-top: 2px;
}

.thermal-generated {
  color: #666;
  font-size: 8px;
}

.thermal-muted {
  text-align: center;
  color: #555;
  font-size: 10px;
  margin-top: 4px;
}

.thermal-line {
  border-top: 1px dashed #111;
  margin: 8px 0;
}

.thermal-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.thermal-total {
  font-weight: 900;
  font-size: 12px;
}

.invoice-theme-sample-thermal.invoice-theme-thermal-bold {
  width: 220px;
  padding: 18px 15px 22px;
  border: 2px solid #111;
  font-weight: 800;
}

.invoice-theme-sample-thermal.invoice-theme-thermal-detailed {
  width: 260px;
  font-size: 10px;
}

.invoice-theme-thermal-compact .thermal-logo-wrap img {
  width: 72px;
}

.invoice-theme-thermal-compact .thermal-shop-meta {
  font-size: 7.8px;
}

.invoice-theme-thermal-compact .thermal-line {
  margin: 6px 0;
}

.invoice-theme-thermal-compact .thermal-row {
  gap: 8px;
}

.invoice-theme-thermal-bold .thermal-shop {
  margin-top: 4px;
  padding: 4px 0;
  border-top: 2px solid #111;
  border-bottom: 2px solid #111;
  font-size: 13.5px;
  letter-spacing: 0.8px;
}

.invoice-theme-thermal-bold .thermal-line {
  border-top: 2px solid #111;
  margin: 9px 0;
}

.invoice-theme-thermal-bold .thermal-bill-row {
  margin-top: 8px;
  padding: 8px 8px;
  border: 1px dashed #111;
  border-radius: 8px;
  justify-content: center;
  text-align: center;
  gap: 12px;
}

.invoice-theme-thermal-bold .thermal-total {
  margin-top: 8px;
  padding: 7px 8px;
  background: #111;
  color: #fff;
  border-radius: 2px;
}

.invoice-theme-thermal-detailed .thermal-logo-wrap {
  margin-bottom: 8px;
}

.invoice-theme-thermal-detailed .thermal-shop {
  font-size: 12.2px;
  letter-spacing: 0.4px;
}

.invoice-theme-thermal-detailed .thermal-row {
  padding: 3px 0;
  border-bottom: 1px dotted rgba(0, 0, 0, 0.20);
}

.invoice-theme-thermal-detailed .thermal-item-row {
  padding: 5px 0;
}

.invoice-theme-thermal-detailed .thermal-line {
  border-top: 1px solid #111;
  margin: 10px 0 7px;
}

.invoice-theme-thermal-detailed .thermal-total {
  margin-top: 8px;
  padding: 7px 8px;
  border: 1px solid #111;
  font-size: 12px;
}

@media screen {
  .invoice-theme-preview-stage[data-preview-kind="thermal"] {
    overflow: hidden;
    align-items: flex-start;
    padding-top: 72px;
    background:
      radial-gradient(circle at 50% 10%, rgba(255, 255, 255, 0.92), transparent 34%),
      linear-gradient(180deg, color-mix(in srgb, var(--card) 88%, #111 12%) 0 72px, transparent 72px),
      repeating-linear-gradient(45deg, var(--bg-page), var(--bg-page) 12px, color-mix(in srgb, var(--bg-page) 82%, var(--border)) 12px, color-mix(in srgb, var(--bg-page) 82%, var(--border)) 24px);
  }

  .invoice-theme-preview-stage[data-preview-kind="thermal"]::before {
    content: "";
    position: absolute;
    top: 25px;
    left: 50%;
    width: min(340px, calc(100% - 48px));
    height: 52px;
    transform: translateX(-50%);
    border-radius: 18px 18px 10px 10px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 42%),
      linear-gradient(135deg, #18201f, #050706);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.22),
      inset 0 -12px 18px rgba(0, 0, 0, 0.34),
      0 20px 34px rgba(15, 23, 42, 0.26);
    z-index: 0;
  }

  .invoice-theme-preview-stage[data-preview-kind="thermal"]::after {
    content: "";
    position: absolute;
    top: 62px;
    left: 50%;
    width: min(260px, calc(100% - 96px));
    height: 9px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: linear-gradient(180deg, #030303, #252525);
    box-shadow:
      inset 0 1px 2px rgba(255, 255, 255, 0.18),
      0 6px 12px rgba(0, 0, 0, 0.28);
    z-index: 2;
  }

  .invoice-theme-preview-stage .invoice-theme-sample-thermal,
  #invoice-content .thermal-print-sheet {
    position: relative;
    overflow: visible !important;
    border-radius: 2px;
    transform-origin: top center;
    transform: perspective(900px) rotateX(1.8deg) translateY(0);
    box-shadow:
      inset 10px 0 18px -18px rgba(0, 0, 0, 0.42),
      inset -10px 0 18px -18px rgba(0, 0, 0, 0.36),
      0 42px 58px rgba(15, 23, 42, 0.24),
      0 10px 20px rgba(15, 23, 42, 0.12) !important;
  }

  .invoice-theme-preview-stage[data-preview-kind="thermal"] .invoice-theme-sample-thermal {
    z-index: 1;
    animation: thermalPaperOut 3600ms cubic-bezier(.18, .78, .16, 1) both;
  }

  #invoice-content .thermal-print-sheet {
    animation: thermalPaperOut 2800ms cubic-bezier(.18, .78, .16, 1) both;
  }
}

@keyframes thermalPaperOut {
  0% {
    opacity: 0;
    transform: perspective(900px) rotateX(8deg) translateY(-92px) scaleY(0.42);
    clip-path: inset(0 0 78% 0);
  }

  36% {
    opacity: 1;
    transform: perspective(900px) rotateX(5deg) translateY(-42px) scaleY(0.68);
    clip-path: inset(0 0 46% 0);
  }

  72% {
    opacity: 1;
    transform: perspective(900px) rotateX(2.4deg) translateY(5px) scaleY(1.01);
    clip-path: inset(0 0 0 0);
  }

  100% {
    opacity: 1;
    transform: perspective(900px) rotateX(1.8deg) translateY(0) scaleY(1);
    clip-path: inset(0 0 0 0);
  }
}

.global-alert-stack {
  position: fixed;
  top: 14px;
  right: 18px;
  z-index: 99999;
  width: min(420px, calc(100vw - 28px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.global-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--white);
  color: var(--text);
  box-shadow: var(--shadow);
  pointer-events: auto;
}

.global-alert-success {
  border-color: var(--success-border);
  color: var(--success-text);
}

.global-alert-warning {
  border-color: var(--warn-border);
  color: var(--warn-text);
}

.global-alert-error {
  border-color: var(--error-border);
  color: var(--error-text);
}

.global-alert-info {
  border-color: var(--info-border);
  color: var(--info-text);
}

.global-alert-message {
  flex: 1;
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.35;
}

.global-alert-close {
  border: 0;
  background: transparent;
  color: currentColor;
  opacity: 0.7;
  cursor: pointer;
  padding: 0;
}

.dashboard-widget-option span {
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1.25;
}

.dashboard-widget-option strong {
  font-size: 0.86rem;
  font-weight: 700;
}

.dashboard-widget-option small {
  color: var(--text-3);
  font-size: 0.74rem;
}

.dashboard-empty-state {
  grid-column: 1 / -1;
  min-height: 140px;
}

/* Invoice theme variants */
.regular-invoice-sheet.invoice-theme-regular-modern {
  border-top: 8px solid #00684a;
  border-radius: 18px;
}

.regular-invoice-sheet.invoice-theme-regular-modern .inv-header {
  background: #edf8f3;
  border-radius: 14px;
  padding: 16px;
}

.regular-invoice-sheet.invoice-theme-regular-compact {
  padding: 24px 28px;
  font-size: 0.88rem;
}

.regular-invoice-sheet.invoice-theme-regular-compact .inv-header,
.regular-invoice-sheet.invoice-theme-regular-compact .inv-cust-box,
.regular-invoice-sheet.invoice-theme-regular-compact .inv-totals {
  margin-bottom: 10px;
}

.regular-invoice-sheet.invoice-theme-regular-minimal {
  box-shadow: none;
  border: 1px solid #d6dee8;
}

.regular-invoice-sheet.invoice-theme-regular-minimal .inv-header,
.regular-invoice-sheet.invoice-theme-regular-minimal .inv-cust-box,
.regular-invoice-sheet.invoice-theme-regular-minimal .inv-totals {
  border-color: #d6dee8;
  background: #fff;
}

.regular-invoice-sheet.invoice-theme-regular-premium {
  border: 1px solid #112a24;
  border-top: 10px solid #112a24;
}

.regular-invoice-sheet.invoice-theme-regular-premium .inv-bill-no,
.regular-invoice-sheet.invoice-theme-regular-premium .inv-total-row.grand {
  color: #00684a;
}

.regular-invoice-sheet.invoice-theme-regular-ledger .inv-table th,
.regular-invoice-sheet.invoice-theme-regular-ledger .inv-table td {
  border: 1px solid #cbd5e1;
}

.regular-invoice-sheet.invoice-theme-regular-ledger .inv-table {
  border-collapse: collapse;
}

.tax-invoice-sheet.invoice-theme-tax-bordered .tax-outer,
.tax-invoice-sheet.invoice-theme-tax-bordered .tax-company-row,
.tax-invoice-sheet.invoice-theme-tax-bordered .tax-info-grid,
.tax-invoice-sheet.invoice-theme-tax-bordered .tax-items-table th,
.tax-invoice-sheet.invoice-theme-tax-bordered .tax-items-table td {
  border-color: #000 !important;
  border-width: 1.6px !important;
}

.tax-invoice-sheet.invoice-theme-tax-green .tax-title,
.tax-invoice-sheet.invoice-theme-tax-green .tax-company-name {
  color: #00684a !important;
}

.tax-invoice-sheet.invoice-theme-tax-green .tax-outer {
  border-color: #00684a !important;
}

.tax-invoice-sheet.invoice-theme-tax-compact {
  padding: 8mm !important;
  font-size: 9px !important;
}

.tax-invoice-sheet.invoice-theme-tax-compact .tax-items-table tbody tr {
  height: 8mm !important;
}

.tax-invoice-sheet.invoice-theme-tax-premium .tax-company-row {
  background: #f2fbf7 !important;
}

.tax-invoice-sheet.invoice-theme-tax-premium .tax-company-name {
  letter-spacing: 0.8px;
}

.tax-invoice-sheet.invoice-theme-tax-official {
  font-family: 'Times New Roman', Times, serif !important;
}

.tax-invoice-sheet.invoice-theme-tax-official .tax-title {
  text-decoration: underline;
}

body.print-thermal.invoice-theme-thermal-bold .invoice-sheet,
body.print-thermal.invoice-theme-thermal-bold .tax-invoice-sheet {
  font-weight: 700 !important;
  font-size: 10px !important;
}

body.print-thermal.invoice-theme-thermal-bold table,
body.print-thermal.invoice-theme-thermal-bold th,
body.print-thermal.invoice-theme-thermal-bold td {
  font-weight: 700 !important;
}

body.print-thermal.invoice-theme-thermal-detailed .inv-footer,
body.print-thermal.invoice-theme-thermal-detailed .inv-signatures,
body.print-thermal.invoice-theme-thermal-detailed .tax-signature-row {
  display: flex !important;
}

body.print-thermal.invoice-theme-thermal-detailed .invoice-sheet,
body.print-thermal.invoice-theme-thermal-detailed .tax-invoice-sheet {
  font-size: 8.8px !important;
}

.dashboard-widget-section {
  margin-top: 18px;
}

.dashboard-medium-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.dashboard-medium-card {
  padding: 18px;
  border-radius: 16px;
}

.dashboard-medium-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--text);
}

.dashboard-medium-title span {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--primary-light);
}

.dashboard-medium-body {
  display: grid;
  gap: 8px;
}

.dashboard-mini-metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-page);
}

.dashboard-mini-metric span {
  color: var(--text-3);
  font-size: 0.76rem;
  font-weight: 650;
}

.dashboard-mini-metric strong {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
}

.dashboard-big-empty-state {
  margin-top: 14px;
}

@media (max-width: 768px) {
  .invoice-theme-layout {
    grid-template-columns: 1fr;
  }

  .invoice-theme-preview-card {
    position: static;
  }

  .invoice-theme-preview-stage {
    max-height: none;
    min-height: 360px;
  }

  .dashboard-welcome,
  .dashboard-widget-top,
  .dashboard-widget-card-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .dashboard-welcome .page-sub {
    white-space: normal;
  }

  .dashboard-widget-top-actions {
    width: 100%;
    justify-content: stretch;
  }

  .dashboard-widget-top-actions .btn {
    flex: 1;
    justify-content: center;
  }
}

/* Logged-in user chip in top-right header */
.topbar-account-menu {
  position: relative;
  display: inline-flex;
}

.topbar-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 280px;
  padding: 7px 12px 7px 7px;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 8px 24px -20px rgba(6, 22, 33, 0.35);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}

.topbar-user-chip.is-admin {
  border: 1px solid rgb(0, 218, 7);
  box-shadow: 0 10px 28px -22px rgba(212, 160, 23, 0.85);
}

.topbar-user-chip.is-staff {
  border: 1px solid rgb(0, 218, 7);
  box-shadow: 0 10px 28px -22px rgba(23, 138, 94, 0.85);
}

.topbar-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  object-fit: cover;
  flex: 0 0 auto;
}

.topbar-user-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.18;
}

.topbar-user-role {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
}

.topbar-user-chip.is-admin .topbar-user-role {
  color: #946200;
}

.topbar-user-chip.is-staff .topbar-user-role {
  color: #106b49;
}

.topbar-user-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-account-chevron {
  font-size: 0.72rem;
  color: var(--text-3);
  transition: transform 160ms ease;
}

.topbar-account-menu.open .topbar-account-chevron {
  transform: rotate(180deg);
}

.topbar-account-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 210px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 24px 70px -36px rgba(6, 22, 33, 0.55);
  display: none;
  z-index: 80;
}

.topbar-account-menu.open .topbar-account-dropdown {
  display: grid;
  gap: 4px;
  animation: accountMenuIn 150ms ease-out;
  border: 1px solid white;
}

.topbar-account-dropdown button {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

.topbar-account-dropdown button:hover,
.topbar-account-dropdown button:focus {
  background: rgba(255, 255, 255, 0.588);
}

.topbar-account-dropdown button.danger {
  color: var(--red);
}

body.dark .topbar-account-dropdown {
  background: #102a30 !important;
  border-color: #3a6870 !important;
  box-shadow: 0 24px 70px -36px rgba(0, 0, 0, 0.8);
}

body.dark .topbar-account-dropdown button {
  background: transparent !important;
  color: #f8f4ea !important;
  -webkit-text-fill-color: #f8f4ea !important;
}

body.dark .topbar-account-dropdown button i,
body.dark .topbar-account-dropdown button span {
  color: #f8f4ea !important;
  -webkit-text-fill-color: #f8f4ea !important;
}

body.dark .topbar-account-dropdown button:hover,
body.dark .topbar-account-dropdown button:focus {
  background: rgba(255, 255, 255, 0.10) !important;
}

body.dark .topbar-account-dropdown button.danger,
body.dark .topbar-account-dropdown button.danger i,
body.dark .topbar-account-dropdown button.danger span {
  color: #ffb4b4 !important;
  -webkit-text-fill-color: #ffb4b4 !important;
}

/* v101 EOF: final winning thermal receipt clarity override */
.thermal-print-sheet,
.invoice-theme-sample-thermal,
#invoice-content .thermal-print-sheet,
#estimate-modal-content .thermal-print-sheet {
  width: min(var(--thermal-paper-width, 3in), 100%) !important;
  max-width: var(--thermal-paper-width, 3in) !important;
  margin: 0 auto !important;
  padding: 10px 9px 12px !important;
  background: #ffffff !important;
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
  border: 0 !important;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif !important;
  font-size: 12.8px !important;
  font-weight: 900 !important;
  line-height: 1.26 !important;
  letter-spacing: 0 !important;
  text-shadow: none !important;
  -webkit-font-smoothing: auto !important;
}

.thermal-print-sheet *,
.invoice-theme-sample-thermal *,
body.dark .thermal-print-sheet *,
body.dark .invoice-theme-sample-thermal * {
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
  background-color: transparent !important;
  opacity: 1 !important;
  filter: none !important;
  text-shadow: none !important;
  font-family: inherit !important;
}

body.dark .thermal-print-sheet,
body.dark .invoice-theme-sample-thermal {
  background: #ffffff !important;
}

.thermal-logo-wrap img {
  width: 44px !important;
  max-height: 34px !important;
  object-fit: contain !important;
  filter: grayscale(1) contrast(2.15) brightness(.55) !important;
  opacity: 1 !important;
}

.thermal-shop {
  color: #000000 !important;
  font-size: 14px !important;
  font-weight: 950 !important;
  line-height: 1.16 !important;
  text-align: center !important;
  letter-spacing: .02em !important;
}

.thermal-shop-meta,
.thermal-generated,
.thermal-muted,
.thermal-item-row small {
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
  font-size: 10.8px !important;
  font-weight: 850 !important;
  line-height: 1.25 !important;
}

.thermal-line {
  height: 0 !important;
  margin: 6px 0 !important;
  border: 0 !important;
  border-top: 1.5px dashed #000000 !important;
  background: transparent !important;
}

.thermal-row,
.thermal-item-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 8px !important;
  align-items: start !important;
  width: 100% !important;
  margin: 3px 0 !important;
  color: #000000 !important;
  font-size: 12.2px !important;
  font-weight: 900 !important;
  line-height: 1.26 !important;
}

.thermal-row>span,
.thermal-row>strong,
.thermal-item-row>span,
.thermal-item-row>strong {
  color: #000000 !important;
  font-size: inherit !important;
  font-weight: 900 !important;
  line-height: inherit !important;
}

.thermal-row>strong,
.thermal-item-row>strong {
  text-align: right !important;
  white-space: nowrap !important;
}

.thermal-item-row span {
  overflow-wrap: anywhere !important;
}

.thermal-item-row small {
  display: block !important;
  margin-top: 2px !important;
}

.thermal-bill-row {
  padding: 4px 0 !important;
  border-top: 1.5px solid #000000 !important;
  border-bottom: 1.5px solid #000000 !important;
}

.thermal-total {
  margin: 7px 0 5px !important;
  padding: 6px 0 !important;
  border-top: 2px solid #000000 !important;
  border-bottom: 2px solid #000000 !important;
  background: #ffffff !important;
  font-size: 14px !important;
  font-weight: 950 !important;
}

.thermal-total span,
.thermal-total strong {
  font-size: 14px !important;
  font-weight: 950 !important;
}

@media print {
  body.print-thermal {
    width: var(--thermal-paper-width, 3in) !important;
    min-width: var(--thermal-paper-width, 3in) !important;
    max-width: var(--thermal-paper-width, 3in) !important;
    background: #ffffff !important;
  }

  body.print-thermal #print-zone.thermal-print-sheet,
  body.print-thermal .thermal-print-sheet,
  body.print-thermal .invoice-theme-sample-thermal {
    width: var(--thermal-paper-width, 3in) !important;
    max-width: var(--thermal-paper-width, 3in) !important;
    margin: 0 !important;
    padding: 2mm 2mm 3mm !important;
    background: #ffffff !important;
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    box-shadow: none !important;
    font-size: 12.8px !important;
    font-weight: 900 !important;
    line-height: 1.24 !important;
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
  }

  body.print-thermal #print-zone.thermal-print-sheet *,
  body.print-thermal .thermal-print-sheet *,
  body.print-thermal .invoice-theme-sample-thermal * {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    opacity: 1 !important;
    filter: none !important;
  }
}

/* v100: thermal print clarity hardening — crisp 3-inch black-and-white receipts */
.thermal-print-sheet,
.invoice-theme-sample-thermal,
#invoice-content .thermal-print-sheet,
#estimate-modal-content .thermal-print-sheet {
  width: min(var(--thermal-paper-width, 3in), 100%) !important;
  max-width: var(--thermal-paper-width, 3in) !important;
  margin: 0 auto !important;
  padding: 10px 9px 12px !important;
  background: #ffffff !important;
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
  border: 0 !important;
  box-shadow: 0 18px 42px -34px rgba(0, 0, 0, .55) !important;
  font-family: "Arial", "Helvetica Neue", Helvetica, sans-serif !important;
  font-size: 12.5px !important;
  font-weight: 800 !important;
  line-height: 1.28 !important;
  letter-spacing: 0 !important;
  text-rendering: geometricPrecision !important;
  -webkit-font-smoothing: auto !important;
}

.thermal-print-sheet *,
.invoice-theme-sample-thermal * {
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
  text-shadow: none !important;
  box-shadow: none !important;
  opacity: 1 !important;
  filter: none !important;
  font-family: inherit !important;
}

.thermal-logo-wrap {
  display: grid !important;
  place-items: center !important;
  margin: 0 0 4px !important;
}

.thermal-logo-wrap img {
  width: 44px !important;
  height: auto !important;
  max-height: 34px !important;
  object-fit: contain !important;
  filter: grayscale(1) contrast(1.8) brightness(.65) !important;
  opacity: 1 !important;
  mix-blend-mode: multiply !important;
}

.thermal-shop,
.invoice-theme-sample-thermal .thermal-shop {
  margin: 1px 0 3px !important;
  color: #000000 !important;
  font-size: 14px !important;
  font-weight: 950 !important;
  line-height: 1.15 !important;
  text-align: center !important;
  text-transform: uppercase !important;
  letter-spacing: .02em !important;
}

.thermal-shop-meta,
.thermal-generated,
.thermal-muted,
.thermal-item-row small {
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
  font-size: 10.8px !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
}

.thermal-shop-meta,
.thermal-generated,
.thermal-muted {
  text-align: center !important;
}

.thermal-line {
  height: 0 !important;
  margin: 6px 0 !important;
  border: 0 !important;
  border-top: 1.5px dashed #000000 !important;
  background: transparent !important;
}

.thermal-row,
.thermal-item-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 8px !important;
  align-items: start !important;
  width: 100% !important;
  margin: 3px 0 !important;
  color: #000000 !important;
  font-size: 12.2px !important;
  font-weight: 850 !important;
  line-height: 1.26 !important;
}

.thermal-row>span,
.thermal-row>strong,
.thermal-item-row>span,
.thermal-item-row>strong {
  min-width: 0 !important;
  color: #000000 !important;
  font-size: inherit !important;
  font-weight: 900 !important;
  line-height: inherit !important;
}

.thermal-row>strong,
.thermal-item-row>strong {
  text-align: right !important;
  white-space: nowrap !important;
}

.thermal-item-row span {
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

.thermal-item-row small {
  display: block !important;
  margin-top: 2px !important;
  color: #000000 !important;
  font-size: 10.7px !important;
  font-weight: 850 !important;
}

.thermal-bill-row {
  padding: 4px 0 !important;
  border-top: 1.5px solid #000000 !important;
  border-bottom: 1.5px solid #000000 !important;
}

.thermal-total {
  margin: 7px 0 5px !important;
  padding: 6px 0 !important;
  border-top: 2px solid #000000 !important;
  border-bottom: 2px solid #000000 !important;
  background: #ffffff !important;
  color: #000000 !important;
  font-size: 14px !important;
  font-weight: 950 !important;
}

.thermal-total span,
.thermal-total strong {
  font-size: 14px !important;
  font-weight: 950 !important;
}

body.dark .thermal-print-sheet,
body.dark .invoice-theme-sample-thermal,
body.dark #invoice-content .thermal-print-sheet,
body.dark #estimate-modal-content .thermal-print-sheet,
body.dark .thermal-print-sheet *,
body.dark .invoice-theme-sample-thermal * {
  background-color: #ffffff !important;
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
}

@media print {

  body.print-thermal,
  body.print-thermal html {
    width: var(--thermal-paper-width, 3in) !important;
    min-width: var(--thermal-paper-width, 3in) !important;
    max-width: var(--thermal-paper-width, 3in) !important;
    background: #ffffff !important;
  }

  body.print-thermal #print-zone.thermal-print-sheet,
  body.print-thermal .thermal-print-sheet,
  body.print-thermal .invoice-theme-sample-thermal {
    width: var(--thermal-paper-width, 3in) !important;
    max-width: var(--thermal-paper-width, 3in) !important;
    min-height: auto !important;
    margin: 0 !important;
    padding: 2mm 2mm 3mm !important;
    background: #ffffff !important;
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    box-shadow: none !important;
    font-size: 12.8px !important;
    font-weight: 900 !important;
    line-height: 1.24 !important;
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
  }

  body.print-thermal #print-zone.thermal-print-sheet *,
  body.print-thermal .thermal-print-sheet *,
  body.print-thermal .invoice-theme-sample-thermal * {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    background-color: transparent !important;
    opacity: 1 !important;
    filter: none !important;
  }

  body.print-thermal .thermal-logo-wrap img {
    width: 42px !important;
    max-height: 32px !important;
    filter: grayscale(1) contrast(2.2) brightness(.55) !important;
  }

  body.print-thermal .thermal-shop {
    font-size: 13.8px !important;
    font-weight: 950 !important;
  }

  body.print-thermal .thermal-shop-meta,
  body.print-thermal .thermal-generated,
  body.print-thermal .thermal-muted,
  body.print-thermal .thermal-item-row small {
    font-size: 10.6px !important;
    font-weight: 850 !important;
  }

  body.print-thermal .thermal-row,
  body.print-thermal .thermal-item-row {
    font-size: 12.2px !important;
    font-weight: 900 !important;
  }

  body.print-thermal .thermal-total,
  body.print-thermal .thermal-total span,
  body.print-thermal .thermal-total strong {
    font-size: 14px !important;
    font-weight: 950 !important;
  }
}

@keyframes accountMenuIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media print {
  .topbar-account-menu {
    display: none !important;
  }
}

@media (max-width: 720px) {
  .topbar-user-chip {
    padding: 6px;
    max-width: 170px;
  }

  .topbar-user-avatar {
    width: 30px;
    height: 30px;
  }

  .topbar-user-role {
    font-size: 0.58rem;
  }

  .topbar-user-name {
    font-size: 0.72rem;
  }

  .topbar-account-chevron {
    display: none;
  }

  .topbar-account-dropdown {
    min-width: 180px;
  }
}

.search-wrap {
  position: relative;
  flex: 1;
  max-width: 400px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  font-size: 0.9rem;
  pointer-events: none;
}

.search-input {
  padding-left: 36px !important;
}

/* ── MEDIUM MODE (DIM) ── */
body.medium {
  --primary: #3b82f6;
  --primary-light: #1e293b;
  --primary-dark: #60a5fa;
  --accent: #fbbf24;
  --accent-light: #451a03;
  --green: #10b981;
  --green-light: #162e31;
  --red: #ef4444;
  --red-light: #451a1a;
  --orange: #f97316;
  --orange-light: #431407;
  --text: #f3f4f6;
  --text-2: #e5e7eb;
  --text-3: #9ca3af;
  --border: #334155;
  --border-2: #475569;
  --bg: #1e293b;
  --bg-2: #0f172a;
  --white: #1e293b;
  --bg-page: #0f172a;

  --success-text: #34d399;
  --success-border: #064e3b;
  --error-text: #f87171;
  --error-border: #450a0a;
  --warn-text: #fbbf24;
  --warn-border: #451a03;
  --info-text: #60a5fa;
  --info-border: #1e3a8a;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* ── DARK MODE (LIGHTS OUT) ── */
body.dark {
  --primary: #60a5fa;
  --primary-light: #1e293b;
  --primary-dark: #93c5fd;
  --accent: #fbbf24;
  --accent-light: #451a03;
  --green: #10b981;
  --green-light: #064e3b;
  --red: #ef4444;
  --red-light: #450a0a;
  --orange: #f97316;
  --orange-light: #431407;
  --text: #f8fafc;
  --text-2: #f1f5f9;
  --text-3: #94a3b8;
  --border: #1e293b;
  --border-2: #334155;
  --bg: #020617;
  --bg-2: #0f172a;
  --white: #0f172a;
  --bg-page: #020617;

  --success-text: #10b981;
  --success-border: #064e3b;
  --error-text: #ef4444;
  --error-border: #450a0a;
  --warn-text: #f59e0b;
  --warn-border: #451a03;
  --info-text: #3b82f6;
  --info-border: #172554;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.7);
}

body {
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 15px;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

/* ── SIDEBAR LAYOUT ── */
.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  max-width: min(var(--sidebar-w), 92vw);
  background: var(--white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 50;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  padding-bottom: env(safe-area-inset-bottom, 0);
  will-change: transform;
  backface-visibility: hidden;
}

.sidebar-logo {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-bottom: 0 solid var(--border);
}

.sidebar-logo-img {
  width: 45px;
  height: 45px;
  border-radius: 8px;
  object-fit: cover;
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
}

.logo-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  margin-top: 4px;
}

.logo-name span {
  color: var(--primary);
}

.logo-sub {
  font-size: 0.6rem;
  color: var(--text-3);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.nav-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-3);
  padding: 20px 24px 8px;
  letter-spacing: 0.05em;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.nav-label:hover {
  color: var(--primary);
}

.nav-group-content {
  max-height: 500px;
  overflow: hidden;
  transition: max-height 0.3s ease;
  display: flex;
  flex-direction: column;
}

.nav-collapsed {
  max-height: 0 !important;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  margin: 2px 12px;
  border-radius: 6px;
  color: var(--text-2);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  border: none;
  background: none;
  cursor: pointer;
  width: calc(100% - 24px);
  text-align: left;
}

.nav-item:hover {
  background: var(--bg-2);
  color: var(--primary);
}

.nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
}

.nav-item .icon {
  font-size: 1.1rem;
  width: 24px;
  display: flex;
  justify-content: center;
  opacity: 0.9;
}

.nav-item .badge-count {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
}

.sidebar-logo-img {
  width: 100%;
  max-width: 200px;
  height: auto;
  max-height: 56px;
  object-fit: contain;
  display: block;
  margin: 0 auto 10px;
}

.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.card-title-split {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.card-title-split>span:first-child {
  min-width: 0;
}

.report-date-field {
  max-width: 200px;
  margin-bottom: 18px;
}

.report-controls-row {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.report-controls-row .form-group {
  flex: 1 1 140px;
  min-width: 0;
}

.report-controls-row .form-group.year-field {
  flex: 0 1 120px;
  max-width: 140px;
}

/* Bill line item inputs — width controlled here for responsive */
.items-table .bill-rate-input {
  width: 110px;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.items-table .bill-qty-input {
  width: 70px;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.items-table td .input-prefix {
  max-width: 100%;
}

.sidebar-footer {
  margin-top: auto;
  padding: 14px 10px;
  border-top: 1px solid var(--border);
}

.sidebar-user {
  margin: 10px 12px 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-2);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  background: #fff;
  flex-shrink: 0;
}

.sidebar-user-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sidebar-user-role {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.sidebar-user-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 150px;
}

/* ── MAIN CONTENT ── */
.content {
  margin-left: var(--sidebar-w);
  flex: 1;
  background: var(--bg-page);
  min-width: 0;
  min-height: 100vh;
  transition: margin-left 0.28s ease, background 0.28s ease;
}

.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
}

.topbar-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  min-width: 0;
  line-height: 1.25;
}

.topbar-title span {
  color: var(--text-3);
  font-weight: 400;
  font-size: 0.85rem;
  margin-left: 8px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  font-size: 1.35rem;
  cursor: pointer;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius-sm);
  color: var(--text);
}

.hamburger:active {
  background: var(--bg-2);
}

.page-inner {
  padding: 26px 28px 60px;
  max-width: 1400px;
  /* Wider for executive charts */
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 1024px) {
  .content {
    margin-left: var(--sidebar-w);
  }

  .page-inner {
    padding: 80px 16px 60px;
  }

  .dash-grid {
    grid-template-columns: 1fr !important;
  }

  .topbar {
    padding: 0 16px;
  }
}

/* ── PAGES ── */
.page {
  display: none;
}

.page.active {
  display: block;
}

/* ── TYPOGRAPHY ── */
.page-heading {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}

.sub-message {
  font-size: 13px;
  margin-bottom: 10px;
  color: var(--text-3);
}

.page-sub {
  font-size: 0.85rem;
  color: var(--text-3);
  margin-bottom: 22px;
}

/* ── CARDS ── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 18px;
}

.card-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title .icon {
  font-size: 1rem;
}

/* ── STAT CARDS ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--white);
  padding: 16px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  position: relative;
  overflow: visible;
  /* Changed for tooltip */
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 85px;
  transition: all 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  z-index: 100;
}

.stat-card[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  z-index: 9999;
  box-shadow: var(--shadow);
}

.stat-card[data-tooltip]::before {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent var(--text) transparent;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  z-index: 9999;
}

.stat-card[data-tooltip]:hover::after {
  opacity: 1;
  bottom: -35px;
}

.stat-card[data-tooltip]:hover::before {
  opacity: 1;
  bottom: -23px;
}

.stat-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  z-index: 2;
}


/* ── DASHBOARD GRIDS ── */
.dash-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.chart-container {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  min-height: 400px;
  display: flex;
  flex-direction: column;
}

/* ── MOBILE OVERRIDES ── */
@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    margin-bottom: 16px !important;
  }

  .stat-card {
    padding: 12px !important;
    min-height: 90px !important;
  }

  .stat-value {
    font-size: 1.15rem !important;
  }

  .stat-label {
    font-size: 0.58rem !important;
    margin-bottom: 4px !important;
  }


  .dash-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .chart-container {
    padding: 12px !important;
    min-height: 280px !important;
  }

  .card {
    padding: 16px !important;
  }
}

/* ── FORM ── */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 5px;
}

.form-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-2);
}

.form-label-tamil {
  font-size: 0.68rem;
  color: var(--text-3);
}

input,
select,
textarea {
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-family: 'Noto Sans Tamil', 'Noto Sans', sans-serif;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

input[type="checkbox"] {
  width: auto;
  margin: 0;
  padding: 0;
  cursor: pointer;
  accent-color: var(--primary);
  transform: scale(1.1);
}

input::placeholder {
  color: var(--text-3);
  font-size: 0.85rem;
}

textarea {
  resize: vertical;
  min-height: 70px;
}

/* ── CHARTS ── */
.chart-container {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  position: relative;
  overflow: visible;
  box-shadow: var(--shadow-sm);
}

.chart-tooltip-pro {
  position: absolute;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  pointer-events: none;
  display: none;
  min-width: 160px;
}

.tooltip-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  margin-bottom: 4px;
  line-height: 1.4;
}

.tooltip-label {
  color: var(--text-3);
}

.tooltip-value {
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.chart-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.chart-svg {
  width: 100%;
  height: 220px;
  display: block;
}

.chart-legend {
  display: flex;
  gap: 15px;
  margin-top: 15px;
  justify-content: center;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-3);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.input-prefix {
  position: relative;
}

.input-prefix span {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  font-size: 0.88rem;
  font-weight: 600;
}

.input-prefix input {
  padding-left: 24px;
}

/* ── UNIFIED BUTTONS (Zoho Minimalist) ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-family: 'Noto Sans Tamil', 'Noto Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
  transition: all 0.2s ease;
  white-space: nowrap;
  user-select: none;
  box-shadow: var(--shadow-sm);
}

.btn:hover {
  background: var(--bg-page);
  border-color: var(--border-2);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-success {
  color: var(--green);
  border-color: var(--green);
}

.btn-success:hover {
  background: var(--green-light);
}

.btn-danger {
  color: var(--red);
  border-color: var(--red);
}

.btn-danger:hover {
  background: var(--red-light);
}

.btn-ghost {
  background: var(--bg-2);
  color: var(--text-2);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--border);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.btn-ghost:hover {
  background: var(--bg-2);
}

.btn-whatsapp {
  color: #1da855;
  border-color: #1da855;
}

.btn-whatsapp:hover {
  background: var(--green-light);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.75rem;
  border-radius: 6px;
}

.btn-xs {
  padding: 4px 10px;
  font-size: 0.7rem;
  border-radius: 5px;
}

.btn-icon {
  padding: 8px;
  border-radius: var(--radius-sm);
}

.btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}

/* ── TABLE ── */
.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
}

thead th {
  background: var(--bg-2);
  padding: 10px 14px;
  text-align: left;
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text-2);
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover td {
  background: var(--bg);
}

.tamil-sub {
  display: block;
  font-size: 0.7rem;
  color: var(--text-3);
  font-weight: 400;
}

/* ── BADGE ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-paid {
  background: var(--green-light);
  color: var(--success-text);
}

.badge-partial {
  background: var(--accent-light);
  color: var(--warn-text);
}

.badge-due {
  background: var(--red-light);
  color: var(--error-text);
}

.badge-low {
  background: var(--red-light);
  color: var(--red);
}

.badge-ok {
  background: var(--green-light);
  color: var(--green);
}

/* ── ALERT ── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-success {
  background: var(--green-light);
  color: var(--success-text);
  border: 1px solid var(--success-border);
}

.alert-error {
  background: var(--red-light);
  color: var(--error-text);
  border: 1px solid var(--error-border);
}

.alert-warn {
  border: 1px solid green;
  background: var(--accent-light);
  color: var(--warn-text);
}

.alert-info {
  background: var(--primary-light);
  color: var(--info-text);
  border: 1px solid var(--info-border);
}

/* ── BILL ITEMS TABLE ── */
.items-table {
  width: 100%;
  border-collapse: collapse;
}

.items-table th {
  background: var(--bg-2);
  padding: 9px 10px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}

.items-table td {
  padding: 7px 6px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.items-table input,
.items-table select {
  border: 1.5px solid var(--border-2);
  border-radius: 6px;
  padding: 7px 9px;
  font-size: 0.85rem;
}

.items-table input:focus,
.items-table select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(26, 86, 219, 0.1);
  outline: none;
}

/* ── TOTALS ── */
.totals-panel {
  max-width: 320px;
  margin-left: auto;
  margin-top: 14px;
  width: 100%;
}

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.total-row:last-child {
  border-bottom: none;
}

.total-row.grand {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--primary);
  padding-top: 12px;
}

.total-row.balance-due {
  font-weight: 700;
  color: var(--red);
}

.total-row.balance-paid {
  font-weight: 700;
  color: var(--green);
}

.total-label {
  color: var(--text-2);
}

.total-label small {
  display: block;
  font-size: 0.7rem;
  color: var(--text-3);
}

.total-row .input-prefix {
  max-width: 140px;
  margin-left: auto;
}

.total-row .input-prefix input {
  width: 100%;
  min-width: 0;
  text-align: right;
  padding: 6px 10px;
  border: 1.5px solid var(--border-2);
  border-radius: 6px;
  font-size: 0.88rem;
  font-family: 'Noto Sans', sans-serif;
  font-weight: 600;
}

/* ── MODAL ── */
#wa-lang-modal.modal-overlay {
  z-index: 220;
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  backdrop-filter: blur(2px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-height: 90vh;
  max-height: min(90vh, calc(100dvh - 24px));
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
  margin: auto;
}

.modal-sm {
  max-width: 420px;
}

.modal-md {
  max-width: 680px;
}

.modal-lg {
  max-width: 780px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--bg-2);
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  color: var(--text-3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.modal-close:hover {
  background: var(--border);
  color: var(--text);
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}

.modal-sub {
  font-size: 0.8rem;
  color: var(--text-3);
  margin-bottom: 20px;
}

/* ── INVOICE PRINT ── */
.invoice-sheet {
  color-scheme: light;
  --white: #ffffff;
  --bg: #ffffff;
  --bg-2: #f8fafc;
  --bg-page: #ffffff;
  --text: #0f172a;
  --text-2: #334155;
  --text-3: #64748b;
  --border: #e2e8f0;
  --border-2: #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  padding: 36px 40px;
  max-width: 680px;
  margin: 0 auto;
  font-family: 'Noto Sans Tamil', 'Noto Sans', sans-serif;
  box-shadow: var(--shadow);
}

.inv-generated-by {
  margin-top: 10px;
  font-size: 0.72rem;
  color: var(--text-3);
  text-align: center;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 0;
  }

  html,
  body {
    color-scheme: light !important;
    --white: #ffffff !important;
    --bg: #ffffff !important;
    --bg-2: #ffffff !important;
    --bg-page: #ffffff !important;
    --text: #000000 !important;
    --text-2: #111111 !important;
    --text-3: #333333 !important;
    --border: #cbd5e1 !important;
    --border-2: #94a3b8 !important;
    background: #fff !important;
    color: #000 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: auto !important;
    overflow: hidden !important;
  }

  .sidebar,
  .topbar,
  .layout,
  .no-print,
  #login-overlay,
  .overlay-bg,
  #sidebar,
  #overlay-bg {
    display: none !important;
  }

  .modal-overlay:not(.open) {
    display: none !important;
  }

  .modal-overlay.open {
    background: none !important;
    position: static !important;
    display: block !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .modal {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
    max-height: none !important;
    width: 100% !important;
    overflow: hidden !important;
    scrollbar-width: none !important;
    transform: none !important;
  }

  .modal-overlay,
  .modal,
  #print-zone {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }

  .modal-overlay::-webkit-scrollbar,
  .modal::-webkit-scrollbar,
  #print-zone::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }

  .content {
    margin: 0 !important;
    padding: 0 !important;
  }

  #print-zone {
    display: block !important;
    position: static !important;
    width: 210mm !important;
    max-width: none !important;
    min-height: 297mm !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 10mm !important;
    box-shadow: none !important;
    background: #fff !important;
    color: #000 !important;
    overflow: hidden !important;
  }

  body.print-a5 #print-zone {
    width: 147mm !important;
    max-width: 147mm !important;
    min-height: 209mm !important;
    margin: 0 auto !important;
    padding: 7mm !important;
  }

  body.print-a5 #print-zone .inv-header {
    margin-bottom: 12px !important;
    padding-bottom: 10px !important;
  }

  body.print-a5 #print-zone .inv-shop-name img {
    width: 140px !important;
    height: 44px !important;
    object-fit: contain !important;
  }

  body.print-a5 #print-zone .inv-cust-box {
    padding: 8px 10px !important;
    margin-bottom: 10px !important;
  }

  body.print-a5 #print-zone .inv-table {
    table-layout: fixed !important;
    margin-bottom: 10px !important;
    font-size: 0.7rem !important;
  }

  body.print-a5 #print-zone .inv-table th,
  body.print-a5 #print-zone .inv-table td {
    padding: 5px 4px !important;
    overflow-wrap: anywhere !important;
  }

  body.print-a5 #print-zone .inv-totals {
    max-width: 205px !important;
    font-size: 0.74rem !important;
  }

  body.print-a5 #print-zone .inv-total-row {
    padding: 3px 0 !important;
  }

  body.print-a5 #print-zone .inv-pay-reminder {
    margin-top: 10px !important;
    padding: 8px 10px !important;
    font-size: 0.68rem !important;
    line-height: 1.35 !important;
  }

  body.print-a5 #print-zone .inv-signatures {
    margin-top: 28px !important;
    gap: 20px !important;
  }

  body.print-a5 #print-zone .inv-footer {
    margin-top: 16px !important;
    padding-top: 8px !important;
    font-size: 0.68rem !important;
  }

  #print-zone * {
    color: #000 !important;
    background: transparent !important;
    visibility: visible !important;
    text-shadow: none !important;
  }

  #print-zone table,
  #print-zone th,
  #print-zone td,
  #print-zone .inv-cust-box,
  #print-zone .inv-totals,
  #print-zone .inv-footer {
    background-color: #fff !important;
    border-color: #b8c0cc !important;
  }
}

.inv-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--primary);
}

.inv-shop-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
}

.inv-shop-name span {
  color: var(--primary);
}

.inv-shop-sub {
  font-size: 0.78rem;
  color: var(--text-3);
  margin-top: 3px;
}

.inv-meta {
  text-align: right;
}

.inv-bill-no {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
}

.inv-meta-row {
  font-size: 0.8rem;
  color: var(--text-3);
  margin-top: 3px;
}

.inv-cust-box {
  background: var(--bg);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 0.87rem;
}

.inv-cust-box strong {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
}

.inv-cust-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 4px;
}

.inv-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 18px;
  font-size: 0.85rem;
}

.inv-table th {
  background: var(--text);
  color: #fff;
  padding: 10px 12px;
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.inv-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
}

.inv-table tr:last-child td {
  border-bottom: none;
}

.inv-totals {
  max-width: 240px;
  margin-left: auto;
  font-size: 0.87rem;
}

.inv-total-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.inv-total-row:last-child {
  border-bottom: none;
}

.inv-total-row.grand {
  font-weight: 800;
  font-size: 1rem;
  color: var(--primary);
}

.inv-total-row.bal {
  font-weight: 700;
  color: var(--red);
}

.inv-footer {
  text-align: center;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-3);
}

.inv-watermark {
  color: var(--green);
  font-weight: 700;
  font-size: 0.88rem;
  margin-top: 6px;
}

.inv-pay-reminder {
  margin-top: 18px;
  padding: 14px 16px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--text);
  text-align: left;
}

.inv-pay-reminder .inv-pay-reminder-title {
  margin: 0 0 12px 0;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #92400e;
}

.inv-pay-reminder p {
  margin: 0 0 12px 0;
}

.inv-pay-reminder p:last-child {
  margin-bottom: 0;
}

.inv-pay-reminder .reminder-lang {
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--text-2);
  margin-bottom: 4px;
}

.inv-signatures {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  margin-top: 42px;
  padding-top: 8px;
}

.inv-signature {
  width: 42%;
  padding-top: 8px;
  border-top: 1px solid var(--text-2);
  text-align: center;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-2);
}

/* ── SEARCH ── */
.search-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 200px;
  max-width: 340px;
}

.filter-select {
  width: 160px;
}

/* ── REPORT ── */
.report-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: var(--bg-2);
  padding: 4px;
  border-radius: var(--radius-sm);
  width: fit-content;
  max-width: 100%;
}

.report-tab {
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-3);
  border: none;
  background: none;
  transition: all 0.15s;
  flex: 1 1 auto;
  text-align: center;
  min-height: 44px;
}

.report-tab.active {
  background: var(--white);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.report-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.report-card-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.report-card-value {
  font-family: 'Noto Sans', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  margin-top: 4px;
}

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-3);
}

.empty-state .emoji {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.empty-state p {
  font-size: 0.9rem;
}

.empty-state strong {
  display: block;
  font-size: 1rem;
  color: var(--text-2);
  margin-bottom: 6px;
}

/* ── TABLET ── */
@media (max-width: 900px) {
  .page-inner {
    padding: 22px 18px 56px;
  }
}

/* ── PROFESSIONAL UI POLISH ── */
.sidebar {
  background: var(--white);
  border-right: 1px solid var(--border);
  box-shadow: 1px 0 0 rgba(0, 0, 0, 0.02);
}

/* .sidebar-logo {
  border-bottom: 1px solid var(--border);
} */

.logo-sub {
  color: var(--text-3);
}

.nav-label {
  color: var(--text-3);
}

.nav-item {
  color: var(--text-2);
  font-weight: 500;
}

.nav-item:hover {
  background: var(--bg-2);
  color: var(--primary);
}

.nav-item.active {
  background: #eff6ff;
  color: var(--primary);
  font-weight: 700;
  border-left: 4px solid var(--primary);
  padding-left: 8px;
}

.nav-item .icon {
  opacity: 0.7;
  color: #6b7280;
}

.nav-item.active .icon {
  opacity: 1;
  color: var(--primary);
}

.sidebar-footer {
  border-top: 1px solid #f3f4f6;
}

.sidebar-footer>div {
  color: #9ca3af !important;
}

.topbar {
  box-shadow: 0 1px 0 var(--border), 0 2px 10px rgba(0, 0, 0, 0.05);
}

.topbar-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.card {
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s;
}

.card:hover {
  box-shadow: 0 4px 22px rgba(0, 0, 0, 0.10);
}

.card-title {
  font-size: 0.88rem;
  letter-spacing: 0.01em;
  color: var(--text-2);
  border-bottom: 1px solid var(--bg-2);
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.card-title i {
  color: var(--primary);
  margin-right: 4px;
}

.stat-card {
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
  transition: transform 0.18s, box-shadow 0.18s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.10);
}

.stat-icon i {
  font-size: 1.5rem;
}

.btn {
  letter-spacing: 0.01em;
}

.btn-primary {
  box-shadow: 0 2px 8px rgba(26, 86, 219, 0.22);
}

.btn-primary:hover {
  box-shadow: 0 4px 16px rgba(26, 86, 219, 0.32);
  transform: translateY(-1px);
}

.btn-xs {
  padding: 4px 8px;
  font-size: 0.72rem;
  border-radius: 4px;
}

.btn-outline {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
}


.action-group {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.btn-icon {
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

thead th {
  background: var(--bg-2);
}

tbody tr:nth-child(even) td {
  background: rgba(0, 0, 0, 0.02);
}

tbody tr:hover td {
  background: var(--primary-light);
}

.modal {
  border-top: 3px solid var(--primary);
}

.modal-title {
  font-size: 1rem;
  font-weight: 800;
}

.modal-title i {
  color: var(--primary);
  margin-right: 6px;
}

.stock-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  margin-top: 4px;
}

.stock-badge.ok {
  background: var(--green-light);
  color: #065f46;
}

.stock-badge.low {
  background: var(--accent-light);
  color: #92400e;
}

.stock-badge.out {
  background: var(--red-light);
  color: #991b1b;
}

.login-box {
  border-top: 4px solid var(--primary);
}

.page-heading i {
  color: var(--primary);
  margin-right: 6px;
}

.hamburger {
  font-size: 1.05rem;
}

/* ── MOBILE ── */
@media (max-width: 768px) {
  html {
    -webkit-text-size-adjust: 100%;
  }

  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.12);
  }

  .content {
    margin-left: 0;
  }

  .hamburger {
    display: flex;
  }

  .page-inner {
    padding: 16px max(14px, env(safe-area-inset-right)) 56px max(14px, env(safe-area-inset-left));
    max-width: none;
  }

  .topbar {
    height: auto;
    min-height: 54px;
    padding: 8px max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left));
    flex-wrap: wrap;
    gap: 8px 0;
  }

  .topbar>div {
    min-width: 0;
  }

  .page-heading {
    font-size: 1.2rem;
  }

  .page-sub {
    font-size: 0.82rem;
    margin-bottom: 16px;
  }

  .card {
    padding: 16px;
    margin-bottom: 14px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .stat-card {
    padding: 14px 14px;
  }

  .stat-value {
    font-size: 1.28rem;
  }

  .dash-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .dash-grid .card {
    margin-bottom: 0;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .items-table {
    font-size: 0.78rem;
  }

  .alert {
    display: flex;
    flex-wrap: wrap;
    /* Enables wrapping */
  }

  .items-table th,
  .items-table td {
    padding: 8px 5px;
  }

  .items-table .bill-rate-input,
  .items-table .bill-qty-input {
    width: 100%;
    max-width: 7.5rem;
  }

  .items-table select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .totals-panel {
    max-width: none;
    margin-left: 0;
  }

  .total-row {
    flex-wrap: wrap;
    gap: 6px 12px;
  }

  .total-row .input-prefix {
    max-width: none;
    flex: 1 1 120px;
    margin-left: 0;
  }

  .btn-group {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-group .btn {
    width: 100%;
    justify-content: center;
  }

  .search-row {
    flex-direction: column;
    align-items: stretch;
  }

  .search-input,
  .filter-select {
    max-width: none !important;
    width: 100%;
  }

  .filter-select {
    min-height: 44px;
  }

  .report-tabs {
    width: 100%;
  }

  .report-date-field {
    max-width: none;
    width: 100%;
  }

  .report-controls-row .form-group,
  .report-controls-row .form-group.year-field {
    flex: 1 1 100%;
    max-width: none;
  }

  .modal {
    padding: 22px 16px 20px;
    border-radius: var(--radius);
  }

  .modal-title {
    padding-right: 36px;
    font-size: 1.02rem;
  }

  .invoice-sheet {
    padding: 20px 14px;
  }

  .inv-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .inv-meta {
    text-align: left;
  }

  .inv-table {
    font-size: 0.78rem;
  }

  .inv-table th,
  .inv-table td {
    padding: 8px 6px;
  }

  /* Report Card Styles */
  .report-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--bg-2);
    color: var(--text-2);
    border: 1px solid var(--border);
  }

  .report-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 8px;
    margin: 10px 0;
  }

  .report-stat-box {
    padding: 8px;
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-align: center;
  }

  .report-stat-label {
    font-size: 0.7rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
  }

  .report-stat-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-1);
  }

  .clickable-name {
    color: var(--primary);
    cursor: pointer;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.2s;
  }

  .clickable-name:hover {
    opacity: 0.8;
    text-decoration: underline;
  }

  .report-history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 0.85rem;
  }

  .report-history-table th {
    text-align: left;
    padding: 8px;
    border-bottom: 2px solid var(--border);
    color: var(--text-3);
  }

  .report-history-table td {
    padding: 8px;
    border-bottom: 1px solid var(--border);
  }

  .inv-totals {
    max-width: none;
    margin-left: 0;
  }

  thead th,
  tbody td {
    padding-left: 10px;
    padding-right: 10px;
  }

  .nav-item {
    min-height: 48px;
    padding: 12px 12px;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .topbar-title span {
    display: block;
    margin-left: 0;
    margin-top: 2px;
    font-size: 0.78rem;
  }

  #today-date {
    font-size: 0.7rem !important;
  }

  .btn {
    padding: 10px 14px;
    font-size: 0.85rem;
    white-space: normal;
    text-align: center;
  }

  .btn-xs {
    padding: 6px 8px;
  }
}

/* Print styles consolidated above */

/* ── MISC ── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 18px 0;
}

.text-green {
  color: var(--green);
  font-weight: 700;
}

.text-red {
  color: var(--red);
  font-weight: 700;
}

.text-muted {
  color: var(--text-3);
}

.font-mono {
  font-family: 'Noto Sans', sans-serif;
}

.overlay-close-bg {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: none;
}

.overlay-close-bg.open {
  display: block;
}

.pill {
  border: 1px solid green;
  display: inline-block;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--primary-light);
  color: var(--primary);
}

.pill-green {
  background: #dcfce7;
  color: #166534;
}

.pill-blue {
  background: #dbeafe;
  color: #1e40af;
}

.pill-red {
  background: #fee2e2;
  color: #991b1b;
}

.pill-purple {
  background: #f3e8ff;
  color: #6b21a8;
}

.pill-amber {
  background: #fef3c7;
  color: #92400e;
}

.pill-gray {
  background: #f3f4f6;
  color: #374151;
}

.audit-row {
  transition: background 0.2s ease;
}

.audit-row:hover {
  background: var(--surface-2);
}

.audit-cell-time {
  display: flex;
  align-items: center;
  min-height: 28px;
  padding-left: 16px;
  font-size: 0.72rem;
  color: var(--text-3);
}

.audit-cell-staff {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
}

.audit-staff-icon {
  background: var(--surface-2);
  color: var(--primary);
  font-size: 0.7rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.audit-cell-resource {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
  font-size: 0.8rem;
  min-height: 28px;
}

.audit-cell-resource i {
  opacity: 0.6;
  width: 14px;
  text-align: center;
  flex-shrink: 0;
}

.blur-text {
  filter: blur(5px);
  user-select: none;
  pointer-events: none;
  opacity: 0.6;
}

/* ── LOGIN OVERLAY ── */
#login-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px 30px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 360px;
  text-align: center;
}

.login-box img {
  max-width: 140px;
  margin-bottom: 20px;
}

.login-box h2 {
  font-size: 1.4rem;
  color: var(--text);
  margin-bottom: 8px;
  font-weight: 800;
}

.login-box p {
  color: var(--text-3);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.login-box input {
  font-size: 1.5rem;
  text-align: center;
  letter-spacing: 0.2em;
  padding: 12px;
  margin-bottom: 20px;
  width: 100%;
}

.login-footer {
  font-size: 0.75rem;
  color: var(--text-3);
  margin-top: 16px;
}

/* ─────────────────────────────────────────
   VEEDESK BUSINESS THEME
   Cox Business-inspired corporate palette, with Veedesk class names retained.
   ───────────────────────────────────────── */
body {
  background:
    radial-gradient(circle at top left, rgba(0, 115, 207, 0.12), transparent 28rem),
    linear-gradient(180deg, #f8fbfd 0%, var(--bg-page) 100%);
}

.sidebar {
  background: linear-gradient(180deg, var(--veedesk-navy) 0%, var(--veedesk-navy-2) 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 10px 0 30px rgba(6, 27, 51, 0.12);
}

/* .sidebar-logo {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
} */

.logo-name,
.sidebar-user-name {
  color: #ffffff;
}

.logo-name span,
.sidebar-user-role {
  color: var(--veedesk-green);
}

.logo-sub,
.nav-label,
.sidebar-footer,
.sidebar-footer>div {
  color: rgba(255, 255, 255, 0.64) !important;
}

.nav-label:hover {
  color: #ffffff;
}

.nav-item {
  color: rgba(255, 255, 255, 0.78);
  border-radius: 999px;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.nav-item.active {
  background: linear-gradient(90deg, var(--veedesk-blue-bright), var(--veedesk-blue));
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 115, 207, 0.22);
}

.sidebar-user {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

.content {
  background:
    radial-gradient(circle at top right, rgba(120, 190, 32, 0.12), transparent 22rem),
    var(--bg-page);
}

.topbar {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  box-shadow: 0 4px 18px rgba(6, 27, 51, 0.05);
}

.page-heading::after {
  content: '';
  display: block;
  width: 54px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--veedesk-blue), var(--veedesk-green));
  margin-top: 10px;
}

.card,
.chart-container,
.stat-card {
  border-color: rgba(0, 93, 171, 0.14);
  box-shadow: var(--shadow-sm);
}

.card:hover,
.chart-container:hover {
  box-shadow: var(--shadow);
}

.btn-primary {
  background: linear-gradient(90deg, var(--veedesk-blue-bright), var(--veedesk-blue));
  border-color: var(--veedesk-blue);
  color: #ffffff;
}

.btn-primary:hover {
  background: linear-gradient(90deg, var(--veedesk-blue), var(--primary-dark));
  border-color: var(--primary-dark);
}

.btn-success {
  color: #ffffff;
  background: var(--veedesk-green);
  border-color: var(--veedesk-green);
}

.btn-success:hover {
  background: #65a817;
  border-color: #65a817;
}

.badge-primary,
.pill-blue {
  background: var(--veedesk-sky);
  color: var(--veedesk-blue);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--veedesk-blue-bright) !important;
  box-shadow: 0 0 0 4px rgba(0, 115, 207, 0.12) !important;
}

#login-overlay {
  background:
    radial-gradient(circle at 18% 18%, rgba(120, 190, 32, 0.18), transparent 20rem),
    radial-gradient(circle at 82% 10%, rgba(0, 115, 207, 0.24), transparent 24rem),
    linear-gradient(145deg, var(--veedesk-navy) 0%, #0b2949 100%);
}

.login-box {
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.login-box input {
  font-size: 1rem;
  text-align: left;
  letter-spacing: normal;
}

/* ─────────────────────────────────────────
   VEEDESK PROFESSIONAL BUSINESS UI PASS
   Stronger Cox Business-style composition: white header, blue rules, large type,
   light-grey content panels, and deep-blue CTA surfaces.
   ───────────────────────────────────────── */
:root {
  --sidebar-w: 280px;
  --font-body: 'Noto Sans', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Noto Sans', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --bg-page: #ffffff;
}

body {
  background: #ffffff;
  color: #1f1f1f;
  letter-spacing: -0.01em;
}

.layout {
  background: #ffffff;
}

.sidebar {
  background: #ffffff;
  color: #1f1f1f;
  border-right: 1px solid #e5edf3;
  box-shadow: 8px 0 28px rgba(6, 27, 51, 0.06);
}

.sidebar::after {
  content: '';
  position: absolute;
  top: 0;
  right: -1px;
  width: 5px;
  height: 100%;
  background: linear-gradient(180deg, #00a3e0 0%, #003b8f 100%);
}

.sidebar-logo {
  align-items: flex-start;
  padding: 28px 28px 22px;
  border-bottom: 1px solid #edf3f7;
}

.sidebar-logo-img {
  max-width: 160px;
  margin: 0 0 16px;
}

.logo-name {
  color: #0d1f2d;
  font-size: 1.55rem;
  letter-spacing: -0.04em;
}

.logo-name span {
  color: #009fe3;
}

.logo-sub {
  color: #6b7785 !important;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

.nav-label {
  color: #66727f !important;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  padding: 22px 28px 10px;
}

.nav-item {
  color: #1f1f1f;
  border-radius: 12px;
  margin: 3px 16px;
  width: calc(100% - 32px);
  padding: 12px 14px;
  font-weight: 750;
}

.nav-item:hover {
  background: #eef7fd;
  color: #003b8f;
}

.nav-item.active {
  background: #003b8f;
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 59, 143, 0.2);
}

.nav-item.active .icon {
  color: #ffffff;
}

.sidebar-user {
  background: #f3f8fc;
  border: 1px solid #dbeaf4;
  margin: 18px 18px 0;
  padding: 14px;
}

.sidebar-user-role {
  color: #003b8f;
}

.sidebar-user-name {
  color: #1f1f1f;
}

.sidebar-footer,
.sidebar-footer>div {
  color: #66727f !important;
}

.content {
  background: #ffffff;
}

.topbar {
  height: 76px;
  background: #ffffff;
  border-bottom: 6px solid #003b8f;
  box-shadow: 0 2px 0 #00a3e0;
  padding: 0 36px;
  backdrop-filter: none;
}

.topbar-title {
  font-size: 1.08rem;
  font-weight: 850;
  color: #1f1f1f;
}

.topbar-title span {
  color: #66727f;
  font-weight: 650;
}

.page-inner {
  max-width: 1480px;
  padding: 46px 40px 80px;
}

.page-heading {
  font-size: clamp(2rem, 4vw, 4.7rem);
  line-height: 0.98;
  letter-spacing: -0.07em;
  font-weight: 950;
  color: #1f1f1f;
  max-width: 920px;
}

.page-heading i {
  color: #009fe3;
  font-size: 0.68em;
  margin-right: 10px;
}

.page-heading::after {
  width: 88px;
  height: 7px;
  margin-top: 22px;
  background: linear-gradient(90deg, #009fe3 0%, #003b8f 100%);
}

.page-sub,
.sub-message {
  color: #38434f;
  font-size: 1.12rem;
  line-height: 1.55;
  max-width: 850px;
}

.card,
.chart-container {
  background: #f5f8fa;
  border: 0;
  border-radius: 26px;
  box-shadow: none;
  padding: 30px;
}

.card-title,
.chart-title {
  color: #1f1f1f;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.stat-card {
  background: #f5f8fa;
  border: 0;
  border-radius: 24px;
  min-height: 118px;
  padding: 24px;
  box-shadow: none;
}

.stat-label {
  color: #66727f;
  font-weight: 850;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.btn {
  border-radius: 16px;
  min-height: 46px;
  padding: 12px 22px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.btn-primary {
  background: #003b8f;
  border-color: #003b8f;
  color: #ffffff;
  box-shadow: none;
}

.btn-primary:hover {
  background: #002e73;
  border-color: #002e73;
}

.btn-ghost {
  color: #003b8f;
  background: #ffffff;
  border-color: #d8e6f0;
}

.btn-ghost:hover {
  background: #eef7fd;
}

input,
select,
textarea,
.filter-select,
.search-input {
  border-radius: 14px !important;
  border-color: #d8e6f0 !important;
  background: #ffffff;
}

.table-wrap {
  border-radius: 22px;
  background: #ffffff;
}

table thead th {
  background: #eef7fd;
  color: #003b8f;
  font-weight: 900;
}

#login-overlay {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.86) 48%, rgba(255, 255, 255, 0.15) 49%),
    radial-gradient(circle at 80% 35%, rgba(0, 163, 224, 0.28), transparent 26rem),
    linear-gradient(135deg, #003b8f 0%, #001f4f 100%);
}

.login-box {
  max-width: 480px;
  margin-right: min(46vw, 720px);
  padding: 48px;
  text-align: left;
}

.login-box img {
  max-width: 180px;
}

.login-box h2 {
  font-size: 2.6rem;
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.login-box p {
  font-size: 1rem;
  color: #38434f;
}

.login-box input {
  min-height: 52px;
  font-size: 1rem;
}

.login-footer {
  color: #66727f;
  font-weight: 750;
}

@media (max-width: 1024px) {
  .login-box {
    margin-right: 0;
  }

  #login-overlay {
    background: linear-gradient(135deg, #ffffff 0%, #eef7fd 100%);
  }
}

/* ─────────────────────────────────────────
   VEEDESK CLEAN PROFESSIONAL UI
   Softer Cox Business-inspired finish: restrained typography, white navigation,
   thin blue brand line, light panels, and compact operations layout.
   ───────────────────────────────────────── */
:root {
  --sidebar-w: 260px;
  --primary: #003b8f;
  --primary-dark: #002c6d;
  --primary-light: #eef7fd;
  --accent: #009fe3;
  --accent-light: #e8f7fd;
  --green: #63a615;
  --green-light: #f0f8e8;
  --bg: #ffffff;
  --bg-2: #f4f7f9;
  --bg-page: #ffffff;
  --text: #1f2328;
  --text-2: #344054;
  --text-3: #667085;
  --border: #e4eaf0;
  --border-2: #ccd8e2;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow: 0 8px 24px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 18px 48px rgba(16, 24, 40, 0.14);
}

body {
  background: #ffffff;
  color: var(--text);
}

.sidebar {
  background: #ffffff;
  color: var(--text);
  border-right: 1px solid var(--border);
  box-shadow: none;
}

.sidebar::after {
  display: none;
}

.sidebar-logo {
  align-items: center;
  text-align: center;
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo-img {
  max-width: 150px;
  margin: 0 auto 10px;
}

.logo-name {
  color: var(--text);
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.logo-name span {
  color: #009fe3;
}

.logo-sub {
  color: var(--text-3) !important;
  font-size: 0.68rem;
  letter-spacing: 0.09em;
}

.nav-label {
  color: var(--text-3) !important;
  padding: 18px 22px 8px;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.nav-item {
  color: var(--text-2);
  border-radius: 8px;
  margin: 2px 12px;
  width: calc(100% - 24px);
  padding: 10px 14px;
  font-weight: 650;
}

.nav-item:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.nav-item.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: none;
}

.sidebar-user {
  background: var(--bg-2);
  border: 1px solid var(--border);
  margin: 14px 12px 0;
  padding: 10px 12px;
}

.sidebar-user-role {
  color: var(--primary);
}

.sidebar-user-name {
  color: var(--text);
}

.sidebar-footer,
.sidebar-footer>div {
  color: var(--text-3) !important;
}

.content {
  background: #ffffff;
}

.topbar {
  height: 66px;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  box-shadow: inset 0 -4px 0 #003b8f, inset 0 -7px 0 #009fe3;
  padding: 0 28px;
}

.topbar-title {
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
}

.topbar-title span {
  color: var(--text-3);
  font-weight: 500;
}

.page-inner {
  max-width: 1360px;
  padding: 32px 28px 64px;
}

.page-heading {
  font-size: clamp(1.65rem, 2.4vw, 2.65rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
  font-weight: 900;
  color: var(--text);
  max-width: 780px;
}

.page-heading i {
  color: #009fe3;
  font-size: 0.82em;
}

.page-heading::after {
  width: 64px;
  height: 4px;
  margin-top: 12px;
  background: linear-gradient(90deg, #009fe3, #003b8f);
}

.page-sub,
.sub-message {
  color: var(--text-3);
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 760px;
}

.card,
.chart-container,
.stat-card {
  background: #f5f8fa;
  border: 1px solid #edf2f6;
  border-radius: 18px;
  box-shadow: none;
}

.card {
  padding: 22px;
}

.chart-container {
  padding: 24px;
}

.stat-card {
  min-height: 92px;
  padding: 18px;
}

.card-title,
.chart-title {
  font-weight: 800;
  letter-spacing: -0.015em;
}

.stat-value {
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.btn {
  border-radius: 10px;
  min-height: 40px;
  padding: 10px 18px;
  font-weight: 800;
}

.btn-primary {
  background: #003b8f;
  border-color: #003b8f;
}

.btn-primary:hover {
  background: #002c6d;
  border-color: #002c6d;
}

.btn-ghost {
  background: #ffffff;
  color: #003b8f;
  border-color: var(--border);
}

.table-wrap {
  border-radius: 14px;
}

table thead th {
  background: #eef7fd;
  color: #003b8f;
}

#login-overlay {
  background: #f5f8fa;
}

.login-box {
  max-width: 420px;
  margin-right: 0;
  padding: 36px 32px;
  text-align: center;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.login-box img {
  max-width: 160px;
  margin-left: auto;
  margin-right: auto;
}

.login-box h2 {
  font-size: 1.6rem;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.login-box p {
  font-size: 0.92rem;
}

.login-box input {
  min-height: 46px;
  text-align: left;
}

/* ─────────────────────────────────────────
   VEEDESK ZENDESK-INSPIRED SaaS UI
   Calmer service-platform styling: ink green, cream/mint panels, editorial
   headings, simple high-contrast actions. Class names remain Veedesk/app names.
   ───────────────────────────────────────── */
:root {
  --sidebar-w: 264px;
  --primary: #03363d;
  --primary-dark: #012b30;
  --primary-light: #e7f5f2;
  --accent: #00a656;
  --accent-light: #ddf7ed;
  --green: #00a656;
  --green-light: #ddf7ed;
  --orange: #f6c344;
  --orange-light: #fff6da;
  --white: #ffffff;
  --bg: #fffdf7;
  --bg-2: #f3f0e8;
  --bg-page: #fffdf7;
  --text: #123236;
  --text-2: #345157;
  --text-3: #6b7f83;
  --border: #dedbd2;
  --border-2: #c9c4b8;
  --shadow-sm: 0 1px 2px rgba(3, 54, 61, 0.06);
  --shadow: 0 10px 28px rgba(3, 54, 61, 0.1);
  --shadow-lg: 0 22px 56px rgba(3, 54, 61, 0.16);
}

body {
  background:
    radial-gradient(circle at 88% 8%, rgba(0, 166, 86, 0.08), transparent 24rem),
    var(--bg-page);
  color: var(--text);
}

.sidebar {
  background: #fffdf7;
  border-right: 1px solid #e6e0d4;
  box-shadow: none;
}

.sidebar-logo {
  align-items: flex-start;
  text-align: left;
  padding: 26px 24px 20px;
  border-bottom: 1px solid #e6e0d4;
}

.sidebar-logo-img {
  max-width: 150px;
  margin: 0 0 12px;
}

.logo-name {
  color: var(--primary);
  font-size: 1.28rem;
  font-weight: 900;
}

.logo-name span {
  color: var(--accent);
}

.logo-sub {
  color: var(--text-3) !important;
  letter-spacing: 0.1em;
}

.nav-label {
  color: #6d7f73 !important;
  font-weight: 900;
}

.nav-item {
  color: var(--text-2);
  border-radius: 999px;
  font-weight: 800;
}

.nav-item:hover {
  background: #e7f5f2;
  color: var(--primary);
}

.nav-item.active {
  background: var(--primary);
  color: #ffffff;
}

.sidebar-user {
  background: #e7f5f2;
  border-color: #cfe5df;
}

.sidebar-user-role {
  color: var(--primary);
}

.sidebar-footer,
.sidebar-footer>div {
  color: var(--text-3) !important;
}

.content {
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.98), rgba(255, 253, 247, 0.98)),
    var(--bg-page);
}

.topbar {
  height: 68px;
  background: #fffdf7;
  border-bottom: 1px solid #e6e0d4;
  box-shadow: none;
}

.topbar::after {
  content: '';
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: -1px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.topbar-title {
  color: var(--primary);
  font-weight: 900;
}

.topbar-title span {
  color: var(--text-3);
}

.page-inner {
  max-width: 1320px;
  padding: 34px 34px 72px;
}

.page-heading {
  color: var(--primary);
  font-size: clamp(1.9rem, 3.2vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
  font-weight: 950;
  max-width: 860px;
}

.page-heading i {
  color: var(--accent);
}

.page-heading::after {
  width: 72px;
  height: 5px;
  background: var(--accent);
  margin-top: 16px;
}

.page-sub,
.sub-message {
  color: var(--text-2);
  font-size: 1rem;
  max-width: 820px;
}

.card,
.chart-container,
.stat-card {
  background: #f3f0e8;
  border: 1px solid #e6e0d4;
  border-radius: 22px;
  box-shadow: none;
}

.card:nth-of-type(even),
.chart-container:nth-of-type(even) {
  background: #e7f5f2;
}

.card-title,
.chart-title {
  color: var(--primary);
  font-weight: 900;
}

.stat-label {
  color: var(--text-3);
}

.stat-value {
  color: var(--primary);
}

.btn {
  border-radius: 999px;
  font-weight: 900;
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-success {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.btn-ghost {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-ghost:hover {
  background: #e7f5f2;
}

input,
select,
textarea,
.filter-select,
.search-input {
  background: #ffffff;
  border-color: #d8d2c4 !important;
  border-radius: 12px !important;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 4px rgba(3, 54, 61, 0.1) !important;
}

table thead th {
  background: #e7f5f2;
  color: var(--primary);
}

.badge-primary,
.pill-blue {
  background: #e7f5f2;
  color: var(--primary);
}

#login-overlay {
  background:
    radial-gradient(circle at 85% 20%, rgba(0, 166, 86, 0.16), transparent 22rem),
    linear-gradient(135deg, #fffdf7 0%, #f3f0e8 100%);
}

.login-box {
  background: #fffdf7;
  border: 1px solid #e6e0d4;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  text-align: left;
}

.login-box h2 {
  color: var(--primary);
  font-size: 2rem;
}

.login-box h2 span {
  color: var(--accent) !important;
}

.login-box p {
  color: var(--text-2);
}

.login-footer {
  color: var(--text-3);
}

/* ─────────────────────────────────────────
   VEEDESK COMPACT USER-FRIENDLY POLISH
   Main brand colour: #03363d. Smaller type, tighter spacing,
   and three-dot row action menus.
   ───────────────────────────────────────── */
:root {
  --primary: #03363d;
  --primary-dark: #022a30;
  --primary-light: #e7f2ef;
  --accent: #03363d;
  --accent-light: #e7f2ef;
  --green: #0a7f50;
  --green-light: #e5f4ed;
  --bg: #fffdf7;
  --bg-2: #f6f3ec;
  --bg-page: #fffdf7;
  --text: #17363a;
  --text-2: #344b4f;
  --text-3: #6f7f82;
  --border: #e5dfd4;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
}

html {
  font-size: 14px;
}

body {
  font-size: 0.94rem;
}

.logo-name,
.logo-name span,
.login-box h2,
.login-box h2 span {
  color: #03363d !important;
}

.page-inner {
  padding: 24px 24px 56px;
  max-width: 1280px;
}

.page-heading {
  font-size: clamp(1.45rem, 2.2vw, 2.25rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
  margin-bottom: 6px;
}

.page-heading::after {
  width: 48px;
  height: 3px;
  margin-top: 10px;
}

.page-sub,
.sub-message {
  font-size: 0.88rem;
  margin-bottom: 16px;
}

.topbar {
  height: 58px;
}

.topbar-title {
  font-size: 0.95rem;
}

.sidebar-logo {
  padding: 18px 18px 14px;
}

.sidebar-logo-img {
  max-width: 132px;
  margin-bottom: 8px;
}

.logo-name {
  font-size: 1.05rem;
}

.logo-sub,
.nav-label {
  font-size: 0.64rem;
}

.nav-label {
  padding: 14px 18px 6px;
}

.nav-item {
  padding: 8px 12px;
  margin: 1px 10px;
  width: calc(100% - 20px);
  font-size: 0.86rem;
  border-radius: 10px;
}

.card,
.chart-container {
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 14px;
}

.stat-card {
  min-height: 82px;
  padding: 14px;
  border-radius: 14px;
}

.stat-value {
  font-size: 1.25rem;
}

.card-title,
.chart-title {
  font-size: 0.9rem;
  margin-bottom: 12px;
}

input,
select,
textarea,
.filter-select,
.search-input {
  min-height: 38px;
  font-size: 0.9rem;
}

.btn {
  min-height: 36px;
  padding: 8px 14px;
  font-size: 0.86rem;
  border-radius: 10px;
}

.btn-xs {
  min-height: 28px;
  padding: 5px 9px;
  font-size: 0.76rem;
}

table {
  font-size: 0.86rem;
}

th,
td {
  padding: 10px 12px;
}

.veedesk-action-menu {
  position: relative;
  display: inline-flex;
  justify-content: flex-end;
}

.table-wrap:has(.veedesk-action-menu.open) {
  overflow: visible;
}

.veedesk-action-trigger {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: #03363d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.veedesk-action-menu.open .veedesk-action-trigger {
  background: var(--primary-light);
  border-color: #03363d;
}

.veedesk-action-list {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 190px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(3, 54, 61, 0.14);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s ease;
}

.veedesk-action-menu.open .veedesk-action-list {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.veedesk-action-item {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  font-size: 0.84rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.veedesk-action-item:hover,
.veedesk-action-item:focus {
  background: var(--primary-light);
  color: #03363d;
}

.veedesk-action-item.danger {
  color: var(--red);
}

.veedesk-action-item.danger:hover {
  background: var(--red-light);
}

.veedesk-action-item.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.login-box {
  max-width: 390px;
  padding: 28px;
}

.login-box h2 {
  font-size: 1.55rem;
}

body.medium {
  --primary: #03363d;
  --primary-dark: #022a30;
  --primary-light: #dbe8e4;
  --accent: #03363d;
  --accent-light: #dbe8e4;
  --green: #0a7f50;
  --green-light: #dcebe5;
  --bg: #eee9dd;
  --bg-2: #e3ddd0;
  --bg-page: #eee9dd;
  --white: #f8f4ea;
  --text: #17363a;
  --text-2: #344b4f;
  --text-3: #65777a;
  --border: #d4ccbc;
  --border-2: #bdb3a4;
  --shadow-sm: 0 1px 2px rgba(3, 54, 61, 0.08);
  --shadow: 0 10px 28px rgba(3, 54, 61, 0.12);
}

body.dark {
  --primary: #03363d;
  --primary-dark: #011f24;
  --primary-light: #163f45;
  --accent: #f3f0e8;
  --accent-light: #163f45;
  --green: #b8f36b;
  --green-light: #183d31;
  --bg: #071f23;
  --bg-2: #0e2b30;
  --bg-page: #071f23;
  --white: #0e2b30;
  --text: #f3f0e8;
  --text-2: #d7d2c5;
  --text-3: #a8b4b0;
  --border: #21484e;
  --border-2: #315d64;
  --red-light: #3b1e22;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.22);
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
}

body.medium,
body.dark {
  background: var(--bg-page);
  color: var(--text);
}

body.medium .sidebar,
body.medium .topbar,
body.medium .login-box {
  background: #f8f4ea;
  border-color: var(--border);
}

body.dark .sidebar,
body.dark .topbar,
body.dark .login-box {
  background: #0e2b30;
  border-color: var(--border);
}

body.medium .content,
body.dark .content,
body.medium #login-overlay,
body.dark #login-overlay {
  background: var(--bg-page);
}

body.medium .card,
body.medium .chart-container,
body.medium .stat-card {
  background: #f8f4ea;
  border-color: var(--border);
}

body.dark .card,
body.dark .chart-container,
body.dark .stat-card {
  background: #0e2b30;
  border-color: var(--border);
}

body.medium .nav-item:hover,
body.medium .nav-item.active {
  background: #03363d;
  color: #ffffff;
}

body.dark .nav-item {
  color: var(--text-2);
}

body.dark .nav-item:hover,
body.dark .nav-item.active {
  background: #f3f0e8;
  color: #03363d;
}

body.medium input,
body.medium select,
body.medium textarea,
body.dark input,
body.dark select,
body.dark textarea,
body.medium .filter-select,
body.dark .filter-select,
body.medium .search-input,
body.dark .search-input {
  background: var(--white);
  color: var(--text);
  border-color: var(--border) !important;
}

body.dark table thead th {
  background: #163f45;
  color: var(--text);
}

body.dark tbody tr:hover td {
  background: #12373d;
}

body.dark .veedesk-action-trigger,
body.dark .veedesk-action-list {
  background: #12373d;
  border-color: var(--border);
  color: var(--text);
}

body.dark .veedesk-action-item {
  color: var(--text-2);
}

body.dark .veedesk-action-item:hover,
body.dark .veedesk-action-item:focus {
  background: #1b4a51;
  color: var(--text);
}

@media (max-width: 768px) {
  .table-wrap {
    overflow-x: auto;
  }

  .veedesk-action-list {
    min-width: 170px;
  }
}

/* Final readability guardrails for medium/dark themes */
body.medium .logo-name,
body.medium .logo-name span,
body.medium .login-box h2,
body.medium .login-box h2 span,
body.medium .page-heading,
body.medium .card-title,
body.medium .chart-title,
body.medium .topbar-title,
body.medium .section-heading,
body.medium .modal-title {
  color: #03363d !important;
}

body.dark .logo-name,
body.dark .logo-name span,
body.dark .login-box h2,
body.dark .login-box h2 span,
body.dark .page-heading,
body.dark .card-title,
body.dark .chart-title,
body.dark .topbar-title,
body.dark .section-heading,
body.dark .modal-title,
body.dark .sidebar-user-name,
body.dark h1,
body.dark h2,
body.dark h3,
body.dark h4,
body.dark h5,
body.dark h6,
body.dark strong {
  color: #f8f4ea !important;
}

body.dark,
body.dark .content,
body.dark .page,
body.dark .card,
body.dark .chart-container,
body.dark .stat-card,
body.dark .modal-content,
body.dark .table-wrap,
body.dark table,
body.dark td,
body.dark th,
body.dark .font-mono,
body.dark .empty-state,
body.dark .sidebar-footer,
body.dark .info-row,
body.dark .bill-preview-text {
  color: #f3f0e8 !important;
}

body.medium .page-sub,
body.medium .sub-message,
body.medium .form-label,
body.medium label,
body.medium small,
body.medium .text-muted,
body.medium .sidebar-user-role,
body.medium .helper-text {
  color: #43595d !important;
}

body.dark .page-sub,
body.dark .sub-message,
body.dark .form-label,
body.dark label,
body.dark small,
body.dark .text-muted,
body.dark .sidebar-user-role,
body.dark .helper-text,
body.dark .muted,
body.dark .table-note {
  color: #0b0b0b !important;
}

body.dark input::placeholder,
body.dark textarea::placeholder,
body.dark .search-input::placeholder {
  color: #b9c4c0 !important;
  opacity: 1;
}

body.dark input,
body.dark select,
body.dark textarea,
body.dark .search-input,
body.dark .filter-select {
  background: #0b252a !important;
  color: #f8f4ea !important;
  border-color: #3b646b !important;
}

body.dark input:focus,
body.dark select:focus,
body.dark textarea:focus,
body.dark .search-input:focus,
body.dark .filter-select:focus {
  border-color: #f3f0e8 !important;
  box-shadow: 0 0 0 3px rgba(243, 240, 232, 0.14) !important;
}

body.dark .btn-primary,
body.dark .btn-success {
  background: #f3f0e8 !important;
  border-color: #f3f0e8 !important;
  color: #03363d !important;
}

body.dark .btn-ghost,
body.dark .btn-outline,
body.dark .btn-secondary {
  background: transparent !important;
  border-color: #d8d3c8 !important;
  color: #f3f0e8 !important;
}

body.dark .badge,
body.dark .pill,
body.dark .status-badge {
  background: #163f45 !important;
  border-color: #3b646b !important;
  color: #f8f4ea !important;
}

body.dark .text-green,
body.dark .amount-positive {
  color: #d8f5b0 !important;
}

body.dark .text-red,
body.dark .amount-negative {
  color: #ffb8b1 !important;
}

body.dark .clickable-name,
body.dark a:not(.btn) {
  color: #f8f4ea !important;
  text-decoration-color: rgba(248, 244, 234, 0.55);
}

body.dark .clickable-name:hover,
body.dark a:not(.btn):hover {
  color: #ffffff !important;
}

body.dark table tbody tr:hover td {
  background: #12373d !important;
}

body.dark .veedesk-action-trigger {
  background: #0b252a !important;
  color: #f8f4ea !important;
  border-color: #3b646b !important;
}

body.dark .veedesk-action-list {
  background: #0b252a !important;
  border-color: #3b646b !important;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42) !important;
}

body.dark .veedesk-action-item {
  color: #f3f0e8 !important;
}

body.dark .veedesk-action-item:hover,
body.dark .veedesk-action-item:focus {
  background: #163f45 !important;
  color: #ffffff !important;
}

body.dark .invoice-sheet,
body.dark .invoice-sheet * {
  color: #111827 !important;
}

/* Veedesk final brand theme: #061621 + #00ed64 */
:root {
  --primary: #061621;
  --primary-dark: #061621;
  --primary-light: #e8fff2;
  --accent: #00ed64;
  --accent-light: #d8ffe8;
}

.logo-name,
.login-box h2,
.page-heading,
.card-title,
.chart-title,
.topbar-title,
.section-heading,
.modal-title {
  color: #061621 !important;
}

.logo-name span,
.login-box h2 span,
.page-heading i,
.card-title i {
  color: #00ed64 !important;
}

.btn-primary,
.nav-item.active,
.m-nav-item.active {
  background: #061621 !important;
  border-color: #061621 !important;
  color: #ffffff !important;
}

.btn-success {
  background: #00ed64 !important;
  border-color: #00ed64 !important;
  color: #061621 !important;
}

.btn-primary:hover,
.btn-success:hover {
  filter: brightness(0.96);
}

.badge,
.pill,
.status-badge {
  border-color: rgba(0, 237, 100, 0.32) !important;
}

.veedesk-action-trigger:hover,
.veedesk-action-menu.open .veedesk-action-trigger {
  background: #e8fff2 !important;
  border-color: #00ed64 !important;
  color: #061621 !important;
}

.veedesk-action-item:hover,
.veedesk-action-item:focus {
  background: #e8fff2 !important;
  color: #061621 !important;
}

body.medium {
  --primary: #061621;
  --primary-dark: #061621;
  --primary-light: #dcf8e8;
  --accent: #00b84d;
  --accent-light: #d8ffe8;
  --green: #008a3a;
  --green-light: #d8ffe8;
  --bg: #edf4ef;
  --bg-2: #e0ebe4;
  --bg-page: #edf4ef;
  --white: #fbfff9;
  --text: #061621;
  --text-2: #243846;
  --text-3: #60717a;
  --border: #cadbd1;
  --border-2: #a9c2b4;
}

body.dark {
  --primary: #00ed64;
  --primary-dark: #00c853;
  --primary-light: #0c3528;
  --accent: #00ed64;
  --accent-light: #0c3528;
  --green: #00ed64;
  --green-light: #0c3528;
  --bg: #061621;
  --bg-2: #0b202d;
  --bg-page: #061621;
  --white: #0b202d;
  --text: #f5fbf7;
  --text-2: #d8e7de;
  --text-3: #a9bbb2;
  --border: #1e3a47;
  --border-2: #315363;
}

body.medium .logo-name,
body.medium .login-box h2,
body.medium .page-heading,
body.medium .card-title,
body.medium .chart-title,
body.medium .topbar-title,
body.medium .section-heading,
body.medium .modal-title {
  color: #061621 !important;
}

body.dark .sidebar,
body.dark .topbar,
body.dark .login-box,
body.dark .card,
body.dark .chart-container,
body.dark .stat-card,
body.dark .modal-content,
body.dark .table-wrap {
  background: #0b202d !important;
  border-color: #1e3a47 !important;
}

body.dark .logo-name,
body.dark .login-box h2,
body.dark .page-heading,
body.dark .card-title,
body.dark .chart-title,
body.dark .topbar-title,
body.dark .section-heading,
body.dark .modal-title,
body.dark h1,
body.dark h2,
body.dark h3,
body.dark h4,
body.dark h5,
body.dark h6,
body.dark strong {
  color: #f5fbf7 !important;
}

body.dark .logo-name span,
body.dark .login-box h2 span,
body.dark .page-heading i,
body.dark .card-title i,
body.dark .text-green,
body.dark .amount-positive {
  color: #00ed64 !important;
}

body.dark .btn-primary,
body.dark .btn-success,
body.dark .nav-item.active {
  background: #00ed64 !important;
  border-color: #00ed64 !important;
  color: #061621 !important;
}

body.dark .btn-ghost,
body.dark .btn-outline,
body.dark .btn-secondary {
  background: transparent !important;
  border-color: #00ed64 !important;
  color: #f5fbf7 !important;
}

body.dark input,
body.dark select,
body.dark textarea,
body.dark .search-input,
body.dark .filter-select,
body.dark .veedesk-action-trigger,
body.dark .veedesk-action-list {
  background: #061621 !important;
  color: #f5fbf7 !important;
  border-color: #315363 !important;
}

body.dark input:focus,
body.dark select:focus,
body.dark textarea:focus,
body.dark .search-input:focus,
body.dark .filter-select:focus {
  border-color: #00ed64 !important;
  box-shadow: 0 0 0 3px rgba(0, 237, 100, 0.14) !important;
}

body.dark table thead th,
body.dark table tbody tr:hover td,
body.dark .veedesk-action-item:hover,
body.dark .veedesk-action-item:focus,
body.dark .veedesk-action-menu.open .veedesk-action-trigger {
  background: #0f2b25 !important;
  color: #f5fbf7 !important;
}

/* MongoDB Atlas-inspired final app shell polish */
:root {
  --atlas-ink: #061621;
  --atlas-green: #00ed64;
  --atlas-green-soft: #d8ffee;
  --atlas-page: #f8fbfa;
  --atlas-card: #ffffff;
  --atlas-border: #d8e2df;
  --atlas-muted: #5f7079;
  --primary: #061621;
  --primary-dark: #061621;
  --primary-light: #d8ffee;
  --accent: #00ed64;
  --accent-light: #d8ffee;
  --bg-page: #f8fbfa;
  --text: #061621;
  --text-2: #243946;
  --text-3: #5f7079;
  --border: #d8e2df;
}

html,
body {
  background: var(--atlas-page) !important;
  color: var(--atlas-ink) !important;
}

.layout {
  background: var(--atlas-page) !important;
}

.sidebar {
  background: #ffffff !important;
  border-right: 1px solid var(--atlas-border) !important;
  box-shadow: none !important;
}

.sidebar-logo {
  border-bottom: 1px solid var(--atlas-border) !important;
  padding: 18px 20px !important;
}

.logo-name,
.logo-name span {
  color: #0b6b4a !important;
  letter-spacing: -0.03em;
}

.logo-sub {
  color: var(--atlas-muted) !important;
  font-size: 0.72rem !important;
}

.nav-label {
  color: #0b6b4a !important;
  font-size: 0.73rem !important;
  font-weight: 850 !important;
  letter-spacing: 0.055em !important;
  text-transform: uppercase !important;
}

.nav-item {
  color: #18313d !important;
  border-radius: 0 !important;
  margin: 1px 0 !important;
  min-height: 40px !important;
  font-size: 0.88rem !important;
  font-weight: 650 !important;
  border-left: 4px solid transparent !important;
  background: transparent !important;
}

.nav-item .icon {
  color: #0b6b4a !important;
}

.nav-item:hover,
.nav-item.active {
  background: var(--atlas-green-soft) !important;
  border-left-color: var(--atlas-green) !important;
  color: #061621 !important;
}

.nav-item:hover .icon,
.nav-item.active .icon {
  color: #0b6b4a !important;
}

.content {
  background: var(--atlas-page) !important;
}

.topbar {
  background: #ffffff !important;
  border-bottom: 1px solid var(--atlas-border) !important;
  box-shadow: none !important;
  min-height: 58px !important;
}

.topbar-title,
.page-heading,
.card-title,
.chart-title,
.section-heading,
.modal-title,
h1,
h2,
h3,
h4,
h5,
h6 {
  color: #061621 !important;
  letter-spacing: -0.025em;
}

.page-heading i,
.card-title i,
.topbar-title i {
  color: #0b6b4a !important;
}

.page-sub,
.sub-message,
.form-label,
label,
small,
.text-muted,
.helper-text,
#today-date {
  color: var(--atlas-muted) !important;
}

.card,
.chart-container,
.stat-card,
.table-wrap,
.modal-content,
.login-box {
  background: var(--atlas-card) !important;
  border: 1px solid var(--atlas-border) !important;
  border-radius: 18px !important;
  box-shadow: 0 10px 30px rgba(6, 22, 33, 0.06) !important;
}

.card:hover,
.stat-card:hover {
  box-shadow: 0 14px 34px rgba(6, 22, 33, 0.09) !important;
}

.btn-primary,
.btn-success {
  background: var(--atlas-green) !important;
  border-color: var(--atlas-green) !important;
  color: #061621 !important;
  box-shadow: none !important;
}

.btn-primary:hover,
.btn-success:hover {
  background: #00d95b !important;
  border-color: #00d95b !important;
  color: #061621 !important;
}

.btn-ghost,
.btn-outline,
.btn-secondary {
  background: #ffffff !important;
  border-color: var(--atlas-border) !important;
  color: #061621 !important;
}

input,
select,
textarea,
.search-input,
.filter-select {
  background: #ffffff !important;
  border-color: var(--atlas-border) !important;
  color: #061621 !important;
}

input::placeholder,
textarea::placeholder,
.search-input::placeholder {
  color: #7a8a92 !important;
  opacity: 1;
}

input:focus,
select:focus,
textarea:focus,
.search-input:focus,
.filter-select:focus {
  border-color: var(--atlas-green) !important;
  box-shadow: 0 0 0 3px rgba(0, 237, 100, 0.18) !important;
}

table,
table td,
table th {
  color: #061621 !important;
}

table thead th {
  background: #f1f7f4 !important;
  color: #24404a !important;
  border-bottom: 1px solid var(--atlas-border) !important;
}

table tbody tr:hover td {
  background: #f3fbf7 !important;
}

.badge,
.pill,
.status-badge {
  background: #effaf3 !important;
  border-color: #cbe8d6 !important;
  color: #0b6b4a !important;
}

.veedesk-action-trigger {
  background: #ffffff !important;
  border-color: var(--atlas-border) !important;
  color: #061621 !important;
}

.veedesk-action-menu.open .veedesk-action-trigger,
.veedesk-action-trigger:hover,
.veedesk-action-item:hover,
.veedesk-action-item:focus {
  background: var(--atlas-green-soft) !important;
  color: #061621 !important;
}

.veedesk-action-list {
  background: #ffffff !important;
  border-color: var(--atlas-border) !important;
  box-shadow: 0 18px 42px rgba(6, 22, 33, 0.16) !important;
}

.veedesk-action-item {
  color: #18313d !important;
}

.sidebar-user,
.sidebar-footer {
  border-top-color: var(--atlas-border) !important;
  color: var(--atlas-muted) !important;
}

.sidebar-user-name {
  color: #061621 !important;
}

.sidebar-user-role,
.sidebar-footer,
.sidebar-footer * {
  color: var(--atlas-muted) !important;
}

.sidebar-footer a {
  color: #0b6b4a !important;
}

body.dark {
  --atlas-page: #061621;
  --atlas-card: #0b202d;
  --atlas-border: #244451;
  --atlas-muted: #b8c8c1;
  --primary: #00ed64;
  --primary-dark: #00c853;
  --primary-light: #0f3329;
  --accent: #00ed64;
  --accent-light: #0f3329;
  --bg-page: #061621;
  --text: #f5fbf7;
  --text-2: #d8e7de;
  --text-3: #b8c8c1;
  --border: #244451;
  background: #061621 !important;
  color: #f5fbf7 !important;
}

body.dark html,
body.dark .layout,
body.dark .content,
body.dark #login-overlay {
  background: #061621 !important;
}

body.dark .sidebar,
body.dark .topbar,
body.dark .card,
body.dark .chart-container,
body.dark .stat-card,
body.dark .table-wrap,
body.dark .modal-content,
body.dark .login-box,
body.dark .veedesk-action-list {
  background: #0b202d !important;
  border-color: #244451 !important;
  box-shadow: none !important;
}

body.dark .topbar-title,
body.dark .page-heading,
body.dark .card-title,
body.dark .chart-title,
body.dark .section-heading,
body.dark .modal-title,
body.dark h1,
body.dark h2,
body.dark h3,
body.dark h4,
body.dark h5,
body.dark h6,
body.dark strong,
body.dark table,
body.dark table td,
body.dark table th,
body.dark .font-mono,
body.dark .empty-state,
body.dark .sidebar-user-name,
body.dark .info-row,
body.dark .bill-preview-text {
  color: #f5fbf7 !important;
}

body.dark .logo-name,
body.dark .logo-name span,
body.dark .page-heading i,
body.dark .card-title i,
body.dark .topbar-title i,
body.dark .nav-label,
body.dark .nav-item .icon,
body.dark .text-green,
body.dark .amount-positive,
body.dark .sidebar-footer a {
  color: #00ed64 !important;
}

body.dark .page-sub,
body.dark .sub-message,
body.dark .form-label,
body.dark label,
body.dark small,
body.dark .text-muted,
body.dark .helper-text,
body.dark #today-date,
body.dark .sidebar-user-role,
body.dark .sidebar-footer,
body.dark .sidebar-footer * {
  color: #b8c8c1 !important;
}

body.dark .nav-item {
  color: #d8e7de !important;
}

body.dark .nav-item:hover,
body.dark .nav-item.active {
  background: #0f3329 !important;
  border-left-color: #00ed64 !important;
  color: #f5fbf7 !important;
}

body.dark input,
body.dark select,
body.dark textarea,
body.dark .search-input,
body.dark .filter-select,
body.dark .veedesk-action-trigger {
  background: #061621 !important;
  border-color: #315363 !important;
  color: #f5fbf7 !important;
}

body.dark input::placeholder,
body.dark textarea::placeholder,
body.dark .search-input::placeholder {
  color: #9fb2aa !important;
}

body.dark input:focus,
body.dark select:focus,
body.dark textarea:focus,
body.dark .search-input:focus,
body.dark .filter-select:focus {
  border-color: #00ed64 !important;
  box-shadow: 0 0 0 3px rgba(0, 237, 100, 0.16) !important;
}

body.dark table thead th {
  background: #102a38 !important;
  color: #d8e7de !important;
  border-color: #244451 !important;
}

body.dark table tbody tr:hover td,
body.dark .veedesk-action-menu.open .veedesk-action-trigger,
body.dark .veedesk-action-trigger:hover,
body.dark .veedesk-action-item:hover,
body.dark .veedesk-action-item:focus {
  background: #0f3329 !important;
  color: #f5fbf7 !important;
}

body.dark .btn-primary,
body.dark .btn-success {
  background: #00ed64 !important;
  border-color: #00ed64 !important;
  color: #061621 !important;
}

body.dark .btn-ghost,
body.dark .btn-outline,
body.dark .btn-secondary {
  background: #0b202d !important;
  border-color: #315363 !important;
  color: #f5fbf7 !important;
}

body.dark .badge,
body.dark .pill,
body.dark .status-badge {
  background: #0f3329 !important;
  border-color: #1c7f4d !important;
  color: #d8ffee !important;
}

body.dark .text-red,
body.dark .amount-negative {
  color: #ffb8b1 !important;
}

body.dark a:not(.btn),
body.dark .clickable-name {
  color: #00ed64 !important;
}

body.dark .invoice-sheet,
body.dark .invoice-sheet * {
  color: #111827 !important;
}

body.dark .invoice-sheet {
  background: #ffffff !important;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: #93a3aa;
  border-radius: 999px;
}

body.dark ::-webkit-scrollbar-thumb {
  background: #5f747d;
}

/* Classic MongoDB app theme override: rgb(0, 104, 74) */
:root {
  --mongo-green: rgb(0, 104, 74);
  --mongo-green-dark: #004c38;
  --mongo-green-soft: #e3f7ef;
  --mongo-leaf: #13aa52;
  --mongo-ink: #001e2b;
  --mongo-page: #f9fbfa;
  --mongo-card: #ffffff;
  --mongo-border: #dbe7e3;
  --mongo-muted: #5d6f78;
  --primary: rgb(0, 104, 74);
  --primary-dark: #004c38;
  --primary-light: #e3f7ef;
  --accent: rgb(0, 104, 74);
  --accent-light: #e3f7ef;
  --bg-page: #f9fbfa;
  --text: #001e2b;
  --text-2: #213c49;
  --text-3: #5d6f78;
  --border: #dbe7e3;
}

html,
body,
.layout,
.content,
#login-overlay {
  background: var(--mongo-page) !important;
  color: var(--mongo-ink) !important;
}

.sidebar,
.topbar,
.card,
.chart-container,
.stat-card,
.table-wrap,
.modal-content,
.login-box,
.veedesk-action-list {
  background: var(--mongo-card) !important;
  border-color: var(--mongo-border) !important;
}

.sidebar {
  border-right: 1px solid var(--mongo-border) !important;
}

.logo-name,
.logo-name span,
.nav-label,
.nav-item .icon,
.page-heading i,
.card-title i,
.topbar-title i,
.text-green,
.amount-positive,
.sidebar-footer a,
a:not(.btn),
.clickable-name {
  color: var(--mongo-green) !important;
}

.topbar-title,
.page-heading,
.card-title,
.chart-title,
.section-heading,
.modal-title,
h1,
h2,
h3,
h4,
h5,
h6,
strong,
table,
table td,
table th,
.font-mono,
.sidebar-user-name {
  color: var(--mongo-ink) !important;
}

.page-sub,
.sub-message,
.form-label,
label,
small,
.text-muted,
.helper-text,
#today-date,
.sidebar-user-role,
.sidebar-footer,
.sidebar-footer * {
  color: var(--mongo-muted) !important;
}

.nav-item {
  color: #1b3440 !important;
  border-left-color: transparent !important;
}

.nav-item:hover,
.nav-item.active {
  background: var(--mongo-green-soft) !important;
  border-left-color: var(--mongo-green) !important;
  color: var(--mongo-ink) !important;
}

.btn-primary,
.btn-success {
  background: var(--mongo-green) !important;
  border-color: var(--mongo-green) !important;
  color: #ffffff !important;
}

.btn-primary:hover,
.btn-success:hover {
  background: var(--mongo-green-dark) !important;
  border-color: var(--mongo-green-dark) !important;
  color: #ffffff !important;
}

.btn-ghost,
.btn-outline,
.btn-secondary {
  background: #ffffff !important;
  border-color: var(--mongo-border) !important;
  color: var(--mongo-ink) !important;
}

input,
select,
textarea,
.search-input,
.filter-select,
.veedesk-action-trigger {
  background: #ffffff !important;
  border-color: var(--mongo-border) !important;
  color: var(--mongo-ink) !important;
}

input:focus,
select:focus,
textarea:focus,
.search-input:focus,
.filter-select:focus {
  border-color: var(--mongo-green) !important;
  box-shadow: 0 0 0 3px rgba(0, 104, 74, 0.16) !important;
}

table thead th {
  background: #f0f7f4 !important;
  color: #24404a !important;
}

table tbody tr:hover td,
.veedesk-action-menu.open .veedesk-action-trigger,
.veedesk-action-trigger:hover,
.veedesk-action-item:hover,
.veedesk-action-item:focus {
  background: var(--mongo-green-soft) !important;
  color: var(--mongo-ink) !important;
}

.badge,
.pill,
.status-badge {
  background: #edf8f2 !important;
  border-color: #c9e7d7 !important;
  color: var(--mongo-green) !important;
}

body.dark {
  --mongo-green: rgb(0, 170, 94);
  --mongo-green-dark: rgb(0, 134, 78);
  --mongo-green-soft: #0c3328;
  --mongo-ink: #f4fbf7;
  --mongo-page: #001e2b;
  --mongo-card: #082633;
  --mongo-border: #234958;
  --mongo-muted: #b9cbc3;
  --primary: rgb(0, 170, 94);
  --primary-dark: rgb(0, 134, 78);
  --primary-light: #0c3328;
  --accent: rgb(0, 170, 94);
  --accent-light: #0c3328;
  --bg-page: #001e2b;
  --text: #f4fbf7;
  --text-2: #d9e8e1;
  --text-3: #b9cbc3;
  --border: #234958;
  background: #001e2b !important;
  color: #f4fbf7 !important;
}

body.dark html,
body.dark .layout,
body.dark .content,
body.dark #login-overlay {
  background: #001e2b !important;
  color: #f4fbf7 !important;
}

body.dark .sidebar,
body.dark .topbar,
body.dark .card,
body.dark .chart-container,
body.dark .stat-card,
body.dark .table-wrap,
body.dark .modal-content,
body.dark .login-box,
body.dark .veedesk-action-list {
  background: #082633 !important;
  border-color: #234958 !important;
}

body.dark .topbar-title,
body.dark .page-heading,
body.dark .card-title,
body.dark .chart-title,
body.dark .section-heading,
body.dark .modal-title,
body.dark h1,
body.dark h2,
body.dark h3,
body.dark h4,
body.dark h5,
body.dark h6,
body.dark strong,
body.dark table,
body.dark table td,
body.dark table th,
body.dark .font-mono,
body.dark .empty-state,
body.dark .sidebar-user-name,
body.dark .info-row,
body.dark .bill-preview-text {
  color: #f4fbf7 !important;
}

body.dark .logo-name,
body.dark .logo-name span,
body.dark .nav-label,
body.dark .nav-item .icon,
body.dark .page-heading i,
body.dark .card-title i,
body.dark .topbar-title i,
body.dark .text-green,
body.dark .amount-positive,
body.dark .sidebar-footer a,
body.dark a:not(.btn),
body.dark .clickable-name {
  color: rgb(0, 170, 94) !important;
}

body.dark .page-sub,
body.dark .sub-message,
body.dark .form-label,
body.dark label,
body.dark small,
body.dark .text-muted,
body.dark .helper-text,
body.dark #today-date,
body.dark .sidebar-user-role,
body.dark .sidebar-footer,
body.dark .sidebar-footer * {
  color: #b9cbc3 !important;
}

body.dark .nav-item {
  color: #d9e8e1 !important;
}

body.dark .nav-item:hover,
body.dark .nav-item.active {
  background: #0c3328 !important;
  border-left-color: rgb(0, 170, 94) !important;
  color: #f4fbf7 !important;
}

body.dark .btn-primary,
body.dark .btn-success {
  background: rgb(0, 170, 94) !important;
  border-color: rgb(0, 170, 94) !important;
  color: #001e2b !important;
}

body.dark .btn-primary:hover,
body.dark .btn-success:hover {
  background: rgb(0, 134, 78) !important;
  border-color: rgb(0, 134, 78) !important;
  color: #ffffff !important;
}

body.dark .btn-ghost,
body.dark .btn-outline,
body.dark .btn-secondary,
body.dark input,
body.dark select,
body.dark textarea,
body.dark .search-input,
body.dark .filter-select,
body.dark .veedesk-action-trigger {
  background: #001e2b !important;
  border-color: #315565 !important;
  color: #f4fbf7 !important;
}

body.dark input::placeholder,
body.dark textarea::placeholder,
body.dark .search-input::placeholder {
  color: #9fb6ad !important;
}

body.dark input:focus,
body.dark select:focus,
body.dark textarea:focus,
body.dark .search-input:focus,
body.dark .filter-select:focus {
  border-color: rgb(0, 170, 94) !important;
  box-shadow: 0 0 0 3px rgba(0, 170, 94, 0.18) !important;
}

body.dark table thead th {
  background: #102f3c !important;
  color: #d9e8e1 !important;
}

body.dark table tbody tr:hover td,
body.dark .veedesk-action-menu.open .veedesk-action-trigger,
body.dark .veedesk-action-trigger:hover,
body.dark .veedesk-action-item:hover,
body.dark .veedesk-action-item:focus {
  background: #0c3328 !important;
  color: #f4fbf7 !important;
}

body.dark .badge,
body.dark .pill,
body.dark .status-badge {
  background: #0c3328 !important;
  border-color: #1d7049 !important;
  color: #d9fbe8 !important;
}

/* Password visibility control */
.password-field {
  position: relative;
  width: 100%;
}

.password-field input {
  width: 100% !important;
  padding-right: 46px !important;
}

.password-toggle {
  position: absolute;
  top: 35%;
  right: 12px;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--mongo-green, rgb(0, 104, 74));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus {
  background: var(--mongo-green-soft, #e3f7ef);
  color: var(--mongo-green, rgb(0, 104, 74));
  outline: none;
}

body.dark .password-toggle {
  color: rgb(0, 170, 94) !important;
}

body.dark .password-toggle:hover,
body.dark .password-toggle:focus {
  background: #0c3328 !important;
  color: rgb(0, 170, 94) !important;
}

/* A4-only black-and-white tax invoice */
.tax-invoice-sheet {
  width: 210mm !important;
  min-height: 297mm !important;
  max-width: 210mm !important;
  box-sizing: border-box !important;
  padding: 11mm 10mm !important;
  margin: 0 auto !important;
  background: #ffffff !important;
  color: #000000 !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 10px !important;
  line-height: 1.28 !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12) !important;
}

.tax-invoice-sheet,
.tax-invoice-sheet * {
  color: #000000 !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

.tax-title {
  text-align: center;
  font-weight: 900;
  font-size: 11px;
  margin-bottom: 2mm;
}

.tax-outer {
  border: 1.4px solid #000;
}

.tax-company-row {
  display: grid;
  grid-template-columns: 38mm 1fr;
  min-height: 24mm;
  border-bottom: 1.2px solid #000;
}

.tax-logo-box {
  border-right: 1.2px solid #000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2mm;
}

.tax-logo-box img {
  width: 34mm;
  max-height: 20mm;
  object-fit: contain;
  filter: grayscale(1) contrast(1.35);
}

.tax-company {
  text-align: center;
  padding: 3mm 2mm 2mm;
  font-weight: 700;
}

.tax-company-name {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.2px;
  margin-bottom: 2mm;
}

.tax-info-grid {
  display: grid;
  grid-template-columns: 57% 43%;
  border-bottom: 1.2px solid #000;
}

.tax-customer {
  min-height: 29mm;
  padding: 2mm 2.2mm;
  border-right: 1.2px solid #000;
  font-weight: 700;
}

.tax-label {
  font-weight: 900;
  margin-bottom: 1.5mm;
}

.tax-customer-name {
  text-transform: uppercase;
  margin-bottom: 2mm;
}

.tax-mobile {
  margin-top: 6mm;
}

.tax-meta-table {
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  font-weight: 800;
}

.tax-meta-table>div {
  display: grid;
  grid-template-columns: 30mm 1fr;
  align-items: center;
  border-bottom: 1.2px solid #000;
  min-height: 7.2mm;
}

.tax-meta-table>div:last-child {
  border-bottom: 0;
}

.tax-meta-table span {
  padding-left: 2mm;
}

.tax-meta-table strong {
  padding: 0 2mm;
}

.tax-meta-table em {
  font-style: normal;
  text-align: center;
}

.tax-meta-table>div:nth-child(3) {
  grid-template-columns: 30mm 1fr 9mm 1fr;
}

.tax-items-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 10px;
}

.tax-items-table th,
.tax-items-table td {
  border-right: 1.2px solid #000;
  padding: 1.7mm 1.4mm;
  vertical-align: top;
  background: #fff !important;
}

.tax-items-table th:last-child,
.tax-items-table td:last-child {
  border-right: 0;
}

.tax-items-table thead th {
  border-bottom: 1.2px solid #000;
  text-align: center;
  font-weight: 900;
}

.tax-items-table tbody tr {
  height: 6.8mm;
}

.tax-items-table tbody tr.tax-empty-row {
  height: 8.8mm;
}

.tax-items-table tbody td {
  text-align: center;
  border-bottom: 0;
}

.tax-items-table .tax-product {
  text-align: left;
  font-weight: 700;
}

.tax-items-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.tax-items-table th:nth-child(1),
.tax-items-table td:nth-child(1) {
  width: 9mm;
}

.tax-items-table th:nth-child(2),
.tax-items-table td:nth-child(2) {
  width: 22mm;
}

.tax-items-table th:nth-child(4),
.tax-items-table td:nth-child(4) {
  width: 13mm;
}

.tax-items-table th:nth-child(5),
.tax-items-table td:nth-child(5) {
  width: 20mm;
}

.tax-items-table th:nth-child(6),
.tax-items-table td:nth-child(6) {
  width: 14mm;
}

.tax-items-table th:nth-child(7),
.tax-items-table td:nth-child(7) {
  width: 24mm;
}

.tax-bottom-grid {
  display: grid;
  grid-template-columns: 68% 32%;
  border-top: 1.2px solid #000;
  min-height: 41mm;
}

.tax-notes-area {
  border-right: 1.2px solid #000;
  padding: 3mm;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: pre-wrap;
}

.tax-note-text {
  transform: rotate(-7deg);
  font-size: 13px;
  font-family: 'Comic Sans MS', 'Bradley Hand', cursive;
  color: #333 !important;
}

.tax-total-box {
  display: grid;
  grid-template-rows: 10mm repeat(5, 7mm) 10mm;
  font-weight: 800;
}

.tax-total-box>div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2.5mm;
}

.tax-total-main {
  border-bottom: 1.2px solid #000;
  font-size: 11px;
}

.tax-net {
  border-top: 1.2px solid #000;
  font-size: 11px;
}

.tax-words {
  border-top: 1.2px solid #000;
  padding: 2mm;
  min-height: 13mm;
  font-weight: 700;
}

.tax-words div {
  margin-top: 2mm;
}

.tax-footer-grid {
  display: grid;
  grid-template-columns: 66% 34%;
  min-height: 23mm;
  border-top: 1.2px solid #000;
}

.tax-bank {
  padding: 2mm;
  font-weight: 800;
}

.tax-bank div {
  margin-bottom: 1mm;
}

.tax-sign {
  border-left: 1.2px solid #000;
  text-align: center;
  position: relative;
  padding: 2mm;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1mm;
}

.tax-stamp {
  position: absolute;
  right: 8mm;
  bottom: 7mm;
  width: 22mm;
  height: 22mm;
  border: 2px solid #1e5da8;
  border-radius: 50%;
  color: #1e5da8 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 15px;
  opacity: 0.85;
  transform: rotate(-12deg);
}

.tax-sign-line {
  font-size: 9px;
}

.tax-signature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1.2px solid #000;
  min-height: 12mm;
  align-items: end;
  font-weight: 800;
}

.tax-signature-row span {
  padding: 2mm;
}

.tax-signature-row span:first-child {
  border-right: 1.2px solid #000;
}

.tax-invoice-sheet .inv-generated-by {
  color: #444 !important;
  font-size: 8px;
  margin-top: 2mm;
}

@media print {
  @page {
    size: A4 portrait !important;
    margin: 0 !important;
  }

  body.print-a5 #print-zone,
  #print-zone.tax-invoice-sheet,
  .tax-invoice-sheet {
    width: 210mm !important;
    max-width: 210mm !important;
    min-height: 297mm !important;
    padding: 9mm 9mm !important;
    margin: 0 !important;
    box-shadow: none !important;
    overflow: hidden !important;
  }

  .tax-title {
    margin-bottom: 1.5mm !important;
  }

  .tax-company-row {
    min-height: 22mm !important;
  }

  .tax-info-grid {
    grid-template-columns: 57% 43% !important;
  }

  .tax-customer {
    min-height: 27mm !important;
  }

  .tax-items-table tbody tr {
    height: 6.3mm !important;
  }

  .tax-items-table tbody tr.tax-empty-row {
    height: 8.2mm !important;
  }

  .tax-bottom-grid {
    min-height: 39mm !important;
  }

  .tax-words {
    min-height: 12mm !important;
  }

  .tax-footer-grid {
    min-height: 22mm !important;
  }

  .tax-signature-row {
    min-height: 10mm !important;
  }
}

.tax-invoice-sheet.tax-compact {
  font-size: 9px !important;
}

.tax-invoice-sheet.tax-compact .tax-items-table {
  font-size: 9px !important;
}

.tax-invoice-sheet.tax-compact .tax-items-table th,
.tax-invoice-sheet.tax-compact .tax-items-table td {
  padding: 1.1mm 1mm !important;
}

.tax-invoice-sheet.tax-compact .tax-items-table tbody tr,
.tax-invoice-sheet.tax-compact .tax-items-table tbody tr.tax-empty-row {
  height: 5.2mm !important;
}

.tax-invoice-sheet.tax-compact .tax-bottom-grid {
  min-height: 34mm !important;
}

@media print {

  .tax-invoice-sheet.tax-compact .tax-items-table tbody tr,
  .tax-invoice-sheet.tax-compact .tax-items-table tbody tr.tax-empty-row {
    height: 4.8mm !important;
  }
}

/* Tax invoice cleanup: no hire period, no stamp, no generated-by footer */
.tax-meta-table {
  grid-template-rows: repeat(3, 1fr) !important;
}

.tax-meta-table>div:nth-child(3) {
  grid-template-columns: 30mm 1fr !important;
}

.tax-stamp,
.tax-invoice-sheet .inv-generated-by {
  display: none !important;
}

.tax-sign {
  justify-content: flex-end !important;
  gap: 3mm !important;
}

/* Colored tax invoice presentation */
.tax-invoice-sheet {
  --tax-green: rgb(0, 104, 74);
  --tax-green-soft: #e8f6ef;
  --tax-border: #2f6f5b;
  color: #123127 !important;
}

.tax-invoice-sheet,
.tax-invoice-sheet * {
  color: #123127 !important;
}

.tax-title,
.tax-company-name,
.tax-label,
.tax-total-main,
.tax-net,
.tax-words strong,
.tax-bank strong,
.tax-sign {
  color: var(--tax-green) !important;
}

.tax-outer,
.tax-company-row,
.tax-logo-box,
.tax-info-grid,
.tax-customer,
.tax-meta-table>div,
.tax-items-table th,
.tax-items-table td,
.tax-bottom-grid,
.tax-notes-area,
.tax-total-main,
.tax-net,
.tax-words,
.tax-footer-grid,
.tax-sign,
.tax-signature-row,
.tax-signature-row span:first-child {
  border-color: var(--tax-border) !important;
}

.tax-title,
.tax-items-table thead th,
.tax-total-main,
.tax-net {
  background: var(--tax-green-soft) !important;
}

.tax-company-row {
  background: linear-gradient(90deg, #ffffff 0%, #f3fbf7 100%) !important;
}

.tax-logo-box {
  background: #f8fffb !important;
}

.tax-logo-box img {
  filter: none !important;
}

.tax-signature-row {
  background: #fbfffd !important;
}

@media print {

  .tax-title,
  .tax-items-table thead th,
  .tax-total-main,
  .tax-net {
    background: #e8f6ef !important;
  }
}

/* Veedesk Poppins brand typography + theme readability */
:root {
  --font-body: 'Poppins', 'Noto Sans Tamil', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Poppins', 'Noto Sans Tamil', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --brand-font: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html,
body,
button,
input,
select,
textarea,
table,
.modal,
.card,
.nav-item,
.badge,
.pill {
  font-family: var(--font-body) !important;
}

.logo-name,
.sidebar-logo-name,
.login-footer,
.veedesk-wordmark,
.footer-logo-mark,
.footer-logo,
.logo {
  font-family: var(--brand-font) !important;
}

.veedesk-wordmark,
.logo-name,
.logo-name span {
  font-weight: 500 !important;
  letter-spacing: -0.035em !important;
  text-transform: lowercase;
  color: rgb(0, 104, 74) !important;
}

.veedesk-wordmark span,
.logo-name span {
  color: rgb(0, 104, 74) !important;
  font-weight: 500 !important;
}

.sidebar-logo-name {
  font-weight: 400 !important;
  letter-spacing: -0.01em;
  color: var(--text-3) !important;
}

.login-footer {
  font-weight: 400 !important;
  color: var(--text-3) !important;
}

.page-heading,
.card-title,
.topbar-title,
.modal-title,
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading) !important;
  font-weight: 600 !important;
  letter-spacing: -0.025em;
}

body.light,
body:not(.medium):not(.dark) {
  --bg-page: #f9fbfa;
  --white: #ffffff;
  --text: #001e2b;
  --text-2: #203a46;
  --text-3: #5d7078;
  --border: #dbe7e3;
  --primary: rgb(0, 104, 74);
  --primary-light: #e3f7ef;
  --accent: rgb(0, 104, 74);
}

body.medium {
  --bg-page: #edf3f0;
  --white: #f8fcfa;
  --bg: #edf3f0;
  --bg-2: #dfe9e5;
  --text: #09251e;
  --text-2: #264139;
  --text-3: #62766e;
  --border: #c7d7d0;
  --primary: rgb(0, 104, 74);
  --primary-light: #d7eee5;
  --accent: rgb(0, 104, 74);
  background: var(--bg-page) !important;
  color: var(--text) !important;
}

body.dark {
  --bg-page: #001e2b;
  --white: #082633;
  --bg: #001e2b;
  --bg-2: #082633;
  --text: #f4fbf7;
  --text-2: #d9e8e1;
  --text-3: #b9cbc3;
  --border: #234958;
  --primary: rgb(0, 170, 94);
  --primary-light: #0c3328;
  --accent: rgb(0, 170, 94);
  background: var(--bg-page) !important;
  color: var(--text) !important;
}

body.medium .sidebar,
body.medium .topbar,
body.medium .card,
body.medium .chart-container,
body.medium .stat-card,
body.medium .table-wrap,
body.medium .modal-content,
body.medium .login-box {
  background: var(--white) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

body.dark .sidebar,
body.dark .topbar,
body.dark .card,
body.dark .chart-container,
body.dark .stat-card,
body.dark .table-wrap,
body.dark .modal-content,
body.dark .login-box,
body.dark .veedesk-action-list {
  background: #082633 !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

body.medium .page-heading,
body.medium .card-title,
body.medium .topbar-title,
body.medium .modal-title,
body.medium h1,
body.medium h2,
body.medium h3,
body.medium h4,
body.medium h5,
body.medium h6,
body.medium strong,
body.medium table,
body.medium td,
body.medium th,
body.medium .font-mono,
body.medium .sidebar-user-name {
  color: var(--text) !important;
}

body.dark .page-heading,
body.dark .card-title,
body.dark .topbar-title,
body.dark .modal-title,
body.dark h1,
body.dark h2,
body.dark h3,
body.dark h4,
body.dark h5,
body.dark h6,
body.dark strong,
body.dark table,
body.dark td,
body.dark th,
body.dark .font-mono,
body.dark .sidebar-user-name,
body.dark .empty-state {
  color: var(--text) !important;
}

body.medium .page-sub,
body.medium .sub-message,
body.medium .form-label,
body.medium label,
body.medium small,
body.medium .text-muted,
body.medium .helper-text,
body.medium .sidebar-user-role,
body.medium .sidebar-footer,
body.medium .sidebar-footer * {
  color: var(--text-3) !important;
}

body.dark .page-sub,
body.dark .sub-message,
body.dark .form-label,
body.dark label,
body.dark small,
body.dark .text-muted,
body.dark .helper-text,
body.dark .sidebar-user-role,
body.dark .sidebar-footer,
body.dark .sidebar-footer * {
  color: var(--text-3) !important;
}

body.dark .veedesk-wordmark,
body.dark .veedesk-wordmark span,
body.dark .logo-name,
body.dark .logo-name span,
body.dark .nav-label,
body.dark .nav-item .icon,
body.dark a:not(.btn) {
  color: rgb(0, 170, 94) !important;
}

body.medium input,
body.medium select,
body.medium textarea,
body.medium .search-input,
body.medium .filter-select,
body.dark input,
body.dark select,
body.dark textarea,
body.dark .search-input,
body.dark .filter-select {
  color: var(--text) !important;
  border-color: var(--border) !important;
}

body.medium input,
body.medium select,
body.medium textarea,
body.medium .search-input,
body.medium .filter-select {
  background: #ffffff !important;
}

body.dark input,
body.dark select,
body.dark textarea,
body.dark .search-input,
body.dark .filter-select {
  background: #001e2b !important;
}

body.medium table thead th {
  background: #e3f0eb !important;
  color: var(--text-2) !important;
}

body.dark table thead th {
  background: #102f3c !important;
  color: var(--text-2) !important;
}

body.medium .nav-item:hover,
body.medium .nav-item.active,
body.dark .nav-item:hover,
body.dark .nav-item.active {
  background: var(--primary-light) !important;
  color: var(--text) !important;
  border-left-color: var(--primary) !important;
}

.invoice-sheet,
.invoice-sheet * {
  font-family: 'Poppins', 'Noto Sans Tamil', Arial, sans-serif !important;
}

.tax-invoice-sheet,
.tax-invoice-sheet * {
  font-family: 'Poppins', Arial, sans-serif !important;
}

/* Veedesk 2026 app palette: #edf2f1, white, #112a24, #00ea6b */
:root {
  --font-main: 'Poppins', 'Noto Sans Tamil', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Poppins', 'Noto Sans Tamil', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body.light,
body:not(.medium):not(.dark) {
  --bg-page: #edf2f1;
  --bg: #edf2f1;
  --bg-2: #dce8e4;
  --white: #ffffff;
  --text: #112a24;
  --text-2: #274139;
  --text-3: #5b7069;
  --border: #d1ded9;
  --primary: #112a24;
  --primary-dark: #0b1e19;
  --primary-light: rgba(0, 234, 107, 0.16);
  --accent: #00ea6b;
  --green: #00a955;
  background: var(--bg-page) !important;
  color: var(--text) !important;
}

body.medium {
  --bg-page: #dfe8e5;
  --bg: #dfe8e5;
  --bg-2: #cadad5;
  --white: #f8fbfa;
  --text: #112a24;
  --text-2: #263e37;
  --text-3: #556b64;
  --border: #bfd0ca;
  --primary: #112a24;
  --primary-dark: #0b1e19;
  --primary-light: rgba(0, 234, 107, 0.18);
  --accent: #00ea6b;
  --green: #009f51;
  background: var(--bg-page) !important;
  color: var(--text) !important;
}

body.dark {
  --bg-page: #112a24;
  --bg: #112a24;
  --bg-2: #17382f;
  --white: #17382f;
  --text: #edf2f1;
  --text-2: #dce8e4;
  --text-3: #b8c9c4;
  --border: rgba(237, 242, 241, 0.14);
  --primary: #00ea6b;
  --primary-dark: #00c95c;
  --primary-light: rgba(0, 234, 107, 0.14);
  --accent: #00ea6b;
  --green: #00ea6b;
  background: var(--bg-page) !important;
  color: var(--text) !important;
}

html,
body,
button,
input,
select,
textarea,
.btn,
.nav-item,
.card,
.modal-content,
table {
  font-family: var(--font-main) !important;
}

/* .sidebar-logo-img,
.login-box>img {
  object-fit: contain !important;
  background: #ffffff !important;
  border: 1px solid var(--border) !important;
  box-shadow: none !important;
} */

.sidebar-logo-img {
  width: 42px !important;
  height: 42px !important;
  border-radius: 14px !important;
}

/* .login-box>img {
  width: 58px !important;
  height: 58px !important;
  padding: 9px !important;
  border-radius: 18px !important;
} */

.veedesk-wordmark,
.veedesk-wordmark span,
.logo-name,
.logo-name span,
.sidebar-logo-name {
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
  font-family: 'Poppins', system-ui, sans-serif !important;
  font-weight: 500 !important;
  letter-spacing: -0.04em !important;
}

body.dark .veedesk-wordmark,
body.dark .veedesk-wordmark span,
body.dark .logo-name,
body.dark .logo-name span,
body.dark .sidebar-logo-name {
  color: #edf2f1 !important;
  -webkit-text-fill-color: #edf2f1 !important;
}

.btn-primary,
button.btn-primary {
  background: #112a24 !important;
  border-color: #112a24 !important;
  color: #ffffff !important;
}

body.dark .btn-primary,
body.dark button.btn-primary {
  background: #00ea6b !important;
  border-color: #00ea6b !important;
  color: #112a24 !important;
}

.btn-success,
.btn-accent {
  background: #00ea6b !important;
  border-color: #00ea6b !important;
  color: #112a24 !important;
}

body.light .sidebar,
body.light .topbar,
body.light .card,
body.light .stat-card,
body.light .chart-container,
body.light .table-wrap,
body.light .modal-content,
body.light .login-box,
body:not(.medium):not(.dark) .sidebar,
body:not(.medium):not(.dark) .topbar,
body:not(.medium):not(.dark) .card,
body:not(.medium):not(.dark) .stat-card,
body:not(.medium):not(.dark) .chart-container,
body:not(.medium):not(.dark) .table-wrap,
body:not(.medium):not(.dark) .modal-content,
body:not(.medium):not(.dark) .login-box,
body.medium .sidebar,
body.medium .topbar,
body.medium .card,
body.medium .stat-card,
body.medium .chart-container,
body.medium .table-wrap,
body.medium .modal-content,
body.medium .login-box,
body.dark .sidebar,
body.dark .topbar,
body.dark .card,
body.dark .stat-card,
body.dark .chart-container,
body.dark .table-wrap,
body.dark .modal-content,
body.dark .login-box {
  background: var(--white) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

body.dark input,
body.dark select,
body.dark textarea,
body.dark .search-input,
body.dark .filter-select {
  background: #112a24 !important;
  color: #edf2f1 !important;
  border-color: var(--border) !important;
}

body.dark input::placeholder,
body.dark textarea::placeholder {
  color: #a7bbb5 !important;
}

body.dark table,
body.dark th,
body.dark td,
body.dark .page-heading,
body.dark .card-title,
body.dark .modal-title,
body.dark .topbar-title,
body.dark label,
body.dark .form-label,
body.dark .text-muted,
body.dark .page-sub,
body.dark .empty-state {
  color: var(--text) !important;
}

body.dark table thead th {
  background: #21443a !important;
  color: #edf2f1 !important;
}

body.dark .nav-item,
body.dark .nav-label,
body.dark .sidebar-user-name,
body.dark .sidebar-user-role,
body.dark .sidebar-footer,
body.dark .sidebar-footer * {
  color: #edf2f1 !important;
}

body.dark .nav-item:hover,
body.dark .nav-item.active,
body.medium .nav-item:hover,
body.medium .nav-item.active,
body.light .nav-item:hover,
body.light .nav-item.active,
body:not(.medium):not(.dark) .nav-item:hover,
body:not(.medium):not(.dark) .nav-item.active {
  background: var(--primary-light) !important;
  color: var(--text) !important;
  ;
}

body.dark .nav-item:hover,
body.dark .nav-item.active {
  color: #edf2f1 !important;
}

.invoice-sheet,
.invoice-sheet *,
.tax-invoice-sheet,
.tax-invoice-sheet * {
  background-color: transparent;
}

/* Veedesk app professional/glass polish */
.sidebar-logo {
  justify-content: center !important;
  padding: 20px 16px 14px !important;
  border-bottom: 1px solid var(--border) !important;
}

.sidebar-logo-wide {
  width: 176px !important;
  height: auto !important;
  max-height: 58px !important;
  padding: 9px 12px !important;
  border-radius: 18px !important;
  object-fit: contain !important;
}

.sidebar {
  box-shadow: 18px 0 70px rgba(17, 42, 36, 0.08) !important;
}

.topbar,
.card,
.stat-card,
.chart-container,
.table-wrap,
.modal-content,
.login-box {
  box-shadow: 0 18px 55px rgba(17, 42, 36, 0.08) !important;
}

.nav-item {
  border-radius: 14px !important;
  margin-inline: 10px !important;
}

.nav-label {
  letter-spacing: 0.02em !important;
}

body.dark {
  background:
    radial-gradient(circle at 16% 10%, rgba(0, 234, 107, 0.14), transparent 28rem),
    radial-gradient(circle at 92% 12%, rgba(237, 242, 241, 0.08), transparent 24rem),
    #112a24 !important;
}

body.dark .sidebar,
body.dark .topbar,
body.dark .card,
body.dark .stat-card,
body.dark .chart-container,
body.dark .table-wrap,
body.dark .modal-content,
body.dark .login-box,
body.dark .veedesk-action-list {
  background: rgba(23, 56, 47, 0.66) !important;
  border-color: rgba(237, 242, 241, 0.14) !important;
  box-shadow:
    0 22px 70px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.07) !important;
  backdrop-filter: blur(22px) saturate(150%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(150%) !important;
}

body.dark .sidebar-logo-wide {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: 0 18px 44px rgba(0, 234, 107, 0.12) !important;
  filter: drop-shadow(0 10px 22px rgba(0, 234, 107, 0.2));
}

body.dark .nav-item {
  background: transparent !important;
}

body.dark .nav-item:hover,
body.dark .nav-item.active {
  background: rgba(0, 234, 107, 0.14) !important;
  box-shadow: inset 0 0 0 1px rgba(0, 234, 107, 0.22) !important;
}

body.dark .btn-ghost,
body.dark .btn-outline,
body.dark .btn-secondary,
body.dark .veedesk-action-trigger {
  background: rgba(237, 242, 241, 0.08) !important;
  border-color: rgba(237, 242, 241, 0.14) !important;
  color: #edf2f1 !important;
}

body.dark .btn-primary,
body.dark button.btn-primary {
  box-shadow: 0 16px 42px rgba(0, 234, 107, 0.18) !important;
}

/* Veedesk enterprise refinement: consistent professional surfaces */
body {
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

.layout,
.content {
  background:
    radial-gradient(circle at 8% 0%, rgba(0, 234, 107, 0.08), transparent 24rem),
    var(--bg-page) !important;
}

.sidebar {
  border-right: 1px solid var(--border) !important;
}

.sidebar-logo {
  min-height: 84px !important;
}

.sidebar-logo-wide {
  width: 166px !important;
  max-height: 52px !important;
  padding: 8px 11px !important;
  border-radius: 16px !important;
}

.topbar {
  min-height: 68px !important;
  border-bottom: 1px solid var(--border) !important;
}

.card,
.stat-card,
.chart-container,
.table-wrap,
.modal-content,
.login-box {
  border-radius: 20px !important;
}

.card,
.stat-card,
.chart-container,
.table-wrap {
  box-shadow:
    0 12px 34px rgba(17, 42, 36, 0.065),
    inset 0 1px 0 rgba(255, 255, 255, 0.62) !important;
}

.page-heading,
.card-title,
.chart-title,
.topbar-title,
.modal-title {
  letter-spacing: -0.035em !important;
}

.page-sub,
.sub-message,
.text-muted,
.helper-text {
  line-height: 1.6 !important;
}

.btn {
  border-radius: 12px !important;
  font-weight: 700 !important;
}

.btn-primary,
button.btn-primary {
  box-shadow: 0 10px 24px rgba(17, 42, 36, 0.12) !important;
}

.nav-section {
  margin-top: 8px !important;
}

.nav-label {
  padding: 13px 18px 8px !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  color: var(--text-3) !important;
}

.nav-item {
  min-height: 42px !important;
  padding: 10px 12px !important;
  font-weight: 650 !important;
}

.nav-item .icon {
  width: 30px !important;
  height: 30px !important;
  display: inline-grid !important;
  place-items: center !important;
  border-radius: 10px !important;
  background: rgba(0, 234, 107, 0.11) !important;
}

table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

table thead th {
  font-size: 0.76rem !important;
  letter-spacing: 0.035em !important;
  text-transform: uppercase !important;
}

table td,
table th {
  border-bottom-color: var(--border) !important;
}

body.dark .layout,
body.dark .content {
  background:
    radial-gradient(circle at 12% 0%, rgba(0, 234, 107, 0.12), transparent 26rem),
    radial-gradient(circle at 92% 10%, rgba(237, 242, 241, 0.06), transparent 26rem),
    #112a24 !important;
}

body.dark .sidebar,
body.dark .topbar,
body.dark .card,
body.dark .stat-card,
body.dark .chart-container,
body.dark .table-wrap,
body.dark .modal-content,
body.dark .login-box,
body.dark .veedesk-action-list {
  background: rgba(22, 52, 45, 0.72) !important;
  box-shadow:
    0 18px 56px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.075) !important;
}

body.dark .nav-label {
  color: #b8c9c4 !important;
}

body.dark .nav-item .icon {
  background: rgba(0, 234, 107, 0.12) !important;
  color: #00ea6b !important;
}

body.dark table tbody tr:hover td {
  background: rgba(0, 234, 107, 0.075) !important;
}

/* Veedesk final UI pass: professional sidebar hover + neutral dark mode */
.nav-item {
  position: relative !important;
  overflow: hidden !important;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease !important;
}

.nav-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: #00ea6b;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.nav-item:hover {
  background: rgba(17, 42, 36, 0.06) !important;
  transform: translateX(2px);
  box-shadow: inset 0 0 0 1px rgba(17, 42, 36, 0.055) !important;
}

.nav-item.active {
  background: rgba(0, 234, 107, 0.16) !important;
  color: #112a24 !important;
  box-shadow: inset 0 0 0 1px rgba(0, 234, 107, 0.24) !important;
}

.nav-item.active::before,
.nav-item:hover::before {
  opacity: 1;
}

.nav-item:hover .icon,
.nav-item.active .icon {
  background: #00ea6b !important;
  color: #112a24 !important;
}

body.dark {
  --bg-page: #0b1020;
  --bg: #0b1020;
  --bg-2: #111827;
  --white: rgba(15, 23, 42, 0.76);
  --text: #f8fafc;
  --text-2: #e2e8f0;
  --text-3: #cbd5e1;
  --border: rgba(226, 232, 240, 0.13);
  --primary: #00ea6b;
  --primary-dark: #00c95c;
  --primary-light: rgba(0, 234, 107, 0.12);
  background:
    radial-gradient(circle at 10% -8%, rgba(0, 234, 107, 0.13), transparent 30rem),
    radial-gradient(circle at 88% 0%, rgba(148, 163, 184, 0.1), transparent 28rem),
    linear-gradient(180deg, #0b1020, #111827 52%, #0b1020) !important;
}

body.dark .layout,
body.dark .content,
body.dark #login-overlay {
  background:
    radial-gradient(circle at 10% -8%, rgba(0, 234, 107, 0.12), transparent 30rem),
    radial-gradient(circle at 88% 0%, rgba(148, 163, 184, 0.1), transparent 28rem),
    #0b1020 !important;
}

body.dark .sidebar,
body.dark .topbar,
body.dark .card,
body.dark .stat-card,
body.dark .chart-container,
body.dark .table-wrap,
body.dark .modal-content,
body.dark .login-box,
body.dark .veedesk-action-list {
  background: rgba(15, 23, 42, 0.74) !important;
  border-color: rgba(226, 232, 240, 0.13) !important;
  box-shadow:
    0 22px 70px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.075) !important;
}

body.dark input,
body.dark select,
body.dark textarea,
body.dark .search-input,
body.dark .filter-select,
body.dark .veedesk-action-trigger {
  background: rgba(15, 23, 42, 0.82) !important;
  border-color: rgba(226, 232, 240, 0.14) !important;
  color: #f8fafc !important;
}

body.dark table thead th {
  background: rgba(30, 41, 59, 0.92) !important;
  color: #e2e8f0 !important;
}

body.dark .nav-item {
  color: #dbe6ee !important;
}

body.dark .nav-item:hover {
  background: rgba(30, 41, 59, 0.82) !important;
  box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.09) !important;
}

body.dark .nav-item.active {
  background: rgba(0, 234, 107, 0.13) !important;
  color: #f8fafc !important;
  box-shadow: inset 0 0 0 1px rgba(0, 234, 107, 0.26) !important;
}

body.dark .nav-item:hover .icon,
body.dark .nav-item.active .icon {
  background: #00ea6b !important;
  color: #0b1020 !important;
}

body.dark .sidebar-logo-wide {
  background: transparent !important;
  border-color: transparent !important;
}

/* Centered branded login throbber + simplified sidebar hover */
.veedesk-login-loader-page {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  background: #ffffff;
}

.veedesk-login-loader-page.active {
  display: flex;
}

.veedesk-login-loader-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 28px 34px;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.veedesk-login-throbber {
  --throbber-green: #178A5E;
  --throbber-mint: #C9F0DC;
  --throbber-ink: #16181A;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  line-height: 1;
}

.veedesk-throbber-icon {
  width: 58px;
  height: 58px;
  border-radius: 15px;
  background: var(--throbber-green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 34px -18px rgba(23, 138, 94, 0.7);
  animation: veedeskIconCycle 4.2s cubic-bezier(.34, 1.56, .64, 1) infinite;
}

.veedesk-throbber-icon svg {
  width: 26px;
  height: 26px;
  display: block;
}

.veedesk-throbber-page {
  fill: #ffffff;
}

.veedesk-throbber-fold {
  fill: var(--throbber-mint);
}

.veedesk-throbber-dash {
  fill: var(--throbber-green);
  transform-origin: center;
  animation: veedeskDashPulse 1.8s ease-in-out infinite;
  animation-delay: 1.1s;
}

.veedesk-throbber-type-row {
  display: inline-flex;
  align-items: baseline;
  min-width: 176px;
}

.veedesk-throbber-word {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  width: 0;
  font-size: 40px;
  font-weight: 500;
  letter-spacing: -0.35px;
  color: var(--throbber-ink);
  animation: veedeskWordCycle 4.2s steps(7, end) infinite;
}

.veedesk-throbber-cursor {
  width: 3px;
  height: 34px;
  margin-left: 4px;
  border-radius: 2px;
  background: var(--throbber-green);
  opacity: 0.95;
  animation: veedeskCursorBlink 0.85s step-end infinite;
}

.veedesk-loader-caption {
  color: #5f6f68;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.005em;
}

@keyframes veedeskIconCycle {

  0%,
  6% {
    opacity: 0;
    transform: scale(.7) rotate(-8deg);
  }

  20%,
  92% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }

  100% {
    opacity: 0;
    transform: scale(.9) rotate(0deg);
  }
}

@keyframes veedeskDashPulse {

  0%,
  100% {
    transform: scaleX(1);
    opacity: 1;
  }

  50% {
    transform: scaleX(1.4);
    opacity: .6;
  }
}

@keyframes veedeskWordCycle {

  0%,
  20% {
    width: 0;
  }

  48%,
  82% {
    width: 7ch;
  }

  100% {
    width: 0;
  }
}

@keyframes veedeskCursorBlink {
  50% {
    opacity: 0;
  }
}

#login-submit-btn {
  min-height: 46px;
}

#login-submit-btn.is-loading {
  cursor: wait;
  opacity: 0.92;
}

#login-submit-btn:disabled,
.password-toggle:disabled,
#auth-email:disabled,
#auth-password:disabled {
  cursor: wait !important;
}

.nav-item {
  transform: none !important;
  box-shadow: none !important;
}

.nav-item::before {
  display: none !important;
}

.nav-item:hover {
  transform: none !important;
  background: rgba(17, 42, 36, 0.055) !important;
  box-shadow: none !important;
}

.nav-item.active {
  background: rgba(0, 234, 107, 0.14) !important;
  box-shadow: inset 0 0 0 1px rgba(0, 234, 107, 0.2) !important;
}

.nav-item:hover .icon {
  background: rgba(0, 234, 107, 0.16) !important;
  color: #112a24 !important;
}

.nav-item.active .icon {
  background: #00ea6b !important;
  color: #112a24 !important;
}

body.dark .nav-item:hover {
  background: rgba(148, 163, 184, 0.1) !important;
  box-shadow: none !important;
}

body.dark .nav-item.active {
  background: rgba(0, 234, 107, 0.12) !important;
  box-shadow: inset 0 0 0 1px rgba(0, 234, 107, 0.22) !important;
}

body.dark .nav-item:hover .icon {
  background: rgba(0, 234, 107, 0.16) !important;
  color: #00ea6b !important;
}

/* Mobile responsiveness final layer */
@media (max-width: 900px) {
  :root {
    --sidebar-w: min(86vw, 320px);
  }

  html,
  body {
    overflow-x: hidden;
  }

  .layout {
    min-width: 0 !important;
  }

  .sidebar {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    width: var(--sidebar-w) !important;
    max-width: var(--sidebar-w) !important;
    transform: translateX(-105%) !important;
    z-index: 1000 !important;
    transition: transform 0.22s ease !important;
  }

  .sidebar.open {
    transform: translateX(0) !important;
  }

  .content {
    width: 100% !important;
    margin-left: 0 !important;
    min-width: 0 !important;
  }

  .hamburger {
    display: inline-flex !important;
  }

  .topbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 800 !important;
    min-height: 58px !important;
    padding: 10px 12px !important;
    gap: 10px !important;
  }

  .topbar-title {
    min-width: 0 !important;
    font-size: 1rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .topbar-right {
    gap: 6px !important;
    flex-wrap: wrap !important;
    justify-content: flex-end !important;
  }

  #today-date {
    display: none !important;
  }

  .page-inner {
    padding: 14px 12px 72px !important;
    max-width: 100% !important;
  }

  .page-heading {
    font-size: 1.25rem !important;
    line-height: 1.2 !important;
  }

  .page-sub {
    font-size: 0.84rem !important;
    margin-bottom: 14px !important;
  }

  .search-row,
  .flex-between {
    align-items: stretch !important;
    flex-direction: column !important;
    gap: 10px !important;
  }

  .search-wrap,
  .search-input,
  .filter-select,
  .search-row select,
  .search-row button,
  .flex-between button {
    width: 100% !important;
    max-width: none !important;
  }

  .form-grid,
  .invoice-type-grid,
  .settings-grid,
  .accounts-grid,
  .stats-grid,
  .dash-grid {
    grid-template-columns: 1fr !important;
  }

  .card,
  .stat-card,
  .chart-container,
  .table-wrap,
  .modal-content,
  .login-box {
    border-radius: 16px !important;
  }

  .table-wrap {
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .table-wrap table {
    min-width: 760px !important;
  }

  .modal {
    width: min(94vw, 560px) !important;
    max-height: 88vh !important;
    overflow-y: auto !important;
  }

  .modal-sm {
    width: min(94vw, 420px) !important;
  }

  .btn-group {
    flex-wrap: wrap !important;
  }
}

@media (max-width: 520px) {
  .topbar {
    align-items: flex-start !important;
  }

  .topbar-right .btn {
    padding: 8px 10px !important;
    font-size: 0.78rem !important;
  }

  .stats-grid {
    grid-template-columns: 1fr !important;
  }

  .stat-card {
    min-height: auto !important;
  }

  .card,
  .chart-container {
    padding: 14px !important;
  }

  .table-wrap table {
    min-width: 680px !important;
  }

  .login-box {
    width: min(92vw, 380px) !important;
    padding: 24px !important;
  }
}

/* Final print hardening: safe margins + A4/A5/Thermal invoice output */
@media print {
  @page {
    size: A4 portrait;
    margin: 6mm;
  }

  html,
  body {
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    background: #ffffff !important;
  }

  body,
  .modal-overlay.open,
  .modal {
    padding: 0 !important;
    margin: 0 !important;
  }

  .modal-overlay.open,
  .modal {
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    background: transparent !important;
  }

  #print-zone,
  .invoice-sheet,
  .tax-invoice-sheet {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: auto !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
    overflow: visible !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    background: #ffffff !important;
  }

  #print-zone {
    padding: 5mm !important;
  }

  #print-zone.tax-invoice-sheet,
  .tax-invoice-sheet {
    padding: 3mm !important;
    transform: none !important;
    font-size: 9.4px !important;
  }

  .tax-outer {
    border-width: 1px !important;
  }

  .tax-items-table th,
  .tax-items-table td,
  .tax-company-row,
  .tax-info-grid,
  .tax-customer,
  .tax-notes-area {
    border-width: 1px !important;
  }

  body.print-a5 #print-zone,
  body.print-a5 .invoice-sheet {
    padding: 4mm !important;
  }

  body.print-a5 #print-zone.tax-invoice-sheet,
  body.print-a5 .tax-invoice-sheet {
    padding: 2.5mm !important;
    font-size: 8px !important;
  }

  body.print-a5 .tax-logo-box img {
    width: 26mm !important;
  }

  body.print-a5 .tax-company-name {
    font-size: 12px !important;
  }

  body.print-a5 .tax-items-table th,
  body.print-a5 .tax-items-table td {
    padding: 1mm 0.8mm !important;
  }

  body.print-thermal {
    width: var(--thermal-paper-width, 3in) !important;
  }

  body.print-thermal #print-zone,
  body.print-thermal .invoice-sheet,
  body.print-thermal .tax-invoice-sheet {
    width: var(--thermal-paper-width, 3in) !important;
    max-width: var(--thermal-paper-width, 3in) !important;
    margin: 0 !important;
    padding: 2mm !important;
    font-size: 9px !important;
    line-height: 1.25 !important;
    page-break-inside: auto !important;
    break-inside: auto !important;
  }

  body.print-thermal .inv-header,
  body.print-thermal .inv-meta,
  body.print-thermal .inv-cust-box,
  body.print-thermal .inv-totals,
  body.print-thermal .inv-pay-reminder,
  body.print-thermal .inv-footer,
  body.print-thermal .inv-signatures {
    margin-top: 5px !important;
    margin-bottom: 5px !important;
    padding: 4px !important;
  }

  body.print-thermal .inv-header,
  body.print-thermal .tax-company-row,
  body.print-thermal .tax-info-grid,
  body.print-thermal .tax-bottom-grid,
  body.print-thermal .tax-footer-grid {
    display: block !important;
  }

  body.print-thermal .inv-shop-name img,
  body.print-thermal .tax-logo-box img {
    width: 42mm !important;
    max-height: 18mm !important;
  }

  body.print-thermal table,
  body.print-thermal thead,
  body.print-thermal tbody,
  body.print-thermal tr,
  body.print-thermal th,
  body.print-thermal td {
    font-size: 8px !important;
    padding: 2px !important;
    overflow-wrap: anywhere !important;
  }

  body.print-thermal .tax-company-name {
    font-size: 11px !important;
  }

  body.print-thermal .tax-items-table th:nth-child(1),
  body.print-thermal .tax-items-table td:nth-child(1) {
    width: 6mm !important;
  }

  body.print-thermal .tax-items-table th:nth-child(2),
  body.print-thermal .tax-items-table td:nth-child(2) {
    width: 12mm !important;
  }

  body.print-thermal .tax-items-table th:nth-child(4),
  body.print-thermal .tax-items-table td:nth-child(4) {
    display: none !important;
  }

  body.print-thermal .tax-signature-row {
    display: none !important;
  }
}

/* Final invoice theme overrides */
.invoice-sheet {
  --invoice-accent: #00684a;
}

.regular-invoice-sheet.invoice-theme-regular-classic {
  border: 1px solid #d7e2ea !important;
  border-radius: 10px !important;
}

.regular-invoice-sheet.invoice-theme-regular-modern {
  border-top: 8px solid var(--invoice-accent) !important;
  border-radius: 18px !important;
}

.regular-invoice-sheet.invoice-theme-regular-modern .inv-header {
  background: color-mix(in srgb, var(--invoice-accent) 10%, #ffffff) !important;
  border-radius: 14px !important;
  padding: 16px !important;
}

.regular-invoice-sheet.invoice-theme-regular-compact {
  padding: 22px 26px !important;
  font-size: 0.86rem !important;
}

.regular-invoice-sheet.invoice-theme-regular-compact .inv-header,
.regular-invoice-sheet.invoice-theme-regular-compact .inv-cust-box,
.regular-invoice-sheet.invoice-theme-regular-compact .inv-totals,
.regular-invoice-sheet.invoice-theme-regular-compact .inv-footer {
  margin-top: 8px !important;
  margin-bottom: 8px !important;
  padding: 8px !important;
}

.regular-invoice-sheet.invoice-theme-regular-minimal {
  box-shadow: none !important;
  border: 1px solid #cbd5e1 !important;
}

.regular-invoice-sheet.invoice-theme-regular-minimal .inv-header,
.regular-invoice-sheet.invoice-theme-regular-minimal .inv-cust-box,
.regular-invoice-sheet.invoice-theme-regular-minimal .inv-totals {
  background: #fff !important;
  border-style: dashed !important;
}

.regular-invoice-sheet.invoice-theme-regular-premium {
  border: 1px solid #112a24 !important;
  border-top: 12px solid #112a24 !important;
}

.regular-invoice-sheet.invoice-theme-regular-premium .inv-meta,
.regular-invoice-sheet.invoice-theme-regular-premium .inv-total-row.grand {
  background: #112a24 !important;
  color: #fff !important;
}

.regular-invoice-sheet.invoice-theme-regular-premium .inv-meta *,
.regular-invoice-sheet.invoice-theme-regular-premium .inv-total-row.grand * {
  color: #fff !important;
}

.regular-invoice-sheet.invoice-theme-regular-ledger .inv-table {
  border-collapse: collapse !important;
}

.regular-invoice-sheet.invoice-theme-regular-ledger .inv-table th,
.regular-invoice-sheet.invoice-theme-regular-ledger .inv-table td {
  border: 1px solid #94a3b8 !important;
}

.regular-invoice-sheet.invoice-theme-regular-ledger .inv-table th {
  background: #e8f0ec !important;
}

.tax-invoice-sheet.invoice-theme-tax-classic .tax-title {
  letter-spacing: 0.3px !important;
}

.tax-invoice-sheet.invoice-theme-tax-bordered .tax-outer,
.tax-invoice-sheet.invoice-theme-tax-bordered .tax-company-row,
.tax-invoice-sheet.invoice-theme-tax-bordered .tax-info-grid,
.tax-invoice-sheet.invoice-theme-tax-bordered .tax-items-table th,
.tax-invoice-sheet.invoice-theme-tax-bordered .tax-items-table td {
  border-color: #000 !important;
  border-width: 1.8px !important;
}

.tax-invoice-sheet.invoice-theme-tax-green .tax-title,
.tax-invoice-sheet.invoice-theme-tax-green .tax-company-name {
  color: var(--invoice-accent) !important;
}

.tax-invoice-sheet.invoice-theme-tax-green .tax-outer,
.tax-invoice-sheet.invoice-theme-tax-green .tax-company-row,
.tax-invoice-sheet.invoice-theme-tax-green .tax-info-grid {
  border-color: var(--invoice-accent) !important;
}

.tax-invoice-sheet.invoice-theme-tax-compact {
  padding: 8mm !important;
  font-size: 9px !important;
}

.tax-invoice-sheet.invoice-theme-tax-compact .tax-items-table tbody tr {
  height: 8mm !important;
}

.tax-invoice-sheet.invoice-theme-tax-premium .tax-company-row {
  background: color-mix(in srgb, var(--invoice-accent) 12%, #ffffff) !important;
}

.tax-invoice-sheet.invoice-theme-tax-premium .tax-company-name {
  letter-spacing: 0.9px !important;
  color: #112a24 !important;
}

.tax-invoice-sheet.invoice-theme-tax-official {
  font-family: "Times New Roman", Times, serif !important;
}

.tax-invoice-sheet.invoice-theme-tax-official .tax-title {
  text-decoration: underline !important;
  font-size: 13px !important;
}

.invoice-preview-thermal {
  width: 3in !important;
  max-width: 3in !important;
  min-height: auto !important;
  padding: 10px !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace !important;
  font-size: 10px !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18) !important;
}

.invoice-preview-thermal .inv-header,
.invoice-preview-thermal .tax-company-row,
.invoice-preview-thermal .tax-info-grid,
.invoice-preview-thermal .tax-bottom-grid,
.invoice-preview-thermal .tax-footer-grid {
  display: block !important;
}

.invoice-preview-thermal .inv-shop-name img,
.invoice-preview-thermal .tax-logo-box img {
  width: 42mm !important;
  max-height: 18mm !important;
}

.invoice-preview-thermal.invoice-theme-thermal-bold {
  border: 2px solid var(--invoice-accent) !important;
  font-weight: 800 !important;
}

.invoice-preview-thermal.invoice-theme-thermal-detailed {
  font-size: 9px !important;
}

body.print-thermal.invoice-theme-thermal-bold .invoice-sheet,
body.print-thermal.invoice-theme-thermal-bold .tax-invoice-sheet {
  border-top: 2px solid var(--invoice-accent) !important;
  font-weight: 800 !important;
}

body.print-thermal.invoice-theme-thermal-detailed .invoice-sheet,
body.print-thermal.invoice-theme-thermal-detailed .tax-invoice-sheet {
  font-size: 8.8px !important;
}

.thermal-print-sheet {
  width: min(var(--thermal-paper-width, 3in), calc(100vw - 4mm)) !important;
  max-width: var(--thermal-paper-width, 3in) !important;
  min-height: auto !important;
  margin: 0 auto !important;
  padding: 3mm 2.6mm !important;
  box-sizing: border-box !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #111 !important;
  background: #fff !important;
  font-family: "Arial Black", "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, monospace !important;
  font-size: 10.4px !important;
  font-weight: 750 !important;
  line-height: 1.34 !important;
  letter-spacing: -0.1px !important;
  overflow-wrap: anywhere !important;
}

.thermal-print-sheet .thermal-shop,
.invoice-theme-sample-thermal .thermal-shop {
  color: #111 !important;
  font-weight: 900 !important;
}

.thermal-print-sheet .thermal-line,
.invoice-theme-sample-thermal .thermal-line {
  border-color: #111 !important;
}

.thermal-item-row {
  align-items: flex-start;
}

.thermal-item-row span {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 48mm;
}

.thermal-item-row small {
  color: #333;
  font-size: 8.8px;
  font-weight: 800;
}

.thermal-print-sheet .thermal-row,
.thermal-print-sheet .thermal-row strong,
.thermal-print-sheet .thermal-total,
.thermal-print-sheet .thermal-shop-meta,
.thermal-print-sheet .thermal-generated {
  font-weight: 800 !important;
}

.thermal-print-sheet.invoice-theme-thermal-bold,
.invoice-theme-sample-thermal.invoice-theme-thermal-bold {
  border: 2px solid #111 !important;
  font-weight: 900 !important;
}

.thermal-print-sheet.invoice-theme-thermal-detailed,
.invoice-theme-sample-thermal.invoice-theme-thermal-detailed {
  font-size: 9.8px !important;
}

body.print-thermal #print-zone.thermal-print-sheet {
  width: 100% !important;
  max-width: var(--thermal-paper-width, 3in) !important;
  padding: 2.4mm 2.2mm !important;
  page-break-inside: auto !important;
  break-inside: auto !important;
}

@media print {
  body.print-thermal {
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    background: #fff !important;
  }

  body.print-thermal #invoice-content {
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
  }

  body.print-thermal #print-zone.thermal-print-sheet {
    width: var(--thermal-paper-width, 3in) !important;
    max-width: var(--thermal-paper-width, 3in) !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 2.2mm 2mm !important;
    font-size: 10.8px !important;
    font-weight: 850 !important;
    line-height: 1.30 !important;
    box-shadow: none !important;
    border: 0 !important;
    transform: none !important;
    animation: none !important;
    clip-path: none !important;
  }

  body.print-thermal #print-zone.thermal-print-sheet,
  body.print-thermal #print-zone.thermal-print-sheet * {
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body.print-thermal .thermal-logo-wrap img {
    width: 34mm !important;
    max-width: 80% !important;
    max-height: 13mm !important;
  }

  body.print-thermal .thermal-shop {
    font-size: 13px !important;
    line-height: 1.16 !important;
  }

  body.print-thermal .thermal-shop-meta {
    font-size: 8.6px !important;
    line-height: 1.2 !important;
  }

  body.print-thermal .thermal-generated {
    font-size: 8px !important;
  }

  body.print-thermal .thermal-row {
    gap: 6px !important;
  }

  body.print-thermal .thermal-row>span {
    min-width: 0 !important;
    max-width: 52mm !important;
  }

  body.print-thermal .thermal-row>strong {
    flex: 0 0 auto !important;
    text-align: right !important;
    white-space: nowrap !important;
  }

  body.print-thermal .thermal-total {
    font-size: 11.6px !important;
  }

  body.print-thermal .invoice-theme-thermal-bold.thermal-print-sheet {
    border: 1.2px solid #111 !important;
    padding: 2mm !important;
  }

  body.print-thermal .invoice-theme-thermal-detailed.thermal-print-sheet {
    font-size: 10px !important;
  }
}

@media print and (max-width: 62mm) {
  body.print-thermal #print-zone.thermal-print-sheet {
    width: 100vw !important;
    max-width: 2.14in !important;
    padding: 1.8mm !important;
    font-size: 8.6px !important;
    line-height: 1.2 !important;
  }

  body.print-thermal .thermal-logo-wrap img {
    width: 26mm !important;
    max-height: 10mm !important;
  }

  body.print-thermal .thermal-shop {
    font-size: 10px !important;
  }

  body.print-thermal .thermal-shop-meta,
  body.print-thermal .thermal-generated,
  body.print-thermal .thermal-item-row small {
    font-size: 7px !important;
  }

  body.print-thermal .thermal-row {
    gap: 3px !important;
  }

  body.print-thermal .thermal-row>span {
    max-width: 33mm !important;
  }

  body.print-thermal .thermal-total {
    font-size: 9.2px !important;
  }
}

/* Service workspace component polish */
body[data-app-entry="service"] .service-login-box {
  border-color: rgba(0, 104, 74, 0.16);
  background:
    radial-gradient(circle at 92% 0%, rgba(0, 234, 107, 0.14), transparent 12rem),
    var(--surface);
}

body[data-app-entry="service"] .service-login-note {
  display: block;
  margin-top: 12px;
  color: var(--text-3);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
}

body[data-app-entry="service"] .service-sidebar .nav-label span,
body[data-app-entry="service"] .service-sidebar .nav-item span:last-child {
  letter-spacing: -0.01em;
}

body[data-app-entry="service"] .service-sidebar .nav-item.active .icon,
body[data-app-entry="service"] .service-sidebar .nav-item:hover .icon {
  color: #061621;
  background: #00ed64;
}

body[data-app-entry="service"] .service-layout .topbar-title::before {
  content: "Service";
  display: inline-flex;
  margin-right: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 237, 100, 0.14);
  color: rgb(0, 104, 74);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

body[data-app-entry="service"] .service-job-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

body[data-app-entry="service"] .service-job-board article,
body[data-app-entry="service"] .service-job-panel {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

body[data-app-entry="service"] .service-job-board article {
  padding: 18px;
}

body[data-app-entry="service"] .service-stage-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  border-radius: 14px;
  background: rgba(0, 237, 100, 0.14);
  color: rgb(0, 104, 74);
}

body[data-app-entry="service"] .service-job-board h3 {
  margin: 0 0 8px;
  color: var(--text-1);
  font-size: 0.98rem;
}

body[data-app-entry="service"] .service-job-board p {
  margin: 0 0 12px;
  color: var(--text-2);
  font-size: 0.84rem;
  line-height: 1.55;
}

body[data-app-entry="service"] .service-job-board strong {
  color: var(--text-1);
  font-size: 0.82rem;
}

body[data-app-entry="service"] .service-job-panel {
  padding: 18px;
}

body[data-app-entry="service"] .service-job-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

body[data-app-entry="service"] .service-job-steps span {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-2);
  color: var(--text-2);
  font-size: 0.84rem;
  font-weight: 700;
}

body[data-app-entry="service"] .service-job-steps b {
  display: grid;
  place-items: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #00ed64;
  color: #061621;
}

body[data-app-entry="service"] .service-tracking-board,
body[data-app-entry="service"] .service-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

body[data-app-entry="service"] .service-feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body[data-app-entry="service"] .service-tracking-board section,
body[data-app-entry="service"] .service-feature-grid article,
body[data-app-entry="service"] .service-focus-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(0, 237, 100, 0.08), transparent 10rem),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

body[data-app-entry="service"] .service-tracking-board section,
body[data-app-entry="service"] .service-feature-grid article {
  padding: 18px;
}

body[data-app-entry="service"] .service-tracking-board h3,
body[data-app-entry="service"] .service-feature-grid h3 {
  margin: 0 0 8px;
  color: var(--text-1);
  font-size: 1rem;
}

body[data-app-entry="service"] .service-tracking-board p,
body[data-app-entry="service"] .service-feature-grid p {
  margin: 0 0 10px;
  color: var(--text-2);
  font-size: 0.84rem;
  line-height: 1.58;
}

body[data-app-entry="service"] .service-tracking-board span {
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 800;
}

body[data-app-entry="service"] .service-feature-grid i {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  border-radius: 14px;
  background: rgba(0, 237, 100, 0.14);
  color: rgb(0, 104, 74);
}

@media (max-width: 1100px) {

  body[data-app-entry="service"] .service-job-board,
  body[data-app-entry="service"] .service-job-steps,
  body[data-app-entry="service"] .service-tracking-board,
  body[data-app-entry="service"] .service-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {

  body[data-app-entry="service"] .service-job-board,
  body[data-app-entry="service"] .service-job-steps,
  body[data-app-entry="service"] .service-tracking-board,
  body[data-app-entry="service"] .service-feature-grid {
    grid-template-columns: 1fr;
  }
}

/* v94: bills, invoices, quotations and receipts must stay light/readable in dark mode */
body.dark #invoice-content,
body.dark #estimate-modal-content,
body.dark .invoice-theme-preview-stage {
  color-scheme: light !important;
}

body.dark #print-zone,
body.dark .invoice-sheet,
body.dark .regular-invoice-sheet,
body.dark .tax-invoice-sheet,
body.dark .thermal-print-sheet,
body.dark .invoice-theme-sample,
body.dark .invoice-theme-sample-thermal,
body.dark .invoice-theme-preview-stage .invoice-sheet,
body.dark .invoice-theme-preview-stage .tax-invoice-sheet,
body.dark .invoice-theme-preview-stage .invoice-theme-sample-thermal {
  color-scheme: light !important;
  --white: #ffffff !important;
  --bg: #ffffff !important;
  --bg-2: #f8fafc !important;
  --bg-page: #ffffff !important;
  --text: #0f172a !important;
  --text-2: #334155 !important;
  --text-3: #64748b !important;
  --border: #e2e8f0 !important;
  --border-2: #cbd5e1 !important;
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #e2e8f0 !important;
}

body.dark #print-zone *,
body.dark .invoice-sheet *,
body.dark .regular-invoice-sheet *,
body.dark .tax-invoice-sheet *,
body.dark .thermal-print-sheet *,
body.dark .invoice-theme-sample *,
body.dark .invoice-theme-sample-thermal *,
body.dark .invoice-theme-preview-stage .invoice-sheet *,
body.dark .invoice-theme-preview-stage .tax-invoice-sheet *,
body.dark .invoice-theme-preview-stage .invoice-theme-sample-thermal * {
  color: #0f172a !important;
  text-shadow: none !important;
}

body.dark #print-zone table,
body.dark #print-zone thead,
body.dark #print-zone tbody,
body.dark #print-zone tr,
body.dark #print-zone th,
body.dark #print-zone td,
body.dark .invoice-sheet table,
body.dark .invoice-sheet thead,
body.dark .invoice-sheet tbody,
body.dark .invoice-sheet tr,
body.dark .invoice-sheet th,
body.dark .invoice-sheet td,
body.dark .regular-invoice-sheet table,
body.dark .regular-invoice-sheet th,
body.dark .regular-invoice-sheet td,
body.dark .tax-invoice-sheet table,
body.dark .tax-invoice-sheet th,
body.dark .tax-invoice-sheet td,
body.dark .thermal-print-sheet table,
body.dark .thermal-print-sheet th,
body.dark .thermal-print-sheet td {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

body.dark #print-zone thead th,
body.dark .invoice-sheet thead th,
body.dark .regular-invoice-sheet thead th,
body.dark .tax-invoice-sheet thead th {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

body.dark .tax-invoice-sheet,
body.dark .tax-invoice-sheet *,
body.dark .tax-invoice-sheet table,
body.dark .tax-invoice-sheet th,
body.dark .tax-invoice-sheet td,
body.dark .tax-invoice-sheet .tax-outer,
body.dark .tax-invoice-sheet .tax-company-row,
body.dark .tax-invoice-sheet .tax-logo-box,
body.dark .tax-invoice-sheet .tax-info-grid,
body.dark .tax-invoice-sheet .tax-customer,
body.dark .tax-invoice-sheet .tax-meta-table>div,
body.dark .tax-invoice-sheet .tax-bottom-grid,
body.dark .tax-invoice-sheet .tax-total-box,
body.dark .tax-invoice-sheet .tax-words,
body.dark .tax-invoice-sheet .tax-footer-grid,
body.dark .tax-invoice-sheet .tax-signature-row {
  background: #ffffff !important;
  color: #000000 !important;
  border-color: #000000 !important;
}

body.dark .thermal-print-sheet,
body.dark .thermal-print-sheet *,
body.dark .invoice-theme-sample-thermal,
body.dark .invoice-theme-sample-thermal * {
  background: #ffffff !important;
  color: #111111 !important;
  border-color: #222222 !important;
}

body.dark .inv-shop-sub,
body.dark .inv-generated-by,
body.dark .inv-footer,
body.dark .thermal-muted,
body.dark .thermal-generated {
  color: #64748b !important;
}

body.dark .inv-total-row.grand,
body.dark .inv-total-row.bal,
body.dark .inv-grand,
body.dark .thermal-total {
  background: #f8fafc !important;
  color: #0f172a !important;
}

/* v96: final dark-mode readability for settings, cards, forms and menus */
body.dark .settings-card,
body.dark .settings-section,
body.dark .dashboard-widget-config-card,
body.dark .dashboard-widget-option,
body.dark .invoice-theme-card,
body.dark .invoice-theme-color-card,
body.dark .invoice-theme-option,
body.dark .topbar-account-dropdown,
body.dark .empty-state,
body.dark .info-row {
  background: #102a30 !important;
  border-color: #2e5960 !important;
  color: #f8f4ea !important;
}

body.dark .settings-card *,
body.dark .settings-section *,
body.dark .dashboard-widget-config-card *,
body.dark .dashboard-widget-option *,
body.dark .invoice-theme-card *,
body.dark .invoice-theme-color-card *,
body.dark .invoice-theme-option *,
body.dark .topbar-account-dropdown *,
body.dark .empty-state *,
body.dark .info-row *,
body.dark .page-sub,
body.dark .sub-message,
body.dark .form-label,
body.dark label,
body.dark small,
body.dark .text-muted,
body.dark .helper-text,
body.dark .muted,
body.dark .table-note,
body.dark .sidebar-user-role,
body.dark #today-date {
  color: #d8e3df !important;
  -webkit-text-fill-color: #d8e3df !important;
}

body.dark .settings-card h1,
body.dark .settings-card h2,
body.dark .settings-card h3,
body.dark .settings-card h4,
body.dark .settings-card strong,
body.dark .settings-section h1,
body.dark .settings-section h2,
body.dark .settings-section h3,
body.dark .settings-section h4,
body.dark .settings-section strong,
body.dark .dashboard-widget-option strong,
body.dark .invoice-theme-option strong,
body.dark .topbar-account-dropdown strong {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

body.dark input,
body.dark select,
body.dark textarea,
body.dark .search-input,
body.dark .filter-select {
  background: #0b2026 !important;
  border-color: #315d64 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

body.dark input::placeholder,
body.dark textarea::placeholder,
body.dark .search-input::placeholder {
  color: #9fb1ad !important;
  -webkit-text-fill-color: #9fb1ad !important;
}

.thermal-size-fields {
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2, #f8fafc);
  color: var(--text-2);
  font-size: 0.78rem;
  font-weight: 700;
}

.thermal-size-fields label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  white-space: nowrap;
}

.thermal-size-fields input {
  width: 58px;
  min-height: 30px;
  padding: 4px 6px;
  border-radius: 8px;
  text-align: center;
  font-weight: 800;
}

body.dark .modal,
body.dark .btn-group,
body.dark .thermal-size-fields,
body.dark .topbar-account-dropdown,
body.dark .veedesk-action-list,
body.dark .sidebar-footer {
  background: #102a30 !important;
  border-color: #2e5960 !important;
  color: #f8f4ea !important;
}

body.dark .modal>.no-print,
body.dark .modal .btn-group *,
body.dark .thermal-size-fields *,
body.dark .topbar-account-dropdown *,
body.dark .veedesk-action-list *,
body.dark .sidebar-footer * {
  color: #eef7f3 !important;
  -webkit-text-fill-color: #eef7f3 !important;
}

body.dark .thermal-size-fields input {
  background: #071b20 !important;
  border-color: #3a6870 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.vd-barcode {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 5px 6px;
  border: 1px solid #d8e2df;
  border-radius: 8px;
  background: #ffffff;
  color: #111111;
  line-height: 1;
}

.vd-barcode-bars {
  display: flex;
  align-items: stretch;
  height: 42px;
  max-width: 190px;
  overflow: hidden;
}

.vd-barcode .bar {
  display: block;
  height: 100%;
  background: #111111;
}

.vd-barcode .gap {
  display: block;
  height: 100%;
  background: #ffffff;
}

.vd-barcode .narrow {
  width: 1.4px;
}

.vd-barcode .wide {
  width: 4px;
}

.vd-barcode-text {
  color: #111111;
  font-family: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
}

.vd-barcode-mini {
  transform: scale(0.78);
  transform-origin: left center;
}

.barcode-scan-box {
  display: grid;
  grid-template-columns: auto minmax(190px, 320px) auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2, #f8fafc);
}

.barcode-scan-box i {
  color: var(--primary);
  font-size: 1.1rem;
}

.barcode-scan-box input {
  min-height: 38px;
  font-family: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.barcode-scan-box span {
  color: var(--text-3);
  font-size: 0.78rem;
  font-weight: 650;
}

body.dark .barcode-scan-box {
  background: #102a30 !important;
  border-color: #315d64 !important;
}

body.dark .barcode-scan-box span {
  color: #d8e3df !important;
  -webkit-text-fill-color: #d8e3df !important;
}

@media (max-width: 760px) {
  .barcode-scan-box {
    grid-template-columns: auto 1fr;
  }

  .barcode-scan-box .btn,
  .barcode-scan-box span {
    grid-column: 1 / -1;
  }
}

.scanner-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.scanner-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 16px;
  align-items: start;
}

.scanner-camera-card {
  overflow: hidden;
}

.scanner-video-frame {
  position: relative;
  min-height: 340px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(0, 104, 74, 0.12), rgba(0, 234, 107, 0.08)),
    #061621;
  overflow: hidden;
}

.scanner-video-frame video {
  width: 100%;
  height: 100%;
  min-height: 340px;
  object-fit: cover;
  display: block;
}

.scanner-video-frame::before {
  content: "";
  position: absolute;
  inset: 38px;
  border: 2px solid rgba(0, 234, 107, 0.88);
  border-radius: 18px;
  box-shadow: 0 0 0 999px rgba(6, 22, 33, 0.34);
  pointer-events: none;
}

.scanner-line {
  position: absolute;
  left: 52px;
  right: 52px;
  top: 50%;
  height: 2px;
  background: #00ea6b;
  box-shadow: 0 0 18px rgba(0, 234, 107, 0.95);
  animation: scannerLineMove 2.2s ease-in-out infinite;
  pointer-events: none;
}

.scanner-auto-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 104, 74, 0.18);
  border-radius: 14px;
  background: rgba(0, 104, 74, 0.07);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 750;
}

.scanner-auto-status i {
  color: var(--primary);
}

@keyframes scannerLineMove {

  0%,
  100% {
    transform: translateY(-90px);
  }

  50% {
    transform: translateY(90px);
  }
}

.barcode-scanner-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.barcode-scanner-input-row input {
  min-height: 48px;
  font-family: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 850;
  letter-spacing: 0.06em;
}

.scanner-result-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2, #f8fafc);
  color: var(--text-2);
  font-weight: 700;
}

.scanner-result-card i {
  color: var(--primary);
  margin-top: 2px;
}

.scanner-result-card.is-success {
  background: #e8f8ef;
  border-color: rgba(0, 104, 74, 0.28);
  color: #00684a;
}

.scanner-recent-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.scanner-recent-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  font-size: 0.86rem;
  font-weight: 750;
}

.scanner-recent-item strong {
  font-family: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--primary);
}

body.dark .scanner-video-frame,
body.dark .scanner-result-card,
body.dark .scanner-recent-item {
  border-color: #315d64 !important;
}

body.dark .scanner-result-card,
body.dark .scanner-recent-item {
  background: #102a30 !important;
  color: #f8f4ea !important;
}

body.dark .scanner-result-card *,
body.dark .scanner-recent-item * {
  color: #f8f4ea !important;
  -webkit-text-fill-color: #f8f4ea !important;
}

@media (max-width: 920px) {

  .scanner-layout,
  .scanner-page-head,
  .barcode-scanner-input-row {
    grid-template-columns: 1fr;
  }

  .scanner-page-head {
    flex-direction: column;
  }
}

body.dark .vd-barcode,
body.dark .vd-barcode *,
body.dark .catalogue-page .vd-barcode,
body.dark .catalogue-page .vd-barcode * {
  color-scheme: light !important;
  -webkit-text-fill-color: initial !important;
}

.catalogue-page {
  min-height: 100vh;
  background: #edf2f1;
  color: #112a24;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.public-catalogue-page {
  background:
    radial-gradient(circle at 12% 8%, rgba(0, 234, 107, 0.16), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #edf2f1 100%);
}

.catalogue-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 42px;
}

.catalogue-header,
.catalogue-estimate-panel,
.catalogue-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(0, 104, 74, 0.12);
  border-radius: 24px;
  box-shadow: 0 24px 70px -48px rgba(17, 42, 36, 0.45);
}

.catalogue-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 22px;
  margin-bottom: 18px;
}

.public-catalogue-header {
  align-items: stretch;
}

.catalogue-public-badge {
  display: inline-flex;
  width: fit-content;
  margin-top: 14px;
  padding: 7px 11px;
  border-radius: 999px;
  background: #e7f8ef;
  color: #00684a;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.catalogue-contact-card {
  display: grid;
  align-content: center;
  gap: 8px;
  min-width: min(320px, 100%);
  padding: 16px;
  border: 1px solid rgba(0, 104, 74, 0.12);
  border-radius: 18px;
  background: #f8fbfa;
  color: #304841;
  font-size: 0.88rem;
  font-weight: 700;
}

.catalogue-contact-card span {
  display: block;
}

.catalogue-logo {
  width: 88px;
  max-height: 68px;
  object-fit: contain;
  height: auto;
  display: block;
}

.catalogue-header h1 {
  margin: 12px 0 6px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
  color: #112a24;
}

.catalogue-header p,
.catalogue-safe-note,
.catalogue-muted {
  color: #52645f;
  font-weight: 600;
}

.catalogue-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.catalogue-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}

.catalogue-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.catalogue-toolbar input {
  flex: 1;
  min-height: 46px;
  border: 1px solid rgba(0, 104, 74, 0.18);
  border-radius: 14px;
  padding: 0 14px;
  font: inherit;
  font-weight: 600;
}

.catalogue-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.catalogue-card {
  padding: 16px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.public-catalogue-card {
  min-height: 190px;
}

.catalogue-card h3 {
  margin: 0;
  color: #112a24;
  font-size: 1rem;
}

.catalogue-price {
  color: #00684a;
  font-size: 1.28rem;
  font-weight: 900;
}

.catalogue-stock {
  display: inline-flex;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: #e7f7ef;
  color: #00684a;
  font-size: 0.76rem;
  font-weight: 800;
}

.catalogue-stock.is-low {
  background: #fff4df;
  color: #9a5b00;
}

.catalogue-estimate-panel {
  position: sticky;
  top: 16px;
  padding: 18px;
}

.catalogue-panel-title {
  margin: 0 0 6px;
  color: #112a24;
}

.catalogue-estimate-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px dashed #d8e2df;
  font-weight: 700;
}

.catalogue-qty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.catalogue-qty button,
.catalogue-card button,
.catalogue-actions a,
.catalogue-actions button {
  border: 0;
  border-radius: 12px;
  background: #00684a;
  color: #ffffff;
  padding: 10px 13px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}

.catalogue-card-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.catalogue-qty button {
  width: 30px;
  height: 30px;
  padding: 0;
}

.catalogue-actions .secondary,
.catalogue-card .secondary {
  background: #ffffff;
  color: #00684a;
  border: 1px solid rgba(0, 104, 74, 0.22);
}

.catalogue-copy-btn {
  width: 100%;
  margin-top: 12px;
  border: 0;
  border-radius: 14px;
  background: #00684a;
  color: #ffffff;
  padding: 12px 14px;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.catalogue-admin-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin: 18px 0;
  padding: 24px;
  border: 1px solid rgba(0, 104, 74, 0.14);
  border-radius: 24px;
  background:
    radial-gradient(circle at 8% 0%, rgba(0, 234, 107, 0.16), transparent 30%),
    linear-gradient(135deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow-sm);
}

.catalogue-admin-kicker {
  width: fit-content;
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 104, 74, 0.09);
  color: var(--primary);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.catalogue-admin-hero h2 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: clamp(1.6rem, 3vw, 2.55rem);
  letter-spacing: -0.05em;
  line-height: 1.02;
}

.catalogue-admin-hero p {
  max-width: 720px;
  margin: 0;
  color: var(--text-2);
  font-weight: 650;
  line-height: 1.65;
}

.catalogue-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.catalogue-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 16px;
  margin-bottom: 16px;
}

.catalogue-safety-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.catalogue-safety-list span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 750;
}

.catalogue-safety-list i {
  color: var(--primary);
}

.catalogue-admin-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.catalogue-admin-stats div {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-2);
}

.catalogue-admin-stats strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalogue-admin-stats span {
  color: var(--text-3);
  font-size: 0.78rem;
  font-weight: 750;
}

.catalogue-admin-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.catalogue-admin-preview article {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-2);
}

.catalogue-admin-preview strong,
.catalogue-admin-preview b {
  color: var(--text);
}

.catalogue-admin-preview span {
  display: block;
  margin-top: 3px;
  color: var(--text-3);
  font-size: 0.8rem;
  font-weight: 650;
}

.catalogue-admin-preview em {
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(0, 104, 74, 0.1);
  color: var(--primary);
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 800;
}

@media print {
  .public-catalogue-page {
    display: none !important;
  }
}

@media (max-width: 860px) {

  .catalogue-header,
  .catalogue-grid {
    grid-template-columns: 1fr;
  }

  .catalogue-admin-hero,
  .catalogue-admin-grid {
    grid-template-columns: 1fr;
  }

  .catalogue-admin-actions {
    justify-content: flex-start;
  }

  .catalogue-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .catalogue-estimate-panel {
    position: static;
  }
}

/* v99: account dropdown must remain readable in dark mode */
body.dark .topbar-account-dropdown {
  background: #102a30 !important;
  border-color: #3a6870 !important;
}

body.dark .topbar-account-dropdown button,
body.dark .topbar-account-dropdown button i,
body.dark .topbar-account-dropdown button span {
  background: transparent !important;
  color: #f8f4ea !important;
  -webkit-text-fill-color: #f8f4ea !important;
}

body.dark .topbar-account-dropdown button:hover,
body.dark .topbar-account-dropdown button:focus {
  background: rgba(255, 255, 255, 0.10) !important;
}

body.dark .topbar-account-dropdown button.danger,
body.dark .topbar-account-dropdown button.danger i,
body.dark .topbar-account-dropdown button.danger span {
  color: #ffb4b4 !important;
  -webkit-text-fill-color: #ffb4b4 !important;
}

/* v102 TRUE EOF: thermal receipt text must stay bold, black, and readable */
.thermal-print-sheet,
.invoice-theme-sample-thermal,
body.dark .thermal-print-sheet,
body.dark .invoice-theme-sample-thermal {
  width: min(var(--thermal-paper-width, 3in), 100%) !important;
  max-width: var(--thermal-paper-width, 3in) !important;
  background: #ffffff !important;
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 12.8px !important;
  font-weight: 900 !important;
  line-height: 1.26 !important;
}

.thermal-print-sheet *,
.invoice-theme-sample-thermal *,
body.dark .thermal-print-sheet *,
body.dark .invoice-theme-sample-thermal * {
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
  opacity: 1 !important;
  filter: none !important;
  text-shadow: none !important;
  font-family: inherit !important;
}

.thermal-shop {
  font-size: 14px !important;
  font-weight: 950 !important;
  line-height: 1.16 !important;
}

.thermal-shop-meta,
.thermal-generated,
.thermal-muted,
.thermal-item-row small {
  font-size: 10.8px !important;
  font-weight: 850 !important;
  line-height: 1.25 !important;
}

.thermal-row,
.thermal-item-row {
  font-size: 12.2px !important;
  font-weight: 900 !important;
  line-height: 1.26 !important;
  color: #000000 !important;
}

.thermal-row>span,
.thermal-row>strong,
.thermal-item-row>span,
.thermal-item-row>strong {
  color: #000000 !important;
  font-size: inherit !important;
  font-weight: 900 !important;
}

.thermal-total,
.thermal-total span,
.thermal-total strong {
  color: #000000 !important;
  font-size: 14px !important;
  font-weight: 950 !important;
}

.thermal-line {
  border-top: 1.5px dashed #000000 !important;
  background: transparent !important;
}

.thermal-bill-row {
  border-top: 1.5px solid #000000 !important;
  border-bottom: 1.5px solid #000000 !important;
}

.thermal-logo-wrap img {
  filter: grayscale(1) contrast(2.15) brightness(.55) !important;
  opacity: 1 !important;
}

@media print {

  body.print-thermal #print-zone.thermal-print-sheet,
  body.print-thermal .thermal-print-sheet,
  body.print-thermal .invoice-theme-sample-thermal {
    width: var(--thermal-paper-width, 3in) !important;
    max-width: var(--thermal-paper-width, 3in) !important;
    margin: 0 !important;
    padding: 2mm 2mm 3mm !important;
    background: #ffffff !important;
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    box-shadow: none !important;
    font-size: 12.8px !important;
    font-weight: 900 !important;
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
  }

  body.print-thermal #print-zone.thermal-print-sheet *,
  body.print-thermal .thermal-print-sheet *,
  body.print-thermal .invoice-theme-sample-thermal * {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    opacity: 1 !important;
    filter: none !important;
  }
}

/* v103 TRUE EOF: absolutely every thermal element is black */
.thermal-print-sheet,
.thermal-print-sheet *,
.thermal-print-sheet *::before,
.thermal-print-sheet *::after,
.invoice-theme-sample-thermal,
.invoice-theme-sample-thermal *,
.invoice-theme-sample-thermal *::before,
.invoice-theme-sample-thermal *::after,
body.dark .thermal-print-sheet,
body.dark .thermal-print-sheet *,
body.dark .thermal-print-sheet *::before,
body.dark .thermal-print-sheet *::after,
body.dark .invoice-theme-sample-thermal,
body.dark .invoice-theme-sample-thermal *,
body.dark .invoice-theme-sample-thermal *::before,
body.dark .invoice-theme-sample-thermal *::after {
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
  border-color: #000000 !important;
  caret-color: #000000 !important;
  text-decoration-color: #000000 !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

.thermal-print-sheet svg,
.thermal-print-sheet svg *,
.invoice-theme-sample-thermal svg,
.invoice-theme-sample-thermal svg * {
  color: #000000 !important;
  fill: #000000 !important;
  stroke: #000000 !important;
}

.thermal-print-sheet .text-green,
.thermal-print-sheet .text-red,
.thermal-print-sheet .text-orange,
.thermal-print-sheet .text-blue,
.invoice-theme-sample-thermal .text-green,
.invoice-theme-sample-thermal .text-red,
.invoice-theme-sample-thermal .text-orange,
.invoice-theme-sample-thermal .text-blue {
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
}

@media print {

  body.print-thermal #print-zone,
  body.print-thermal #print-zone *,
  body.print-thermal #print-zone *::before,
  body.print-thermal #print-zone *::after,
  body.print-thermal .thermal-print-sheet,
  body.print-thermal .thermal-print-sheet *,
  body.print-thermal .thermal-print-sheet *::before,
  body.print-thermal .thermal-print-sheet *::after,
  body.print-thermal .invoice-theme-sample-thermal,
  body.print-thermal .invoice-theme-sample-thermal *,
  body.print-thermal .invoice-theme-sample-thermal *::before,
  body.print-thermal .invoice-theme-sample-thermal *::after {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    border-color: #000000 !important;
    text-decoration-color: #000000 !important;
    text-shadow: none !important;
    opacity: 1 !important;
  }

  body.print-thermal #print-zone svg,
  body.print-thermal #print-zone svg *,
  body.print-thermal .thermal-print-sheet svg,
  body.print-thermal .thermal-print-sheet svg *,
  body.print-thermal .invoice-theme-sample-thermal svg,
  body.print-thermal .invoice-theme-sample-thermal svg * {
    fill: #000000 !important;
    stroke: #000000 !important;
  }
}

/* v104 TRUE EOF: thermal HSN and quantity/rate detail lines are solid black */
.thermal-print-sheet .thermal-item-row small,
.thermal-print-sheet .thermal-item-row small *,
.thermal-print-sheet .thermal-item-row span small,
.thermal-print-sheet small,
.thermal-print-sheet small *,
.invoice-theme-sample-thermal .thermal-item-row small,
.invoice-theme-sample-thermal .thermal-item-row small *,
.invoice-theme-sample-thermal .thermal-item-row span small,
.invoice-theme-sample-thermal small,
.invoice-theme-sample-thermal small *,
body.dark .thermal-print-sheet .thermal-item-row small,
body.dark .thermal-print-sheet .thermal-item-row small *,
body.dark .invoice-theme-sample-thermal .thermal-item-row small,
body.dark .invoice-theme-sample-thermal .thermal-item-row small * {
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
  opacity: 1 !important;
  filter: none !important;
  text-shadow: none !important;
  font-weight: 950 !important;
  font-size: 11.4px !important;
  line-height: 1.28 !important;
}

@media print {

  body.print-thermal #print-zone .thermal-item-row small,
  body.print-thermal #print-zone .thermal-item-row small *,
  body.print-thermal #print-zone small,
  body.print-thermal #print-zone small *,
  body.print-thermal .thermal-print-sheet .thermal-item-row small,
  body.print-thermal .thermal-print-sheet .thermal-item-row small *,
  body.print-thermal .thermal-print-sheet small,
  body.print-thermal .thermal-print-sheet small *,
  body.print-thermal .invoice-theme-sample-thermal .thermal-item-row small,
  body.print-thermal .invoice-theme-sample-thermal .thermal-item-row small *,
  body.print-thermal .invoice-theme-sample-thermal small,
  body.print-thermal .invoice-theme-sample-thermal small * {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    opacity: 1 !important;
    filter: none !important;
    text-shadow: none !important;
    font-weight: 950 !important;
    font-size: 11.4px !important;
    line-height: 1.28 !important;
  }
}

/* v105 TRUE EOF: Flash Label Pro roll printer exact width and no extra blank length */
@media print {

  html:has(body.print-thermal),
  body.print-thermal {
    width: var(--thermal-paper-width, 3.15in) !important;
    min-width: var(--thermal-paper-width, 3.15in) !important;
    max-width: var(--thermal-paper-width, 3.15in) !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #ffffff !important;
  }

  body.print-thermal #invoice-modal,
  body.print-thermal #estimate-print-modal,
  body.print-thermal .modal-overlay.open,
  body.print-thermal .modal,
  body.print-thermal #invoice-content,
  body.print-thermal #estimate-modal-content {
    width: var(--thermal-paper-width, 3.15in) !important;
    min-width: var(--thermal-paper-width, 3.15in) !important;
    max-width: var(--thermal-paper-width, 3.15in) !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: transparent !important;
  }

  body.print-thermal #print-zone.thermal-print-sheet,
  body.print-thermal .thermal-print-sheet {
    box-sizing: border-box !important;
    width: var(--thermal-paper-width, 3.15in) !important;
    min-width: var(--thermal-paper-width, 3.15in) !important;
    max-width: var(--thermal-paper-width, 3.15in) !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 2mm 2mm 2.5mm !important;
    page-break-after: avoid !important;
    break-after: avoid !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
}

/* v106 TRUE EOF: support chatbot and floating help UI must never print */
@media print {

  html body #veedesk-help-chat.veedesk-help-chat,
  html body #veedesk-help-chat.veedesk-help-chat *,
  html body .veedesk-help-chat,
  html body .help-chat-launcher,
  html body .help-chat-panel,
  html body [class*="help-chat"],
  html body [id*="help-chat"],
  html body .no-print {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    max-width: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -99999px !important;
    top: -99999px !important;
    pointer-events: none !important;
  }
}

/* v108 TRUE EOF: winning Flash Label Pro 100mm × 150mm thermal print layout */
@media print {
  @page {
    size: var(--thermal-paper-width, 3.94in) var(--thermal-paper-length, 5.91in) !important;
    margin: 0 !important;
  }

  html:has(body.print-thermal),
  body.print-thermal {
    width: var(--thermal-paper-width, 3.94in) !important;
    min-width: var(--thermal-paper-width, 3.94in) !important;
    max-width: var(--thermal-paper-width, 3.94in) !important;
    height: var(--thermal-paper-length, 5.91in) !important;
    min-height: var(--thermal-paper-length, 5.91in) !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #ffffff !important;
  }

  body.print-thermal #invoice-modal,
  body.print-thermal #estimate-print-modal,
  body.print-thermal .modal-overlay.open,
  body.print-thermal .modal,
  body.print-thermal #invoice-content,
  body.print-thermal #estimate-modal-content,
  body.print-thermal #print-zone.thermal-print-sheet,
  body.print-thermal .thermal-print-sheet {
    box-sizing: border-box !important;
    width: var(--thermal-paper-width, 3.94in) !important;
    min-width: var(--thermal-paper-width, 3.94in) !important;
    max-width: var(--thermal-paper-width, 3.94in) !important;
    height: var(--thermal-paper-length, 5.91in) !important;
    min-height: var(--thermal-paper-length, 5.91in) !important;
    max-height: var(--thermal-paper-length, 5.91in) !important;
    margin: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    background: #ffffff !important;
    box-shadow: none !important;
    transform: none !important;
  }

  body.print-thermal #invoice-content,
  body.print-thermal #estimate-modal-content {
    padding: 0 !important;
  }

  body.print-thermal #print-zone.thermal-print-sheet,
  body.print-thermal .thermal-print-sheet {
    padding: 1.5mm 1.8mm !important;
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    border-radius: 0 !important;
    page-break-before: avoid !important;
    page-break-after: avoid !important;
    page-break-inside: avoid !important;
    break-before: avoid !important;
    break-after: avoid !important;
    break-inside: avoid !important;
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
  }

  body.print-thermal .thermal-logo-wrap {
    margin: 0 auto 1mm !important;
    text-align: center !important;
  }

  body.print-thermal .thermal-logo-wrap img {
    width: 36mm !important;
    max-width: 36mm !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
  }

  body.print-thermal .thermal-shop {
    font-size: 17px !important;
    line-height: 1.08 !important;
    font-weight: 950 !important;
    letter-spacing: .2px !important;
    margin: 0 0 1mm !important;
  }

  body.print-thermal .thermal-shop-meta,
  body.print-thermal .thermal-generated,
  body.print-thermal .thermal-muted,
  body.print-thermal .thermal-item-row small {
    font-size: 12px !important;
    line-height: 1.18 !important;
    font-weight: 900 !important;
  }

  body.print-thermal .thermal-line {
    margin: 1.5mm 0 !important;
    border-top: 1.4px dashed #000000 !important;
  }

  body.print-thermal .thermal-row,
  body.print-thermal .thermal-item-row {
    font-size: 15px !important;
    line-height: 1.18 !important;
    font-weight: 950 !important;
    gap: 2mm !important;
    margin: .8mm 0 !important;
  }

  body.print-thermal .thermal-row>span,
  body.print-thermal .thermal-item-row>span {
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }

  body.print-thermal .thermal-row>strong,
  body.print-thermal .thermal-item-row>strong {
    flex: 0 0 auto !important;
    text-align: right !important;
    white-space: nowrap !important;
  }

  body.print-thermal .thermal-total,
  body.print-thermal .thermal-total span,
  body.print-thermal .thermal-total strong {
    font-size: 17px !important;
    line-height: 1.12 !important;
    font-weight: 950 !important;
  }
}

/* v109 TRUE EOF: pin thermal receipt to top-left and reduce print darkness */
@media print {
  @page {
    size: var(--thermal-paper-width, 3.94in) var(--thermal-paper-length, 5.91in) !important;
    margin: 0 !important;
  }

  html:has(body.print-thermal),
  body.print-thermal {
    width: var(--thermal-paper-width, 3.94in) !important;
    min-width: var(--thermal-paper-width, 3.94in) !important;
    max-width: var(--thermal-paper-width, 3.94in) !important;
    height: var(--thermal-paper-length, 5.91in) !important;
    min-height: var(--thermal-paper-length, 5.91in) !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #ffffff !important;
  }

  body.print-thermal #invoice-modal,
  body.print-thermal #estimate-print-modal,
  body.print-thermal .modal-overlay,
  body.print-thermal .modal-overlay.open,
  body.print-thermal .modal {
    position: fixed !important;
    inset: 0 auto auto 0 !important;
    display: block !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    place-items: start !important;
    width: var(--thermal-paper-width, 3.94in) !important;
    min-width: var(--thermal-paper-width, 3.94in) !important;
    max-width: var(--thermal-paper-width, 3.94in) !important;
    height: var(--thermal-paper-length, 5.91in) !important;
    min-height: var(--thermal-paper-length, 5.91in) !important;
    max-height: var(--thermal-paper-length, 5.91in) !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    transform: none !important;
    translate: none !important;
    background: #ffffff !important;
    box-shadow: none !important;
  }

  body.print-thermal #invoice-content,
  body.print-thermal #estimate-modal-content,
  body.print-thermal #print-zone.thermal-print-sheet,
  body.print-thermal .thermal-print-sheet {
    position: static !important;
    display: block !important;
    box-sizing: border-box !important;
    width: var(--thermal-paper-width, 3.94in) !important;
    min-width: var(--thermal-paper-width, 3.94in) !important;
    max-width: var(--thermal-paper-width, 3.94in) !important;
    height: var(--thermal-paper-length, 5.91in) !important;
    min-height: var(--thermal-paper-length, 5.91in) !important;
    max-height: var(--thermal-paper-length, 5.91in) !important;
    margin: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    transform: none !important;
    background: #ffffff !important;
    box-shadow: none !important;
  }

  body.print-thermal #invoice-content,
  body.print-thermal #estimate-modal-content {
    padding: 0 !important;
  }

  body.print-thermal #print-zone.thermal-print-sheet,
  body.print-thermal .thermal-print-sheet {
    padding: 2mm 2.4mm !important;
    color: #111111 !important;
    -webkit-text-fill-color: #111111 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 13.2px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    print-color-adjust: economy !important;
    -webkit-print-color-adjust: economy !important;
  }

  body.print-thermal #print-zone.thermal-print-sheet *,
  body.print-thermal .thermal-print-sheet * {
    color: #111111 !important;
    -webkit-text-fill-color: #111111 !important;
    text-shadow: none !important;
    opacity: 1 !important;
    filter: none !important;
  }

  body.print-thermal .thermal-logo-wrap {
    margin: 0 auto 1mm !important;
    text-align: center !important;
  }

  body.print-thermal .thermal-logo-wrap img {
    width: 30mm !important;
    max-width: 30mm !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
    filter: grayscale(1) contrast(1.2) brightness(1.2) !important;
    opacity: .82 !important;
  }

  body.print-thermal .thermal-shop {
    font-size: 16px !important;
    line-height: 1.08 !important;
    font-weight: 800 !important;
    letter-spacing: .1px !important;
    margin: 0 0 1mm !important;
  }

  body.print-thermal .thermal-shop-meta,
  body.print-thermal .thermal-generated,
  body.print-thermal .thermal-muted,
  body.print-thermal .thermal-item-row small {
    font-size: 11.6px !important;
    line-height: 1.18 !important;
    font-weight: 650 !important;
  }

  body.print-thermal .thermal-row,
  body.print-thermal .thermal-item-row {
    font-size: 14px !important;
    line-height: 1.18 !important;
    font-weight: 760 !important;
    gap: 2mm !important;
    margin: .7mm 0 !important;
  }

  body.print-thermal .thermal-row>span,
  body.print-thermal .thermal-item-row>span,
  body.print-thermal .thermal-row>strong,
  body.print-thermal .thermal-item-row>strong {
    font-weight: 760 !important;
  }

  body.print-thermal .thermal-line {
    margin: 1.3mm 0 !important;
    border-top: 1px dashed #222222 !important;
  }

  body.print-thermal .thermal-bill-row {
    border-top: 1px solid #222222 !important;
    border-bottom: 1px solid #222222 !important;
  }

  body.print-thermal .thermal-total,
  body.print-thermal .thermal-total span,
  body.print-thermal .thermal-total strong {
    font-size: 16px !important;
    line-height: 1.12 !important;
    font-weight: 820 !important;
  }
}

/* v110 TRUE EOF: keep A4/A5 normal, thermal compact, with warranty note */
@media print {
  body:not(.print-thermal) .modal-overlay.open {
    position: static !important;
    inset: auto !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: transparent !important;
    transform: none !important;
  }

  body:not(.print-thermal) .modal {
    position: static !important;
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    transform: none !important;
  }

  body:not(.print-thermal) #invoice-content,
  body:not(.print-thermal) #estimate-modal-content {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #ffffff !important;
  }

  body:not(.print-thermal) #print-zone.invoice-sheet,
  body:not(.print-thermal) .invoice-sheet,
  body:not(.print-thermal) .tax-invoice-sheet {
    color-scheme: light !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: none !important;
    transform: none !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  body:not(.print-thermal):not(.print-a5) #print-zone.invoice-sheet,
  body:not(.print-thermal):not(.print-a5) .invoice-sheet {
    padding: 6mm !important;
  }

  body.print-a5:not(.print-thermal) #print-zone.invoice-sheet,
  body.print-a5:not(.print-thermal) .invoice-sheet {
    padding: 4mm !important;
    font-size: 0.82rem !important;
  }

  body.print-a5:not(.print-thermal) #print-zone.tax-invoice-sheet,
  body.print-a5:not(.print-thermal) .tax-invoice-sheet {
    padding: 2.5mm !important;
    font-size: 8px !important;
  }

  body:not(.print-thermal) #print-zone.thermal-print-sheet,
  body:not(.print-thermal) .thermal-print-sheet {
    display: none !important;
  }

  body.print-thermal .thermal-return-note {
    color: #111111 !important;
    -webkit-text-fill-color: #111111 !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
    text-align: center !important;
    margin: 1mm 0 !important;
  }
}

/* v111 TRUE EOF: safe A4/A5 fit and crisp black-and-white thermal logo */
@media print {

  body:not(.print-thermal) html,
  body:not(.print-thermal) {
    background: #ffffff !important;
    overflow: visible !important;
  }

  body:not(.print-thermal):not(.print-a5) #print-zone.invoice-sheet,
  body:not(.print-thermal):not(.print-a5) .invoice-sheet,
  body:not(.print-thermal):not(.print-a5) #print-zone.tax-invoice-sheet,
  body:not(.print-thermal):not(.print-a5) .tax-invoice-sheet {
    width: 190mm !important;
    max-width: 190mm !important;
    min-width: 190mm !important;
    margin: 0 auto !important;
    padding: 5mm !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: none !important;
    transform: none !important;
  }

  body.print-a5:not(.print-thermal) #print-zone.invoice-sheet,
  body.print-a5:not(.print-thermal) .invoice-sheet,
  body.print-a5:not(.print-thermal) #print-zone.tax-invoice-sheet,
  body.print-a5:not(.print-thermal) .tax-invoice-sheet {
    width: 134mm !important;
    max-width: 134mm !important;
    min-width: 134mm !important;
    margin: 0 auto !important;
    padding: 4mm !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: none !important;
    transform: none !important;
  }

  body:not(.print-thermal):not(.print-a5) #print-zone.tax-invoice-sheet,
  body:not(.print-thermal):not(.print-a5) .tax-invoice-sheet {
    min-height: 287mm !important;
    font-size: 9.2px !important;
  }

  body.print-a5:not(.print-thermal) #print-zone.tax-invoice-sheet,
  body.print-a5:not(.print-thermal) .tax-invoice-sheet {
    min-height: 200mm !important;
    font-size: 7.4px !important;
  }

  body:not(.print-thermal):not(.print-a5) .tax-company-row {
    grid-template-columns: 36mm 1fr !important;
  }

  body:not(.print-thermal):not(.print-a5) .tax-logo-box img {
    width: 31mm !important;
    max-height: 18mm !important;
  }

  body.print-a5:not(.print-thermal) .tax-company-row {
    grid-template-columns: 27mm 1fr !important;
    min-height: 18mm !important;
  }

  body.print-a5:not(.print-thermal) .tax-logo-box img {
    width: 23mm !important;
    max-height: 14mm !important;
  }

  body.print-a5:not(.print-thermal) .tax-company-name {
    font-size: 10px !important;
  }

  body.print-a5:not(.print-thermal) .tax-items-table th,
  body.print-a5:not(.print-thermal) .tax-items-table td {
    padding: .75mm .55mm !important;
  }

  body.print-thermal .thermal-bw-logo {
    width: 33mm !important;
    max-width: 33mm !important;
    margin: 0 auto 1mm !important;
    padding: 0 !important;
    background: #ffffff !important;
  }

  body.print-thermal .thermal-bw-logo svg {
    display: block !important;
    width: 33mm !important;
    max-width: 33mm !important;
    height: auto !important;
    margin: 0 auto !important;
    filter: none !important;
    opacity: 1 !important;
  }

  body.print-thermal .thermal-bw-logo svg * {
    print-color-adjust: economy !important;
    -webkit-print-color-adjust: economy !important;
  }
}

/* v112 TRUE EOF: full-page A4/A5 output and visible simple thermal logo */
@media print {

  body:not(.print-thermal):not(.print-a5) #invoice-modal,
  body:not(.print-thermal):not(.print-a5) #estimate-print-modal,
  body:not(.print-thermal):not(.print-a5) .modal-overlay.open,
  body:not(.print-thermal):not(.print-a5) .modal,
  body:not(.print-thermal):not(.print-a5) #invoice-content,
  body:not(.print-thermal):not(.print-a5) #estimate-modal-content {
    width: 210mm !important;
    min-width: 210mm !important;
    max-width: 210mm !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 auto !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #ffffff !important;
    box-shadow: none !important;
    transform: none !important;
  }

  body.print-a5:not(.print-thermal) #invoice-modal,
  body.print-a5:not(.print-thermal) #estimate-print-modal,
  body.print-a5:not(.print-thermal) .modal-overlay.open,
  body.print-a5:not(.print-thermal) .modal,
  body.print-a5:not(.print-thermal) #invoice-content,
  body.print-a5:not(.print-thermal) #estimate-modal-content {
    width: 148mm !important;
    min-width: 148mm !important;
    max-width: 148mm !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 auto !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #ffffff !important;
    box-shadow: none !important;
    transform: none !important;
  }

  body:not(.print-thermal):not(.print-a5) #print-zone.invoice-sheet,
  body:not(.print-thermal):not(.print-a5) .invoice-sheet,
  body:not(.print-thermal):not(.print-a5) #print-zone.tax-invoice-sheet,
  body:not(.print-thermal):not(.print-a5) .tax-invoice-sheet {
    width: 210mm !important;
    min-width: 210mm !important;
    max-width: 210mm !important;
    min-height: 297mm !important;
    height: auto !important;
    margin: 0 !important;
    padding: 8mm !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: none !important;
    transform: none !important;
  }

  body.print-a5:not(.print-thermal) #print-zone.invoice-sheet,
  body.print-a5:not(.print-thermal) .invoice-sheet,
  body.print-a5:not(.print-thermal) #print-zone.tax-invoice-sheet,
  body.print-a5:not(.print-thermal) .tax-invoice-sheet {
    width: 148mm !important;
    min-width: 148mm !important;
    max-width: 148mm !important;
    min-height: 210mm !important;
    height: auto !important;
    margin: 0 !important;
    padding: 5mm !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: none !important;
    transform: none !important;
  }

  body:not(.print-thermal):not(.print-a5) #print-zone.tax-invoice-sheet,
  body:not(.print-thermal):not(.print-a5) .tax-invoice-sheet {
    font-size: 9.8px !important;
  }

  body.print-a5:not(.print-thermal) #print-zone.tax-invoice-sheet,
  body.print-a5:not(.print-thermal) .tax-invoice-sheet {
    font-size: 7.8px !important;
  }

  body.print-a5:not(.print-thermal) .tax-company-row {
    grid-template-columns: 29mm 1fr !important;
    min-height: 19mm !important;
  }

  body.print-a5:not(.print-thermal) .tax-logo-box img {
    width: 25mm !important;
    max-height: 15mm !important;
  }

  body.print-thermal .thermal-bw-logo,
  body.print-thermal .thermal-bw-logo svg {
    width: 38mm !important;
    max-width: 38mm !important;
    min-height: 13mm !important;
    display: block !important;
    opacity: 1 !important;
    filter: none !important;
  }

  body.print-thermal .thermal-bw-logo svg text,
  body.print-thermal .thermal-bw-logo svg path,
  body.print-thermal .thermal-bw-logo svg line,
  body.print-thermal .thermal-bw-logo svg rect {
    opacity: 1 !important;
    filter: none !important;
  }
}

/* v113 TRUE EOF: printable A4/A5 pages and no-black-block thermal text logo */
@media print {

  body:not(.print-thermal):not(.print-a5) #invoice-modal,
  body:not(.print-thermal):not(.print-a5) #estimate-print-modal,
  body:not(.print-thermal):not(.print-a5) .modal-overlay.open,
  body:not(.print-thermal):not(.print-a5) .modal,
  body:not(.print-thermal):not(.print-a5) #invoice-content,
  body:not(.print-thermal):not(.print-a5) #estimate-modal-content {
    width: 198mm !important;
    min-width: 198mm !important;
    max-width: 198mm !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 auto !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #ffffff !important;
    box-shadow: none !important;
    transform: none !important;
  }

  body.print-a5:not(.print-thermal) #invoice-modal,
  body.print-a5:not(.print-thermal) #estimate-print-modal,
  body.print-a5:not(.print-thermal) .modal-overlay.open,
  body.print-a5:not(.print-thermal) .modal,
  body.print-a5:not(.print-thermal) #invoice-content,
  body.print-a5:not(.print-thermal) #estimate-modal-content {
    width: 136mm !important;
    min-width: 136mm !important;
    max-width: 136mm !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 auto !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #ffffff !important;
    box-shadow: none !important;
    transform: none !important;
  }

  body:not(.print-thermal):not(.print-a5) #print-zone.invoice-sheet,
  body:not(.print-thermal):not(.print-a5) .invoice-sheet,
  body:not(.print-thermal):not(.print-a5) #print-zone.tax-invoice-sheet,
  body:not(.print-thermal):not(.print-a5) .tax-invoice-sheet {
    width: 198mm !important;
    min-width: 198mm !important;
    max-width: 198mm !important;
    min-height: 285mm !important;
    height: auto !important;
    margin: 0 !important;
    padding: 5mm !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: none !important;
    transform: none !important;
  }

  body.print-a5:not(.print-thermal) #print-zone.invoice-sheet,
  body.print-a5:not(.print-thermal) .invoice-sheet,
  body.print-a5:not(.print-thermal) #print-zone.tax-invoice-sheet,
  body.print-a5:not(.print-thermal) .tax-invoice-sheet {
    width: 136mm !important;
    min-width: 136mm !important;
    max-width: 136mm !important;
    min-height: 198mm !important;
    height: auto !important;
    margin: 0 !important;
    padding: 4mm !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: none !important;
    transform: none !important;
  }

  body:not(.print-thermal):not(.print-a5) #print-zone.tax-invoice-sheet,
  body:not(.print-thermal):not(.print-a5) .tax-invoice-sheet {
    font-size: 9.4px !important;
  }

  body.print-a5:not(.print-thermal) #print-zone.tax-invoice-sheet,
  body.print-a5:not(.print-thermal) .tax-invoice-sheet {
    font-size: 7.4px !important;
  }

  body.print-thermal .thermal-bw-logo {
    display: block !important;
    width: auto !important;
    max-width: none !important;
    min-height: 0 !important;
    margin: 0 auto 1.2mm !important;
    padding: 0 !important;
    background: transparent !important;
    color: #111111 !important;
    -webkit-text-fill-color: #111111 !important;
    text-align: center !important;
    border: 0 !important;
  }

  body.print-thermal .thermal-logo-word {
    display: block !important;
    color: #111111 !important;
    -webkit-text-fill-color: #111111 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 18px !important;
    line-height: 1 !important;
    font-weight: 900 !important;
    letter-spacing: 2px !important;
  }

  body.print-thermal .thermal-logo-sub {
    display: block !important;
    color: #111111 !important;
    -webkit-text-fill-color: #111111 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 8px !important;
    line-height: 1.1 !important;
    font-weight: 800 !important;
    letter-spacing: .8px !important;
    margin-top: .6mm !important;
  }
}

/* v114 TRUE EOF: restore old reliable A4/A5 printing and original thermal logo */
@media print {

  body:not(.print-thermal),
  body:not(.print-thermal) html {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    background: #ffffff !important;
  }

  body:not(.print-thermal) #invoice-modal,
  body:not(.print-thermal) #estimate-print-modal,
  body:not(.print-thermal) .modal-overlay.open,
  body:not(.print-thermal) .modal,
  body:not(.print-thermal) #invoice-content,
  body:not(.print-thermal) #estimate-modal-content {
    position: static !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: visible !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
  }

  body:not(.print-thermal) #print-zone,
  body:not(.print-thermal) .invoice-sheet,
  body:not(.print-thermal) .tax-invoice-sheet {
    color-scheme: light !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: none !important;
    transform: none !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  body:not(.print-thermal) #print-zone.invoice-sheet,
  body:not(.print-thermal) .invoice-sheet {
    padding: 5mm !important;
  }

  body:not(.print-thermal) #print-zone.tax-invoice-sheet,
  body:not(.print-thermal) .tax-invoice-sheet {
    padding: 3mm !important;
    font-size: 9.2px !important;
  }

  body.print-a5:not(.print-thermal) #print-zone.invoice-sheet,
  body.print-a5:not(.print-thermal) .invoice-sheet {
    padding: 4mm !important;
    font-size: 0.78rem !important;
  }

  body.print-a5:not(.print-thermal) #print-zone.tax-invoice-sheet,
  body.print-a5:not(.print-thermal) .tax-invoice-sheet {
    padding: 2.4mm !important;
    font-size: 7.4px !important;
  }

  body.print-a5:not(.print-thermal) .tax-company-row {
    grid-template-columns: 27mm 1fr !important;
    min-height: 18mm !important;
  }

  body.print-a5:not(.print-thermal) .tax-logo-box img {
    width: 23mm !important;
    max-height: 14mm !important;
  }

  body.print-a5:not(.print-thermal) .tax-company-name {
    font-size: 10px !important;
  }

  body.print-a5:not(.print-thermal) .tax-items-table th,
  body.print-a5:not(.print-thermal) .tax-items-table td {
    padding: .75mm .55mm !important;
  }

  body.print-thermal .thermal-bw-logo,
  body.print-thermal .thermal-logo-wrap {
    display: block !important;
    width: auto !important;
    max-width: none !important;
    min-height: 0 !important;
    margin: 0 auto 1mm !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    text-align: center !important;
  }

  body.print-thermal .thermal-bw-logo img,
  body.print-thermal .thermal-logo-wrap img {
    display: block !important;
    width: 34mm !important;
    max-width: 34mm !important;
    height: auto !important;
    max-height: 18mm !important;
    margin: 0 auto !important;
    object-fit: contain !important;
    filter: none !important;
    opacity: 1 !important;
    mix-blend-mode: normal !important;
  }
}

/* v115 TRUE EOF: A4/A5 fill full printable page and normal bill return note */
.inv-return-note {
  margin-top: 16px;
  padding: 10px 12px;
  border: 1px dashed var(--border-2, #cbd5e1);
  border-radius: 10px;
  background: #f8fafc;
  color: #111827;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

@media print {

  body:not(.print-thermal) #invoice-modal,
  body:not(.print-thermal) #estimate-print-modal,
  body:not(.print-thermal) .modal-overlay.open,
  body:not(.print-thermal) .modal,
  body:not(.print-thermal) #invoice-content,
  body:not(.print-thermal) #estimate-modal-content {
    position: static !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #ffffff !important;
    border: 0 !important;
    box-shadow: none !important;
    transform: none !important;
  }

  body:not(.print-thermal) #print-zone,
  body:not(.print-thermal) .invoice-sheet,
  body:not(.print-thermal) .tax-invoice-sheet {
    color-scheme: light !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: none !important;
    transform: none !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  body:not(.print-thermal):not(.print-a5) #print-zone,
  body:not(.print-thermal):not(.print-a5) .invoice-sheet,
  body:not(.print-thermal):not(.print-a5) .tax-invoice-sheet {
    min-height: calc(297mm - 12mm) !important;
  }

  body.print-a5:not(.print-thermal) #print-zone,
  body.print-a5:not(.print-thermal) .invoice-sheet,
  body.print-a5:not(.print-thermal) .tax-invoice-sheet {
    min-height: calc(210mm - 12mm) !important;
  }

  body:not(.print-thermal) #print-zone.invoice-sheet,
  body:not(.print-thermal) .invoice-sheet {
    padding: 5mm !important;
  }

  body:not(.print-thermal) #print-zone.tax-invoice-sheet,
  body:not(.print-thermal) .tax-invoice-sheet {
    padding: 3mm !important;
    font-size: 9.2px !important;
  }

  body.print-a5:not(.print-thermal) #print-zone.invoice-sheet,
  body.print-a5:not(.print-thermal) .invoice-sheet {
    padding: 4mm !important;
    font-size: 0.78rem !important;
  }

  body.print-a5:not(.print-thermal) #print-zone.tax-invoice-sheet,
  body.print-a5:not(.print-thermal) .tax-invoice-sheet {
    padding: 2.4mm !important;
    font-size: 7.4px !important;
  }

  body:not(.print-thermal) .inv-return-note {
    margin-top: 10px !important;
    padding: 7px 9px !important;
    border: 1px dashed #444444 !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    text-align: center !important;
  }
}

/* v116 TRUE EOF: no clipping, no horizontal second page for A4/A5 */
@media print {

  body:not(.print-thermal),
  body:not(.print-thermal) html {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #ffffff !important;
  }

  body:not(.print-thermal) #invoice-modal,
  body:not(.print-thermal) #estimate-print-modal,
  body:not(.print-thermal) .modal-overlay.open,
  body:not(.print-thermal) .modal,
  body:not(.print-thermal) #invoice-content,
  body:not(.print-thermal) #estimate-modal-content,
  body:not(.print-thermal) #print-zone,
  body:not(.print-thermal) .invoice-sheet,
  body:not(.print-thermal) .regular-invoice-sheet,
  body:not(.print-thermal) .tax-invoice-sheet {
    position: static !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    background: #ffffff !important;
    box-shadow: none !important;
    transform: none !important;
  }

  body:not(.print-thermal):not(.print-a5) #print-zone,
  body:not(.print-thermal):not(.print-a5) .invoice-sheet,
  body:not(.print-thermal):not(.print-a5) .regular-invoice-sheet,
  body:not(.print-thermal):not(.print-a5) .tax-invoice-sheet {
    padding: 4mm !important;
  }

  body.print-a5:not(.print-thermal) #print-zone,
  body.print-a5:not(.print-thermal) .invoice-sheet,
  body.print-a5:not(.print-thermal) .regular-invoice-sheet,
  body.print-a5:not(.print-thermal) .tax-invoice-sheet {
    padding: 3mm !important;
    font-size: 0.74rem !important;
  }

  body:not(.print-thermal) table,
  body:not(.print-thermal) thead,
  body:not(.print-thermal) tbody,
  body:not(.print-thermal) tr,
  body:not(.print-thermal) th,
  body:not(.print-thermal) td {
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }

  body:not(.print-thermal) .inv-table,
  body:not(.print-thermal) .tax-items-table {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
  }

  body:not(.print-thermal) .tax-invoice-sheet {
    font-size: 8.8px !important;
    line-height: 1.18 !important;
  }

  body.print-a5:not(.print-thermal) .tax-invoice-sheet {
    font-size: 6.8px !important;
    line-height: 1.13 !important;
  }

  body:not(.print-thermal) .tax-company-row,
  body:not(.print-thermal) .tax-info-grid,
  body:not(.print-thermal) .tax-bottom-grid,
  body:not(.print-thermal) .tax-footer-grid {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  body:not(.print-thermal) .tax-company-row {
    grid-template-columns: 28% 72% !important;
  }

  body:not(.print-thermal) .tax-logo-box img {
    width: min(32mm, 92%) !important;
    max-width: 92% !important;
    height: auto !important;
    max-height: 18mm !important;
    object-fit: contain !important;
  }

  body.print-a5:not(.print-thermal) .tax-logo-box img {
    width: min(23mm, 90%) !important;
    max-height: 13mm !important;
  }

  body:not(.print-thermal) .tax-items-table th:nth-child(1),
  body:not(.print-thermal) .tax-items-table td:nth-child(1) {
    width: 7% !important;
  }

  body:not(.print-thermal) .tax-items-table th:nth-child(2),
  body:not(.print-thermal) .tax-items-table td:nth-child(2) {
    width: 15% !important;
  }

  body:not(.print-thermal) .tax-items-table th:nth-child(3),
  body:not(.print-thermal) .tax-items-table td:nth-child(3) {
    width: 34% !important;
  }

  body:not(.print-thermal) .tax-items-table th:nth-child(4),
  body:not(.print-thermal) .tax-items-table td:nth-child(4) {
    width: 8% !important;
  }

  body:not(.print-thermal) .tax-items-table th:nth-child(5),
  body:not(.print-thermal) .tax-items-table td:nth-child(5) {
    width: 12% !important;
  }

  body:not(.print-thermal) .tax-items-table th:nth-child(6),
  body:not(.print-thermal) .tax-items-table td:nth-child(6) {
    width: 8% !important;
  }

  body:not(.print-thermal) .tax-items-table th:nth-child(7),
  body:not(.print-thermal) .tax-items-table td:nth-child(7) {
    width: 16% !important;
  }

  body:not(.print-thermal) .tax-items-table th,
  body:not(.print-thermal) .tax-items-table td {
    padding: .8mm .6mm !important;
  }

  body.print-a5:not(.print-thermal) .tax-items-table th,
  body.print-a5:not(.print-thermal) .tax-items-table td {
    padding: .45mm .35mm !important;
  }

  body:not(.print-thermal) .inv-return-note {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
}

/* v117 TRUE EOF: sample-PDF A4/A5 tax invoice layout */
@media print {

  body:not(.print-thermal) #invoice-modal,
  body:not(.print-thermal) .modal-overlay.open,
  body:not(.print-thermal) .modal,
  body:not(.print-thermal) #invoice-content {
    position: static !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #ffffff !important;
    border: 0 !important;
    box-shadow: none !important;
    transform: none !important;
  }

  body:not(.print-thermal) #print-zone.tax-invoice-sheet,
  body:not(.print-thermal) .tax-invoice-sheet {
    --tax-print-border: #00684a;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 auto !important;
    padding: 4mm !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    background: #ffffff !important;
    color: #000000 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 9.4px !important;
    line-height: 1.18 !important;
    box-shadow: none !important;
    transform: none !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  body.print-a5:not(.print-thermal) #print-zone.tax-invoice-sheet,
  body.print-a5:not(.print-thermal) .tax-invoice-sheet {
    padding: 2.2mm !important;
    font-size: 6.7px !important;
    line-height: 1.1 !important;
  }

  body:not(.print-thermal) .tax-title {
    font-size: 11px !important;
    line-height: 1 !important;
    margin: 0 0 2mm !important;
    text-align: center !important;
    font-weight: 900 !important;
    color: #000000 !important;
  }

  body.print-a5:not(.print-thermal) .tax-title {
    font-size: 8px !important;
    margin-bottom: 1.2mm !important;
  }

  body:not(.print-thermal) .tax-outer {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    border: 1px solid var(--tax-print-border) !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }

  body:not(.print-thermal) .tax-company-row {
    display: grid !important;
    grid-template-columns: 20% 80% !important;
    min-height: 27mm !important;
    border-bottom: 1px solid var(--tax-print-border) !important;
    width: 100% !important;
  }

  body.print-a5:not(.print-thermal) .tax-company-row {
    min-height: 18mm !important;
  }

  body:not(.print-thermal) .tax-logo-box {
    border-right: 1px solid var(--tax-print-border) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 2mm !important;
  }

  body:not(.print-thermal) .tax-logo-box img {
    width: 34mm !important;
    max-width: 94% !important;
    max-height: 18mm !important;
    height: auto !important;
    object-fit: contain !important;
    filter: none !important;
  }

  body.print-a5:not(.print-thermal) .tax-logo-box img {
    width: 22mm !important;
    max-height: 12mm !important;
  }

  body:not(.print-thermal) .tax-company {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 2mm !important;
    font-weight: 800 !important;
  }

  body:not(.print-thermal) .tax-company-name {
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 17px !important;
    line-height: 1.05 !important;
    font-weight: 900 !important;
    letter-spacing: .2px !important;
    margin: 0 0 2mm !important;
    color: #000000 !important;
  }

  body.print-a5:not(.print-thermal) .tax-company-name {
    font-size: 10px !important;
    margin-bottom: 1mm !important;
  }

  body:not(.print-thermal) .tax-info-grid {
    display: grid !important;
    grid-template-columns: 57% 43% !important;
    border-bottom: 1px solid var(--tax-print-border) !important;
    width: 100% !important;
  }

  body:not(.print-thermal) .tax-customer {
    min-height: 30mm !important;
    padding: 2.2mm !important;
    border-right: 1px solid var(--tax-print-border) !important;
    font-weight: 800 !important;
  }

  body.print-a5:not(.print-thermal) .tax-customer {
    min-height: 20mm !important;
    padding: 1.2mm !important;
  }

  body:not(.print-thermal) .tax-meta-table {
    display: grid !important;
    grid-template-rows: repeat(3, 1fr) !important;
    font-weight: 900 !important;
  }

  body:not(.print-thermal) .tax-meta-table>div {
    display: grid !important;
    grid-template-columns: 38% 62% !important;
    align-items: center !important;
    min-height: 10mm !important;
    border-bottom: 1px solid var(--tax-print-border) !important;
  }

  body.print-a5:not(.print-thermal) .tax-meta-table>div {
    min-height: 6.7mm !important;
  }

  body:not(.print-thermal) .tax-meta-table>div:last-child {
    border-bottom: 0 !important;
  }

  body:not(.print-thermal) .tax-meta-table span,
  body:not(.print-thermal) .tax-meta-table strong {
    padding: 0 2mm !important;
    overflow-wrap: anywhere !important;
  }

  body.print-a5:not(.print-thermal) .tax-meta-table span,
  body.print-a5:not(.print-thermal) .tax-meta-table strong {
    padding: 0 .8mm !important;
  }

  body:not(.print-thermal) .tax-items-table {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    font-size: inherit !important;
  }

  body:not(.print-thermal) .tax-items-table th,
  body:not(.print-thermal) .tax-items-table td {
    border-right: 1px solid #b9c3ce !important;
    padding: 1.35mm .8mm !important;
    vertical-align: top !important;
    background: #ffffff !important;
    color: #000000 !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }

  body.print-a5:not(.print-thermal) .tax-items-table th,
  body.print-a5:not(.print-thermal) .tax-items-table td {
    padding: .55mm .35mm !important;
  }

  body:not(.print-thermal) .tax-items-table th:last-child,
  body:not(.print-thermal) .tax-items-table td:last-child {
    border-right: 0 !important;
  }

  body:not(.print-thermal) .tax-items-table thead th {
    height: 9mm !important;
    border-bottom: 1px solid #b9c3ce !important;
    text-align: center !important;
    font-weight: 900 !important;
    font-size: 10px !important;
    letter-spacing: .8px !important;
  }

  body.print-a5:not(.print-thermal) .tax-items-table thead th {
    height: 6mm !important;
    font-size: 6.8px !important;
    letter-spacing: .2px !important;
  }

  body:not(.print-thermal) .tax-items-table tbody tr,
  body:not(.print-thermal) .tax-items-table tbody tr.tax-empty-row {
    height: 8.7mm !important;
  }

  body.print-a5:not(.print-thermal) .tax-items-table tbody tr,
  body.print-a5:not(.print-thermal) .tax-items-table tbody tr.tax-empty-row {
    height: 5.8mm !important;
  }

  body:not(.print-thermal) .tax-items-table th:nth-child(1),
  body:not(.print-thermal) .tax-items-table td:nth-child(1) {
    width: 4.8% !important;
    text-align: center !important;
  }

  body:not(.print-thermal) .tax-items-table th:nth-child(2),
  body:not(.print-thermal) .tax-items-table td:nth-child(2) {
    width: 11.5% !important;
    text-align: center !important;
  }

  body:not(.print-thermal) .tax-items-table th:nth-child(3),
  body:not(.print-thermal) .tax-items-table td:nth-child(3) {
    width: 46.5% !important;
    text-align: left !important;
  }

  body:not(.print-thermal) .tax-items-table th:nth-child(4),
  body:not(.print-thermal) .tax-items-table td:nth-child(4) {
    width: 6.8% !important;
    text-align: center !important;
  }

  body:not(.print-thermal) .tax-items-table th:nth-child(5),
  body:not(.print-thermal) .tax-items-table td:nth-child(5) {
    width: 10.5% !important;
    text-align: right !important;
  }

  body:not(.print-thermal) .tax-items-table th:nth-child(6),
  body:not(.print-thermal) .tax-items-table td:nth-child(6) {
    width: 7.3% !important;
    text-align: center !important;
  }

  body:not(.print-thermal) .tax-items-table th:nth-child(7),
  body:not(.print-thermal) .tax-items-table td:nth-child(7) {
    width: 12.6% !important;
    text-align: right !important;
  }

  body:not(.print-thermal) .tax-product {
    font-weight: 900 !important;
  }

  body:not(.print-thermal) .tax-bottom-grid {
    display: grid !important;
    grid-template-columns: 68% 32% !important;
    min-height: 58mm !important;
    border-top: 1px solid var(--tax-print-border) !important;
  }

  body.print-a5:not(.print-thermal) .tax-bottom-grid {
    min-height: 38mm !important;
  }

  body:not(.print-thermal) .tax-notes-area {
    border-right: 1px solid var(--tax-print-border) !important;
    padding: 2mm !important;
  }

  body:not(.print-thermal) .tax-total-box {
    display: grid !important;
    grid-template-rows: 10mm repeat(5, 7.5mm) 10mm !important;
    font-weight: 900 !important;
  }

  body.print-a5:not(.print-thermal) .tax-total-box {
    grid-template-rows: 6.5mm repeat(5, 5mm) 6.5mm !important;
  }

  body:not(.print-thermal) .tax-total-box>div {
    padding: 0 2mm !important;
    align-items: center !important;
  }

  body.print-a5:not(.print-thermal) .tax-total-box>div {
    padding: 0 .8mm !important;
  }

  body:not(.print-thermal) .tax-words {
    min-height: 15mm !important;
    border-top: 1px solid var(--tax-print-border) !important;
    padding: 2mm !important;
    font-weight: 900 !important;
  }

  body.print-a5:not(.print-thermal) .tax-words {
    min-height: 10mm !important;
    padding: 1mm !important;
  }

  body:not(.print-thermal) .tax-footer-grid {
    display: grid !important;
    grid-template-columns: 66% 34% !important;
    min-height: 27mm !important;
    border-top: 1px solid var(--tax-print-border) !important;
  }

  body.print-a5:not(.print-thermal) .tax-footer-grid {
    min-height: 18mm !important;
  }

  body:not(.print-thermal) .tax-bank {
    padding: 2mm !important;
    font-weight: 900 !important;
  }

  body:not(.print-thermal) .tax-sign {
    border-left: 1px solid var(--tax-print-border) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    text-align: center !important;
    padding: 2mm !important;
    font-weight: 900 !important;
  }

  body:not(.print-thermal) .tax-signature-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    min-height: 12mm !important;
    border-top: 1px solid var(--tax-print-border) !important;
    align-items: end !important;
    font-weight: 900 !important;
  }

  body.print-a5:not(.print-thermal) .tax-signature-row {
    min-height: 8mm !important;
  }

  body:not(.print-thermal) .tax-signature-row span {
    padding: 2mm !important;
  }

  body.print-a5:not(.print-thermal) .tax-signature-row span {
    padding: 1mm !important;
  }
}

/* v118 TRUE EOF: clean regular A4/A5 invoice print without reminder content */
.regular-invoice-sheet .inv-pay-reminder,
.regular-invoice-sheet .inv-return-note {
  display: none !important;
}

@media print {

  body:not(.print-thermal) #print-zone.regular-invoice-sheet,
  body:not(.print-thermal) .regular-invoice-sheet {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: auto !important;
    margin: 0 auto !important;
    background: #ffffff !important;
    color: #061621 !important;
    border: 1px solid #d8e2df !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: hidden !important;
    page-break-before: avoid !important;
    page-break-after: avoid !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  body:not(.print-thermal):not(.print-a5) #print-zone.regular-invoice-sheet,
  body:not(.print-thermal):not(.print-a5) .regular-invoice-sheet {
    padding: 7mm !important;
    font-size: 10.5px !important;
    line-height: 1.24 !important;
  }

  body.print-a5:not(.print-thermal) #print-zone.regular-invoice-sheet,
  body.print-a5:not(.print-thermal) .regular-invoice-sheet {
    padding: 4.5mm !important;
    font-size: 7.8px !important;
    line-height: 1.16 !important;
  }

  body:not(.print-thermal) .regular-invoice-sheet,
  body:not(.print-thermal) .regular-invoice-sheet * {
    color: #061621 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body:not(.print-thermal) .regular-invoice-sheet .inv-header {
    display: grid !important;
    grid-template-columns: 1.35fr .85fr !important;
    gap: 5mm !important;
    align-items: start !important;
    margin-bottom: 5mm !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  body.print-a5:not(.print-thermal) .regular-invoice-sheet .inv-header {
    gap: 2.5mm !important;
    margin-bottom: 3mm !important;
  }

  body:not(.print-thermal) .regular-invoice-sheet .inv-shop-name img {
    width: 42mm !important;
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
  }

  body.print-a5:not(.print-thermal) .regular-invoice-sheet .inv-shop-name img {
    width: 28mm !important;
  }

  body:not(.print-thermal) .regular-invoice-sheet .inv-shop-sub,
  body:not(.print-thermal) .regular-invoice-sheet .inv-meta-row,
  body:not(.print-thermal) .regular-invoice-sheet .inv-cust-box {
    font-size: inherit !important;
    overflow-wrap: anywhere !important;
  }

  body:not(.print-thermal) .regular-invoice-sheet .inv-bill-no {
    font-size: 15px !important;
    font-weight: 900 !important;
  }

  body.print-a5:not(.print-thermal) .regular-invoice-sheet .inv-bill-no {
    font-size: 10px !important;
  }

  body:not(.print-thermal) .regular-invoice-sheet .inv-cust-box {
    padding: 3mm !important;
    margin: 0 0 4mm !important;
    border: 1px solid #d8e2df !important;
    border-radius: 3mm !important;
    background: #f8fbfa !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  body.print-a5:not(.print-thermal) .regular-invoice-sheet .inv-cust-box {
    padding: 2mm !important;
    margin-bottom: 2.5mm !important;
    border-radius: 2mm !important;
  }

  body:not(.print-thermal) .regular-invoice-sheet .inv-table {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    margin: 0 !important;
    font-size: inherit !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  body:not(.print-thermal) .regular-invoice-sheet .inv-table th,
  body:not(.print-thermal) .regular-invoice-sheet .inv-table td {
    padding: 2mm 1.4mm !important;
    border: 1px solid #d8e2df !important;
    vertical-align: top !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    background: #ffffff !important;
  }

  body.print-a5:not(.print-thermal) .regular-invoice-sheet .inv-table th,
  body.print-a5:not(.print-thermal) .regular-invoice-sheet .inv-table td {
    padding: 1mm .7mm !important;
  }

  body:not(.print-thermal) .regular-invoice-sheet .inv-table th {
    background: #edf2f1 !important;
    font-weight: 900 !important;
  }

  body:not(.print-thermal) .regular-invoice-sheet .inv-table th:nth-child(1),
  body:not(.print-thermal) .regular-invoice-sheet .inv-table td:nth-child(1) {
    width: 7% !important;
  }

  body:not(.print-thermal) .regular-invoice-sheet .inv-table th:nth-child(2),
  body:not(.print-thermal) .regular-invoice-sheet .inv-table td:nth-child(2) {
    width: 45% !important;
  }

  body:not(.print-thermal) .regular-invoice-sheet .inv-table th:nth-child(3),
  body:not(.print-thermal) .regular-invoice-sheet .inv-table td:nth-child(3) {
    width: 12% !important;
  }

  body:not(.print-thermal) .regular-invoice-sheet .inv-table th:nth-child(4),
  body:not(.print-thermal) .regular-invoice-sheet .inv-table td:nth-child(4) {
    width: 18% !important;
  }

  body:not(.print-thermal) .regular-invoice-sheet .inv-table th:nth-child(5),
  body:not(.print-thermal) .regular-invoice-sheet .inv-table td:nth-child(5) {
    width: 18% !important;
  }

  body:not(.print-thermal) .regular-invoice-sheet .inv-totals {
    width: min(78mm, 48%) !important;
    margin: 5mm 0 0 auto !important;
    padding: 0 !important;
    border: 1px solid #d8e2df !important;
    border-radius: 3mm !important;
    overflow: hidden !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  body.print-a5:not(.print-thermal) .regular-invoice-sheet .inv-totals {
    width: min(54mm, 56%) !important;
    margin-top: 3mm !important;
    border-radius: 2mm !important;
  }

  body:not(.print-thermal) .regular-invoice-sheet .inv-total-row {
    padding: 2mm 2.5mm !important;
    border-bottom: 1px solid #d8e2df !important;
    font-size: inherit !important;
  }

  body.print-a5:not(.print-thermal) .regular-invoice-sheet .inv-total-row {
    padding: 1mm 1.4mm !important;
  }

  body:not(.print-thermal) .regular-invoice-sheet .inv-total-row:last-child {
    border-bottom: 0 !important;
  }

  body:not(.print-thermal) .regular-invoice-sheet .inv-total-row.grand {
    background: #061621 !important;
    color: #ffffff !important;
    font-size: 12px !important;
    font-weight: 900 !important;
  }

  body:not(.print-thermal) .regular-invoice-sheet .inv-total-row.grand * {
    color: #ffffff !important;
  }

  body.print-a5:not(.print-thermal) .regular-invoice-sheet .inv-total-row.grand {
    font-size: 8.5px !important;
  }

  body:not(.print-thermal) .regular-invoice-sheet .inv-signatures {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8mm !important;
    margin-top: 12mm !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  body.print-a5:not(.print-thermal) .regular-invoice-sheet .inv-signatures {
    gap: 4mm !important;
    margin-top: 7mm !important;
  }

  body:not(.print-thermal) .regular-invoice-sheet .inv-signature {
    min-height: 14mm !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: center !important;
    border-top: 1px solid #061621 !important;
    padding-top: 2mm !important;
    font-weight: 800 !important;
  }

  body.print-a5:not(.print-thermal) .regular-invoice-sheet .inv-signature {
    min-height: 8mm !important;
    padding-top: 1mm !important;
  }

  body:not(.print-thermal) .regular-invoice-sheet .inv-footer {
    margin-top: 5mm !important;
    padding-top: 3mm !important;
    border-top: 1px dashed #b7c2bf !important;
    text-align: center !important;
    font-size: inherit !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  body.print-a5:not(.print-thermal) .regular-invoice-sheet .inv-footer {
    margin-top: 3mm !important;
    padding-top: 1.5mm !important;
  }
}

/* v119 TRUE EOF: full A4 regular bill fit and attendance controls */
.shift-attendance-card {
  margin-bottom: 20px;
}

.shift-attendance-form {
  align-items: end;
}

.shift-attendance-notes {
  grid-column: span 2;
}

.shift-attendance-action {
  justify-content: end;
}

.shift-attendance-action .btn {
  min-height: 44px;
  width: 100%;
}

@media (max-width: 760px) {
  .shift-attendance-notes {
    grid-column: span 1;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 5mm;
  }

  body:not(.print-thermal):not(.print-a5) #invoice-modal,
  body:not(.print-thermal):not(.print-a5) .modal-overlay.open,
  body:not(.print-thermal):not(.print-a5) .modal,
  body:not(.print-thermal):not(.print-a5) #invoice-content {
    width: 200mm !important;
    max-width: 200mm !important;
    min-height: 287mm !important;
    box-sizing: border-box !important;
    margin: 0 auto !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  body:not(.print-thermal):not(.print-a5) #print-zone.regular-invoice-sheet,
  body:not(.print-thermal):not(.print-a5) .regular-invoice-sheet {
    width: 200mm !important;
    max-width: 200mm !important;
    min-height: 287mm !important;
    padding: 8mm !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: visible !important;
    border: 1px solid #bccbc6 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 11px !important;
    line-height: 1.28 !important;
    page-break-inside: auto !important;
    break-inside: auto !important;
  }

  body:not(.print-thermal):not(.print-a5) .regular-invoice-sheet .inv-header {
    grid-template-columns: 1.45fr .8fr !important;
    padding-bottom: 5mm !important;
    border-bottom: 2px solid #061621 !important;
  }

  body:not(.print-thermal):not(.print-a5) .regular-invoice-sheet .inv-bill-no {
    padding: 2mm 2.5mm !important;
    background: #061621 !important;
    color: #ffffff !important;
    text-align: center !important;
  }

  body:not(.print-thermal):not(.print-a5) .regular-invoice-sheet .inv-cust-box {
    border-radius: 0 !important;
    border-color: #bccbc6 !important;
  }

  body:not(.print-thermal):not(.print-a5) .regular-invoice-sheet .inv-table {
    page-break-inside: auto !important;
    break-inside: auto !important;
  }

  body:not(.print-thermal):not(.print-a5) .regular-invoice-sheet .inv-table tr {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  body:not(.print-thermal):not(.print-a5) .regular-invoice-sheet .inv-totals {
    width: 72mm !important;
  }

  body:not(.print-thermal):not(.print-a5) .regular-invoice-sheet .inv-signatures {
    margin-top: auto !important;
    padding-top: 14mm !important;
  }
}

/* v121 TRUE EOF: professional workforce payroll workspace */
.workforce-dashboard-hero,
.payroll-command-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 24px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  background:
    linear-gradient(135deg, rgba(0, 104, 74, 0.08), rgba(99, 102, 241, 0.06)),
    var(--white);
  box-shadow: var(--shadow-sm);
}

.people-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.people-toolbar strong {
  display: block;
  color: var(--text);
  font-size: 1.15rem;
}

.people-toolbar span {
  display: block;
  margin-top: 3px;
  color: var(--text-3);
  font-size: 0.85rem;
}

.app-wordmark,
.app-login-wordmark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.app-wordmark img {
  width: 34px !important;
  height: 34px !important;
  object-fit: contain;
}

.app-login-wordmark {
  margin-bottom: 14px;
}

.app-login-wordmark img {
  width: 46px !important;
  height: 46px !important;
  object-fit: contain;
}

.app-wordmark span,
.app-login-wordmark span {
  display: grid;
  line-height: 1.05;
  text-align: left;
}

.app-wordmark strong,
.app-login-wordmark strong {
  color: var(--text);
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0;
}

.app-login-wordmark strong {
  font-size: 1.25rem;
}

.app-wordmark small,
.app-login-wordmark small {
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.app-wordmark-sales small {
  color: #2563eb;
}

.app-wordmark-workforce small {
  color: var(--primary);
}

.workforce-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.workforce-checklist {
  display: grid;
  gap: 10px;
}

.workforce-checklist label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
  font-weight: 650;
}

.workforce-checklist input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.workforce-policy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.workforce-policy-grid div {
  min-height: 88px;
  padding: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.app-access-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 88px;
  padding: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  cursor: pointer;
}

.app-access-option input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--primary);
}

.workforce-policy-grid strong {
  display: block;
  color: var(--text);
  font-weight: 850;
}

.workforce-policy-grid span {
  display: block;
  margin-top: 6px;
  color: var(--text-3);
  font-size: 0.84rem;
  line-height: 1.45;
}

.workforce-mini-note {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-3);
  font-size: 0.82rem;
  line-height: 1.45;
}

.workforce-mini-note strong {
  color: var(--text);
}

.workforce-dashboard-hero h2,
.payroll-command-bar h2 {
  margin: 10px 0 6px;
  font-size: 1.45rem;
  line-height: 1.2;
}

.workforce-dashboard-hero p,
.payroll-command-bar p {
  margin: 0;
  color: var(--text-3);
  max-width: 720px;
}

.workforce-hero-actions,
.payroll-command-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.workforce-cycle-card {
  min-width: 230px;
  padding: 18px;
  border: 1px solid var(--border);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.workforce-cycle-card span,
.payroll-kicker {
  display: block;
  color: var(--text-3);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.workforce-cycle-card strong {
  display: block;
  margin: 7px 0;
  color: var(--primary);
  font-size: 1.5rem;
}

.workforce-cycle-card small {
  color: var(--text-2);
  font-weight: 650;
}

.workforce-process-strip,
.payroll-run-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.workforce-process-strip div,
.payroll-run-steps div {
  padding: 16px;
  border: 1px solid var(--border);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.workforce-process-strip i {
  color: var(--primary);
  margin-right: 8px;
}

.workforce-process-strip span,
.payroll-run-steps small {
  color: var(--text-3);
  font-size: 0.75rem;
  font-weight: 700;
}

.workforce-process-strip strong,
.payroll-run-steps strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
}

.payroll-run-steps div {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  align-items: center;
}

.payroll-run-steps span {
  grid-row: span 2;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-2);
  font-weight: 900;
}

.payroll-run-steps .active span {
  background: var(--primary);
  color: #ffffff;
}

.payroll-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.payroll-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: start;
  margin-bottom: 20px;
}

.payroll-run-card,
.payroll-preview-panel {
  border: 1px solid var(--border);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.payroll-preview-panel {
  padding: 20px;
  position: sticky;
  top: 16px;
}

.payroll-preview-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.payroll-preview-title span {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  color: var(--primary);
}

.payroll-preview-title strong {
  display: block;
  color: var(--text);
}

.payroll-preview-title small {
  color: var(--text-3);
}

.payroll-preview-employee {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  margin-bottom: 12px;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 800;
}

.payroll-preview-status {
  margin-top: 14px;
  text-align: right;
}

.workforce-preview-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.workforce-preview-row:last-child {
  border-bottom: 0;
}

.workforce-preview-row span {
  color: var(--text-2);
  font-weight: 650;
}

.payroll-form,
.payroll-filter-grid {
  align-items: end;
}

.payroll-notes {
  grid-column: span 2;
}

.payroll-action .btn {
  min-height: 44px;
  width: 100%;
}

body.dark .workforce-dashboard-hero,
body.dark .payroll-command-bar,
body.dark .workforce-cycle-card,
body.dark .workforce-process-strip div,
body.dark .payroll-run-steps div,
body.dark .payroll-run-card,
body.dark .payroll-preview-panel,
body.dark .workforce-checklist label,
body.dark .workforce-policy-grid div,
body.dark .app-access-option,
body.dark .workforce-mini-note {
  background: var(--white);
}

@media (max-width: 980px) {

  .payroll-summary-grid,
  .workforce-process-strip,
  .payroll-run-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .payroll-workspace-grid {
    grid-template-columns: 1fr;
  }

  .workforce-feature-grid {
    grid-template-columns: 1fr;
  }

  .payroll-preview-panel {
    position: static;
  }
}

@media (max-width: 760px) {

  .workforce-dashboard-hero,
  .payroll-command-bar,
  .people-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .payroll-summary-grid,
  .workforce-process-strip,
  .payroll-run-steps {
    grid-template-columns: 1fr;
  }

  .payroll-notes {
    grid-column: span 1;
  }

  .workforce-policy-grid {
    grid-template-columns: 1fr;
  }
}

/* v130: Softworker-inspired Veedesk workspace polish */
body[data-app-entry="sales"],
body[data-app-entry="workforce"],
body[data-app-entry="service"] {
  --primary: rgb(23, 92, 211);
  --primary-dark: rgb(21, 80, 186);
  --primary-light: #CEE9FF;
  --accent: rgb(23, 92, 211);
  --pastel-blue: #CEE9FF;
  --pastel-purple: #E0F2FE;
  --pastel-green: #E0F2FE;
  --pastel-pink: #E0F2FE;
  --pastel-rose: #E0F2FE;
  --pastel-sky: #E0F2FE;
  --workspace-bg: #f8fbff;
  --workspace-panel: #ffffff;
  --workspace-panel-soft: #f9fafb;
  --workspace-ink: #172033;
  --workspace-muted: #667085;
  --workspace-line: #e5e7eb;
  --workspace-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  --radius: 8px;
  --radius-sm: 6px;
  --radius-lg: 8px;
  background: var(--workspace-bg) !important;
  color: var(--workspace-ink) !important;
  letter-spacing: 0 !important;
}

body[data-app-entry="sales"] .layout,
body[data-app-entry="sales"] .content,
body[data-app-entry="workforce"] .layout,
body[data-app-entry="workforce"] .content,
body[data-app-entry="service"] .layout,
body[data-app-entry="service"] .content {
  background: var(--workspace-bg) !important;
}

body[data-app-entry="sales"] .sidebar,
body[data-app-entry="workforce"] .sidebar,
body[data-app-entry="service"] .sidebar {
  width: 268px !important;
  background: #ffffff !important;
  border-right: 1px solid var(--workspace-line) !important;
  box-shadow: none !important;
  padding: 10px 10px 16px !important;
}

body[data-app-entry="sales"] .sidebar::after,
body[data-app-entry="workforce"] .sidebar::after,
body[data-app-entry="service"] .sidebar::after {
  display: none !important;
}

body[data-app-entry="sales"] .sidebar-logo,
body[data-app-entry="workforce"] .sidebar-logo,
body[data-app-entry="service"] .sidebar-logo {
  min-height: 76px !important;
  align-items: flex-start !important;
  justify-content: center !important;
  padding: 14px 12px 16px !important;
  border-bottom: 1px solid var(--workspace-line) !important;
}

body[data-app-entry="sales"] .app-wordmark,
body[data-app-entry="workforce"] .app-wordmark {
  justify-content: flex-start !important;
}

body[data-app-entry="sales"] .app-wordmark img,
body[data-app-entry="workforce"] .app-wordmark img {
  width: 38px !important;
  height: 38px !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08) !important;
}

body[data-app-entry="sales"] .app-wordmark strong,
body[data-app-entry="workforce"] .app-wordmark strong {
  color: var(--workspace-ink) !important;
  font-size: 2rem !important;
  letter-spacing: 0 !important;
}

body[data-app-entry="sales"] .app-wordmark small,
body[data-app-entry="workforce"] .app-wordmark small {
  font-size: .9rem !important;
  letter-spacing: 0.04em !important;
}

body[data-app-entry="sales"] .nav-section,
body[data-app-entry="workforce"] .nav-section,
body[data-app-entry="service"] .nav-section {
  margin-top: 10px !important;
}

body[data-app-entry="sales"] .nav-label,
body[data-app-entry="workforce"] .nav-label,
body[data-app-entry="service"] .nav-label {
  padding: 12px 10px 7px !important;
  color: #98a2b3 !important;
  font-size: 0.68rem !important;
  letter-spacing: 0.06em !important;
}

body[data-app-entry="sales"] .nav-item,
body[data-app-entry="workforce"] .nav-item,
body[data-app-entry="service"] .nav-item {
  min-height: 38px !important;
  width: 100% !important;
  margin: 1px 0 !important;
  padding: 8px 10px !important;
  border-radius: 7px !important;
  color: #475467 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 0.86rem !important;
  font-weight: 650 !important;
  transform: none !important;
}

body[data-app-entry="sales"] .nav-item::before,
body[data-app-entry="workforce"] .nav-item::before,
body[data-app-entry="service"] .nav-item::before {
  display: none !important;
}

body[data-app-entry="sales"] .nav-item .icon,
body[data-app-entry="workforce"] .nav-item .icon,
body[data-app-entry="service"] .nav-item .icon {
  width: 28px !important;
  height: 28px !important;
  border-radius: 6px !important;
  background: #f2f4f7 !important;
  color: #667085 !important;
  font-size: 0.9rem !important;
}

body[data-app-entry="sales"] .nav-item:hover,
body[data-app-entry="workforce"] .nav-item:hover,
body[data-app-entry="service"] .nav-item:hover {
  background: #E0F2FE !important;
  color: var(--workspace-ink) !important;
}

body[data-app-entry="sales"] .nav-item.active,
body[data-app-entry="workforce"] .nav-item.active,
body[data-app-entry="service"] .nav-item.active {
  background: #CEE9FF !important;
  color: #175cd3 !important;
  box-shadow: inset 0 0 0 1px rgba(23, 92, 211, 0.22) !important;
}

body[data-app-entry="workforce"] .nav-item.active {
  background: #CEE9FF !important;
  color: rgb(23, 92, 211) !important;
  box-shadow: inset 0 0 0 1px rgba(23, 92, 211, 0.22) !important;
}

body[data-app-entry="sales"] .nav-item:hover .icon,
body[data-app-entry="sales"] .nav-item.active .icon,
body[data-app-entry="workforce"] .nav-item:hover .icon,
body[data-app-entry="workforce"] .nav-item.active .icon,
body[data-app-entry="service"] .nav-item:hover .icon,
body[data-app-entry="service"] .nav-item.active .icon {
  background: #ffffff !important;
  color: rgb(23, 92, 211) !important;
}

body[data-app-entry="sales"] .content,
body[data-app-entry="workforce"] .content,
body[data-app-entry="service"] .content {
  margin-left: 268px !important;
}

body[data-app-entry="sales"] .topbar,
body[data-app-entry="workforce"] .topbar,
body[data-app-entry="service"] .topbar {
  min-height: 64px !important;
  height: 64px !important;
  background: rgba(255, 255, 255, 0.92) !important;
  border-bottom: 1px solid var(--workspace-line) !important;
  box-shadow: none !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
}

body[data-app-entry="sales"] .topbar-title,
body[data-app-entry="workforce"] .topbar-title,
body[data-app-entry="service"] .topbar-title {
  color: var(--workspace-ink) !important;
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
}

body[data-app-entry="sales"] .topbar-title span,
body[data-app-entry="workforce"] .topbar-title span,
body[data-app-entry="service"] .topbar-title span {
  color: var(--workspace-muted) !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
}

body[data-app-entry="sales"] .page-inner,
body[data-app-entry="workforce"] .page-inner,
body[data-app-entry="service"] .page-inner {
  max-width: 1380px !important;
  margin: 0 auto !important;
  padding: 24px !important;
}

body[data-app-entry="sales"] .page-heading,
body[data-app-entry="workforce"] .page-heading,
body[data-app-entry="service"] .page-heading {
  color: var(--workspace-ink) !important;
  font-size: 1.55rem !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
  margin-bottom: 4px !important;
}

body[data-app-entry="sales"] .page-heading::after,
body[data-app-entry="workforce"] .page-heading::after,
body[data-app-entry="service"] .page-heading::after {
  display: none !important;
}

body[data-app-entry="sales"] .page-sub,
body[data-app-entry="workforce"] .page-sub,
body[data-app-entry="service"] .page-sub {
  color: var(--workspace-muted) !important;
  font-size: 0.9rem !important;
  margin-bottom: 20px !important;
}

body[data-app-entry="sales"] .card,
body[data-app-entry="sales"] .stat-card,
body[data-app-entry="sales"] .chart-container,
body[data-app-entry="sales"] .table-wrap,
body[data-app-entry="workforce"] .card,
body[data-app-entry="workforce"] .stat-card,
body[data-app-entry="workforce"] .chart-container,
body[data-app-entry="workforce"] .table-wrap,
body[data-app-entry="service"] .card,
body[data-app-entry="service"] .stat-card,
body[data-app-entry="service"] .chart-container,
body[data-app-entry="service"] .table-wrap {
  border: 1px solid var(--workspace-line) !important;
  border-radius: 8px !important;
  background: var(--workspace-panel) !important;
  box-shadow: var(--workspace-shadow) !important;
}

body[data-app-entry="sales"] .card,
body[data-app-entry="workforce"] .card,
body[data-app-entry="service"] .card {
  padding: 18px !important;
}

body[data-app-entry="sales"] .stat-card,
body[data-app-entry="workforce"] .stat-card,
body[data-app-entry="service"] .stat-card {
  padding: 16px !important;
}

body[data-app-entry="sales"] .stat-card:nth-child(6n+1),
body[data-app-entry="workforce"] .stat-card:nth-child(6n+1),
body[data-app-entry="service"] .stat-card:nth-child(6n+1) {
  background: linear-gradient(180deg, #ffffff 0%, #CEE9FF 210%) !important;
}

body[data-app-entry="sales"] .stat-card:nth-child(6n+2),
body[data-app-entry="workforce"] .stat-card:nth-child(6n+2),
body[data-app-entry="service"] .stat-card:nth-child(6n+2) {
  background: #E0F2FE !important;
}

body[data-app-entry="sales"] .stat-card:nth-child(6n+3),
body[data-app-entry="workforce"] .stat-card:nth-child(6n+3),
body[data-app-entry="service"] .stat-card:nth-child(6n+3) {
  background: #E0F2FE !important;
}

body[data-app-entry="sales"] .stat-card:nth-child(6n+4),
body[data-app-entry="workforce"] .stat-card:nth-child(6n+4),
body[data-app-entry="service"] .stat-card:nth-child(6n+4) {
  background: #E0F2FE !important;
}

body[data-app-entry="sales"] .card:hover,
body[data-app-entry="workforce"] .card:hover,
body[data-app-entry="service"] .card:hover,
body[data-app-entry="sales"] .chart-container:hover,
body[data-app-entry="workforce"] .chart-container:hover,
body[data-app-entry="service"] .chart-container:hover {
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08) !important;
}

body[data-app-entry="sales"] .card-title,
body[data-app-entry="workforce"] .card-title,
body[data-app-entry="service"] .card-title {
  color: var(--workspace-ink) !important;
  font-size: 0.96rem !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  margin-bottom: 14px !important;
}

body[data-app-entry="sales"] .stat-label,
body[data-app-entry="workforce"] .stat-label,
body[data-app-entry="service"] .stat-label {
  color: var(--workspace-muted) !important;
  font-size: 0.68rem !important;
  letter-spacing: 0.06em !important;
}

body[data-app-entry="sales"] .stat-value,
body[data-app-entry="workforce"] .stat-value,
body[data-app-entry="service"] .stat-value {
  color: var(--workspace-ink) !important;
  font-size: 1.55rem !important;
  letter-spacing: 0 !important;
}

body[data-app-entry="sales"] input,
body[data-app-entry="sales"] select,
body[data-app-entry="sales"] textarea,
body[data-app-entry="workforce"] input,
body[data-app-entry="workforce"] select,
body[data-app-entry="workforce"] textarea,
body[data-app-entry="service"] input,
body[data-app-entry="service"] select,
body[data-app-entry="service"] textarea {
  border-radius: 7px !important;
  border-color: #d0d5dd !important;
  background: #ffffff !important;
  min-height: 40px !important;
  box-shadow: none !important;
}

body[data-app-entry="sales"] input:focus,
body[data-app-entry="sales"] select:focus,
body[data-app-entry="sales"] textarea:focus,
body[data-app-entry="workforce"] input:focus,
body[data-app-entry="workforce"] select:focus,
body[data-app-entry="workforce"] textarea:focus,
body[data-app-entry="service"] input:focus,
body[data-app-entry="service"] select:focus,
body[data-app-entry="service"] textarea:focus {
  border-color: #84caff !important;
  box-shadow: 0 0 0 3px rgba(21, 112, 239, 0.12) !important;
}

body[data-app-entry="sales"] .btn,
body[data-app-entry="workforce"] .btn,
body[data-app-entry="service"] .btn {
  min-height: 38px !important;
  border-radius: 7px !important;
  box-shadow: none !important;
  font-size: 0.86rem !important;
}

body[data-app-entry="sales"] .btn-primary,
body[data-app-entry="sales"] button.btn-primary,
body[data-app-entry="workforce"] .btn-primary,
body[data-app-entry="workforce"] button.btn-primary,
body[data-app-entry="service"] .btn-primary,
body[data-app-entry="service"] button.btn-primary {
  background: rgb(23, 92, 211) !important;
  border-color: rgb(23, 92, 211) !important;
  color: #ffffff !important;
}

body[data-app-entry="sales"] .btn-primary:hover,
body[data-app-entry="sales"] button.btn-primary:hover,
body[data-app-entry="workforce"] .btn-primary:hover,
body[data-app-entry="workforce"] button.btn-primary:hover,
body[data-app-entry="service"] .btn-primary:hover,
body[data-app-entry="service"] button.btn-primary:hover {
  background: rgb(21, 80, 186) !important;
  border-color: rgb(21, 80, 186) !important;
  color: #ffffff !important;
}

body[data-app-entry="sales"] .btn-secondary,
body[data-app-entry="workforce"] .btn-secondary,
body[data-app-entry="service"] .btn-secondary {
  background: #E0F2FE !important;
  border-color: rgba(23, 92, 211, 0.18) !important;
  color: rgb(23, 92, 211) !important;
}

body[data-app-entry="sales"] .btn-secondary:hover,
body[data-app-entry="workforce"] .btn-secondary:hover,
body[data-app-entry="service"] .btn-secondary:hover {
  background: #CEE9FF !important;
  border-color: rgba(23, 92, 211, 0.24) !important;
  color: rgb(23, 92, 211) !important;
}

body[data-app-entry="sales"] .btn-outline,
body[data-app-entry="workforce"] .btn-outline,
body[data-app-entry="service"] .btn-outline {
  background: #ffffff !important;
  border-color: #CEE9FF !important;
  color: #344054 !important;
}

body[data-app-entry="sales"] .btn-outline:hover,
body[data-app-entry="workforce"] .btn-outline:hover,
body[data-app-entry="service"] .btn-outline:hover {
  background: #E0F2FE !important;
  border-color: #CEE9FF !important;
  color: #101828 !important;
}

body[data-app-entry="sales"] .btn-ghost,
body[data-app-entry="workforce"] .btn-ghost,
body[data-app-entry="service"] .btn-ghost {
  background: transparent !important;
  border-color: transparent !important;
  color: #475467 !important;
}

body[data-app-entry="sales"] .btn-ghost:hover,
body[data-app-entry="workforce"] .btn-ghost:hover,
body[data-app-entry="service"] .btn-ghost:hover {
  background: #E0F2FE !important;
  color: #101828 !important;
}

body[data-app-entry="sales"] table thead th,
body[data-app-entry="workforce"] table thead th,
body[data-app-entry="service"] table thead th {
  background: #f9fafb !important;
  color: #667085 !important;
  font-size: 0.72rem !important;
  letter-spacing: 0.05em !important;
}

body[data-app-entry="sales"] table td,
body[data-app-entry="sales"] table th,
body[data-app-entry="workforce"] table td,
body[data-app-entry="workforce"] table th,
body[data-app-entry="service"] table td,
body[data-app-entry="service"] table th {
  border-bottom: 1px solid var(--workspace-line) !important;
}

body[data-app-entry="sales"] .pill,
body[data-app-entry="workforce"] .pill,
body[data-app-entry="service"] .pill {
  border-radius: 999px !important;
  font-weight: 750 !important;
}

body[data-app-entry="sales"] .pill-green,
body[data-app-entry="workforce"] .pill-green,
body[data-app-entry="service"] .pill-green {
  background: #E0F2FE !important;
  color: rgb(23, 92, 211) !important;
}

body[data-app-entry="sales"] .pill-warn,
body[data-app-entry="workforce"] .pill-warn,
body[data-app-entry="service"] .pill-warn {
  background: #E0F2FE !important;
  color: rgb(23, 92, 211) !important;
}

body[data-app-entry="sales"] .pill-red,
body[data-app-entry="workforce"] .pill-red,
body[data-app-entry="service"] .pill-red {
  background: #E0F2FE !important;
  color: rgb(23, 92, 211) !important;
}

body[data-app-entry="sales"] .workforce-dashboard-hero,
body[data-app-entry="sales"] .payroll-command-bar,
body[data-app-entry="workforce"] .workforce-dashboard-hero,
body[data-app-entry="workforce"] .payroll-command-bar,
body[data-app-entry="service"] .workforce-dashboard-hero,
body[data-app-entry="service"] .payroll-command-bar {
  border-radius: 8px !important;
  background:
    linear-gradient(135deg, rgba(206, 233, 255, 0.72), rgba(234, 217, 254, 0.54)),
    #ffffff !important;
  box-shadow: var(--workspace-shadow) !important;
}

body[data-app-entry="sales"] .people-toolbar,
body[data-app-entry="workforce"] .people-toolbar,
body[data-app-entry="service"] .people-toolbar,
body[data-app-entry="sales"] .workforce-cycle-card,
body[data-app-entry="workforce"] .workforce-cycle-card,
body[data-app-entry="service"] .workforce-cycle-card,
body[data-app-entry="sales"] .workforce-checklist label,
body[data-app-entry="workforce"] .workforce-checklist label,
body[data-app-entry="service"] .workforce-checklist label,
body[data-app-entry="sales"] .workforce-policy-grid div,
body[data-app-entry="workforce"] .workforce-policy-grid div,
body[data-app-entry="service"] .workforce-policy-grid div,
body[data-app-entry="sales"] .app-access-option,
body[data-app-entry="workforce"] .app-access-option,
body[data-app-entry="service"] .app-access-option {
  background: #ffffff !important;
  border-color: var(--workspace-line) !important;
}

body[data-app-entry="sales"] .app-access-option:hover,
body[data-app-entry="workforce"] .app-access-option:hover,
body[data-app-entry="service"] .app-access-option:hover,
body[data-app-entry="sales"] .workforce-checklist label:hover,
body[data-app-entry="workforce"] .workforce-checklist label:hover,
body[data-app-entry="service"] .workforce-checklist label:hover {
  background: #E0F2FE !important;
}

@media (max-width: 900px) {

  body[data-app-entry="sales"] .content,
  body[data-app-entry="workforce"] .content,
  body[data-app-entry="service"] .content {
    margin-left: 0 !important;
  }

  body[data-app-entry="sales"] .page-inner,
  body[data-app-entry="workforce"] .page-inner,
  body[data-app-entry="service"] .page-inner {
    padding: 16px !important;
  }

  body[data-app-entry="sales"] .sidebar,
  body[data-app-entry="workforce"] .sidebar,
  body[data-app-entry="service"] .sidebar {
    width: min(268px, 88vw) !important;
  }
}

/* v133: flat pastel workspace, no gradients, no green accents */
body[data-app-entry="sales"],
body[data-app-entry="workforce"],
body[data-app-entry="service"] {
  --primary: rgb(23, 92, 211);
  --primary-dark: rgb(21, 80, 186);
  --primary-light: #CEE9FF;
  --accent: rgb(23, 92, 211);
  --green: rgb(23, 92, 211);
  --green-light: #E0F2FE;
  --workspace-bg: #f8fbff;
  --workspace-panel: #ffffff;
  --workspace-panel-soft: #f9fafb;
  --workspace-ink: #172033;
  --workspace-muted: #667085;
  --workspace-line: #e5e7eb;
  background: #f8fbff !important;
}

body[data-app-entry="sales"] .layout,
body[data-app-entry="sales"] .content,
body[data-app-entry="workforce"] .layout,
body[data-app-entry="workforce"] .content,
body[data-app-entry="service"] .layout,
body[data-app-entry="service"] .content,
body[data-app-entry="sales"] #login-overlay,
body[data-app-entry="workforce"] #login-overlay,
body[data-app-entry="service"] #login-overlay {
  background: #f8fbff !important;
}

body[data-app-entry="sales"] .card,
body[data-app-entry="sales"] .stat-card,
body[data-app-entry="sales"] .chart-container,
body[data-app-entry="sales"] .table-wrap,
body[data-app-entry="workforce"] .card,
body[data-app-entry="workforce"] .stat-card,
body[data-app-entry="workforce"] .chart-container,
body[data-app-entry="workforce"] .table-wrap,
body[data-app-entry="service"] .card,
body[data-app-entry="service"] .stat-card,
body[data-app-entry="service"] .chart-container,
body[data-app-entry="service"] .table-wrap {
  background: #ffffff !important;
}

body[data-app-entry="sales"] .stat-card:nth-child(6n+1),
body[data-app-entry="workforce"] .stat-card:nth-child(6n+1),
body[data-app-entry="service"] .stat-card:nth-child(6n+1) {
  background: #CEE9FF !important;
}

body[data-app-entry="sales"] .stat-card:nth-child(6n+2),
body[data-app-entry="workforce"] .stat-card:nth-child(6n+2),
body[data-app-entry="service"] .stat-card:nth-child(6n+2) {
  background: #E0F2FE !important;
}

body[data-app-entry="sales"] .stat-card:nth-child(6n+3),
body[data-app-entry="workforce"] .stat-card:nth-child(6n+3),
body[data-app-entry="service"] .stat-card:nth-child(6n+3) {
  background: #E0F2FE !important;
}

body[data-app-entry="sales"] .stat-card:nth-child(6n+4),
body[data-app-entry="workforce"] .stat-card:nth-child(6n+4),
body[data-app-entry="service"] .stat-card:nth-child(6n+4) {
  background: #E0F2FE !important;
}

body[data-app-entry="sales"] .stat-card:nth-child(6n+5),
body[data-app-entry="workforce"] .stat-card:nth-child(6n+5),
body[data-app-entry="service"] .stat-card:nth-child(6n+5) {
  background: #E0F2FE !important;
}

body[data-app-entry="sales"] .stat-card:nth-child(6n+6),
body[data-app-entry="workforce"] .stat-card:nth-child(6n+6),
body[data-app-entry="service"] .stat-card:nth-child(6n+6) {
  background: #E0F2FE !important;
}

body[data-app-entry="sales"] .workforce-dashboard-hero,
body[data-app-entry="sales"] .payroll-command-bar,
body[data-app-entry="workforce"] .workforce-dashboard-hero,
body[data-app-entry="workforce"] .payroll-command-bar,
body[data-app-entry="service"] .workforce-dashboard-hero,
body[data-app-entry="service"] .payroll-command-bar {
  background: #ffffff !important;
  border-left: 4px solid #CEE9FF !important;
}

body[data-app-entry="sales"] .nav-item:hover,
body[data-app-entry="workforce"] .nav-item:hover,
body[data-app-entry="service"] .nav-item:hover,
body[data-app-entry="sales"] .app-access-option:hover,
body[data-app-entry="workforce"] .app-access-option:hover,
body[data-app-entry="service"] .app-access-option:hover,
body[data-app-entry="sales"] .workforce-checklist label:hover,
body[data-app-entry="workforce"] .workforce-checklist label:hover,
body[data-app-entry="service"] .workforce-checklist label:hover {
  background: #E0F2FE !important;
}

body[data-app-entry="sales"] .btn-success,
body[data-app-entry="workforce"] .btn-success,
body[data-app-entry="service"] .btn-success,
body[data-app-entry="sales"] button.btn-success,
body[data-app-entry="workforce"] button.btn-success,
body[data-app-entry="service"] button.btn-success {
  background: rgb(23, 92, 211) !important;
  border-color: rgb(23, 92, 211) !important;
  color: #ffffff !important;
}

body[data-app-entry="sales"] .text-green,
body[data-app-entry="workforce"] .text-green,
body[data-app-entry="service"] .text-green,
body[data-app-entry="sales"] .amount-positive,
body[data-app-entry="workforce"] .amount-positive,
body[data-app-entry="service"] .amount-positive {
  color: rgb(23, 92, 211) !important;
}

body[data-app-entry="sales"] .pill-green,
body[data-app-entry="workforce"] .pill-green,
body[data-app-entry="service"] .pill-green {
  background: #E0F2FE !important;
  color: rgb(23, 92, 211) !important;
}

body.dark[data-app-entry="sales"],
body.dark[data-app-entry="workforce"],
body.dark[data-app-entry="service"] {
  --primary: #7db3ff;
  --primary-dark: #a8cbff;
  --primary-light: rgba(125, 179, 255, 0.16);
  --accent: #7db3ff;
  --green: #7db3ff;
  --green-light: rgba(125, 179, 255, 0.14);
  --workspace-bg: #0f172a;
  --workspace-panel: #111827;
  --workspace-panel-soft: #1f2937;
  --workspace-ink: #f8fafc;
  --workspace-muted: #cbd5e1;
  --workspace-line: rgba(226, 232, 240, 0.14);
  background: #0f172a !important;
}

body.dark[data-app-entry="sales"] .layout,
body.dark[data-app-entry="sales"] .content,
body.dark[data-app-entry="workforce"] .layout,
body.dark[data-app-entry="workforce"] .content,
body.dark[data-app-entry="service"] .layout,
body.dark[data-app-entry="service"] .content,
body.dark[data-app-entry="sales"] #login-overlay,
body.dark[data-app-entry="workforce"] #login-overlay,
body.dark[data-app-entry="service"] #login-overlay {
  background: #0f172a !important;
}

body.dark[data-app-entry="sales"] .sidebar,
body.dark[data-app-entry="sales"] .topbar,
body.dark[data-app-entry="sales"] .card,
body.dark[data-app-entry="sales"] .stat-card,
body.dark[data-app-entry="sales"] .chart-container,
body.dark[data-app-entry="sales"] .table-wrap,
body.dark[data-app-entry="sales"] .modal-content,
body.dark[data-app-entry="sales"] .login-box,
body.dark[data-app-entry="workforce"] .sidebar,
body.dark[data-app-entry="workforce"] .topbar,
body.dark[data-app-entry="workforce"] .card,
body.dark[data-app-entry="workforce"] .stat-card,
body.dark[data-app-entry="workforce"] .chart-container,
body.dark[data-app-entry="workforce"] .table-wrap,
body.dark[data-app-entry="workforce"] .modal-content,
body.dark[data-app-entry="workforce"] .login-box,
body.dark[data-app-entry="service"] .sidebar,
body.dark[data-app-entry="service"] .topbar,
body.dark[data-app-entry="service"] .card,
body.dark[data-app-entry="service"] .stat-card,
body.dark[data-app-entry="service"] .chart-container,
body.dark[data-app-entry="service"] .table-wrap,
body.dark[data-app-entry="service"] .modal-content,
body.dark[data-app-entry="service"] .login-box {
  background: #111827 !important;
  border-color: rgba(226, 232, 240, 0.14) !important;
  box-shadow: none !important;
}

body.dark[data-app-entry="sales"] .stat-card:nth-child(n),
body.dark[data-app-entry="workforce"] .stat-card:nth-child(n),
body.dark[data-app-entry="service"] .stat-card:nth-child(n) {
  background: #1f2937 !important;
}

body.dark[data-app-entry="sales"] .workforce-dashboard-hero,
body.dark[data-app-entry="sales"] .payroll-command-bar,
body.dark[data-app-entry="workforce"] .workforce-dashboard-hero,
body.dark[data-app-entry="workforce"] .payroll-command-bar,
body.dark[data-app-entry="service"] .workforce-dashboard-hero,
body.dark[data-app-entry="service"] .payroll-command-bar {
  background: #111827 !important;
  border-left-color: #7db3ff !important;
}

body.dark[data-app-entry="sales"] .nav-item.active,
body.dark[data-app-entry="workforce"] .nav-item.active,
body.dark[data-app-entry="service"] .nav-item.active {
  background: rgba(125, 179, 255, 0.16) !important;
  color: #dbeafe !important;
  box-shadow: inset 0 0 0 1px rgba(125, 179, 255, 0.28) !important;
}

body.dark[data-app-entry="sales"] .nav-item:hover,
body.dark[data-app-entry="workforce"] .nav-item:hover,
body.dark[data-app-entry="service"] .nav-item:hover {
  background: #1f2937 !important;
}

body.dark[data-app-entry="sales"] .btn-primary,
body.dark[data-app-entry="sales"] button.btn-primary,
body.dark[data-app-entry="workforce"] .btn-primary,
body.dark[data-app-entry="workforce"] button.btn-primary,
body.dark[data-app-entry="service"] .btn-primary,
body.dark[data-app-entry="service"] button.btn-primary,
body.dark[data-app-entry="sales"] .btn-success,
body.dark[data-app-entry="workforce"] .btn-success,
body.dark[data-app-entry="service"] .btn-success {
  background: #7db3ff !important;
  border-color: #7db3ff !important;
  color: #0f172a !important;
}

body.dark[data-app-entry="sales"] .btn-secondary,
body.dark[data-app-entry="workforce"] .btn-secondary,
body.dark[data-app-entry="service"] .btn-secondary {
  background: rgba(125, 179, 255, 0.14) !important;
  border-color: rgba(125, 179, 255, 0.22) !important;
  color: #7db3ff !important;
}

body.dark[data-app-entry="sales"] .btn-outline,
body.dark[data-app-entry="workforce"] .btn-outline,
body.dark[data-app-entry="service"] .btn-outline,
body.dark[data-app-entry="sales"] .btn-ghost,
body.dark[data-app-entry="workforce"] .btn-ghost,
body.dark[data-app-entry="service"] .btn-ghost {
  background: #1f2937 !important;
  border-color: rgba(226, 232, 240, 0.16) !important;
  color: #e2e8f0 !important;
}

body.dark[data-app-entry="sales"] input,
body.dark[data-app-entry="sales"] select,
body.dark[data-app-entry="sales"] textarea,
body.dark[data-app-entry="workforce"] input,
body.dark[data-app-entry="workforce"] select,
body.dark[data-app-entry="workforce"] textarea,
body.dark[data-app-entry="service"] input,
body.dark[data-app-entry="service"] select,
body.dark[data-app-entry="service"] textarea {
  background: #0f172a !important;
  border-color: rgba(226, 232, 240, 0.18) !important;
  color: #f8fafc !important;
}

body.dark[data-app-entry="sales"] table thead th,
body.dark[data-app-entry="workforce"] table thead th,
body.dark[data-app-entry="service"] table thead th {
  background: #1f2937 !important;
  color: #cbd5e1 !important;
}

/* v134: clean Workforce app cards and text-only aside navigation */
body[data-app-entry="workforce"] {
  --workforce-card-tint: rgb(205, 232, 254);
}

body[data-app-entry="workforce"] .sidebar .nav-item {
  gap: 0 !important;
  padding-left: 14px !important;
}

body[data-app-entry="workforce"] .sidebar .nav-item .icon {
  display: none !important;
}

body[data-app-entry="workforce"] .sidebar .nav-item span:not(.icon) {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-app-entry="workforce"] .stat-card:nth-child(n),
body[data-app-entry="workforce"] .workforce-cycle-card,
body[data-app-entry="workforce"] .workforce-process-strip div,
body[data-app-entry="workforce"] .payroll-run-steps div,
body[data-app-entry="workforce"] .workforce-checklist label,
body[data-app-entry="workforce"] .workforce-policy-grid div,
body[data-app-entry="workforce"] .app-access-option {
  background: var(--workforce-card-tint) !important;
  border-color: rgba(23, 92, 211, 0.16) !important;
}

body[data-app-entry="workforce"] .card,
body[data-app-entry="workforce"] .chart-container,
body[data-app-entry="workforce"] .table-wrap,
body[data-app-entry="workforce"] .payroll-run-card,
body[data-app-entry="workforce"] .payroll-preview-panel,
body[data-app-entry="workforce"] .people-toolbar,
body[data-app-entry="workforce"] .workforce-dashboard-hero,
body[data-app-entry="workforce"] .payroll-command-bar {
  background: #ffffff !important;
  border-color: #d7e7f5 !important;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.045) !important;
}

body[data-app-entry="workforce"] .workforce-dashboard-hero,
body[data-app-entry="workforce"] .payroll-command-bar {
  border-left: 4px solid var(--workforce-card-tint) !important;
}

body[data-app-entry="workforce"] table thead th {
  background: var(--workforce-card-tint) !important;
  color: #344054 !important;
}

body[data-app-entry="workforce"] .pill-green,
body[data-app-entry="workforce"] .pill-warn,
body[data-app-entry="workforce"] .pill-red,
body[data-app-entry="workforce"] .pill-blue {
  background: var(--workforce-card-tint) !important;
  color: rgb(23, 92, 211) !important;
}

body.dark[data-app-entry="workforce"] .stat-card:nth-child(n),
body.dark[data-app-entry="workforce"] .workforce-cycle-card,
body.dark[data-app-entry="workforce"] .workforce-process-strip div,
body.dark[data-app-entry="workforce"] .payroll-run-steps div,
body.dark[data-app-entry="workforce"] .workforce-checklist label,
body.dark[data-app-entry="workforce"] .workforce-policy-grid div,
body.dark[data-app-entry="workforce"] .app-access-option,
body.dark[data-app-entry="workforce"] table thead th {
  background: #1f2937 !important;
  border-color: rgba(205, 232, 254, 0.16) !important;
  color: #e2e8f0 !important;
}

body.dark[data-app-entry="workforce"] .card,
body.dark[data-app-entry="workforce"] .chart-container,
body.dark[data-app-entry="workforce"] .table-wrap,
body.dark[data-app-entry="workforce"] .payroll-run-card,
body.dark[data-app-entry="workforce"] .payroll-preview-panel,
body.dark[data-app-entry="workforce"] .people-toolbar,
body.dark[data-app-entry="workforce"] .workforce-dashboard-hero,
body.dark[data-app-entry="workforce"] .payroll-command-bar {
  background: #111827 !important;
  border-color: rgba(205, 232, 254, 0.14) !important;
  box-shadow: none !important;
}

/* v135: remove legacy green from app workspaces */
body[data-app-entry="sales"],
body[data-app-entry="workforce"],
body[data-app-entry="service"] {
  --green: rgb(23, 92, 211);
  --green-light: #E0F2FE;
  --veedesk-green: rgb(23, 92, 211);
  --accent: rgb(23, 92, 211);
  --pastel-green: #E0F2FE;
}

body[data-app-entry="sales"] .text-green,
body[data-app-entry="workforce"] .text-green,
body[data-app-entry="service"] .text-green,
body[data-app-entry="sales"] .amount-positive,
body[data-app-entry="workforce"] .amount-positive,
body[data-app-entry="service"] .amount-positive {
  color: rgb(23, 92, 211) !important;
}

body[data-app-entry="sales"] .pill-green,
body[data-app-entry="workforce"] .pill-green,
body[data-app-entry="service"] .pill-green {
  background: #E0F2FE !important;
  color: rgb(23, 92, 211) !important;
  border-color: rgba(23, 92, 211, 0.18) !important;
}

body[data-app-entry="sales"] .btn-success,
body[data-app-entry="workforce"] .btn-success,
body[data-app-entry="service"] .btn-success,
body[data-app-entry="sales"] button.btn-success,
body[data-app-entry="workforce"] button.btn-success,
body[data-app-entry="service"] button.btn-success {
  background: rgb(23, 92, 211) !important;
  border-color: rgb(23, 92, 211) !important;
  color: #ffffff !important;
}

body[data-app-entry="sales"] .stat-card:nth-child(6n+3),
body[data-app-entry="workforce"] .stat-card:nth-child(6n+3),
body[data-app-entry="service"] .stat-card:nth-child(6n+3),
body[data-app-entry="sales"] .stat-card:nth-child(6n+6),
body[data-app-entry="workforce"] .stat-card:nth-child(6n+6),
body[data-app-entry="service"] .stat-card:nth-child(6n+6) {
  background: #E0F2FE !important;
}

body.dark[data-app-entry="sales"],
body.dark[data-app-entry="workforce"],
body.dark[data-app-entry="service"] {
  --green: #7db3ff;
  --green-light: rgba(125, 179, 255, 0.14);
  --veedesk-green: #7db3ff;
  --accent: #7db3ff;
  --pastel-green: #1f2937;
}

body.dark[data-app-entry="sales"] .text-green,
body.dark[data-app-entry="workforce"] .text-green,
body.dark[data-app-entry="service"] .text-green,
body.dark[data-app-entry="sales"] .amount-positive,
body.dark[data-app-entry="workforce"] .amount-positive,
body.dark[data-app-entry="service"] .amount-positive {
  color: #7db3ff !important;
}

body.dark[data-app-entry="sales"] .pill-green,
body.dark[data-app-entry="workforce"] .pill-green,
body.dark[data-app-entry="service"] .pill-green {
  background: rgba(125, 179, 255, 0.14) !important;
  color: #7db3ff !important;
  border-color: rgba(125, 179, 255, 0.22) !important;
}

/* v136: Workforce responsive alignment and clean app polish */
body[data-app-entry="workforce"] {
  --sidebar-w: 248px;
  --workforce-card-tint: rgb(205, 232, 254);
  --workforce-soft: #f7fbff;
  --workforce-line: #d7e7f5;
  --workforce-ink: #172033;
  --workforce-muted: #667085;
  background: #f8fbff !important;
}

body[data-app-entry="workforce"] .layout {
  background: #f8fbff !important;
}

body[data-app-entry="workforce"] .content {
  background: #f8fbff !important;
  min-width: 0 !important;
}

body[data-app-entry="workforce"] .page-inner {
  width: 100% !important;
  max-width: 1280px !important;
  margin: 0 auto !important;
  padding: 26px 28px 40px !important;
}

body[data-app-entry="workforce"] .topbar {
  min-height: 68px !important;
  padding: 0 28px !important;
  border-bottom: 1px solid var(--workforce-line) !important;
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(10px);
}

body[data-app-entry="workforce"] .topbar-title {
  color: var(--workforce-ink) !important;
  font-size: 1.05rem !important;
  line-height: 1.25 !important;
}

body[data-app-entry="workforce"] .topbar-right {
  gap: 14px !important;
  min-width: 0 !important;
}

body[data-app-entry="workforce"] .sidebar {
  width: var(--sidebar-w) !important;
  border-right: 1px solid var(--workforce-line) !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

body[data-app-entry="workforce"] .sidebar-logo {
  min-height: 78px !important;
  padding: 18px 18px 14px !important;
  border-bottom: 1px solid var(--workforce-line) !important;
}

body[data-app-entry="workforce"] .app-wordmark {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

body[data-app-entry="workforce"] .sidebar-logo-wordmark {
  width: 36px !important;
  height: 36px !important;
  flex: 0 0 36px !important;
}

body[data-app-entry="workforce"] .app-wordmark strong {
  color: var(--workforce-ink) !important;
  font-size: 2rem !important;
  line-height: 1.1 !important;
}

body[data-app-entry="workforce"] .app-wordmark small {
  color: rgb(23, 92, 211) !important;
  font-size: .9rem !important;
  line-height: 1.1 !important;
  letter-spacing: 0 !important;
}

body[data-app-entry="workforce"] .nav-section {
  margin: 0 !important;
  padding: 4px 12px !important;
}

body[data-app-entry="workforce"] .nav-section:first-of-type {
  padding-top: 12px !important;
}

body[data-app-entry="workforce"] .nav-label {
  min-height: 34px !important;
  padding: 8px 6px !important;
  color: #667085 !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
}

body[data-app-entry="workforce"] .nav-item,
body[data-app-entry="workforce"] .nav-item[style] {
  width: 100% !important;
  min-height: 40px !important;
  margin: 2px 0 !important;
  padding: 10px 12px !important;
  border-radius: 8px !important;
  border: 1px solid transparent !important;
  color: #344054 !important;
  justify-content: flex-start !important;
  text-align: left !important;
  font-size: 0.86rem !important;
  font-weight: 700 !important;
}

body[data-app-entry="workforce"] .nav-item:hover {
  background: #E0F2FE !important;
  border-color: rgba(23, 92, 211, 0.12) !important;
  color: rgb(23, 92, 211) !important;
}

body[data-app-entry="workforce"] .nav-item.active {
  background: rgb(205, 232, 254) !important;
  border-color: rgba(23, 92, 211, 0.22) !important;
  color: rgb(23, 92, 211) !important;
  box-shadow: none !important;
}

body[data-app-entry="workforce"] .sidebar .btn-primary {
  min-height: 42px !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

body[data-app-entry="workforce"] .sidebar-footer {
  padding: 16px !important;
  border-top: 1px solid var(--workforce-line) !important;
}

body[data-app-entry="workforce"] .page {
  width: 100% !important;
}

body[data-app-entry="workforce"] .page-heading {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  color: var(--workforce-ink) !important;
  font-size: clamp(1.28rem, 1.05rem + 0.45vw, 1.72rem) !important;
  line-height: 1.2 !important;
  margin: 0 0 6px !important;
}

body[data-app-entry="workforce"] .page-heading i {
  color: rgb(23, 92, 211) !important;
}

body[data-app-entry="workforce"] .page-sub {
  color: var(--workforce-muted) !important;
  margin: 0 0 22px !important;
  max-width: 860px !important;
  line-height: 1.55 !important;
}

body[data-app-entry="workforce"] .workforce-dashboard-hero,
body[data-app-entry="workforce"] .payroll-command-bar,
body[data-app-entry="workforce"] .people-toolbar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 18px !important;
  padding: 22px !important;
  margin-bottom: 22px !important;
  border: 1px solid var(--workforce-line) !important;
  border-left: 4px solid rgb(205, 232, 254) !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04) !important;
}

body[data-app-entry="workforce"] .workforce-dashboard-hero h2,
body[data-app-entry="workforce"] .payroll-command-bar h2 {
  margin: 8px 0 6px !important;
  color: var(--workforce-ink) !important;
  font-size: clamp(1.22rem, 1.02rem + 0.55vw, 1.8rem) !important;
  line-height: 1.2 !important;
}

body[data-app-entry="workforce"] .workforce-dashboard-hero p,
body[data-app-entry="workforce"] .payroll-command-bar p,
body[data-app-entry="workforce"] .people-toolbar span {
  color: var(--workforce-muted) !important;
  max-width: 760px !important;
  line-height: 1.55 !important;
}

body[data-app-entry="workforce"] .service-stage-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 38px !important;
  height: 38px !important;
  border-radius: 8px !important;
  background: #E0F2FE !important;
  color: rgb(23, 92, 211) !important;
}

body[data-app-entry="workforce"] .workforce-hero-actions,
body[data-app-entry="workforce"] .payroll-command-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
}

body[data-app-entry="workforce"] .workforce-hero-actions .btn,
body[data-app-entry="workforce"] .payroll-command-actions .btn {
  min-height: 40px !important;
  white-space: nowrap !important;
}

body[data-app-entry="workforce"] .workforce-cycle-card {
  min-width: 230px !important;
  padding: 18px !important;
  border-radius: 8px !important;
  background: rgb(205, 232, 254) !important;
  border: 1px solid rgba(23, 92, 211, 0.16) !important;
  box-shadow: none !important;
}

body[data-app-entry="workforce"] .workforce-cycle-card span,
body[data-app-entry="workforce"] .workforce-cycle-card small {
  color: #4b5563 !important;
}

body[data-app-entry="workforce"] .workforce-cycle-card strong {
  color: #172033 !important;
  font-size: 1.45rem !important;
}

body[data-app-entry="workforce"] .dashboard-grid,
body[data-app-entry="workforce"] .payroll-summary-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 16px !important;
  margin: 0 0 22px !important;
}

body[data-app-entry="workforce"] .stat-card {
  min-width: 0 !important;
  min-height: 128px !important;
  padding: 18px !important;
  border-radius: 8px !important;
  background: rgb(205, 232, 254) !important;
  border: 1px solid rgba(23, 92, 211, 0.14) !important;
  box-shadow: none !important;
}

body[data-app-entry="workforce"] .stat-card .stat-label {
  color: #4b5563 !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
}

body[data-app-entry="workforce"] .stat-card .stat-value {
  color: rgb(23, 92, 211) !important;
  font-size: clamp(1.45rem, 1.12rem + 0.8vw, 2.1rem) !important;
  line-height: 1.12 !important;
}

body[data-app-entry="workforce"] .stat-card small {
  color: #4b5563 !important;
  line-height: 1.45 !important;
}

body[data-app-entry="workforce"] .workforce-process-strip,
body[data-app-entry="workforce"] .workforce-feature-grid,
body[data-app-entry="workforce"] .grid-2,
body[data-app-entry="workforce"] .payroll-workspace-grid {
  display: grid !important;
  gap: 16px !important;
  align-items: stretch !important;
}

body[data-app-entry="workforce"] .workforce-process-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  margin: 0 0 22px !important;
}

body[data-app-entry="workforce"] .workforce-feature-grid,
body[data-app-entry="workforce"] .grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body[data-app-entry="workforce"] .payroll-workspace-grid {
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.8fr) !important;
}

body[data-app-entry="workforce"] .card,
body[data-app-entry="workforce"] .chart-container,
body[data-app-entry="workforce"] .payroll-run-card,
body[data-app-entry="workforce"] .payroll-preview-panel {
  min-width: 0 !important;
  border-radius: 8px !important;
  border: 1px solid var(--workforce-line) !important;
  background: #ffffff !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04) !important;
}

body[data-app-entry="workforce"] .card-title {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  color: var(--workforce-ink) !important;
  line-height: 1.25 !important;
}

body[data-app-entry="workforce"] .card-title i,
body[data-app-entry="workforce"] .workforce-process-strip i,
body[data-app-entry="workforce"] .payroll-preview-title i {
  color: rgb(23, 92, 211) !important;
}

body[data-app-entry="workforce"] .workforce-process-strip div,
body[data-app-entry="workforce"] .payroll-run-steps div,
body[data-app-entry="workforce"] .workforce-checklist label,
body[data-app-entry="workforce"] .workforce-policy-grid div,
body[data-app-entry="workforce"] .app-access-option {
  min-width: 0 !important;
  border-radius: 8px !important;
  background: rgb(205, 232, 254) !important;
  border: 1px solid rgba(23, 92, 211, 0.14) !important;
}

body[data-app-entry="workforce"] .workforce-policy-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

body[data-app-entry="workforce"] .form-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

body[data-app-entry="workforce"] .payroll-form {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

body[data-app-entry="workforce"] .shift-attendance-notes,
body[data-app-entry="workforce"] .payroll-notes {
  grid-column: span 2 !important;
}

body[data-app-entry="workforce"] .shift-attendance-action {
  align-self: end !important;
}

body[data-app-entry="workforce"] .shift-attendance-action .btn {
  width: 100% !important;
}

body[data-app-entry="workforce"] input,
body[data-app-entry="workforce"] select,
body[data-app-entry="workforce"] textarea {
  min-width: 0 !important;
}

body[data-app-entry="workforce"] .table-wrap {
  width: 100% !important;
  overflow-x: auto !important;
  border-radius: 8px !important;
  border: 1px solid var(--workforce-line) !important;
  box-shadow: none !important;
}

body[data-app-entry="workforce"] table {
  width: 100% !important;
  min-width: 760px !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

body[data-app-entry="workforce"] table th,
body[data-app-entry="workforce"] table td {
  white-space: nowrap !important;
  vertical-align: middle !important;
}

body[data-app-entry="workforce"] table thead th {
  background: rgb(205, 232, 254) !important;
  color: #344054 !important;
}

body[data-app-entry="workforce"] #shift-summary-cards {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 16px !important;
  margin-bottom: 22px !important;
}

body.dark[data-app-entry="workforce"] {
  --workforce-soft: #0f172a;
  --workforce-line: rgba(226, 232, 240, 0.14);
  --workforce-ink: #f8fafc;
  --workforce-muted: #cbd5e1;
  background: #0f172a !important;
}

body.dark[data-app-entry="workforce"] .layout,
body.dark[data-app-entry="workforce"] .content {
  background: #0f172a !important;
}

body.dark[data-app-entry="workforce"] .topbar,
body.dark[data-app-entry="workforce"] .sidebar,
body.dark[data-app-entry="workforce"] .card,
body.dark[data-app-entry="workforce"] .chart-container,
body.dark[data-app-entry="workforce"] .payroll-run-card,
body.dark[data-app-entry="workforce"] .payroll-preview-panel,
body.dark[data-app-entry="workforce"] .workforce-dashboard-hero,
body.dark[data-app-entry="workforce"] .payroll-command-bar,
body.dark[data-app-entry="workforce"] .people-toolbar {
  background: #111827 !important;
  border-color: var(--workforce-line) !important;
  box-shadow: none !important;
}

body.dark[data-app-entry="workforce"] .stat-card,
body.dark[data-app-entry="workforce"] .workforce-cycle-card,
body.dark[data-app-entry="workforce"] .workforce-process-strip div,
body.dark[data-app-entry="workforce"] .payroll-run-steps div,
body.dark[data-app-entry="workforce"] .workforce-checklist label,
body.dark[data-app-entry="workforce"] .workforce-policy-grid div,
body.dark[data-app-entry="workforce"] .app-access-option,
body.dark[data-app-entry="workforce"] table thead th {
  background: #1f2937 !important;
  border-color: rgba(125, 179, 255, 0.18) !important;
}

@media (max-width: 1180px) {

  body[data-app-entry="workforce"] .dashboard-grid,
  body[data-app-entry="workforce"] .payroll-summary-grid,
  body[data-app-entry="workforce"] #shift-summary-cards,
  body[data-app-entry="workforce"] .workforce-process-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body[data-app-entry="workforce"] .payroll-workspace-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 900px) {
  body[data-app-entry="workforce"] .page-inner {
    padding: 20px 18px 34px !important;
  }

  body[data-app-entry="workforce"] .topbar {
    padding: 0 18px !important;
  }

  body[data-app-entry="workforce"] .workforce-dashboard-hero,
  body[data-app-entry="workforce"] .payroll-command-bar,
  body[data-app-entry="workforce"] .people-toolbar {
    grid-template-columns: 1fr !important;
    align-items: start !important;
  }

  body[data-app-entry="workforce"] .workforce-hero-actions,
  body[data-app-entry="workforce"] .payroll-command-actions {
    justify-content: flex-start !important;
  }

  body[data-app-entry="workforce"] .workforce-feature-grid,
  body[data-app-entry="workforce"] .grid-2,
  body[data-app-entry="workforce"] .workforce-policy-grid {
    grid-template-columns: 1fr !important;
  }

  body[data-app-entry="workforce"] .form-grid,
  body[data-app-entry="workforce"] .payroll-form {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body[data-app-entry="workforce"] .shift-attendance-notes,
  body[data-app-entry="workforce"] .payroll-notes {
    grid-column: span 2 !important;
  }
}

@media (max-width: 640px) {
  body[data-app-entry="workforce"] .page-inner {
    padding: 16px 12px 30px !important;
  }

  body[data-app-entry="workforce"] .topbar {
    min-height: 60px !important;
    padding: 0 12px !important;
  }

  body[data-app-entry="workforce"] .topbar-title {
    font-size: 0.95rem !important;
  }

  body[data-app-entry="workforce"] .topbar-right #today-date,
  body[data-app-entry="workforce"] .topbar-user-meta {
    display: none !important;
  }

  body[data-app-entry="workforce"] .workforce-dashboard-hero,
  body[data-app-entry="workforce"] .payroll-command-bar,
  body[data-app-entry="workforce"] .people-toolbar,
  body[data-app-entry="workforce"] .card,
  body[data-app-entry="workforce"] .payroll-run-card,
  body[data-app-entry="workforce"] .payroll-preview-panel {
    padding: 16px !important;
  }

  body[data-app-entry="workforce"] .dashboard-grid,
  body[data-app-entry="workforce"] .payroll-summary-grid,
  body[data-app-entry="workforce"] #shift-summary-cards,
  body[data-app-entry="workforce"] .workforce-process-strip,
  body[data-app-entry="workforce"] .form-grid,
  body[data-app-entry="workforce"] .payroll-form {
    grid-template-columns: 1fr !important;
  }

  body[data-app-entry="workforce"] .shift-attendance-notes,
  body[data-app-entry="workforce"] .payroll-notes {
    grid-column: auto !important;
  }

  body[data-app-entry="workforce"] .workforce-hero-actions .btn,
  body[data-app-entry="workforce"] .payroll-command-actions .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  body[data-app-entry="workforce"] .workforce-cycle-card {
    width: 100% !important;
    min-width: 0 !important;
  }

  body[data-app-entry="workforce"] table {
    min-width: 680px !important;
  }
}
