/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* === Luuna Sleep — paleta de la marca (#3C6394) y de la app iOS === */
:root {
  --luuna-deep: #17335c;
  --luuna-brand: #3C6394;
  --luuna-soft: #dbe5f5;
  --luuna-accent: #ed8c24;
  --card: #ffffff;
}
body {
  font-family: -apple-system, "Helvetica Neue", sans-serif;
  background: var(--luuna-soft);
  color: var(--luuna-deep);
  margin: 0;
  min-height: 100vh;
}
.auth-card, .dash {
  max-width: 420px;
  margin: 8vh auto;
  background: var(--card);
  border-radius: 24px;
  padding: 36px;
  box-shadow: 0 8px 30px rgb(23 51 92 / .08);
}
.dash { max-width: 720px; }
h1 { margin: 0 0 4px; font-size: 28px; }
.sub { margin: 0 0 24px; opacity: .65; }
label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 4px; }
input[type=email], input[type=password], input[type=text] {
  width: 100%; box-sizing: border-box; padding: 12px 14px;
  border: 1.5px solid var(--luuna-soft); border-radius: 12px; font-size: 16px;
}
.consent { font-weight: 400; font-size: 13px; line-height: 1.45; margin: 18px 0; display: flex; gap: 10px; }
.consent input { margin-top: 2px; }
.btn-primary {
  width: 100%; padding: 13px; margin-top: 6px; border: 0; border-radius: 12px;
  background: var(--luuna-brand); color: white; font-size: 16px; font-weight: 700; cursor: pointer;
}
.btn-primary:hover { background: var(--luuna-deep); }
.btn-ghost { background: none; border: 0; color: var(--luuna-brand); cursor: pointer; font-size: 14px; }
.alt { text-align: center; font-size: 14px; margin-top: 18px; }
.alt a { color: var(--luuna-brand); font-weight: 600; }
.errors { background: #fdecec; border-radius: 12px; padding: 10px 14px; font-size: 14px; color: #a33; }
.errors p { margin: 4px 0; }
.dash-head { display: flex; justify-content: space-between; align-items: center; }
.empty { opacity: .7; line-height: 1.5; }

/* === Dashboard === */
.score-row { display: flex; gap: 28px; align-items: center; margin: 24px 0; }
.score-circle {
  width: 120px; height: 120px; border-radius: 50%; flex-shrink: 0;
  background: conic-gradient(var(--luuna-accent) 0turn, var(--luuna-brand) .75turn, var(--luuna-soft) 0);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: white; box-shadow: inset 0 0 0 8px rgb(255 255 255 / .15);
}
.score-num { font-size: 40px; font-weight: 800; line-height: 1; }
.score-label { font-size: 11px; opacity: .9; }
.big { font-size: 26px; font-weight: 700; margin: 0; }
.big small { font-size: 15px; font-weight: 400; opacity: .6; }
.muted { margin: 4px 0 0; opacity: .6; font-size: 14px; }
.src { text-transform: capitalize; }
.stages h2, .trend h2 { font-size: 15px; margin: 26px 0 10px; opacity: .7; }
.stage-row { display: grid; grid-template-columns: 76px 1fr 90px; gap: 12px; align-items: center; margin: 8px 0; font-size: 14px; }
.bar { background: var(--luuna-soft); height: 10px; border-radius: 5px; overflow: hidden; }
.fill { height: 100%; border-radius: 5px; }
.fill-rem { background: #a84fd6; }
.fill-deep { background: var(--luuna-deep); }
.fill-light { background: #5f95e0; }
.stage-min { text-align: right; opacity: .75; }
.trend-bars { display: flex; gap: 10px; align-items: flex-end; height: 90px; }
.trend-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.trend-fill { width: 100%; background: var(--luuna-brand); border-radius: 6px 6px 0 0; min-height: 4px; }
.trend-day { font-size: 11px; opacity: .55; margin-top: 4px; text-transform: capitalize; }
.insight { margin-top: 24px; background: #fff7ec; border-radius: 14px; padding: 14px 16px; font-size: 14px; line-height: 1.5; }

/* === Rutinas === */
.routine-card { background: #f7fafe; border-radius: 16px; padding: 18px 20px; margin: 14px 0; }
.routine-card h2 { margin: 0 0 4px; font-size: 17px; }
.routine-row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-top: 10px; font-size: 14px; }
.routine-row input[type=time] { padding: 6px 10px; border: 1.5px solid var(--luuna-soft); border-radius: 10px; font-size: 15px; }
.switch { display: flex; gap: 6px; align-items: center; font-weight: 600; }

/* === Logo === */
/* El mismo archivo que usa la app iOS, para que la marca no se desincronice
   entre pantalla y navegador. */
.wordmark {
  height: 26px;
  width: auto;
  display: block;
  margin-bottom: 14px;
}
.auth-card .wordmark { margin: 0 auto 18px; }
.brand { display: flex; flex-direction: column; gap: 2px; }
.brand .wordmark { margin-bottom: 6px; }
.brand h1 { margin: 0; }

/* === Hábitos: lo que dicen tus últimos meses === */
.profile { margin-top: 26px; }
.profile h2 { font-size: 15px; margin-bottom: 12px; }
.habits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 10px;
}
.habit {
  background: var(--luuna-soft);
  border-radius: 14px;
  padding: 12px 8px;
  text-align: center;
}
.habit-value {
  display: block;
  font-size: 21px;
  font-weight: 700;
  color: var(--luuna-deep);
  line-height: 1.1;
}
.habit-value small { font-size: 12px; font-weight: 600; opacity: .7; }
.habit-label {
  display: block;
  font-size: 11px;
  color: #6b7a90;
  margin-top: 3px;
}
.small { font-size: 12px; }
