/* ============================================================
   STRONG DAYS — Brand-matched Styles
   ============================================================ */
:root {
  --light-blue: #B4CCE8;
  --purple: #6667AB;
  --pink-soft: #FFABDF;
  --pink-hot: #FF0092;
  --ink: #1F1B2E;
  --ink-soft: #54506B;
  --line: #ECE5F0;
  --cream: #FFF6FB;
  --white: #FFFFFF;
  --success: #2ECC71;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --shadow-sm: 0 4px 12px rgba(40, 40, 90, 0.06);
  --shadow: 0 12px 30px rgba(40, 40, 90, 0.10);
  --shadow-lg: 0 20px 50px rgba(255, 0, 145, 0.18);
}

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

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  background: linear-gradient(180deg, #FFFFFF 0%, var(--cream) 100%);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
input, select { -webkit-appearance: none; appearance: none; }
a { color: var(--pink-hot); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: 'Manrope', -apple-system, sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
}

.eyebrow {
  display: inline-block;
  font-weight: 800;
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--pink-hot);
  margin-bottom: 10px;
}

/* ============ LAYOUT ============ */
.app { max-width: 560px; margin: 0 auto; padding: 24px 20px 80px; min-height: 100vh; }
.app-wide { max-width: 1100px; }

/* ============ HERO LOGO + PERSONAL GREETING ============ */
.sd-hero-logo {
  text-align: center;
  margin: 8px 0 12px;
}
.sd-hero-logo img {
  max-width: 100%;
  height: auto;
  max-height: 160px;
  display: block;
  margin: 0 auto;
}
.sd-hero-tagline {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--purple);
  margin: 12px auto 4px;
  max-width: 400px;
  line-height: 1.4;
  letter-spacing: -.005em;
}
.sd-greeting {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: clamp(1.4rem, 5vw, 1.8rem);
  color: var(--ink);
  margin: 6px 4px 18px;
  letter-spacing: -.02em;
  line-height: 1.15;
}
.sd-greeting .wave {
  display: inline-block;
  animation: wave 1.6s ease-in-out infinite;
  transform-origin: 70% 70%;
}
@keyframes wave {
  0%, 60%, 100% { transform: rotate(0deg); }
  10%, 30% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  40% { transform: rotate(14deg); }
  50% { transform: rotate(0deg); }
}

/* Footer logo */
.foot-logo {
  max-width: 120px;
  height: auto;
  display: block;
  margin: 0 auto 12px;
  opacity: 0.85;
}

/* ============ HEADER ============ */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--purple);
}
.brand .dot {
  width: 10px; height: 10px;
  background: var(--pink-hot);
  border-radius: 50%;
  display: inline-block;
}
.header-actions { display: flex; gap: 8px; }
.icon-btn {
  font-size: .82rem;
  color: var(--ink-soft);
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--white);
}
.icon-btn:hover { border-color: var(--purple); color: var(--purple); }

/* ============ CARDS ============ */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  margin-bottom: 16px;
}
.card-lg { padding: 32px 24px; }

/* ============ HERO (logged-out state) ============ */
.hero {
  text-align: center;
  padding: 32px 4px 40px;
}
.hero .eyebrow {
  background: linear-gradient(135deg, var(--pink-hot), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero h1 {
  font-size: clamp(2.2rem, 8vw, 3rem);
  margin-bottom: 12px;
}
.hero h1 .pink { color: var(--pink-hot); }
.hero .sub {
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin-bottom: 26px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 26px;
  border-radius: var(--radius-pill);
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .01em;
  text-align: center;
  transition: transform .15s ease, box-shadow .2s ease, opacity .2s;
  min-height: 52px;
  width: 100%;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-primary {
  background: var(--pink-hot);
  color: var(--white);
  box-shadow: var(--shadow-lg);
}
.btn-primary:hover { box-shadow: 0 24px 60px rgba(255, 0, 145, 0.28); }
.btn-secondary {
  background: var(--white);
  color: var(--purple);
  border: 2px solid var(--purple);
}
.btn-secondary:hover { background: var(--purple); color: var(--white); }
.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  min-height: 44px;
  padding: 10px 18px;
}
.btn-ghost:hover { color: var(--pink-hot); }
.btn-inline { width: auto; }

/* ============ FORMS ============ */
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: .82rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
  letter-spacing: .01em;
}
.field input, .field select {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 1rem;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--pink-hot);
  box-shadow: 0 0 0 3px rgba(255, 0, 145, .12);
}

.form-error {
  background: #FEEBEE;
  color: #C0392B;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  margin-bottom: 12px;
}
.form-info {
  background: #EAF3FE;
  color: #1F4E96;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: .92rem;
  margin-bottom: 12px;
  line-height: 1.5;
}
.form-success {
  background: #E7F8ED;
  color: #1E7A45;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: .92rem;
  margin-bottom: 12px;
}

/* ============ DASHBOARD STATS ============ */
.stats-hero {
  text-align: center;
  padding: 8px 0 4px;
}
.stats-hero .label {
  font-size: .78rem;
  font-weight: 700;
  color: var(--purple);
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.stats-hero .count {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: clamp(3.5rem, 14vw, 5rem);
  line-height: 1;
  color: var(--ink);
  letter-spacing: -.04em;
}
.stats-hero .count .goal {
  color: var(--ink-soft);
  font-weight: 700;
}
.stats-hero .remaining {
  color: var(--pink-hot);
  font-weight: 700;
  font-size: 1rem;
  margin-top: 10px;
}
.stats-hero .remaining.done {
  color: var(--success);
}

/* Progress bar */
.progress {
  height: 12px;
  background: var(--line);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin: 20px 0 4px;
  position: relative;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pink-hot) 0%, var(--purple) 100%);
  border-radius: var(--radius-pill);
  transition: width .5s ease;
  min-width: 0;
}
.progress-caption {
  display: flex;
  justify-content: space-between;
  font-size: .78rem;
  color: var(--ink-soft);
  margin-top: 8px;
  font-weight: 600;
}

/* ============ CTA log button ============ */
.log-cta {
  margin: 20px 0 24px;
}
.log-cta .btn { font-size: 1.05rem; }
.log-cta .today-label {
  text-align: center;
  font-size: .82rem;
  color: var(--ink-soft);
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: .01em;
}

.log-cta.done .btn-primary {
  background: linear-gradient(135deg, var(--pink-hot), var(--purple));
}
.log-cta.done .today-label {
  color: var(--success);
  font-weight: 700;
}

/* ============ CALENDAR ============ */
.calendar-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}
.calendar-head h3 {
  font-size: 1.05rem;
  color: var(--purple);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.calendar-legend {
  font-size: .78rem;
  color: var(--ink-soft);
  display: flex;
  gap: 12px;
}
.calendar-legend .dot-star { color: var(--pink-hot); font-weight: 800; }
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}
.dow {
  text-align: center;
  font-size: .68rem;
  font-weight: 700;
  color: var(--ink-soft);
  letter-spacing: .1em;
  padding: 4px 0;
}
.day {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: .82rem;
  font-weight: 700;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid transparent;
  padding: 2px;
  transition: transform .12s;
  min-height: 42px;
  position: relative;
}
.day.empty { visibility: hidden; }
.day.in-month {
  background: var(--white);
  border-color: var(--line);
  color: var(--ink);
}
.day.past.in-month { color: var(--ink-soft); }
.day.today {
  background: var(--purple);
  color: var(--white);
  border-color: var(--purple);
  box-shadow: 0 6px 14px rgba(102, 103, 171, 0.30);
}
.day.today .day-num { font-weight: 800; }
.day.done {
  background: linear-gradient(135deg, var(--pink-hot), var(--purple));
  border-color: transparent;
  color: var(--white);
}
.day.done.today {
  background: linear-gradient(135deg, var(--pink-hot), var(--purple));
  outline: 3px solid var(--purple);
  outline-offset: 2px;
}
.day.done .star { font-size: .9rem; margin-top: 1px; }
.day.future { opacity: 0.4; cursor: not-allowed; }
.day.clickable { cursor: pointer; }
.day.clickable:hover { transform: scale(1.05); }
.day-num { line-height: 1; }

/* ============ MESSAGING QUOTE ============ */
.quote-block {
  text-align: center;
  padding: 24px 12px;
  margin: 20px 0;
}
.quote-block .quote {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--purple);
  line-height: 1.35;
  margin-bottom: 10px;
}
.quote-block .quote-sub {
  color: var(--ink-soft);
  font-size: .88rem;
  max-width: 400px;
  margin: 0 auto;
  line-height: 1.55;
}

/* ============ CHECKBOX LOG SCREEN ============ */
.log-screen {
  padding: 0 4px;
}
.log-screen h2 {
  font-size: 1.6rem;
  margin-bottom: 8px;
}
.log-screen .log-date {
  color: var(--ink-soft);
  font-size: .95rem;
  margin-bottom: 20px;
}
.pillar-group { margin-bottom: 22px; }
.pillar-group .pillar-label {
  font-family: 'Manrope', sans-serif;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--pink-hot);
  margin-bottom: 8px;
  padding-left: 4px;
}
.pillar-group .pillar-sub {
  color: var(--ink-soft);
  font-size: .82rem;
  padding-left: 4px;
  margin-bottom: 8px;
}
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
  transition: border-color .2s, background .2s;
  margin-bottom: 8px;
  user-select: none;
}
.check-row:hover { border-color: var(--pink-soft); }
.check-row.checked {
  background: linear-gradient(135deg, rgba(255, 171, 223, 0.18), rgba(180, 204, 232, 0.18));
  border-color: var(--pink-hot);
}
.check-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  border: 2px solid var(--line);
  border-radius: 7px;
  background: var(--white);
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  transition: border-color .2s, background .2s;
  margin-top: 1px;
}
.check-row.checked input[type="checkbox"] {
  background: var(--pink-hot);
  border-color: var(--pink-hot);
}
.check-row input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  top: 3px; left: 8px;
  width: 6px; height: 12px;
  border: solid var(--white);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
.check-label {
  font-size: .98rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
}
.check-hint {
  display: block;
  font-size: .78rem;
  font-weight: 400;
  color: var(--ink-soft);
  line-height: 1.4;
  margin-top: 4px;
  font-style: italic;
}

/* Log action row */
.log-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}
.log-actions .btn { min-height: 52px; }

/* ============ COMPLETION FLASH ============ */
.flash-complete {
  text-align: center;
  padding: 30px 20px;
}
.flash-complete .star {
  font-size: 4rem;
  margin-bottom: 10px;
  display: inline-block;
  animation: pop .35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.flash-complete h2 {
  font-size: 1.8rem;
  color: var(--pink-hot);
  margin-bottom: 8px;
}
.flash-complete p {
  color: var(--ink-soft);
  font-size: 1rem;
  margin-bottom: 20px;
}
@keyframes pop {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* ============ PARTIAL COMPLETION FLASH ============ */
.flash-partial {
  text-align: center;
  padding: 28px 20px;
}
.flash-partial .star-partial {
  font-size: 3.5rem;
  margin-bottom: 8px;
  display: inline-block;
  animation: pop .35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.flash-partial h2 {
  font-size: 1.6rem;
  color: var(--purple);
  margin-bottom: 10px;
}
.flash-partial p {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 22px;
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
}
.flash-partial p strong {
  color: var(--pink-hot);
}
.flash-partial .btn-ghost { margin-top: 6px; }

/* ============ PROFILE NAME CAPTURE ============ */
.profile-nag {
  background: linear-gradient(135deg, rgba(255, 171, 223, 0.22), rgba(180, 204, 232, 0.22));
  border: 1.5px solid var(--pink-hot);
  border-radius: var(--radius);
  padding: 20px 20px;
  margin-bottom: 16px;
}
.profile-nag h3 {
  font-size: 1.15rem;
  color: var(--pink-hot);
  margin-bottom: 6px;
}
.profile-nag p {
  color: var(--ink);
  font-size: .92rem;
  margin-bottom: 14px;
}
.profile-nag .field { margin-bottom: 10px; }
.profile-nag .btn { margin-top: 6px; }

/* ============ FINISHER ============ */
.finisher-badge {
  background: linear-gradient(135deg, var(--pink-hot), var(--purple));
  color: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  margin-bottom: 20px;
}
.finisher-badge .party { font-size: 2rem; margin-bottom: 4px; }
.finisher-badge h3 {
  color: var(--white);
  font-size: 1.4rem;
  margin-bottom: 6px;
}
.finisher-badge p {
  color: rgba(255, 255, 255, 0.92);
  font-size: .95rem;
}

/* ============ END OF CHALLENGE RESULTS ============ */
.results-hero {
  text-align: center;
  padding: 12px 0 4px;
}
.results-hero .results-label {
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .18em;
  color: var(--purple);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.results-hero .results-count {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: clamp(3rem, 12vw, 4.5rem);
  color: var(--pink-hot);
  line-height: 1;
  margin-bottom: 10px;
}
.results-hero .results-desc {
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 600;
}

/* ============ MODAL OVERLAY ============ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(31, 27, 46, .60);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100;
  overflow-y: auto;
  padding: 20px;
  align-items: flex-start;
  justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  padding: 28px 24px 24px;
  position: relative;
  margin: auto;
}
.modal-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--cream);
  color: var(--ink-soft);
  font-size: 1.3rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { background: var(--line); }

/* ============ ADMIN ============ */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}
.admin-header h1 {
  font-size: clamp(1.6rem, 4vw, 2rem);
}
.admin-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.metric {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px;
  border: 1px solid var(--line);
}
.metric .m-label {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.metric .m-value {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 1.8rem;
  color: var(--pink-hot);
  line-height: 1;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.chip {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--line);
  background: var(--white);
  font-size: .82rem;
  font-weight: 700;
  color: var(--ink);
}
.chip:hover { border-color: var(--purple); }
.chip.active { background: var(--purple); color: var(--white); border-color: var(--purple); }

.admin-table-wrap {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  font-size: .92rem;
}
.admin-table th {
  text-align: left;
  padding: 14px 16px;
  background: var(--cream);
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.admin-table th.sort-active { color: var(--pink-hot); }
.admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(180, 204, 232, 0.10); }
.admin-table .strong-cell {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  color: var(--pink-hot);
}
.admin-table .badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.badge-finish { background: rgba(255, 0, 145, .12); color: var(--pink-hot); }
.badge-30 { background: linear-gradient(135deg, var(--pink-hot), var(--purple)); color: var(--white); }

.callout-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.callout {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px 18px;
  border: 1px solid var(--line);
}
.callout .c-title {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: .95rem;
  margin-bottom: 6px;
}
.callout .c-body {
  font-size: .85rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

/* ============ FOOTER-Y ============ */
.foot {
  text-align: center;
  margin-top: 24px;
  color: var(--ink-soft);
  font-size: .78rem;
}
.foot a { color: var(--ink-soft); }
.foot .strong-season {
  display: block;
  margin-top: 8px;
  font-weight: 700;
  color: var(--purple);
  letter-spacing: .08em;
  font-size: .8rem;
}

/* ============ UTILITIES ============ */
.hidden { display: none !important; }
.centered { text-align: center; }
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255,255,255,0.35);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.text-sm { font-size: .88rem; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }

/* Mobile tightening */
@media (max-width: 480px) {
  .app { padding: 20px 16px 60px; }
  .card { padding: 22px 18px; }
  .card-lg { padding: 26px 20px; }
  .modal { padding: 24px 18px; }
  .btn { font-size: .98rem; }
}
