/* AutoCare CMS — Main Stylesheet */
:root {
  --primary: #f97316;
  --primary-dark: #ea6c0a;
  --dark: #0f172a;
  --dark2: #1e293b;
  --dark3: #334155;
  --mid: #475569;
  --light: #94a3b8;
  --lighter: #cbd5e1;
  --white: #f8fafc;
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
  --radius: 10px;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.15);
}

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

body {
  font-family: 'Inter', sans-serif;
  background: #f1f5f9;
  color: #1e293b;
  line-height: 1.6;
}

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

img { max-width: 100%; height: auto; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ── Header ── */
.site-header {
  background: var(--dark);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.header-inner {
  display: flex; align-items: center; gap: 24px;
  padding-top: 14px; padding-bottom: 14px;
}
.logo { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 1.2rem; }
.logo-icon { font-size: 1.4rem; }
.logo-text { color: var(--white); }
.main-nav { display: flex; align-items: center; gap: 6px; flex: 1; }
.nav-link { color: var(--lighter); font-size: 0.9rem; padding: 6px 10px; border-radius: 6px; transition: all 0.2s; }
.nav-link:hover, .nav-link.active { color: #fff; background: rgba(255,255,255,0.08); }
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.hamburger span { display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px; transition: 0.3s; }

/* Language switcher */
.lang-switcher { display: flex; gap: 2px; background: rgba(255,255,255,0.08); border-radius: 6px; padding: 2px; }
.lang-btn { font-size: 0.72rem; font-weight: 700; color: var(--light); padding: 4px 8px; border-radius: 4px; transition: 0.2s; }
.lang-btn.active, .lang-btn:hover { background: var(--primary); color: #fff; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border-radius: var(--radius);
  font-weight: 600; font-size: 0.9rem; cursor: pointer;
  border: 2px solid transparent; transition: all 0.2s; text-align: center;
}
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-dark { background: var(--dark); color: #fff; border-color: var(--dark); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-sm { padding: 6px 14px; font-size: 0.82rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }

/* ── Flash messages ── */
.flash {
  padding: 12px 18px; border-radius: var(--radius); margin: 16px 0;
  font-size: 0.9rem; font-weight: 500;
}
.flash-success { background: #dcfce7; color: #166534; border-left: 4px solid var(--success); }
.flash-error { background: #fee2e2; color: #991b1b; border-left: 4px solid var(--danger); }
.flash-info { background: #dbeafe; color: #1e40af; border-left: 4px solid var(--info); }

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, var(--dark) 0%, #1a2744 100%);
  color: #fff; padding: 80px 0;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 70% 50%, rgba(249,115,22,0.15) 0%, transparent 60%);
}
.hero .container { position: relative; }
.hero-badge { display: inline-block; background: rgba(249,115,22,0.2); color: var(--primary); border: 1px solid rgba(249,115,22,0.4); padding: 4px 14px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; margin-bottom: 16px; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 800; line-height: 1.2; margin-bottom: 16px; }
.hero p { font-size: 1.1rem; color: var(--lighter); max-width: 500px; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Section ── */
.section { padding: 70px 0; }
.section-alt { background: #fff; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; color: var(--dark); }
.section-header p { color: var(--mid); margin-top: 8px; font-size: 1rem; }
.section-tag { display: inline-block; color: var(--primary); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 8px; }

/* ── Cards ── */
.card {
  background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: var(--shadow); transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-img { width: 100%; height: 200px; object-fit: cover; background: var(--dark3); display: flex; align-items: center; justify-content: center; color: var(--light); font-size: 3rem; }
.card-body { padding: 20px; }
.card-title { font-weight: 700; font-size: 1rem; color: var(--dark); margin-bottom: 6px; }
.card-text { color: var(--mid); font-size: 0.88rem; line-height: 1.5; }
.card-badge { display: inline-block; background: var(--primary); color: #fff; padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; margin-top: 10px; }

/* ── Promo grid ── */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 24px; }

/* ── Forms ── */
.form-card { background: #fff; border-radius: 16px; padding: 36px; box-shadow: var(--shadow); max-width: 520px; margin: 0 auto; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--dark); margin-bottom: 6px; }
.form-control {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--lighter);
  border-radius: 8px; font-size: 0.9rem; color: var(--dark);
  background: #fff; transition: border-color 0.2s;
  font-family: inherit;
}
.form-control:focus { outline: none; border-color: var(--primary); }
textarea.form-control { min-height: 120px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-hint { font-size: 0.78rem; color: var(--light); margin-top: 4px; }
.form-divider { text-align: center; color: var(--light); font-size: 0.85rem; margin: 16px 0; position: relative; }
.form-divider::before { content: ''; position: absolute; left: 0; top: 50%; width: 42%; height: 1px; background: var(--lighter); }
.form-divider::after { content: ''; position: absolute; right: 0; top: 50%; width: 42%; height: 1px; background: var(--lighter); }
.google-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 10px; border: 1.5px solid var(--lighter); border-radius: 8px; background: #fff; cursor: pointer; font-size: 0.9rem; font-weight: 600; color: var(--dark); transition: all 0.2s; }
.google-btn:hover { border-color: var(--primary); background: #fff8f5; }
.google-btn img { width: 20px; }

/* ── Dashboard ── */
.dashboard { display: grid; grid-template-columns: 240px 1fr; gap: 28px; padding: 32px 0; }
.dash-sidebar { background: var(--dark); border-radius: 14px; padding: 24px; color: #fff; height: fit-content; }
.dash-sidebar .user-avatar { width: 60px; height: 60px; border-radius: 50%; background: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 800; margin-bottom: 12px; }
.dash-sidebar h3 { font-size: 1rem; margin-bottom: 4px; }
.dash-sidebar p { color: var(--light); font-size: 0.82rem; margin-bottom: 20px; }
.dash-nav a { display: flex; align-items: center; gap: 8px; padding: 9px 12px; color: var(--lighter); border-radius: 8px; font-size: 0.88rem; margin-bottom: 4px; transition: 0.2s; }
.dash-nav a:hover, .dash-nav a.active { background: rgba(255,255,255,0.1); color: #fff; }
.dash-content { background: #fff; border-radius: 14px; padding: 28px; box-shadow: var(--shadow); }

/* ── Tables ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th { text-align: left; padding: 10px 14px; background: #f8fafc; color: var(--mid); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--lighter); }
td { padding: 12px 14px; border-bottom: 1px solid #f1f5f9; color: var(--dark); vertical-align: middle; }
tr:hover td { background: #f8fafc; }

/* ── Status badges ── */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-confirmed { background: #dbeafe; color: #1e40af; }
.badge-in_progress { background: #ede9fe; color: #5b21b6; }
.badge-completed { background: #dcfce7; color: #166534; }
.badge-cancelled { background: #fee2e2; color: #991b1b; }

/* ── Footer ── */
.site-footer { background: var(--dark); color: var(--light); padding: 40px 0 24px; margin-top: 60px; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.footer-brand { display: flex; align-items: center; gap: 8px; color: #fff; font-size: 1.1rem; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: var(--light); font-size: 0.88rem; }
.footer-links a:hover { color: var(--primary); }
.footer-copy { font-size: 0.8rem; color: var(--mid); }

/* ── Page content ── */
.page-content { max-width: 800px; margin: 40px auto; background: #fff; border-radius: 14px; padding: 40px; box-shadow: var(--shadow); }
.page-content h1 { font-size: 1.8rem; margin-bottom: 20px; color: var(--dark); }
.page-content p { margin-bottom: 14px; line-height: 1.8; color: var(--mid); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .main-nav { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--dark2); padding: 16px; gap: 4px; }
  .main-nav.open { display: flex; }
  .header-inner { flex-wrap: wrap; position: relative; }
  .header-actions { order: 3; width: 100%; padding-bottom: 8px; }
  .hamburger { display: flex; }
  .dashboard { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero { padding: 50px 0; }
}
