/**
 * OrdersNexus Custom Styles
 * Consolidated application-specific CSS
 */

/* ============================================
   CSS Custom Properties (Design Tokens)
   ============================================ */
:root {
  /* Text Colors */
  --on-text-primary: #566a7f;
  --on-text-secondary: #697a8d;
  --on-text-muted: #868e96;
  --on-heading-color: var(--on-heading-color);

  /* Background Colors */
  --on-bg-light: #f8f9fa;
  --on-bg-lighter: #fafbfc;

  /* Border Colors */
  --on-border-light: #e9ecef;
  --on-border-dashed: #d4d8dd;

  /* Brand Color Variants */
  --on-primary-dark: #5a4cd8;
  --on-primary-alt: #696cff;
  --on-primary-hover: #5f51e8;

  /* Primary Alpha (transparency variants) */
  --on-primary-alpha-2: rgba(115, 103, 240, 0.02);
  --on-primary-alpha-3: rgba(115, 103, 240, 0.03);
  --on-primary-alpha-4: rgba(115, 103, 240, 0.04);
  --on-primary-alpha-5: rgba(115, 103, 240, 0.05);
  --on-primary-alpha-6: rgba(115, 103, 240, 0.06);
  --on-primary-alpha-8: rgba(115, 103, 240, 0.08);
  --on-primary-alpha-10: rgba(115, 103, 240, 0.10);
  --on-primary-alpha-12: rgba(115, 103, 240, 0.12);
  --on-primary-alpha-15: rgba(115, 103, 240, 0.15);
  --on-primary-alpha-20: rgba(115, 103, 240, 0.20);
  --on-primary-alpha-25: rgba(115, 103, 240, 0.25);
  --on-primary-alpha-30: rgba(115, 103, 240, 0.30);
  --on-primary-alpha-40: rgba(115, 103, 240, 0.40);

  /* Success Alpha */
  --on-success-alpha-5: rgba(40, 167, 69, 0.05);
  --on-success-alpha-10: rgba(40, 167, 69, 0.10);
  --on-success-alpha-15: rgba(40, 167, 69, 0.15);

  /* Danger Alpha */
  --on-danger-alpha-5: rgba(234, 84, 85, 0.05);
  --on-danger-alpha-10: rgba(234, 84, 85, 0.10);

  /* Info Alpha */
  --on-info-alpha-5: rgba(0, 207, 232, 0.05);
  --on-info-alpha-10: rgba(0, 207, 232, 0.10);

  /* Warning Alpha */
  --on-warning-alpha-5: rgba(255, 171, 0, 0.05);
  --on-warning-alpha-8: rgba(255, 159, 67, 0.08);
  --on-warning-alpha-10: rgba(255, 171, 0, 0.10);

  /* Black Alpha (shadows, overlays) */
  --on-black-alpha-5: rgba(0, 0, 0, 0.05);
  --on-black-alpha-8: rgba(0, 0, 0, 0.08);
  --on-black-alpha-10: rgba(0, 0, 0, 0.10);
  --on-black-alpha-12: rgba(0, 0, 0, 0.12);
  --on-black-alpha-20: rgba(0, 0, 0, 0.20);
  --on-black-alpha-30: rgba(0, 0, 0, 0.30);

  /* White Alpha (overlays on dark backgrounds) */
  --on-white-alpha-10: rgba(255, 255, 255, 0.10);
  --on-white-alpha-20: rgba(255, 255, 255, 0.20);

  /* Gradients */
  --on-gradient-primary: linear-gradient(135deg, var(--bs-primary) 0%, var(--on-primary-dark) 100%);
  --on-gradient-success: linear-gradient(135deg, var(--bs-success) 0%, #1e9f5e 100%);
  --on-gradient-danger: linear-gradient(135deg, var(--bs-danger) 0%, #c42b3e 100%);
  --on-gradient-info: linear-gradient(135deg, var(--bs-info) 0%, #3dc9b0 100%);
  --on-gradient-light: var(--on-gradient-light);

  /* Shadows */
  --on-shadow-xs: 0 1px 3px var(--on-black-alpha-8);
  --on-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --on-shadow-md: 0 4px 12px var(--on-black-alpha-10);
  --on-shadow-lg: 0 0.5rem 1rem var(--on-black-alpha-10);
  --on-shadow-xl: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15);
  --on-shadow-primary: 0 4px 12px var(--on-primary-alpha-30);
  --on-shadow-success: 0 4px 12px rgba(40, 199, 111, 0.3);
  --on-shadow-danger: 0 4px 12px rgba(234, 84, 85, 0.3);

  /* Transitions */
  --on-transition-fast: all 0.15s ease;
  --on-transition-base: all 0.2s ease;
  --on-transition-slow: all 0.3s ease;

  /* Border Radius */
  --on-radius-xs: 0.25rem;
  --on-radius-sm: 0.375rem;
  --on-radius-md: 0.5rem;
  --on-radius-lg: 0.75rem;
  --on-radius-xl: 1rem;
  --on-radius-pill: 50rem;
  --on-radius-circle: 50%;

  /* Typography */
  --on-font-mono: 'Monaco', 'Consolas', 'Courier New', monospace;
  --on-font-size-xs: 0.6875rem;
  --on-font-size-sm: 0.75rem;
  --on-font-size-md: 0.8125rem;
  --on-font-size-base: 0.875rem;

  /* Spacing (icon/avatar sizes) */
  --on-icon-xs: 24px;
  --on-icon-sm: 32px;
  --on-icon-md: 40px;
  --on-icon-lg: 48px;
  --on-icon-xl: 60px;
  --on-icon-2xl: 80px;
}

/* ============================================
   Base Utility Classes (DRY Patterns)
   ============================================ */

/* Card Hover Effect - Base pattern for interactive cards */
.card-hover {
  transition: var(--on-transition-base);
  border: 1px solid transparent;
}

.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--on-shadow-md);
  border-color: var(--bs-primary);
}

/* Card Hover with 2px border variant */
.card-hover-bordered {
  transition: var(--on-transition-base);
  border: 2px solid transparent;
}

.card-hover-bordered:hover {
  transform: translateY(-2px);
  box-shadow: var(--on-shadow-md);
  border-color: var(--bs-primary);
}

/* Card Hover with left accent */
.card-hover-accent {
  transition: var(--on-transition-base);
  border-left: 3px solid transparent;
}

.card-hover-accent:hover {
  transform: translateX(4px);
  box-shadow: var(--on-shadow-md);
  border-left-color: var(--bs-primary);
}

/* Icon Container - Centered flex box for icons */
.icon-container {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--on-radius-circle);
}

.icon-container-xs { width: var(--on-icon-xs); height: var(--on-icon-xs); }
.icon-container-sm { width: var(--on-icon-sm); height: var(--on-icon-sm); }
.icon-container-md { width: var(--on-icon-md); height: var(--on-icon-md); }
.icon-container-lg { width: var(--on-icon-lg); height: var(--on-icon-lg); }
.icon-container-xl { width: var(--on-icon-xl); height: var(--on-icon-xl); }
.icon-container-2xl { width: var(--on-icon-2xl); height: var(--on-icon-2xl); }

/* Rounded icon container variant */
.icon-container-rounded {
  border-radius: var(--on-radius-md);
}

/* Status Left Border - Vertical indicator line */
.status-border-left {
  position: relative;
}

.status-border-left::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
}

.status-border-left.status-primary::before { background: var(--bs-primary); }
.status-border-left.status-success::before { background: var(--bs-success); }
.status-border-left.status-warning::before { background: var(--bs-warning); }
.status-border-left.status-danger::before { background: var(--bs-danger); }
.status-border-left.status-info::before { background: var(--bs-info); }
.status-border-left.status-secondary::before { background: var(--bs-secondary); }

/* Gradient Background Utilities */
.bg-gradient-primary { background: var(--on-gradient-primary); color: white; }
.bg-gradient-success { background: var(--on-gradient-success); color: white; }
.bg-gradient-danger { background: var(--on-gradient-danger); color: white; }
.bg-gradient-info { background: var(--on-gradient-info); color: white; }
.bg-gradient-light { background: var(--on-gradient-light); }

/* Table/List Row Hover - Interactive row highlighting */
.row-hover {
  transition: var(--on-transition-fast);
}

.row-hover:hover {
  background-color: var(--on-primary-alpha-4);
}

/* Item Selected State */
.item-selected {
  background-color: var(--on-primary-alpha-8);
}

/* Item Modified State (for editable rows) */
.item-modified {
  background-color: var(--on-warning-alpha-8);
}

/* Item Removed State */
.item-removed {
  background-color: var(--on-danger-alpha-5);
  opacity: 0.6;
}

/* Item New State */
.item-new {
  background-color: var(--on-info-alpha-5);
}

/* Flex Center - Centering utility */
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Clickable Card (cursor + transition) */
.card-clickable {
  cursor: pointer;
  transition: var(--on-transition-base);
}

/* Selectable Card (with selected state) */
.card-selectable {
  cursor: pointer;
  transition: var(--on-transition-base);
  border: 2px solid transparent;
}

.card-selectable:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem var(--on-primary-alpha-12);
}

.card-selectable.selected {
  border-color: var(--bs-primary);
  background: linear-gradient(135deg, var(--on-primary-alpha-6) 0%, var(--on-primary-alpha-2) 100%);
}

/* ============================================
   Notification Bell
   ============================================ */
.dropdown-notifications-item.marked-as-unread {
  background-color: var(--on-primary-alpha-8);
  position: relative;
}

.dropdown-notifications-item.marked-as-unread::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background-color: var(--bs-primary);
}

.dropdown-notifications-list {
  max-height: 400px;
  overflow-y: auto;
}

.dropdown-notifications-item {
  position: relative;
  transition: background-color 0.15s ease;
}

.dropdown-notifications-item:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

.dropdown-notifications-item .notification-link {
  color: inherit;
}

.dropdown-notifications-item .notification-link:hover {
  color: inherit;
}

.dropdown-notifications-item .notification-dismiss {
  opacity: 0;
  transition: opacity 0.15s ease;
}

.dropdown-notifications-item:hover .notification-dismiss {
  opacity: 1;
}

/* ============================================
   Navigation Menu Badges & Attention States
   ============================================ */
.menu-item[data-nav-attention].has-attention > .menu-link {
  position: relative;
}

.menu-item[data-nav-attention].has-attention > .menu-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--bs-warning);
  border-radius: 0 3px 3px 0;
}

.menu-item[data-nav-attention].has-urgent > .menu-link::before {
  background: var(--bs-danger);
  animation: pulse-attention 2s infinite;
}

@keyframes pulse-attention {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.nav-badge {
  font-size: 0.6875rem;
  padding: 0.25rem 0.5rem;
  min-width: 1.25rem;
}

/* ============================================
   Stat Cards
   ============================================ */
.stat-card,
.stat-card-clickable {
  transition: var(--on-transition-base);
  border-left: 4px solid transparent;
}

.stat-card:hover,
.stat-card-clickable:hover {
  transform: translateY(-3px);
  box-shadow: var(--on-shadow-lg);
}

.stat-card-clickable {
  cursor: pointer;
}

.stat-card-clickable.active {
  border-left-color: var(--bs-primary);
  box-shadow: 0 0.25rem 0.5rem var(--on-primary-alpha-15);
}

/* Stat card color variants */
.stat-card.border-primary,
.stat-card-clickable[data-status].active { border-left-color: var(--bs-primary); }
.stat-card.border-success { border-left-color: var(--bs-success); }
.stat-card.border-warning { border-left-color: var(--bs-warning); }
.stat-card.border-info { border-left-color: var(--bs-info); }
.stat-card.border-danger { border-left-color: var(--bs-danger); }
.stat-card.border-secondary { border-left-color: var(--bs-secondary); }

/* Stat card hover effect for clickable stat cards */
.stat-card-hover {
  transition: var(--on-transition-base);
}
.stat-card-hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--on-shadow-md);
}

/* Named status variants */
.stat-pending { border-left-color: var(--bs-warning) !important; }
.stat-ready { border-left-color: var(--bs-info) !important; }
.stat-transit { border-left-color: var(--bs-primary) !important; }
.stat-delivered { border-left-color: var(--bs-success) !important; }
.stat-failed { border-left-color: var(--bs-danger) !important; }
.stat-returns { border-left-color: var(--bs-secondary) !important; }

/* Stat value typography */
.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--bs-secondary);
  font-weight: 500;
}

.stat-secondary {
  font-size: 0.75rem;
  color: var(--on-text-muted);
}

/* Stat card with centered icon */
.stat-card-centered {
  text-align: center;
  padding: 1.5rem;
}

.stat-card-centered .stat-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--on-radius-circle);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
}

.stat-card-centered .stat-value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-card-centered .stat-label {
  font-size: 0.875rem;
  color: var(--bs-secondary);
}

/* ============================================
   Stats Banner (Reusable Vuexy-styled)
   ============================================ */
.stats-banner {
    background: var(--on-gradient-light);
    border: 1px solid var(--on-black-alpha-8);
    border-radius: 0.75rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.dark-style .stats-banner {
    background: linear-gradient(135deg, #2a2e34 0%, #1e2228 100%);
    border-color: rgba(255, 255, 255, 0.08);
}

.stats-section {
    position: relative;
    padding: 0.75rem 1.25rem;
}

.stats-section:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 60%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--on-black-alpha-10), transparent);
}

.dark-style .stats-section:not(:last-child)::after {
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.stats-section-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.stats-section-label i {
    font-size: 0.875rem;
}

/* Action Required Section */
.stats-section.action-required {
    background: linear-gradient(135deg, rgba(234, 84, 85, 0.08) 0%, rgba(234, 84, 85, 0.02) 100%);
    border-radius: 0.5rem 0 0 0.5rem;
}

.stats-section.action-required .stat-chip {
    background: white;
    border: 1px solid var(--on-black-alpha-8);
    box-shadow: 0 1px 3px var(--on-black-alpha-8);
}

.dark-style .stats-section.action-required .stat-chip {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Stat Chips - Flat Style */
.stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    border-radius: var(--on-radius-sm);
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--on-transition-fast);
    border: 1px solid transparent;
}

.stat-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px var(--on-black-alpha-12);
    text-decoration: none;
}

.stat-chip.active {
    box-shadow: inset 0 0 0 2px currentColor;
}

.stat-chip .count {
    font-weight: 700;
    min-width: 1.5rem;
    text-align: center;
    padding: 0.125rem 0.375rem;
    background: var(--on-black-alpha-8);
    border-radius: 0.25rem;
}

.dark-style .stat-chip .count {
    background: rgba(255, 255, 255, 0.15);
}

/* Pulse Animation for Action Items */
.pulse-dot {
    width: 6px;
    height: 6px;
    background: #ea5455;
    border-radius: var(--on-radius-circle);
    animation: pulse-banner 2s infinite;
}

@keyframes pulse-banner {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

/* Stat Widget Clickable (Vuexy card-widget style) */
.stat-widget-clickable {
    cursor: pointer;
    transition: var(--on-transition-base);
    border-radius: var(--on-radius-sm);
    padding: 0.5rem;
    margin: -0.5rem;
}

.stat-widget-clickable:hover {
    background: var(--on-primary-alpha-4);
}

.stat-widget-clickable.active {
    background: var(--on-primary-alpha-8);
    box-shadow: inset 0 0 0 2px var(--bs-primary);
}

/* Card Widget Separator (Vuexy style) */
.card-widget-separator-wrapper {
    padding-top: 0;
}

.card-widget-separator .card-widget-1,
.card-widget-separator .card-widget-2,
.card-widget-separator .card-widget-3 {
    transition: var(--on-transition-base);
}

/* Stats Banner Clear Button */
.stats-clear-btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
}

/* Responsive Stats Banner */
@media (max-width: 768px) {
    .stats-banner {
        border-radius: var(--on-radius-md);
    }

    .stats-section {
        padding: 0.5rem 0.75rem;
    }

    .stats-section:not(:last-child)::after {
        display: none;
    }

    .stats-section-label {
        font-size: 0.625rem;
    }

    .stat-chip {
        padding: 0.3rem 0.5rem;
        font-size: 0.6875rem;
    }
}

/* ============================================
   Status Timeline (Progress dots)
   ============================================ */
.status-timeline {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
}

.status-step {
  width: 8px;
  height: 8px;
  border-radius: var(--on-radius-circle);
  background: var(--bs-border-color);
}

.status-step.completed { background: var(--bs-success); }
.status-step.current { background: var(--bs-primary); animation: pulse 1.5s infinite; }
.status-step.rejected,
.status-step.failed { background: var(--bs-danger); }

.status-connector {
  width: 12px;
  height: 2px;
  background: var(--bs-gray-300);
}

.status-connector.completed { background: var(--bs-success); }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.2); }
}

/* ============================================
   Quick Action Buttons
   ============================================ */
.quick-action-btn {
  opacity: 0;
  transition: opacity 0.2s ease;
}

tr:hover .quick-action-btn,
.card:hover .quick-action-btn {
  opacity: 1;
}

/* ============================================
   Filter Chips
   ============================================ */
.filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.8125rem;
  background: var(--bs-gray-100);
  border: 1px solid var(--bs-gray-300);
  cursor: pointer;
  transition: var(--on-transition-base);
}

.filter-chip:hover,
.filter-chip.active {
  background: var(--bs-primary);
  color: white;
  border-color: var(--bs-primary);
}

/* Active filter chips (removable) */
.active-filter {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 50rem;
  font-size: 0.8125rem;
  background: var(--bs-primary);
  color: white;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.active-filter a {
  color: white;
  text-decoration: none;
  margin-left: 0.5rem;
}

.active-filter.bg-info { background: var(--bs-info) !important; }
.active-filter.bg-success { background: var(--bs-success) !important; }
.active-filter.bg-warning { background: var(--bs-warning) !important; color: var(--bs-dark); }
.active-filter.bg-danger { background: var(--bs-danger) !important; }

/* ============================================
   Expandable Table Rows
   ============================================ */
.expandable-row {
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.expandable-row:hover {
  background-color: var(--on-primary-alpha-4);
}

.expandable-row.expanded {
  background-color: var(--on-primary-alpha-8);
}

.expand-toggle {
  transition: transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--on-radius-xs);
  color: var(--bs-secondary);
}

.expandable-row:hover .expand-toggle {
  background-color: var(--bs-gray-200);
}

.expandable-row.expanded .expand-toggle {
  transform: rotate(90deg);
  color: var(--bs-primary);
}

.details-row {
  display: none;
}

.details-row.show {
  display: table-row;
}

.details-row > td {
  padding: 0 !important;
  border-top: none !important;
}

.details-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 1.5rem;
  background: var(--bs-gray-50);
  border-left: 3px solid var(--bs-primary);
}

.details-row.show .details-content {
  max-height: 500px;
  padding: 1rem 1.5rem;
}

.expanded-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.75rem;
}

.expanded-item-card {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: white;
  border-radius: var(--on-radius-sm);
  border: 1px solid var(--bs-border-color);
  transition: var(--on-transition-fast);
}

.expanded-item-card:hover {
  border-color: var(--bs-primary);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.expanded-item-card .item-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bs-gray-100);
  border-radius: var(--on-radius-sm);
  margin-right: 0.75rem;
  flex-shrink: 0;
}

.expanded-item-card .item-info {
  flex: 1;
  min-width: 0;
}

.expanded-item-card .item-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.125rem;
}

.expanded-item-card .item-meta {
  font-size: 0.75rem;
  color: var(--bs-secondary);
}

.expanded-item-card .item-qty {
  font-weight: 600;
  color: var(--bs-primary);
  margin-left: 0.5rem;
  white-space: nowrap;
}

.expanded-item-card.item-ok { border-left: 3px solid var(--bs-success); }
.expanded-item-card.item-partial { border-left: 3px solid var(--bs-warning); }
.expanded-item-card.item-issue { border-left: 3px solid var(--bs-danger); }

.expanded-actions {
  display: flex;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--bs-border-color);
  margin-top: 0.75rem;
}

.details-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  color: var(--bs-secondary);
}

/* ============================================
   Signature Pad (POD)
   ============================================ */
.signature-pad-container {
  border: 2px dashed #ccc;
  border-radius: var(--on-radius-md);
  background: var(--on-bg-light);
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: crosshair;
  touch-action: none;
}

.signature-pad-container.has-signature {
  border-color: var(--bs-success);
  border-style: solid;
  background: white;
}

.signature-pad {
  width: 100%;
  height: 150px;
  border-radius: 6px;
}

/* ============================================
   Photo Upload
   ============================================ */
.photo-upload-zone {
  border: 2px dashed #dee2e6;
  border-radius: var(--on-radius-md);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: var(--on-transition-base);
}

.photo-upload-zone:hover {
  border-color: var(--bs-primary);
  background: rgba(var(--bs-primary-rgb), 0.05);
}

.photo-upload-zone.dragover {
  border-color: var(--bs-success);
  background: rgba(var(--bs-success-rgb), 0.1);
}

.photo-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.photo-preview img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--on-radius-sm);
  border: 2px solid #e9ecef;
}

/* ============================================
   Delivery Summary
   ============================================ */
.delivery-summary {
  background: linear-gradient(135deg, var(--bs-success) 0%, #26de81 100%);
  border-radius: var(--on-radius-md);
  color: white;
}

.delivery-summary .stat-value {
  font-size: 1.75rem;
  font-weight: 700;
}

.pod-section {
  background: var(--on-bg-light);
  border-radius: var(--on-radius-md);
  padding: 1.5rem;
}

/* ============================================
   Mobile Optimization
   ============================================ */
.touch-target {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.touch-target-lg {
  min-width: 56px;
  min-height: 56px;
}

.mobile-action-btn {
  min-height: 48px;
  font-size: 1rem;
  font-weight: 500;
  border-radius: var(--on-radius-lg);
  transition: var(--on-transition-fast);
}

.mobile-action-btn:active {
  transform: scale(0.98);
}

.mobile-action-btn-primary {
  background: var(--on-gradient-primary);
  border: none;
  color: white;
  box-shadow: var(--on-shadow-primary);
}

.mobile-action-btn-success {
  background: linear-gradient(135deg, var(--bs-success) 0%, #1e9f5e 100%);
  border: none;
  color: white;
  box-shadow: var(--on-shadow-success);
}

.mobile-action-btn-danger {
  background: linear-gradient(135deg, var(--bs-danger) 0%, #c42b3e 100%);
  border: none;
  color: white;
  box-shadow: var(--on-shadow-danger);
}

.mobile-card {
  border-radius: 16px;
  border: none;
  box-shadow: var(--on-shadow-sm);
  margin-bottom: 1rem;
  overflow: hidden;
}

.mobile-card .card-body {
  padding: 1rem;
}

.mobile-card.urgency-high { border-left: 4px solid var(--bs-danger); }
.mobile-card.urgency-medium { border-left: 4px solid var(--bs-warning); }
.mobile-card.urgency-low { border-left: 4px solid var(--bs-success); }

/* Swipeable cards */
.swipe-container {
  position: relative;
  overflow: hidden;
}

.swipe-actions {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: stretch;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.swipe-container.swiped .swipe-actions {
  transform: translateX(0);
}

.swipe-action-btn {
  width: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.75rem;
  font-weight: 500;
  border: none;
}

.swipe-action-btn i {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

/* Mobile stat cards */
.mobile-stats-container {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.mobile-stats-container::-webkit-scrollbar {
  display: none;
}

.mobile-stat-card {
  flex: 0 0 auto;
  width: 140px;
  scroll-snap-align: start;
  background: white;
  border-radius: var(--on-radius-lg);
  padding: 1rem;
  text-align: center;
  box-shadow: var(--on-shadow-sm);
}

.mobile-stat-card .stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.mobile-stat-card .stat-label {
  font-size: 0.75rem;
  color: var(--bs-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mobile-stat-card.active {
  background: var(--bs-primary);
  color: white;
}

.mobile-stat-card.active .stat-label {
  color: rgba(255,255,255,0.8);
}

/* Mobile bottom nav */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid var(--bs-border-color);
  display: flex;
  justify-content: space-around;
  padding: 0.5rem 0;
  padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0));
  z-index: 1030;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.mobile-bottom-nav .nav-item {
  flex: 1;
  text-align: center;
}

.mobile-bottom-nav .nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem;
  color: var(--bs-secondary);
  font-size: 0.625rem;
  text-decoration: none;
  transition: color 0.15s ease;
}

.mobile-bottom-nav .nav-link i {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.mobile-bottom-nav .nav-link.active {
  color: var(--bs-primary);
}

.mobile-bottom-nav .nav-link .badge {
  position: absolute;
  top: 0;
  right: calc(50% - 20px);
  font-size: 0.5rem;
  padding: 0.2rem 0.4rem;
}

body.has-mobile-nav {
  padding-bottom: calc(60px + env(safe-area-inset-bottom, 0));
}

/* Mobile header */
.mobile-header {
  background: var(--bs-primary);
  color: white;
  padding: 1rem;
  padding-top: calc(1rem + env(safe-area-inset-top, 0));
  position: sticky;
  top: 0;
  z-index: 1020;
}

.mobile-header-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.mobile-header-subtitle {
  font-size: 0.875rem;
  opacity: 0.8;
  margin: 0;
}

/* Mobile FAB */
.mobile-fab {
  position: fixed;
  bottom: calc(80px + env(safe-area-inset-bottom, 0));
  right: 1rem;
  width: 56px;
  height: 56px;
  border-radius: var(--on-radius-circle);
  background: var(--bs-primary);
  color: white;
  border: none;
  box-shadow: 0 4px 12px var(--on-primary-alpha-40);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  z-index: 1025;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mobile-fab:active {
  transform: scale(0.95);
  box-shadow: 0 2px 8px var(--on-primary-alpha-30);
}

/* Mobile input */
.mobile-input {
  font-size: 16px !important; /* Prevents iOS zoom */
  padding: 0.75rem 1rem;
  border-radius: var(--on-radius-lg);
  border: 2px solid var(--bs-border-color);
  transition: border-color 0.15s ease;
}

.mobile-input:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 3px var(--on-primary-alpha-10);
}

/* Mobile qty stepper */
.mobile-qty-stepper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mobile-qty-stepper .btn {
  width: 44px;
  height: 44px;
  border-radius: var(--on-radius-circle);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.mobile-qty-stepper input {
  width: 60px;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 600;
  border: none;
  background: var(--bs-gray-100);
  border-radius: var(--on-radius-md);
  padding: 0.5rem;
}

/* Mobile photo capture */
.mobile-photo-capture {
  position: relative;
  width: 100%;
  min-height: 120px;
  border: 2px dashed var(--bs-border-color);
  border-radius: var(--on-radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bs-gray-50);
  cursor: pointer;
  transition: var(--on-transition-base);
}

.mobile-photo-capture:hover,
.mobile-photo-capture:active {
  border-color: var(--bs-primary);
  background: var(--on-primary-alpha-5);
}

.mobile-photo-capture i {
  font-size: 2rem;
  color: var(--bs-secondary);
  margin-bottom: 0.5rem;
}

.mobile-photo-capture span {
  font-size: 0.875rem;
  color: var(--bs-secondary);
}

.mobile-photo-capture input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.mobile-photo-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 1rem;
}

.mobile-photo-preview img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--on-radius-md);
}

/* Barcode scanner input */
.mobile-barcode-input {
  position: relative;
}

.mobile-barcode-input input {
  padding-right: 50px;
}

.mobile-barcode-input .scan-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: var(--on-radius-md);
  background: var(--bs-primary);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile empty state */
.mobile-empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
}

.mobile-empty-state .empty-icon {
  width: 80px;
  height: 80px;
  border-radius: var(--on-radius-circle);
  background: var(--bs-gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.mobile-empty-state .empty-icon i {
  font-size: 2rem;
  color: var(--bs-secondary);
}

/* Offline indicator */
.offline-indicator {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--bs-warning);
  color: var(--bs-dark);
  text-align: center;
  padding: 0.5rem;
  font-size: 0.875rem;
  z-index: 1050;
  display: none;
}

.offline-indicator.show {
  display: block;
}

/* Status pulse animation */
.status-pulse {
  animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ============================================
   Form Helpers
   ============================================ */
.form-help-text {
  font-size: 0.8125rem;
  color: var(--bs-secondary);
  margin-top: 0.25rem;
}

.form-help-text i {
  font-size: 0.75rem;
}

/* Form Section Header */
.form-section {
  padding: 1.5rem;
  background: var(--bs-gray-50);
  border-radius: var(--on-radius-md);
  margin-bottom: 1.5rem;
}

.form-section-header {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--bs-border-color);
}

.form-section-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--on-gradient-primary);
  border-radius: var(--on-radius-md);
  margin-right: 1rem;
}

/* ============================================
   Product/Image Thumbnails
   ============================================ */
.product-image {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: var(--on-radius-md);
}

.product-image-lg {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--on-radius-lg);
}

/* Sticky sidebar */
.sticky-sidebar,
.sidebar-sticky {
  position: sticky;
  top: 100px;
}

/* Product Page Header */
.product-header {
  background: var(--on-gradient-primary);
  border-radius: var(--on-radius-md);
  padding: 2rem;
  color: white;
  position: relative;
  overflow: hidden;
}

.product-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
}

/* ============================================
   Order Cards
   ============================================ */
.order-card {
  transition: var(--on-transition-base);
  border: 1px solid transparent;
}

.order-card:hover {
  border-color: var(--bs-primary);
  transform: translateY(-2px);
  box-shadow: var(--on-shadow-lg);
}

.order-card:hover .quick-action-btn {
  opacity: 1;
}

/* Pending Card (warning border on hover) */
.pending-card {
  transition: var(--on-transition-base);
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.pending-card:hover {
  border-color: var(--bs-warning);
  transform: translateY(-2px);
  box-shadow: var(--on-shadow-lg);
}

.countdown-badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
}

.quick-action-overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.95));
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 1rem;
  transition: width 0.3s ease;
  overflow: hidden;
}

.pending-card:hover .quick-action-overlay {
  width: 200px;
}

@media (max-width: 768px) {
  .quick-action-overlay {
    display: none;
  }
}

/* Approval Card */
.approval-card {
  transition: var(--on-transition-base);
  border: 1px solid transparent;
}

.approval-card:hover {
  border-color: var(--bs-primary);
  box-shadow: 0 0.25rem 0.5rem rgba(0,0,0,0.05);
}

.approval-summary {
  position: sticky;
  top: 5rem; /* Account for fixed navbar height */
}

/* Sticky sidebar wrapper - keeps both approval summary and tips visible */
.sticky-sidebar {
  position: sticky;
  top: 5rem; /* Account for fixed navbar height */
}

/* Consent Card (purple border on hover) */
.consent-card {
  transition: var(--on-transition-base);
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.consent-card:hover {
  border-color: var(--bs-purple);
  transform: translateY(-2px);
  box-shadow: var(--on-shadow-lg);
}

.consent-indicator {
  width: 4px;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  background: var(--bs-purple);
}

/* ============================================
   Quantity Input Group
   ============================================ */
.quantity-input-group {
  max-width: 120px;
}

.quantity-input-group .form-control {
  text-align: center;
  font-weight: 600;
}

/* Hide default number input spinners */
.quantity-input-group input[type="number"]::-webkit-outer-spin-button,
.quantity-input-group input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.quantity-input-group input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* ============================================
   Item Row States (Approval)
   ============================================ */
.item-row {
  transition: var(--on-transition-base);
}

.item-row:hover {
  background-color: var(--on-primary-alpha-4);
}

.item-row.partial {
  background-color: rgba(255, 159, 67, 0.08);
}

.item-row.rejected {
  background-color: rgba(234, 84, 85, 0.08);
  opacity: 0.7;
}

/* Quick Set Button */
.quick-set-btn {
  padding: 0.15rem 0.5rem;
  font-size: 0.7rem;
  border-radius: 1rem;
}

/* ============================================
   Priority Indicators
   ============================================ */
.priority-indicator {
  width: 4px;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 0.5rem 0 0 0.5rem;
}

.priority-low { background: var(--bs-secondary); }
.priority-normal { background: var(--bs-info); }
.priority-high { background: var(--bs-warning); }
.priority-urgent { background: var(--bs-danger); }

/* ============================================
   View Toggle Buttons
   ============================================ */
.view-toggle .btn { border-radius: 0; }
.view-toggle .btn:first-child { border-radius: 0.375rem 0 0 0.375rem; }
.view-toggle .btn:last-child { border-radius: 0 0.375rem 0.375rem 0; }

/* ============================================
   Product/Favourite Cards
   ============================================ */
.product-card,
.favourite-card {
  transition: var(--on-transition-base);
  border: 1px solid var(--bs-border-color);
}

.product-card:hover,
.favourite-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--on-shadow-md);
  border-color: var(--bs-primary);
}

/* Product Image Placeholder */
.product-image-placeholder {
  width: 48px;
  height: 48px;
  min-width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bs-gray-100);
  border-radius: var(--on-radius-md);
  border: 1px dashed var(--bs-gray-300);
}

/* Supplier Badge */
.supplier-badge {
  background: linear-gradient(135deg, var(--on-primary-alpha-10) 0%, var(--on-primary-alpha-5) 100%);
  color: var(--bs-primary);
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: var(--on-radius-xs);
  display: inline-block;
}

/* Favourite Button */
.favourite-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: var(--on-radius-circle);
  border: none;
  background: var(--bs-gray-100);
  color: var(--bs-gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--on-transition-base);
  flex-shrink: 0;
}

.favourite-btn:hover {
  background: rgba(234, 84, 85, 0.1);
  color: var(--bs-danger);
  transform: scale(1.1);
}

.favourite-btn.active {
  background: rgba(234, 84, 85, 0.15);
  color: var(--bs-danger);
}

.favourite-btn.active i {
  animation: heartPulse 0.3s ease;
}

/* Large Favourite Button (for Favourites page) */
.favourite-btn-lg {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: var(--on-radius-circle);
  border: none;
  background: var(--bs-gray-100);
  color: var(--bs-gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--on-transition-base);
  flex-shrink: 0;
}

.favourite-btn-lg:hover {
  background: rgba(234, 84, 85, 0.1);
  color: var(--bs-danger);
  transform: scale(1.1);
}

.favourite-btn-lg.active {
  background: rgba(234, 84, 85, 0.2);
  color: var(--bs-danger);
  box-shadow: 0 2px 8px rgba(234, 84, 85, 0.3);
}

.favourite-btn-lg.active i {
  animation: heartPulse 0.3s ease;
}

@keyframes heartPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* Stock Badge */
.stock-badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--on-radius-xs);
}

.stock-badge.in-stock {
  background: rgba(40, 199, 111, 0.15);
  color: var(--bs-success);
}

.stock-badge.out-of-stock {
  background: rgba(234, 84, 85, 0.15);
  color: var(--bs-danger);
}

/* Order Stats */
.order-stats {
  font-size: 0.75rem;
  color: var(--bs-secondary);
  background: var(--bs-gray-50);
  padding: 0.35rem 0.5rem;
  border-radius: var(--on-radius-xs);
}

/* Gradient Headers */
.gradient-header {
  background: var(--on-gradient-primary);
  border-radius: var(--on-radius-md);
  padding: 2rem;
  color: white;
  margin-bottom: 2rem;
}

/* Detail Card with left border */
.detail-card {
  border-left: 3px solid var(--bs-primary);
  transition: var(--on-transition-slow);
}

.detail-card:hover {
  box-shadow: 0 0.5rem 1.5rem var(--on-primary-alpha-15);
}

/* Base/Featured Unit Card (gradient) */
.base-unit-card,
.featured-card {
  background: var(--on-gradient-primary);
  color: white;
  position: relative;
  overflow: hidden;
}

.base-unit-card::before,
.featured-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: shimmer 3s infinite;
}

/* Unit/Hover Card */
.unit-card,
.hover-card {
  transition: var(--on-transition-slow);
  border: 2px solid transparent;
  height: 100%;
}

.unit-card:hover,
.hover-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.5rem 1.5rem var(--on-primary-alpha-15);
  border-color: var(--on-primary-alpha-30);
}

/* Section with left border */
.bordered-section {
  border-left: 3px solid var(--bs-primary);
  padding-left: 1rem;
  margin-bottom: 2rem;
}

/* Favourite/Action Button */
.action-btn-circle {
  width: 38px;
  height: 38px;
  border-radius: var(--on-radius-circle);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: var(--on-transition-base);
}

.action-btn-circle:hover {
  transform: scale(1.1);
}

/* Image Placeholders */
.image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bs-gray-100);
  border-radius: var(--on-radius-md);
}

/* Info Label/Value */
.info-label {
  font-size: 0.75rem;
  color: var(--bs-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.info-value {
  font-size: 1rem;
  font-weight: 600;
}

/* Conversion Display */
.conversion-display {
  font-family: var(--on-font-mono);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--bs-primary);
  background: var(--on-primary-alpha-10);
  padding: 0.5rem 1rem;
  border-radius: var(--on-radius-md);
  display: inline-block;
}

/* Add Card (dashed border) */
.add-card {
  border: 2px dashed var(--bs-primary);
  background: var(--on-primary-alpha-5);
  cursor: pointer;
  transition: var(--on-transition-slow);
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.add-card:hover {
  background: var(--on-primary-alpha-10);
  border-color: #5f51e8;
  transform: scale(1.02);
}

/* Modal Header Gradient */
.modal-header-gradient {
  background: var(--on-gradient-primary);
  color: white;
}

/* Section Divider */
.section-divider {
  border-top: 2px dashed var(--bs-border-color);
  margin: 2rem 0;
}

/* ============================================
   Info & Highlight Boxes
   ============================================ */
.info-box,
.example-box {
  background: linear-gradient(135deg, var(--on-primary-alpha-8) 0%, var(--on-primary-alpha-3) 100%);
  border-left: 3px solid var(--bs-primary);
  padding: 1rem;
  border-radius: var(--on-radius-sm);
}

.warning-box {
  background: var(--on-warning-alpha-10);
  border-left: 3px solid var(--bs-warning);
  padding: 1rem;
  border-radius: var(--on-radius-sm);
}

.success-box {
  background: var(--on-success-alpha-10);
  border-left: 3px solid var(--bs-success);
  padding: 1rem;
  border-radius: var(--on-radius-sm);
}

/* Selectable Cards - Use .card-selectable utility class (defined in Base Utilities) */

/* ============================================
   Info Items (Detail displays)
   ============================================ */
.info-item {
  padding: 1rem;
  border-radius: var(--on-radius-md);
  background: var(--bs-gray-50);
  border: 1px solid var(--bs-border-color);
  height: 100%;
}

.info-item .label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--bs-secondary);
  margin-bottom: 0.25rem;
}

.info-item .value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--bs-heading-color);
}

/* ============================================
   Quick Guide Items
   ============================================ */
.quick-guide-item {
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  background: var(--bs-gray-50);
  border-radius: var(--on-radius-sm);
  border-left: 3px solid transparent;
  transition: var(--on-transition-base);
}

.quick-guide-item:hover {
  background: white;
  border-left-color: var(--bs-primary);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

/* ============================================
   Readonly Fields
   ============================================ */
.readonly-field {
  background-color: var(--bs-gray-100) !important;
  cursor: not-allowed;
}

/* ============================================
   Conversion/Code Display
   ============================================ */
.conversion-factor,
.code-display {
  font-family: var(--on-font-mono);
  font-size: 0.875rem;
}

.conversion-preview {
  background: var(--bs-gray-50);
  padding: 1rem;
  border-radius: var(--on-radius-sm);
  border: 1px dashed var(--bs-border-color);
}

/* ============================================
   Derived/Related Cards
   ============================================ */
.related-card {
  transition: var(--on-transition-base);
  border-left: 3px solid var(--bs-primary);
}

.related-card:hover {
  transform: translateX(4px);
  box-shadow: var(--on-shadow-md);
}

/* ============================================
   Product/Item Chips
   ============================================ */
.item-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  background: var(--bs-primary-bg-subtle);
  color: var(--bs-primary);
  border-radius: 2rem;
  margin: 0.25rem;
  font-size: 0.8125rem;
  transition: var(--on-transition-base);
  text-decoration: none;
}

.item-chip:hover {
  background: var(--bs-primary);
  color: white;
}

/* ============================================
   Table Row Hover Effects
   ============================================ */
.table-hover-primary tbody tr:hover {
  background-color: var(--on-primary-alpha-4);
}

/* ============================================
   Status Indicator (Row left border)
   ============================================ */
.status-indicator {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 3px 0 0 3px;
}

.status-indicator.active { background: var(--bs-success); }
.status-indicator.inactive { background: var(--bs-secondary); }
.status-indicator.pending { background: var(--bs-warning); }
.status-indicator.danger { background: var(--bs-danger); }

/* ============================================
   List Items (Related items display)
   ============================================ */
.list-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  border-radius: var(--on-radius-md);
  background: var(--bs-gray-50);
  border: 1px solid var(--bs-border-color);
  transition: var(--on-transition-base);
  margin-bottom: 0.5rem;
}

.list-item:hover {
  background: var(--bs-primary-bg-subtle);
  border-color: var(--bs-primary);
  transform: translateX(4px);
}

.list-item:last-child {
  margin-bottom: 0;
}

/* ============================================
   Empty State (centered display)
   ============================================ */
.empty-state-centered {
  text-align: center;
  padding: 3rem 2rem;
}

.empty-state-centered .icon {
  width: 80px;
  height: 80px;
  border-radius: var(--on-radius-circle);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 2rem;
}

/* ============================================
   Status Toggle Cards
   ============================================ */
.status-toggle {
  cursor: pointer;
  transition: var(--on-transition-base);
}

.status-toggle:hover {
  transform: scale(1.02);
}

/* ============================================
   Responsive Overrides
   ============================================ */
@media (max-width: 768px) {
  .stat-card,
  .stat-card-clickable {
    margin-bottom: 0.5rem;
  }

  .stat-card .card-body,
  .stat-card-clickable .card-body {
    padding: 0.75rem;
  }

  .quick-action-btn {
    opacity: 1;
  }

  .expanded-items-grid {
    grid-template-columns: 1fr;
  }

  .details-content {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hide-on-mobile {
    display: none !important;
  }

  .layout-menu {
    transform: translateX(-100%);
  }

  .mobile-full-width {
    width: 100%;
    display: block;
  }

  .mobile-stack-actions {
    flex-direction: column;
  }

  .mobile-stack-actions > * {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .btn {
    min-height: 44px;
  }

  .card-body {
    padding: 1rem;
  }
}

.show-on-mobile {
  display: none;
}

@media (max-width: 768px) {
  .show-on-mobile {
    display: block;
  }
}

/* ============================================
   Grid/Tile View
   ============================================ */
.grid-view {
  display: none;
  padding: 1rem;
}

.grid-view.show {
  display: block;
}

/* Entity Tile Card */
.entity-tile {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--on-radius-md);
  transition: var(--on-transition-base);
  background: var(--bs-white);
  position: relative;
}

.entity-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px var(--on-black-alpha-10);
  border-color: var(--bs-primary);
}

.entity-tile-header {
  padding: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.entity-tile-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--on-radius-md);
  font-size: 1.25rem;
}

.entity-tile-icon.primary { background: var(--on-primary-alpha-12); color: var(--bs-primary); }
.entity-tile-icon.success { background: rgba(40, 199, 111, 0.12); color: var(--bs-success); }
.entity-tile-icon.warning { background: rgba(255, 159, 67, 0.12); color: var(--bs-warning); }
.entity-tile-icon.info { background: rgba(0, 207, 232, 0.12); color: var(--bs-info); }
.entity-tile-icon.secondary { background: var(--bs-gray-100); color: var(--bs-secondary); }
.entity-tile-icon.danger { background: rgba(234, 84, 85, 0.12); color: var(--bs-danger); }

.entity-tile-info {
  flex: 1;
  min-width: 0;
}

.entity-tile-title {
  font-weight: 600;
  color: var(--bs-heading-color);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.entity-tile-title a {
  color: inherit;
  text-decoration: none;
}

.entity-tile-title a:hover {
  color: var(--bs-primary);
}

.entity-tile-subtitle {
  font-size: 0.8125rem;
  color: var(--bs-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.entity-tile-body {
  padding: 0 1rem 1rem;
  flex: 1;
}

.entity-tile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.entity-tile-footer {
  padding: 0.75rem 1rem;
  background: var(--bs-gray-50);
  border-top: 1px solid var(--bs-border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.entity-tile-actions {
  display: flex;
  gap: 0.25rem;
}

/* Status indicator on tile */
.entity-tile-status {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
}

/* Tile with relative position for status indicator */
.entity-tile.has-status {
  position: relative;
}

/* Responsive grid columns */
.grid-view .row {
  --bs-gutter-x: 1rem;
  --bs-gutter-y: 1rem;
}

/* ============================================
   Product Unit Management Page
   ============================================ */

/* Alternate Unit Card */
.alternate-unit-card {
  transition: var(--on-transition-slow);
  border: 1px solid var(--bs-border-color);
}

.alternate-unit-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.5rem 1.5rem var(--on-primary-alpha-15);
  border-color: var(--bs-primary);
}

/* Add Unit Card (clickable) */
.add-unit-card {
  border: 2px dashed var(--bs-primary);
  background: var(--on-primary-alpha-5);
  cursor: pointer;
  transition: var(--on-transition-slow);
  min-height: 280px;
}

.add-unit-card:hover {
  background: var(--on-primary-alpha-10);
  border-color: #5f51e8;
  transform: translateY(-3px);
  box-shadow: 0 0.5rem 1rem var(--on-primary-alpha-20);
}

/* Base Unit Badge */
.base-unit-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 50rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Unit Actions Container */
.unit-actions {
  display: flex;
  gap: 0.25rem;
}

.unit-actions .btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Usage Badge */
.usage-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  background: var(--on-primary-alpha-10);
  color: var(--bs-primary);
  border-radius: 50rem;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Permission Toggle */
.permission-toggle {
  padding: 0.75rem 1rem;
  background: var(--bs-gray-50);
  border-radius: var(--on-radius-md);
  margin-bottom: 0.5rem;
  transition: var(--on-transition-base);
}

.permission-toggle:hover {
  background: var(--bs-gray-100);
}

.permission-toggle:last-child {
  margin-bottom: 0;
}

/* Card Background Lighter */
.bg-lighter {
  background-color: var(--bs-gray-50) !important;
}

/* ============================================
   Animation Delay Utilities
   ============================================ */
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }
.animate-delay-5 { animation-delay: 0.5s; }

/* ============================================
   Avatar Size Utilities
   ============================================ */
.avatar-profile {
  width: 120px;
  height: 120px;
  font-size: 3rem;
  font-weight: 600;
}

.avatar-xl-80 {
  width: 80px;
  height: 80px;
}

.avatar-lg-60 {
  width: 60px;
  height: 60px;
}

/* ============================================
   Product/Image Thumbnail Utilities
   ============================================ */
.product-thumb-sm {
  width: 45px;
  height: 45px;
  object-fit: cover;
}

.product-thumb-md {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: var(--on-radius-md);
}

.product-thumb-40 {
  width: 40px;
  height: 40px;
  object-fit: cover;
}

/* ============================================
   Scrollable Container Utilities
   ============================================ */
.scrollable-sm {
  max-height: 200px;
  overflow-y: auto;
}

.scrollable-md {
  max-height: 300px;
  overflow-y: auto;
}

.scrollable-lg {
  max-height: 400px;
  overflow-y: auto;
}

.scrollable-xl {
  max-height: 450px;
  overflow-y: auto;
}

.scrollable-xxl {
  max-height: 500px;
  overflow-y: auto;
}

/* ============================================
   Empty State Icon Utilities
   ============================================ */
.empty-state-icon-lg {
  font-size: 4rem;
  opacity: 0.3;
}

.empty-state-icon-md {
  font-size: 2rem;
  opacity: 0.3;
}

/* ============================================
   Text Utilities
   ============================================ */
.text-prewrap {
  white-space: pre-wrap;
}

.text-prewrap-break {
  white-space: pre-wrap;
  word-break: break-word;
}

.text-purple {
  color: var(--bs-purple);
}

/* ============================================
   Code/Pre Block Utilities
   ============================================ */
.code-block {
  font-size: 0.8125rem;
  max-height: 400px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.code-block-sm {
  font-size: 0.8125rem;
  max-height: 300px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.code-block-xs {
  font-size: 0.8rem;
  max-height: 200px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ============================================
   Monospace Badge Utility
   ============================================ */
.badge-mono {
  max-width: 150px;
  font-family: monospace;
  font-size: 0.7rem;
}

/* ============================================
   Alert/Highlight Utilities
   ============================================ */
.alert-purple {
  background-color: rgba(105, 108, 255, 0.1);
  border-left: 4px solid var(--bs-purple) !important;
}

/* ============================================
   Progress Bar Width (Dynamic - keep inline)
   Note: Progress bar widths like style="width: @percent%"
   must remain inline as they are dynamically calculated
   ============================================ */

/* ============================================
   Gradient Header Utilities
   ============================================ */
.gradient-teal {
  background: linear-gradient(135deg, #17a2b8 0%, #20c997 100%);
}

/* ============================================
   Hidden Utility
   ============================================ */
.d-hidden {
  display: none !important;
}

/* ============================================
   Icon Size Utilities
   ============================================ */
.icon-xs { font-size: 0.5rem; }
.icon-sm { font-size: 0.7rem; }
.icon-md { font-size: 0.75rem; }
.icon-lg { font-size: 1.5rem; }
.icon-xl { font-size: 2rem; }
.icon-xxl { font-size: 2.5rem; }
.icon-xxxl { font-size: 3rem; }

/* ============================================
   Teal/Info Color Utilities
   ============================================ */
.text-teal { color: #17a2b8; }
.bg-teal { background-color: #17a2b8; }
.bg-teal-light { background: rgba(23, 162, 184, 0.1); }
.border-teal { border-color: #17a2b8 !important; }
.bg-purple { background-color: var(--bs-purple); }

/* ============================================
   Text Truncate Width Utilities
   ============================================ */
.truncate-100 { max-width: 100px; }
.truncate-120 { max-width: 120px; }
.truncate-140 { max-width: 140px; }
.truncate-150 { max-width: 150px; }
.truncate-180 { max-width: 180px; }
.truncate-200 { max-width: 200px; }

/* ============================================
   Badge Size Utilities
   ============================================ */
.badge-xs { font-size: 0.7rem; }

/* ============================================
   Max Height Utilities (signature/image)
   ============================================ */
.max-h-100 { max-height: 100px; }
.max-h-250 { max-height: 250px; }
.max-h-300 { max-width: 300px; }

/* ============================================
   Alpine.js Utilities
   ============================================ */
[x-cloak] { display: none !important; }

/* ============================================
   Delivery Person Selector
   ============================================ */
.delivery-person-card {
    cursor: pointer;
    transition: var(--on-transition-base);
    border: 2px solid transparent;
}

.delivery-person-card:hover {
    border-color: var(--bs-primary);
}

.delivery-person-card.selected {
    border-color: var(--bs-primary);
    background-color: rgba(var(--bs-primary-rgb), 0.05);
}

/* ============================================
   Batch Actions Bar (Sticky at bottom)
   ============================================ */
.batch-actions {
    position: sticky;
    bottom: 0;
    background: white;
    border-top: 1px solid var(--bs-border-color);
    padding: 1rem;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
    display: none;
    z-index: 100;
}

.batch-actions.show {
    display: block;
}

/* ============================================
   Delivery Row Styles
   ============================================ */
.delivery-row:hover {
    background-color: var(--on-primary-alpha-8);
}

.delivery-row.selected {
    background-color: var(--on-primary-alpha-15);
}

/* ============================================
   Overdue Indicator Animation
   ============================================ */
.overdue-indicator {
    animation: pulse-danger 2s infinite;
}

@keyframes pulse-danger {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ============================================
   GIN Row Styles (Dispatch)
   ============================================ */
.gin-row {
    transition: var(--on-transition-fast);
}

.gin-row:hover {
    background-color: var(--on-primary-alpha-4);
}

/* ============================================
   Delivery Method Icon
   ============================================ */
.delivery-method-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--on-radius-sm);
    font-size: 1rem;
}

/* ============================================
   Warehouse Pickup Indicator
   ============================================ */
.pickup-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--on-radius-xs);
    font-size: 0.7rem;
    font-weight: 500;
}

.pickup-indicator.picked-up {
    background: var(--on-success-alpha-10);
    color: var(--bs-success);
}

.pickup-indicator.not-picked-up {
    background: rgba(255, 193, 7, 0.1);
    color: var(--bs-warning);
}

/* ============================================
   Mobile GIN Cards (Dispatch)
   ============================================ */
.mobile-gin-cards {
    display: none;
}

.mobile-gin-card {
    border-radius: var(--on-radius-lg);
    margin-bottom: 1rem;
    border-left: 4px solid var(--bs-primary);
}

.mobile-gin-card.status-draft { border-left-color: var(--bs-secondary); }
.mobile-gin-card.status-confirmed { border-left-color: var(--bs-info); }
.mobile-gin-card.status-dispatched { border-left-color: var(--bs-primary); }
.mobile-gin-card.status-delivered { border-left-color: var(--bs-success); }
.mobile-gin-card.status-failed { border-left-color: var(--bs-danger); }

@media (max-width: 768px) {
    .table-responsive { display: none; }
    .mobile-gin-cards { display: block !important; }
}

/* ============================================
   Delivery Card Styles
   ============================================ */
.delivery-card {
    transition: var(--on-transition-base);
    border-left: 3px solid transparent;
    border-radius: var(--on-radius-lg);
}

.delivery-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--on-shadow-md);
}

.delivery-card.arrived { border-left-color: var(--bs-success); }
.delivery-card.expected { border-left-color: var(--bs-warning); }

/* ============================================
   Quick Receive Styles
   ============================================ */
.quick-receive-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--bs-border-color);
}

.quick-receive-item:last-child { border-bottom: none; }

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-buttons .btn { flex: 1; }

@media (max-width: 768px) {
    .col-md-6.col-lg-4 {
        padding-left: 0;
        padding-right: 0;
    }
    .delivery-card {
        margin-bottom: 1rem;
    }
    .action-buttons {
        flex-direction: column;
    }
    .action-buttons .btn {
        width: 100%;
        min-height: 48px;
        font-size: 1rem;
    }
    .quick-receive-btn {
        background: linear-gradient(135deg, var(--bs-success) 0%, #1e9f5e 100%);
    }
}

/* ============================================
   Stat Card Clickable (Dashboard)
   ============================================ */
.stat-card-clickable {
    cursor: pointer;
    transition: var(--on-transition-base);
}

.stat-card-clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.12);
}

.stat-card-clickable.active {
    border: 2px solid var(--bs-primary);
    background: var(--on-primary-alpha-8);
}

/* ============================================
   Dispatch Row Styles
   ============================================ */
.dispatch-row:hover {
    background-color: var(--on-primary-alpha-8);
}

.dispatch-row.selected {
    background-color: var(--on-primary-alpha-15);
}

/* ============================================
   Tab Badge (Dispatch Dashboard)
   ============================================ */
.tab-badge {
    font-size: 0.7rem;
    vertical-align: middle;
    margin-left: 4px;
}

/* ============================================
   Delivery Option Card (GIN Action)
   ============================================ */
.delivery-option-card {
    cursor: pointer;
    transition: var(--on-transition-base);
    border: 2px solid transparent;
}

.delivery-option-card:hover {
    border-color: var(--bs-primary);
}

.delivery-option-card.selected {
    border-color: var(--bs-primary);
    background-color: rgba(var(--bs-primary-rgb), 0.05);
}

/* ============================================
   Quantity Control (GIN Action)
   ============================================ */
.qty-control {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.qty-control .btn {
    padding: 0.25rem 0.5rem;
}

.qty-control input {
    width: 60px;
    text-align: center;
}

/* ============================================
   Item Row States (GIN Action)
   ============================================ */
.item-row.fully-dispatched {
    opacity: 0.5;
}

/* ============================================
   Workload Indicator
   ============================================ */
.workload-indicator {
    font-size: 0.75rem;
}

/* ============================================
   Section Header (Collapsible)
   ============================================ */
.section-header {
    cursor: pointer;
    user-select: none;
}

.section-header:hover {
    background-color: rgba(0,0,0,0.02);
}

/* ============================================
   Item Chips (GIN Action)
   ============================================ */
.item-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.item-chip {
    background: var(--bs-light);
    padding: 0.375rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
}

.item-chip.active {
    background: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
}

/* ============================================
   Mode Toggle (GIN Action)
   ============================================ */
.mode-toggle {
    transition: var(--on-transition-base);
}

/* ============================================
   Quick Summary Card (GIN Action)
   ============================================ */
.quick-summary-card {
    border: 2px solid var(--bs-success);
    border-radius: var(--on-radius-lg);
}

/* ============================================
   Checklist Item (GIN Action)
   ============================================ */
.checklist-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--bs-border-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.checklist-item:last-child {
    border-bottom: none;
}

.checklist-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--on-radius-circle);
}

/* ============================================
   Rotate Utility (Chevron icons)
   ============================================ */
.rotate-180 {
    transform: rotate(180deg);
    transition: transform 0.2s;
}

/* ============================================
   Progress Step (GIN Details)
   ============================================ */
.progress-step {
    position: relative;
    text-align: center;
    flex: 1;
}

.progress-step::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    width: 100%;
    height: 3px;
    background: var(--on-border-light);
    z-index: 0;
}

.progress-step:last-child::after {
    display: none;
}

.progress-step.completed::after {
    background: var(--bs-success);
}

.progress-step.active::after {
    background: linear-gradient(90deg, var(--bs-success) 50%, var(--on-border-light) 50%);
}

.step-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--on-radius-circle);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--on-border-light);
    color: var(--bs-secondary);
    position: relative;
    z-index: 1;
    transition: all 0.3s;
}

.progress-step.completed .step-icon {
    background: var(--bs-success);
    color: white;
}

.progress-step.active .step-icon {
    background: var(--bs-primary);
    color: white;
    box-shadow: 0 0 0 4px var(--on-primary-alpha-30);
}

/* ============================================
   Next Step Banner (GIN Details)
   ============================================ */
.next-step-banner {
    border-left: 4px solid;
    border-radius: var(--on-radius-sm);
}

/* ============================================
   Detail Card (GIN Details)
   ============================================ */
.detail-card {
    transition: var(--on-transition-base);
}

.detail-card:hover {
    box-shadow: var(--on-shadow-md);
}

/* ============================================
   GRN Row Styles (Receiving)
   ============================================ */
.grn-row {
    transition: var(--on-transition-fast);
}

.grn-row:hover {
    background-color: var(--on-primary-alpha-4);
}

/* ============================================
   Discrepancy Indicator
   ============================================ */
.discrepancy-indicator {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    border-radius: 3px 0 0 3px;
}

.discrepancy-indicator.has-issue {
    background: var(--bs-danger);
}

.discrepancy-indicator.no-issue {
    background: var(--bs-success);
}

/* ============================================
   Table Responsive Overflow Fix
   ============================================ */
.card > .table-responsive {
    overflow: visible !important;
}

.table-responsive .dropdown-menu {
    position: absolute;
    z-index: 1050;
}

/* ============================================
   Mobile GRN Cards (Receiving)
   ============================================ */
.mobile-grn-cards {
    display: none;
}

.mobile-grn-card {
    border-radius: var(--on-radius-lg);
    margin-bottom: 1rem;
    border-left: 4px solid var(--bs-primary);
    position: relative;
}

.mobile-grn-card.has-discrepancy {
    border-left-color: var(--bs-danger);
}

.mobile-grn-card.status-draft {
    border-left-color: var(--bs-secondary);
}

.mobile-grn-card.status-submitted {
    border-left-color: var(--bs-info);
}

.mobile-grn-card.status-approved {
    border-left-color: var(--bs-success);
}

/* ============================================
   Condition Pills (Receiving)
   ============================================ */
.condition-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.condition-pill {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 2px solid var(--bs-border-color);
    cursor: pointer;
    transition: var(--on-transition-base);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bs-white);
}

.condition-pill:hover {
    border-color: var(--bs-primary);
}

.condition-pill.selected {
    border-color: var(--bs-success);
    background: rgba(var(--bs-success-rgb), 0.1);
}

.condition-pill input {
    display: none;
}

/* ============================================
   Quality Stars (Receiving)
   ============================================ */
.quality-stars {
    display: flex;
    gap: 0.25rem;
    font-size: 1.5rem;
}

.quality-stars .star {
    cursor: pointer;
    color: var(--bs-gray-300);
    transition: var(--on-transition-fast);
}

.quality-stars .star:hover,
.quality-stars .star.active {
    color: var(--bs-warning);
}

/* ============================================
   Items Table (Receiving)
   ============================================ */
.items-table th {
    font-weight: 500;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.items-table td {
    vertical-align: middle;
}

.qty-input {
    width: 80px;
    text-align: center;
}

/* ============================================
   Item Row States (Receiving)
   ============================================ */
.item-row.has-issue {
    background-color: rgba(var(--bs-warning-rgb), 0.1);
}

.item-row.has-damage {
    background-color: rgba(var(--bs-danger-rgb), 0.1);
}

.item-row.complete {
    background-color: rgba(var(--bs-success-rgb), 0.05);
}

/* ============================================
   Signature Area (Receiving)
   ============================================ */
.signature-area {
    border: 2px dashed var(--bs-border-color);
    border-radius: var(--on-radius-md);
    background: var(--bs-gray-100);
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
}

.signature-area:hover {
    border-color: var(--bs-primary);
}

.signature-area.has-signature {
    border-style: solid;
    border-color: var(--bs-success);
}

.signature-area canvas {
    width: 100%;
    height: 100px;
    cursor: crosshair;
}

/* ============================================
   Sticky Sidebar
   ============================================ */
.sticky-sidebar {
    position: sticky;
    top: 1rem;
}

@media (max-width: 991.98px) {
    .sticky-sidebar {
        position: static;
    }
}

/* ============================================
   Status Dot (Receiving - small circular indicator)
   ============================================ */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--on-radius-circle);
    display: inline-block;
}

.status-dot.ok {
    background: var(--bs-success);
}

.status-dot.warning {
    background: var(--bs-warning);
}

.status-dot.danger {
    background: var(--bs-danger);
}

/* ============================================
   Stat Card (Receiving Summary)
   ============================================ */
.stat-card {
    border-radius: var(--on-radius-md);
    padding: 1rem;
    text-align: center;
}

.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--bs-gray-600);
}

@media (max-width: 767.98px) {
    .qty-input {
        width: 60px;
    }
    .stat-card .stat-value {
        font-size: 1.25rem;
    }
}

/* ============================================
   Mobile Form Styles (Receiving)
   ============================================ */
@media (max-width: 768px) {
    .mobile-grn-cards {
        display: block !important;
    }
}

/* ============================================
   Report Row (Discrepancy)
   ============================================ */
.report-row {
    transition: var(--on-transition-fast);
}

.report-row:hover {
    background-color: var(--on-primary-alpha-4);
}

/* ============================================
   Discrepancy Status Dot (sidebar)
   ============================================ */
.status-dot.reported {
    background: var(--bs-warning);
}

.status-dot.under-review {
    background: var(--bs-info);
}

.status-dot.accepted {
    background: var(--bs-primary);
}

.status-dot.disputed {
    background: var(--bs-danger);
}

.status-dot.resolved {
    background: var(--bs-success);
}

.status-dot.closed {
    background: var(--bs-secondary);
}

/* ============================================
   Nav Tabs Badge (Discrepancy)
   ============================================ */
.nav-tabs .nav-link .badge {
    font-size: 0.7rem;
}

/* ============================================
   Timeline Item (Discrepancy Details)
   ============================================ */
.timeline-item-transparent {
    position: relative;
}

.timeline-item-transparent::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 1.5rem;
    bottom: 0;
    width: 2px;
    background: var(--bs-border-color);
}

.timeline-item-transparent:last-child::before {
    display: none;
}

.timeline-point {
    width: 12px;
    height: 12px;
    border-radius: var(--on-radius-circle);
    position: absolute;
    left: 0;
    top: 0.25rem;
}

.timeline-point-primary {
    background: var(--bs-primary);
}

.timeline-point-warning {
    background: var(--bs-warning);
}

.timeline-point-success {
    background: var(--bs-success);
}

.timeline-point-info {
    background: var(--bs-info);
}

.timeline-event {
    padding-left: 1.75rem;
    padding-bottom: 1.25rem;
}

/* ============================================
   Expand Row (Discrepancy Details)
   ============================================ */
.expand-row {
    background: var(--on-bg-light);
}

.line-row:hover {
    background-color: var(--on-primary-alpha-4);
}

/* ============================================
   Response Option (Discrepancy Response)
   ============================================ */
.response-option {
    transition: var(--on-transition-base);
    cursor: pointer;
}

.response-option:hover {
    border-color: var(--bs-primary) !important;
}

.response-option.selected {
    border-color: var(--bs-primary) !important;
    background-color: var(--on-primary-alpha-8);
}

/* ============================================
   Counter Offer Section (Discrepancy)
   ============================================ */
.counter-offer-section {
    display: none;
}

.counter-offer-section.show {
    display: block;
}

/* ============================================
   Decision Option (Discrepancy - Respond to Offer)
   ============================================ */
.decision-option {
    transition: var(--on-transition-base);
    cursor: pointer;
}

.decision-option:hover {
    border-color: var(--bs-primary) !important;
}

.decision-option.selected {
    border-color: var(--bs-primary) !important;
    background-color: var(--on-primary-alpha-8);
}

/* ============================================
   Counter Section (Discrepancy - Respond to Offer)
   ============================================ */
.counter-section {
    display: none;
}

.counter-section.show {
    display: block;
}

/* ============================================
   History Item (Discrepancy Line Timeline)
   ============================================ */
.history-item {
    position: relative;
    padding-left: 2.5rem;
    padding-bottom: 1.5rem;
}

.history-item::before {
    content: '';
    position: absolute;
    left: 0.75rem;
    top: 0.5rem;
    width: 10px;
    height: 10px;
    border-radius: var(--on-radius-circle);
    background: var(--bs-primary);
}

.history-item::after {
    content: '';
    position: absolute;
    left: 0.95rem;
    top: 1.5rem;
    bottom: 0;
    width: 2px;
    background: var(--bs-border-color);
}

.history-item:last-child::after {
    display: none;
}

.history-item.supplier::before {
    background: var(--bs-info);
}

.history-item.recipient::before {
    background: var(--bs-warning);
}

/* ============================================
   Clickable Input Group Addon (password toggle)
   ============================================ */
.input-group-merge .input-group-text.cursor-pointer,
.input-group-merge .input-group-text.cursor-pointer i {
    position: relative;
    z-index: 4;
}

/* ============================================
   Company Card (Company Management)
   ============================================ */
.company-card {
    transition: var(--on-transition-base);
    border-left: 3px solid transparent;
}

.company-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--on-shadow-md);
}

.company-card.status-active {
    border-left-color: var(--bs-success);
}

.company-card.status-suspended {
    border-left-color: var(--bs-warning);
}

.company-card.status-deactivated {
    border-left-color: var(--bs-danger);
}

.company-card.status-unverified {
    border-left-color: var(--bs-secondary);
}

.company-row {
    transition: var(--on-transition-fast);
}

.company-row:hover {
    background-color: var(--on-primary-alpha-4);
}

/* ============================================
   Trip Item Card (Trip Details)
   ============================================ */
.trip-item-card {
    border-left: 4px solid transparent;
    transition: var(--on-transition-base);
}

.trip-item-card.pending {
    border-left-color: var(--bs-secondary);
}

.trip-item-card.in-progress {
    border-left-color: var(--bs-warning);
}

.trip-item-card.delivered {
    border-left-color: var(--bs-success);
}

.trip-item-card.failed {
    border-left-color: var(--bs-danger);
}

.trip-item-card.skipped {
    border-left-color: #17a2b8;
}

.trip-item-card.returned {
    border-left-color: #6f42c1;
}

/* ============================================
   Timeline Item (Trip Details)
   ============================================ */
.timeline-item {
    position: relative;
    padding-left: 30px;
    padding-bottom: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--on-border-light);
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-dot {
    position: absolute;
    left: 0;
    top: 4px;
    width: 18px;
    height: 18px;
    border-radius: var(--on-radius-circle);
    background: #6c757d;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px #e9ecef;
}

.timeline-dot.delivered {
    background: var(--bs-success);
}

.timeline-dot.failed {
    background: var(--bs-danger);
}

.timeline-dot.location {
    background: #007bff;
}

@media (max-width: 768px) {
    .trip-item-card {
        margin-bottom: 0.75rem;
    }
}

/* ============================================
   Delivery Item (Batch Deliver)
   ============================================ */
.delivery-item {
    border: 1px solid var(--bs-border-color);
    border-radius: var(--on-radius-sm);
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    background: var(--bs-white);
    transition: var(--on-transition-base);
}

.delivery-item:last-child {
    margin-bottom: 0;
}

.delivery-item:hover {
    border-color: var(--bs-primary);
}

.delivery-item.completed {
    border-color: var(--bs-success);
    background-color: rgba(40, 199, 111, 0.03);
}

.delivery-item.has-error {
    border-color: var(--bs-danger);
    background-color: rgba(234, 84, 85, 0.03);
}

/* ============================================
   Photo Thumbs (Batch Deliver)
   ============================================ */
.photo-thumbs {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.photo-thumb {
    width: 48px;
    height: 48px;
    border-radius: 0.25rem;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--bs-border-color);
}

.photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-thumb .remove-btn {
    position: absolute;
    top: 1px;
    right: 1px;
    width: 16px;
    height: 16px;
    border-radius: var(--on-radius-circle);
    background: var(--bs-danger);
    color: white;
    border: none;
    font-size: 9px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.add-photo-btn {
    width: 48px;
    height: 48px;
    border: 2px dashed var(--bs-border-color);
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: var(--bs-gray-100);
}

.add-photo-btn:hover {
    border-color: var(--bs-primary);
}

/* ============================================
   Signature Preview (Batch Deliver)
   ============================================ */
.sig-preview {
    max-width: 100px;
    max-height: 40px;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.25rem;
}

/* ============================================
   Item Number Badge
   ============================================ */
.item-number {
    width: 24px;
    height: 24px;
    background: var(--bs-success);
    color: white;
    border-radius: var(--on-radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
}

/* ============================================
   Card Body Compact
   ============================================ */
.card-body-compact {
    padding: 0.75rem;
}

/* ============================================
   Failure Item (Batch Fail)
   ============================================ */
.failure-item {
    border: 1px solid var(--bs-border-color);
    border-radius: var(--on-radius-sm);
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    background: var(--bs-white);
    transition: var(--on-transition-base);
    border-left: 3px solid var(--bs-warning);
}

.failure-item:last-child {
    margin-bottom: 0;
}

.failure-item:hover {
    border-color: var(--bs-warning);
}

.failure-item.completed {
    border-left-color: var(--bs-success);
    background-color: rgba(40, 199, 111, 0.03);
}

.failure-item.has-error {
    border-left-color: var(--bs-danger);
    background-color: rgba(234, 84, 85, 0.03);
}

.failure-item.final-attempt {
    border-left-color: var(--bs-danger);
}

.item-number.final {
    background: var(--bs-danger);
}

.final-attempt-badge {
    animation: pulse 2s infinite;
}

/* ============================================
   Reason Chip (Batch Fail/Return)
   ============================================ */
.reason-chip {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.75rem;
    font-size: 0.75rem;
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-gray-300);
    cursor: pointer;
    transition: var(--on-transition-base);
    margin: 0.125rem;
}

.reason-chip:hover {
    background: var(--bs-warning);
    color: white;
    border-color: var(--bs-warning);
}

.reason-chip.selected {
    background: var(--bs-warning);
    color: white;
    border-color: var(--bs-warning);
}

/* ============================================
   Return Item (Batch Return)
   ============================================ */
.return-item {
    border: 1px solid var(--bs-border-color);
    border-radius: var(--on-radius-sm);
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    background: var(--bs-white);
    transition: var(--on-transition-base);
    border-left: 3px solid var(--bs-danger);
}

.return-item:last-child {
    margin-bottom: 0;
}

.return-item:hover {
    border-color: var(--bs-danger);
}

.return-item.completed {
    border-left-color: var(--bs-success);
    background-color: rgba(40, 199, 111, 0.03);
}

.return-item.has-error {
    border-left-color: var(--bs-danger);
    background-color: rgba(234, 84, 85, 0.03);
}

/* ============================================
   Trip Card (Trip Index)
   ============================================ */
.trip-card {
    transition: var(--on-transition-base);
    border-left: 4px solid transparent;
    border-radius: var(--on-radius-lg);
}

.trip-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--on-shadow-md);
}

.trip-card.draft {
    border-left-color: var(--bs-secondary);
}

.trip-card.active {
    border-left-color: var(--bs-success);
}

.trip-card.completed {
    border-left-color: #007bff;
}

.trip-card.cancelled {
    border-left-color: var(--bs-danger);
}

/* ============================================
   Stats Card
   ============================================ */
.stats-card {
    transition: var(--on-transition-base);
}

.stats-card:hover {
    transform: translateY(-2px);
}

/* ============================================
   Progress Ring (Trip)
   ============================================ */
.progress-ring {
    width: 60px;
    height: 60px;
}

.trip-progress {
    height: 6px;
    border-radius: 3px;
}

@media (max-width: 768px) {
    .trip-card {
        margin-bottom: 1rem;
    }
    .btn-trip-action {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* ============================================
   Dashboard Stat Card (Home)
   ============================================ */
.stat-card.border-primary {
    border-left-color: var(--bs-primary);
}

.stat-card.border-success {
    border-left-color: var(--bs-success);
}

.stat-card.border-warning {
    border-left-color: var(--bs-warning);
}

.stat-card.border-info {
    border-left-color: var(--bs-info);
}

.stat-card.border-danger {
    border-left-color: var(--bs-danger);
}

.stat-card.border-secondary {
    border-left-color: var(--bs-secondary);
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-secondary {
    font-size: 0.75rem;
    color: var(--on-text-muted);
}

/* ============================================
   Notification Item (Dashboard)
   ============================================ */
.notification-item {
    border-left: 3px solid transparent;
    transition: var(--on-transition-fast);
}

.notification-item.unread {
    border-left-color: var(--bs-primary);
    background: var(--on-primary-alpha-4);
}

.notification-item:hover {
    background: rgba(0,0,0,0.02);
}

/* ============================================
   Activity Timeline (Dashboard)
   ============================================ */
.activity-timeline {
    position: relative;
    padding-left: 1.5rem;
}

.activity-timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--on-border-light);
}

.activity-item {
    position: relative;
    padding-bottom: 1rem;
}

.activity-item::before {
    content: '';
    position: absolute;
    left: -1.25rem;
    top: 0.25rem;
    width: 10px;
    height: 10px;
    border-radius: var(--on-radius-circle);
    background: var(--bs-primary);
    border: 2px solid #fff;
}

/* ============================================
   Progress Step (Order Details - extended)
   ============================================ */
.progress-step.failed .step-icon {
    background: #ea5455;
    color: white;
}

/* ============================================
   Quantity Bar (Order Details)
   ============================================ */
.quantity-bar {
    height: 6px;
    border-radius: 3px;
    background: var(--on-border-light);
    overflow: hidden;
}

.quantity-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s;
}

/* ============================================
   Notification Icon (Notification Index)
   ============================================ */
.notification-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--on-radius-circle);
}

.notification-time {
    font-size: 0.75rem;
    color: #a8aaae;
}

/* ============================================
   Filter Chip Active State
   ============================================ */
.filter-chip.active {
    background-color: var(--bs-primary) !important;
    color: white !important;
}

/* ============================================
   Location Timeline (Delivery Tracking)
   ============================================ */
.location-timeline {
    position: relative;
    padding-left: 30px;
    max-height: 300px;
    overflow-y: auto;
}

.location-timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #dee2e6;
}

.location-item {
    position: relative;
    padding-bottom: 1rem;
}

.location-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: var(--on-radius-circle);
    background: #6c757d;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #dee2e6;
}

.location-item.current::before {
    background: #198754;
    animation: pulse-location 2s infinite;
}

@keyframes pulse-location {
    0% { box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(25, 135, 84, 0); }
    100% { box-shadow: 0 0 0 0 rgba(25, 135, 84, 0); }
}

/* ============================================
   Tracking Card & Map Styles
   ============================================ */
.tracking-card {
    border-radius: var(--on-radius-lg);
    box-shadow: var(--on-shadow-sm);
}

#trackingMap {
    height: 400px;
    border-radius: var(--on-radius-lg);
    background: var(--on-border-light);
}

.current-marker {
    background: var(--bs-success);
    width: 20px;
    height: 20px;
    border-radius: var(--on-radius-circle);
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.destination-marker {
    background: var(--bs-danger);
    width: 16px;
    height: 16px;
    border-radius: var(--on-radius-circle);
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* ============================================
   Live Indicator (Real-time Tracking)
   ============================================ */
.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.live-dot {
    width: 10px;
    height: 10px;
    background: var(--bs-danger);
    border-radius: var(--on-radius-circle);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

/* ============================================
   ETA Card (Delivery Tracking)
   ============================================ */
.eta-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--on-radius-lg);
    color: white;
}

.eta-display {
    font-size: 2.5rem;
    font-weight: 700;
}

/* ============================================
   User Row & Avatar (User Management)
   ============================================ */
.user-row {
    transition: var(--on-transition-fast);
}

.user-row:hover {
    background-color: var(--on-primary-alpha-4);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--on-radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    color: white;
}

/* ============================================
   Info Card (Details Pages)
   ============================================ */
.info-card {
    border-left: 3px solid var(--bs-primary);
}

.info-card.border-success { border-left-color: var(--bs-success); }
.info-card.border-warning { border-left-color: var(--bs-warning); }
.info-card.border-danger { border-left-color: var(--bs-danger); }
.info-card.border-info { border-left-color: var(--bs-info); }

/* ============================================
   Stat Item (Simple Stat Display)
   ============================================ */
.stat-item {
    padding: 1rem;
    border-radius: var(--on-radius-md);
    background: var(--bs-gray-100);
    text-align: center;
}

.stat-item .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-item .stat-label {
    font-size: 0.75rem;
    color: var(--bs-secondary);
    text-transform: uppercase;
}

/* ============================================
   Audit Row (Audit Log)
   ============================================ */
.audit-row:hover {
    background-color: var(--on-primary-alpha-4);
}

.action-badge {
    min-width: 70px;
    text-align: center;
}

.result-badge {
    min-width: 60px;
    text-align: center;
}

.entity-type-badge {
    font-family: monospace;
    font-size: 0.7rem;
}

/* ============================================
   Permission Group (Role Management)
   ============================================ */
.permission-group {
    margin-bottom: 1rem;
    border: 1px solid var(--on-border-light);
    border-radius: var(--on-radius-md);
    overflow: hidden;
}

.permission-group-header {
    background: #f8f7fa;
    padding: 0.75rem 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
}

.permission-group-header:hover {
    background: #eeebf5;
}

.permission-group-body {
    padding: 0.5rem;
}

.permission-item {
    padding: 0.5rem 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    transition: background 0.2s ease;
    border-radius: 0.25rem;
}

.permission-item:hover {
    background: #f8f7fa;
}

.permission-item label {
    flex: 1;
    margin: 0;
    cursor: pointer;
}

.permission-item .form-check-input {
    margin-top: 0.25rem;
}

.select-all-btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.permission-count {
    font-size: 0.75rem;
    color: var(--bs-secondary);
}

.permission-item.assigned {
    border-left: 3px solid var(--bs-success);
    background: rgba(40, 199, 111, 0.05);
}

.permission-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* ============================================
   Impersonation Banner (Global)
   ============================================ */
.impersonation-banner {
    background: linear-gradient(135deg, var(--bs-warning) 0%, #ffca2c 100%) !important;
    border: none !important;
    color: #000 !important;
    z-index: 1030;
}

/* ============================================
   Notification Bell Dropdown (Global)
   ============================================ */
.dropdown-notifications-item.marked-as-unread {
    background-color: var(--on-primary-alpha-8);
}

.dropdown-notifications-item.marked-as-unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--bs-primary);
}

/* ============================================
   Date Range Filter — flatpickr Preset Rail
   ============================================ */
.flatpickr-calendar.hasPresets {
    padding-left: 130px;
    width: auto;
}

.fp-presets {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 130px;
    padding: 0.75rem 0.5rem;
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    background: inherit;
    overflow-y: auto;
}

.fp-presets button {
    border: 0;
    background: transparent;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    text-align: left;
    font-size: 0.8125rem;
    color: var(--on-text-primary);
    cursor: pointer;
    white-space: nowrap;
}

.fp-presets button:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.fp-presets button.is-active {
    background-color: var(--bs-primary);
    color: #fff;
}

.fp-presets .fp-preset-clear {
    margin-top: auto;
    color: var(--bs-danger);
}
