/* ============================================================
   MIDIA — Sistema de diseño global
   ============================================================ */

:root {
  --brand:       #1A1A2E;
  --brand-soft:  #2D2D4A;
  --accent:      #7F77DD;
  --bg:          #F8F8FC;
  --surface:     #FFFFFF;
  --border:      rgba(26,26,46,0.10);
  --border-md:   rgba(26,26,46,0.18);
  --text:        #1A1A2E;
  --text-muted:  #6B6B8A;
  --text-hint:   #A0A0B8;
  --success-bg:  #EAF3DE;
  --success-txt: #3B6D11;
  --warn-bg:     #FAEEDA;
  --warn-txt:    #854F0B;
  --danger-bg:   #FCEBEB;
  --danger-txt:  #A32D2D;
  --radius-sm:   8px;
  --radius-md:   14px;
  --radius-lg:   22px;
  --radius-pill: 999px;
  --shadow-sm:   0 1px 4px rgba(26,26,46,0.07);
  --shadow-md:   0 4px 20px rgba(26,26,46,0.10);
}

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

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Pantalla centrada (login, registro, check-in) ─────────── */
.screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.screen-top {
  background: var(--brand);
  padding: 52px 28px 44px;
  border-radius: 0 0 32px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.logo {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 4px;
  text-transform: uppercase;
}

.screen-top p {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
}

.screen-body {
  padding: 28px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
}

/* ── Campos ─────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; }

.field label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 15px;
  color: var(--text);
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--accent);
}

.field textarea {
  resize: none;
  min-height: 90px;
  line-height: 1.5;
}

/* ── Opciones tipo pill ─────────────────────────────────────── */
.option-group { display: flex; flex-direction: column; gap: 8px; }

.option-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font-size: 15px;
  color: var(--text);
  user-select: none;
}

.option-pill .radio {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--border-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}

.option-pill.selected {
  border-color: var(--brand);
  background: rgba(26,26,46,0.03);
}

.option-pill.selected .radio {
  background: var(--brand);
  border-color: var(--brand);
}

.option-pill.selected .radio::after {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #fff;
}

/* ── Emojis humor ───────────────────────────────────────────── */
.emoji-row {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding: 4px 0;
}

.emoji-btn {
  flex: 1;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font-size: 22px;
  padding: 10px 4px;
}

.emoji-btn span {
  font-size: 10px;
  color: var(--text-hint);
  font-family: inherit;
}

.emoji-btn.selected {
  border-color: var(--brand);
  border-width: 2px;
  background: rgba(26,26,46,0.03);
}

/* ── Botones ─────────────────────────────────────────────────── */
.btn {
  display: block;
  width: 100%;
  padding: 15px;
  border-radius: var(--radius-md);
  border: none;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.1s;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover { opacity: 0.9; }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  padding: 10px;
  font-weight: 400;
}

/* ── Indicador de pasos ─────────────────────────────────────── */
.step-indicator {
  display: flex;
  gap: 6px;
  justify-content: center;
  padding: 4px 0 8px;
}

.step-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--border-md);
  transition: width 0.2s, background 0.2s;
}

.step-dot.active {
  background: var(--brand);
  width: 22px;
  border-radius: var(--radius-pill);
}

/* ── Pregunta del check-in ──────────────────────────────────── */
.check-q {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.check-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: -8px;
}

/* ── Flash messages ─────────────────────────────────────────── */
.flash {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
}

.flash-error   { background: var(--danger-bg);  color: var(--danger-txt);  }
.flash-success { background: var(--success-bg); color: var(--success-txt); }
.flash-warn    { background: var(--warn-bg);    color: var(--warn-txt);    }

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
}

.badge-done    { background: var(--success-bg); color: var(--success-txt); }
.badge-pending { background: var(--warn-bg);    color: var(--warn-txt);    }
.badge-miss    { background: var(--danger-bg);  color: var(--danger-txt);  }
.badge-edited  { background: #EEEDFE;           color: #534AB7;            }

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}

/* ── Avatar ─────────────────────────────────────────────────── */
.avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}

/* ── Dashboard layout ───────────────────────────────────────── */
.dash-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 12px;
}

.dash-title { font-size: 20px; font-weight: 700; }
.dash-sub   { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

.metrics-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  text-align: center;
}

.metric-num   { font-size: 28px; font-weight: 700; }
.metric-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ── Junior card en dashboard ───────────────────────────────── */
.junior-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  transition: border-color 0.15s;
}

.junior-card:hover { border-color: var(--border-md); }

.junior-info { flex: 1; }
.junior-name { font-size: 15px; font-weight: 600; }
.junior-role { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.junior-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }

/* ── Nav admin ───────────────────────────────────────────────── */
.admin-nav {
  background: var(--brand);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-nav .logo { font-size: 18px; letter-spacing: 3px; }

.admin-nav a {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.15s;
}

.admin-nav a:hover { color: #fff; }

.nav-links { display: flex; gap: 20px; align-items: center; }

/* ── Log de ediciones ───────────────────────────────────────── */
.log-row {
  border-left: 2px solid var(--accent);
  padding: 8px 0 8px 14px;
  margin-bottom: 10px;
}

.log-time  { font-size: 11px; color: var(--text-hint); }
.log-label { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.log-value { font-size: 14px; color: var(--text); }

/* ── Utilidades ─────────────────────────────────────────────── */
.mt-auto { margin-top: auto; }
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); font-size: 13px; }

@media (max-width: 400px) {
  .emoji-btn { font-size: 18px; }
  .check-q   { font-size: 19px; }
}
