: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 */
}

.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: white;
  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: rgba(14, 30, 27, 0.96);
  border-color: rgba(237, 242, 241, 0.12);
}

@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;
  border-left-color: #00ea6b !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: rgba(255, 255, 255, 0.94) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18) !important;
}

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: #ffffff !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: 3in !important;
  }

  body.print-thermal #print-zone,
  body.print-thermal .invoice-sheet,
  body.print-thermal .tax-invoice-sheet {
    width: 3in !important;
    max-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(3in, calc(100vw - 4mm)) !important;
  max-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: 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: 3in !important;
    max-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: 0.98rem;
}

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;
  }
}
