/**
 * Felax Spa Design System
 * Primary: #70bbb8 | Secondary: #176270 | BG: #f5f6f8
 * Light + Dark themes | Mobile-first | Premium UI
 */

:root {
  --boo-primary: #70bbb8;
  --boo-primary-dark: #5aa9a6;
  --boo-primary-light: #a8d9d7;
  --boo-secondary: #176270;
  --boo-secondary-dark: #0f4a55;
  --boo-bg: #f5f6f8;
  --boo-card: #ffffff;
  --boo-text: #1a2b2e;
  --boo-text-muted: #6b7c80;
  --boo-border: rgba(23, 98, 112, 0.1);
  --boo-shadow: 0 8px 30px rgba(23, 98, 112, 0.08);
  --boo-shadow-lg: 0 20px 50px rgba(23, 98, 112, 0.12);
  --boo-radius: 15px;
  --boo-radius-sm: 10px;
  --boo-radius-lg: 22px;
  --boo-nav-height: 72px;
  --boo-bottom-nav: 68px;
  --boo-sidebar: 280px;
  --boo-sidebar-collapsed: 80px;
  --boo-glass: rgba(255, 255, 255, 0.72);
  --boo-glass-border: rgba(255, 255, 255, 0.35);
  --boo-success: #2ecc71;
  --boo-warning: #f39c12;
  --boo-danger: #e74c3c;
  --boo-info: #3498db;
  --boo-font: 'Manrope', system-ui, sans-serif;
  --boo-font-display: 'Fraunces', Georgia, serif;
  --boo-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --boo-bg: #0f1a1c;
  --boo-card: #162428;
  --boo-text: #e8f1f2;
  --boo-text-muted: #9bb0b4;
  --boo-border: rgba(112, 187, 184, 0.15);
  --boo-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  --boo-shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.45);
  --boo-glass: rgba(22, 36, 40, 0.85);
  --boo-glass-border: rgba(112, 187, 184, 0.2);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--boo-font);
  background: var(--boo-bg);
  color: var(--boo-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, .display-font {
  font-family: var(--boo-font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--boo-text);
}

a {
  color: var(--boo-secondary);
  text-decoration: none;
  transition: color var(--boo-transition);
}
a:hover { color: var(--boo-primary-dark); }

img { max-width: 100%; height: auto; }

/* ---------- Utilities ---------- */
.boo-container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1rem;
}

.boo-card {
  background: var(--boo-card);
  border-radius: var(--boo-radius);
  box-shadow: var(--boo-shadow);
  border: 1px solid var(--boo-border);
  overflow: hidden;
}

.boo-glass {
  background: var(--boo-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--boo-glass-border);
  border-radius: var(--boo-radius);
}

.boo-shadow { box-shadow: var(--boo-shadow); }
.boo-shadow-lg { box-shadow: var(--boo-shadow-lg); }
.boo-radius { border-radius: var(--boo-radius); }

.text-primary-boo { color: var(--boo-primary) !important; }
.text-secondary-boo { color: var(--boo-secondary) !important; }
.bg-primary-boo { background-color: var(--boo-primary) !important; }
.bg-secondary-boo { background-color: var(--boo-secondary) !important; }
.bg-boo { background-color: var(--boo-bg) !important; }

/* ---------- Buttons ---------- */
.btn-boo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--boo-secondary);
  color: #fff !important;
  border: none;
  border-radius: 12px;
  padding: 0.75rem 1.4rem;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform var(--boo-transition), box-shadow var(--boo-transition), background var(--boo-transition);
  box-shadow: 0 6px 18px rgba(23, 98, 112, 0.25);
}
.btn-boo:hover {
  background: var(--boo-secondary-dark);
  transform: translateY(-1px);
  color: #fff !important;
}
.btn-boo-primary {
  background: var(--boo-primary);
  color: var(--boo-secondary) !important;
  box-shadow: 0 6px 18px rgba(112, 187, 184, 0.35);
}
.btn-boo-primary:hover {
  background: var(--boo-primary-dark);
  color: #fff !important;
}
.btn-boo-outline {
  background: transparent;
  color: var(--boo-secondary) !important;
  border: 2px solid var(--boo-secondary);
  box-shadow: none;
}
.btn-boo-outline:hover {
  background: var(--boo-secondary);
  color: #fff !important;
}
.btn-boo-ghost {
  background: transparent;
  color: var(--boo-secondary) !important;
  box-shadow: none;
  border: none;
}
.btn-boo-block { width: 100%; }

@media (max-width: 575.98px) {
  .btn-boo-mobile-block { width: 100%; }
}

/* ---------- Navbar ---------- */
.boo-navbar {
  position: sticky;
  top: 0;
  z-index: 1040;
  height: var(--boo-nav-height);
  background: var(--boo-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--boo-border);
}
.boo-navbar .navbar-brand {
  font-family: var(--boo-font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--boo-secondary) !important;
  letter-spacing: -0.03em;
}
.boo-navbar .navbar-brand span { color: var(--boo-primary); }
.boo-navbar .nav-link {
  color: var(--boo-text) !important;
  font-weight: 500;
  padding: 0.5rem 0.9rem !important;
  border-radius: 10px;
  transition: background var(--boo-transition);
}
.boo-navbar .nav-link:hover,
.boo-navbar .nav-link.active {
  background: rgba(112, 187, 184, 0.18);
  color: var(--boo-secondary) !important;
}

.boo-mega-search {
  position: relative;
  flex: 1;
  max-width: 480px;
}
.boo-mega-search input {
  width: 100%;
  border: 1px solid var(--boo-border);
  background: var(--boo-card);
  color: var(--boo-text);
  border-radius: 999px;
  padding: 0.65rem 1rem 0.65rem 2.75rem;
  outline: none;
  transition: border-color var(--boo-transition), box-shadow var(--boo-transition);
}
.boo-mega-search input:focus {
  border-color: var(--boo-primary);
  box-shadow: 0 0 0 4px rgba(112, 187, 184, 0.25);
}
.boo-mega-search .search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--boo-text-muted);
}

.theme-toggle {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--boo-border);
  background: var(--boo-card);
  color: var(--boo-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--boo-transition);
}
.theme-toggle:hover {
  background: var(--boo-primary);
  color: #fff;
}

/* ---------- Hero ---------- */
.boo-hero {
  position: relative;
  min-height: calc(100vh - var(--boo-nav-height));
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(112, 187, 184, 0.35), transparent 50%),
    radial-gradient(ellipse at 80% 60%, rgba(23, 98, 112, 0.2), transparent 45%),
    linear-gradient(160deg, #e8f6f5 0%, var(--boo-bg) 45%, #dfeef0 100%);
}
[data-theme="dark"] .boo-hero {
  background:
    radial-gradient(ellipse at 20% 20%, rgba(112, 187, 184, 0.15), transparent 50%),
    radial-gradient(ellipse at 80% 60%, rgba(23, 98, 112, 0.35), transparent 45%),
    linear-gradient(160deg, #0f1a1c 0%, #122022 100%);
}
.boo-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23176270' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.boo-hero-content { position: relative; z-index: 2; padding: 3rem 0; }
.boo-hero-brand {
  font-family: var(--boo-font-display);
  font-size: clamp(2.8rem, 7vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--boo-secondary);
  margin-bottom: 0.75rem;
}
.boo-hero-brand span { color: var(--boo-primary); }
.boo-hero-title {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 500;
  color: var(--boo-text);
  margin-bottom: 0.75rem;
  max-width: 28ch;
}
.boo-hero-sub {
  color: var(--boo-text-muted);
  font-size: 1.05rem;
  max-width: 42ch;
  margin-bottom: 1.75rem;
}
.boo-hero-visual {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 48%;
  background-size: cover;
  background-position: center;
  border-radius: var(--boo-radius-lg) 0 0 var(--boo-radius-lg);
  box-shadow: var(--boo-shadow-lg);
}
.boo-hero-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--boo-bg) 0%, transparent 25%);
}
[data-theme="dark"] .boo-hero-visual::after {
  background: linear-gradient(90deg, #0f1a1c 0%, transparent 25%);
}

@media (max-width: 991.98px) {
  .boo-hero {
    min-height: auto;
    padding-bottom: 2rem;
  }
  .boo-hero-visual {
    position: relative;
    width: 100%;
    height: 280px;
    border-radius: var(--boo-radius);
    margin-top: 2rem;
  }
  .boo-hero-visual::after { display: none; }
}

/* ---------- Section ---------- */
.boo-section { padding: 4rem 0; }
.boo-section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 0.5rem;
}
.boo-section-sub {
  color: var(--boo-text-muted);
  margin-bottom: 2rem;
  max-width: 50ch;
}

/* ---------- Spa Cards ---------- */
.spa-card {
  background: var(--boo-card);
  border-radius: var(--boo-radius);
  box-shadow: var(--boo-shadow);
  border: 1px solid var(--boo-border);
  overflow: hidden;
  transition: transform var(--boo-transition), box-shadow var(--boo-transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.spa-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--boo-shadow-lg);
}
.spa-card-img {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--boo-primary-light), var(--boo-secondary));
}
.spa-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.spa-card:hover .spa-card-img img { transform: scale(1.05); }
.spa-card-body { padding: 1.15rem 1.25rem 1.35rem; flex: 1; display: flex; flex-direction: column; }
.spa-card-title {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
  font-family: var(--boo-font-display);
}
.spa-card-meta {
  color: var(--boo-text-muted);
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}
.spa-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--boo-glass);
  backdrop-filter: blur(8px);
  color: var(--boo-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: 8px;
  z-index: 1;
}
.spa-badge-distance {
  left: auto;
  right: 12px;
  background: rgba(23, 98, 112, 0.92);
  color: #fff;
  max-width: calc(100% - 24px);
  white-space: nowrap;
}
.spa-distance-pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--boo-secondary);
  background: rgba(112, 187, 184, 0.22);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}
.spa-distance-text {
  color: var(--boo-secondary);
  font-weight: 600;
}
.spa-fav {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--boo-glass);
  color: var(--boo-danger);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ---------- Category pills ---------- */
.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.2rem;
  background: var(--boo-card);
  border: 1px solid var(--boo-border);
  border-radius: var(--boo-radius);
  color: var(--boo-text);
  font-weight: 600;
  box-shadow: var(--boo-shadow);
  transition: var(--boo-transition);
  white-space: nowrap;
}
.cat-chip i { color: var(--boo-primary); font-size: 1.1rem; }
.cat-chip:hover {
  background: var(--boo-secondary);
  color: #fff;
  border-color: var(--boo-secondary);
}
.cat-chip:hover i { color: var(--boo-primary); }

/* ---------- Forms ---------- */
.form-control, .form-select {
  border-radius: 12px !important;
  border-color: var(--boo-border) !important;
  background: var(--boo-card) !important;
  color: var(--boo-text) !important;
  padding: 0.7rem 1rem !important;
}
.form-control:focus, .form-select:focus {
  border-color: var(--boo-primary) !important;
  box-shadow: 0 0 0 4px rgba(112, 187, 184, 0.25) !important;
}
.form-label { font-weight: 600; color: var(--boo-text); margin-bottom: 0.4rem; }
.invalid-feedback { display: block; }

/* ---------- Footer ---------- */
.boo-footer {
  background: var(--boo-secondary);
  color: rgba(255,255,255,0.85);
  padding: 3.5rem 0 1.5rem;
  margin-top: 3rem;
}
.boo-footer a { color: rgba(255,255,255,0.75); }
.boo-footer a:hover { color: var(--boo-primary); }
.boo-footer h5, .boo-footer .footer-brand {
  color: #fff;
  font-family: var(--boo-font-display);
}
.boo-footer .footer-brand span { color: var(--boo-primary); }
.boo-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 2rem;
  padding-top: 1.25rem;
  font-size: 0.875rem;
}

/* ---------- Bottom Nav (Mobile) ---------- */
.boo-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--boo-bottom-nav);
  background: var(--boo-glass);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--boo-border);
  z-index: 1040;
  padding: 0.35rem 0.5rem calc(0.35rem + env(safe-area-inset-bottom));
}
.boo-bottom-nav .nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--boo-text-muted);
  font-size: 0.68rem;
  font-weight: 600;
  gap: 0.2rem;
  text-decoration: none;
}
.boo-bottom-nav .nav-item i { font-size: 1.2rem; }
.boo-bottom-nav .nav-item.active,
.boo-bottom-nav .nav-item:hover { color: var(--boo-secondary); }

@media (max-width: 767.98px) {
  .boo-bottom-nav { display: flex; }
  body { padding-bottom: calc(var(--boo-bottom-nav) + 8px); }
  .boo-footer { margin-bottom: var(--boo-bottom-nav); }
}

/* ---------- Dashboard Shell ---------- */
.boo-app {
  display: flex;
  min-height: 100vh;
}
.boo-sidebar {
  width: var(--boo-sidebar);
  background: var(--boo-card);
  border-right: 1px solid var(--boo-border);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1030;
  transition: transform var(--boo-transition), width var(--boo-transition);
  overflow-y: auto;
  padding: 1.25rem 0.85rem;
}
.boo-sidebar .brand {
  font-family: var(--boo-font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--boo-secondary);
  padding: 0.5rem 0.75rem 1.25rem;
}
.boo-sidebar .brand span { color: var(--boo-primary); }
.boo-sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  color: var(--boo-text-muted);
  font-weight: 500;
  margin-bottom: 0.2rem;
}
.boo-sidebar .nav-link i { width: 1.25rem; text-align: center; }
.boo-sidebar .nav-link:hover,
.boo-sidebar .nav-link.active {
  background: rgba(112, 187, 184, 0.18);
  color: var(--boo-secondary);
}
.boo-main {
  flex: 1;
  margin-left: var(--boo-sidebar);
  min-width: 0;
  transition: margin var(--boo-transition);
}
.boo-topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  background: var(--boo-glass);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--boo-border);
  position: sticky;
  top: 0;
  z-index: 1020;
}
.boo-content { padding: 1.5rem; }

@media (max-width: 991.98px) {
  .boo-sidebar { transform: translateX(-100%); }
  .boo-sidebar.open { transform: translateX(0); }
  .boo-main { margin-left: 0; }
  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1025;
  }
  .sidebar-backdrop.show { display: block; }
}

/* ---------- Stat cards ---------- */
.stat-card {
  background: var(--boo-card);
  border-radius: var(--boo-radius);
  padding: 1.25rem;
  box-shadow: var(--boo-shadow);
  border: 1px solid var(--boo-border);
  height: 100%;
}
.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(112, 187, 184, 0.2);
  color: var(--boo-secondary);
  font-size: 1.25rem;
}
.stat-card .stat-value {
  font-family: var(--boo-font-display);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
}
.stat-card .stat-label {
  color: var(--boo-text-muted);
  font-size: 0.875rem;
}

/* ---------- Tables -> Cards on mobile ---------- */
@media (max-width: 767.98px) {
  .table-responsive-cards thead { display: none; }
  .table-responsive-cards tbody tr {
    display: block;
    background: var(--boo-card);
    border: 1px solid var(--boo-border);
    border-radius: var(--boo-radius);
    box-shadow: var(--boo-shadow);
    margin-bottom: 1rem;
    padding: 0.75rem;
  }
  .table-responsive-cards tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: none !important;
    padding: 0.45rem 0.25rem !important;
    text-align: right;
  }
  .table-responsive-cards tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    text-align: left;
    color: var(--boo-text-muted);
    margin-right: 1rem;
  }
}

/* ---------- Skeleton ---------- */
.skeleton {
  background: linear-gradient(90deg, var(--boo-border) 25%, rgba(112,187,184,0.15) 50%, var(--boo-border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 8px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---------- Loading spinner ---------- */
.boo-spinner-overlay {
  position: fixed;
  inset: 0;
  background: rgba(245, 246, 248, 0.65);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}
[data-theme="dark"] .boo-spinner-overlay { background: rgba(15, 26, 28, 0.7); }
.boo-spinner-overlay.show { display: flex; }
.boo-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--boo-primary-light);
  border-top-color: var(--boo-secondary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Animations ---------- */
.fade-up {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
.stagger-1 { transition-delay: 0.05s; }
.stagger-2 { transition-delay: 0.12s; }
.stagger-3 { transition-delay: 0.19s; }
.stagger-4 { transition-delay: 0.26s; }

/* ---------- Breadcrumb ---------- */
.boo-breadcrumb .breadcrumb {
  background: transparent;
  padding: 0;
  margin-bottom: 1rem;
}
.boo-breadcrumb .breadcrumb-item a { color: var(--boo-secondary); }
.boo-breadcrumb .breadcrumb-item.active { color: var(--boo-text-muted); }

/* ---------- Page header ---------- */
.page-header {
  padding: 2rem 0 1rem;
}
.page-header h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 0.35rem;
}

/* ---------- Auth pages ---------- */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background:
    radial-gradient(ellipse at 10% 10%, rgba(112, 187, 184, 0.3), transparent 40%),
    radial-gradient(ellipse at 90% 80%, rgba(23, 98, 112, 0.15), transparent 40%),
    var(--boo-bg);
}
.auth-card {
  background: var(--boo-card);
  border-radius: var(--boo-radius-lg);
  box-shadow: var(--boo-shadow-lg);
  border: 1px solid var(--boo-border);
  padding: 2rem;
}

/* ---------- Badge overrides ---------- */
.badge { border-radius: 8px; font-weight: 600; padding: 0.4em 0.65em; }

/* ---------- Empty state ---------- */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--boo-text-muted);
}
.empty-state i {
  font-size: 3rem;
  color: var(--boo-primary);
  margin-bottom: 1rem;
}

/* ---------- Cookie bar ---------- */
.cookie-bar {
  position: fixed;
  bottom: calc(var(--boo-bottom-nav) + 12px);
  left: 12px;
  right: 12px;
  z-index: 1050;
  display: none;
}
.cookie-bar.show { display: block; }
@media (min-width: 768px) {
  .cookie-bar {
    bottom: 24px;
    left: auto;
    right: 24px;
    max-width: 420px;
  }
}
