/* =========================================================================
   MENSTRUAL HEALTH PORTAL - LUXURY BLUSH & ROSE PINK DESIGN SYSTEM
   100% Pink/Rose Palette - Strictly Zero Blue / Teal
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
  /* Warm Rose Primary Palette */
  --primary: #e11d48;              /* Vibrant rose */
  --primary-hover: #be123c;        /* Deep rich rose */
  --primary-light: #fff1f2;        /* Soft petal pink surface */
  --primary-border: #fecdd3;       /* Delicate blush pink border */
  --primary-text: #9f1239;         /* High-contrast berry text */
  
  /* Backgrounds & Neutrals (Warm Plum-Charcoal, NO blue) */
  --bg: #fff5f7;                   /* Powder warm blush background */
  --card-bg: #ffffff;
  --text-main: #27171d;            /* Deep espresso plum (warm charcoal) */
  --text-muted: #7c686e;           /* Dusty rose secondary text */
  --border: #f5e1e5;               /* Gentle pinkish-gray divider */
  --border-focus: #e11d48;
  
  /* Clinical Status Alerts */
  --danger: #e11d48;
  --danger-light: #fff1f2;
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --success: #10b981;
  --success-light: #ecfdf5;

  /* Shapes & Shadows */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 3px 0 rgba(225, 29, 72, 0.04);
  --shadow-md: 0 4px 10px -2px rgba(225, 29, 72, 0.08);
}

/* Base Reset - Lock horizontal scrolling */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  min-height: 100%;
  background-color: var(--bg);
  color: var(--text-main);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
}

/* Mobile Application Frame */
.mobile-wrapper {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  box-shadow: 0 0 25px rgba(225, 29, 72, 0.06);
}

/* Sticky Header & Progress Bar */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 14px 20px 10px;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--primary);
}

.step-counter {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  background-color: var(--primary-light);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--primary-border);
}

.progress-track {
  width: 100%;
  height: 6px;
  background-color: var(--primary-light);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #f43f5e, #fb7185);
  border-radius: 999px;
  transition: width 0.35s ease;
}

/* Main Content Area */
.app-content {
  flex: 1;
  padding: 20px;
}

/* Screens */
.step-screen {
  display: none;
  animation: fadeIn 0.25s ease-out;
}

.step-screen.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Section Header Card */
.section-intro-card {
  background: linear-gradient(135deg, #fff1f2 0%, #fdf2f8 100%);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 22px;
}

.section-intro-card h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #9f1239;
  margin-bottom: 6px;
}

.section-intro-card p {
  font-size: 0.88rem;
  color: #881337;
  line-height: 1.45;
}

/* Question Cards */
.question-card {
  background-color: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.question-card:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.1);
}

.question-label {
  display: block;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.45;
  margin-bottom: 12px;
}

.question-help {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: -8px;
  margin-bottom: 14px;
}

/* Option Groups & Radio Pill Selectors */
.pill-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pill-grid-horizontal {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  gap: 6px;
}

.pill-option {
  position: relative;
  display: flex;
}

.pill-option input[type="radio"],
.pill-option input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.pill-label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 48px;
  padding: 10px 16px;
  background-color: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.pill-option input:checked + .pill-label {
  background-color: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-text);
  font-weight: 600;
}

/* Pain Scale (0-10 Buttons) */
.scale-scroll-container {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.scale-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 6px 2px;
  background-color: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.pill-option input:checked + .scale-label {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

/* Inputs & Textareas */
.text-input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-main);
  background-color: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.text-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.12);
}

.number-input-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.number-input-row:last-child {
  border-bottom: none;
}

.number-input-row span {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-main);
  padding-right: 12px;
}

.number-input-row input {
  width: 90px;
  min-height: 44px;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
}

.number-input-row input:focus {
  border-color: var(--border-focus);
}

/* Checkbox Chips (Multi-select) */
.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-option {
  position: relative;
}

.chip-option input {
  position: absolute;
  opacity: 0;
}

.chip-label {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 14px;
  background-color: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.18s ease;
}

.chip-option input:checked + .chip-label {
  background-color: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-text);
  font-weight: 600;
}

/* Bottom Navigation Bar */
.nav-footer {
  position: sticky;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
  padding: 14px 20px;
  display: flex;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 20px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  flex: 1;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 3px 6px rgba(225, 29, 72, 0.25);
}

.btn-primary:active {
  background-color: var(--primary-hover);
  transform: translateY(1px);
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--text-main);
  border: 1.5px solid var(--border);
  flex: 0.45;
}

.btn-secondary:active {
  background-color: var(--bg);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Thank You Screen */
.thank-you-screen {
  text-align: center;
  padding: 60px 20px;
}

.success-icon-badge {
  width: 76px;
  height: 76px;
  margin: 0 auto 24px;
  background-color: var(--primary-light);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  border: 2px solid var(--primary-border);
}

.thank-you-screen h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
}

.thank-you-screen p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Error Banner */
.error-banner {
  display: none;
  background-color: #fff1f2;
  border: 1px solid #fecdd3;
  color: #e11d48;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin-bottom: 16px;
  font-weight: 600;
}