/* ============================================================
   Pulse — Zutec Employee Wellbeing
   Design System v3 — Warm, generous, engaging
   ============================================================ */

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

:root {
  --primary: #6546FD;
  --primary-hover: #5535E8;
  --primary-light: #EDEAFF;
  --primary-glow: rgba(101, 70, 253, 0.12);
  --accent: #00D6D9;
  --accent-hover: #00B8BB;
  --green: #00E061;
  --green-light: #E4FFF0;
  --dark: #1E3C32;

  --bg: #F5F3FC;
  --bg-card: #FFFFFF;
  --text: #1E3C32;
  --text-secondary: #5A6B64;
  --text-muted: #94A09B;
  --border: #E8E5F0;
  --border-hover: #D0CADF;

  --rough: #EF5350;
  --okay: #FFA726;
  --good: #00E061;

  --radius: 16px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(30, 60, 50, 0.06);
  --shadow-md: 0 4px 16px rgba(30, 60, 50, 0.08);
  --shadow-lg: 0 8px 32px rgba(30, 60, 50, 0.10);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-size: 17px;
}

/* ==================
   BACKGROUND ART
================== */
#bg-art {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.bg-art__layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 3s ease-in-out;
}

.bg-art__layer--active {
  opacity: 1;
}

.bg-art__layer svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==================
   LAYOUT SHELL
================== */
.app {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px 20px;
}

.app.admin-layout {
  max-width: 1000px;
}

/* ==================
   HEADER
================== */
.site-header {
  display: flex;
  align-items: center;
  padding: 16px 0 10px;
  gap: 14px;
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.site-header__logo {
  height: 34px;
}

.site-header__name {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--dark);
}

.site-header__tagline {
  font-size: 16px;
  color: #6546FD;
  font-weight: 500;
  border-left: 2px solid #6546FD;
  padding-left: 14px;
  margin-left: 4px;
}

/* ==================
   NAVIGATION
================== */
nav {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  background: var(--bg-card);
  padding: 6px;
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

nav a {
  text-decoration: none;
  color: var(--text-secondary);
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 17px;
  font-weight: 600;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
  flex: 1;
  text-align: center;
}

nav a:hover {
  background: var(--primary-light);
  color: var(--primary);
}

nav a.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(101, 70, 253, 0.3);
}

.nav-admin-link {
  flex: 0 0 auto !important;
  font-size: 18px;
  opacity: 0.4;
  display: flex;
  align-items: center;
  padding: 12px 14px !important;
}

.nav-admin-link:hover {
  opacity: 0.8;
}

/* ==================
   HOME PAGE
================== */
.home-page {
  animation: fadeIn 0.4s ease;
}

.quote-banner {
  background: linear-gradient(135deg, var(--primary-light) 0%, #F4F1FF 100%);
  border-radius: var(--radius);
  padding: 18px 24px;
  margin-bottom: 16px;
  text-align: center;
}

.quote-icon {
  font-size: 24px;
  display: block;
  margin-bottom: 4px;
}

.quote-text {
  font-size: 17px;
  color: var(--text);
  font-style: italic;
  line-height: 1.5;
}

/* Home grid: 2 columns, generous cards */
.home-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.home-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--text);
  transition: all 0.25s var(--ease);
  border: 1px solid transparent;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  position: relative;
  overflow: hidden;
}

.home-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.home-card--mood::before { background: linear-gradient(90deg, #00E061, #00C853); }
.home-card--friction::before { background: linear-gradient(90deg, #00D6D9, #00B8BB); }
.home-card--ask::before { background: linear-gradient(90deg, #9B82FF, #6546FD); }
.home-card--meditate::before { background: linear-gradient(90deg, #6546FD, #5535E8); }

.home-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-hover);
}

.home-card--mood:hover { border-color: var(--green); }
.home-card--friction:hover { border-color: var(--accent); }
.home-card--ask:hover { border-color: #9B82FF; }
.home-card--meditate:hover { border-color: var(--primary); }

.home-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}

.home-card--mood .home-card__icon { background: linear-gradient(135deg, #D6FFEA, #A8FFCE); }
.home-card--friction .home-card__icon { background: linear-gradient(135deg, #D4FEFF, #A8F5F6); }
.home-card--ask .home-card__icon { background: linear-gradient(135deg, #E5DFFF, #D0C5FF); }
.home-card--meditate .home-card__icon { background: linear-gradient(135deg, #E5DFFF, #C9BFFF); }

.home-card:hover .home-card__icon {
  transform: scale(1.08);
  transition: transform 0.25s var(--ease);
}

.home-card__body { flex: 1; min-width: 0; }

.home-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.3;
}

.home-card p {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0;
  line-height: 1.5;
}

.home-card__cta {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  margin-top: 8px;
  transition: all 0.2s var(--ease);
}

.home-card--mood .home-card__cta { color: #00a848; }
.home-card--friction .home-card__cta { color: var(--accent-hover); }
.home-card--ask .home-card__cta { color: var(--primary); }
.home-card--meditate .home-card__cta { color: var(--primary); }

.home-card:hover .home-card__cta {
  letter-spacing: 0.3px;
}

.home-footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* ==================
   CARDS (inner pages)
================== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow-md);
  margin-bottom: 16px;
  animation: slideUp 0.35s ease;
}

.card h2 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 8px;
}

.card > p {
  color: var(--text-secondary);
  font-size: 17px;
  margin-bottom: 24px;
}

/* ==================
   PAGE HEADERS
================== */
.page-header {
  text-align: center;
  margin-bottom: 20px;
}

.page-header-emoji {
  font-size: 40px;
  display: block;
  margin-bottom: 8px;
}

.page-header h2 {
  font-size: 24px;
  margin-bottom: 4px;
}

.page-header p {
  margin-bottom: 0;
  color: var(--text-secondary);
  font-size: 17px;
}

/* backward compat aliases */
.mood-header { text-align: center; margin-bottom: 20px; }
.mood-header-emoji { font-size: 40px; display: block; margin-bottom: 8px; }
.mood-header h2 { font-size: 24px; margin-bottom: 4px; }
.mood-header p { margin-bottom: 0; color: var(--text-secondary); font-size: 17px; }

/* ==================
   MOOD BUTTONS
================== */
.mood-buttons-v2 {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}

.mood-btn-v2 {
  flex: 1;
  padding: 14px 10px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s var(--ease);
  font-family: inherit;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.mood-btn-v2:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}

.mood-btn-v2.selected {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.mood-emoji-v2 {
  font-size: 36px;
  display: block;
  transition: transform 0.2s var(--ease);
}

.mood-btn-v2:hover .mood-emoji-v2,
.mood-btn-v2.selected .mood-emoji-v2 {
  transform: scale(1.2);
}

.mood-label-v2 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.mood-btn-v2.selected .mood-label-v2 {
  color: var(--text);
}

/* ==================
   CATEGORY PILLS
================== */
.categories-v2 {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
  justify-content: center;
}

.category-pill-v2 {
  padding: 14px 20px;
  border: 2px solid var(--border);
  border-radius: 14px;
  background: var(--bg-card);
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
  transition: all 0.2s var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.category-pill-v2:hover {
  border-color: var(--accent);
  background: #F0FEFF;
  transform: translateY(-2px);
}

.category-pill-v2.selected {
  border-color: var(--accent);
  background: #E0FEFF;
  color: #008B8E;
  box-shadow: 0 0 0 3px rgba(0, 214, 217, 0.12);
}

.cat-emoji { font-size: 20px; }

/* ==================
   ANONYMOUS BADGE
================== */
.anon-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-light);
  color: var(--primary);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
}

/* ==================
   FORM ELEMENTS
================== */
textarea, input[type="text"], input[type="password"] {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid var(--border);
  border-radius: 14px;
  font-family: inherit;
  font-size: 17px;
  resize: vertical;
  transition: all 0.2s var(--ease);
  background: #FAFAFE;
  color: var(--text);
}

textarea:focus, input[type="text"]:focus, input[type="password"]:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px var(--primary-glow);
}

textarea { min-height: 72px; }

textarea::placeholder, input::placeholder {
  color: var(--text-muted);
}

label {
  display: block;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
}

.optional-tag {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 14px;
}

.form-group { margin-bottom: 16px; }

/* ==================
   BUTTONS
================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 30px;
  border: none;
  border-radius: 14px;
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  width: 100%;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 17px;
}

.btn-primary {
  background: linear-gradient(135deg, #6546FD 0%, #5535E8 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(101, 70, 253, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #5535E8 0%, #4425D8 100%);
  box-shadow: 0 6px 20px rgba(101, 70, 253, 0.4);
  transform: translateY(-2px);
}

.btn-primary:disabled {
  background: #D8D3E8;
  color: #A09AAF;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.btn-accent {
  background: linear-gradient(135deg, #00D6D9 0%, #00B8BB 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(0, 214, 217, 0.3);
}

.btn-accent:hover {
  background: linear-gradient(135deg, #00B8BB 0%, #009A9C 100%);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 2px solid var(--border);
}

.btn-ghost:hover {
  background: var(--bg);
  border-color: var(--border-hover);
}

/* ==================
   TOAST
================== */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--dark);
  color: white;
  padding: 14px 28px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 500;
  z-index: 10000;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: all 0.3s var(--ease);
}

.toast.toast--visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.toast--error {
  background: var(--rough);
}

/* ==================
   SUCCESS MESSAGE
================== */
.success-message {
  text-align: center;
  padding: 24px;
}

.success-anim { margin-bottom: 20px; }

.success-emoji {
  font-size: 64px;
  display: inline-block;
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-message h3 {
  font-size: 24px;
  margin-bottom: 10px;
  color: var(--primary);
}

.success-message p {
  color: var(--text-secondary);
  font-size: 16px;
}

.success-sub {
  font-size: 14px !important;
  color: var(--text-muted) !important;
  margin-top: 4px;
}

.token-box {
  margin-top: 24px;
  padding: 20px;
  background: var(--bg);
  border-radius: 14px;
  border: 1px solid var(--border);
  text-align: left;
}

.token-box code {
  display: block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--primary);
  margin: 10px 0;
  word-break: break-all;
  background: var(--primary-light);
  padding: 12px 16px;
  border-radius: 10px;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.token-box small {
  color: var(--text-secondary);
  font-size: 13px;
  display: block;
}

/* ==================
   RESPONSE CHECK
================== */
.response-card {
  background: var(--bg);
  border-radius: 14px;
  padding: 24px;
  margin-top: 20px;
  border: 1px solid var(--border);
}

.response-card .question {
  font-style: italic;
  color: var(--text-secondary);
  font-size: 16px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.response-card .answer { color: var(--text); font-size: 16px; }

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.pending { background: #FFF3E0; color: #E65100; }
.status-badge.answered { background: var(--green-light); color: #1E3C32; }

/* ==================
   ADMIN
================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.stat-card--mood::before { background: var(--green); }
.stat-card--friction::before { background: var(--accent); }
.stat-card--questions::before { background: var(--primary); }
.stat-card--meditations::before { background: #9B82FF; }

.stat-card .number {
  font-size: 36px;
  font-weight: 700;
  color: var(--dark);
}

.stat-card--mood .number { color: #00a848; }
.stat-card--friction .number { color: var(--accent-hover); }
.stat-card--questions .number { color: var(--primary); }
.stat-card--meditations .number { color: #9B82FF; }

.stat-card .label {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 6px;
}

.admin-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: var(--bg-card);
  padding: 6px;
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

.admin-tab {
  flex: 1;
  padding: 12px 16px;
  border: none;
  background: transparent;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s var(--ease);
}

.admin-tab:hover {
  background: var(--bg);
}

.admin-tab.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(101, 70, 253, 0.3);
}

.question-item {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.question-item .q-text { font-size: 17px; margin-bottom: 10px; }
.question-item .q-meta { font-size: 14px; color: var(--text-secondary); margin-bottom: 14px; }
.question-item .q-admin-response {
  margin-top: 12px;
  padding: 16px;
  background: var(--primary-light);
  border-radius: 12px;
  font-size: 15px;
  color: var(--text-secondary);
  border-left: 3px solid var(--primary);
}
.question-item textarea { min-height: 70px; margin-bottom: 10px; }

.friction-item {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.friction-item .f-category {
  background: var(--primary-light);
  color: var(--primary);
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.friction-item .f-desc { font-size: 15px; color: var(--text); flex: 1; }
.friction-item .f-date { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

.mood-legend {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 12px;
}

.mood-legend span {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

.mood-legend .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.login-form {
  max-width: 420px;
  margin: 60px auto;
}

.admin-signout {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.admin-signout button {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  transition: color 0.2s;
}

.admin-signout button:hover {
  color: var(--text);
}

/* Mood bar */
.mood-bar {
  display: flex;
  gap: 6px;
  margin-top: 20px;
  border-radius: 10px;
  overflow: hidden;
}

.mood-bar-segment {
  padding: 14px 16px;
  color: #fff;
  font-weight: 600;
  text-align: center;
  font-size: 15px;
  min-width: 60px;
}

/* Friction list in dashboard */
.friction-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}

.friction-row:last-child { border-bottom: none; }

.friction-row-count {
  font-weight: 600;
  color: var(--accent-hover);
  background: #E0FEFF;
  padding: 3px 12px;
  border-radius: 8px;
  font-size: 14px;
}

/* ==================
   MEDITATION
================== */
.meditation-container { animation: fadeIn 0.4s ease; }

.meditation-intro {
  text-align: center;
  padding: 16px 0;
}

.meditation-icon-large {
  font-size: 72px;
  margin-bottom: 20px;
}

.meditation-benefits {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 24px 0;
  flex-wrap: wrap;
}

.meditation-benefits span {
  background: var(--primary-light);
  color: var(--primary);
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
}

.btn-meditation {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px 40px;
  border: none;
  border-radius: 16px;
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  background: linear-gradient(135deg, #6546FD 0%, #5535E8 100%);
  color: white;
  box-shadow: 0 4px 20px rgba(101, 70, 253, 0.35);
  transition: all 0.2s var(--ease);
  margin-bottom: 16px;
}

.btn-meditation:hover {
  background: linear-gradient(135deg, #5535E8 0%, #4425D8 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(101, 70, 253, 0.45);
}

.meditation-note {
  font-size: 14px !important;
  color: var(--text-muted) !important;
  font-style: italic;
}

/* Fullscreen meditation */
.meditation-fullscreen {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, #0F1E18 0%, #1E3C32 50%, #142B24 100%);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  animation: fadeIn 1s ease;
}

.meditation-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.12;
}

.meditation-orb-1 {
  width: 400px; height: 400px;
  background: #6546FD;
  top: -100px; left: -100px;
  animation: orbFloat1 12s ease-in-out infinite;
}

.meditation-orb-2 {
  width: 300px; height: 300px;
  background: #00D6D9;
  bottom: -50px; right: -50px;
  animation: orbFloat2 10s ease-in-out infinite;
}

.meditation-orb-3 {
  width: 250px; height: 250px;
  background: #00E061;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: orbFloat3 14s ease-in-out infinite;
}

.meditation-content {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  gap: 40px; padding: 20px; width: 100%; max-width: 500px;
}

.breath-circle {
  width: 180px; height: 180px;
  border-radius: 50%;
  border: 3px solid rgba(101, 70, 253, 0.4);
  display: flex; align-items: center; justify-content: center;
  transition: all 4s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(101, 70, 253, 0.05);
}

.breath-circle.breath-in {
  transform: scale(1.3);
  border-color: rgba(101, 70, 253, 0.7);
  background: rgba(101, 70, 253, 0.1);
  box-shadow: 0 0 60px rgba(101, 70, 253, 0.2);
}

.breath-circle.breath-out {
  transform: scale(0.85);
  border-color: rgba(101, 70, 253, 0.3);
  background: rgba(101, 70, 253, 0.03);
  box-shadow: 0 0 20px rgba(101, 70, 253, 0.1);
}

.breath-label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px; font-weight: 500;
  letter-spacing: 1px; text-transform: uppercase;
}

.meditation-message {
  text-align: center;
  transition: opacity 0.6s ease;
  min-height: 80px;
  display: flex; flex-direction: column; justify-content: center;
}

.meditation-message.msg-visible { opacity: 1; }
.meditation-message.msg-hidden { opacity: 0; }

.msg-main {
  color: rgba(255, 255, 255, 0.95);
  font-size: 24px; font-weight: 500;
  margin-bottom: 8px; line-height: 1.4;
}

.msg-sub {
  color: rgba(255, 255, 255, 0.5);
  font-size: 16px; font-weight: 400;
}

.meditation-timer { position: relative; }

.timer-ring { width: 90px; height: 90px; position: relative; }

.timer-ring svg {
  transform: rotate(-90deg);
  width: 100%; height: 100%;
}

.timer-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 3;
}

.timer-progress {
  fill: none;
  stroke: rgba(101, 70, 253, 0.7);
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dasharray 1s linear;
}

.timer-seconds {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255, 255, 255, 0.8);
  font-size: 24px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.meditation-progress-bar {
  width: 220px; height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.meditation-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00E061, #00D6D9);
  border-radius: 2px;
  transition: width 1s linear;
}

.meditation-complete { text-align: center; }

.meditation-closing { margin-top: 20px; }

.meditation-closing blockquote {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  padding: 18px 22px;
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--text);
  margin-top: 10px;
  line-height: 1.7;
  font-size: 16px;
}

/* ==================
   ACTIVITY CALENDAR
================== */
.cal-filters {
  display: flex;
  gap: 8px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.cal-filter-btn {
  padding: 7px 16px;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s var(--ease);
}

.cal-filter-btn:hover { background: var(--bg); }

.cal-filter-btn.active {
  background: var(--bg);
  font-weight: 600;
  color: var(--text);
}

.cal-wrapper { overflow-x: auto; padding-bottom: 8px; }

.cal-months {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 16px;
  gap: 3px;
  margin-bottom: 6px;
}

.cal-month { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

.cal-grid-container { display: flex; gap: 4px; }

.cal-day-labels { display: flex; flex-direction: column; gap: 3px; }

.cal-day-label {
  height: 16px; font-size: 11px; color: var(--text-muted);
  display: flex; align-items: center; line-height: 1; width: 30px;
}

.cal-grid { display: flex; gap: 3px; }
.cal-column { display: flex; flex-direction: column; gap: 3px; }

.cal-cell {
  width: 16px; height: 16px;
  border-radius: 3px;
  background: #EBEDF0;
  transition: background 0.15s;
}

.cal-cell:hover {
  outline: 2px solid var(--text-muted);
  outline-offset: -1px;
}

.cal-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
  margin-top: 14px;
}

.cal-legend-label { font-size: 11px; color: var(--text-muted); margin: 0 4px; }
.cal-legend-cell { cursor: default; }
.cal-legend-cell:hover { outline: none; }

/* ==================
   EMPTY STATE
================== */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state__icon {
  font-size: 48px;
  margin-bottom: 14px;
  opacity: 0.5;
}

.empty-state__text {
  font-size: 16px;
}

/* ==================
   ANIMATIONS
================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes popIn {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.12); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(60px, 40px); }
  66% { transform: translate(-30px, 60px); }
}

@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(-50px, -30px); }
  66% { transform: translate(30px, -50px); }
}

@keyframes orbFloat3 {
  0%, 100% { transform: translate(-50%, -50%); }
  33% { transform: translate(-40%, -60%); }
  66% { transform: translate(-60%, -40%); }
}

/* ==================
   QUESTION TOPIC TAG (ADMIN)
================== */
.q-topic-tag {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 12px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ==================
   TODAY'S PULSE BANNER (legacy — kept for backward compat)
================== */
.pulse-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: linear-gradient(135deg, var(--primary-light) 0%, #E8FFF0 100%);
  border-radius: var(--radius);
  padding: 14px 20px;
  margin-bottom: 12px;
  border: 1px solid rgba(101, 70, 253, 0.1);
}
.pulse-banner--empty {
  background: var(--surface);
  border: 1px dashed var(--border);
}
.pulse-banner--empty p { margin: 4px 0 0; font-size: 15px; color: var(--text-muted); }
.pulse-banner--empty a { color: var(--primary); font-weight: 500; }
.pulse-banner__icon { font-size: 22px; flex-shrink: 0; }
.pulse-banner__content { flex: 1; min-width: 0; }
.pulse-banner__content strong { font-size: 15px; color: var(--text); display: block; margin-bottom: 1px; }
.pulse-banner__count { font-size: 13px; color: var(--text-muted); display: block; margin-bottom: 6px; }

/* ==================
   PULSE INSIGHTS (new banner style)
================== */
.pulse-insights {
  background: linear-gradient(135deg, #F0EDFF 0%, #E8FFF3 100%);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 14px;
  border: 1px solid rgba(101, 70, 253, 0.08);
  animation: slideUp 0.35s ease;
}
.pulse-insights__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.pulse-insights__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: livePulse 2s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
.pulse-insights__header strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.pulse-insights__count {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: auto;
  background: rgba(255,255,255,0.6);
  padding: 2px 10px;
  border-radius: 10px;
}
.pulse-insights__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pulse-insight-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.4;
}
.pulse-insight-icon {
  font-size: 16px;
  flex-shrink: 0;
}

/* ==================
   POST-SUBMISSION INSIGHTS
================== */
.post-submit-card {
  margin-bottom: 12px !important;
}
.success-message--compact {
  padding: 16px 16px 20px !important;
}
.success-message--compact .success-emoji {
  font-size: 48px;
}
.success-message--compact h3 {
  font-size: 20px;
  margin-bottom: 6px;
}
.success-message--compact p {
  font-size: 15px;
}
.success-extra {
  margin-top: 10px;
  color: var(--text-muted);
  font-style: italic;
  font-size: 14px !important;
}
.btn-sm {
  padding: 10px 24px !important;
  font-size: 14px !important;
  width: auto !important;
  display: inline-block;
  margin-top: 12px;
}

.post-insights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
  animation: slideUp 0.45s ease;
}

.insight-card {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid transparent;
  transition: all 0.2s ease;
}
.insight-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.insight-card__icon {
  font-size: 22px;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.insight-card--snapshot .insight-card__icon { background: linear-gradient(135deg, #E8E0FF, #D6FFEA); }
.insight-card--notalone .insight-card__icon { background: linear-gradient(135deg, #D6FFEA, #A8FFCE); }
.insight-card--drivers .insight-card__icon { background: linear-gradient(135deg, #D4FEFF, #A8F5F6); }
.insight-card--trend .insight-card__icon { background: linear-gradient(135deg, #FFF3E0, #FFE0B2); }
.insight-card--tip .insight-card__icon { background: linear-gradient(135deg, #E8E0FF, #F0EDFF); }

.insight-card__body { flex: 1; min-width: 0; }
.insight-card__body strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  display: block;
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.insight-card__body p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
}

/* Mini mood bar in post-submission snapshot */
.mini-mood-bar {
  display: flex;
  border-radius: 6px;
  overflow: hidden;
  height: 10px;
  margin: 8px 0 6px;
  background: rgba(0,0,0,0.04);
}
.mini-seg {
  transition: width 0.4s ease;
  min-width: 4px;
}
.mini-seg--good { background: var(--good); }
.mini-seg--okay { background: var(--okay); }
.mini-seg--rough { background: var(--rough); }
.mini-mood-legend {
  font-size: 11px;
  color: var(--text-muted);
}

.post-submit-footer {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  padding: 6px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ==================
   TOPIC PILLS
================== */
.topic-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}
.topic-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: 15px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.topic-pill:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.topic-pill.selected {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

/* ==================
   RESPONSIVE
================== */
@media (max-width: 700px) {
  .home-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .mood-buttons-v2 { flex-wrap: wrap; }
  .mood-btn-v2 { min-width: calc(33% - 8px); }
  .card { padding: 28px 24px; }
  .site-header { flex-wrap: wrap; gap: 8px; }
  .site-header__tagline { display: none; }
  nav { overflow-x: auto; }
}

@media (max-width: 480px) {
  .mood-buttons-v2 { gap: 8px; }
  .mood-btn-v2 { padding: 16px 8px; }
  .mood-emoji-v2 { font-size: 34px; }
  .home-card { padding: 22px 18px; gap: 16px; }
}

/* Fantastic / Friction toggle on the Feedback page. */
.feedback-toggle {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #eef0f7;
  border-radius: 999px;
  margin: 0 auto 18px;
  max-width: 320px;
}
.feedback-toggle__btn {
  flex: 1;
  padding: 9px 14px;
  border: 0;
  background: transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: #555;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.feedback-toggle__btn.is-active {
  background: #fff;
  color: #1a1a1a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.feedback-toggle__btn:hover:not(.is-active) {
  color: #1a1a1a;
}

/* Admin Feedback tab kind badge. */
.f-kind {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  margin-right: 8px;
}
.f-kind--fantastic { background: #fff4d4; color: #7a5b00; }
.f-kind--friction { background: #ffe0d6; color: #8a3415; }

/* "Keep this private" row on the Ask form. */
.ask-private-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  margin: 12px 0 16px;
  background: #f6f7fb;
  border: 1px solid #e2e4ec;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.45;
  color: #444;
  cursor: pointer;
}
.ask-private-row input[type="checkbox"] { margin-top: 3px; flex-shrink: 0; }
.ask-private-row strong { color: #1a1a1a; }

/* Admin Q&A: badge marking that the asker requested privacy themselves. */
.q-asker-private {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fef0f0;
  color: #a02828;
  font-size: 11px;
  font-weight: 600;
}
