/* Billing app tweaks on Maxton theme */
.main-content .card {
  border-radius: 0.75rem;
}
.stat-card h3, .stat-card h4 {
  font-size: 1.35rem;
  margin-bottom: 0;
}

/* Dashboard — 3D revenue cards (CSS-only, lightweight) */
.dash-rev-card {
  height: 100%;
  border-radius: 1rem;
  box-shadow:
    0 2px 4px rgba(15, 23, 42, 0.06),
    0 10px 28px -8px rgba(15, 23, 42, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  contain: layout style;
}

.dash-rev-card-inner {
  height: 100%;
  min-height: 108px;
  border-radius: 1rem;
  padding: 1.15rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  position: relative;
  overflow: hidden;
  color: #fff;
}

.dash-rev-card-inner::before {
  content: '';
  position: absolute;
  top: -35%;
  right: -15%;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  pointer-events: none;
}

.dash-rev-card-inner::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 40%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.12), transparent);
  pointer-events: none;
}

.dash-rev-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.22);
  box-shadow:
    0 6px 14px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  position: relative;
  z-index: 1;
}

.dash-rev-icon .material-icons-outlined {
  font-size: 26px;
  color: #fff;
}

.dash-rev-body {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.dash-rev-label {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.92;
}

.dash-rev-value {
  margin: 0.2rem 0 0.1rem;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  color: #fff !important;
}

.dash-rev-sub {
  font-size: 0.72rem;
  opacity: 0.85;
  display: block;
}

.dash-rev-card--today .dash-rev-card-inner {
  background: linear-gradient(145deg, #4338ca 0%, #6366f1 45%, #818cf8 100%);
}

.dash-rev-card--week .dash-rev-card-inner {
  background: linear-gradient(145deg, #047857 0%, #10b981 45%, #34d399 100%);
}

.dash-rev-card--month .dash-rev-card-inner {
  background: linear-gradient(145deg, #0369a1 0%, #0ea5e9 45%, #38bdf8 100%);
}

.dash-rev-card--year .dash-rev-card-inner {
  background: linear-gradient(145deg, #6d28d9 0%, #8b5cf6 45%, #a78bfa 100%);
}

@media (hover: hover) and (pointer: fine) {
  .dash-rev-card:hover {
    transform: translateY(-4px);
    box-shadow:
      0 4px 8px rgba(15, 23, 42, 0.08),
      0 16px 36px -10px rgba(15, 23, 42, 0.28);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dash-rev-card {
    transition: none;
  }

  .dash-rev-card:hover {
    transform: none;
  }
}

@media (max-width: 575px) {
  .dash-rev-value {
    font-size: 1.15rem;
  }

  .dash-rev-card-inner {
    min-height: 100px;
    padding: 1rem;
  }
}

/* Dashboard — inventory & customers (frosted bento tiles) */
.dash-metric-panel {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.96)),
    radial-gradient(circle at 12% 18%, rgba(99, 102, 241, 0.06), transparent 42%),
    radial-gradient(circle at 88% 82%, rgba(16, 185, 129, 0.05), transparent 40%);
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 1.15rem;
  padding: 0.9rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 8px 24px -14px rgba(15, 23, 42, 0.18);
}

.dash-metric {
  --metric-color: #6366f1;
  --metric-bg: rgba(99, 102, 241, 0.1);
  --metric-glow: rgba(99, 102, 241, 0.14);
  height: 100%;
  min-height: 124px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 0.95rem;
  padding: 0.85rem 0.8rem 0.75rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  contain: layout style;
}

.dash-metric::before {
  content: '';
  position: absolute;
  right: -18px;
  bottom: -22px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--metric-glow);
  pointer-events: none;
}

.dash-metric-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--metric-color), transparent 88%);
}

.dash-metric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.55rem;
  position: relative;
  z-index: 1;
}

.dash-metric-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--metric-bg);
  color: var(--metric-color);
  border: 1px solid color-mix(in srgb, var(--metric-color) 18%, transparent);
}

.dash-metric-icon .material-icons-outlined {
  font-size: 18px;
}

.dash-metric-tag {
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #94a3b8;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.dash-metric-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  position: relative;
  z-index: 1;
}

.dash-metric-value {
  margin: 0.2rem 0 0.12rem;
  font-size: 1.34rem;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: #0f172a !important;
  position: relative;
  z-index: 1;
}

.dash-metric-value--money {
  font-size: 0.98rem;
  letter-spacing: -0.01em;
}

.dash-metric-foot {
  font-size: 0.62rem;
  font-weight: 500;
  color: #94a3b8;
  position: relative;
  z-index: 1;
}

.dash-metric--products {
  --metric-color: #0d9488;
  --metric-bg: rgba(13, 148, 136, 0.1);
  --metric-glow: rgba(13, 148, 136, 0.12);
}

.dash-metric--variants {
  --metric-color: #0284c7;
  --metric-bg: rgba(2, 132, 199, 0.1);
  --metric-glow: rgba(2, 132, 199, 0.12);
}

.dash-metric--customers {
  --metric-color: #7c3aed;
  --metric-bg: rgba(124, 58, 237, 0.1);
  --metric-glow: rgba(124, 58, 237, 0.12);
}

.dash-metric--low {
  --metric-color: #d97706;
  --metric-bg: rgba(217, 119, 6, 0.1);
  --metric-glow: rgba(217, 119, 6, 0.12);
}

.dash-metric--out {
  --metric-color: #dc2626;
  --metric-bg: rgba(220, 38, 38, 0.1);
  --metric-glow: rgba(220, 38, 38, 0.12);
}

.dash-metric--value {
  --metric-color: #059669;
  --metric-bg: rgba(5, 150, 105, 0.1);
  --metric-glow: rgba(5, 150, 105, 0.12);
}

.dash-metric--products .dash-metric-value { color: #0f766e !important; }
.dash-metric--variants .dash-metric-value { color: #0369a1 !important; }
.dash-metric--customers .dash-metric-value { color: #6d28d9 !important; }
.dash-metric--low .dash-metric-value { color: #b45309 !important; }
.dash-metric--out .dash-metric-value { color: #b91c1c !important; }
.dash-metric--value .dash-metric-value { color: #047857 !important; }

.dash-metric--alert-active {
  border-color: color-mix(in srgb, var(--metric-color) 35%, #fff);
  box-shadow:
    0 4px 14px rgba(15, 23, 42, 0.05),
    0 0 0 1px color-mix(in srgb, var(--metric-color) 22%, transparent),
    0 0 20px var(--metric-glow);
}

.dash-metric--alert-active .dash-metric-icon {
  animation: dashMetricPulse 2.2s ease-in-out infinite;
}

@keyframes dashMetricPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

@media (hover: hover) and (pointer: fine) {
  .dash-metric:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--metric-color) 28%, #e2e8f0);
    box-shadow:
      0 10px 22px -10px rgba(15, 23, 42, 0.16),
      0 0 0 1px color-mix(in srgb, var(--metric-color) 12%, transparent);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dash-metric {
    transition: none;
  }

  .dash-metric:hover {
    transform: none;
  }

  .dash-metric--alert-active .dash-metric-icon {
    animation: none;
  }
}

@media (max-width: 575px) {
  .dash-metric-panel {
    padding: 0.65rem;
  }

  .dash-metric {
    min-height: 112px;
    padding: 0.75rem 0.65rem 0.65rem;
  }

  .dash-metric-value {
    font-size: 1.15rem;
  }

  .dash-metric-value--money {
    font-size: 0.84rem;
  }
}

/* Dashboard — supplier payables (3D CSS cards) */
.dash-sup-panel {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.98)),
    radial-gradient(circle at 8% 12%, rgba(239, 68, 68, 0.05), transparent 40%),
    radial-gradient(circle at 92% 88%, rgba(16, 185, 129, 0.05), transparent 38%);
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 1.15rem;
  padding: 1rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 10px 28px -16px rgba(15, 23, 42, 0.2);
}

.dash-sup-panel-note {
  margin: 0;
  color: #64748b;
}

.dash-sup-panel-link {
  font-weight: 600;
  text-decoration: none;
  margin-left: 0.35rem;
}

.dash-sup-card {
  height: 100%;
  border-radius: 1rem;
  box-shadow:
    0 2px 4px rgba(15, 23, 42, 0.06),
    0 10px 24px -8px rgba(15, 23, 42, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  contain: layout style;
}

.dash-sup-card-inner {
  height: 100%;
  min-height: 112px;
  border-radius: 1rem;
  padding: 1rem 1.05rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  position: relative;
  overflow: hidden;
  color: #fff;
}

.dash-sup-card-inner::before {
  content: '';
  position: absolute;
  top: -38%;
  right: -14%;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.13);
  pointer-events: none;
}

.dash-sup-card-inner::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.12), transparent);
  pointer-events: none;
}

.dash-sup-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.22);
  box-shadow:
    0 5px 12px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.38);
  position: relative;
  z-index: 1;
}

.dash-sup-icon .material-icons-outlined {
  font-size: 23px;
  color: #fff;
}

.dash-sup-body {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.dash-sup-label {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.92;
}

.dash-sup-value {
  margin: 0.18rem 0 0.08rem;
  font-size: 1.22rem;
  font-weight: 800;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  color: #fff !important;
}

.dash-sup-sub {
  font-size: 0.64rem;
  opacity: 0.86;
  display: block;
  line-height: 1.35;
}

.dash-sup-card--due .dash-sup-card-inner {
  background: linear-gradient(145deg, #b91c1c 0%, #ef4444 48%, #fca5a5 100%);
}

.dash-sup-card--count .dash-sup-card-inner {
  background: linear-gradient(145deg, #b45309 0%, #f59e0b 48%, #fcd34d 100%);
}

.dash-sup-card--paid .dash-sup-card-inner {
  background: linear-gradient(145deg, #047857 0%, #10b981 48%, #6ee7b7 100%);
}

.dash-sup-card--today .dash-sup-card-inner {
  background: linear-gradient(145deg, #1d4ed8 0%, #3b82f6 48%, #93c5fd 100%);
}

.dash-sup-card--alert {
  box-shadow:
    0 2px 4px rgba(15, 23, 42, 0.06),
    0 10px 24px -8px rgba(15, 23, 42, 0.18),
    0 0 0 2px rgba(255, 255, 255, 0.5),
    0 0 20px rgba(239, 68, 68, 0.28);
}

.dash-sup-card--paid.dash-sup-card--active {
  box-shadow:
    0 2px 4px rgba(15, 23, 42, 0.06),
    0 10px 24px -8px rgba(15, 23, 42, 0.18),
    0 0 0 2px rgba(255, 255, 255, 0.5),
    0 0 18px rgba(16, 185, 129, 0.3);
}

.dash-sup-table-card {
  border-radius: 1rem;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow:
    0 2px 4px rgba(15, 23, 42, 0.04),
    0 12px 28px -12px rgba(15, 23, 42, 0.14);
  overflow: hidden;
}

.dash-sup-table-card--due {
  border-top: 3px solid #ef4444;
}

.dash-sup-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.15rem 1.25rem 0.65rem;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.dash-sup-table-head h5 {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.dash-sup-table-card--due .dash-sup-table-head h5 {
  color: #b91c1c;
}

.dash-sup-table-body {
  padding: 0 1.25rem 1.15rem;
}

@media (hover: hover) and (pointer: fine) {
  .dash-sup-card:hover {
    transform: translateY(-3px);
    box-shadow:
      0 4px 8px rgba(15, 23, 42, 0.08),
      0 16px 32px -10px rgba(15, 23, 42, 0.24);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dash-sup-card {
    transition: none;
  }

  .dash-sup-card:hover {
    transform: none;
  }
}

@media (max-width: 575px) {
  .dash-sup-panel {
    padding: 0.75rem;
  }

  .dash-sup-card-inner {
    min-height: 104px;
    padding: 0.9rem;
  }

  .dash-sup-value {
    font-size: 1.05rem;
  }
}

/* Dashboard — stock alert tables */
.dash-stock-card {
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow:
    0 2px 4px rgba(15, 23, 42, 0.04),
    0 12px 28px -12px rgba(15, 23, 42, 0.12);
  contain: layout style;
}

.dash-stock-card--low {
  background: linear-gradient(180deg, #fff7ed 0%, #fffbeb 42%, #ffffff 100%);
  border-top: 3px solid #f59e0b;
}

.dash-stock-card--out {
  background: linear-gradient(180deg, #fef2f2 0%, #fff1f2 38%, #ffffff 100%);
  border-top: 3px solid #ef4444;
}

.dash-stock-card--low.dash-stock-card--has-items {
  box-shadow:
    0 2px 4px rgba(15, 23, 42, 0.04),
    0 12px 28px -12px rgba(245, 158, 11, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.dash-stock-card--out.dash-stock-card--has-items {
  box-shadow:
    0 2px 4px rgba(15, 23, 42, 0.04),
    0 12px 28px -12px rgba(239, 68, 68, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.dash-stock-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.1rem 1.25rem 0.65rem;
}

.dash-stock-card-head h5 {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}

.dash-stock-card-head h5 .material-icons-outlined {
  font-size: 1.15rem;
}

.dash-stock-card--low .dash-stock-card-head h5 {
  color: #b45309;
}

.dash-stock-card--out .dash-stock-card-head h5 {
  color: #b91c1c;
}

.dash-stock-card-body {
  padding: 0 1.15rem 1.1rem;
}

.dash-stock-table thead th {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  border-bottom-width: 1px;
  background: transparent;
}

.dash-stock-card--low .dash-stock-table thead th {
  border-bottom-color: rgba(245, 158, 11, 0.22);
}

.dash-stock-card--out .dash-stock-table thead th {
  border-bottom-color: rgba(239, 68, 68, 0.18);
}

.dash-stock-table tbody td {
  border-bottom-color: rgba(15, 23, 42, 0.05);
  font-size: 0.84rem;
}

.dash-stock-card--low .dash-stock-table tbody tr:hover td {
  background: rgba(254, 243, 199, 0.35);
}

.dash-stock-card--out .dash-stock-table tbody tr:hover td {
  background: rgba(254, 226, 226, 0.35);
}

.dash-stock-qty-badge {
  background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
  color: #78350f !important;
  font-weight: 700;
  border: 1px solid rgba(180, 83, 9, 0.2);
}

.dash-stock-empty {
  color: #94a3b8 !important;
  font-size: 0.85rem;
  padding: 1.5rem 0.5rem !important;
}

/* Dashboard — chart cards (collections trend / modes) */
.dash-chart-card {
  border-radius: 1rem;
  background: #ffffff;
  color: #1e293b;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow:
    0 2px 4px rgba(15, 23, 42, 0.04),
    0 12px 28px -10px rgba(15, 23, 42, 0.14);
  overflow: hidden;
  contain: layout style;
}

[data-bs-theme=dark] .dash-chart-card,
[data-bs-theme=semi-dark] .dash-chart-card {
  background: #ffffff;
  color: #1e293b;
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow:
    0 2px 4px rgba(15, 23, 42, 0.06),
    0 12px 28px -10px rgba(15, 23, 42, 0.16);
}

.dash-chart-card-head h5 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0;
  color: #0f172a !important;
}

.dash-chart-stat-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b !important;
}

.dash-chart-canvas {
  position: relative;
  background: transparent;
  min-height: 300px;
}

.dash-chart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  padding: 2rem 1rem;
  text-align: center;
  color: #64748b;
}

.dash-chart-empty .material-icons-outlined {
  font-size: 2.5rem;
  opacity: 0.35;
  margin-bottom: 0.75rem;
}

.dash-chart-empty p {
  font-size: 0.9rem;
  max-width: 16rem;
}

.dash-chart-canvas .apexcharts-canvas,
.dash-chart-canvas .apexcharts-inner,
.dash-chart-canvas svg {
  background: transparent !important;
}

.dash-chart-card--collections {
  border-top: 3px solid #10b981;
}

.dash-chart-card--modes {
  border-top: 3px solid #2563eb;
}

.dash-chart-card--sales {
  border-top: 3px solid #6366f1;
}

/* Last 7 Days Sales — 3D daily pillars */
.dash-chart-card--sales-3d {
  background: linear-gradient(165deg, #ffffff 0%, #f8fafc 55%, #f1f5f9 100%);
  box-shadow:
    0 2px 4px rgba(15, 23, 42, 0.05),
    0 14px 32px -12px rgba(67, 56, 202, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  contain: layout style;
}

.dash-chart-card--sales-3d .dash-chart-card-body {
  padding: 0.25rem 0.75rem 1rem;
  background:
    radial-gradient(ellipse 85% 55% at 50% 100%, rgba(99, 102, 241, 0.09), transparent 72%),
    radial-gradient(ellipse 40% 35% at 85% 85%, rgba(129, 140, 248, 0.06), transparent 70%);
}

.dash-sales-3d {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  padding: 0.25rem 0 0.35rem;
}

.dash-sales-3d-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  margin-bottom: 0.65rem;
}

.dash-sales-3d-chip {
  font-size: 0.72rem;
  font-weight: 600;
  color: #4338ca;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(99, 102, 241, 0.14);
  box-shadow: 0 2px 8px rgba(67, 56, 202, 0.08);
}

.dash-sales-3d-chip strong {
  font-weight: 800;
}

.dash-sales-3d-chip--muted {
  color: #64748b;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.dash-sales-3d-stage {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.35rem;
  width: 100%;
  min-height: 210px;
  padding: 0.25rem 0.15rem 0.5rem;
  perspective: 800px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.dash-sales-3d-pillar {
  flex: 1 1 0;
  min-width: 46px;
  max-width: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  cursor: default;
}

.dash-sales-3d-pillar-block {
  --h: 30;
  --delay: 0s;
  --bar-h: calc(var(--h) * 1.45px);
  position: relative;
  width: 38px;
  height: var(--bar-h);
  min-height: 28px;
  max-height: 158px;
  transform-style: preserve-3d;
  transform: rotateX(12deg) rotateY(-18deg);
  margin-bottom: 0.45rem;
  animation: dashSalesBarGrow 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--delay);
}

.dash-sales-3d-body {
  position: absolute;
  inset: 0;
  border-radius: 5px 5px 3px 3px;
  transform: translateZ(10px);
  background: linear-gradient(180deg, #a5b4fc 0%, #6366f1 40%, #4338ca 100%);
  box-shadow:
    0 8px 18px rgba(67, 56, 202, 0.2),
    inset 2px 0 0 rgba(255, 255, 255, 0.22),
    inset 0 2px 0 rgba(255, 255, 255, 0.12);
}

.dash-sales-3d-pillar--peak .dash-sales-3d-body {
  background: linear-gradient(180deg, #fcd34d 0%, #6366f1 28%, #4338ca 100%);
  box-shadow:
    0 10px 22px rgba(67, 56, 202, 0.28),
    0 0 0 1px rgba(251, 191, 36, 0.35),
    inset 2px 0 0 rgba(255, 255, 255, 0.28);
}

.dash-sales-3d-cap {
  position: absolute;
  top: -9px;
  left: 1px;
  width: 38px;
  height: 10px;
  border-radius: 3px 3px 0 0;
  transform: translateZ(14px) rotateX(58deg);
  transform-origin: bottom center;
  background: linear-gradient(135deg, #c7d2fe, #818cf8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.dash-sales-3d-pillar--peak .dash-sales-3d-cap {
  background: linear-gradient(135deg, #fde68a, #fbbf24);
}

.dash-sales-3d-side {
  position: absolute;
  top: 0;
  right: -11px;
  width: 11px;
  height: 100%;
  border-radius: 0 3px 3px 0;
  transform: rotateY(78deg);
  transform-origin: left center;
  background: linear-gradient(180deg, #4f46e5, #312e81);
  box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.08);
}

.dash-sales-3d-pillar-block::after {
  content: '';
  position: absolute;
  left: -4px;
  right: -4px;
  bottom: -8px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(15, 23, 42, 0.2), transparent 70%);
  transform: translateZ(-3px) rotateX(78deg);
  filter: blur(1px);
}

.dash-sales-3d-peak-badge {
  position: absolute;
  top: -0.15rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  font-size: 0.52rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #92400e;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  border: 1px solid rgba(251, 191, 36, 0.5);
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.25);
  white-space: nowrap;
}

.dash-sales-3d-pct {
  font-size: 0.72rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #4338ca;
  line-height: 1;
  margin-bottom: 0.3rem;
  position: relative;
  z-index: 2;
}

.dash-sales-3d-pct--zero {
  color: #94a3b8;
  font-weight: 600;
}

.dash-sales-3d-pillar--peak .dash-sales-3d-pct {
  color: #b45309;
}

.dash-sales-3d-day {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.dash-sales-3d-amt {
  font-size: 0.68rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #4338ca;
  line-height: 1.2;
  margin-top: 0.08rem;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-sales-3d-amt--zero {
  color: #cbd5e1;
  font-weight: 600;
}

@keyframes dashSalesBarGrow {
  from {
    opacity: 0;
    transform: rotateX(12deg) rotateY(-18deg) scaleY(0.12);
    transform-origin: bottom center;
  }
  to {
    opacity: 1;
    transform: rotateX(12deg) rotateY(-18deg) scaleY(1);
    transform-origin: bottom center;
  }
}

@media (hover: hover) and (pointer: fine) {
  .dash-chart-card--sales-3d:hover {
    transform: translateY(-3px);
    box-shadow:
      0 4px 8px rgba(15, 23, 42, 0.06),
      0 20px 40px -12px rgba(67, 56, 202, 0.26);
  }

  .dash-sales-3d-pillar:hover .dash-sales-3d-pillar-block {
    transform: rotateX(10deg) rotateY(-14deg) translateY(-3px);
    transition: transform 0.18s ease;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dash-sales-3d-pillar-block {
    animation: none;
  }

  .dash-chart-card--sales-3d {
    transition: none;
  }

  .dash-chart-card--sales-3d:hover {
    transform: none;
  }
}

@media (max-width: 575px) {
  .dash-sales-3d-stage {
    justify-content: flex-start;
    padding-bottom: 0.35rem;
  }

  .dash-sales-3d-pillar {
    min-width: 52px;
  }

  .dash-sales-3d-chip {
    font-size: 0.68rem;
  }
}

.dash-chart-card--compare {
  border-top: 3px solid #8b5cf6;
}

/* Sales vs Collections — 3D pillar comparison */
.dash-chart-card--compare-3d {
  background: linear-gradient(165deg, #ffffff 0%, #f8fafc 55%, #f1f5f9 100%);
  box-shadow:
    0 2px 4px rgba(15, 23, 42, 0.05),
    0 14px 32px -12px rgba(91, 33, 182, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  contain: layout style;
}

.dash-chart-card--compare-3d .dash-chart-card-body {
  padding: 0.25rem 0.5rem 1rem;
  background:
    radial-gradient(ellipse 80% 55% at 50% 100%, rgba(99, 102, 241, 0.07), transparent 70%),
    radial-gradient(ellipse 60% 40% at 20% 90%, rgba(16, 185, 129, 0.05), transparent 70%);
}

.dash-compare-3d {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.35rem 0.5rem 0.5rem;
}

.dash-compare-3d-rate {
  margin-bottom: 0.35rem;
}

.dash-compare-3d-rate-ring {
  --rate: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: conic-gradient(
    #10b981 calc(var(--rate) * 1%),
    #e2e8f0 calc(var(--rate) * 1%)
  );
  box-shadow:
    0 8px 20px rgba(16, 185, 129, 0.2),
    inset 0 2px 4px rgba(255, 255, 255, 0.6);
}

.dash-compare-3d-rate-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffffff, #f1f5f9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  line-height: 1.1;
}

.dash-compare-3d-rate-inner strong {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f766e;
}

.dash-compare-3d-rate-inner small {
  font-size: 0.58rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.dash-compare-3d-stage {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  min-height: 200px;
  padding: 0.5rem 0.25rem 0.75rem;
  perspective: 700px;
}

.dash-compare-3d-pillar {
  flex: 1;
  max-width: 108px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dash-compare-3d-pillar-block {
  --h: 40;
  --bar-h: calc(var(--h) * 1.55px);
  position: relative;
  width: 54px;
  height: var(--bar-h);
  min-height: 34px;
  max-height: 168px;
  transform-style: preserve-3d;
  transform: rotateX(14deg) rotateY(-20deg);
  margin-bottom: 0.65rem;
  animation: dashCompareBarGrow 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.dash-compare-3d-body {
  position: absolute;
  inset: 0;
  border-radius: 6px 6px 4px 4px;
  transform: translateZ(12px);
  box-shadow:
    0 10px 22px rgba(15, 23, 42, 0.18),
    inset 2px 0 0 rgba(255, 255, 255, 0.22),
    inset 0 2px 0 rgba(255, 255, 255, 0.12);
}

.dash-compare-3d-pillar--sales .dash-compare-3d-body {
  background: linear-gradient(180deg, #a5b4fc 0%, #6366f1 38%, #4338ca 100%);
}

.dash-compare-3d-pillar--collections .dash-compare-3d-body {
  background: linear-gradient(180deg, #6ee7b7 0%, #10b981 38%, #047857 100%);
}

.dash-compare-3d-cap {
  position: absolute;
  top: -11px;
  left: 2px;
  width: 54px;
  height: 12px;
  border-radius: 4px 4px 0 0;
  transform: translateZ(18px) rotateX(58deg);
  transform-origin: bottom center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.dash-compare-3d-pillar--sales .dash-compare-3d-cap {
  background: linear-gradient(135deg, #c7d2fe, #818cf8);
}

.dash-compare-3d-pillar--collections .dash-compare-3d-cap {
  background: linear-gradient(135deg, #a7f3d0, #34d399);
}

.dash-compare-3d-side {
  position: absolute;
  top: 0;
  right: -14px;
  width: 14px;
  height: 100%;
  border-radius: 0 4px 4px 0;
  transform: rotateY(78deg);
  transform-origin: left center;
  box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.08);
}

.dash-compare-3d-pillar--sales .dash-compare-3d-side {
  background: linear-gradient(180deg, #4f46e5, #312e81);
}

.dash-compare-3d-pillar--collections .dash-compare-3d-side {
  background: linear-gradient(180deg, #059669, #064e3b);
}

.dash-compare-3d-pillar-block::after {
  content: '';
  position: absolute;
  left: -6px;
  right: -6px;
  bottom: -10px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(15, 23, 42, 0.22), transparent 70%);
  transform: translateZ(-4px) rotateX(78deg);
  filter: blur(1px);
}

.dash-compare-3d-meta {
  text-align: center;
  position: relative;
  z-index: 2;
}

.dash-compare-3d-meta-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.dash-compare-3d-meta-value {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
  line-height: 1.25;
  margin-top: 0.1rem;
}

.dash-compare-3d-pillar--sales .dash-compare-3d-meta-value {
  color: #4338ca;
}

.dash-compare-3d-pillar--collections .dash-compare-3d-meta-value {
  color: #047857;
}

.dash-compare-3d-vs {
  align-self: center;
  margin-bottom: 3.5rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #94a3b8;
  padding: 0.25rem 0.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.dash-compare-3d-footnote {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  text-align: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

@keyframes dashCompareBarGrow {
  from {
    opacity: 0;
    transform: rotateX(14deg) rotateY(-20deg) scaleY(0.15);
    transform-origin: bottom center;
  }
  to {
    opacity: 1;
    transform: rotateX(14deg) rotateY(-20deg) scaleY(1);
    transform-origin: bottom center;
  }
}

@media (hover: hover) and (pointer: fine) {
  .dash-chart-card--compare-3d:hover {
    transform: translateY(-3px);
    box-shadow:
      0 4px 8px rgba(15, 23, 42, 0.06),
      0 20px 40px -12px rgba(91, 33, 182, 0.24);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dash-compare-3d-pillar-block {
    animation: none;
  }

  .dash-chart-card--compare-3d {
    transition: none;
  }

  .dash-chart-card--compare-3d:hover {
    transform: none;
  }
}

.dash-chart-icon--purple {
  background: linear-gradient(145deg, #4f46e5, #818cf8);
}

.dash-chart-icon--violet {
  background: linear-gradient(145deg, #7c3aed, #a78bfa);
}

.dash-chart-card-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem 1rem;
  padding: 1.15rem 1.25rem 0.75rem;
}

.dash-chart-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.dash-chart-icon .material-icons-outlined {
  font-size: 18px;
  color: #fff;
}

.dash-chart-icon--green {
  background: linear-gradient(145deg, #059669, #34d399);
}

.dash-chart-icon--blue {
  background: linear-gradient(145deg, #2563eb, #60a5fa);
}

.dash-chart-stat-value {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}

.dash-chart-card-body {
  padding: 0 0.75rem 1rem;
}

@media (max-width: 991px) {
  .dash-chart-card-head {
    padding: 1rem 1rem 0.65rem;
  }

  .dash-chart-stat-value {
    font-size: 1rem;
  }
}

.bg-light-warning {
  background-color: rgba(255, 193, 7, 0.12);
}
.bg-light-danger {
  background-color: rgba(220, 53, 69, 0.1);
}
.table > :not(caption) > * > * {
  vertical-align: middle;
}
#loginMsg .alert {
  border-radius: 0.5rem;
}
.z-999 {
  z-index: 999;
}

/* Add Product modal — sectioned layout */
#addProductModal .modal-title {
  font-size: 1.4rem;
  font-weight: 600;
}
#addProductModal .modal-subtitle {
  font-size: 0.95rem;
  color: var(--bs-secondary-color);
}
#addProductModal .modal-body {
  font-size: 1rem;
  background: var(--bs-body-bg);
}
#addProductModal .product-form-section {
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  margin-bottom: 1.25rem;
  overflow: hidden;
}
#addProductModal .product-form-section-head {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  background: rgba(var(--bs-primary-rgb), 0.06);
  border-bottom: 1px solid var(--bs-border-color);
}
#addProductModal .section-badge {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  background: var(--bs-primary);
}
#addProductModal .section-title {
  font-size: 1.1rem;
  font-weight: 600;
}
#addProductModal .section-desc {
  font-size: 0.92rem;
  color: var(--bs-secondary-color);
  margin-top: 0.15rem;
}
#addProductModal .product-form-section-body {
  padding: 1.25rem;
}
#addProductModal .form-label {
  font-size: 0.98rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
}
#addProductModal .form-control,
#addProductModal .form-select,
#addProductModal textarea.form-control,
#addProductModal .input-group-text {
  font-size: 1.02rem;
  padding: 0.62rem 0.9rem;
}
#addProductModal .input-group .form-control {
  min-height: calc(2.5rem + 2px);
}
#addProductModal .profit-preview-box {
  min-height: calc(2.5rem + 2px);
  padding: 0.62rem 0.9rem;
  border-radius: 0.375rem;
  border: 1px solid var(--bs-border-color);
  background: var(--bs-tertiary-bg);
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
}
#addProductModal .profit-preview-box.is-profit {
  background: rgba(25, 135, 84, 0.12);
  border-color: rgba(25, 135, 84, 0.35);
  color: #198754;
}
#addProductModal .profit-preview-box.is-loss {
  background: rgba(220, 53, 69, 0.1);
  border-color: rgba(220, 53, 69, 0.35);
  color: #dc3545;
}
#addProductModal .profit-preview-box.is-neutral {
  color: var(--bs-secondary-color);
  font-weight: 500;
}
#addProductModal .modal-footer .btn {
  font-size: 1rem;
  min-width: 7rem;
}
#addProductModal .form-control.is-invalid,
#addProductModal .form-select.is-invalid {
  border-color: var(--bs-form-invalid-border-color);
  box-shadow: 0 0 0 0.2rem rgba(var(--bs-danger-rgb), 0.15);
}

/* Invalid fields — all forms/modals */
.form-control.is-invalid,
.form-select.is-invalid {
  border-color: var(--bs-form-invalid-border-color);
  box-shadow: 0 0 0 0.2rem rgba(var(--bs-danger-rgb), 0.15);
}

/* Date inputs — click anywhere to open calendar */
input[type="date"].form-control,
input[type="date"].billing-date-input {
  cursor: pointer;
}
input[type="date"].form-control::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.9;
  width: 1.15em;
  height: 1.15em;
}
.input-group .btn[data-date-for] {
  padding-left: 0.65rem;
  padding-right: 0.65rem;
}

/* Lobibox toasts above Bootstrap modals */
.lobibox-notify-wrapper,
.lobibox-notify-wrapper-large {
  z-index: 20000 !important;
}

/* Lobibox icons — Material Icons Outlined (Glyphicons not loaded in Maxton/BS5) */
.lobibox-notify .lobibox-notify-icon .icon-el i.billing-notify-icon {
  font-family: 'Material Icons Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 0;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -moz-osx-font-smoothing: grayscale;
  speak: never;
}
.lobibox-notify .lobibox-notify-icon .icon-el i.billing-notify-icon::before {
  font-family: 'Material Icons Outlined';
  font-size: 28px;
  line-height: 1;
  display: inline-block;
}
.lobibox-notify.notify-mini .lobibox-notify-icon .icon-el i.billing-notify-icon::before {
  font-size: 22px;
}
.lobibox-notify-icon--success::before { content: 'check_circle'; }
.lobibox-notify-icon--error::before { content: 'error'; }
.lobibox-notify-icon--warning::before { content: 'warning'; }
.lobibox-notify-icon--info::before { content: 'info'; }
.lobibox-notify-success .lobibox-notify-icon .icon-el { color: #16a34a; }
.lobibox-notify-error .lobibox-notify-icon .icon-el { color: #dc2626; }
.lobibox-notify-warning .lobibox-notify-icon .icon-el { color: #d97706; }
.lobibox-notify-info .lobibox-notify-icon .icon-el,
.lobibox-notify-default .lobibox-notify-icon .icon-el { color: #2563eb; }

/* Global fixed site footer — centered bar at viewport bottom */
:root {
  --billing-footer-height: 42px;
}

.billing-site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 8;
  height: var(--billing-footer-height);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  background-color: #ffffff;
  border-top: 1px solid var(--bs-border-color);
}

.billing-site-footer__text {
  font-size: 13px;
  color: #6c757d;
  text-align: center;
  line-height: 1.3;
}

body:not(.billing-auth-page) .billing-site-footer {
  left: 260px;
}

body.toggled:not(.billing-auth-page) .billing-site-footer {
  left: 70px;
}

@media (max-width: 1199px) {
  body:not(.billing-auth-page) .billing-site-footer {
    left: 0;
  }
}

body:not(.billing-auth-page) .main-wrapper {
  padding-bottom: var(--billing-footer-height) !important;
}

body.billing-auth-page {
  min-height: 100vh;
  padding-bottom: var(--billing-footer-height);
  background-color: #0a0f2c;
  background-image:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(79, 70, 229, 0.35), transparent 55%),
    radial-gradient(ellipse 70% 50% at 85% 80%, rgba(14, 165, 233, 0.25), transparent 50%),
    linear-gradient(160deg, #0a0f2c 0%, #151b3d 45%, #1a1040 100%);
  background-attachment: fixed;
}

body.billing-auth-page::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  opacity: 0.6;
}

/* —— Login 3D layout —— */
.auth-3d-scene {
  width: 100%;
  max-width: 1080px;
  perspective: 1400px;
}

.auth-3d-card {
  background: transparent;
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.05),
    0 25px 60px -12px rgba(15, 23, 42, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.12);
  transform: translateZ(0);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

[data-bs-theme=dark] .auth-3d-card,
[data-bs-theme=semi-dark] .auth-3d-card {
  background: transparent;
  box-shadow:
    0 25px 60px -12px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}

.auth-3d-form-panel {
  position: relative;
  z-index: 2;
  background: linear-gradient(165deg, #ffffff 0%, #f1f5f9 55%, #e8eef5 100%);
  color: #1e293b;
  border-radius: 1rem 0 0 1rem;
}

[data-bs-theme=dark] body.billing-auth-page .auth-3d-form-panel,
[data-bs-theme=semi-dark] body.billing-auth-page .auth-3d-form-panel {
  background: linear-gradient(165deg, #ffffff 0%, #f1f5f9 55%, #e8eef5 100%);
  color: #1e293b;
}

body.billing-auth-page .auth-3d-form-panel h4 {
  color: #0f172a !important;
}

body.billing-auth-page .auth-3d-form-panel .text-muted,
body.billing-auth-page .auth-3d-form-panel .form-text {
  color: #64748b !important;
}

body.billing-auth-page .auth-3d-form-panel .form-label,
body.billing-auth-page .auth-3d-form-panel .form-check-label {
  color: #475569 !important;
  font-weight: 600;
}

body.billing-auth-page .auth-3d-form-panel .form-control,
body.billing-auth-page .auth-3d-form-panel .auth-input {
  background-color: #ffffff !important;
  color: #1e293b !important;
  border-color: #cbd5e1 !important;
}

body.billing-auth-page .auth-3d-form-panel .input-group-text {
  background-color: #ffffff !important;
  color: #64748b !important;
  border-color: #cbd5e1 !important;
}

body.billing-auth-page .auth-3d-form-panel .form-check-input {
  border-color: #94a3b8;
}

body.billing-auth-page .auth-3d-form-panel #loginMsg .alert {
  font-size: 0.875rem;
}

.auth-3d-form-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-input-wrap {
  position: relative;
}

.auth-input-wrap .auth-input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: #94a3b8;
  z-index: 3;
  pointer-events: none;
}

.auth-input-wrap .auth-input,
.auth-password-field .auth-input {
  padding-left: 2.75rem;
  border-radius: 0.65rem;
  border-color: #e2e8f0;
  min-height: 46px;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-input-wrap .auth-input:focus,
.auth-password-field .auth-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.auth-password-field {
  position: relative;
  display: block;
}

.auth-password-field .auth-input {
  width: 100%;
  padding-right: 2.85rem;
  border-radius: 0.65rem !important;
}

.auth-field-icon-left {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: #94a3b8;
  pointer-events: none;
  z-index: 2;
}

.auth-field-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: none;
  background: transparent;
  color: #64748b;
  border-radius: 0.45rem;
  z-index: 4;
  cursor: pointer;
  line-height: 1;
}

.auth-field-toggle:hover {
  color: #6366f1;
  background: rgba(99, 102, 241, 0.1);
}

.auth-field-toggle .material-icons-outlined {
  font-size: 20px;
  pointer-events: none;
}

body.billing-auth-page .auth-3d-form-panel .auth-password-field .auth-input {
  background-color: #ffffff !important;
}

.auth-link {
  color: #6366f1;
  font-weight: 500;
}

.auth-signin-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  border-radius: 0.65rem !important;
  box-shadow: 0 8px 20px -6px rgba(99, 102, 241, 0.55);
  transition: transform 0.2s, box-shadow 0.2s;
}

.auth-signin-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -6px rgba(99, 102, 241, 0.65);
}

.auth-signin-btn .material-icons-outlined {
  font-size: 20px;
}

/* Right showcase panel */
.auth-3d-showcase {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  background: linear-gradient(145deg, #312e81 0%, #4338ca 40%, #6366f1 100%);
}

.auth-3d-showcase-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.auth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
  animation: auth-orb-float 8s ease-in-out infinite;
}

.auth-orb-1 {
  width: 200px;
  height: 200px;
  background: #818cf8;
  top: -40px;
  right: -30px;
}

.auth-orb-2 {
  width: 160px;
  height: 160px;
  background: #38bdf8;
  bottom: 20%;
  left: -40px;
  animation-delay: -3s;
}

.auth-orb-3 {
  width: 120px;
  height: 120px;
  background: #a78bfa;
  bottom: -20px;
  right: 25%;
  animation-delay: -5s;
}

.auth-grid-floor {
  position: absolute;
  left: -20%;
  right: -20%;
  bottom: -30%;
  height: 70%;
  background:
    linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 32px 32px;
  transform: perspective(500px) rotateX(72deg);
  transform-origin: center top;
  opacity: 0.35;
  mask-image: linear-gradient(to top, #000 10%, transparent 70%);
}

@keyframes auth-orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(8px, -12px) scale(1.06); }
}

.auth-3d-showcase-content {
  position: relative;
  z-index: 2;
  padding: 2.5rem 2.25rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #ffffff;
}

.auth-3d-showcase-tilt {
  transform-style: preserve-3d;
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 0.15s ease-out;
}

body.billing-auth-page .auth-3d-showcase h2,
body.billing-auth-page .auth-3d-showcase .auth-showcase-title {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: none !important;
}

.auth-showcase-kicker {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c7d2fe !important;
}

.auth-showcase-title {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.25;
  color: #ffffff !important;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 18px rgba(15, 23, 42, 0.35);
}

.auth-showcase-lead {
  font-size: 0.92rem;
  line-height: 1.55;
  color: #e8eaf6 !important;
  max-width: 420px;
}

.auth-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem;
}

.auth-feature-chip {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.65rem;
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  font-size: 0.78rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: translateZ(12px);
}

.auth-feature-chip .material-icons-outlined {
  font-size: 18px;
  opacity: 0.95;
}

/* 3D invoice mockup */
.auth-3d-invoice-stack {
  position: relative;
  height: 200px;
  margin-top: 0.5rem;
  perspective: 900px;
}

.auth-3d-invoice {
  position: absolute;
  left: 0;
  right: 0;
  max-width: 340px;
  margin: 0 auto;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  background: #fff;
  color: #1e293b;
  box-shadow:
    0 20px 40px -8px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(0, 0, 0, 0.06);
  transform-style: preserve-3d;
}

.auth-3d-invoice-back {
  top: 12px;
  height: 160px;
  opacity: 0.45;
  transform: rotateX(12deg) rotateY(-18deg) translateZ(-30px) scale(0.94);
  background: linear-gradient(180deg, #f8fafc, #e2e8f0);
}

.auth-3d-invoice-front {
  top: 0;
  animation: auth-invoice-float 5s ease-in-out infinite;
  transform: rotateX(10deg) rotateY(-14deg) translateZ(20px);
}

@keyframes auth-invoice-float {
  0%, 100% { transform: rotateX(10deg) rotateY(-14deg) translateZ(20px) translateY(0); }
  50% { transform: rotateX(12deg) rotateY(-10deg) translateZ(28px) translateY(-8px); }
}

.auth-inv-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #1e40af;
}

.auth-inv-badge {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #1e40af;
}

.auth-inv-no {
  font-size: 0.7rem;
  font-weight: 700;
  color: #64748b;
}

.auth-inv-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.5rem;
  font-size: 0.68rem;
  padding: 0.2rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.auth-inv-row span:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.auth-inv-row-head {
  font-weight: 700;
  color: #475569;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auth-inv-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.45rem;
  padding-top: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #1e40af;
}

.auth-inv-gst {
  margin-top: 0.35rem;
  font-size: 0.62rem;
  color: #64748b;
}

.auth-3d-stat-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.95);
  color: #1e293b;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
  font-size: 0.72rem;
  animation: auth-stat-float 4s ease-in-out infinite;
  transform-style: preserve-3d;
}

.auth-3d-stat-card .material-icons-outlined {
  font-size: 22px;
  color: #6366f1;
}

.auth-3d-stat-card strong {
  display: block;
  font-size: 0.95rem;
  line-height: 1.2;
}

.auth-3d-stat-card small {
  color: #64748b;
  font-size: 0.65rem;
}

.auth-stat-stock {
  top: -8px;
  right: 0;
  animation-delay: -1s;
}

.auth-stat-sales {
  bottom: 8px;
  left: -8px;
  animation-delay: -2.5s;
}

.auth-stat-sales .material-icons-outlined {
  color: #16a34a;
}

@keyframes auth-stat-float {
  0%, 100% { transform: translateY(0) translateZ(40px); }
  50% { transform: translateY(-6px) translateZ(50px); }
}

/* Forgot password — reset email 3D card */
.auth-3d-reset-stack {
  position: relative;
  height: 210px;
  margin-top: 0.5rem;
  perspective: 900px;
}

.auth-3d-reset-card {
  position: absolute;
  left: 0;
  right: 0;
  max-width: 320px;
  margin: 0 auto;
  padding: 1.1rem 1.15rem;
  border-radius: 0.85rem;
  background: #fff;
  color: #1e293b;
  text-align: center;
  box-shadow:
    0 20px 40px -8px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(0, 0, 0, 0.06);
  animation: auth-invoice-float 5s ease-in-out infinite;
  transform: rotateX(10deg) rotateY(-14deg) translateZ(20px);
}

.auth-reset-icon-wrap {
  width: 52px;
  height: 52px;
  margin: 0 auto 0.65rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.auth-reset-icon-wrap .material-icons-outlined {
  font-size: 28px;
}

.auth-reset-label {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.auth-reset-email {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e40af;
}

.auth-reset-link-row {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.65rem;
  border-radius: 0.5rem;
  background: #f1f5f9;
  font-size: 0.72rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.65rem;
}

.auth-reset-link-row .material-icons-outlined {
  font-size: 16px;
  color: #6366f1;
}

.auth-reset-meta {
  display: flex;
  justify-content: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  font-size: 0.65rem;
  font-weight: 600;
  color: #64748b;
}

.auth-reset-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.auth-reset-meta .material-icons-outlined {
  font-size: 14px;
  color: #16a34a;
}

.auth-stat-secure {
  top: 4px;
  right: 0;
}

.auth-stat-secure .material-icons-outlined {
  color: #6366f1;
}

/* Reset password — expiry timer */
.auth-expire-banner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  border-radius: 0.6rem;
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
  border: 1px solid #c7d2fe;
  color: #3730a3;
  font-size: 0.85rem;
  font-weight: 500;
}

.auth-expire-banner .material-icons-outlined {
  font-size: 20px;
  color: #6366f1;
}

.auth-expire-banner strong,
#expireCountdown {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.auth-expire-banner-urgent {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border-color: #fdba74;
  color: #c2410c;
  animation: auth-expire-pulse 1.2s ease-in-out infinite;
}

.auth-expire-banner-urgent .material-icons-outlined {
  color: #ea580c;
}

@keyframes auth-expire-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(234, 88, 12, 0.15); }
  50% { box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.12); }
}

.auth-3d-timer-card {
  padding-top: 1.25rem;
  padding-bottom: 1.15rem;
}

.auth-reset-icon-lock {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

.auth-reset-timer-display {
  margin: 0.15rem 0 0.35rem;
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  color: #1e40af;
}

.auth-reset-timer-urgent {
  color: #dc2626 !important;
  animation: auth-timer-blink 1s step-end infinite;
}

@keyframes auth-timer-blink {
  50% { opacity: 0.65; }
}

.auth-reset-timer-sub {
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
}

.auth-reset-meta-center {
  justify-content: center;
}

.auth-3d-reset-stack-timer {
  height: 220px;
}

@media (max-width: 991px) {
  body.billing-auth-page .auth-shell-main {
    align-items: flex-start;
    padding-top: 1rem;
    padding-bottom: 1.5rem;
  }

  .auth-3d-scene {
    max-width: 520px;
  }

  .auth-3d-form-panel {
    border-radius: 1rem;
  }

  .auth-3d-form-inner {
    padding: 1.5rem !important;
  }

  .auth-login-logo {
    max-width: 160px;
    max-height: 64px;
  }

  .auth-signin-btn {
    min-height: 46px;
  }
}

@media (min-width: 576px) and (max-width: 991px) {
  .auth-3d-scene {
    max-width: 560px;
  }

  .auth-3d-form-inner {
    padding: 2rem !important;
  }
}

@media (max-width: 575px) {
  .auth-3d-scene {
    max-width: 100%;
  }

  .auth-3d-form-inner {
    padding: 1.25rem !important;
  }

  .auth-expire-banner {
    font-size: 0.8rem;
    padding: 0.5rem 0.7rem;
  }
}

@media (min-width: 992px) {
  .auth-3d-row {
    min-height: 560px;
  }
}

body.billing-auth-page .auth-shell-main {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  width: 100%;
}

.auth-login-logo {
  max-width: 180px;
  max-height: 72px;
  width: auto;
  height: auto;
  object-fit: contain;
}

body.billing-auth-page .btn-grd-primary {
  color: #fff !important;
  border: none;
  font-weight: 600;
}

body.billing-auth-page .btn-grd-primary:disabled {
  opacity: 0.75;
  color: #fff !important;
}

[data-bs-theme=dark] .billing-site-footer,
[data-bs-theme=semi-dark] .billing-site-footer {
  background-color: var(--bs-body-bg, #1a1a1a);
}

.billing-header-key {
  display: inline-block;
  padding: 0.05rem 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #111827;
  background: #e5e7eb;
  border: 1px solid #9ca3af;
  border-radius: 0.25rem;
  vertical-align: middle;
}

/* Select2 — searchable dropdowns (Accounting ledgers, etc.) */
.select-search-billing + .select2-container--bootstrap4 .select2-selection--single {
  min-height: calc(1.5em + 0.5rem + 2px);
  padding: 0.125rem 0.5rem;
  font-size: 0.875rem;
}
.select-search-billing + .select2-container--bootstrap4 .select2-selection__rendered {
  line-height: calc(1.5em + 0.25rem);
  padding-left: 0;
}
.select2-container--bootstrap4 .select2-dropdown {
  z-index: 1060;
}

/* Trignity licence-server notifications (dashboard) */
#trignityNotifications .trignity-notify-item {
  font-family: 'Nunito', 'Noto Sans', sans-serif;
  padding: 1.15rem 1.35rem;
  background: linear-gradient(135deg, #1a1a1a 0%, #3d3d3d 45%, #2b2b2b 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
  color: #ffffff;
}
#trignityNotifications .trignity-notify-title {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.35;
  color: #ffffff;
}
#trignityNotifications .trignity-notify-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
  color: #ffffff;
}
#trignityNotifications .trignity-notify-body {
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.92);
}
#trignityNotifications .trignity-notify-link {
  font-family: 'Nunito', 'Noto Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a1a1a;
  background: #ffffff;
  border: none;
  border-radius: 2rem;
  padding: 0.4rem 1rem;
}
#trignityNotifications .trignity-notify-link:hover {
  color: #1a1a1a;
  background: #e8e8e8;
}

/* Loading skeletons */
@keyframes billing-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.billing-skeleton {
  display: inline-block;
  height: 14px;
  min-width: 48px;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(0,0,0,.06) 25%, rgba(0,0,0,.10) 50%, rgba(0,0,0,.06) 75%);
  background-size: 200% 100%;
  animation: billing-shimmer 1.3s ease-in-out infinite;
}
[data-bs-theme="dark"] .billing-skeleton,
html[data-bs-theme="semi-dark"] .billing-skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,.06) 25%, rgba(255,255,255,.12) 50%, rgba(255,255,255,.06) 75%);
  background-size: 200% 100%;
}
.billing-skeleton-row td { padding-top: 0.85rem; padding-bottom: 0.85rem; }
.billing-skeleton-card .billing-skeleton { display: block; }
.billing-page-loading { min-height: 120px; }
.billing-empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--bs-secondary-color);
}
.billing-empty-state .material-icons-outlined {
  font-size: 2.5rem;
  opacity: 0.35;
  display: block;
  margin-bottom: 0.5rem;
}

/* Lobibox Material Icons — text injected by patchLobiboxNotifyIcon() in billing_api.php */
.lobibox-notify .lobibox-notify-icon .icon-el i.material-icons-outlined.billing-notify-mi {
  font-family: 'Material Icons Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 32px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: rgba(255, 255, 255, 0.95);
}
.lobibox-notify.notify-mini .lobibox-notify-icon .icon-el i.material-icons-outlined.billing-notify-mi {
  font-size: 24px;
}
.lobibox-notify .lobibox-notify-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Sidebar — long company names (auto height, wrap, no top clip) */
.sidebar-wrapper {
  display: flex;
  flex-direction: column;
}

.sidebar-wrapper .sidebar-header {
  position: relative;
  top: auto;
  flex-shrink: 0;
  width: 100%;
  height: auto;
  min-height: 70px;
  padding: 10px 0.75rem;
  align-items: center;
  box-sizing: border-box;
}

.sidebar-wrapper .sidebar-header .logo-icon {
  flex-shrink: 0;
}

.sidebar-wrapper .sidebar-header .logo-icon .logo-img {
  width: 40px;
  height: auto;
}

.sidebar-wrapper .sidebar-header .logo-name {
  min-width: 0;
  flex: 1 1 auto;
}

body .sidebar-wrapper .sidebar-header .logo-name h5,
body .sidebar-wrapper .sidebar-header .sidebar-brand-title {
  font-size: 0.875rem !important;
  line-height: 1.35 !important;
  font-weight: 600;
  text-transform: none;
  word-wrap: break-word;
  overflow-wrap: break-word;
  margin: 0;
  white-space: normal;
  letter-spacing: 0;
  color: #212529;
}

[data-bs-theme=semi-dark] body .sidebar-wrapper .sidebar-header .logo-name h5,
[data-bs-theme=semi-dark] body .sidebar-wrapper .sidebar-header .sidebar-brand-title,
[data-bs-theme=dark] body .sidebar-wrapper .sidebar-header .logo-name h5,
[data-bs-theme=dark] body .sidebar-wrapper .sidebar-header .sidebar-brand-title {
  color: #ffffff !important;
}

body .sidebar-wrapper .sidebar-header {
  position: relative !important;
  top: auto !important;
  height: auto !important;
  min-height: 70px;
  padding: 12px 0.75rem !important;
  align-items: center;
  box-sizing: border-box;
}

body .sidebar-wrapper .sidebar-nav {
  margin-top: 0 !important;
  flex: 1 1 auto;
  min-height: 0;
  height: auto !important;
  overflow-y: auto;
}

@media (min-width: 1200px) {
  body.toggled:not(.sidebar-hovered) .sidebar-wrapper .sidebar-header {
    min-height: 70px;
    padding: 10px 0.5rem;
  }
}

/* Top nav — stock alert bell */
.nav-stock-alerts-toggle .material-icons-outlined {
  font-size: 1.35rem;
}
.nav-stock-alert-badge {
  position: absolute;
  top: 2px;
  right: 0;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.3rem;
  font-size: 0.65rem;
  line-height: 1.1rem;
  font-weight: 700;
}
.nav-stock-alerts-menu {
  min-width: 300px;
  max-width: 360px;
}
.nav-stock-alerts-body {
  max-height: 360px;
  overflow-y: auto;
}
.nav-stock-alert-item:hover,
.nav-stock-alert-item:focus {
  background: rgba(var(--bs-warning-rgb), 0.08);
}
.nav-stock-alert-section + .nav-stock-alert-section {
  border-top: 1px solid var(--bs-border-color);
}
