/* Cloned from public/css/style.css with updates */
/* Global Stylesheet - light pastel modern design */
:root {
  /* Palette */
  --color-primary: #5c7cfa;   /* Soft blue */
  --color-primary-hover: #4f6cf5;
  --color-secondary: #74c69d; /* Soft green */
  --color-accent: #f7b267;    /* Warm pastel */
  --color-highlight: #ff6f91; /* Light coral pink */
  --color-bg: #f8f9fa;        /* Light background */
  --color-surface: #ffffff;
  --color-text: #2d2d2d;      /* Main text */
  --color-muted: #6b7280;
  --color-border: #e5e7eb;

  /* Pastel tints */
  --primary-soft: #e9edff;
  --secondary-soft: #e6f5ee;
  --accent-soft: #fff1e4;
  --highlight-soft: #ffe6ed;

  /* Typography scale */
  --fs-1: 0.875rem;  /* 14 */
  --fs-2: 1rem;      /* 16 */
  --fs-3: 1.125rem;  /* 18 */
  --fs-4: 1.25rem;   /* 20 */
  --fs-5: 1.5rem;    /* 24 */
  --fs-6: 1.875rem;  /* 30 */
  --fs-7: 2.25rem;   /* 36 */

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 48px;

  /* Radii & shadows */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-md: 0 8px 24px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 16px 40px rgba(16, 24, 40, 0.12);

  /* Motion */
  --ease: cubic-bezier(.22,.61,.36,1);
  
  /* Loading spinner */
  --spinner-size: 16px;
  --duration-fast: 120ms;
  --duration: 220ms;
}

* { box-sizing: border-box; }
/* Horizontal overflow guard */
html, body { 
  width: 100%; 
  overflow-x: hidden; 
  word-wrap: break-word;
  overflow-wrap: break-word;
}
body {
  margin: 0;
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, 'Apple Color Emoji', 'Segoe UI Emoji';
  color: var(--color-text);
  background: linear-gradient(180deg, var(--color-bg), #ffffff 60%);
  word-wrap: break-word;
  overflow-wrap: break-word;
  direction: ltr;
}

/* RTL support for Arabic text */
[dir="rtl"] {
  direction: rtl;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; word-wrap: break-word; overflow-wrap: break-word; }
.muted { color: var(--color-muted); }
.lead { font-size: 1.125rem; color: var(--color-muted); }

.container { max-width: 1200px; margin: 0 auto; padding: 1rem; width: 100%; overflow: visible; }

.site-header {
  position: sticky;
  top: 0px;
  backdrop-filter: blur(8px);
  background: rgba(255,255,255,0.7);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 2px 10px rgba(16,24,40,0.04);
  z-index: 100;
  width: 100%;
  overflow: visible;
  height: auto;
  max-height: none;
}
.header-inner { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  height: 64px; 
  max-height: 64px;
  gap: 12px; 
  flex-wrap: nowrap; 
  min-width: 0; 
  overflow: visible;
  position: relative;
}
.header-left { display: flex; align-items: center; gap: 0; flex-shrink: 0; }
.brand { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; margin-left: -8px; }
/* Masked brand using provided logo with black fill that blends into header */
.brand-logo {
  width: 140px;
  height: 80px;
  display: block;
  background-color: #111827; /* black */
  -webkit-mask-image: url('../images/LOGO.png');
  mask-image: url('../images/LOGO.png');
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
/* Global logo rule per spec */
a.brand img { display: none; }
.header-right { 
  display: flex; 
  align-items: center; 
  gap: 12px; 
  overflow: visible;
  position: relative;
}
.header-actions { 
  display: inline-flex; 
  align-items: flex-start; 
  gap: 8px; 
  overflow: visible;
  position: relative;
}
.notif-dropdown { 
  position: fixed !important; 
  right: auto; 
  top: auto; 
  left: auto;
  bottom: auto;
  width: 380px; 
  min-width: 0;
  max-width: none;
  background: #fff; 
  border: 1px solid var(--color-border); 
  border-radius: 16px; 
  box-shadow: 0 20px 60px rgba(16, 24, 40, 0.15);
  display: none;
  z-index: 99999 !important;
  animation: dropdownFadeIn 0.2s ease-out;
  transform: translateZ(0);
  will-change: transform;
  box-sizing: border-box;
}
.notif-dropdown.open { display: block; }
.notif-header { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  padding: 16px 20px; 
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
  border-radius: 16px 16px 0 0;
}
.notif-list { 
  list-style: none; 
  margin: 0; 
  padding: 12px; 
  max-height: 400px; 
  overflow-y: auto; 
  overflow-x: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.notif-item { 
  padding: 16px; 
  border-radius: 12px; 
  margin-bottom: 8px;
  transition: background-color 0.2s ease;
  border: 1px solid transparent;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.5;
}
.notif-item:hover {
  background: var(--color-bg);
}
.notif-item.unread { 
  background: var(--primary-soft); 
  border-left: 4px solid var(--color-primary);
  font-weight: 600;
}
.notif-item.unread:hover {
  background: #e3edff;
}
.notif-item small {
  display: block; 
  color: var(--color-muted); 
  font-size: 0.75rem; 
  margin-top: 6px;
  font-weight: 400;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}
.notif-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--color-muted);
  font-style: italic;
}

/* Mobile responsive styles for notification dropdown */
@media (max-width: 767px) {
  .notif-dropdown {
    width: calc(100vw - 32px) !important;
    max-width: calc(100vw - 32px) !important;
    min-width: 0;
    position: fixed !important;
    z-index: 99999 !important;
    box-sizing: border-box;
  }
}

/* Small mobile - center the dropdown */
@media (max-width: 480px) {
  .notif-dropdown {
    width: 92vw !important;
    max-width: 420px !important;
    min-width: 0;
    position: fixed !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) translateY(0) !important;
    z-index: 99999 !important;
    box-sizing: border-box;
  }
  
  /* Override animation transform for mobile centering */
  .notif-dropdown.open {
    animation: dropdownFadeInMobile 0.2s ease-out;
  }
  
  @keyframes dropdownFadeInMobile {
    from { 
      opacity: 0; 
      transform: translateX(-50%) translateY(-10px); 
    }
    to { 
      opacity: 1; 
      transform: translateX(-50%) translateY(0); 
    }
  }
  
  .notif-list {
    padding: 8px;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .notif-item {
    padding: 12px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal !important;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.6;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: block;
  }
  
  .notif-item,
  .notif-item * {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal !important;
  }
  
  .notif-item small {
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal !important;
    overflow: visible;
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
}

/* Ensure dropdown is never clipped by any parent */
.notif-dropdown {
  overflow: visible;
}

/* Only the list should scroll, not the dropdown container */
.notif-list {
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.icon-button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--color-border);
  background: #fff; box-shadow: var(--shadow-sm);
  transition: transform var(--duration-fast) var(--ease), box-shadow var(--duration) var(--ease), background var(--duration) var(--ease);
  position: relative;
  align-self: flex-start;
  margin-top: 2px;
}
.icon-button:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.badge {
  position: absolute; top: -6px; right: -12px; min-width: 18px; height: 18px;
  padding: 0 6px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; line-height: 1; color: #fff; box-shadow: var(--shadow-sm);
  z-index: 10;
}
.badge-pink { background: var(--color-highlight); }
.notif-wrapper {
  display: flex;
  align-items: flex-start;
  padding-top: 2px;
  position: static;
}

/* Status badge styles */
.badge-warning {
  background: #f59e0b !important;
  color: #fff !important;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  display: inline-block;
  position: static !important;
  top: auto !important;
  right: auto !important;
  min-width: auto !important;
  height: auto !important;
  box-shadow: none !important;
}

.badge-danger {
  background: #ef4444 !important;
  color: #fff !important;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  display: inline-block;
  position: static !important;
  top: auto !important;
  right: auto !important;
  min-width: auto !important;
  height: auto !important;
  box-shadow: none !important;
}

.badge-primary {
  background: #3b82f6 !important;
  color: #fff !important;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  display: inline-block;
  position: static !important;
  top: auto !important;
  right: auto !important;
  min-width: auto !important;
  height: auto !important;
  box-shadow: none !important;
}

.badge-success {
  background: #10b981 !important;
  color: #fff !important;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  display: inline-block;
  position: static !important;
  top: auto !important;
  right: auto !important;
  min-width: auto !important;
  height: auto !important;
  box-shadow: none !important;
}

.badge-secondary {
  background: #6b7280 !important;
  color: #fff !important;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  display: inline-block;
  position: static !important;
  top: auto !important;
  right: auto !important;
  min-width: auto !important;
  height: auto !important;
  box-shadow: none !important;
}
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--secondary-soft); color: var(--color-text);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 600;
  border: 1px solid var(--color-border);
}

.nav-list { display: flex; gap: 24px; list-style: none; padding: 0; margin: 0; align-items: center; position: relative; }
.nav-list a { padding: 8px 4px; }
.nav-list .btn { padding: 8px 12px; }
.nav-toggle { display: none; }

.hero { padding: 72px 0 48px; text-align: center; }
.hero h1 { font-size: clamp(1.75rem, 2.5vw, 2.75rem); margin: 0 0 8px; }
.hero-actions { margin-top: 20px; display: inline-flex; gap: 12px; }

.features { padding: 32px 0 56px; }
.about { padding: 16px 0 72px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-md);
  transform: translateY(0);
  transition: transform var(--duration-fast) var(--ease), box-shadow var(--duration) var(--ease);
  animation: fadeUp .5s var(--ease) both;
  width: 100%;
  box-sizing: border-box;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.card + .card { margin-top: 16px; }
.card-header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; flex-wrap: wrap; }
.card-title { margin:0; font-size: var(--fs-5); word-wrap: break-word; overflow-wrap: break-word; }
.card-subtitle { margin:0; color: var(--color-muted); font-size: var(--fs-2); word-wrap: break-word; overflow-wrap: break-word; }
.card-actions { display:flex; gap:8px; align-items:center; flex-wrap: wrap; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat { font-size: 2rem; font-weight: 700; color: var(--primary-700); }

/* Responsive cards */
@media (max-width: 480px) {
  .card {
    padding: 16px;
    margin-left: 0;
    margin-right: 0;
  }
  
  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .card-title {
    font-size: var(--fs-4);
  }
  
  .card-actions {
    width: 100%;
    justify-content: flex-start;
  }
  
  .page-header h1 {
    font-size: var(--fs-5);
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 14px; border-radius: 10px; border: 1px solid var(--color-border);
  background: #fff; color: var(--color-text);
  transition: transform var(--duration-fast) var(--ease), box-shadow var(--duration) var(--ease), background var(--duration) var(--ease);
  box-shadow: var(--shadow-sm);
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  text-align: center;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); }
.btn-secondary { background: var(--color-secondary); border-color: var(--color-secondary); color: #0f172a; }
.btn-secondary:hover { filter: brightness(0.95); }
.btn-accent { background: var(--color-accent); border-color: var(--color-accent); color: #0f172a; }
.btn-accent:hover { filter: brightness(0.95); }
.btn-outline { background: transparent; color: var(--color-text); }
.btn-outline:hover { background: #fff; }
.btn-sm {
  padding: 6px 10px;
  font-size: var(--fs-1);
}
.btn-success {
  background: var(--color-secondary);
  border-color: var(--color-secondary);
  color: #0f172a;
}
.btn-success:hover {
  filter: brightness(0.95);
}
.btn-danger {
  background: #ef4444;
  border-color: #ef4444;
  color: #fff;
}
.btn-danger:hover {
  background: #dc2626;
  border-color: #dc2626;
}

/* Responsive buttons */
@media (max-width: 480px) {
  .btn {
    width: 100%;
    padding: 12px 14px;
  }
  
  .btn-sm {
    width: 100%;
    padding: 10px 12px;
  }
  
  .card-header .btn,
  .card-actions .btn {
    width: auto;
    min-width: auto;
  }
}

/* Tables */
.table { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); }
.table thead th { background: var(--primary-soft); color: var(--color-text); text-align: left; padding: 12px 14px; font-weight: 600; font-size: var(--fs-2); }
.table tbody td { padding: 12px 14px; border-top: 1px solid var(--color-border); font-size: var(--fs-2); }
.table tbody tr:hover { background: #fafbff; }
.table-responsive { width: 100%; overflow-x: auto; border-radius: var(--radius-md); }
.table-responsive::-webkit-scrollbar { height: 10px; }
.table-responsive::-webkit-scrollbar-thumb { background: #d9defb; border-radius: 999px; }

/* Responsive table - convert to cards on mobile */
@media (max-width: 768px) {
  .table-responsive {
    overflow-x: visible;
  }
  
  .table,
  .table thead,
  .table tbody,
  .table tr,
  .table td,
  .table th {
    display: block;
  }
  
  .table thead {
    display: none;
  }
  
  .table tbody tr {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
    padding: 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
  }
  
  .table tbody tr:last-child {
    margin-bottom: 0;
  }
  
  .table tbody td {
    padding: 8px 0;
    border-top: none;
    border-bottom: 1px solid var(--color-border);
    text-align: left !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }
  
  .table tbody td:last-child {
    border-bottom: none;
  }
  
  .table tbody td:before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--color-text);
    display: block;
    margin-bottom: 4px;
    font-size: var(--fs-1);
    color: var(--color-muted);
  }
  
  .table tbody td:empty {
    display: none;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0.5rem;
  }
  
  .table tbody tr {
    padding: 12px;
    margin-bottom: 12px;
  }
  
  .table tbody td {
    font-size: var(--fs-1);
    padding: 6px 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  .table tbody td:before {
    font-size: 0.7rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  /* Text elements */
  p, span, div, td, th, a, label, small {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  /* Header adjustments */
  .header-inner {
    padding: 0 0.5rem;
  }
  
  .header-right {
    font-size: 0.75rem;
  }
  
  /* Ensure all content is within viewport */
  .content section {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }
  
  .card {
    max-width: 100%;
  }
  
  /* Forms and inputs */
  input, textarea, select {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
}

/* Status badges */
.status { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 999px; font-size: var(--fs-1); border: 1px solid var(--color-border); box-shadow: var(--shadow-sm); word-wrap: break-word; overflow-wrap: break-word; }
.badge-soft { padding: 6px 10px; border-radius: 999px; font-size: var(--fs-1); border: 1px solid var(--color-border); word-wrap: break-word; overflow-wrap: break-word; display: inline-block; }
.badge-blue { background: var(--primary-soft); }
.badge-green { background: var(--secondary-soft); }
.badge-orange { background: var(--accent-soft); }
.badge-pink-soft { background: var(--highlight-soft); }
.status .dot { width: 8px; height: 8px; border-radius: 999px; display: inline-block; flex-shrink: 0; }
.status-pending { background: var(--primary-soft); color: var(--color-text); }
.status-pending .dot { background: var(--color-primary); }
.status-approved { background: var(--secondary-soft); color: var(--color-text); }
.status-approved .dot { background: var(--color-secondary); }
.status-rejected { background: var(--highlight-soft); color: var(--color-text); }
.status-rejected .dot { background: var(--color-highlight); }
.status-proc { background: var(--accent-soft); color: var(--color-text); }
.status-proc .dot { background: var(--color-accent); }

/* Responsive badges */
@media (max-width: 480px) {
  .badge-soft {
    font-size: 0.7rem;
    padding: 4px 8px;
  }
  
  .card-header .card-actions {
    width: 100%;
    flex-wrap: wrap;
  }
  
  .card-header .card-actions .badge-soft {
    margin: 2px;
  }
}

/* Timeline */
.timeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; align-items: center; }
.step { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 10px; border: 1px dashed var(--color-border); background: #fff; font-size: var(--fs-1); }
.step .marker { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.step-approved { border-style: solid; background: var(--secondary-soft); }
.step-approved .marker { background: var(--color-secondary); color: #0f172a; }
.step-current { border-style: solid; background: var(--primary-soft); }
.step-current .marker { background: var(--color-primary); color: #fff; }
.step-upcoming { opacity: .8; }
.step-rejected { background: var(--highlight-soft); border-style: solid; }
.step-rejected .marker { background: var(--color-highlight); color: #fff; }

/* Action bars */
.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.reject-area { display: none; width: 100%; }
.reject-area textarea { width: 100%; min-height: 80px; padding: 10px; border-radius: 10px; border: 1px solid var(--color-border); }
.actions.disabled { opacity: .5; pointer-events: none; }

/* Responsive actions */
@media (max-width: 480px) {
  .actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  
  .actions .btn,
  .action-buttons .btn {
    width: 100%;
    justify-content: center;
  }
  
  .action-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }
  
  .action-buttons form {
    width: 100%;
  }
  
  .action-buttons form .btn {
    width: 100%;
  }
}

.site-footer { padding: 24px 0; border-top: 1px solid var(--color-border); margin-top: 40px; background: #fff; }

/* App shell (dashboard) */
.app-shell { display: grid; grid-template-columns: 260px 1fr; gap: 20px; align-items: start; }
.sidebar {
  position: sticky; top: 72px; align-self: start;
  height: calc(100vh - 88px);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 12px;
  transition: width var(--duration) var(--ease), transform var(--duration) var(--ease), opacity var(--duration) var(--ease);
  width: 260px;
  z-index: 100;
}
.sidebar.collapsed { width: 72px; }
.sidebar .section-title { font-size: var(--fs-2); padding: 8px 10px; color: var(--color-muted); }
.sidebar .menu { list-style: none; padding: 6px; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.sidebar .menu a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 10px; color: var(--color-text);
  transition: background var(--duration) var(--ease), transform var(--duration-fast) var(--ease);
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.sidebar .menu a:hover { background: var(--primary-soft); transform: translateX(2px); }
.sidebar .menu .icon { width: 18px; text-align: center; flex-shrink: 0; }
.sidebar .menu a.active { background: var(--highlight-soft); box-shadow: inset 0 0 0 1px var(--color-highlight); }
.sidebar .menu a.active .label { font-weight: 600; }

.content { min-width: 0; }

/* Sidebar toggle button - hidden by default, shown only on mobile */
.sidebar-toggle-mobile {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 20px;
  cursor: pointer;
  padding: 8px 12px;
  transition: background-color var(--duration) var(--ease);
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.sidebar-toggle-mobile:hover {
  background-color: var(--primary-soft);
}

/* Sidebar backdrop for mobile */
.sidebar-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
  display: none;
  opacity: 0;
  transition: opacity var(--duration) var(--ease);
}

.sidebar-backdrop.open {
  display: block;
  opacity: 1;
}

/* Breakpoints */
@media (min-width: 1200px) {
  .container { padding-left: 0; padding-right: 0; }
}
@media (min-width: 768px) and (max-width: 1199px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 767px) {
  .container {
    padding: 0.75rem;
  }
  
  .grid-3 { grid-template-columns: 1fr; }
  
  .header-inner {
    gap: 8px;
    padding: 0 0.75rem;
  }
  
  .header-left {
    gap: 0;
  }
  
  .header-right {
    font-size: 0.85rem;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  .sidebar-toggle-mobile {
    display: inline-flex;
    flex-shrink: 0;
  }
  
  .nav-list { 
    position: absolute; 
    right: 16px; 
    top: 64px; 
    background: #fff; 
    border: 1px solid var(--color-border); 
    border-radius: 12px; 
    padding: 12px; 
    display: none; 
    flex-direction: column; 
    gap: 8px; 
    box-shadow: var(--shadow-md);
    min-width: 200px;
    z-index: 1000;
  }
  .nav-list.open { display: flex; }
  
  /* Mobile navigation backdrop */
  .nav-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 999;
    display: none;
  }
  .nav-backdrop.open {
    display: block;
  }
  .nav-list a {
    padding: 10px 12px;
    border-radius: 8px;
    transition: background-color var(--duration) var(--ease);
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  .nav-list a:hover {
    background-color: var(--primary-soft);
  }

  .app-shell { 
    grid-template-columns: 1fr; 
    gap: 16px;
  }
  
  .content {
    min-width: 0;
    width: 100%;
  }
  
  .sidebar { 
    position: fixed; 
    top: 64px; 
    left: 0; 
    height: calc(100vh - 64px); 
    transform: translateX(-100%); 
    width: 260px; 
    max-width: 85vw;
    border-radius: 0 14px 14px 0;
    z-index: 100;
    overflow-y: auto;
    overflow-x: hidden;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop.open {
    display: block;
  }
  
  /* Ensure no horizontal scrolling */
  .page-header {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  .page-header h1 {
    font-size: var(--fs-5);
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
}

/* Utility spacing */
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; }

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeUp .6s var(--ease) both; }

/* Auth pages */
.auth { min-height: calc(100vh - 64px); display: grid; place-items: center; padding: var(--space-7) 0; }
.auth-card {
  width: min(440px, 92%);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 24px;
  animation: fadeUp .5s var(--ease) both;
}
.auth-logo { display: inline-flex; width: 48px; height: 48px; border-radius: 14px; background: var(--primary-soft); color: var(--color-primary); align-items: center; justify-content: center; font-weight: 700; box-shadow: var(--shadow-sm); }
.auth h1 { margin: 16px 0 6px; font-size: var(--fs-6); }
.auth .muted { margin-bottom: 16px; }
.form-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.form-field label { font-size: var(--fs-1); color: var(--color-muted); }
.input, select.input {
  padding: 12px 12px; border-radius: 10px; border: 1px solid var(--color-border);
  font-size: var(--fs-2); background: #fff;
}
.form-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.form-check { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-1); color: var(--color-muted); }

/* Card accents */
.card-accent-primary { border-top: 4px solid var(--color-primary); }
.card-accent-secondary { border-top: 4px solid var(--color-secondary); }
.card-accent-accent { border-top: 4px solid var(--color-accent); }
.card-accent-highlight { border-top: 4px solid var(--color-highlight); }

/* Modal */
.modal { position: fixed; inset: 0; display: none; }
.modal.show { display: block; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.4); backdrop-filter: blur(2px); }
.modal-dialog { position: relative; max-width: 820px; width: 92%; margin: 8vh auto; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); animation: fadeUp .25s var(--ease) both; }
.modal-header, .modal-footer { padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--color-border); }
.modal-footer { border-top: 1px solid var(--color-border); border-bottom: none; }
.modal-body { padding: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.comments { margin-top: 12px; }
.comments-body { max-height: 180px; overflow: auto; background: var(--primary-soft); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 10px; }
.comment { padding: 6px 0; }

/* Toast */
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; background: #fff; border: 1px solid var(--color-border); box-shadow: var(--shadow-lg); border-radius: 999px; padding: 10px 16px; opacity: 0; pointer-events: none; transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }

/* My Requests page styles */
.requests-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  visibility: visible;
  opacity: 1;
}

.request-card {
  width: 100%;
  min-width: 0; /* Prevents overflow on mobile */
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.request-card .card {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* Prevents content from breaking layout */
  visibility: visible;
  opacity: 1;
}

.request-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem 0;
}

.request-id {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--color-primary);
}

.request-card .card-body {
  padding: 1rem 1.5rem;
  flex-grow: 1;
  min-width: 0; /* Prevents overflow */
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.request-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  color: var(--color-text);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.request-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
  min-width: 0; /* Prevents overflow */
}

.meta-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
  min-width: 0; /* Prevents overflow */
}

/* Base rule for Expected Delivery - always visible */
.meta-item.expected-delivery-item,
.expected-delivery-item {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.expected-delivery-item .meta-value,
.expected-delivery-item .expected-delivery-value,
.meta-item.expected-delivery-item .meta-value {
  color: #dc3545 !important;
  font-weight: 600 !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.meta-label {
  color: var(--color-muted);
  font-size: 0.9rem;
  flex-shrink: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.meta-value {
  font-weight: 500;
  color: var(--color-text);
  text-align: right;
  word-wrap: break-word;
  overflow-wrap: break-word;
  min-width: 0; /* Allows text to wrap */
}

.request-notes, .rejection-reason {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 6px;
}

.request-notes {
  background: var(--accent-soft);
  border-left: 3px solid var(--color-accent);
}

.rejection-reason {
  background: var(--highlight-soft);
  border-left: 3px solid var(--color-highlight);
}

.request-notes p, .rejection-reason p {
  margin: 0.5rem 0 0 0;
  font-size: 0.9rem;
}

.request-card .card-footer {
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid var(--color-border);
  margin-top: auto;
}

.timeline-wrapper {
  width: 100%;
}

.timeline-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text);
  margin-bottom: 0.75rem;
}

.timeline-horizontal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
  position: relative;
}

.step-icon {
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  border: 2px solid;
}

.step-circle.completed {
  background: var(--color-secondary);
  border-color: var(--color-secondary);
  color: white;
}

.step-circle.current {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
  animation: pulse 2s infinite;
}

.step-circle.rejected {
  background: var(--color-highlight);
  border-color: var(--color-highlight);
  color: white;
}

.step-circle.pending {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-muted);
}

.step-label {
  font-size: 0.75rem;
  text-align: center;
  color: var(--color-muted);
  font-weight: 500;
}

.timeline-step.completed .step-label {
  color: var(--color-secondary);
  font-weight: 600;
}

.timeline-step.current .step-label {
  color: var(--color-primary);
  font-weight: 700;
}

.timeline-step.rejected .step-label {
  color: var(--color-highlight);
  font-weight: 600;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.empty-state {
  margin-top: 3rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .requests-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .request-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  /* CRITICAL: Ensure Expected Delivery is visible on all mobile devices */
  .expected-delivery-item,
  .meta-item.expected-delivery-item,
  .request-card .expected-delivery-item,
  .request-card .meta-item.expected-delivery-item,
  .card-body .expected-delivery-item,
  .request-meta .expected-delivery-item {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: baseline !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    margin: 0.5rem 0 !important;
    padding: 0.5rem 0 !important;
    min-height: auto !important;
    height: auto !important;
    overflow: visible !important;
  }
  
  .expected-delivery-item .meta-label,
  .meta-item.expected-delivery-item .meta-label,
  .request-card .expected-delivery-item .meta-label {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: var(--color-muted) !important;
  }
  
  .expected-delivery-item .meta-value,
  .expected-delivery-item .expected-delivery-value,
  .meta-item.expected-delivery-item .meta-value,
  .request-card .expected-delivery-item .meta-value {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: #dc3545 !important;
    font-weight: 600 !important;
    text-align: right !important;
  }
  
  .request-card .card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  /* Ensure content area doesn't hide grid */
  .content {
    overflow-x: visible;
    overflow-y: visible;
  }
  
  #requests-grid {
    display: grid !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .timeline-horizontal {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .timeline-step {
    flex: 0 1 auto;
    min-width: 70px;
  }
  
  .step-label {
    font-size: 0.7rem;
  }
}

/* Mobile optimizations for All Requests page (≤767px) */
@media (max-width: 767px) {
  /* Page Header - Better spacing and grouping */
  .page-header {
    margin-bottom: 1.5rem;
    padding: 1rem 0;
  }
  
  .page-header-content {
    gap: 1.25rem;
  }
  
  .page-header-text {
    margin-bottom: 0.5rem;
  }
  
  .page-header-text h1 {
    font-size: 1.5rem;
    line-height: 1.3;
    margin-bottom: 0.5rem;
  }
  
  .page-header-text .muted {
    font-size: 0.9rem;
    line-height: 1.5;
  }
  
  /* Search and Filters - Clean stack layout */
  .page-header-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    background: var(--color-bg);
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    margin-top: 1rem;
  }
  
  .search-group,
  .filter-group {
    width: 100%;
    min-width: auto;
    max-width: none;
  }
  
  .filter-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.5rem;
    display: block;
  }
  
  .search-input-wrapper {
    width: 100%;
  }
  
  .search-input,
  .filter-select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: #fff;
    transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
  }
  
  .search-input:focus,
  .filter-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(92, 124, 250, 0.1);
  }
  
  .search-icon {
    right: 0.75rem;
    font-size: 1rem;
  }
  
  /* Requests Grid - Single column with better spacing */
  .requests-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
  }
  
  /* Request Cards - Improved mobile layout */
  .request-card .card {
    border-radius: var(--radius-md);
    overflow: hidden;
  }
  
  .request-card .card-header {
    padding: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg);
  }
  
  .request-id {
    font-size: 1rem;
    order: 1;
  }
  
  .request-card .card-header .status {
    order: 2;
    font-size: 0.8125rem;
    padding: 0.375rem 0.625rem;
  }
  
  .request-card .card-body {
    padding: 1rem;
    overflow: visible !important;
    min-height: auto;
    display: flex !important;
    flex-direction: column !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .request-title {
    font-size: 1.125rem;
    margin-bottom: 0.875rem;
    line-height: 1.4;
  }
  
  .request-meta {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.625rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    visibility: visible !important;
    opacity: 1 !important;
    min-width: 0;
    overflow: visible !important;
  }
  
  /* Force all meta-items to be visible, especially Expected Delivery */
  .request-meta > * {
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .request-meta .meta-item {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  /* Extra specific rule for Expected Delivery on mobile - highest priority */
  .request-card .request-meta .expected-delivery-item,
  .request-card .card-body .request-meta .expected-delivery-item,
  .request-card .request-meta .meta-item.expected-delivery-item,
  .card-body .request-meta .expected-delivery-item,
  div.expected-delivery-item,
  .meta-item.expected-delivery-item {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: baseline !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0.5rem 0 !important;
    padding: 0.5rem 0 !important;
    border: none !important;
    background: transparent !important;
    min-height: auto !important;
    height: auto !important;
    overflow: visible !important;
    position: relative !important;
    z-index: 1 !important;
  }
  
  .request-card .request-meta .expected-delivery-item *,
  .request-card .card-body .request-meta .expected-delivery-item *,
  .request-card .request-meta .meta-item.expected-delivery-item *,
  div.expected-delivery-item *,
  .meta-item.expected-delivery-item * {
    visibility: visible !important;
    opacity: 1 !important;
    display: inline-block !important;
  }
  
  /* Ensure the label and value are visible */
  .expected-delivery-item .meta-label,
  .meta-item.expected-delivery-item .meta-label {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: var(--color-muted) !important;
  }
  
  .expected-delivery-item .meta-value,
  .expected-delivery-item .expected-delivery-value,
  .meta-item.expected-delivery-item .meta-value,
  .meta-item.expected-delivery-item .expected-delivery-value {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: #dc3545 !important;
    font-weight: 600 !important;
    text-align: right !important;
  }
  
  .meta-item {
    padding: 0.25rem 0;
    font-size: 0.875rem;
    display: flex !important;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
    min-width: 0;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .meta-label {
    font-size: 0.8125rem;
    color: var(--color-muted);
    flex-shrink: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  .meta-value {
    font-weight: 600;
    text-align: right;
    word-break: break-word;
    word-wrap: break-word;
    overflow-wrap: break-word;
    min-width: 0;
    flex: 1;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  /* Ensure Expected Delivery is visible on mobile */
  .request-meta .expected-delivery-item,
  .request-meta .meta-item.expected-delivery-item {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: baseline !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0.25rem 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: auto !important;
    height: auto !important;
    overflow: visible !important;
  }
  
  .request-meta .expected-delivery-item .meta-label,
  .request-meta .meta-item.expected-delivery-item .meta-label {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex-shrink: 0;
    margin-right: 0.5rem;
  }
  
  .request-meta .expected-delivery-item .meta-value,
  .request-meta .expected-delivery-item .expected-delivery-value,
  .request-meta .meta-item.expected-delivery-item .meta-value,
  .request-meta .meta-item.expected-delivery-item .expected-delivery-value {
    display: inline-block !important;
    text-align: right !important;
    color: #dc3545 !important;
    font-weight: 600 !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex: 1;
    min-width: 0;
  }
  
  /* Also target by inline style attribute */
  .meta-item .meta-value[style*="color: #dc3545"],
  .meta-item .meta-value[style*="color:#dc3545"] {
    color: #dc3545 !important;
    font-weight: 600 !important;
    visibility: visible !important;
    opacity: 1 !important;
    display: inline-block !important;
  }
  
  .request-notes,
  .rejection-reason {
    margin-top: 1rem;
    padding: 0.875rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    line-height: 1.5;
  }
  
  .request-notes p,
  .rejection-reason p {
    margin-top: 0.5rem;
    margin-bottom: 0;
  }
  
  /* Card Footer - Better mobile layout */
  .request-card .card-footer {
    padding: 1rem;
    border-top: 1px solid var(--color-border);
    background: var(--color-bg);
  }
  
  .card-footer-content {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .timeline-wrapper {
    min-width: auto;
    width: 100%;
    order: 2;
  }
  
  .timeline-title {
    font-size: 0.8125rem;
    margin-bottom: 0.625rem;
    font-weight: 600;
    color: var(--color-text);
  }
  
  .timeline-horizontal {
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-start;
  }
  
  .timeline-step {
    flex: 0 1 auto;
    min-width: 65px;
    max-width: 80px;
  }
  
  .step-circle {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }
  
  .step-label {
    font-size: 0.6875rem;
    margin-top: 0.25rem;
    line-height: 1.2;
    text-align: center;
  }
  
  .card-actions {
    order: 1;
    width: 100%;
    justify-content: stretch;
  }
  
  .btn-details {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
  }
  
  /* Empty State - Better mobile presentation */
  .empty-state .card,
  .filter-empty-state .card {
    padding: 2rem 1.5rem;
    border-radius: var(--radius-md);
  }
  
  .empty-state .card > div:first-child,
  .filter-empty-state .card > div:first-child {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
  }
  
  .empty-state .card h3,
  .filter-empty-state .card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
  }
  
  .empty-state .card .muted,
  .filter-empty-state .card .muted {
    font-size: 0.9375rem;
    margin-bottom: 1rem;
  }
  
  /* Improved spacing for mobile */
  .content {
    padding: 0 0.25rem;
  }
  
  .page-header {
    padding-left: 0;
    padding-right: 0;
  }
}

/* Page header with filters */
.page-header-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.page-header-text {
  flex: 1;
  min-width: 300px;
}

.page-header-actions {
  display: flex;
  gap: var(--space-4);
  align-items: flex-end;
  flex-wrap: wrap;
}

.search-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 250px;
  flex: 1;
  max-width: 400px;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  padding: var(--space-2) var(--space-7) var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  font-size: var(--fs-2);
  color: var(--color-text);
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.search-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(92, 124, 250, 0.1);
}

.search-input:hover {
  border-color: var(--color-primary);
}

.search-input::placeholder {
  color: var(--color-muted);
  font-style: italic;
}

.search-icon {
  position: absolute;
  right: var(--space-3);
  color: var(--color-muted);
  font-size: 1rem;
  pointer-events: none;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 150px;
}

.filter-label {
  font-size: var(--fs-1);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.filter-select {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  font-size: var(--fs-2);
  color: var(--color-text);
  transition: border-color var(--duration) var(--ease);
  cursor: pointer;
}

.filter-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(92, 124, 250, 0.1);
}

.filter-select:hover {
  border-color: var(--color-primary);
}

/* Filter responsive design */
@media (max-width: 768px) {
  .page-header-content {
    flex-direction: column;
    align-items: stretch;
  }
  
  .page-header-actions {
    justify-content: stretch;
    flex-direction: column;
    gap: var(--space-3);
  }
  
  .search-group {
    min-width: auto;
    max-width: none;
    order: -1; /* Show search bar first on mobile */
  }
  
  .filter-group {
    flex: 1;
    min-width: auto;
  }
}

/* Filter empty state */
.filter-empty-state {
  margin-top: var(--space-6);
}

/* Card footer with actions */
.card-footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.timeline-wrapper {
  flex: 1;
  min-width: 300px;
}

.card-actions {
  display: flex;
  gap: var(--space-2);
  flex-shrink: 0;
}

.btn-details {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: var(--fs-1);
  white-space: nowrap;
  transition: all var(--duration) var(--ease);
}

.btn-details:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-icon {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* ============================================
   FINAL MOBILE FIX: Expected Delivery Field
   Highest priority rules to ensure visibility
   ============================================ */

/* Universal mobile rule - applies to all screen sizes up to 768px */
@media screen and (max-width: 768px) {
  /* Force Expected Delivery to be visible with maximum specificity */
  .request-card .card-body .request-meta .meta-item.expected-delivery-item,
  .request-card .card-body .request-meta .expected-delivery-item,
  div.request-card div.card div.card-body div.request-meta div.expected-delivery-item,
  div.request-card div.card div.card-body div.request-meta div.meta-item.expected-delivery-item {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: baseline !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0.5rem 0 !important;
    padding: 0.5rem 0 !important;
    min-height: 24px !important;
    height: auto !important;
    overflow: visible !important;
    position: relative !important;
    z-index: 10 !important;
  }
  
  .request-card .card-body .request-meta .meta-item.expected-delivery-item .meta-label,
  .request-card .card-body .request-meta .expected-delivery-item .meta-label,
  div.request-card div.card div.card-body div.request-meta div.expected-delivery-item span.meta-label {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: var(--color-muted) !important;
    font-size: 0.8125rem !important;
    flex-shrink: 0 !important;
    margin-right: 0.5rem !important;
  }
  
  .request-card .card-body .request-meta .meta-item.expected-delivery-item .meta-value,
  .request-card .card-body .request-meta .meta-item.expected-delivery-item .expected-delivery-value,
  .request-card .card-body .request-meta .expected-delivery-item .meta-value,
  .request-card .card-body .request-meta .expected-delivery-item .expected-delivery-value,
  div.request-card div.card div.card-body div.request-meta div.expected-delivery-item span.meta-value,
  div.request-card div.card div.card-body div.request-meta div.expected-delivery-item span.expected-delivery-value {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: #dc3545 !important;
    font-weight: 600 !important;
    text-align: right !important;
    flex: 1 !important;
    min-width: 0 !important;
  }
}

/* Extra small mobile devices */
@media screen and (max-width: 480px) {
  .request-card .card-body .request-meta .expected-delivery-item,
  .request-card .card-body .request-meta .meta-item.expected-delivery-item {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    padding: 0.625rem 0 !important;
  }
  
  .request-card .card-body .request-meta .expected-delivery-item .meta-value,
  .request-card .card-body .request-meta .expected-delivery-item .expected-delivery-value {
    color: #dc3545 !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
  }
}

/* Responsive card footer */
@media (max-width: 768px) {
  .card-footer-content {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-3);
  }
  
  .timeline-wrapper {
    min-width: auto;
  }
  
  .card-actions {
    justify-content: center;
  }
  
  .btn-details {
    justify-content: center;
    width: 100%;
  }
}

/* Loading spinner and button states */
.loading-spinner {
  display: inline-block;
  width: var(--spinner-size);
  height: var(--spinner-size);
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 8px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.btn.loading {
  opacity: 0.8;
  cursor: not-allowed;
  pointer-events: none;
}

.btn.loading:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
}





