:root {
  --colors-primary: #e60000;
  --colors-primary-hover: #cc0000;
  --colors-canvas: #ffffff;
  --colors-canvas-soft: #f7f7f8;
  --colors-ink: #25282b;
  --colors-ink-light: #323639;
  --colors-body: #6e7378;
  --colors-mute: #a8adb3;
  --colors-border: #e5e7eb;
  --colors-border-dark: #3a3f43;
  --colors-on-dark: #ffffff;
  --colors-success: #15803d;
  --colors-warning: #b45309;

  --spacing-xxs: 2px;
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 12px;
  --spacing-lg: 16px;
  --spacing-xl: 20px;
  --spacing-2xl: 24px;
  --spacing-3xl: 32px;
  --spacing-4xl: 48px;

  --rounded-none: 0px;
  --rounded-sm: 6px;
  --rounded-card: 8px;
  --rounded-pill-md: 32px;
  --rounded-pill-lg: 60px;
  --rounded-full: 9999px;

  --sidebar-width: 260px;
}

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

html {
  width: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--colors-canvas-soft);
  color: var(--colors-ink);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  width: 100%;
  overflow-x: clip;
}

/* =========================================================
   APP SHELL WITH SIDEBAR & RESPONSIVE DRAWER
   ========================================================= */
.app-layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  width: 100%;
}

/* Mobile Sidebar Backdrop Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.sidebar-overlay.open {
  display: block;
}

.sidebar {
  width: var(--sidebar-width);
  background-color: var(--colors-ink);
  color: var(--colors-on-dark);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 2010;
  border-right: 1px solid var(--colors-border-dark);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-brand {
  padding: var(--spacing-lg) var(--spacing-2xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--colors-border-dark);
  text-decoration: none;
  color: var(--colors-on-dark);
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.sidebar-close-btn {
  display: none;
  background: none;
  border: none;
  color: var(--colors-mute);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

.sidebar-close-btn:hover {
  color: var(--colors-on-dark);
}

.speechmark-orb {
  width: 38px;
  height: 38px;
  background-color: transparent;
  border-radius: var(--rounded-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.brand-logo-img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  background-color: #000000;
}

.brand-text {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.brand-sub {
  font-size: 10px;
  color: var(--colors-mute);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  display: block;
  font-weight: 600;
}

.sidebar-nav {
  padding: var(--spacing-md) 0;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-section-title {
  padding: var(--spacing-sm) var(--spacing-2xl);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--colors-mute);
  margin-top: var(--spacing-sm);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: 12px var(--spacing-2xl);
  color: #ffffff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s ease;
  border-left: 3px solid transparent;
  min-height: 44px;
}

.sidebar-link:hover {
  background-color: var(--colors-ink-light);
  color: #ffffff;
}

.sidebar-link.active {
  background-color: var(--colors-ink-light);
  color: #ffffff;
  border-left-color: var(--colors-primary);
  font-weight: 600;
}

.sidebar-link svg {
  width: 18px;
  height: 18px;
  opacity: 1;
  flex-shrink: 0;
  fill: #ffffff;
  transition: fill 0.15s ease;
}

.sidebar-link:hover svg {
  fill: #ffffff;
}

.sidebar-link.active svg {
  opacity: 1;
  fill: var(--colors-primary);
}

.sidebar-footer {
  padding: var(--spacing-md) var(--spacing-2xl);
  border-top: 1px solid var(--colors-border-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: rgba(0, 0, 0, 0.15);
}

.user-info {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.user-avatar {
  width: 34px;
  height: 34px;
  background-color: var(--colors-ink-light);
  border: 1px solid var(--colors-border-dark);
  border-radius: var(--rounded-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: var(--colors-on-dark);
}

.user-meta {
  line-height: 1.2;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--colors-on-dark);
}

.user-role {
  font-size: 11px;
  color: var(--colors-mute);
}

.sidebar-link:active svg,
.sidebar-link:focus svg {
  fill: var(--colors-primary);
}

.logout-btn {
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}

.logout-btn svg {
  fill: #ffffff;
  transition: fill 0.15s ease;
}

.logout-btn:hover,
.logout-btn:active {
  color: var(--colors-primary);
}

.logout-btn:hover svg,
.logout-btn:active svg {
  fill: var(--colors-primary);
}

/* =========================================================
   MAIN CONTENT WRAPPER & TOP BAR
   ========================================================= */
.main-wrapper {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: calc(100% - var(--sidebar-width));
  max-width: 100%;
}

.top-bar {
  background-color: var(--colors-canvas);
  height: 64px;
  border-bottom: 1px solid var(--colors-border);
  padding: 0 var(--spacing-3xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 500;
  gap: var(--spacing-md);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--colors-border);
  border-radius: var(--rounded-sm);
  padding: 8px 10px;
  cursor: pointer;
  color: var(--colors-ink);
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mobile-menu-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.page-title-wrap {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  overflow: hidden;
}

.page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--colors-ink);
  letter-spacing: -0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tenant-chip {
  background-color: var(--colors-canvas-soft);
  color: var(--colors-body);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--rounded-pill-md);
  border: 1px solid var(--colors-border);
  white-space: nowrap;
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  flex-shrink: 0;
}

.content-body {
  padding: var(--spacing-3xl);
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* =========================================================
   FLOATING ACTION BUTTON (FAB)
   Shown ONLY on Desktop / Web App (min-width: 901px).
   Hidden on ALL Mobile & Tablet views because Mobile View has
   "New Order" directly in the bottom navigation bar.
   ========================================================= */
.fab-btn,
.web-only-fab {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

@media (min-width: 901px) {
  .fab-btn,
  .web-only-fab {
    display: inline-flex !important;
    visibility: visible !important;
    pointer-events: auto !important;
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 1100;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--colors-primary);
    color: var(--colors-on-dark);
    border: none;
    border-radius: var(--rounded-pill-lg);
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(230, 0, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, background-color 0.15s ease;
    text-decoration: none;
  }

  .fab-btn:hover,
  .web-only-fab:hover {
    background-color: var(--colors-primary-hover);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 22px rgba(230, 0, 0, 0.5), 0 4px 10px rgba(0, 0, 0, 0.2);
  }

  .fab-btn svg,
  .web-only-fab svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
  }
}

/* =========================================================
   BUTTONS (Vodafone Pill CTAs)
   ========================================================= */
.button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  background-color: var(--colors-primary);
  color: var(--colors-on-dark);
  border: 1px solid var(--colors-primary);
  border-radius: var(--rounded-pill-lg);
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  min-height: 44px;
}

.button-primary:hover {
  background-color: var(--colors-primary-hover);
  border-color: var(--colors-primary-hover);
}

.button-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  background-color: var(--colors-canvas);
  color: var(--colors-ink);
  border: 1px solid var(--colors-ink);
  border-radius: var(--rounded-pill-lg);
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  min-height: 44px;
}

.button-outline:hover {
  background-color: var(--colors-canvas-soft);
}

.button-sm {
  padding: 6px 14px;
  font-size: 13px;
  min-height: 36px;
}

/* =========================================================
   CARDS & GRIDS
   ========================================================= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-3xl);
}

.card-stat {
  background-color: var(--colors-canvas);
  border: 1px solid var(--colors-border);
  border-radius: var(--rounded-card);
  padding: var(--spacing-2xl);
  display: flex;
  flex-direction: column;
}

.card-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--colors-body);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--spacing-xs);
}

.card-value {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--colors-ink);
  line-height: 1.1;
  margin-bottom: var(--spacing-xs);
}

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

.card-desc {
  font-size: 13px;
  color: var(--colors-body);
}

.card-panel {
  background-color: var(--colors-canvas);
  border: 1px solid var(--colors-border);
  border-radius: var(--rounded-card);
  padding: var(--spacing-2xl);
  margin-bottom: var(--spacing-3xl);
  min-width: 0;
  max-width: 100%;
}

.card-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-xl);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--colors-border);
  flex-wrap: nowrap;
  gap: var(--spacing-md);
}

.panel-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--colors-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-panel-header .button-outline,
.card-panel-header a.button-outline {
  display: none !important;
}

/* =========================================================
   ANALYTICS GRIDS & SPECIALIZED ADMIN CARDS
   ========================================================= */
.dashboard-grid-2col {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: var(--spacing-2xl);
  margin-bottom: var(--spacing-3xl);
  min-width: 0;
}

.dashboard-grid-equal {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-2xl);
  margin-bottom: var(--spacing-3xl);
  min-width: 0;
}

.dashboard-grid-2col>*,
.dashboard-grid-equal>* {
  min-width: 0;
  max-width: 100%;
}

/* Monthly Income vs Expenses Bar Chart */
.chart-box {
  width: 100%;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--colors-body);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.legend-dot.income {
  background-color: var(--colors-primary);
}

.legend-dot.expense {
  background-color: var(--colors-ink);
}

.bar-chart-container {
  display: block;
  height: 230px;
  padding-top: 24px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--colors-border);
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.chart-grid {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 100%;
  width: 100%;
  gap: 8px;
  position: relative;
  z-index: 2;
  box-sizing: border-box;
}

.chart-grid-line {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px dashed var(--colors-border);
  z-index: 1;
}

.chart-col-group,
.chart-month-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  position: relative;
  min-width: 0;
  box-sizing: border-box;
}

.bars-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 165px;
  width: 100%;
  justify-content: center;
  position: relative;
  box-sizing: border-box;
}

.bar-col {
  width: 16px;
  border-radius: 4px 4px 0 0;
  transition: all 0.2s ease;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
}

.bar-col:hover {
  opacity: 0.9;
  transform: scaleY(1.02);
}

.bar-col:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--colors-ink);
  color: var(--colors-on-dark);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: var(--rounded-sm);
  white-space: nowrap;
  pointer-events: none;
  z-index: 20;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.bar-col.income {
  background-color: var(--colors-primary);
}

.bar-col.expense {
  background-color: var(--colors-ink);
}

.month-label {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--colors-body);
  text-transform: uppercase;
}

/* Studio Revenue Chart Footer Stat */
.chart-footer-stat {
  margin-top: 20px;
  padding: 12px 16px;
  background-color: var(--colors-canvas-soft);
  border: 1px solid var(--colors-border);
  border-radius: var(--rounded-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.chart-footer-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--colors-body);
}

.stat-trend-icon {
  width: 16px;
  height: 16px;
  fill: var(--colors-success);
  flex-shrink: 0;
}

.chart-footer-value {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.chart-footer-value strong {
  color: var(--colors-ink);
  font-weight: 800;
}

.margin-percent-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background-color: rgba(16, 185, 129, 0.12);
  color: #047857;
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--rounded-pill-md);
  border: 1px solid rgba(16, 185, 129, 0.25);
  line-height: 1.2;
}

@media (max-width: 600px) {
  .chart-footer-stat {
    margin-top: 16px;
    padding: 10px 12px;
    gap: 8px;
  }

  .chart-footer-label {
    font-size: 12px;
  }

  .chart-footer-value {
    font-size: 13px;
    gap: 6px;
  }

  .margin-percent-badge {
    font-size: 11px;
    padding: 1px 6px;
  }
}

/* Product Performance Card */
.performance-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.performance-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.perf-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.perf-title {
  font-weight: 700;
  color: var(--colors-ink);
}

.perf-rev {
  font-weight: 800;
  color: var(--colors-ink);
}

.perf-track {
  width: 100%;
  height: 8px;
  background-color: var(--colors-canvas-soft);
  border-radius: var(--rounded-pill-md);
  overflow: hidden;
  border: 1px solid var(--colors-border);
}

.perf-fill {
  height: 100%;
  background-color: var(--colors-primary);
  border-radius: var(--rounded-pill-md);
}

.perf-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--colors-body);
}

/* Active Rental Detail Card */
.dispatches-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-md);
}

.dispatch-card {
  background-color: var(--colors-canvas-soft);
  border: 1px solid var(--colors-border);
  border-radius: var(--rounded-card);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s ease;
}

.dispatch-card:hover {
  border-color: var(--colors-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.dispatch-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.dispatch-due {
  font-size: 11px;
  font-weight: 600;
  color: var(--colors-body);
}

.dispatch-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--colors-ink);
  line-height: 1.3;
}

.dispatch-client {
  font-size: 12px;
  color: var(--colors-body);
}

@media (max-width: 1024px) {
  .dispatches-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .dispatches-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.rental-cards-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.active-rental-item {
  background-color: var(--colors-canvas-soft);
  border: 1px solid var(--colors-border);
  border-radius: var(--rounded-card);
  padding: var(--spacing-md) var(--spacing-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--spacing-md);
  transition: border-color 0.15s ease;
}

.active-rental-item:hover {
  border-color: var(--colors-ink);
}

.rental-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rental-item-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--colors-ink);
}

.rental-item-client {
  font-size: 12px;
  color: var(--colors-body);
}

.rental-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.return-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--rounded-pill-md);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.return-badge.urgent {
  background-color: #fee2e2;
  color: var(--colors-primary);
}

.return-badge.normal {
  background-color: #f3f4f6;
  color: var(--colors-ink);
}

/* =========================================================
   CLEAN RESPONSIVE TABLES & MOBILE CARD TRANSFORMATION
   ========================================================= */
.table-container {
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--colors-border);
  border-radius: var(--rounded-card);
  background-color: var(--colors-canvas);
  overflow: hidden;
}

/* Desktop: Clean, spacious table with NO cramped horizontal scrolling */
.clean-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.clean-table th {
  background-color: var(--colors-canvas-soft);
  padding: 16px 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--colors-body);
  border-bottom: 1px solid var(--colors-border);
  white-space: nowrap;
}

.clean-table td {
  padding: 18px 20px;
  font-size: 14px;
  color: var(--colors-ink);
  border-bottom: 1px solid var(--colors-border);
  vertical-align: middle;
}

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

.clean-table tr:hover td {
  background-color: rgba(0, 0, 0, 0.015);
}

/* WhatsApp-Style Mobile Card List & Desktop Switcher */
.desktop-view-table {
  display: block;
}
.mobile-wa-list {
  display: none;
}

@media (max-width: 768px) {
  .desktop-view-table {
    display: none !important;
  }

  .mobile-wa-list {
    display: flex !important;
    flex-direction: column;
    gap: 0;
    background: var(--colors-canvas, #ffffff);
    border: 1px solid var(--colors-border, #e5e7eb);
    border-radius: var(--rounded-card, 12px);
    overflow: hidden;
  }

  .wa-card-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--colors-canvas-soft, #f3f4f6);
    transition: background-color 0.15s ease;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.04);
  }

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

  .wa-card-row:active {
    background-color: var(--colors-canvas-soft, #f8fafc);
  }

  /* Round circle with first letter */
  .wa-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
    letter-spacing: -0.5px;
  }

  .wa-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
  }

  .wa-primary-text {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--colors-ink, #0f172a);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .wa-secondary-text {
    font-size: 12.5px;
    color: var(--colors-body, #64748b);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .wa-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
  }

  .wa-meta-primary {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--colors-ink, #0f172a);
    line-height: 1.2;
    white-space: nowrap;
  }

  .wa-meta-secondary {
    font-size: 11.5px;
    color: var(--colors-body, #64748b);
    line-height: 1.2;
    white-space: nowrap;
  }

  .wa-meta .badge {
    font-size: 10px;
    padding: 2px 7px;
    line-height: 1.2;
  }

  /* Fallback Card Transformation for legacy generic clean-table */
  .table-container {
    border: 1px solid var(--colors-border);
    background: var(--colors-canvas);
    border-radius: var(--rounded-card);
    overflow: hidden;
  }

  .table-container:has(.clean-table) {
    border: none;
    background: transparent;
    border-radius: 0;
  }

  .clean-table {
    display: block;
    width: 100%;
  }

.clean-table thead {
  display: none;
}

.clean-table tbody {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.clean-table tr {
  display: block;
  background-color: var(--colors-canvas);
  border: 1px solid var(--colors-border);
  border-radius: var(--rounded-card);
  padding: 14px 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.clean-table td {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--colors-canvas-soft);
  font-size: 13px;
  min-width: 0;
}

.clean-table td::before {
  content: attr(data-label);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--colors-body);
  letter-spacing: 0.5px;
  text-align: left;
  margin-right: var(--spacing-sm);
  flex-shrink: 0;
}

/* Values on the right of the mobile card row */
.table-cell-val {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  min-width: 0;
}

/* Special full-width presentation for Wedding Attire / Outfits inside mobile card */
.clean-table td[data-label="Wedding Attire"],
.clean-table td[data-label="Outfit"] {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 0;
}

.clean-table td[data-label="Wedding Attire"]::before,
.clean-table td[data-label="Outfit"]::before {
  margin-right: 0;
}

.clean-table td[data-label="Wedding Attire"] .product-row-flex,
.clean-table td[data-label="Outfit"] .product-row-flex {
  max-width: 100% !important;
  width: 100%;
  justify-content: flex-start !important;
  text-align: left !important;
  background: #fafbfc;
  padding: 8px 10px;
  border-radius: var(--rounded-card);
  border: 1px solid var(--colors-border);
  gap: 10px;
}

.clean-table td[data-label="Wedding Attire"] .product-row-flex>div,
.clean-table td[data-label="Outfit"] .product-row-flex>div {
  text-align: left !important;
  min-width: 0;
}

/* Full-width primary touch action at the bottom of the mobile card */
.clean-table td[data-label="Action"],
.clean-table td.td-action,
.clean-table td:last-child {
  border-bottom: none;
  padding-top: 10px;
  margin-top: 4px;
  justify-content: stretch;
}

.clean-table td[data-label="Action"]::before,
.clean-table td.td-action::before {
  display: none;
}

.clean-table td[data-label="Action"] .button-outline,
.clean-table td[data-label="Action"] .button-primary,
.clean-table td.td-action .button-outline,
.clean-table td.td-action .button-primary {
  width: 100%;
  text-align: center;
  justify-content: center;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 700;
}
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--rounded-pill-md);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.badge-active {
  background-color: #e6f4ea;
  color: var(--colors-success);
}

.badge-inactive {
  background-color: var(--colors-canvas-soft);
  color: var(--colors-body);
  border: 1px solid var(--colors-border);
}

.badge-warning {
  background-color: #fef3c7;
  color: var(--colors-warning);
}

/* Filter / Search Bar */
.filter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 220px;
  padding: 10px 14px;
  border: 1px solid var(--colors-border);
  border-radius: var(--rounded-sm);
  font-size: 14px;
  background-color: var(--colors-canvas);
  outline: none;
  font-family: inherit;
}

.search-input:focus {
  border-color: var(--colors-ink);
}

.select-filter {
  padding: 10px 14px;
  border: 1px solid var(--colors-border);
  border-radius: var(--rounded-sm);
  font-size: 14px;
  background-color: var(--colors-canvas);
  font-family: inherit;
  cursor: pointer;
}

/* Forms */
.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--colors-ink);
  margin-bottom: 6px;
}

.text-input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--colors-border);
  border-radius: var(--rounded-sm);
  font-size: 14px;
  color: var(--colors-ink);
  background-color: var(--colors-canvas);
  font-family: inherit;
}

.text-input:focus {
  outline: none;
  border-color: var(--colors-ink);
}

.text-input[readonly] {
  background-color: var(--colors-canvas-soft);
  color: var(--colors-body);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-lg);
}

.form-hint {
  font-size: 12px;
  color: var(--colors-body);
  margin-top: 4px;
  display: block;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(37, 40, 43, 0.65);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: var(--spacing-md);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

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

.modal-card {
  background-color: var(--colors-canvas);
  border-radius: var(--rounded-card);
  max-width: 580px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--colors-border);
  margin: auto;
}

.modal-header {
  padding: var(--spacing-lg) var(--spacing-2xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--colors-border);
  position: sticky;
  top: 0;
  background-color: var(--colors-canvas);
  z-index: 10;
}

.modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--colors-ink);
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--colors-body);
  padding: 4px;
  line-height: 1;
}

.modal-body {
  padding: var(--spacing-2xl);
}

.modal-footer {
  padding: var(--spacing-lg) var(--spacing-2xl);
  border-top: 1px solid var(--colors-border);
  background-color: var(--colors-canvas-soft);
  display: flex;
  justify-content: flex-end;
  gap: var(--spacing-md);
  position: sticky;
  bottom: 0;
  z-index: 10;
}

/* Tabs */
.tabs-nav {
  display: flex;
  gap: var(--spacing-sm);
  border-bottom: 1px solid var(--colors-border);
  margin-bottom: var(--spacing-2xl);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap;
}

.tab-link {
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 16px;
  color: var(--colors-body);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
}

.tab-link:hover {
  color: var(--colors-ink);
}

.tab-link.active {
  color: var(--colors-ink);
  border-bottom-color: var(--colors-primary);
}

/* =========================================================
   AUTHENTICATION PAGE STYLES (Clean & 100% Responsive)
   ========================================================= */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  background-color: var(--colors-canvas);
  width: 100%;
}

.auth-sidebar {
  flex: 1.2;
  background-color: var(--colors-ink);
  color: var(--colors-on-dark);
  padding: 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  font-size: 20px;
  font-weight: 800;
}

.auth-hero-text h1 {
  font-size: clamp(32px, 4.5vw, 56px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -1px;
  margin-bottom: var(--spacing-lg);
  text-transform: uppercase;
}

.auth-hero-text p {
  font-size: 15px;
  color: var(--colors-mute);
  max-width: 440px;
  line-height: 1.6;
}

.auth-panel {
  flex: 1;
  max-width: 520px;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: var(--colors-canvas);
}

.auth-box {
  max-width: 380px;
  width: 100%;
  margin: 0 auto;
}

.auth-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--colors-ink);
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--colors-body);
  margin-bottom: var(--spacing-2xl);
  line-height: 1.5;
}

.otp-inputs {
  display: flex;
  gap: 8px;
  margin-bottom: var(--spacing-xl);
  width: 100%;
  justify-content: space-between;
}

.otp-box {
  flex: 1;
  max-width: 48px;
  min-width: 0;
  height: 52px;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  border: 1px solid var(--colors-border);
  border-radius: var(--rounded-sm);
  background-color: var(--colors-canvas);
  outline: none;
}

.otp-box:focus {
  border-color: var(--colors-primary);
}

/* Toast (Disabled per user request) */
.toast-container {
  display: none !important;
}

.toast {
  display: none !important;
}

/* =========================================================
   RESPONSIVE BREAKPOINTS (Mobile & Tablet Optimization)
   ========================================================= */

/* Desktop / Web App: Sidebar & Dashboard always visible */
@media (min-width: 901px) {
  .sidebar {
    transform: none !important;
    display: flex !important;
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: var(--sidebar-width) !important;
    z-index: 1000 !important;
  }

  .main-wrapper {
    margin-left: var(--sidebar-width) !important;
    width: calc(100% - var(--sidebar-width)) !important;
  }

  .mobile-menu-btn {
    display: none !important;
  }

  .sidebar-close-btn {
    display: none !important;
  }

  .sidebar-overlay {
    display: none !important;
  }
}

/* Tablet & Mobile Nav Drawer (Under 900px) */
@media (max-width: 900px) {
  .sidebar-overlay {
    z-index: 2050 !important;
  }

  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
    z-index: 2100 !important;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 6px 0 28px rgba(0, 0, 0, 0.4);
    z-index: 2100 !important;
  }

  .sidebar-close-btn {
    display: block;
  }

  .main-wrapper {
    margin-left: 0;
    width: 100%;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

  .top-bar {
    padding: 0 var(--spacing-xl);
  }

  .content-body {
    padding: var(--spacing-xl);
  }
}

/* Tablet & Smaller Desktops (Under 1200px) */
@media (max-width: 1200px) {

  .dashboard-grid-2col,
  .dashboard-grid-equal {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }
}

/* Tablet (Under 1024px) */
@media (max-width: 1024px) {
  .auth-wrapper {
    flex-direction: column;
  }

  .auth-sidebar {
    padding: 40px var(--spacing-2xl);
    flex: none;
  }

  .auth-hero-text h1 {
    font-size: 36px;
    margin-bottom: 12px;
  }

  .auth-panel {
    max-width: 100%;
    width: 100%;
    padding: 40px var(--spacing-2xl);
  }
}

/* Mobile Screens (Under 640px) */
@media (max-width: 640px) {
  .top-bar {
    padding: 0 var(--spacing-md);
    height: 60px;
  }

  .top-bar a.button-primary,
  .top-bar button.button-primary {
    padding: 7px 12px;
    font-size: 12px;
    white-space: nowrap;
  }

  .page-title {
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 170px;
  }

  .tenant-chip {
    display: none;
  }

  .content-body {
    padding: var(--spacing-md);
    padding-bottom: 84px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xl);
  }

  .dashboard-grid-2col,
  .dashboard-grid-equal {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
  }

  .card-stat {
    padding: var(--spacing-md);
  }

  .card-label {
    font-size: 11px;
  }

  .card-value {
    font-size: 22px;
  }

  .bar-chart-container {
    height: 195px;
    padding-top: 16px;
  }

  .bars-wrapper {
    height: 135px;
    gap: 4px;
  }

  .bar-col {
    width: 13px;
  }

  .month-label {
    font-size: 10px;
    margin-top: 6px;
  }

  .chart-footer-stat {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 12px;
  }

  .card-panel {
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
  }

  .card-panel-header {
    margin-bottom: var(--spacing-md);
    flex-wrap: nowrap;
    gap: 8px;
  }

  .card-panel-header .panel-title {
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .card-panel-header .button-outline,
  .card-panel-header a.button-outline {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 6px 12px;
    font-size: 12px;
  }

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

  .filter-row {
    flex-direction: column;
    align-items: stretch;
    gap: var(--spacing-sm);
  }

  .search-input {
    width: 100%;
    min-width: 0;
  }

  .filter-row>div {
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  .select-filter {
    width: 100%;
  }

  .modal-card {
    max-height: 96vh;
    border-radius: var(--rounded-sm);
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding: var(--spacing-lg);
  }

  .button-primary,
  .button-outline {
    padding: 9px 18px;
    font-size: 13px;
  }

  .bar-col {
    width: 14px;
  }

  .bars-wrapper {
    gap: 3px;
  }

  .month-label {
    font-size: 10px;
  }

  .auth-sidebar {
    padding: 28px var(--spacing-lg);
  }

  .auth-panel {
    padding: 32px var(--spacing-lg);
  }

  .auth-hero-text h1 {
    font-size: 28px;
  }

  .otp-box {
    height: 46px;
    font-size: 18px;
  }

  .toast-container {
    bottom: 80px;
    right: 16px;
    left: 16px;
  }
}

/* =========================================================
   DEDICATED NEW ORDER PAGE & ADVANCED PICKERS
   ========================================================= */

.order-flow-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--spacing-2xl);
  align-items: start;
}

@media (max-width: 1080px) {
  .order-flow-layout {
    grid-template-columns: 1fr;
  }
}

/* Order Section Cards */
.order-section-card {
  background: var(--colors-canvas);
  border: 1px solid var(--colors-border);
  border-radius: var(--rounded-card);
  padding: var(--spacing-2xl);
  margin-bottom: var(--spacing-xl);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.order-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--colors-border);
}

.order-section-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--colors-ink);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.order-section-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--colors-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

/* Scalable Customer Search & Selection */
.customer-search-box {
  position: relative;
  margin-bottom: var(--spacing-md);
}

.customer-search-input {
  width: 100%;
  padding: 13px 44px 13px 16px;
  border: 1.5px solid var(--colors-border);
  border-radius: var(--rounded-card);
  font-size: 15px;
  background-color: var(--colors-canvas);
  color: var(--colors-ink);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.customer-search-input:focus {
  border-color: var(--colors-primary);
  box-shadow: 0 0 0 3px rgba(230, 0, 0, 0.12);
}

.customer-search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--colors-mute);
  pointer-events: none;
}

/* Customer Results Dropdown list / Virtual list */
.customer-results-list {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--colors-border);
  border-radius: var(--rounded-card);
  background: var(--colors-canvas);
  margin-bottom: var(--spacing-md);
}

.customer-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--colors-canvas-soft);
  cursor: pointer;
  transition: background 0.15s ease;
}

.customer-item-card:hover {
  background-color: #fff5f5;
}

.customer-item-card.selected {
  background-color: #fff0f0;
  border-left: 3px solid var(--colors-primary);
}

.customer-item-info {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.customer-item-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f0f2f5;
  color: var(--colors-ink);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--colors-border);
}

.customer-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--colors-ink);
}

.customer-item-sub {
  font-size: 12px;
  color: var(--colors-body);
}

/* Selected Customer Display Banner */
.selected-customer-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background-color: #fafbfc;
  border: 1.5px solid #e1e4e8;
  border-radius: var(--rounded-card);
  margin-bottom: var(--spacing-sm);
}

.selected-customer-banner.active {
  border-color: #15803d;
  background-color: #f6fcf8;
}

/* Product Selection Gallery Grid with Photos */
.product-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-md);
}

.product-picker-card {
  position: relative;
  background: var(--colors-canvas);
  border: 1.5px solid var(--colors-border);
  border-radius: var(--rounded-card);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.product-picker-card:hover {
  transform: translateY(-2px);
  border-color: var(--colors-ink-light);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.product-picker-card.selected {
  border-color: var(--colors-primary);
  box-shadow: 0 0 0 2px var(--colors-primary), 0 6px 16px rgba(230, 0, 0, 0.12);
}

.product-picker-thumb-wrap {
  position: relative;
  width: 100%;
  height: 190px;
  background: #f0f2f5;
  overflow: hidden;
}

.product-picker-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-picker-card:hover .product-picker-thumb {
  transform: scale(1.04);
}

.product-selected-badge {
  display: none;
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--colors-primary);
  color: white;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  z-index: 2;
}

.product-picker-card.selected .product-selected-badge {
  display: flex;
}

.product-picker-details {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-picker-cat {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--colors-body);
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.product-picker-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--colors-ink);
  line-height: 1.3;
  margin-bottom: 8px;
  flex: 1;
}

.product-picker-rate {
  font-size: 15px;
  font-weight: 800;
  color: var(--colors-ink);
}

/* Category Filter Chips for Product Grid */
.category-chips-scroll {
  display: flex;
  gap: var(--spacing-xs);
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: var(--spacing-sm);
  -webkit-overflow-scrolling: touch;
}

.category-chip {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--rounded-pill-md);
  border: 1px solid var(--colors-border);
  background: var(--colors-canvas);
  color: var(--colors-body);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.category-chip:hover {
  background: var(--colors-canvas-soft);
  color: var(--colors-ink);
}

.category-chip.active {
  background: var(--colors-ink);
  color: var(--colors-on-dark);
  border-color: var(--colors-ink);
}

/* Order Summary Sticky Panel */
.order-summary-sidebar {
  position: sticky;
  top: 90px;
  background: var(--colors-canvas);
  border: 1.5px solid var(--colors-border);
  border-radius: var(--rounded-card);
  padding: var(--spacing-2xl);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
  color: var(--colors-body);
}

.summary-row.total-row {
  border-top: 1.5px dashed var(--colors-border);
  padding-top: 14px;
  margin-top: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--colors-ink);
}

.summary-row.balance-row {
  background: #fff5f5;
  border: 1px solid rgba(230, 0, 0, 0.15);
  border-radius: var(--rounded-card);
  padding: 12px 14px;
  margin-top: 10px;
  color: var(--colors-primary);
  font-size: 15px;
  font-weight: 800;
}

/* Product Table Thumbnails for products.html */
.product-table-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--rounded-sm);
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--colors-border);
}

.product-row-flex {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

/* =========================================================
   COMPACT & RESPONSIVE BOOKING FORM (Wedfit Order Workflow)
   ========================================================= */

.compact-booking-wrapper {
  max-width: 1040px;
  margin: 0 auto;
  width: 100%;
}

.order-layout-2col {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--spacing-xl);
  align-items: start;
}

.order-main-col {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  min-width: 0;
}

.order-side-col {
  min-width: 0;
}

.booking-form-card {
  background: var(--colors-canvas);
  border: 1px solid var(--colors-border);
  border-radius: var(--rounded-card);
  padding: 16px 20px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.booking-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--colors-canvas-soft);
}

.booking-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--colors-ink);
}

/* 3-Column Dates on Desktop */
.dates-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-md);
}

/* Field Trigger Selector Boxes */
.field-trigger-box {
  border: 1.5px dashed var(--colors-border);
  border-radius: var(--rounded-card);
  padding: 12px 16px;
  background: #fafbfc;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.field-trigger-box:hover {
  border-color: var(--colors-primary);
  background: #fffafa;
}

.field-trigger-content {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.field-trigger-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f0f2f5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--colors-body);
  flex-shrink: 0;
}

.field-trigger-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--colors-ink);
  line-height: 1.25;
}

.field-trigger-subtitle {
  font-size: 12px;
  color: var(--colors-body);
  margin-top: 2px;
}

/* Unified Selected Entity Cards (Client Card & Outfit Item) on Booking Form */
.selected-entity-card,
.selected-outfit-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--colors-canvas);
  border: 1px solid var(--colors-border);
  border-radius: var(--rounded-card);
  gap: 12px;
  transition: all 0.15s ease;
  min-height: 58px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.selected-entity-card:hover,
.selected-outfit-item:hover {
  border-color: var(--colors-ink-light);
}

.selected-entity-info,
.selected-outfit-media {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.selected-entity-avatar {
  width: 42px;
  height: 42px;
  border-radius: var(--rounded-sm);
  background: #fef2f2;
  color: var(--colors-primary);
  border: 1px solid rgba(230, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  flex-shrink: 0;
}

.selected-outfit-img {
  width: 42px;
  height: 42px;
  border-radius: var(--rounded-sm);
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--colors-border);
}

.selected-entity-text,
.selected-outfit-details {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.selected-entity-name,
.selected-outfit-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--colors-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.selected-entity-meta,
.selected-outfit-meta {
  font-size: 11.5px;
  color: var(--colors-body);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.selected-entity-actions,
.selected-outfit-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.selected-outfit-price {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--colors-ink);
  white-space: nowrap;
}

.entity-action-btn {
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: var(--rounded-pill-md);
  border: 1px solid var(--colors-border);
  background: var(--colors-canvas-soft);
  color: var(--colors-ink);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.entity-action-btn:hover {
  border-color: var(--colors-primary);
  color: var(--colors-primary);
  background: #fef2f2;
}

.entity-remove-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--colors-border);
  background: var(--colors-canvas-soft);
  color: var(--colors-body);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.entity-remove-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: var(--colors-primary);
}

/* Selected Outfit List in Booking Form */
.selected-outfits-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

/* Sticky Summary Card */
.sticky-summary-card {
  position: sticky;
  top: 76px;
}

.summary-line-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--colors-body);
}

.summary-row .summary-value {
  font-weight: 700;
  color: var(--colors-ink);
}

.summary-divider {
  height: 1px;
  background: var(--colors-border);
  margin: 6px 0;
}

.summary-row.total-row {
  font-size: 15px;
  font-weight: 800;
  color: var(--colors-ink);
}

.summary-row.total-row .summary-value {
  font-size: 17px;
  font-weight: 800;
  color: var(--colors-ink);
}

.balance-card {
  background: #f0fdf4;
  border: 1.5px solid #22c55e;
  border-radius: var(--rounded-card);
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}

.balance-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #15803d;
  letter-spacing: 0.5px;
}

.balance-amount {
  font-size: 20px;
  font-weight: 800;
  color: #166534;
}

/* =========================================================
   UNIFIED MODAL PICKER STYLES (Client & Wedding Attire)
   ========================================================= */
.modal-picker-search {
  margin-bottom: var(--spacing-md);
}

.modal-picker-list {
  max-height: 380px;
  overflow-y: auto;
  border: 1px solid var(--colors-border);
  border-radius: var(--rounded-card);
  background: var(--colors-canvas);
  display: flex;
  flex-direction: column;
}

.modal-picker-list::-webkit-scrollbar {
  width: 5px;
}

.modal-picker-list::-webkit-scrollbar-thumb {
  background: var(--colors-border);
  border-radius: 4px;
}

.picker-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-bottom: 1px solid var(--colors-canvas-soft);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  gap: 12px;
  background: var(--colors-canvas);
}

.picker-item-row:hover {
  background-color: #fff8f8;
}

.picker-item-row.selected {
  background-color: #fef2f2;
}

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

.picker-item-visual {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.customer-item-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fee2e2;
  color: var(--colors-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.outfit-item-thumb {
  width: 42px;
  height: 42px;
  border-radius: var(--rounded-sm);
  object-fit: cover;
  border: 1px solid var(--colors-border);
  flex-shrink: 0;
}

.picker-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.picker-item-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--colors-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.picker-item-meta {
  font-size: 12px;
  color: var(--colors-body);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.picker-item-action {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.picker-item-price {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--colors-primary);
  white-space: nowrap;
}

.picker-action-btn {
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 20px;
  border: 1px solid var(--colors-border);
  background: var(--colors-canvas-soft);
  color: var(--colors-ink);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.picker-action-btn:hover {
  border-color: var(--colors-primary);
  color: var(--colors-primary);
  background: #fff5f5;
}

.picker-action-btn.added {
  background: var(--colors-primary);
  color: #fff;
  border-color: var(--colors-primary);
}

.picker-action-btn.selected {
  background: #16a34a;
  color: #fff;
  border-color: #16a34a;
}

/* Modal Category Filter Chips */
.category-chips-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  margin-bottom: var(--spacing-md);
}

.category-chips-scroll::-webkit-scrollbar {
  height: 4px;
}

.category-chips-scroll::-webkit-scrollbar-thumb {
  background: var(--colors-border);
  border-radius: 4px;
}

.category-chip {
  background: var(--colors-canvas-soft);
  border: 1px solid var(--colors-border);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--colors-body);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.category-chip:hover {
  border-color: var(--colors-primary);
  color: var(--colors-ink);
}

.category-chip.active {
  background: var(--colors-ink);
  color: var(--colors-on-dark);
  border-color: var(--colors-ink);
}

/* Fallback grid styles */
.modal-outfit-grid {
  display: flex;
  flex-direction: column;
}

.modal-outfit-card {
  border: 1px solid var(--colors-border);
  border-radius: var(--rounded-card);
  background: var(--colors-canvas);
}

/* Mobile & Tablet Responsiveness for Order Page */
@media (max-width: 900px) {
  .order-layout-2col {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  .sticky-summary-card {
    position: static;
  }

  .dates-3col {
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
  }

  .booking-form-card {
    padding: 14px 16px;
  }

  .field-trigger-box .trigger-btn {
    display: none;
  }

  .selected-entity-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .selected-entity-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 600px) {
  .modal-picker-list {
    max-height: 340px;
  }

  .picker-item-row {
    padding: 10px 10px;
    gap: 10px;
  }

  .customer-item-avatar,
  .outfit-item-thumb {
    width: 38px;
    height: 38px;
  }

  .customer-item-avatar {
    font-size: 12px;
  }

  .picker-item-title {
    font-size: 13px;
  }

  .picker-item-meta {
    font-size: 11.5px;
  }

  .picker-item-action {
    gap: 6px;
  }

  .picker-item-price {
    font-size: 12.5px;
  }

  .picker-action-btn {
    padding: 4px 10px;
    font-size: 11px;
  }

  .picker-item-action .badge {
    display: none;
  }

  .category-chips-scroll {
    gap: 6px;
    margin-bottom: var(--spacing-sm);
  }

  .category-chip {
    padding: 5px 11px;
    font-size: 11.5px;
  }
}


/* =========================================================
   DASHBOARD TABLES (Top Rental Outfits & Recent Wedding Bookings)
   UNIFIED PATTERN & BULLETPROOF RESPONSIVENESS
   ========================================================= */

.top-outfits-table,
.recent-bookings-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.top-outfits-table th,
.recent-bookings-table th {
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--colors-body);
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--colors-border);
  background: var(--colors-canvas-soft);
  vertical-align: middle;
}

.top-outfits-table td,
.recent-bookings-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--colors-canvas-soft);
  vertical-align: middle;
  min-width: 0;
}

.top-outfits-table tr:last-child td,
.recent-bookings-table tr:last-child td {
  border-bottom: none;
}

/* Specific Column Widths on Desktop */
.top-outfits-table .col-item,
.recent-bookings-table .col-item {
  width: 48%;
  text-align: left;
}

.top-outfits-table .col-rentals {
  width: 26%;
  text-align: center;
}

.recent-bookings-table .col-customer {
  width: 26%;
  text-align: left;
}

.top-outfits-table .col-income,
.recent-bookings-table .col-date {
  width: 26%;
  text-align: right;
}

.card-panel .table-container {
  width: 100%;
  overflow: hidden !important;
  overflow-x: hidden !important;
}

/* Shared Elements */
.product-row-flex {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
  width: 100%;
}

.product-row-flex>div {
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.product-table-thumb {
  width: 38px;
  height: 38px;
  border-radius: var(--rounded-sm);
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

.outfit-title-text {
  font-weight: 700;
  color: var(--colors-ink);
  font-size: 13px;
  line-height: 1.25;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

.customer-name-text {
  font-weight: 700;
  color: var(--colors-ink);
  font-size: 13px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.rental-date-text {
  font-weight: 600;
  color: var(--colors-ink);
  font-size: 13px;
}

.rentals-count {
  font-weight: 700;
  color: var(--colors-ink);
  font-size: 13px;
}

.income-value {
  color: var(--colors-ink);
  font-size: 13px;
}

.desktop-text {
  display: inline;
}

.mobile-text {
  display: none;
}

.panel-title-link {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

/* Responsive Overrides (Under 768px - Tablets & Mobiles) */
@media (max-width: 768px) {
  .card-panel-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    margin-bottom: var(--spacing-md) !important;
  }

  .card-panel-header .panel-title {
    font-size: 15px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .card-panel-header .button-outline,
  .card-panel-header a.button-outline {
    display: none !important;
  }

  .panel-title-link {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    -webkit-tap-highlight-color: transparent;
  }

  .panel-title-link:active {
    opacity: 0.75;
  }

  .desktop-text {
    display: none !important;
  }

  .mobile-text {
    display: inline !important;
  }

  /* Table structure */
  .top-outfits-table,
  .recent-bookings-table {
    display: table !important;
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    box-sizing: border-box !important;
  }

  .top-outfits-table thead,
  .recent-bookings-table thead {
    display: table-header-group !important;
  }

  .top-outfits-table tbody,
  .recent-bookings-table tbody {
    display: table-row-group !important;
  }

  .top-outfits-table tr,
  .recent-bookings-table tr {
    display: table-row !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .top-outfits-table th,
  .recent-bookings-table th {
    display: table-cell !important;
    padding: 7px 5px !important;
    font-size: 10px !important;
    border-bottom: 1px solid var(--colors-border) !important;
    white-space: nowrap !important;
    background: var(--colors-canvas-soft) !important;
  }

  .top-outfits-table td,
  .recent-bookings-table td {
    display: table-cell !important;
    padding: 7px 5px !important;
    border-bottom: 1px solid var(--colors-canvas-soft) !important;
    font-size: 12px !important;
    vertical-align: middle !important;
    min-width: 0 !important;
  }

  .top-outfits-table td::before,
  .recent-bookings-table td::before {
    display: none !important;
  }

  /* Harmonious Mobile Column Widths for both Tables (48% | 26% | 26%) */
  .top-outfits-table .col-item,
  .recent-bookings-table .col-item {
    width: 48% !important;
    min-width: 0 !important;
    padding: 7px 5px !important;
    text-align: left !important;
  }

  .top-outfits-table .col-rentals {
    width: 26% !important;
    text-align: center !important;
    padding: 7px 3px !important;
  }

  .recent-bookings-table .col-customer {
    width: 26% !important;
    text-align: left !important;
    padding: 7px 3px !important;
  }

  .top-outfits-table .col-income,
  .recent-bookings-table .col-date {
    width: 26% !important;
    text-align: right !important;
    padding: 7px 4px !important;
  }

  .recent-bookings-table .desktop-only-meta {
    display: none !important;
  }

  .recent-bookings-table .col-action {
    display: none !important;
  }

  .clickable-booking-row {
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.04);
  }

  .clickable-booking-row:active {
    background-color: var(--colors-canvas-soft) !important;
  }

  /* Compact Thumbs & Truncated Text on Mobile */
  .product-row-flex {
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .product-table-thumb {
    width: 32px !important;
    height: 32px !important;
    border-radius: var(--rounded-sm) !important;
    object-fit: cover !important;
    flex-shrink: 0 !important;
    display: block !important;
  }

  .outfit-title-text {
    font-size: 11.5px !important;
    line-height: 1.25 !important;
    display: block !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    min-width: 0 !important;
    flex: 1 !important;
  }

  .customer-name-text {
    font-size: 12px !important;
    display: block !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    min-width: 0 !important;
  }

  .rentals-count {
    font-size: 11.5px !important;
  }

  .income-value {
    font-size: 11.5px !important;
  }

  .btn-hide-mobile {
    display: none !important;
  }
}

/* Detail Pages Flat Item Rows (Clean, Unboxed) */
.detail-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--colors-border);
  gap: var(--spacing-md);
}

.detail-item-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.detail-item-label {
  font-size: 13.5px;
  color: var(--colors-body);
}

.detail-item-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--colors-ink);
  text-align: right;
}

/* =========================================================
   MOBILE APP EXPERIENCE & UNIFIED COMPONENT SYSTEM
   ========================================================= */

/* 1. Page Stats Bar (Minimalist metric pills above search) */
.page-stats-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: var(--spacing-md);
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--colors-canvas);
  border: 1px solid var(--colors-border);
  border-radius: var(--rounded-pill-md);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--colors-body);
  transition: all 0.15s ease;
}

.stat-pill .stat-num {
  font-weight: 800;
  color: var(--colors-ink);
}

.stat-pill-active {
  background: rgba(230, 0, 0, 0.05);
  border-color: rgba(230, 0, 0, 0.2);
}

.stat-pill-active .stat-num {
  color: var(--colors-primary);
}

/* 2. Unified 3-Zone List Row (Used across Products, Bookings, Customers, Categories, Staff) */
.app-list-view {
  display: flex;
  flex-direction: column;
  background: var(--colors-canvas);
  border: 1px solid var(--colors-border);
  border-radius: var(--rounded-card);
  overflow: hidden;
}

.app-list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--colors-canvas-soft);
  background: var(--colors-canvas);
  transition: background-color 0.15s ease;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.04);
  cursor: pointer;
}

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

.app-list-row:hover {
  background-color: var(--colors-canvas-soft);
}

.app-list-row:active {
  background-color: rgba(0, 0, 0, 0.04);
}

/* Zone 1: Leading Media */
.cell-leading {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cell-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--colors-border);
  background: var(--colors-canvas-soft);
}

.cell-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  flex-shrink: 0;
}

/* Zone 2: Center Body */
.cell-body {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cell-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--colors-ink);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cell-subtitle {
  font-size: 12px;
  color: var(--colors-body);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

/* Zone 3: Trailing Meta */
.cell-trailing {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.cell-value {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--colors-ink);
  line-height: 1.2;
  white-space: nowrap;
}

.cell-trailing .badge {
  font-size: 10px;
  padding: 2px 7px;
  font-weight: 700;
}

/* 3. Mobile Back Navigation Button & Mobile App Bar */
.appbar-back-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--colors-ink);
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  margin-right: 6px;
  flex-shrink: 0;
  transition: background-color 0.15s ease, color 0.15s ease;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.05);
}

.appbar-back-btn:hover,
.appbar-back-btn:active {
  background-color: var(--colors-canvas-soft);
  color: var(--colors-primary);
}

.appbar-back-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* Desktop breadcrumb back link */
.desktop-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--colors-body);
  text-decoration: none;
  margin-right: 12px;
  padding: 4px 8px;
  border-radius: var(--rounded-pill-md);
  transition: all 0.15s ease;
}

.desktop-back-link:hover {
  color: var(--colors-primary);
  background: var(--colors-canvas-soft);
}

/* 4. Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: #ffffff;
  border-top: 1px solid var(--colors-border);
  z-index: 990;
  align-items: center;
  justify-content: space-around;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.04);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
  height: 100%;
  text-decoration: none;
  color: var(--colors-body);
  font-size: 10.5px;
  font-weight: 600;
  transition: color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  transition: transform 0.15s ease;
}

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

.bottom-nav-item.active svg {
  transform: scale(1.08);
}

/* Visibility Control Helpers */
.desktop-only-table {
  display: block;
}

.mobile-only-list {
  display: none;
}

@media (max-width: 900px) {
  .desktop-only-table {
    display: none !important;
  }

  .mobile-only-list {
    display: flex !important;
  }

  .mobile-bottom-nav {
    display: flex !important;
  }

  .content-body {
    padding: 14px 14px 120px 14px !important;
  }

  /* Mobile FAB: Strictly removed on mobile and tablet because "New Order" is in the bottom navigation bar */
  .fab-btn,
  .web-only-fab {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  .desktop-back-link {
    display: none !important;
  }

  .appbar-back-btn {
    display: inline-flex !important;
  }

  .top-bar {
    height: 56px !important;
    padding: 0 12px !important;
  }

  .page-title {
    font-size: 17px !important;
  }
}

/* =========================================================
   STICKY SEARCH, FILTER BOTTOM SHEET & ACTIVE CHIPS
   ========================================================= */

/* Sticky Search & Filter Bar */
.search-filter-sticky-bar {
  position: sticky;
  top: 64px;
  z-index: 950;
  background: #f7f7f8;
  padding: 8px 0 10px 0;
  margin-bottom: var(--spacing-md);
  overflow: visible !important;
}

@media (max-width: 768px) {
  .search-filter-sticky-bar {
    top: 56px;
    padding: 6px 0 8px 0;
  }
}

.search-filter-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  position: relative;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}

.search-input-wrap .search-icon {
  position: absolute;
  left: 14px;
  width: 16px;
  height: 16px;
  fill: var(--colors-body);
  pointer-events: none;
}

.search-input-wrap .search-input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border-radius: var(--rounded-pill-md);
  border: 1px solid var(--colors-border);
  background: var(--colors-canvas);
  font-size: 13.5px;
  color: var(--colors-ink);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-input-wrap .search-input:focus {
  border-color: var(--colors-primary);
  box-shadow: 0 0 0 3px rgba(230, 0, 0, 0.08);
}

/* Filter Dropdown Component */
.filter-dropdown-wrapper {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}

.filter-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: var(--rounded-pill-md);
  border: 1px solid var(--colors-border);
  background: var(--colors-canvas);
  color: var(--colors-ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.filter-trigger-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.filter-trigger-btn .dropdown-chevron {
  width: 14px;
  height: 14px;
  fill: currentColor;
  transition: transform 0.2s ease;
  margin-left: 1px;
}

.filter-dropdown-wrapper.open .dropdown-chevron {
  transform: rotate(180deg);
}

.filter-trigger-btn:hover,
.filter-trigger-btn.has-active,
.filter-dropdown-wrapper.open .filter-trigger-btn {
  background: rgba(230, 0, 0, 0.06);
  border-color: var(--colors-primary);
  color: var(--colors-primary);
}

.filter-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--colors-primary);
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 800;
  border-radius: 9px;
  line-height: 1;
}

/* Filter Dropdown Popover Menu */
.filter-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 250px;
  max-width: calc(100vw - 32px);
  background: var(--colors-canvas, #ffffff);
  border: 1px solid var(--colors-border, #e5e7eb);
  border-radius: var(--rounded-card, 12px);
  box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.14), 0 4px 10px -2px rgba(0, 0, 0, 0.06);
  padding: 6px;
  z-index: 1050;
  animation: dropdownFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.filter-dropdown-menu.open {
  display: block;
}

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

.dropdown-section-title {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--colors-body, #6b7280);
  padding: 6px 10px 4px;
}

.dropdown-filter-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--colors-ink, #25282b);
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: all 0.12s ease;
  font-family: inherit;
  box-sizing: border-box;
}

.dropdown-filter-item:hover {
  background: var(--colors-canvas-soft, #f3f4f6);
}

.dropdown-filter-item.active {
  background: rgba(230, 0, 0, 0.08);
  color: var(--colors-primary, #e60000);
  font-weight: 700;
}

.dropdown-filter-item .item-check {
  font-size: 13px;
  color: var(--colors-primary, #e60000);
  opacity: 0;
  font-weight: 800;
  margin-left: 8px;
}

.dropdown-filter-item.active .item-check {
  opacity: 1;
}

.dropdown-filter-divider {
  height: 1px;
  background: var(--colors-border, #e5e7eb);
  margin: 5px 0;
}

.dropdown-date-filter-wrap {
  padding: 4px 6px 6px;
}

.dropdown-date-input {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--colors-border, #e5e7eb);
  border-radius: 6px;
  font-size: 12.5px;
  font-family: inherit;
  color: var(--colors-ink, #25282b);
  background: #ffffff;
  outline: none;
  box-sizing: border-box;
}

.dropdown-date-input:focus {
  border-color: var(--colors-primary, #e60000);
}

/* Active Filter Chips Horizontal Scroll View */
.active-filter-chips-scroll {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  white-space: nowrap;
  padding: 6px 0 2px 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.active-filter-chips-scroll::-webkit-scrollbar {
  display: none;
}

.active-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(230, 0, 0, 0.08);
  color: var(--colors-primary);
  border: 1px solid rgba(230, 0, 0, 0.25);
  padding: 4px 10px;
  border-radius: var(--rounded-pill-md);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.active-chip:hover {
  background: rgba(230, 0, 0, 0.15);
}

.active-chip .chip-remove {
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  opacity: 0.75;
  margin-left: 2px;
}

.active-chip:hover .chip-remove {
  opacity: 1;
}

/* Filter Popup / Bottom Sheet */
.filter-sheet-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2500;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.filter-sheet-backdrop.open {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

@media (min-width: 769px) {
  .filter-sheet-backdrop.open {
    align-items: center;
  }
}

.filter-bottom-sheet {
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  border-radius: 20px 20px 0 0;
  padding: 20px 22px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.2);
  animation: slideUpSheet 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 769px) {
  .filter-bottom-sheet {
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    animation: fadeInModal 0.2s ease-out;
  }
}

@keyframes slideUpSheet {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes fadeInModal {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--colors-border);
}

.sheet-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--colors-ink);
  margin: 0;
}

.sheet-close-btn {
  background: none;
  border: none;
  font-size: 26px;
  color: var(--colors-body);
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
}

.sheet-body {
  overflow-y: auto;
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sheet-section-title {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--colors-body);
  margin-bottom: 8px;
}

.sheet-pills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sheet-pill-option {
  padding: 7px 14px;
  border-radius: var(--rounded-pill-md);
  border: 1px solid var(--colors-border);
  background: var(--colors-canvas-soft);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--colors-ink);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.sheet-pill-option:hover {
  border-color: var(--colors-ink);
}

.sheet-pill-option.selected {
  background: rgba(230, 0, 0, 0.08);
  border-color: var(--colors-primary);
  color: var(--colors-primary);
  font-weight: 700;
}

.sheet-footer {
  display: flex;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--colors-border);
}

.sheet-footer .button-outline {
  flex: 1;
}

.sheet-footer .button-primary {
  flex: 2;
}

/* Quick Action WhatsApp & Call Buttons */
.contact-actions-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.contact-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--colors-border);
  background: #ffffff;
  color: var(--colors-ink);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.contact-action-btn svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.contact-action-btn.wa-btn {
  color: #16a34a;
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.contact-action-btn.wa-btn:hover,
.contact-action-btn.wa-btn:active {
  background: #16a34a;
  color: #ffffff;
  border-color: #16a34a;
}

.contact-action-btn.call-btn {
  color: #0284c7;
  border-color: #bae6fd;
  background: #f0f9ff;
}

.contact-action-btn.call-btn:hover,
.contact-action-btn.call-btn:active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

.contact-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--rounded-pill-md);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
}

.contact-pill-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.contact-pill-btn.wa-pill {
  background: #16a34a;
  color: #ffffff;
  border: 1px solid #16a34a;
}

.contact-pill-btn.wa-pill:hover {
  background: #15803d;
}

.contact-pill-btn.call-pill {
  background: #0284c7;
  color: #ffffff;
  border: 1px solid #0284c7;
}

.contact-pill-btn.call-pill:hover {
  background: #0369a1;
}