:root {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --text: #1f2937;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  
  /* Modern Vibrant Colors */
  --accent: #6366f1; /* Indigo */
  --accent-hover: #4f46e5;
  --accent-light: #e0e7ff;
  
  /* Sidebar Colors */
  --sidebar-bg: #111827; /* Dark Gray / Black */
  --sidebar-text: #9ca3af;
  --sidebar-hover: #1f2937;
  --sidebar-active: #6366f1;
  
  --radius: 12px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  
  /* Status Colors */
  --success: #10b981;
  --success-bg: #d1fae5;
  --warning: #f59e0b;
  --warning-bg: #fef3c7;
  --error: #ef4444;
  --error-bg: #fee2e2;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  background-attachment: fixed;
  color: var(--text);
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

.container {
  padding: 1.5rem;
  max-width: 100%;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .container {
    max-width: 1000px;
    padding: 2.5rem;
  }
}
@media (min-width: 1200px) {
  .container:has(.dashboard-layout) {
    max-width: 1200px;
  }
}

h1, h2, h3 { 
  font-weight: 700; 
  margin-top: 0; 
  color: #111827; 
  letter-spacing: -0.025em; 
}
h1 { font-size: 1.75rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }

.site-header {
  padding: 1.25rem 0;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.public-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
.nav-link {
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.15s;
}
.nav-link:hover, .nav-link.active {
  color: var(--accent);
}
.site-title {
  margin: 0;
  font-size: 1.5rem;
  background: linear-gradient(to right, var(--accent), #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

/* Cards */
.card {
  background: var(--surface);
  border: none;
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  box-shadow: var(--shadow-lg);
}
.card-header {
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.1rem;
  color: #111827;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
}
.card-header:empty { display: none; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  min-height: 44px;
  text-decoration: none;
  transition: all 0.2s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #4338ca 100%);
  color: white;
  box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.4);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 8px -1px rgba(99, 102, 241, 0.5);
}
.btn-secondary {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}
.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.4);
}
.btn-success:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 8px -1px rgba(16, 185, 129, 0.5);
}
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn-group {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: #374151;
}
.form-input, .form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  min-height: 44px;
  background: #f9fafb;
  transition: all 0.2s ease;
}
.form-input:focus, .form-select:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-light);
}

@media (min-width: 768px) {
  .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }
}

/* File Selection Rows */
.file-row {
  display: flex;
  align-items: center;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
  background: var(--surface);
  transition: background 0.15s;
}
.file-row:hover {
  background: #f9fafb;
}
.file-row:last-child { border-bottom: none; }
.file-row--muted { opacity: 0.6; background: #f3f4f6; }
.file-row label {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}
.file-name { font-weight: 500; color: #111827; }
.file-size { color: var(--text-muted); font-size: 0.85rem; }

input[type='checkbox'] {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--accent);
  cursor: pointer;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-success { background: var(--success-bg); color: #047857; }
.badge-warning { background: var(--warning-bg); color: #b45309; }
.badge-info { background: var(--accent-light); color: var(--accent-hover); }

/* Alerts & Counters */
.counter { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 1.25rem; }
.counter strong { color: var(--accent); font-weight: 700; font-size: 1.1rem; }

.alert {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 1.25rem;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}
.alert-success { background: var(--success-bg); color: #047857; border-left: 4px solid var(--success); }
.alert-error { background: var(--error-bg); color: #b91c1c; border-left: 4px solid var(--error); }

/* Table */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  background: var(--surface);
  border: 1px solid var(--border);
}
table.table {
  width: 100%;
  border-collapse: collapse;
}
.table th {
  text-align: left;
  padding: 1rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #f9fafb;
  border-bottom: 1px solid var(--border);
}
.table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  color: #374151;
  font-weight: 500;
}
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #f9fafb; }
.table a { color: var(--accent); font-weight: 600; text-decoration: none; }
.table a:hover { color: var(--accent-hover); text-decoration: underline; }

/* Drop Zone */
.drop-zone {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #f8fafc;
}
.drop-zone:hover, .drop-zone--active {
  border-color: var(--accent);
  background: var(--accent-light);
}
.drop-zone p { margin: 0; color: #475569; font-weight: 500; font-size: 1.05rem; }
.drop-zone .drop-icon { font-size: 2.5rem; margin-bottom: 1rem; color: var(--accent); }

/* Batch Info Grid */
.batch-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  background: #f9fafb;
  padding: 1.25rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.batch-info-label { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.25rem; font-weight: 600; }
.batch-info-value { font-weight: 700; font-size: 1.1rem; color: #111827; }

/* Dashboard Layout */
.dashboard-layout {
  display: flex;
  min-height: calc(100vh - 140px);
  gap: 2rem;
  margin-top: 1rem;
}
@media (max-width: 768px) { .dashboard-layout { flex-direction: column; } }

/* Modern Dark Sidebar */
.sidebar {
  width: 260px;
  background: var(--sidebar-bg);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
}
@media (max-width: 768px) { .sidebar { width: 100%; } }
.sidebar-nav { list-style: none; padding: 0; margin: 0; }
.sidebar-nav li { margin-bottom: 0.5rem; }
.sidebar-nav a {
  display: block;
  padding: 0.875rem 1.25rem;
  border-radius: 8px;
  color: var(--sidebar-text);
  font-weight: 600;
  transition: all 0.2s ease;
}
.sidebar-nav a:hover {
  background: var(--sidebar-hover);
  color: white;
  transform: translateX(4px);
}
.sidebar-nav a.active {
  background: linear-gradient(135deg, var(--accent) 0%, #4338ca 100%);
  color: white;
  box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.3);
}
.main-content { flex: 1; min-width: 0; }

/* Stat Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: var(--surface);
  border: none;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 4px;
  background: linear-gradient(90deg, var(--accent), #a855f7);
}
.stat-title {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  font-weight: 700;
}
.stat-value { font-size: 2.25rem; font-weight: 800; color: #111827; line-height: 1.2; }

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.status-Pending { background: #f3f4f6; color: #4b5563; border: 1px solid #e5e7eb; }
.status-Processing { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.status-Shipped { background: #f5f3ff; color: #6d28d9; border: 1px solid #ede9fe; }
.status-Delivered { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }

.track-form-grid {
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  gap: 1rem;
  align-items: flex-end;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px dashed var(--border);
}
@media (max-width: 768px) { .track-form-grid { grid-template-columns: 1fr; } }

/* Address Card Enhancements */
.address-card {
  border-left-width: 4px;
  border-left-color: var(--accent);
}
.address-detail { font-size: 0.95rem; line-height: 1.7; color: #4b5563; }
.address-files { margin-top: 1rem; list-style: none; padding-left: 0; }
.address-files li { padding: 0.35rem 0; font-size: 0.9rem; font-weight: 500; color: #374151; display: flex; align-items: center; gap: 0.5rem; }

.confirmation { text-align: center; padding: 4rem 2rem; }
.confirmation .checkmark { font-size: 4rem; color: var(--success); margin-bottom: 1rem; }
.confirmation h2 { margin-bottom: 0.5rem; font-size: 2rem; }

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
  background: var(--surface);
  border-radius: var(--radius);
  border: 2px dashed var(--border);
  font-weight: 500;
}

.site-footer {
  margin-top: 3rem;
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Utilities */
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 1rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 2rem; }
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 768px) { .grid-2 { grid-template-columns: 1fr; } }
a { color: var(--accent); text-decoration: none; font-weight: 600; transition: color 0.15s; }
a:hover { color: var(--accent-hover); text-decoration: none; }
