:root {
  --primary: #16a34a;
  --primary-light: #dcfce7;
  --primary-dark: #15803d;
  --accent: #0ea5e9;
  --accent-light: #e0f2fe;
  --purple: #7c3aed;
  --purple-light: #ede9fe;
  --amber: #d97706;
  --amber-light: #fef3c7;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --bg: #f8fafc;
  --bg-card: #ffffff;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.10);
  --font-display: 'Roboto', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4,h5,h6 { font-family: var(--font-display); font-weight: 700; color: var(--text); }
a { text-decoration: none; color: var(--primary); }

/* ---- NAV ---- */
.wh-nav {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.navbar-brand {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--text) !important;
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand-icon {
  width: 36px; height: 36px;
  background: var(--primary);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 18px;
}
.brand-icon.small { width: 28px; height: 28px; font-size: 14px; border-radius: 7px; }
.brand-accent { color: var(--primary); }
.nav-link {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--text-muted) !important;
  padding: 8px 14px !important;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  font-size: 14px;
}
.nav-link:hover, .nav-link.active { background: var(--primary-light); color: var(--primary) !important; }
.wh-dropdown {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  min-width: 220px;
}
.wh-dropdown .dropdown-item {
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 400;
  transition: all 0.15s;
}
.wh-dropdown .dropdown-item:hover { background: var(--primary-light); color: var(--primary); }
.btn-outline-nav {
  border: 1.5px solid var(--border-strong);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}
.btn-outline-nav:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.btn-primary-nav {
  background: var(--primary);
  color: white !important;
  border-radius: 10px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  transition: all 0.2s;
}
.btn-primary-nav:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(22,163,74,0.3); }
.btn-user {
  background: var(--primary-light);
  border: none;
  border-radius: 10px;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
  display: flex; align-items: center; gap: 8px;
}
.user-avatar {
  width: 28px; height: 28px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

/* ---- HERO ---- */
.wh-hero {
  background: linear-gradient(135deg, #f0fdf4 0%, #e0f2fe 50%, #ede9fe 100%);
  padding: 90px 0 70px;
  position: relative;
  overflow: hidden;
}
.wh-hero::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(22,163,74,0.12) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.hero-title {
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  color: var(--text);
}
.hero-title .highlight { color: var(--primary); position: relative; }
.hero-subtitle {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 36px;
  font-weight: 300;
  line-height: 1.7;
}
.hero-stats {
  display: flex; gap: 32px; flex-wrap: wrap;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid rgba(0,0,0,0.08);
}
.hero-stat-num { font-family: var(--font-display); font-size: 26px; font-weight: 800; color: var(--text); }
.hero-stat-label { font-size: 13px; color: var(--text-muted); }
.hero-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.hero-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.3s;
}
.hero-card:hover { transform: translateY(-4px); }
.hero-card-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin-bottom: 12px;
}
.hero-card-icon.green { background: var(--primary-light); color: var(--primary); }
.hero-card-icon.blue { background: var(--accent-light); color: var(--accent); }
.hero-card-icon.purple { background: var(--purple-light); color: var(--purple); }
.hero-card-icon.amber { background: var(--amber-light); color: var(--amber); }
.hero-card h6 { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.hero-card p { font-size: 12px; color: var(--text-muted); margin: 0; }

/* ---- SECTION HEADERS ---- */
.section-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 5px 12px;
  border-radius: 50px;
  margin-bottom: 12px;
}
.section-badge.green { background: var(--primary-light); color: var(--primary); }
.section-badge.blue { background: var(--accent-light); color: var(--accent); }
.section-badge.purple { background: var(--purple-light); color: var(--purple); }
.section-title { font-size: clamp(26px, 3.5vw, 38px); font-weight: 800; margin-bottom: 12px; }
.section-sub { color: var(--text-muted); font-size: 16px; max-width: 500px; margin: 0 auto; font-weight: 300; }

/* ---- TOOL CARDS ---- */
.tool-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: all 0.25s;
  height: 100%;
  display: flex; flex-direction: column;
  position: relative;
  overflow: hidden;
}
.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--primary);
  opacity: 0;
  transition: opacity 0.25s;
}
.tool-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.tool-card:hover::before { opacity: 1; }
.tool-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
  flex-shrink: 0;
}
.tool-icon.green { background: var(--primary-light); color: var(--primary); }
.tool-icon.blue { background: var(--accent-light); color: var(--accent); }
.tool-icon.purple { background: var(--purple-light); color: var(--purple); }
.tool-icon.amber { background: var(--amber-light); color: var(--amber); }
.tool-card h5 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.tool-card p { font-size: 13px; color: var(--text-muted); flex: 1; line-height: 1.6; }
.tool-card .btn-tool {
  margin-top: 16px;
  border: 1.5px solid var(--border-strong);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
  display: inline-flex; align-items: center; gap: 6px;
}
.tool-card:hover .btn-tool { background: var(--primary); border-color: var(--primary); color: white; }

/* ---- TOOL PAGE ---- */
.tool-page-hero {
  background: linear-gradient(135deg, var(--primary-light) 0%, white 100%);
  padding: 50px 0 40px;
  border-bottom: 1px solid var(--border);
}
.tool-page-icon {
  width: 64px; height: 64px;
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  margin-bottom: 16px;
}
.tool-container {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}

/* ---- FORM ELEMENTS ---- */
.wh-form-group { margin-bottom: 20px; }
.wh-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 7px;
}
.wh-input, .wh-select {
  width: 100%;
  padding: 11px 15px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.wh-input:focus, .wh-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(22,163,74,0.1); }
.wh-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 12px 28px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.wh-btn:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(22,163,74,0.35); }
.wh-btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.wh-btn-outline:hover { background: var(--primary); color: white; }

/* ---- RESULT BOX ---- */
.result-box {
  background: var(--primary-light);
  border: 1px solid rgba(22,163,74,0.2);
  border-radius: var(--radius-sm);
  padding: 24px;
  text-align: center;
  margin-top: 24px;
  display: none;
}
.result-box.show { display: block; animation: fadeUp 0.4s ease; }
.result-value { font-family: var(--font-display); font-size: 48px; font-weight: 800; color: var(--primary); line-height: 1; }
.result-label { font-size: 14px; color: var(--text-muted); margin-top: 4px; }
.result-category {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  margin-top: 10px;
}

/* ---- AUTH PAGES ---- */
.auth-page {
  min-height: 100vh;
  display: flex; align-items: center;
  background: linear-gradient(135deg, #f0fdf4 0%, #e0f2fe 100%);
  padding: 40px 0;
}
.auth-card {
  background: white;
  border-radius: 24px;
  padding: 44px 40px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.10);
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}
.auth-title { font-size: 28px; font-weight: 800; margin-bottom: 4px; }
.auth-sub { color: var(--text-muted); font-size: 14px; margin-bottom: 28px; }
.auth-divider { text-align: center; position: relative; margin: 20px 0; }
.auth-divider::before { content: ''; position: absolute; left: 0; top: 50%; width: 100%; height: 1px; background: var(--border); }
.auth-divider span { background: white; padding: 0 12px; position: relative; font-size: 13px; color: var(--text-light); }
.auth-link { font-size: 14px; color: var(--text-muted); text-align: center; margin-top: 20px; }
.auth-link a { color: var(--primary); font-weight: 500; }

/* ---- ADMIN PANEL ---- */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 260px;
  background: var(--text);
  position: fixed; top: 0; left: 0; bottom: 0;
  overflow-y: auto;
  z-index: 100;
  display: flex; flex-direction: column;
}
.admin-sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.admin-brand { font-family: var(--font-display); font-size: 18px; font-weight: 800; color: white; display: flex; align-items: center; gap: 8px; }
.admin-nav { padding: 16px 12px; flex: 1; }
.admin-nav-label { font-size: 11px; font-weight: 600; color: rgba(255,255,255,0.35); text-transform: uppercase; letter-spacing: 0.08em; padding: 8px 10px 4px; }
.admin-nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  font-weight: 400;
  transition: all 0.15s;
  margin-bottom: 2px;
  text-decoration: none;
}
.admin-nav-link:hover, .admin-nav-link.active { background: rgba(255,255,255,0.08); color: white; }
.admin-nav-link.active { background: var(--primary); color: white; }
.admin-nav-link i { font-size: 17px; }
.admin-main {
  margin-left: 260px;
  flex: 1;
  display: flex; flex-direction: column;
}
.admin-topbar {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
}
.admin-page-title { font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.admin-content { padding: 28px; flex: 1; }
.stat-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex; align-items: flex-start; justify-content: space-between;
}
.stat-card-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.stat-card-num { font-family: var(--font-display); font-size: 32px; font-weight: 800; color: var(--text); line-height: 1; }
.stat-card-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.wh-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.wh-table th { padding: 10px 16px; text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); border-bottom: 1px solid var(--border); background: var(--bg); }
.wh-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); color: var(--text); vertical-align: middle; }
.wh-table tr:last-child td { border-bottom: none; }
.wh-table tr:hover td { background: var(--bg); }
.badge-role { padding: 3px 10px; border-radius: 50px; font-size: 11px; font-weight: 600; }
.badge-admin { background: var(--purple-light); color: var(--purple); }
.badge-user { background: var(--primary-light); color: var(--primary); }
.badge-active { background: var(--primary-light); color: var(--primary); padding: 3px 10px; border-radius: 50px; font-size: 11px; font-weight: 600; }
.badge-inactive { background: #fee2e2; color: #dc2626; padding: 3px 10px; border-radius: 50px; font-size: 11px; font-weight: 600; }

/* ---- FOOTER ---- */
.wh-footer {
  background: var(--text);
  color: rgba(255,255,255,0.7);
  padding: 60px 0 0;
}
.footer-brand {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: white;
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 14px;
}
.footer-desc { font-size: 13px; line-height: 1.7; margin-bottom: 20px; color: rgba(255,255,255,0.5); }
.social-links { display: flex; gap: 10px; }
.social-links a {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.08);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.6);
  transition: all 0.2s;
}
.social-links a:hover { background: var(--primary); color: white; }
.footer-heading { font-family: var(--font-display); font-size: 13px; font-weight: 700; color: white; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 14px; }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { font-size: 13px; color: rgba(255,255,255,0.5); transition: color 0.15s; }
.footer-links a:hover { color: white; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 0;
  margin-top: 40px;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.3);
}

/* ---- ALERTS ---- */
.wh-alert {
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 16px;
  border: none;
  display: flex; align-items: center; gap: 8px;
}
.wh-alert-success { background: var(--primary-light); color: var(--primary-dark); }
.wh-alert-error { background: #fee2e2; color: #991b1b; }

/* ---- MOOD TRACKER ---- */
.mood-btn {
  flex: 1; padding: 16px 8px; border: 2px solid var(--border);
  border-radius: 12px; background: white; cursor: pointer;
  transition: all 0.2s; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.mood-btn:hover { border-color: var(--primary); background: var(--primary-light); }
.mood-btn.selected { border-color: var(--primary); background: var(--primary-light); }
.mood-btn .mood-emoji { font-size: 28px; }
.mood-btn .mood-label { font-size: 12px; font-weight: 500; color: var(--text-muted); }

/* ---- BREATHING ---- */
.breath-circle {
  width: 180px; height: 180px;
  border-radius: 50%;
  background: var(--primary-light);
  border: 3px solid var(--primary);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto;
  transition: transform 4s ease-in-out;
  font-family: var(--font-display);
  font-size: 18px; font-weight: 700;
  color: var(--primary);
}
.breath-circle.inhale { transform: scale(1.35); background: rgba(22,163,74,0.15); }
.breath-circle.hold { transform: scale(1.35); background: rgba(14,165,233,0.15); border-color: var(--accent); color: var(--accent); }
.breath-circle.exhale { transform: scale(1); }

/* ---- ANIMATIONS ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeUp 0.5s ease both; }

/* ---- RESPONSIVE ---- */
@media (max-width: 991px) {
  .admin-sidebar { transform: translateX(-260px); transition: transform 0.3s; }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .hero-visual { display: none; }
}
@media (max-width: 576px) {
  .auth-card { padding: 30px 20px; }
  .tool-container { padding: 20px; }
  .admin-content { padding: 16px; }
}
