/* ============================================================
   Shield & Serve — Global Styles
   ============================================================ */

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

:root {
  --navy: #0f1f3c;
  --navy-mid: #1a3260;
  --navy-light: #2a4a8a;
  --gold: #c8973a;
  --gold-light: #e8b85a;
  --gold-pale: #fdf6e8;
  --cream: #faf8f3;
  --white: #ffffff;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --green: #16a34a;
  --green-light: #dcfce7;
  --red: #dc2626;
  --red-light: #fee2e2;
  --blue: #2563eb;
  --blue-light: #dbeafe;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--cream);
  color: var(--slate-800);
  font-size: 15px;
  line-height: 1.6;
}

/* ── NAVIGATION ── */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(15,31,60,0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(200,151,58,0.15);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.nav-shield {
  width: 36px; height: 36px;
  background: var(--gold);
  clip-path: polygon(50% 0%,100% 20%,100% 70%,50% 100%,0% 70%,0% 20%);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800; color: var(--navy);
}
.nav-logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.nav-logo-text span { color: white; font-weight: 700; font-size: 15px; }
.nav-logo-text small { color: var(--gold); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-link {
  color: rgba(255,255,255,0.7); text-decoration: none; font-size: 14px;
  padding: 6px 12px; border-radius: 6px; transition: all 0.2s;
}
.nav-link:hover, .nav-link.active { color: var(--gold-light); background: rgba(255,255,255,0.06); }
.btn-nav-cta {
  background: var(--gold); color: var(--navy);
  padding: 8px 18px; border-radius: 6px; font-weight: 700; font-size: 13px;
  text-decoration: none; transition: background 0.2s;
}
.btn-nav-cta:hover { background: var(--gold-light); }
.btn-nav-signout {
  background: none; border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.6); padding: 7px 14px; border-radius: 6px;
  font-size: 13px; cursor: pointer; transition: all 0.2s;
}
.btn-nav-signout:hover { border-color: #ef4444; color: #f87171; }
.nav-hamburger {
  display: none; background: none; border: none;
  color: white; font-size: 22px; cursor: pointer;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 24px; border-radius: var(--radius); font-weight: 600; font-size: 14px;
  border: none; cursor: pointer; transition: all 0.2s; text-decoration: none;
  font-family: inherit;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover:not(:disabled) { background: var(--gold-light); transform: translateY(-1px); }
.btn-navy { background: var(--navy); color: white; }
.btn-navy:hover:not(:disabled) { background: var(--navy-mid); }
.btn-outline { background: transparent; border: 1.5px solid var(--slate-200); color: var(--slate-700); }
.btn-outline:hover:not(:disabled) { border-color: var(--gold); color: var(--navy); }
.btn-danger { background: var(--red-light); color: var(--red); border: 1px solid #fca5a5; }
.btn-danger:hover:not(:disabled) { background: #fecaca; }
.btn-full { width: 100%; }
.btn-lg { padding: 15px 32px; font-size: 15px; }
.btn-sm { padding: 8px 16px; font-size: 13px; }

/* ── FORMS ── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; font-size: 13px; font-weight: 600; color: var(--slate-700);
  margin-bottom: 6px;
}
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius); font-size: 14px; font-family: inherit;
  color: var(--slate-800); background: white; transition: border-color 0.2s;
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200,151,58,0.1);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--slate-400); }
.form-textarea { resize: vertical; min-height: 90px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-error { font-size: 12px; color: var(--red); margin-top: 5px; }

/* ── CARDS ── */
.card {
  background: white; border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg); padding: 24px;
  box-shadow: var(--shadow);
}
.card-sm { padding: 16px; border-radius: var(--radius); }

/* ── BADGES ── */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; text-transform: capitalize; letter-spacing: 0.03em;
}
.badge-yellow { background: #fef9c3; color: #854d0e; }
.badge-green { background: #dcfce7; color: #14532d; }
.badge-blue { background: #dbeafe; color: #1e3a8a; }
.badge-gray { background: var(--slate-100); color: var(--slate-600); }
.badge-red { background: #fee2e2; color: #7f1d1d; }
.badge-gold { background: var(--gold-pale); color: #78350f; }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  padding: 14px 20px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; max-width: 340px;
  transform: translateY(20px); opacity: 0;
  transition: all 0.3s ease; box-shadow: var(--shadow-lg);
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast-success { background: #dcfce7; color: #14532d; border: 1px solid #86efac; }
.toast-error { background: #fee2e2; color: #7f1d1d; border: 1px solid #fca5a5; }
.toast-info { background: #dbeafe; color: #1e3a8a; border: 1px solid #93c5fd; }

/* ── PAGE SHELL ── */
.page-wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.page-header { padding: 32px 0 24px; }
.page-header h1 { font-size: 28px; font-weight: 800; color: var(--navy); }
.page-header p { color: var(--slate-500); margin-top: 4px; }

/* ── SECTION LABELS ── */
.section-label {
  font-size: 11px; font-weight: 800; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 8px;
}

/* ── STAT CARDS ── */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.stat-card { background: white; border: 1px solid var(--slate-200); border-radius: var(--radius); padding: 18px; }
.stat-card .stat-label { font-size: 11px; font-weight: 600; color: var(--slate-500); text-transform: uppercase; letter-spacing: 0.06em; }
.stat-card .stat-value { font-size: 28px; font-weight: 800; color: var(--navy); margin-top: 4px; line-height: 1; }
.stat-card .stat-sub { font-size: 12px; color: var(--slate-400); margin-top: 4px; }

/* ── AUTH PAGES ── */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: var(--slate-100);
}
.auth-card { width: 100%; max-width: 440px; background: white; border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow-lg); }
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo .shield-icon {
  width: 52px; height: 52px; background: var(--navy);
  clip-path: polygon(50% 0%,100% 20%,100% 70%,50% 100%,0% 70%,0% 20%);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 10px;
}
.auth-logo h1 { font-size: 22px; font-weight: 800; color: var(--navy); }
.auth-logo p { color: var(--slate-500); font-size: 14px; margin-top: 4px; }
.auth-footer { text-align: center; font-size: 13px; color: var(--slate-500); margin-top: 20px; }
.auth-footer a { color: var(--gold); font-weight: 600; text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }
.alert { padding: 12px 16px; border-radius: var(--radius); font-size: 13px; margin-bottom: 16px; }
.alert-error { background: var(--red-light); color: #7f1d1d; border: 1px solid #fca5a5; }
.alert-success { background: var(--green-light); color: #14532d; border: 1px solid #86efac; }
.alert-info { background: var(--blue-light); color: #1e3a8a; border: 1px solid #93c5fd; }

/* ── MEMBERSHIP CARDS ── */
.plans-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.plan-card { border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); border: 1.5px solid var(--slate-200); }
.plan-card.featured { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold), var(--shadow-lg); }
.plan-header { padding: 22px 20px; background: var(--navy); }
.plan-header.gold { background: var(--gold); }
.plan-badge { font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; padding: 3px 8px; border-radius: 4px; display: inline-block; margin-bottom: 8px; }
.plan-name { font-size: 17px; font-weight: 800; color: white; }
.plan-header.gold .plan-name { color: var(--navy); }
.plan-price { font-size: 34px; font-weight: 900; color: var(--gold-light); margin-top: 4px; }
.plan-header.gold .plan-price { color: var(--navy); }
.plan-price span { font-size: 14px; font-weight: 400; opacity: 0.7; }
.plan-sub { font-size: 12px; color: rgba(255,255,255,0.5); }
.plan-header.gold .plan-sub { color: rgba(15,31,60,0.6); }
.plan-body { background: white; padding: 20px; flex: 1; display: flex; flex-direction: column; }
.plan-features { list-style: none; flex: 1; }
.plan-features li { font-size: 13px; color: var(--slate-600); padding: 7px 0; border-bottom: 1px solid var(--slate-100); display: flex; align-items: flex-start; gap: 8px; }
.plan-features li:last-child { border-bottom: none; }
.plan-features li::before { content: '✓'; color: var(--gold); font-weight: 800; flex-shrink: 0; }
.plan-cta { margin-top: 18px; }

/* ── BOOKING STEPS ── */
.steps-bar { display: flex; align-items: center; gap: 0; margin-bottom: 28px; }
.step-item { display: flex; align-items: center; flex: 1; }
.step-num {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; border: 2px solid var(--slate-200);
  background: white; color: var(--slate-400); transition: all 0.2s;
}
.step-num.active { background: var(--navy); border-color: var(--navy); color: white; }
.step-num.done { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.step-label { font-size: 12px; color: var(--slate-400); margin-left: 8px; font-weight: 500; white-space: nowrap; }
.step-label.active { color: var(--navy); font-weight: 700; }
.step-line { flex: 1; height: 2px; background: var(--slate-200); margin: 0 8px; }
.step-line.done { background: var(--gold); }

/* ── SERVICE OPTION CARDS ── */
.service-options { display: flex; flex-direction: column; gap: 12px; }
.service-option {
  border: 2px solid var(--slate-200); border-radius: var(--radius); padding: 16px;
  cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 14px;
}
.service-option:hover { border-color: var(--gold-light); background: var(--gold-pale); }
.service-option.selected { border-color: var(--gold); background: var(--gold-pale); }
.service-option .svc-icon { font-size: 28px; flex-shrink: 0; }
.service-option .svc-name { font-weight: 700; color: var(--navy); font-size: 15px; }
.service-option .svc-desc { font-size: 12px; color: var(--slate-500); margin-top: 2px; }
.service-option .svc-rate { font-weight: 700; color: var(--gold); font-size: 13px; margin-left: auto; text-align: right; flex-shrink: 0; }

/* ── TIME SLOTS ── */
.time-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.time-slot {
  padding: 10px 6px; text-align: center; border: 1.5px solid var(--slate-200);
  border-radius: var(--radius); font-size: 13px; font-weight: 500; cursor: pointer; transition: all 0.2s;
  background: white; color: var(--slate-700);
}
.time-slot:hover { border-color: var(--gold-light); }
.time-slot.selected { background: var(--gold); border-color: var(--gold); color: var(--navy); font-weight: 700; }

/* ── BOOKING LIST ── */
.booking-item {
  background: white; border: 1px solid var(--slate-200); border-radius: var(--radius);
  padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  transition: box-shadow 0.2s;
}
.booking-item:hover { box-shadow: var(--shadow-md); }
.booking-info .service-name { font-weight: 700; color: var(--navy); font-size: 15px; }
.booking-info .booking-meta { font-size: 12px; color: var(--slate-500); margin-top: 4px; display: flex; gap: 14px; flex-wrap: wrap; }
.booking-meta span { display: flex; align-items: center; gap: 4px; }

/* ── QUICK ACTIONS ── */
.quick-actions { display: flex; flex-direction: column; gap: 8px; }
.quick-action {
  display: flex; align-items: center; gap: 12px; padding: 12px;
  border-radius: var(--radius); text-decoration: none; transition: background 0.2s; cursor: pointer;
}
.quick-action:hover { background: var(--gold-pale); }
.quick-action .qa-icon { width: 36px; height: 36px; background: var(--slate-100); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.quick-action:hover .qa-icon { background: rgba(200,151,58,0.15); }
.quick-action .qa-label { font-size: 13px; font-weight: 600; color: var(--navy); }
.quick-action .qa-sub { font-size: 11px; color: var(--slate-400); }

/* ── REVIEW STARS ── */
.stars { display: flex; gap: 4px; }
.star { font-size: 22px; cursor: pointer; transition: transform 0.1s; color: var(--slate-300); }
.star.filled, .star:hover { color: var(--gold); }
.star:hover { transform: scale(1.2); }

/* ── MEMBERSHIP STATUS BANNER ── */
.membership-banner {
  border-radius: var(--radius-lg); padding: 20px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px;
}
.membership-banner.active { background: var(--gold); color: var(--navy); }
.membership-banner.inactive { background: var(--navy); color: white; }
.membership-banner .mb-title { font-size: 17px; font-weight: 800; }
.membership-banner .mb-sub { font-size: 13px; opacity: 0.75; margin-top: 2px; }

/* ── CONFIRM TABLE ── */
.confirm-table { width: 100%; border-collapse: collapse; }
.confirm-table tr { border-bottom: 1px solid var(--slate-100); }
.confirm-table tr:last-child { border-bottom: none; }
.confirm-table td { padding: 12px 0; font-size: 14px; vertical-align: top; }
.confirm-table td:first-child { color: var(--slate-500); width: 40%; }
.confirm-table td:last-child { font-weight: 600; color: var(--navy); }

/* ── RANGE SLIDER ── */
input[type=range] { width: 100%; accent-color: var(--gold); height: 4px; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .plans-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 680px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--navy); padding: 12px 16px; gap: 4px; }
  .nav-links.open { display: flex; }
  .nav-hamburger { display: block; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .plans-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .steps-bar { overflow-x: auto; }
  .step-label { display: none; }
  .time-grid { grid-template-columns: repeat(3,1fr); }
  .booking-item { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 440px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .auth-card { padding: 28px 20px; }
}
