/* KVR Tata Delivery Tracker & Workflow Management System - Styles (styles.css) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Brand Theme Colors */
  --primary-navy: #002c5f; /* Tata Motors Indigo */
  --primary-blue: #0b66c2;
  --secondary-slate: #475569;
  --bg-light: #f8fafc;
  --bg-card: #ffffff;
  --border-light: #e2e8f0;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --accent-cyan: #06b6d4;
  
  /* Required Status Colors */
  --status-approved-bg: #d4edda;
  --status-approved-border: #c3e6cb;
  --status-approved-text: #155724;
  --status-approved-color: #28a745;
  
  --status-pending-bg: #f8d7da;
  --status-pending-border: #f5c6cb;
  --status-pending-text: #721c24;
  --status-pending-color: #dc3545;
  
  --status-not-attended-bg: #fff3cd;
  --status-not-attended-border: #ffeeba;
  --status-not-attended-text: #856404;
  --status-not-attended-color: #ffc107;

  /* Card Borders */
  --card-border-green: #28a745;
  --card-border-red: #dc3545;
  --card-border-yellow: #ffc107;

  /* Fonts */
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Shadows & Radius */
  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.03);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.5;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 700;
  color: var(--primary-navy);
}

/* App Containers */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* 1. ROLE SELECTOR BAR (Sticky at Top) */
.role-simulator-bar {
  background: linear-gradient(135deg, var(--primary-navy) 0%, #1e3a8a 100%);
  color: white;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.role-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.role-logo {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 1px;
  color: var(--accent-cyan);
  text-transform: uppercase;
}

.role-badge {
  background: rgba(255, 255, 255, 0.15);
  border: 1px dashed rgba(255, 255, 255, 0.3);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
}

.role-selector-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.role-selector-label {
  font-size: 0.85rem;
  color: #cbd5e1;
}

.role-select {
  background-color: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-sm);
  color: white;
  padding: 6px 12px;
  font-family: var(--font-body);
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: var(--transition-fast);
}

.role-select:focus {
  background-color: var(--bg-card);
  color: var(--text-dark);
  border-color: var(--accent-cyan);
}

.role-select option {
  color: var(--text-dark);
  background-color: var(--bg-card);
}

/* 2. CORE LAYOUT HEADER & TABS */
.main-header {
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.brand-details h2 {
  font-size: 1.5rem;
  margin-bottom: 2px;
}

.brand-details p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.nav-tabs {
  display: flex;
  gap: 8px;
}

.tab-btn {
  background: none;
  border: none;
  padding: 8px 16px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab-btn:hover {
  background-color: var(--bg-light);
  color: var(--primary-navy);
}

.tab-btn.active {
  background-color: rgba(11, 102, 194, 0.1);
  color: var(--primary-blue);
}

/* 3. MAIN DASHBOARD CONTENT AREA */
.content-wrapper {
  flex: 1;
  padding: 24px;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn var(--transition-normal);
}

/* 4. KPI DASHBOARD BLOCKS */
.kpi-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.kpi-icon {
  background-color: rgba(11, 102, 194, 0.1);
  color: var(--primary-blue);
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.kpi-card.green-theme .kpi-icon {
  background-color: rgba(40, 167, 69, 0.1);
  color: var(--status-approved-color);
}

.kpi-card.red-theme .kpi-icon {
  background-color: rgba(220, 53, 69, 0.1);
  color: var(--status-pending-color);
}

.kpi-card.yellow-theme .kpi-icon {
  background-color: rgba(255, 193, 7, 0.1);
  color: #b28b0e;
}

.kpi-info {
  flex: 1;
}

.kpi-value {
  font-size: 1.75rem;
  font-weight: 800;
  font-family: var(--font-title);
  color: var(--text-dark);
  line-height: 1.2;
}

.kpi-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Department Mini Grid (inside Dashboard KPI) */
.dept-bottleneck-section {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.section-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-title-bar h3 {
  font-size: 1.15rem;
}

.dept-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.dept-kpi-pill {
  background-color: var(--bg-light);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
  border: 1px solid var(--border-light);
}

.dept-kpi-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.dept-kpi-stats {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.badge-mini {
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
}

.badge-mini.pending {
  background-color: var(--status-pending-bg);
  color: var(--status-pending-text);
}

.badge-mini.not-attended {
  background-color: var(--status-not-attended-bg);
  color: var(--status-not-attended-text);
}

/* 5. SEARCH & FILTER PANEL */
.filter-panel {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.search-wrapper {
  grid-column: 1 / -1;
  position: relative;
}

.global-search-input {
  width: 100%;
  padding: 12px 16px 12px 48px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  background-color: var(--bg-light);
  transition: var(--transition-fast);
}

.global-search-input:focus {
  border-color: var(--primary-blue);
  background-color: white;
  box-shadow: 0 0 0 3px rgba(11, 102, 194, 0.15);
}

.search-icon-svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-group label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.filter-select, .filter-date {
  padding: 8px 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.85rem;
  background-color: white;
  outline: none;
  cursor: pointer;
  color: var(--text-dark);
}

.filter-select:focus, .filter-date:focus {
  border-color: var(--primary-blue);
}

.filter-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

.btn-secondary {
  background-color: var(--bg-light);
  color: var(--text-dark);
  border: 1px solid var(--border-light);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-secondary:hover {
  background-color: var(--border-light);
}

.btn-primary {
  background-color: var(--primary-blue);
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover {
  background-color: #004d99;
}

/* 6. VEHICLE GRID & CARDS */
.list-header-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.list-info-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.view-toggles {
  display: flex;
  gap: 6px;
}

.view-btn {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.view-btn.active, .view-btn:hover {
  background-color: rgba(11, 102, 194, 0.1);
  color: var(--primary-blue);
  border-color: rgba(11, 102, 194, 0.3);
}

.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

/* VEHICLE CARD COLOR LOGIC WRAPPED IN CLASSES */
.vehicle-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 2px solid transparent;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
}

/* Required Border Logic */
.vehicle-card.status-not-attended-border {
  border-color: var(--card-border-yellow);
}

.vehicle-card.status-pending-border {
  border-color: var(--card-border-red);
}

.vehicle-card.status-approved-border {
  border-color: var(--card-border-green);
}

.vehicle-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-header-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.card-title-group h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.card-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.vehicle-status-badge {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  background-color: rgba(11, 102, 194, 0.1);
  color: var(--primary-blue);
  text-transform: uppercase;
}

.card-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.card-detail-item {
  display: flex;
  flex-direction: column;
}

.card-detail-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.card-detail-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
}

.card-progress-section {
  margin-top: auto;
}

.progress-label-bar {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.progress-bar-container {
  height: 8px;
  background-color: var(--border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-blue) 0%, var(--accent-cyan) 100%);
  width: 0%;
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.progress-bar-fill.all-approved {
  background: var(--status-approved-color);
}

.card-pending-dept-wrapper {
  background-color: var(--bg-light);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pending-dept-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

.pending-dept-value {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}

.pending-dept-value.pending {
  background-color: var(--status-pending-bg);
  color: var(--status-pending-text);
}

.pending-dept-value.not-attended {
  background-color: var(--status-not-attended-bg);
  color: var(--status-not-attended-text);
}

.pending-dept-value.approved {
  background-color: var(--status-approved-bg);
  color: var(--status-approved-text);
}

/* ListView Table Layout */
.list-view-container {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  margin-bottom: 40px;
}

.table-master {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.table-master th, .table-master td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

.table-master th {
  background-color: var(--bg-light);
  font-family: var(--font-title);
  font-weight: 700;
  color: var(--primary-navy);
  position: sticky;
  top: 0;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

.table-master tr {
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.table-master tr:hover {
  background-color: rgba(11, 102, 194, 0.03);
}

/* Badge styles */
.badge-status {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-status.approved {
  background-color: var(--status-approved-bg);
  color: var(--status-approved-text);
  border: 1px solid var(--status-approved-border);
}

.badge-status.pending {
  background-color: var(--status-pending-bg);
  color: var(--status-pending-text);
  border: 1px solid var(--status-pending-border);
}

.badge-status.not-attended {
  background-color: var(--status-not-attended-bg);
  color: var(--status-not-attended-text);
  border: 1px solid var(--status-not-attended-border);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: currentColor;
}

/* 7. VEHICLE EDIT DRAWER / MODAL */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: flex-end; /* Drawer slide-in from right */
  animation: fadeIn var(--transition-normal);
}

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

.modal-drawer {
  background-color: var(--bg-card);
  width: 100%;
  max-width: 680px;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
  animation: slideInRight var(--transition-normal);
}

.modal-header {
  padding: 20px 24px;
  background-color: var(--bg-light);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 1.3rem;
  margin-bottom: 2px;
}

.modal-header p {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.close-btn:hover {
  background-color: var(--border-light);
  color: var(--text-dark);
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  background-color: var(--bg-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

/* Forms and Section Styling */
.form-section-block {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px;
  position: relative;
  transition: border-color var(--transition-fast);
}

.form-section-block.editable {
  border-color: rgba(11, 102, 194, 0.4);
  box-shadow: 0 0 10px rgba(11, 102, 194, 0.05);
}

.form-section-block.readonly {
  background-color: #fdfdfd;
  opacity: 0.85;
}

.form-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border-light);
}

.form-section-header h4 {
  font-size: 1rem;
  font-weight: 700;
}

.section-lock-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 4px;
  background-color: #f1f5f9;
  color: var(--text-muted);
}

.form-section-block.editable .section-lock-badge {
  background-color: rgba(40, 167, 69, 0.1);
  color: var(--status-approved-color);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.form-group-full {
  grid-column: 1 / -1;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-field label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

.form-field input, .form-field select {
  padding: 8px 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.85rem;
  outline: none;
  background-color: white;
  color: var(--text-dark);
}

.form-field input:focus, .form-field select:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(11, 102, 194, 0.1);
}

.form-field input:disabled, .form-field select:disabled {
  background-color: #f1f5f9;
  color: var(--text-muted);
  cursor: not-allowed;
}

/* One-Click Quick Status Panel for Mobile friendliness */
.quick-status-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quick-status-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.quick-status-btn {
  border: 1px solid var(--border-light);
  background-color: white;
  padding: 10px 6px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  transition: var(--transition-fast);
}

.quick-status-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.quick-status-btn.not-attended-btn.active {
  background-color: var(--status-not-attended-bg);
  border-color: var(--status-not-attended-color);
  color: var(--status-not-attended-text);
}

.quick-status-btn.pending-btn.active {
  background-color: var(--status-pending-bg);
  border-color: var(--status-pending-color);
  color: var(--status-pending-text);
}

.quick-status-btn.approved-btn.active {
  background-color: var(--status-approved-bg);
  border-color: var(--status-approved-color);
  color: var(--status-approved-text);
}

/* 8. AUDIT LOG SCREEN */
.audit-log-container {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.audit-table-wrapper {
  overflow-x: auto;
  max-height: 600px;
}

.audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.audit-table th {
  background-color: var(--bg-light);
  padding: 12px 16px;
  font-family: var(--font-title);
  color: var(--primary-navy);
  position: sticky;
  top: 0;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-light);
}

.audit-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
}

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

/* 9. NOTIFICATIONS & TOASTS */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
  width: calc(100% - 48px);
}

.toast {
  background-color: var(--bg-card);
  border-left: 5px solid var(--primary-blue);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transform: translateY(20px);
  opacity: 0;
  animation: toastIn 0.3s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
}

.toast.success {
  border-left-color: var(--status-approved-color);
}

.toast-icon {
  font-size: 1.25rem;
  margin-top: 1px;
}

.toast.success .toast-icon {
  color: var(--status-approved-color);
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 2px;
  color: var(--text-dark);
}

.toast-msg {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
}

/* 10. ANIMATIONS */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes toastIn {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* 11. RESPONSIVE DESIGN (Android & iOS Optimizations) */
@media (max-width: 768px) {
  .role-simulator-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 10px 16px;
  }
  
  .role-selector-wrapper {
    justify-content: space-between;
  }
  
  .main-header {
    padding: 12px 16px;
    flex-direction: column;
    align-items: flex-start;
  }
  
  .nav-tabs {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  
  .tab-btn {
    flex-shrink: 0;
  }
  
  .content-wrapper {
    padding: 16px;
  }
  
  .modal-drawer {
    max-width: 100%;
    height: 100%;
    border-radius: 0;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .kpi-container {
    grid-template-columns: 1fr 1fr;
  }
  
  .dept-kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
  .kpi-container {
    grid-template-columns: 1fr;
  }
  
  .dept-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .btn-primary, .btn-secondary {
    padding: 8px 12px;
    font-size: 0.8rem;
  }
}

/* Mobile Quick Edit Action Sheet Style for Delivery Statuses */
.mobile-status-sheet {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background-color: var(--bg-light);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-top: 8px;
}
.mobile-status-header {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-light);
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* User authentication & login portal customizations */
#login-overlay {
  display: flex;
  transition: opacity 0.3s ease;
}

#login-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  display: none !important;
}

#login-form input {
  font-size: 0.95rem;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-light);
  border: 1px solid var(--border-light);
}

#login-form input:focus {
  background-color: white;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(11, 102, 194, 0.15);
}

/* User management specific styles */
.user-admin-actions {
  display: flex;
  gap: 8px;
}

.btn-danger-mini {
  background: none;
  border: 1px solid #fca5a5;
  color: #dc2626;
  padding: 4px 8px;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: 0.2s;
}

.btn-danger-mini:hover {
  background-color: #fef2f2;
}

.btn-edit-mini {
  background: none;
  border: 1px solid #93c5fd;
  color: var(--primary-blue);
  padding: 4px 8px;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: 0.2s;
}

.btn-edit-mini:hover {
  background-color: rgba(11, 102, 194, 0.05);
}

/* Login Shake Animation for errors */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.shake {
  animation: shake 0.2s ease-in-out 2;
}
