:root {
  /* Color Palette (Modern Dark Mode / Glass) */
  --bg-color: #0f172a;
  --surface-color: rgba(30, 41, 59, 0.7);
  --surface-border: rgba(255, 255, 255, 0.1);
  --primary-color: #6366f1;
  --primary-hover: #4f46e5;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-color: #10b981; /* Success / Tipping accent */
  --danger-color: #ef4444;
  
  --font-family: 'Inter', sans-serif;
  --border-radius-sm: 8px;
  --border-radius: 16px;
  --border-radius-lg: 24px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  /* subtle animated background gradient */
  background: radial-gradient(circle at top right, #1e1b4b, #0f172a 40%);
  background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
}

/* Typography Utils */
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent-color); }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-10 { margin-top: 2.5rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.max-w-sm { max-width: 24rem; width: 100%; }
.max-w-md { max-width: 28rem; width: 100%; }
.mx-auto { margin-left: auto; margin-right: auto; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* Structural */
.container {
  padding: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

.landing-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
}

.logo-text {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #818cf8, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Glassmorphism Cards */
.glass-card {
  background: var(--surface-color);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--surface-border);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  transition: var(--transition);
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 1.25rem;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

.input-field {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius-sm);
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--surface-border);
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 1rem;
  transition: var(--transition);
  outline: none;
}

.input-field:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 1rem;
  font-family: var(--font-family);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  outline: none;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.97);
}

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

.btn-primary {
  background-color: var(--primary-color);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--surface-border);
  color: var(--text-main);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
}

.btn-accent {
  background-color: var(--accent-color);
  color: #000;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-accent:hover {
  background-color: #059669;
}

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

.animate-fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}

/* Utility layout */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }

/* Loader */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
  display: inline-block;
}

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

/* Driver / Deliveries specific */
.metric-card {
  background: rgba(255,255,255,0.03);
  padding: 1rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--surface-border);
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-color);
}

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--surface-border);
}

.list-item:last-child {
  border-bottom: none;
}
