/* CARSYOK Car Sales System - Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --primary: #E30613;
  --primary-hover: #C00510;
  --primary-light: #FEE2E2;
  --bg: #FFFFFF;
  --bg-secondary: #F8FAFC;
  --text: #0F172A;
  --text-muted: #64748B;
  --border: #E2E8F0;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --radius: 12px;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg-secondary);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }

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

/* Header */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 70px;
}
.logo { display: flex; align-items: center; gap: 0.75rem; font-weight: 700; font-size: 1.25rem; color: var(--text); }
.logo img { height: 40px; width: auto; }
.logo span { color: var(--primary); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.65rem 1.4rem; border-radius: 8px; font-weight: 600; font-size: 0.95rem;
  border: none; cursor: pointer; transition: all 0.2s;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); color: white; }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-lg { padding: 0.9rem 1.8rem; font-size: 1.05rem; }
.btn-block { width: 100%; padding: 0.85rem; font-size: 1rem; }

/* Hero */
.hero {
  background: linear-gradient(135deg, #fff 0%, #FEE2E2 100%);
  padding: 4rem 0 5rem;
  text-align: center;
}
.hero-logo { height: 80px; margin-bottom: 1.5rem; }
.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  font-weight: 700; line-height: 1.2; margin-bottom: 1rem;
}
.hero h1 span { color: var(--primary); }
.hero p {
  font-size: 1.15rem; color: var(--text-muted); max-width: 600px;
  margin: 0 auto 2rem;
}
.hero-ctas { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Features */
.features { padding: 4rem 0; background: var(--bg); }
.section-title { text-align: center; font-size: 1.75rem; font-weight: 700; margin-bottom: 0.5rem; }
.section-sub { text-align: center; color: var(--text-muted); margin-bottom: 2.5rem; }
.features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem;
}
.feature-card {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.75rem; transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature-icon {
  width: 48px; height: 48px; background: var(--primary-light); color: var(--primary);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin-bottom: 1rem; font-weight: 700;
}
.feature-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.feature-card p { font-size: 0.95rem; color: var(--text-muted); }

/* How it works */
.how { padding: 4rem 0; background: var(--bg-secondary); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; }
.step { text-align: center; position: relative; }
.step-num {
  width: 48px; height: 48px; background: var(--primary); color: white;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.2rem; margin: 0 auto 1rem;
}
.step h3 { margin-bottom: 0.4rem; }
.step p { color: var(--text-muted); font-size: 0.95rem; }

/* CTA band */
.cta-band {
  background: var(--primary); color: white; text-align: center; padding: 3.5rem 0;
}
.cta-band h2 { font-size: 1.75rem; margin-bottom: 0.75rem; }
.cta-band p { opacity: 0.9; margin-bottom: 1.5rem; }
.cta-band .btn { background: white; color: var(--primary); }
.cta-band .btn:hover { background: #f1f1f1; color: var(--primary); }

/* Footer */
.site-footer {
  background: #0F172A; color: #94A3B8; text-align: center; padding: 2rem 0; font-size: 0.9rem;
}
.site-footer strong { color: white; }

/* ========== AUTH PAGES ========== */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #fff 0%, #FEE2E2 60%, #fff 100%);
  padding: 2rem 1rem;
}
.auth-card {
  background: white; border-radius: 16px; box-shadow: 0 20px 40px -10px rgb(0 0 0 / 0.12);
  width: 100%; max-width: 420px; padding: 2.5rem 2rem;
}
.auth-logo { text-align: center; margin-bottom: 1.5rem; }
.auth-logo img { height: 56px; }
.auth-card h1 { text-align: center; font-size: 1.5rem; margin-bottom: 0.35rem; }
.auth-card .subtitle { text-align: center; color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1.75rem; }

.form-group { margin-bottom: 1.15rem; }
.form-group label { display: block; font-weight: 500; font-size: 0.9rem; margin-bottom: 0.35rem; }
.form-control {
  width: 100%; padding: 0.75rem 1rem; border: 1px solid var(--border);
  border-radius: 8px; font-size: 1rem; font-family: inherit; transition: border 0.2s;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }

.auth-footer { text-align: center; margin-top: 1.5rem; font-size: 0.9rem; color: var(--text-muted); }
.alert {
  padding: 0.75rem 1rem; border-radius: 8px; margin-bottom: 1.25rem; font-size: 0.9rem;
}
.alert-error { background: #FEF2F2; color: #B91C1C; border: 1px solid #FECACA; }
.alert-success { background: #ECFDF5; color: #047857; border: 1px solid #A7F3D0; }

/* ========== DASHBOARD ========== */
.dashboard-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 250px; background: #0F172A; color: #CBD5E1; padding: 1.5rem 0; flex-shrink: 0;
}
.sidebar .logo { padding: 0 1.25rem 1.5rem; color: white; border-bottom: 1px solid #1E293B; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.sidebar .logo img { height: 32px; }
.sidebar nav a {
  display: block; padding: 0.7rem 1.25rem; color: #94A3B8; font-weight: 500;
  transition: all 0.15s;
}
.sidebar nav a:hover, .sidebar nav a.active { background: #1E293B; color: white; border-left: 3px solid var(--primary); }
.main-content { flex: 1; padding: 1.5rem; background: var(--bg-secondary); }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card {
  background: white; border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow);
  border-left: 4px solid var(--primary);
}
.stat-card .label { font-size: 0.85rem; color: var(--text-muted); }
.stat-card .value { font-size: 1.6rem; font-weight: 700; margin-top: 0.25rem; }

.card { background: white; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; margin-bottom: 1.5rem; }
.card h2 { font-size: 1.15rem; margin-bottom: 1rem; }

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { padding: 0.75rem; text-align: left; border-bottom: 1px solid var(--border); }
th { font-weight: 600; color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase; }
.badge {
  display: inline-block; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600;
}
.badge-lead { background: #E0E7FF; color: #3730A3; }
.badge-contacted { background: #DBEAFE; color: #1E40AF; }
.badge-bank_submitted { background: #FEF3C7; color: #92400E; }
.badge-approved { background: #D1FAE5; color: #065F46; }
.badge-chassis_ready { background: #CFFAFE; color: #155E75; }
.badge-delivered { background: #DCFCE7; color: #166534; }
.badge-cancelled { background: #FEE2E2; color: #991B1B; }

@media (max-width: 768px) {
  .sidebar { display: none; }
  .hero { padding: 3rem 0; }
  .auth-card { padding: 2rem 1.5rem; }
}
