/* ================================================================
   Team Benefits — Main Stylesheet
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── 1. Root Variables ─────────────────────────────────────────── */
:root {
  /* Brand */
  --brand:       #4F46E5;
  --brand-dark:  #3730A3;
  --brand-hover: #4338CA;
  --brand-light: #EEF2FF;
  --brand-50:    #F5F3FF;

  /* Semantic */
  --success: #059669;
  --warning: #D97706;
  --danger:  #DC2626;
  --info:    #0284C7;

  /* Neutral */
  --text:        #111827;
  --text-muted:  #6B7280;
  --text-subtle: #9CA3AF;
  --border:      #E5E7EB;
  --border-light:#F3F4F6;
  --bg:          #F9FAFB;
  --bg-card:     #FFFFFF;

  /* Elevation — deeper shadows for 3-D pop */
  --shadow-xs: 0 1px 2px rgba(0,0,0,.07);
  --shadow-sm: 0 2px 6px rgba(0,0,0,.09), 0 1px 2px rgba(0,0,0,.06);
  --shadow:    0 4px 14px rgba(0,0,0,.10), 0 2px 4px rgba(0,0,0,.06);
  --shadow-md: 0 10px 28px rgba(0,0,0,.11), 0 4px 8px rgba(0,0,0,.07);
  --shadow-lg: 0 24px 56px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.08);
  /* Inset top-edge highlight simulates light hitting card surface */
  --inset-top: inset 0 1px 0 rgba(255,255,255,.85);

  /* Radius */
  --r-sm: 6px;
  --r:    12px;
  --r-lg: 16px;
  --r-xl: 24px;

  /* Portal */
  --sidebar-bg:    #0F172A;
  --sidebar-hover: #1E293B;
  --sidebar-text:  #94A3B8;
  --portal-accent: #3B82F6;
}

/* ── 2. Base ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: .9375rem;
  color: var(--text);
  background-color: #4F46E5;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.4) 5%, #f3f2fb 20%, #f3f2fb 85%, rgba(255, 255, 255, 0.4) 95%),
    linear-gradient(rgba(255, 255, 255, .5), rgba(187, 161, 237, 0.5)),
    var(--page-bg, none);
  background-size: cover;
  background-attachment: fixed;
  background-position: center center;
  background-repeat: no-repeat;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { font-weight: 700; letter-spacing: -.02em; }

a { color: var(--brand); }
a:hover { color: var(--brand-dark); }

/* ── 3. Public Navbar ──────────────────────────────────────────── */
.public-nav {
  background: #fff;
  border-bottom: none;
  box-shadow: none;
  padding: .875rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.public-nav .navbar-brand {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--brand) !important;
  letter-spacing: -.03em;
}

.public-nav .nav-link {
  color: var(--text-muted);
  font-weight: 500;
  font-size: .875rem;
  padding: .375rem .75rem !important;
  border-radius: var(--r-sm);
  transition: color .15s, background .15s;
}
.public-nav .nav-link:hover { color: var(--text) !important; background: var(--bg); }
.public-nav .nav-link.active { color: var(--brand) !important; }

.btn-nav-cta {
  background: var(--brand);
  color: #fff !important;
  border-radius: var(--r-sm);
  padding: .375rem .875rem !important;
  font-size: .875rem;
  font-weight: 600;
}
.btn-nav-cta:hover { background: var(--brand-hover); color: #fff !important; }

/* ── 4. Buttons ────────────────────────────────────────────────── */
.btn {
  font-weight: 600;
  font-size: .875rem;
  border-radius: var(--r-sm);
  transition: all .18s;
}
.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
}
.btn-primary:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79,70,229,.35);
}
.btn-outline-primary {
  color: var(--brand);
  border-color: var(--brand);
}
.btn-outline-primary:hover {
  background: var(--brand);
  border-color: var(--brand);
}
.btn-lg { padding: .75rem 2rem; font-size: 1rem; border-radius: var(--r); }
.btn-xl { padding: .9rem 2.5rem; font-size: 1.05rem; border-radius: var(--r); }

/* ── 5. Cards ──────────────────────────────────────────────────── */
.card {
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm), var(--inset-top);
  background: #fff;
}
.card-lift { transition: transform .22s ease, box-shadow .22s ease; }
.card-lift:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg), var(--inset-top);
}

/* ── 6. Form Controls ──────────────────────────────────────────── */
.form-control, .form-select {
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: .6rem .875rem;
  font-size: .9375rem;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(79,70,229,.12);
  outline: none;
}
.form-label {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .35rem;
}
.form-text { font-size: .8rem; color: var(--text-subtle); }

/* ── 7. Badges ─────────────────────────────────────────────────── */
.tag {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .25rem .625rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .02em;
}
.tag-brand  { background: var(--brand-light); color: var(--brand); }
.tag-green  { background: #ECFDF5; color: var(--success); }
.tag-amber  { background: #FFFBEB; color: var(--warning); }
.tag-red    { background: #FEF2F2; color: var(--danger); }
.tag-gray   { background: var(--bg); color: var(--text-muted); }

/* ── 8. Hero ───────────────────────────────────────────────────── */
.hero {
  background-color: #4F46E5;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  padding: 6rem 0 5rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(55,48,163,.97) 0%,
    rgba(79,70,229,.88) 30%,
    rgba(109,40,217,.60) 60%,
    rgba(124,58,237,.30) 100%
  );
  z-index: 0;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 60px;
  background: #fff;
  clip-path: ellipse(55% 100% at 50% 100%);
  z-index: 1;
}
.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.04em;
  color: #fff;
}
.hero-subtitle { color: rgba(255,255,255,.75); font-size: 1.125rem; line-height: 1.7; }
.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  padding: .375rem 1rem;
  font-size: .8rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(4px);
}

/* ── 9. Stats Bar ──────────────────────────────────────────────── */
.stats-bar {
  background: rgba(255,255,255,.75);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border-light);
  padding: 1.5rem 0;
}
.stat-item { text-align: center; }
.stat-number { font-size: 1.75rem; font-weight: 800; color: var(--brand); }
.stat-label  { font-size: .8rem; color: var(--text-muted); font-weight: 500; }

/* ── 10. Service Cards ─────────────────────────────────────────── */
.service-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow), var(--inset-top);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  display: flex; flex-direction: column;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg), var(--inset-top);
  border-color: rgba(99,102,241,.3);
}
.service-card-img {
  height: 180px;
  object-fit: cover;
  width: 100%;
}
.service-card-placeholder {
  height: 160px;
  background: linear-gradient(135deg, var(--brand-light) 0%, #DDD6FE 100%);
  display: flex; align-items: center; justify-content: center;
}
.service-card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.service-card-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-light);
  display: flex; justify-content: space-between; align-items: center;
}
.service-price {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--brand);
  letter-spacing: -.03em;
}

/* ── 11. Detail page ───────────────────────────────────────────── */
.detail-hero {
  background: transparent;
  padding: 3rem 0;
  color: var(--text);
}

/* Page-header banner (services list, booking breadcrumb) */
.page-header-banner {
  background: transparent;
  padding: 2.5rem 0 1.5rem;
  color: var(--text);
}
.page-header-banner .breadcrumb-item,
.page-header-banner .breadcrumb-item a,
.page-header-banner .breadcrumb-item.active {
  color: var(--text-muted);
  text-decoration: none;
}
.page-header-banner .breadcrumb-item a:hover { color: var(--text); }
.page-header-banner .breadcrumb-item + .breadcrumb-item::before { color: var(--text-subtle); }
.page-header-banner .breadcrumb-item,
.page-header-banner .breadcrumb-item a,
.page-header-banner .breadcrumb-item.active {
  color: rgba(255,255,255,.75);
  text-decoration: none;
}
.page-header-banner .breadcrumb-item a:hover { color: #fff; }
.page-header-banner .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.4); }
.booking-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md), var(--inset-top);
  position: sticky;
  top: 90px;
}
.price-display {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--brand);
  letter-spacing: -.04em;
}

/* ── 12. Booking Flow ──────────────────────────────────────────── */
.step-bar { display: flex; align-items: center; margin-bottom: 2.5rem; }
.step-item { display: flex; align-items: center; gap: .5rem; font-size: .8125rem; font-weight: 600; color: var(--text-subtle); }
.step-item.active { color: var(--brand); }
.step-item.done { color: var(--success); }
.step-dot {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700; flex-shrink: 0;
  background: var(--border); color: var(--text-muted);
}
.step-item.active .step-dot { background: var(--brand); color: #fff; }
.step-item.done  .step-dot { background: var(--success); color: #fff; }
.step-line { flex: 1; height: 2px; background: var(--border); margin: 0 .75rem; }
.step-line.done { background: var(--success); }

.form-section-label {
  font-size: .7rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-subtle);
  margin-bottom: 1rem; padding-bottom: .5rem;
  border-bottom: 1px solid var(--border-light);
}

.order-card {
  background: var(--brand-50);
  border: 1.5px solid var(--brand-light);
  border-radius: var(--r-lg);
  padding: 1.5rem;
}

/* ── 13. Stripe Payment Element ────────────────────────────────── */
#payment-element {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 1.25rem;
}

/* ── 14. Success / Status pages ────────────────────────────────── */
.status-icon-wrap {
  width: 90px; height: 90px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; margin: 0 auto 1.5rem;
}
.status-icon-wrap.success { background: #ECFDF5; color: var(--success); }
.status-icon-wrap.warning { background: #FFFBEB; color: var(--warning); }
.status-icon-wrap.danger  { background: #FEF2F2; color: var(--danger); }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem 1.5rem; }
.detail-grid dt { font-size: .8rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.detail-grid dd { font-weight: 600; margin: 0; color: var(--text); }

/* ── 15. Provider Portal ───────────────────────────────────────── */
.portal-wrap { display: flex; min-height: calc(100vh - 56px); }

.portal-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  padding: 1.5rem 0;
  display: flex;
  flex-direction: column;
}
.portal-sidebar-brand {
  padding: .5rem 1.5rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
  margin-bottom: 1rem;
}
.portal-sidebar-brand .provider-name {
  color: #fff;
  font-weight: 700;
  font-size: .9375rem;
  letter-spacing: -.02em;
}
.portal-sidebar-brand .portal-label {
  color: var(--sidebar-text);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.portal-nav-item a {
  display: flex; align-items: center; gap: .625rem;
  padding: .5625rem 1.5rem;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 500;
  border-radius: 0;
  transition: background .15s, color .15s;
}
.portal-nav-item a:hover {
  background: var(--sidebar-hover);
  color: #fff;
}
.portal-nav-item.active a {
  background: rgba(59,130,246,.15);
  color: var(--portal-accent);
  border-right: 3px solid var(--portal-accent);
}
.portal-nav-divider {
  margin: 1rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,.06);
}

.portal-main {
  flex: 1;
  background-color: #3730A3;
  background-image:
    linear-gradient(rgba(15,23,42,.78), rgba(15,23,42,.78)),
    var(--page-bg, none);
  background-size: cover;
  background-attachment: fixed;
  background-position: center center;
  padding: 2rem;
  overflow-y: auto;
}

.kpi-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.25rem 1.5rem;
  display: flex; align-items: center; gap: 1rem;
  box-shadow: var(--shadow), var(--inset-top);
}
.kpi-icon {
  width: 48px; height: 48px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; flex-shrink: 0;
}
.kpi-icon.blue   { background: #EFF6FF; color: #2563EB; }
.kpi-icon.green  { background: #ECFDF5; color: #059669; }
.kpi-icon.amber  { background: #FFFBEB; color: #D97706; }
.kpi-icon.purple { background: var(--brand-light); color: var(--brand); }
.kpi-number { font-size: 1.625rem; font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.kpi-label  { font-size: .8rem; color: var(--text-muted); font-weight: 500; margin-top: .2rem; }

.portal-table { font-size: .875rem; }
.portal-table th {
  font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-muted);
  background: var(--bg); border-bottom: 1px solid var(--border);
  padding: .75rem 1rem;
}
.portal-table td { padding: .875rem 1rem; border-bottom: 1px solid var(--border-light); vertical-align: middle; }
.portal-table tbody tr:last-child td { border-bottom: none; }
.portal-table tbody tr:hover td { background: var(--bg); }

.status-pill {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .25rem .75rem; border-radius: 999px;
  font-size: .75rem; font-weight: 600;
}
.status-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-confirmed,
.status-confirmed           { background: #ECFDF5; color: #059669; }
.status-awaiting,
.status-awaitingpayment     { background: #FFFBEB; color: #D97706; }
.status-pending,
.status-pendingverification { background: #F3F4F6; color: #6B7280; }
.status-cancelled           { background: #FEF2F2; color: #DC2626; }
.status-completed           { background: #EFF6FF; color: #2563EB; }

/* ── 16. Management Portal ─────────────────────────────────────── */
.mgmt-sidebar {
  width: 220px; flex-shrink: 0;
  background: #0F172A;
  padding: 0;
  display: flex; flex-direction: column;
}
.mgmt-sidebar-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.mgmt-sidebar-header .brand-text {
  color: #fff; font-weight: 800; font-size: 1rem; letter-spacing: -.03em;
}
.mgmt-sidebar-header .sub { color: #475569; font-size: .7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.mgmt-nav-section { padding: 1rem 0; }
.mgmt-nav-section-label {
  padding: .25rem 1.25rem .5rem;
  font-size: .65rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: #475569;
}
.mgmt-nav-link {
  display: flex; align-items: center; gap: .625rem;
  padding: .5rem 1.25rem;
  color: #94A3B8;
  text-decoration: none;
  font-size: .8125rem; font-weight: 500;
  transition: background .15s, color .15s;
  border-left: 3px solid transparent;
}
.mgmt-nav-link:hover  { background: #1E293B; color: #E2E8F0; }
.mgmt-nav-link.active { background: rgba(59,130,246,.1); color: #60A5FA; border-left-color: #3B82F6; }
.mgmt-main {
  flex: 1;
  background-color: #1e1b4b;
  background-image:
    linear-gradient(rgba(15,23,42,.82), rgba(15,23,42,.82)),
    var(--page-bg, none);
  background-size: cover;
  background-attachment: fixed;
  background-position: center center;
  overflow-y: auto;
}
.mgmt-content { padding: 2rem; }

/* ── 17. Category filter pills ─────────────────────────────────── */
.filter-pill {
  display: inline-flex; align-items: center;
  padding: .375rem 1rem;
  border-radius: 999px;
  font-size: .8125rem; font-weight: 600;
  border: 1.5px solid var(--border);
  background: #fff; color: var(--text-muted);
  text-decoration: none; cursor: pointer;
  transition: all .15s;
}
.filter-pill:hover { border-color: var(--brand); color: var(--brand); }
.filter-pill.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ── 18. Section layouts ───────────────────────────────────────── */
.section { padding: 5rem 0; }
.section-alt { background: rgba(255,255,255,.08); backdrop-filter: blur(2px); }
.section-title { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; letter-spacing: -.03em; }
.section-subtitle { color: var(--text-muted); font-size: 1.0625rem; }

/* ── 19. How it works steps ────────────────────────────────────── */
.how-step-num {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--brand-light); color: var(--brand);
  font-size: 1.125rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
}

/* ── 20. Provider logo strip ───────────────────────────────────── */
.provider-logo-strip { filter: grayscale(100%); opacity: .5; transition: all .2s; }
.provider-logo-strip:hover { filter: none; opacity: 1; }

/* ── 21. Login page ────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  background-color: #1e1b4b;
  background-image:
    linear-gradient(135deg, rgba(55,48,163,.88) 0%, rgba(109,40,217,.82) 100%),
    var(--page-bg, none);
  background-size: cover;
  background-attachment: fixed;
  background-position: center center;
  display: flex; align-items: center; justify-content: center;
}
.login-card {
  background: #fff;
  border-radius: var(--r-xl);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}

/* ── 22. Home page — no body background image (hero handles it) ── */
body.home-page {
  background-image: none;
  background-color: #fff;
}

/* ── 24. Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .portal-sidebar, .mgmt-sidebar { display: none; }
  .portal-main, .mgmt-main { padding: 1rem; }
  .hero { padding: 3.5rem 0 3rem; }
  .hero::after { display: none; }
}
/* iOS doesn't support background-attachment:fixed — fall back to scroll */
@supports (-webkit-touch-callout: none) {
  body, .portal-main, .mgmt-main, .login-page {
    background-attachment: scroll;
  }
}

/* ── Marketing additions ─────────────────────────────────────── */

/* Sponsored badge on service cards */
.badge-sponsored {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #92400E;
  background: #FEF3C7;
  border: 1px solid #FCD34D;
  border-radius: 20px;
  padding: .2rem .6rem;
}

/* Social proof counter on cards */
.social-proof {
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-muted);
}
.social-proof .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  margin-right: .3rem;
  vertical-align: middle;
}

/* Star rating display */
.stars {
  display: inline-flex;
  gap: 2px;
  color: #F59E0B;
  font-size: .875rem;
}
.stars .bi-star-fill { color: #F59E0B; }
.stars .bi-star      { color: #D1D5DB; }

/* Review card */
.review-card {
  background: var(--bg);
  border-radius: var(--r);
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
}
.review-card + .review-card { margin-top: .75rem; }

/* Provider showcase page hero */
.provider-hero {
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand) 100%);
  padding: 4rem 0 3rem;
  color: #fff;
}

/* Company dashboard */
.budget-bar-wrap {
  height: 8px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  margin-top: .5rem;
}
.budget-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--brand);
  transition: width .3s ease;
}
.budget-bar-fill.over { background: var(--danger); }

/* Provider logo strip on homepage */
.provider-logo-strip {
  padding: 2.5rem 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.provider-logo-strip img {
  height: 128px;
  object-fit: contain;
  opacity: .6;
  transition: opacity .2s;
}
.provider-logo-strip img:hover {
  opacity: 1;
  filter: none;
}

/* Request service CTA strip */
.request-strip {
  background: linear-gradient(135deg, #1E1B4B 0%, #312E81 100%);
  padding: 3rem 0;
  color: #fff;
}
