/* Conquer Freight v6 — shared styles for new pages (login, driver, settings, overlay) */
:root {
  --cf-bg: #0f172a;
  --cf-surface: #1e293b;
  --cf-surface-2: #243149;
  --cf-text: #f1f5f9;
  --cf-text-dim: #94a3b8;
  --cf-border: #334155;
  --cf-accent: #2563eb;
  --cf-accent-hover: #1d4ed8;
  --cf-success: #10b981;
  --cf-danger: #ef4444;
  --cf-warn: #f59e0b;
  --cf-radius: 12px;
  --cf-shadow: 0 8px 24px rgba(0,0,0,0.35);
  --cf-font: 'Inter','SF Pro Text',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--cf-bg); color: var(--cf-text);
  font-family: var(--cf-font); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--cf-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.cf-page {
  min-height: 100vh;
  display: flex; flex-direction: column;
}
.cf-center { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.cf-card {
  background: var(--cf-surface);
  border: 1px solid var(--cf-border);
  border-radius: var(--cf-radius);
  box-shadow: var(--cf-shadow);
  padding: 32px;
  width: 100%; max-width: 440px;
}
.cf-card h1, .cf-card h2 { margin-top: 0; }
.cf-logo {
  display: flex; align-items: center; gap: 12px; margin-bottom: 8px;
  font-size: 22px; font-weight: 700; letter-spacing: -0.02em;
}
.cf-logo-mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px; color: white;
}
.cf-subtitle { color: var(--cf-text-dim); margin: 0 0 24px 0; font-size: 14px; }

.cf-field { margin-bottom: 14px; }
.cf-field label { display: block; font-size: 13px; color: var(--cf-text-dim); margin-bottom: 6px; font-weight: 500; }
.cf-input, .cf-select, .cf-textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--cf-bg);
  color: var(--cf-text);
  border: 1px solid var(--cf-border);
  border-radius: 8px;
  font-family: inherit; font-size: 15px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.cf-input:focus, .cf-select:focus, .cf-textarea:focus {
  outline: none;
  border-color: var(--cf-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}
.cf-input[type=file] { padding: 8px; }
.cf-textarea { resize: vertical; min-height: 72px; }

.cf-btn {
  display: inline-block;
  padding: 10px 20px;
  background: var(--cf-accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-family: inherit; font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}
.cf-btn:hover { background: var(--cf-accent-hover); }
.cf-btn:active { transform: translateY(1px); }
.cf-btn:disabled { background: #475569; cursor: not-allowed; }
.cf-btn-block { display: block; width: 100%; }
.cf-btn-ghost { background: transparent; color: var(--cf-text-dim); border: 1px solid var(--cf-border); }
.cf-btn-ghost:hover { background: var(--cf-surface-2); color: var(--cf-text); }
.cf-btn-success { background: var(--cf-success); }
.cf-btn-success:hover { background: #059669; }
.cf-btn-danger { background: var(--cf-danger); }
.cf-btn-danger:hover { background: #dc2626; }

.cf-alert {
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  border-left: 4px solid;
}
.cf-alert-error   { background: rgba(239, 68, 68, 0.12); border-color: var(--cf-danger);  color: #fca5a5; }
.cf-alert-success { background: rgba(16, 185, 129, 0.12); border-color: var(--cf-success); color: #6ee7b7; }
.cf-alert-info    { background: rgba(37, 99, 235, 0.12); border-color: var(--cf-accent);   color: #93c5fd; }
.cf-alert-warn    { background: rgba(245, 158, 11, 0.12); border-color: var(--cf-warn);    color: #fcd34d; }

.cf-row { display: flex; gap: 10px; align-items: center; }
.cf-row > * { flex: 1; }
.cf-mt-8  { margin-top: 8px;  }
.cf-mt-16 { margin-top: 16px; }
.cf-mt-24 { margin-top: 24px; }
.cf-mb-8  { margin-bottom: 8px; }
.cf-text-dim { color: var(--cf-text-dim); }
.cf-text-center { text-align: center; }
.cf-small { font-size: 13px; }

.cf-hr { border: none; border-top: 1px solid var(--cf-border); margin: 24px 0; }

/* Cards / lists */
.cf-list { display: flex; flex-direction: column; gap: 12px; }
.cf-tile {
  background: var(--cf-surface);
  border: 1px solid var(--cf-border);
  border-radius: var(--cf-radius);
  padding: 16px;
}
.cf-tile-title { font-weight: 600; margin-bottom: 4px; }
.cf-tile-meta { color: var(--cf-text-dim); font-size: 13px; }

.cf-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--cf-surface-2);
  color: var(--cf-text-dim);
}
.cf-pill-pending  { background: rgba(245, 158, 11, 0.18); color: #fcd34d; }
.cf-pill-accepted { background: rgba(16, 185, 129, 0.18); color: #6ee7b7; }
.cf-pill-rejected { background: rgba(239, 68, 68, 0.18); color: #fca5a5; }
.cf-pill-recalled { background: rgba(148, 163, 184, 0.20); color: #cbd5e1; }

/* App bar (driver portal) */
.cf-appbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  background: var(--cf-surface);
  border-bottom: 1px solid var(--cf-border);
  position: sticky; top: 0; z-index: 10;
}
.cf-appbar-title { font-weight: 700; font-size: 18px; }
.cf-appbar-user { font-size: 13px; color: var(--cf-text-dim); }

.cf-tabs { display: flex; gap: 6px; padding: 12px 18px; background: var(--cf-surface); border-bottom: 1px solid var(--cf-border); overflow-x: auto; }
.cf-tab {
  padding: 8px 14px; border-radius: 999px;
  background: transparent; color: var(--cf-text-dim);
  font-size: 13px; font-weight: 500; cursor: pointer;
  border: 1px solid var(--cf-border);
  white-space: nowrap;
}
.cf-tab.active { background: var(--cf-accent); color: white; border-color: var(--cf-accent); }

.cf-content { padding: 16px; max-width: 720px; margin: 0 auto; width: 100%; }
.cf-empty {
  text-align: center; color: var(--cf-text-dim);
  padding: 60px 16px;
}

.cf-spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: cf-spin 0.7s linear infinite;
  vertical-align: middle;
}
@keyframes cf-spin { to { transform: rotate(360deg); } }

/* Persistent dispatcher banner */
.cf-toast-stack {
  position: fixed; right: 16px; top: 16px;
  display: flex; flex-direction: column; gap: 10px;
  z-index: 9999;
  max-width: 360px;
}
.cf-toast {
  background: var(--cf-surface);
  border: 1px solid var(--cf-border);
  border-radius: 10px;
  box-shadow: var(--cf-shadow);
  padding: 12px 14px;
  font-size: 14px;
  color: var(--cf-text);
  border-left: 4px solid var(--cf-warn);
}
.cf-toast-persistent { border-left-color: var(--cf-danger); animation: cf-pulse 2s ease-in-out infinite; }
.cf-toast-success    { border-left-color: var(--cf-success); }
.cf-toast .x { float: right; cursor: pointer; color: var(--cf-text-dim); margin-left: 8px; }
.cf-toast .x:hover { color: var(--cf-text); }
@keyframes cf-pulse { 0%,100% { box-shadow: 0 8px 24px rgba(239,68,68,0.0);} 50% { box-shadow: 0 8px 24px rgba(239,68,68,0.4);} }

@media (max-width: 480px) {
  .cf-card { padding: 22px; border-radius: 10px; }
  .cf-content { padding: 12px; }
}
