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

:root {
  --primary-hue: 200;
  --primary: hsl(var(--primary-hue), 85%, 45%);
  --primary-hover: hsl(var(--primary-hue), 85%, 38%);
  --primary-light: hsl(var(--primary-hue), 85%, 95%);
  
  --secondary: hsl(280, 60%, 55%);
  --secondary-hover: hsl(280, 60%, 45%);
  --secondary-light: hsl(280, 60%, 95%);

  --accent: hsl(45, 100%, 55%); /* Warm Gold */
  --accent-light: hsl(45, 100%, 93%);
  
  --success: hsl(150, 80%, 40%);
  --danger: hsl(350, 80%, 50%);
  --warning: hsl(35, 90%, 55%);

  --bg-app: hsl(210, 20%, 98%);
  --bg-card: hsl(0, 0%, 100%);
  --text-main: hsl(215, 28%, 17%);
  --text-muted: hsl(215, 16%, 47%);
  --border-color: hsl(215, 15%, 90%);
  
  --font-family: 'Outfit', sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(149, 157, 165, 0.12);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.08);
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-app);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Typography Overrides */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Glassmorphism & Cards */
.card-glass {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  transition: var(--transition-smooth);
}
.card-glass:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Buttons Styling */
.btn-primary-custom {
  background: linear-gradient(135deg, var(--primary), hsl(var(--primary-hue), 85%, 35%));
  color: white;
  border: none;
  border-radius: 12px;
  padding: 10px 24px;
  font-weight: 500;
  box-shadow: 0 4px 15px rgba(0, 150, 255, 0.25);
  transition: var(--transition-smooth);
}
.btn-primary-custom:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 150, 255, 0.35);
  color: white;
}

.btn-secondary-custom {
  background: linear-gradient(135deg, var(--secondary), hsl(280, 60%, 45%));
  color: white;
  border: none;
  border-radius: 12px;
  padding: 10px 24px;
  font-weight: 500;
  box-shadow: 0 4px 15px rgba(150, 0, 255, 0.2);
  transition: var(--transition-smooth);
}
.btn-secondary-custom:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(150, 0, 255, 0.3);
  color: white;
}

/* Wizard Steps (Booking flow) */
.wizard-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
  position: relative;
}
.wizard-steps::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: var(--border-color);
  z-index: 1;
  transform: translateY(-50%);
}
.wizard-step {
  position: relative;
  z-index: 2;
  background: var(--bg-card);
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border: 3px solid var(--border-color);
  transition: var(--transition-smooth);
}
.wizard-step.active {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
  box-shadow: 0 0 0 6px var(--primary-light);
}
.wizard-step.completed {
  border-color: var(--success);
  background: var(--success);
  color: white;
}

/* Navbar Customization */
.navbar-custom {
  background: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}
.navbar-brand img {
  height: 40px;
  margin-right: 8px;
}

/* Sidebar for Caregivers/Admins */
.sidebar-layout {
  display: flex;
  min-height: 100vh;
}
.sidebar-custom {
  width: 260px;
  background: hsl(222, 47%, 12%);
  color: white;
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}
.sidebar-custom .nav-link {
  color: rgba(255, 255, 255, 0.7);
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition-smooth);
}
.sidebar-custom .nav-link:hover, .sidebar-custom .nav-link.active {
  color: white;
  background: rgba(255, 255, 255, 0.08);
}
.sidebar-content-area {
  flex-grow: 1;
  padding: 30px;
  background: var(--bg-app);
}

/* Leaflet map styling */
.tracking-map {
  height: 450px;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  border: 2px solid white;
}

/* Micro-animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.animate-fade-in-up {
  animation: fadeInUp 0.5s ease forwards;
}

/* Custom rating stars */
.star-rating {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 4px;
}
.star-rating input {
  display: none;
}
.star-rating label {
  font-size: 28px;
  color: #ddd;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
  color: var(--accent);
}

/* Responsive fixes */
@media (max-width: 768px) {
  .sidebar-custom {
    position: fixed;
    left: -260px;
    z-index: 1000;
  }
  .sidebar-layout.toggled .sidebar-custom {
    left: 0;
  }
}