/* ==================== CSS Variables ==================== */
:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary: #64748b;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --dark: #1e293b;
  --light: #f8fafc;
  --border: #e2e8f0;
  --background: #f1f5f9;
  --text: #334155;
  --text-light: #64748b;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ==================== Reset & Base ==================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  color: var(--text);
  background: var(--background);
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ==================== Typography ==================== */
h1, h2, h3, h4 {
  color: var(--dark);
  font-weight: 600;
  line-height: 1.2;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }

/* ==================== Utility Classes ==================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: var(--primary);
  color: white;
  font-weight: 500;
  border-radius: var(--radius);
  transition: all 0.2s;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: white;
  color: var(--text);
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s;
}

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

.btn-full {
  width: 100%;
}

.btn-small {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--text-light);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.btn-icon:hover {
  background: var(--light);
  color: var(--text);
}

.btn-icon.danger:hover {
  background: #fef2f2;
  color: var(--danger);
}

/* ==================== Form Elements ==================== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: white;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-light);
}

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

.form-grid .full-width {
  grid-column: span 2;
}

/* ==================== Status Badges ==================== */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
  text-transform: capitalize;
}

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

.status-pending {
  background: #fef3c7;
  color: #92400e;
}
.status-pending .status-dot { background: #f59e0b; }

.status-picked_up {
  background: #dbeafe;
  color: #1e40af;
}
.status-picked_up .status-dot { background: #3b82f6; }

.status-in_transit {
  background: #e0e7ff;
  color: #3730a3;
}
.status-in_transit .status-dot { background: #6366f1; }

.status-out_for_delivery {
  background: #d1fae5;
  color: #065f46;
}
.status-out_for_delivery .status-dot { background: #10b981; }

.status-delivered {
  background: #dcfce7;
  color: #166534;
}
.status-delivered .status-dot { background: #22c55e; }

.status-exception {
  background: #fee2e2;
  color: #991b1b;
}
.status-exception .status-dot { background: #ef4444; }

.status-held {
  background: #fef3c7;
  color: #92400e;
}

/* ==================== Landing Page ==================== */
.landing-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: white;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header .logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--dark);
}

.header .logo img {
  height: 36px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--text-light);
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

.admin-link {
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: white !important;
  border-radius: var(--radius);
}

.admin-link:hover {
  background: var(--primary-hover);
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
  gap: 4rem;
}

.hero-content {
  flex: 1;
  max-width: 560px;
}

.hero-content h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-content > p {
  color: var(--text-light);
  font-size: 1.125rem;
  margin-bottom: 2rem;
}

.track-form .input-group {
  display: flex;
  gap: 0.5rem;
}

.track-form input {
  flex: 1;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.track-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.track-form button {
  padding: 1rem 1.5rem;
  background: var(--primary);
  color: white;
  font-weight: 600;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.2s;
}

.track-form button:hover {
  background: var(--primary-hover);
}

.example-codes {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--text-light);
}

.example-codes code {
  padding: 0.25rem 0.5rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: monospace;
  cursor: pointer;
  transition: all 0.2s;
}

.example-codes code:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.hero-visual {
  position: relative;
  width: 400px;
  height: 400px;
}

.floating-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: float 3s ease-in-out infinite;
}

.floating-card .icon {
  font-size: 1.5rem;
}

.floating-card .info {
  display: flex;
  flex-direction: column;
}

.floating-card .label {
  font-weight: 600;
  font-size: 0.875rem;
}

.floating-card .time {
  font-size: 0.75rem;
  color: var(--text-light);
}

.card-1 {
  top: 20%;
  left: 0;
  animation-delay: 0s;
}

.card-2 {
  top: 45%;
  right: 0;
  animation-delay: -1s;
}

.card-3 {
  bottom: 20%;
  left: 10%;
  animation-delay: -2s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Features Section */
.features {
  padding: 4rem 2rem;
  background: white;
}

.features h2 {
  text-align: center;
  margin-bottom: 3rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.feature-card {
  padding: 2rem;
  text-align: center;
  border-radius: var(--radius-lg);
  background: var(--light);
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--text-light);
  font-size: 0.875rem;
}

/* Footer */
.footer {
  background: var(--dark);
  color: white;
  padding: 4rem 2rem 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-brand .logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-brand p {
  color: #94a3b8;
  max-width: 300px;
}

.footer-links h4,
.footer-contact h4 {
  color: white;
  margin-bottom: 1rem;
}

.footer-links a {
  display: block;
  color: #94a3b8;
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: white;
}

.footer-contact p {
  color: #94a3b8;
  margin-bottom: 0.5rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid #334155;
  color: #94a3b8;
}

/* ==================== Tracking Page ==================== */
.tracking-page {
  min-height: 100vh;
  background: var(--light);
}

.tracking-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.track-search {
  margin-bottom: 2rem;
}

.search-box {
  display: flex;
  max-width: 500px;
  margin: 0 auto;
}

.search-box input {
  flex: 1;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  border: 2px solid var(--border);
  border-right: none;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  background: white;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
}

.search-box button {
  padding: 1rem 1.5rem;
  background: var(--primary);
  color: white;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.search-box button:hover {
  background: var(--primary-hover);
}

/* Loading State */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem;
  color: var(--text-light);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Error State */
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem;
  text-align: center;
}

.error-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.error-state h3 {
  margin-bottom: 0.5rem;
}

.error-state p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

/* Shipment Details */
.shipment-details {
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.tracking-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.tracking-info h1 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.tracking-info .tracking-code {
  font-family: monospace;
  font-size: 1.25rem;
  color: var(--primary);
  background: #eff6ff;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
}

.status-badge {
  font-size: 0.875rem;
}

.eta-info {
  display: flex;
  gap: 1rem;
}

.eta-card {
  padding: 1rem 1.5rem;
  background: white;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.eta-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-light);
  margin-bottom: 0.25rem;
}

.eta-date {
  font-weight: 600;
  color: var(--dark);
}

.eta-date.held {
  color: var(--warning);
}

/* Details Grid */
.details-grid {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 2rem;
  margin-bottom: 2rem;
}

/* Timeline */
.timeline-section h2 {
  margin-bottom: 1.5rem;
}

.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 1.5rem;
}

.timeline-marker {
  position: absolute;
  left: -2rem;
  width: 16px;
  height: 16px;
  background: white;
  border: 2px solid var(--border);
  border-radius: 50%;
  z-index: 1;
}

.timeline-item.current .timeline-marker {
  border-color: var(--primary);
  background: var(--primary);
}

.timeline-content {
  padding-left: 0.5rem;
}

.timeline-status {
  font-weight: 600;
  display: block;
  margin-bottom: 0.25rem;
}

.timeline-location {
  font-size: 0.875rem;
  color: var(--text-light);
  display: block;
  margin-bottom: 0.25rem;
}

.timeline-description {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 0.25rem;
}

.timeline-time {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* Info Sidebar */
.info-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.info-card {
  padding: 1.25rem;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.info-card h3 {
  font-size: 0.875rem;
  margin-bottom: 1rem;
  color: var(--text-light);
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

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

.info-row .label {
  font-size: 0.875rem;
  color: var(--text-light);
}

.info-row span:last-child {
  font-weight: 500;
}

/* Map Section */
.map-section h2 {
  margin-bottom: 1rem;
}

.map-container {
  height: 400px;
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.map-placeholder {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  background: var(--light);
}

/* ==================== Admin Dashboard ==================== */
.admin-app {
  min-height: 100vh;
}

/* Login Screen */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  padding: 1rem;
}

.login-container {
  width: 100%;
  max-width: 400px;
  background: white;
  padding: 2.5rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-header .logo {
  justify-content: center;
  margin-bottom: 1rem;
}

.login-header h1 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.login-header p {
  color: var(--text-light);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.error-message {
  padding: 0.75rem;
  background: #fef2f2;
  color: var(--danger);
  border-radius: var(--radius);
  font-size: 0.875rem;
}

.login-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-light);
}

/* Main App Layout */
.main-app {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: var(--dark);
  color: white;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid #334155;
}

.sidebar-header .logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.5rem;
  color: #94a3b8;
  transition: all 0.2s;
}

.nav-item:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.nav-item.active {
  color: white;
  background: var(--primary);
}

.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #334155;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
}

.user-details {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 500;
  font-size: 0.875rem;
}

.user-role {
  font-size: 0.75rem;
  color: #94a3b8;
}

.logout-btn {
  padding: 0.5rem;
  color: #94a3b8;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.logout-btn:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: 260px;
  padding: 2rem;
  background: var(--background);
}

/* Views */
.view {
  display: none;
}

.view.active {
  display: block;
  animation: fadeIn 0.2s ease-out;
}

.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  margin-bottom: 0.25rem;
}

.page-header p {
  color: var(--text-light);
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.stat-icon {
  font-size: 2rem;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--dark);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-light);
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.dashboard-card {
  padding: 1.5rem;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.dashboard-card h3 {
  margin-bottom: 1rem;
  font-size: 1rem;
}

.status-chart {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.status-item .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-item .status-dot.pending { background: #f59e0b; }
.status-item .status-dot.picked_up { background: #3b82f6; }
.status-item .status-dot.in_transit { background: #6366f1; }
.status-item .status-dot.out_for_delivery { background: #10b981; }
.status-item .status-dot.delivered { background: #22c55e; }
.status-item .status-dot.exception { background: #ef4444; }

.status-name {
  flex: 1;
  font-size: 0.875rem;
}

.status-count {
  font-weight: 600;
}

.alert-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.alert-item {
  text-align: center;
  padding: 1rem;
  border-radius: var(--radius);
}

.alert-item.exception { background: #fef2f2; }
.alert-item.held { background: #fef3c7; }
.alert-item.today { background: #dbeafe; }

.alert-count {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
}

.alert-label {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* Recent Shipments */
.recent-shipments h3 {
  margin-bottom: 1rem;
}

/* Table */
.table-container {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  background: var(--light);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-light);
}

.data-table tbody tr:hover {
  background: var(--light);
}

.tracking-code {
  font-family: monospace;
  font-size: 0.875rem;
  background: #eff6ff;
  color: var(--primary);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
}

.action-buttons {
  display: flex;
  gap: 0.25rem;
}

/* Filters Bar */
.filters-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.filters-bar .search-box {
  flex: 1;
  display: flex;
  max-width: none;
}

.filters-bar .search-box input {
  flex: 1;
  border-right: 1px solid var(--border);
  border-radius: var(--radius) 0 0 var(--radius);
}

.filters-bar .search-btn {
  padding: 0.625rem 1rem;
  background: white;
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.filter-select {
  padding: 0.625rem 1rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 150px;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.pagination button {
  padding: 0.5rem 1rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s;
}

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

.pagination span {
  font-size: 0.875rem;
  color: var(--text-light);
}

/* Create Form */
.shipment-form {
  background: white;
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.form-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.form-section:last-of-type {
  border-bottom: none;
}

.form-section h3 {
  margin-bottom: 1.5rem;
}

.form-section h4 {
  margin-bottom: 1rem;
  color: var(--text-light);
}

.form-actions {
  display: flex;
  gap: 1rem;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modal-content {
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  background: white;
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

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

.modal-header h2 {
  font-size: 1.25rem;
}

.modal-close {
  font-size: 1.5rem;
  color: var(--text-light);
  padding: 0.5rem;
}

.modal-close:hover {
  color: var(--text);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
}

.detail-section {
  margin-bottom: 1.5rem;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.detail-header h3 {
  margin-bottom: 0.25rem;
}

.detail-header .status-badge {
  margin-top: 0.5rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.detail-card {
  padding: 1rem;
  background: var(--light);
  border-radius: var(--radius);
}

.detail-card h4 {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.detail-card p {
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.status-update-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.status-update-form select,
.status-update-form input {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.status-update-form input[type="text"] {
  flex: 1;
  min-width: 150px;
}

.history-list {
  position: relative;
  padding-left: 1.5rem;
}

.history-list::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.history-item {
  position: relative;
  padding-bottom: 1rem;
}

.history-marker {
  position: absolute;
  left: -1.5rem;
  width: 12px;
  height: 12px;
  background: var(--primary);
  border-radius: 50%;
}

.history-content {
  padding-left: 0.5rem;
}

.history-status {
  font-weight: 600;
  display: block;
  margin-bottom: 0.25rem;
}

.history-location {
  font-size: 0.875rem;
  color: var(--text-light);
  display: block;
  margin-bottom: 0.25rem;
}

.history-content p {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 0.25rem;
}

.history-time {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* Responsive */
@media (max-width: 1024px) {
  .hero {
    flex-direction: column;
    text-align: center;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-visual {
    display: none;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .details-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
  }

  .hero {
    padding: 2rem 1rem;
  }

  .hero-content h1 {
    font-size: 1.75rem;
  }

  .hero-content > p {
    font-size: 1rem;
  }

  .track-form .input-group {
    flex-direction: column;
  }

  .track-form input {
    border-radius: var(--radius-lg);
    border-right: 2px solid var(--border);
  }

  .track-form button {
    border-radius: var(--radius-lg);
  }

  .features {
    padding: 2rem 1rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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

  .form-grid .full-width {
    grid-column: span 1;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    padding: 1rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .tracking-header {
    flex-direction: column;
    gap: 1rem;
  }

  .details-grid {
    grid-template-columns: 1fr;
  }

  .tracking-content {
    padding: 1rem;
  }

  .search-box {
    flex-direction: column;
  }

  .search-box input {
    border-radius: var(--radius-lg);
    border: 2px solid var(--border);
  }

  .search-box button {
    border-radius: var(--radius-lg);
  }

  .page-header h1 {
    font-size: 1.5rem;
  }

  .filters-bar {
    flex-direction: column;
  }

  .alert-summary {
    grid-template-columns: 1fr;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .status-update-form {
    flex-direction: column;
  }

  .status-update-form select,
  .status-update-form input {
    width: 100%;
  }

  .login-container {
    padding: 1.5rem;
    margin: 1rem;
  }

  .data-table {
    font-size: 0.75rem;
  }

  .data-table th,
  .data-table td {
    padding: 0.5rem;
  }
}