/* ── Variables ─────────────────────────────────────────────────────────────── */
:root {
  --pink:        #FF6B9D;
  --pink-light:  #FFB3C1;
  --pink-pale:   #FFF0F5;
  --rose:        #C9184A;
  --rose-dark:   #590D22;
  --rose-mid:    #FF4D6D;
  --cream:       #FFF8F9;
  --white:       #FFFFFF;
  --gray-100:    #F8F9FA;
  --gray-200:    #E9ECEF;
  --gray-400:    #ADB5BD;
  --gray-600:    #6C757D;
  --gray-800:    #343A40;
  --shadow-sm:   0 2px 8px rgba(201,24,74,0.08);
  --shadow-md:   0 4px 20px rgba(201,24,74,0.12);
  --shadow-lg:   0 8px 40px rgba(201,24,74,0.16);
  --radius:      12px;
  --radius-lg:   20px;
  --transition:  0.2s ease;
}

/* ── Reset & Base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Lato', sans-serif;
  background: var(--cream);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--rose); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--pink); }

/* ── Navbar ────────────────────────────────────────────────────────────────── */
.navbar {
  background: var(--white);
  border-bottom: 2px solid var(--pink-light);
  padding: 0.9rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.navbar-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--rose);
  letter-spacing: -0.5px;
}
.navbar-brand:hover { color: var(--pink); }

.navbar-links { display: flex; gap: 1.5rem; align-items: center; }
.navbar-links a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-600);
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
  transition: all var(--transition);
}
.navbar-links a:hover { color: var(--rose); background: var(--pink-pale); }
.navbar-links .logout-link { color: var(--gray-400); }
.navbar-links .logout-link:hover { color: var(--rose-dark); }

/* ── Main ──────────────────────────────────────────────────────────────────── */
.main-content {
  flex: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ── Footer ────────────────────────────────────────────────────────────────── */
.footer {
  background: var(--white);
  border-top: 2px solid var(--pink-light);
  padding: 1rem 2rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--gray-400);
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.2rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: 'Lato', sans-serif;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, var(--pink), var(--rose-mid));
  color: var(--white);
  border-color: transparent;
  box-shadow: 0 3px 12px rgba(255,107,157,0.35);
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--rose-mid), var(--rose));
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 5px 18px rgba(255,107,157,0.45);
}

.btn-outline {
  background: var(--white);
  color: var(--rose);
  border-color: var(--pink);
}
.btn-outline:hover:not(:disabled) {
  background: var(--pink-pale);
  color: var(--rose-dark);
  border-color: var(--rose);
}

.btn-ghost {
  background: transparent;
  color: var(--gray-600);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-800); }

.btn-danger {
  background: #fff0f0;
  color: #c0392b;
  border-color: #f5c6c6;
}
.btn-danger:hover { background: #c0392b; color: white; border-color: #c0392b; }

.btn-lg { padding: 0.8rem 2rem; font-size: 1rem; border-radius: 12px; }
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.82rem; }

/* ── Alerts ────────────────────────────────────────────────────────────────── */
.alert-error {
  background: #fff0f0;
  border: 1.5px solid #f5c6c6;
  color: #c0392b;
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-weight: 600;
}
.alert-success {
  background: #f0fff4;
  border: 1.5px solid #b2dfdb;
  color: #1b6b3a;
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-weight: 600;
}

/* ── Page Header ───────────────────────────────────────────────────────────── */
.page-header {
  text-align: center;
  margin-bottom: 2.5rem;
}
.page-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  color: var(--rose-dark);
  margin-bottom: 0.4rem;
}
.page-subtitle { color: var(--gray-600); font-size: 1rem; }

/* ── Action Bar ────────────────────────────────────────────────────────────── */
.action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.action-bar-right { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ── Stats Row ─────────────────────────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.2rem;
  text-align: center;
  border: 1.5px solid var(--pink-light);
  box-shadow: var(--shadow-sm);
}
.stat-number {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: var(--rose);
  font-weight: 700;
}
.stat-label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-400);
  margin-top: 0.2rem;
  font-weight: 700;
}

/* ── Stats Hero ────────────────────────────────────────────────────────────── */
.stats-hero {
  background: linear-gradient(135deg, #fff0f5 0%, #ffffff 50%, #fff5f8 100%);
  border: 1.5px solid var(--pink-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 0.5rem 1rem;
  margin-bottom: 2.5rem;
  overflow: hidden;
}

.stats-hero-inner {
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  gap: 0;
}

.stat-hero-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.6rem 1rem;
  text-align: center;
  position: relative;
  transition: background var(--transition);
  border-radius: var(--radius);
}
.stat-hero-card:hover {
  background: rgba(255, 107, 157, 0.05);
}

.stat-hero-divider {
  width: 1.5px;
  background: linear-gradient(to bottom, transparent, var(--pink-light), transparent);
  margin: 1.2rem 0;
  flex-shrink: 0;
}

.stat-hero-icon {
  font-size: 1.6rem;
  margin-bottom: 0.4rem;
  line-height: 1;
}

.stat-hero-value {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--rose-dark);
  line-height: 1.1;
  margin-bottom: 0.3rem;
}

/* "Today 💕" / "X days ago" can be longish — scale it down a touch */
.stat-hero-since-val {
  font-size: 1.4rem;
}

.stat-hero-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--rose);
  margin-bottom: 0.2rem;
}

.stat-hero-sub {
  font-size: 0.75rem;
  color: var(--gray-400);
  font-style: italic;
}

/* ── Date Cards Grid ───────────────────────────────────────────────────────── */
.dates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.date-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--pink-light);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.date-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--pink);
}

.date-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}
.date-rating { font-size: 0.9rem; }
.date-when { font-size: 0.8rem; color: var(--gray-400); font-weight: 700; }

.date-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}
.date-card-title a { color: var(--rose-dark); }
.date-card-title a:hover { color: var(--rose); }

.date-location { font-size: 0.85rem; color: var(--gray-600); margin-bottom: 0.3rem; }
.date-duration  { font-size: 0.85rem; color: var(--gray-600); margin-bottom: 0.5rem; }
.date-snippet   { font-size: 0.88rem; color: var(--gray-600); line-height: 1.5; flex: 1; margin-bottom: 1rem; }

.date-card-footer { margin-top: auto; }

/* ── Empty State ───────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 5rem 2rem;
}
.empty-graphic { font-size: 5rem; margin-bottom: 1rem; }
.empty-state h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: var(--rose-dark);
  margin-bottom: 0.5rem;
}
.empty-state p { color: var(--gray-600); margin-bottom: 2rem; }

/* ── Form Card ─────────────────────────────────────────────────────────────── */
.form-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--pink-light);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  max-width: 780px;
  margin: 0 auto;
}

.form-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1.5px dashed var(--pink-light);
}
.form-section:last-child { border-bottom: none; margin-bottom: 0; }
.form-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: var(--rose);
  margin-bottom: 1.25rem;
}

.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--rose-dark);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.required { color: var(--rose); }

.form-input, .form-textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--pink-light);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: 'Lato', sans-serif;
  color: var(--gray-800);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-input:focus, .form-textarea:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(255,107,157,0.15);
}
.form-textarea { resize: vertical; min-height: 90px; }
.form-hint { font-size: 0.78rem; color: var(--gray-400); margin-top: 0.3rem; display: block; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* Heart Rating */
.heart-rating {
  display: flex;
  flex-direction: row-reverse;
  gap: 0.25rem;
  width: fit-content;
}
.heart-rating input[type="radio"] { display: none; }
.heart-rating label {
  font-size: 1.6rem;
  cursor: pointer;
  filter: grayscale(1) opacity(0.4);
  transition: filter var(--transition), transform var(--transition);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  color: inherit;
  margin-bottom: 0;
}
.heart-rating input:checked ~ label,
.heart-rating label:hover,
.heart-rating label:hover ~ label {
  filter: grayscale(0) opacity(1);
  transform: scale(1.1);
}

/* Location search */
.location-search-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.location-search-row .form-input { flex: 1; }

.map-container {
  width: 100%;
  height: 320px;
  border-radius: var(--radius);
  border: 1.5px solid var(--pink-light);
  overflow: hidden;
  margin-top: 0.5rem;
}
.map-readonly { height: 360px; }
.map-coords { margin-top: 0.5rem; font-size: 0.82rem; }
.map-link { color: var(--rose); font-weight: 600; }

.form-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding-top: 1rem;
}

/* ── Detail View ───────────────────────────────────────────────────────────── */
.detail-header {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--pink-light);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}
.detail-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.back-link { font-size: 0.9rem; font-weight: 700; color: var(--gray-600); }
.back-link:hover { color: var(--rose); }
.detail-actions { display: flex; gap: 0.75rem; }

.detail-rating { font-size: 1.2rem; margin-bottom: 0.5rem; }
.detail-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: var(--rose-dark);
  margin-bottom: 1rem;
}
.detail-meta { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.meta-chip {
  background: var(--pink-pale);
  color: var(--rose);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--pink-light);
}

.detail-body { display: flex; flex-direction: column; gap: 1.5rem; }
.detail-section {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--pink-light);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}
.detail-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--rose);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1.5px dashed var(--pink-light);
}
.detail-text { color: var(--gray-800); line-height: 1.75; white-space: pre-wrap; }
.detail-notes { background: var(--pink-pale); border-radius: 8px; padding: 1rem; font-style: italic; }
.detail-footer-meta { font-size: 0.8rem; color: var(--gray-400); text-align: right; padding-top: 0.5rem; }

/* ── Splash Page ───────────────────────────────────────────────────────────── */
.splash-body {
  background: linear-gradient(135deg, #fff0f5 0%, #fff8f9 50%, #ffeef3 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
}

.splash-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 3rem 2rem 2rem;
  text-align: center;
  overflow: hidden;
}

/* Floating hearts */
.hearts-bg {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.hearts-bg span {
  position: absolute;
  font-size: 1.4rem;
  animation: floatHeart linear infinite;
  opacity: 0.35;
}
.hearts-bg span:nth-child(1)  { left:  5%; animation-duration: 8s;  animation-delay: 0s;    top: 100%; }
.hearts-bg span:nth-child(2)  { left: 15%; animation-duration: 10s; animation-delay: 1s;    top: 100%; }
.hearts-bg span:nth-child(3)  { left: 25%; animation-duration: 7s;  animation-delay: 2s;    top: 100%; }
.hearts-bg span:nth-child(4)  { left: 35%; animation-duration: 11s; animation-delay: 0.5s;  top: 100%; }
.hearts-bg span:nth-child(5)  { left: 45%; animation-duration: 9s;  animation-delay: 3s;    top: 100%; }
.hearts-bg span:nth-child(6)  { left: 55%; animation-duration: 8s;  animation-delay: 1.5s;  top: 100%; }
.hearts-bg span:nth-child(7)  { left: 65%; animation-duration: 12s; animation-delay: 0.3s;  top: 100%; }
.hearts-bg span:nth-child(8)  { left: 75%; animation-duration: 7s;  animation-delay: 2.5s;  top: 100%; }
.hearts-bg span:nth-child(9)  { left: 82%; animation-duration: 10s; animation-delay: 4s;    top: 100%; }
.hearts-bg span:nth-child(10) { left: 90%; animation-duration: 9s;  animation-delay: 1.2s;  top: 100%; }
.hearts-bg span:nth-child(11) { left: 50%; animation-duration: 13s; animation-delay: 3.5s;  top: 100%; }

@keyframes floatHeart {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0.35; }
  100% { transform: translateY(-110vh) rotate(30deg); opacity: 0; }
}

.splash-graphic {
  position: relative;
  z-index: 1;
  margin-bottom: 1.5rem;
}
.splash-svg {
  width: 100%;
  max-width: 420px;
  filter: drop-shadow(0 4px 20px rgba(201,24,74,0.12));
}

.splash-title {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  color: var(--rose-dark);
  margin-bottom: 0.4rem;
  position: relative;
  z-index: 1;
}
.splash-subtitle {
  color: var(--gray-600);
  font-size: 1rem;
  margin-bottom: 1.2rem;
  position: relative;
  z-index: 1;
  font-style: italic;
}

.splash-tagline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}
.badge-fun {
  background: var(--white);
  border: 1.5px solid var(--pink-light);
  color: var(--rose);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.login-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--pink-light);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  position: relative;
  z-index: 1;
  margin-bottom: 2rem;
}
.login-card h2 {
  font-family: 'Playfair Display', serif;
  color: var(--rose-dark);
  margin-bottom: 0.3rem;
}
.login-hint { font-size: 0.88rem; color: var(--gray-400); margin-bottom: 1.2rem; }

.login-form .form-group { margin-bottom: 1.2rem; }

.splash-footer {
  background: transparent;
  border: none;
  padding: 1rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--gray-400);
}

/* ── Magic Ball / Oracle ───────────────────────────────────────────────────── */
.oracle-container {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.oracle-stats {
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1.5px solid var(--pink-light);
  border-radius: var(--radius-lg);
  padding: 1.25rem 2.5rem;
  box-shadow: var(--shadow-sm);
  width: 100%;
}
.oracle-stat { text-align: center; }
.oracle-stat-value {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  color: var(--rose);
  font-weight: 700;
}
.oracle-stat-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-400);
  font-weight: 700;
}
.oracle-stat-diff .oracle-stat-value {
  font-size: 2rem;
  color: var(--rose-dark);
}
.oracle-stat-diff .oracle-stat-label { color: var(--rose); }

/* Crystal ball */
.ball-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.ball-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255,107,157,0.3) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulse 2.5s ease-in-out infinite;
  pointer-events: none;
}

.crystal-ball {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%,
    rgba(255,255,255,0.9) 0%,
    rgba(255,182,193,0.7) 25%,
    rgba(201,24,74,0.5) 60%,
    rgba(89,13,34,0.8) 100%
  );
  box-shadow:
    0 0 40px rgba(201,24,74,0.3),
    0 0 80px rgba(255,107,157,0.15),
    inset 0 -10px 30px rgba(89,13,34,0.3),
    inset 0 10px 20px rgba(255,255,255,0.4);
  cursor: pointer;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 1;
}
.crystal-ball:hover {
  transform: scale(1.04);
  box-shadow:
    0 0 55px rgba(201,24,74,0.45),
    0 0 100px rgba(255,107,157,0.2),
    inset 0 -10px 30px rgba(89,13,34,0.3),
    inset 0 10px 20px rgba(255,255,255,0.4);
}
.ball-inner {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.ball-shine {
  position: absolute;
  top: 12%;
  left: 20%;
  width: 35%;
  height: 25%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.8) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.ball-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 1rem;
}
.ball-prompt {
  color: rgba(255,255,255,0.9);
  font-size: 0.85rem;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
  line-height: 1.4;
}
.ball-thinking { font-size: 2rem; animation: spin 0.8s linear infinite; }
.ball-result-icon { font-size: 2.5rem; }

.ball-base {
  width: 120px;
  height: 24px;
  background: radial-gradient(ellipse, rgba(201,24,74,0.25) 0%, transparent 70%);
  border-radius: 50%;
  margin-top: -4px;
}

/* Ball animations */
@keyframes pulse {
  0%, 100% { transform: translate(-50%, -55%) scale(1); opacity: 0.6; }
  50%       { transform: translate(-50%, -55%) scale(1.15); opacity: 1; }
}
@keyframes spin { to { transform: rotate(360deg); } }

.ball-shaking {
  animation: shake 0.15s ease-in-out 6;
}
@keyframes shake {
  0%, 100% { transform: rotate(0deg); }
  25%       { transform: rotate(-6deg) scale(1.03); }
  75%       { transform: rotate(6deg) scale(1.03); }
}

.ball-reveal {
  animation: reveal 0.5s ease-out;
}
@keyframes reveal {
  0%   { transform: scale(1.15); box-shadow: 0 0 80px rgba(201,24,74,0.7); }
  100% { transform: scale(1); }
}

/* Idea card */
.idea-card {
  width: 100%;
  min-height: 100px;
  background: var(--white);
  border: 1.5px solid var(--pink-light);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}
.idea-card.idea-revealed {
  border-color: var(--pink);
  box-shadow: var(--shadow-md);
}
.idea-placeholder { text-align: center; color: var(--gray-400); padding: 1rem 0; }
.idea-hint { font-size: 0.85rem; margin-top: 0.5rem; }

.idea-content { text-align: center; }
.idea-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--rose-dark);
  margin-bottom: 0.75rem;
}
.idea-text {
  color: var(--gray-800);
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 1rem;
}
.idea-hearts { font-size: 1.2rem; letter-spacing: 0.3rem; }

.oracle-btn { align-self: center; }

/* Formula card */
.formula-card {
  width: 100%;
  background: var(--pink-pale);
  border: 1.5px solid var(--pink-light);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  text-align: center;
}
.formula-card h3 {
  font-family: 'Playfair Display', serif;
  color: var(--rose-dark);
  margin-bottom: 1rem;
}
.formula {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: var(--rose);
  background: var(--white);
  border: 1px solid var(--pink-light);
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  display: inline-block;
  margin-bottom: 0.75rem;
  font-style: italic;
}
.formula-card p { color: var(--gray-600); margin-bottom: 1rem; font-style: italic; }
.specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
  text-align: left;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}
.spec-item { font-size: 0.88rem; color: var(--rose-dark); font-weight: 600; }
.spec-badge {
  background: linear-gradient(135deg, var(--pink), var(--rose-mid));
  color: white;
  padding: 0.5rem 1.2rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-block;
  letter-spacing: 0.05em;
}

/* Bonus card */
.bonus-card {
  width: 100%;
  background: var(--white);
  border: 1.5px solid var(--pink-light);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}
.bonus-card h3 {
  font-family: 'Playfair Display', serif;
  color: var(--rose-dark);
  margin-bottom: 1rem;
}
.bonus-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.bonus-list li { font-size: 0.95rem; color: var(--gray-800); }
.bonus-list em { color: var(--gray-400); }
.bonus-priceless {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--rose);
  font-style: italic;
  text-align: right;
}

/* ── Duration h/m inline inputs ────────────────────────────────────────────── */
.duration-hm {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.duration-h { width: 70px !important; text-align: center; }
.duration-m { width: 70px !important; text-align: center; }
.duration-sep {
  font-weight: 700;
  color: var(--rose);
  font-size: 0.95rem;
  flex-shrink: 0;
}

/* ── JS heart rating ───────────────────────────────────────────────────────── */
.heart-rating-js {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.2rem;
  width: fit-content;
}
.hr-star {
  font-size: 1.35rem;
  cursor: pointer;
  filter: grayscale(1) opacity(0.28);
  transition: filter 0.12s ease, transform 0.12s ease;
  user-select: none;
  line-height: 1;
}
.hr-star.hr-active  { filter: grayscale(0) opacity(1); }
.hr-star.hr-preview { filter: grayscale(0) opacity(0.75); transform: scale(1.18); }
.hr-star:hover      { transform: scale(1.25); }

/* ── Numbered map pin ──────────────────────────────────────────────────────── */
.map-pin-num {
  width: 28px; height: 34px;
  background: linear-gradient(135deg, var(--pink), var(--rose));
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(201,24,74,0.4);
}
.map-pin-num span {
  transform: rotate(45deg);
  color: #fff; font-weight: 800; font-size: 12px;
  font-family: 'Lato', sans-serif;
}

/* ── Multi-stop location list (form) ───────────────────────────────────────── */
.location-list { display: flex; flex-direction: column; gap: 0.6rem; }

.loc-empty-hint {
  color: var(--gray-400); font-style: italic;
  font-size: 0.88rem; text-align: center; padding: 0.75rem 0;
}

.loc-item {
  display: flex; align-items: flex-start; gap: 0.75rem;
  background: var(--white);
  border: 1.5px solid var(--pink-light);
  border-radius: var(--radius);
  padding: 0.7rem 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.loc-item:hover { border-color: var(--pink); box-shadow: var(--shadow-sm); }

.loc-item-num {
  width: 26px; height: 26px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--pink), var(--rose));
  color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 800;
  margin-top: 0.1rem;
}

.loc-item-body { flex: 1; display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.loc-item-name { font-weight: 700; font-size: 0.9rem; color: var(--gray-800); }
.loc-item-label { font-size: 0.85rem !important; padding: 0.35rem 0.65rem !important; }

.loc-item-remove {
  background: none; border: none; cursor: pointer;
  color: var(--gray-400); font-size: 1rem; line-height: 1;
  padding: 0.15rem 0.3rem; border-radius: 4px;
  transition: color var(--transition), background var(--transition);
  flex-shrink: 0;
}
.loc-item-remove:hover { color: #c0392b; background: #fff0f0; }

/* "＋ Add stop" hint on search results */
.loc-result-add {
  font-size: 0.75rem; font-weight: 700;
  color: var(--rose); white-space: nowrap;
  flex-shrink: 0; align-self: center;
  background: var(--pink-pale); border-radius: 10px;
  padding: 0.15rem 0.5rem;
}

/* ── Multi-stop location list (detail view) ────────────────────────────────── */
.detail-stops { display: flex; flex-direction: column; gap: 0.5rem; }

.detail-stop {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--pink-light);
}
.detail-stop:last-child { border-bottom: none; }

.detail-stop-num {
  width: 26px; height: 26px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--pink), var(--rose));
  color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 800;
}

.detail-stop-body { display: flex; flex-direction: column; gap: 0.15rem; }
.detail-stop-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--rose); }
.detail-stop-name  { font-size: 0.95rem; color: var(--gray-800); font-weight: 600; }

/* ── Location search results dropdown ─────────────────────────────────────── */
.location-results {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  background: var(--white);
  border: 1.5px solid var(--pink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 500;
  overflow: hidden;
  max-height: 280px;
  overflow-y: auto;
}

.loc-result-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid var(--gray-200);
  transition: background var(--transition);
}
.loc-result-item:last-child { border-bottom: none; }
.loc-result-item:hover { background: var(--pink-pale); }

.loc-result-loading,
.loc-result-empty {
  color: var(--gray-400);
  font-size: 0.88rem;
  cursor: default;
  justify-content: center;
}
.loc-result-loading:hover,
.loc-result-empty:hover { background: none; }

.loc-result-icon { font-size: 1.2rem; flex-shrink: 0; }
.loc-result-body {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.loc-result-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.loc-result-type {
  font-size: 0.75rem;
  color: var(--gray-400);
  text-transform: capitalize;
}

/* ── Confirmed location chip ───────────────────────────────────────────────── */
.location-confirmed {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #f0fff4;
  border: 1.5px solid #b2dfdb;
  border-radius: var(--radius);
  padding: 0.6rem 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}
.location-confirmed-icon { font-size: 1.1rem; flex-shrink: 0; }
.location-confirmed-name {
  flex: 1;
  font-weight: 600;
  color: #1b6b3a;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.location-confirmed-clear {
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  transition: color var(--transition), background var(--transition);
}
.location-confirmed-clear:hover { color: #c0392b; background: #fff0f0; }

/* Distinct confirmed pin style */
.map-pin-confirmed {
  font-size: 32px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(201,24,74,0.4));
  animation: pin-drop 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes pin-drop {
  0%   { transform: translateY(-20px) scale(0.8); opacity: 0; }
  100% { transform: translateY(0)     scale(1);   opacity: 1; }
}

/* ── Hex Badge ─────────────────────────────────────────────────────────────── */
.hex-badge {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--rose-dark);
  color: var(--pink-light);
  padding: 0.15rem 0.45rem;
  border-radius: 5px;
  letter-spacing: 0.04em;
  cursor: default;
  user-select: none;
}

.date-card-meta-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ── Terminal splash SVG ───────────────────────────────────────────────────── */
/* No extra CSS needed — animation is inline SVG */

/* ── Photo Gallery ─────────────────────────────────────────────────────────── */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}
.photo-gallery-item {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--pink-light);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  aspect-ratio: 1;
}
.photo-gallery-item:hover {
  border-color: var(--pink);
  transform: scale(1.03);
  box-shadow: var(--shadow-md);
}
.photo-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Image Upload ──────────────────────────────────────────────────────────── */
.upload-drop-zone {
  position: relative;
  border: 2px dashed var(--pink-light);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  background: var(--cream);
}
.upload-drop-zone:hover,
.upload-drop-zone.drop-zone-active {
  border-color: var(--pink);
  background: var(--pink-pale);
}
.upload-file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.upload-drop-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  pointer-events: none;
  color: var(--gray-600);
  font-size: 0.92rem;
}
.upload-icon { font-size: 2rem; }

.image-thumb-grid,
.image-preview-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.image-thumb-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--pink-light);
  overflow: hidden;
  padding: 0.4rem;
  background: var(--white);
  transition: border-color var(--transition);
}
.image-thumb-item.image-marked-delete {
  border-color: #f5c6c6;
  background: #fff0f0;
  opacity: 0.55;
}
.image-thumb {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}
.image-thumb-delete {
  font-size: 0.75rem;
  color: #c0392b;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  font-weight: 600;
}
.image-thumb-delete input { cursor: pointer; }

/* ── Comms Timeline ────────────────────────────────────────────────────────── */
.comm-count-badge {
  font-size: 0.88rem;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.comm-count-badge code {
  font-family: 'Courier New', Courier, monospace;
  background: var(--gray-100);
  padding: 0.15rem 0.4rem;
  border-radius: 5px;
  color: var(--rose);
  font-size: 0.85rem;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-left: 0.5rem;
}
.timeline-item {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.timeline-spine {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 44px;
}
.timeline-dot {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--pink-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  z-index: 1;
}
.timeline-line {
  width: 2px;
  flex: 1;
  min-height: 24px;
  background: linear-gradient(to bottom, var(--pink-light), transparent);
  margin: 4px 0;
}

.timeline-card {
  flex: 1;
  background: var(--white);
  border: 1.5px solid var(--pink-light);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.4rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), border-color var(--transition);
}
.timeline-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--pink);
}
.timeline-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.timeline-type-badge {
  background: var(--pink-pale);
  color: var(--rose);
  border: 1px solid var(--pink-light);
  border-radius: 20px;
  padding: 0.2rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 700;
}
.timeline-card-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: var(--gray-400);
}
.timeline-description {
  color: var(--gray-800);
  line-height: 1.65;
  margin-bottom: 0.9rem;
  white-space: pre-wrap;
}
.timeline-card-footer {
  display: flex;
  gap: 0.5rem;
}

/* ── Comm Type Grid (form reference) ──────────────────────────────────────── */
.comm-type-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.comm-type-chip {
  background: var(--white);
  border: 1px solid var(--pink-light);
  color: var(--rose-dark);
  padding: 0.25rem 0.7rem;
  border-radius: 14px;
  font-size: 0.82rem;
  font-weight: 600;
}

/* ══════════════════════════════════════════════════════════════════════════
   DATE-ALYTICS
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Terminal block ────────────────────────────────────────────────────────── */
.anly-terminal {
  background: #1e1e2e;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(201,24,74,0.18);
  margin-bottom: 2rem;
  font-family: 'Courier New', Courier, monospace;
}
.anly-terminal-bar {
  background: #2a2a3e;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.anly-dot {
  width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0;
}
.anly-dot.red    { background: #FF5F57; }
.anly-dot.yellow { background: #FFBD2E; }
.anly-dot.green  { background: #28C840; }
.anly-terminal-title {
  font-size: 0.8rem; color: #8888bb; margin-left: 0.5rem; letter-spacing: 0.05em;
}
.anly-terminal-body {
  padding: 1.2rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.anly-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  font-size: 0.82rem;
  line-height: 1.5;
}
.anly-prompt  { color: #FF6B9D; flex-shrink: 0; }
.anly-cmd     { color: #cdd6f4; }
.anly-key     { color: #7c7faa; min-width: 200px; flex-shrink: 0; }
.anly-val-green { color: #a6e3a1; font-weight: 700; }
.anly-val-pink  { color: #FF6B9D; font-weight: 700; }
.anly-comment   { color: #45475a; font-style: italic; margin-left: 0.5rem; }
.anly-cursor-line { margin-top: 0.4rem; }
.anly-cursor {
  display: inline-block;
  width: 9px; height: 14px;
  background: #FF6B9D;
  border-radius: 1px;
  vertical-align: middle;
  animation: blink 1.1s step-end infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* ── KPI grid ──────────────────────────────────────────────────────────────── */
.anly-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.anly-kpi-card {
  background: var(--white);
  border: 1.5px solid var(--pink-light);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.anly-kpi-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.anly-kpi-icon  { font-size: 1.5rem; margin-bottom: 0.3rem; }
.anly-kpi-value {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--rose-dark);
  line-height: 1.1;
  margin-bottom: 0.2rem;
}
.anly-kpi-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--rose);
  font-weight: 700;
  margin-bottom: 0.2rem;
}
.anly-kpi-sub { font-size: 0.75rem; color: var(--gray-400); font-style: italic; }

/* ── Charts row ────────────────────────────────────────────────────────────── */
.anly-charts-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}
.anly-chart-card {
  background: var(--white);
  border: 1.5px solid var(--pink-light);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
}
.anly-chart-wide { grid-column: 1 / -1; }
.anly-chart-title {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: var(--rose-dark);
  margin-bottom: 0.2rem;
}
.anly-chart-sub { font-size: 0.8rem; color: var(--gray-400); margin-bottom: 1rem; font-style: italic; }

/* ── Bar chart (horizontal) ────────────────────────────────────────────────── */
.bar-chart { display: flex; flex-direction: column; gap: 0.45rem; }
.bar-row   { display: flex; align-items: center; gap: 0.6rem; }
.bar-label {
  font-size: 0.78rem; font-weight: 700; color: var(--gray-600);
  min-width: 40px; flex-shrink: 0; text-align: right;
}
.bar-track {
  flex: 1; height: 14px; background: var(--gray-100);
  border-radius: 7px; overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pink-light), var(--pink));
  border-radius: 7px;
  transition: width 0.6s cubic-bezier(0.34,1.56,0.64,1);
  min-width: 2px;
}
.bar-fill-rose { background: linear-gradient(90deg, #ffb3c1, var(--rose-mid)); }
.bar-fill-gold { background: linear-gradient(90deg, #ffe082, #ffb300); }
.bar-value { font-size: 0.78rem; font-weight: 700; color: var(--rose); min-width: 20px; }

/* ── Bar chart (vertical / monthly) ───────────────────────────────────────── */
.bar-chart-monthly {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 0.35rem;
  height: 130px;
}
.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.2rem;
  height: 100%;
}
.bar-col-track {
  flex: 1;
  width: 100%;
  background: var(--gray-100);
  border-radius: 6px 6px 0 0;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  min-height: 4px;
}
.bar-col-fill {
  width: 100%;
  background: linear-gradient(180deg, var(--pink-light), var(--pink));
  border-radius: 6px 6px 0 0;
  transition: height 0.6s cubic-bezier(0.34,1.56,0.64,1);
  min-height: 2px;
}
.bar-col-value { font-size: 0.7rem; font-weight: 700; color: var(--rose); min-height: 14px; }
.bar-col-label {
  font-size: 0.62rem;
  color: var(--gray-400);
  text-align: center;
  transform: rotate(-40deg);
  transform-origin: top center;
  white-space: nowrap;
  margin-top: 0.4rem;
}

/* ── Records grid ──────────────────────────────────────────────────────────── */
.anly-records-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.anly-record-card {
  background: var(--white);
  border: 1.5px solid var(--pink-light);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.2rem;
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), border-color var(--transition);
}
.anly-record-card:hover { box-shadow: var(--shadow-md); border-color: var(--pink); }
.anly-record-icon { font-size: 1.6rem; flex-shrink: 0; line-height: 1; margin-top: 0.1rem; }
.anly-record-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gray-400); font-weight: 700; margin-bottom: 0.15rem; }
.anly-record-value { font-family: 'Playfair Display', serif; font-size: 1.15rem; color: var(--rose-dark); font-weight: 700; margin-bottom: 0.15rem; }
.anly-record-name { font-size: 0.82rem; color: var(--gray-600); }
.anly-record-name a { color: var(--rose); font-weight: 600; }

/* ── Fun facts ─────────────────────────────────────────────────────────────── */
.anly-funfacts {
  background: linear-gradient(135deg, #fff0f5, #fff8f9);
  border: 1.5px solid var(--pink-light);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}
.anly-funfacts-title {
  font-family: 'Playfair Display', serif;
  color: var(--rose-dark);
  font-size: 1.15rem;
  margin-bottom: 1.25rem;
}
.anly-funfacts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.anly-fact {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: var(--white);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  border: 1px solid var(--pink-light);
}
.anly-fact-icon { font-size: 1.3rem; flex-shrink: 0; }
.anly-fact-text { font-size: 0.88rem; color: var(--gray-600); line-height: 1.6; }
.anly-fact-text strong { color: var(--rose-dark); }

/* ══════════════════════════════════════════════════════════════════════════
   ROMANCE METER
   ══════════════════════════════════════════════════════════════════════════ */

/* Card — CSS grid so columns are explicit and can't stack */
.rm-card {
  display: grid;
  grid-template-columns: 110px 1fr;
  column-gap: 2.5rem;
  align-items: center;
  background: var(--white);
  border: 2px solid var(--pink-light);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
/* Level accent strip on left edge */
.rm-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}
.rm-lvl-overclock::before { background: #c0392b; }
.rm-lvl-hot::before       { background: var(--rose); }
.rm-lvl-warm::before      { background: #ff7043; }
.rm-lvl-good::before      { background: var(--pink); }
.rm-lvl-neutral::before   { background: #78909c; }
.rm-lvl-cool::before      { background: #42a5f5; }
.rm-lvl-cold::before      { background: #29b6f6; }
.rm-lvl-dead::before      { background: #bdbdbd; }

/* Thermometer column */
.rm-therm-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}
.rm-unit-label {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--rose);
  letter-spacing: 0.06em;
}

/* Detail column */
.rm-detail-col {
  min-width: 0;
}

.rm-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}
.rm-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: var(--rose-dark);
  margin: 0;
}
.rm-badge {
  border-radius: 20px;
  padding: 0.22rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}
.rm-badge-overclock { background: #fce4ec; color: #c62828; }
.rm-badge-hot       { background: #fce4ec; color: var(--rose); }
.rm-badge-warm      { background: #fff3e0; color: #e64a19; }
.rm-badge-good      { background: var(--pink-pale); color: var(--rose); }
.rm-badge-neutral   { background: var(--gray-100); color: var(--gray-600); }
.rm-badge-cool      { background: #e3f2fd; color: #1565c0; }
.rm-badge-cold      { background: #e3f2fd; color: #0277bd; }
.rm-badge-dead      { background: var(--gray-100); color: var(--gray-400); }

.rm-score {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--rose-dark);
  line-height: 1;
  margin-bottom: 1rem;
}
.rm-score-denom {
  font-family: 'Lato', sans-serif;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--gray-400);
}

/* Factor bars */
.rm-factors {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 0.8rem;
}
.rm-factor-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
}
.rm-factor-label {
  min-width: 148px;
  flex-shrink: 0;
  color: var(--gray-600);
  font-weight: 600;
}
.rm-factor-track {
  flex: 1;
  height: 9px;
  background: var(--gray-100);
  border-radius: 5px;
  overflow: hidden;
}
.rm-factor-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pink-light), var(--pink));
  border-radius: 5px;
  min-width: 2px;
}
.rm-factor-pts  { font-weight: 700; color: var(--rose); min-width: 44px; text-align: right; }
.rm-factor-max  { color: var(--gray-400); font-weight: 400; }

/* Correction chips */
.rm-corrections {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}
.rm-chip {
  font-size: 0.75rem;
  background: var(--pink-pale);
  border: 1px solid var(--pink-light);
  border-radius: 12px;
  padding: 0.15rem 0.65rem;
  color: var(--rose-dark);
}
.rm-chip strong { color: var(--rose); }

.rm-disclaimer {
  font-size: 0.72rem;
  color: var(--gray-400);
  font-style: italic;
  line-height: 1.5;
}

/* Responsive — stack on mobile */
@media (max-width: 600px) {
  .rm-card { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .rm-factor-row { flex-wrap: wrap; }
  .rm-factor-label { min-width: unset; }
}

/* ── Who picker (segmented control) ───────────────────────────────────────── */
.who-picker {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.3rem;
  flex-wrap: wrap;
}

.who-btn {
  display: flex;
  align-items: center;
  cursor: pointer;
  border: 2px solid var(--pink-light);
  border-radius: 10px;
  padding: 0.55rem 1.2rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-600);
  background: var(--white);
  transition: all var(--transition);
  user-select: none;
}
.who-btn input[type="radio"] {
  display: none;   /* hide the radio — visual state via :has() */
}
.who-btn:has(input:checked) {
  background: linear-gradient(135deg, var(--pink), var(--rose-mid));
  color: var(--white);
  border-color: transparent;
  box-shadow: 0 3px 12px rgba(255,107,157,0.35);
}
.who-btn:hover:not(:has(input:checked)) {
  border-color: var(--pink);
  color: var(--rose);
  background: var(--pink-pale);
}

/* ── Audit table ───────────────────────────────────────────────────────────── */
.audit-history-section { overflow-x: auto; }

.audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.audit-table th {
  text-align: left;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rose);
  font-weight: 700;
  padding: 0.5rem 0.75rem;
  border-bottom: 2px solid var(--pink-light);
  white-space: nowrap;
}
.audit-table td {
  padding: 0.65rem 0.75rem;
  vertical-align: top;
  border-bottom: 1px solid var(--gray-200);
  line-height: 1.4;
}
.audit-row:hover td { background: var(--pink-pale); }

.audit-ts { color: var(--gray-600); font-size: 0.82rem; white-space: nowrap; }
.audit-ts small { color: var(--gray-400); font-size: 0.75rem; }

.audit-who-badge {
  background: var(--pink-pale);
  color: var(--rose-dark);
  border: 1px solid var(--pink-light);
  border-radius: 14px;
  padding: 0.18rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.audit-action-badge {
  border-radius: 6px;
  padding: 0.18rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: capitalize;
  white-space: nowrap;
}
.audit-action-badge.audit-created  { background: #e8f5e9; color: #2e7d32; }
.audit-action-badge.audit-updated  { background: #fff8e1; color: #f57f17; }
.audit-action-badge.audit-deleted  { background: #fce4ec; color: #c62828; }

.audit-type-badge {
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 6px;
  padding: 0.18rem 0.55rem;
  white-space: nowrap;
}
.audit-type-badge.audit-type-date  { background: var(--pink-pale); color: var(--rose); }
.audit-type-badge.audit-type-comm  { background: #e8eaf6; color: #3949ab; }

.audit-entity-link  { color: var(--rose); font-weight: 600; }
.audit-entity-deleted { color: var(--gray-400); font-style: italic; }

.audit-diff-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem;
  margin-bottom: 0.25rem;
  font-size: 0.82rem;
}
.audit-field {
  font-weight: 700;
  color: var(--rose-dark);
  min-width: 80px;
  flex-shrink: 0;
}
.audit-from {
  color: var(--gray-400);
  text-decoration: line-through;
  font-style: italic;
  word-break: break-word;
}
.audit-arrow { color: var(--gray-400); flex-shrink: 0; }
.audit-to   { color: var(--gray-800); font-weight: 600; word-break: break-word; }
.audit-no-diff { color: var(--gray-400); font-style: italic; font-size: 0.8rem; }

.audit-empty {
  color: var(--gray-400);
  font-style: italic;
  text-align: center;
  padding: 1.5rem 0;
}

.audit-full-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--pink-light);
  box-shadow: var(--shadow-sm);
  background: var(--white);
}
.audit-table-full th:first-child { border-radius: var(--radius-lg) 0 0 0; }
.audit-table-full th:last-child  { border-radius: 0 var(--radius-lg) 0 0; }

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .navbar { padding: 0.75rem 1rem; flex-direction: column; gap: 0.5rem; }
  .navbar-links { gap: 0.75rem; flex-wrap: wrap; justify-content: center; }
  .main-content { padding: 1.5rem 1rem 3rem; }
  .stats-hero-inner { flex-wrap: wrap; }
  .stat-hero-card { flex: 1 1 40%; }
  .stat-hero-divider { display: none; }
  .anly-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .anly-charts-row { grid-template-columns: 1fr; }
  .anly-funfacts-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .duration-hm { flex-wrap: wrap; }
  .detail-header-top { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .oracle-stats { gap: 1rem; padding: 1rem 1.5rem; }
  .splash-title { font-size: 2.2rem; }
}

/* ── Face ID / passkey button ──────────────────────────────────────────────── */
.btn-faceid {
  background: linear-gradient(135deg, #1c1c2e, #2d1b4e);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 16px rgba(28,28,46,0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-faceid:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(28,28,46,0.4);
  color: #fff;
}
.btn-faceid .faceid-icon { font-size: 1.25rem; }

/* ── Or-divider ─────────────────────────────────────────────────────────────── */
.or-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--gray-400);
  font-size: 0.85rem;
  margin: 1rem 0;
}
.or-divider::before, .or-divider::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--gray-200);
}

/* ── Who-picker (splash — standalone buttons, no radio) ─────────────────────── */
.who-buttons {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
/* Override old radio-based who-btn for splash (pure buttons) */
.login-card .who-btn {
  flex: 1;
  justify-content: center;
  min-width: 120px;
  background: var(--white);
  border: 2px solid var(--pink-light);
  color: var(--gray-600);
}
.login-card .who-btn:hover {
  border-color: var(--pink);
  color: var(--rose);
  background: var(--pink-pale);
}

/* ── Utility ─────────────────────────────────────────────────────────────────── */
.w-full { width: 100%; }

/* ── Navbar user chip ───────────────────────────────────────────────────────── */
.navbar-user {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--pink);
  background: var(--pink-pale);
  border: 1px solid var(--pink-light);
  border-radius: 20px;
  padding: 0.25rem 0.75rem;
  white-space: nowrap;
}

/* ── Settings grid ──────────────────────────────────────────────────────────── */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 900px;
}
@media (max-width: 680px) {
  .settings-grid { grid-template-columns: 1fr; }
}

/* ── Passkey list ───────────────────────────────────────────────────────────── */
.passkey-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.passkey-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
}
.passkey-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.passkey-icon { font-size: 1.4rem; }
.passkey-name { font-weight: 700; font-size: 0.95rem; color: var(--gray-800); }
.passkey-date { font-size: 0.8rem; color: var(--gray-600); margin-top: 0.1rem; }
.passkey-empty { color: var(--gray-400); font-style: italic; font-size: 0.9rem; }
.passkey-note {
  background: var(--pink-pale);
  border: 1px solid var(--pink-light);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: var(--gray-800);
  line-height: 1.5;
}
