/*
 * CSS de arranque con los design tokens del boceto (sección 7.2 de la doc técnica).
 * Esto NO es Tailwind: es un CSS plano que reproduce el look & feel para poder
 * navegar el sistema desde ya. Cuando definan la maqueta final, se compila
 * Tailwind localmente (con estos mismos tokens en tailwind.config.js) y se
 * sube el app.css resultante por FTP, reemplazando este archivo.
 */

:root {
  --color-primary: #7C3AED;
  --color-primary-light: #C4B5FD;
  --gradient-bg: linear-gradient(135deg, #F5F3FF, #FCE7F3);
  --color-success: #16A34A;
  --color-warning: #D97706;
  --color-danger: #DC2626;
  --color-text: #1F2937;
  --color-text-muted: #6B7280;
  --color-border: #E5E7EB;
  --radius-card: 1rem;
  --shadow-card: 0 4px 16px rgba(124, 58, 237, 0.08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--color-text);
  background: var(--gradient-bg);
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }

/* ---------- Layout dashboard interno ---------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 240px;
  background: #ffffff;
  border-right: 1px solid var(--color-border);
  padding: 1.25rem 1rem;
  flex-shrink: 0;
}
.sidebar-brand { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: 1.25rem; margin-bottom: 1.5rem; color: var(--color-primary); }
.sidebar-nav { display: flex; flex-direction: column; gap: .25rem; }
.sidebar-link { padding: .6rem .75rem; border-radius: .6rem; color: var(--color-text-muted); font-weight: 500; }
.sidebar-link:hover { background: #F5F3FF; color: var(--color-primary); }
.sidebar-link.is-active { background: var(--color-primary); color: #fff; }

.app-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.5rem; background: #fff; border-bottom: 1px solid var(--color-border);
}
.topbar-search input {
  width: 320px; max-width: 40vw; padding: .55rem .9rem; border-radius: .6rem;
  border: 1px solid var(--color-border); background: #F9FAFB;
}
.topbar-actions { display: flex; align-items: center; gap: 1rem; }
.topbar-icon { cursor: pointer; font-size: 1.1rem; }
.topbar-avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--color-primary);
  color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700;
}

.app-content { padding: 1.5rem; }
.page-title { font-size: 1.5rem; font-weight: 700; margin: 0 0 1rem; }

/* ---------- KPIs / Panels ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.kpi-card {
  background: #fff; border-radius: var(--radius-card); box-shadow: var(--shadow-card);
  padding: 1.1rem 1.25rem; display: flex; flex-direction: column; gap: .25rem;
}
.kpi-card-success { border-left: 4px solid var(--color-success); }
.kpi-label { font-size: .85rem; color: var(--color-text-muted); }
.kpi-value { font-size: 1.7rem; font-weight: 700; }
.kpi-sub { font-size: .75rem; color: var(--color-text-muted); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-bottom: 1.5rem; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

.panel { background: #fff; border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 1.25rem; }
.panel-header h2 { font-size: 1.05rem; margin: 0 0 .75rem; }

.empty-state { color: var(--color-text-muted); font-style: italic; padding: .5rem 0; }

.evento-list, .tarea-list, .checklist-list, .muro-lista { display: flex; flex-direction: column; gap: .6rem; }
.evento-item { display: flex; align-items: center; justify-content: space-between; padding: .5rem 0; border-bottom: 1px solid var(--color-border); }
.evento-item:last-child { border-bottom: none; }
.evento-fecha { display: block; font-size: .8rem; color: var(--color-text-muted); }
.score-ring {
  width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 700; color: var(--color-primary);
  background: conic-gradient(var(--color-primary) calc(var(--score) * 1%), #EDE9FE 0);
}
.score-ring::before {
  content: ''; position: relative;
}

.tarea-item { display: flex; flex-direction: column; gap: .15rem; padding: .5rem 0; border-bottom: 1px solid var(--color-border); }
.tarea-item:last-child { border-bottom: none; }
.tarea-meta { font-size: .8rem; color: var(--color-text-muted); }

.badge { padding: .1rem .5rem; border-radius: 999px; font-size: .7rem; font-weight: 700; }
.badge-danger { background: #FEE2E2; color: var(--color-danger); }
.badge-warning { background: #FEF3C7; color: var(--color-warning); }

.checklist-item label { display: flex; align-items: center; gap: .5rem; }
.checklist-item.is-done label { text-decoration: line-through; color: var(--color-text-muted); }
.checklist-meta { font-size: .75rem; color: var(--color-text-muted); }

.progress-bar { background: #EDE9FE; border-radius: 999px; height: 10px; overflow: hidden; margin-top: .35rem; }
.progress-bar-fill { background: var(--color-primary); height: 100%; border-radius: 999px; transition: width .3s ease; }
.score-grande { font-size: 2.25rem; font-weight: 700; margin: 0; color: var(--color-primary); }

.rsvp-resumen { display: flex; gap: 1.5rem; }
.rsvp-resumen div { display: flex; flex-direction: column; align-items: center; }
.rsvp-num { font-size: 1.5rem; font-weight: 700; }
.rsvp-confirmados { color: var(--color-success); }
.rsvp-pendientes { color: var(--color-warning); }
.rsvp-no-asisten { color: var(--color-danger); }

.ficha-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.ficha-subtitle { color: var(--color-text-muted); margin: .15rem 0 0; }

.tabla { width: 100%; border-collapse: collapse; }
.tabla th, .tabla td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--color-border); }
.tabla th { font-size: .8rem; color: var(--color-text-muted); text-transform: uppercase; }

/* ---------- Botones y forms ---------- */
.btn { display: inline-block; padding: .65rem 1.1rem; border-radius: .6rem; font-weight: 600; border: none; cursor: pointer; }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: #6D28D9; }
.btn-outline { background: #fff; border: 1px solid var(--color-primary); color: var(--color-primary); }
.btn-block { width: 100%; }

form label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .85rem; color: var(--color-text-muted); }
form input, form textarea {
  display: block; width: 100%; margin-top: .3rem; padding: .6rem .75rem; border-radius: .5rem;
  border: 1px solid var(--color-border); font-size: 1rem; font-family: inherit;
}
form fieldset { border: none; padding: 0; margin: 0 0 .85rem; }
form fieldset legend { font-size: .85rem; font-weight: 600; color: var(--color-text-muted); padding: 0; margin-bottom: .3rem; }
form fieldset label { display: inline-block; font-weight: 400; margin-right: 1rem; }
.checkbox-inline { display: flex; align-items: center; gap: .4rem; }
.checkbox-inline input { width: auto; }

.alert { padding: .75rem 1rem; border-radius: .6rem; margin-bottom: 1rem; font-size: .9rem; }
.alert-success { background: #DCFCE7; color: var(--color-success); }
.alert-danger { background: #FEE2E2; color: var(--color-danger); }

/* ---------- Login ---------- */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card { background: #fff; border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 2.5rem; width: 360px; }
.login-brand { font-size: 1.5rem; font-weight: 700; color: var(--color-primary); text-align: center; }
.login-subtitle { text-align: center; color: var(--color-text-muted); margin: .25rem 0 1.5rem; }

/* ---------- Landing pública del evento ---------- */
.publico-body { background: #0F0A1E; }
.hero-evento {
  min-height: 60vh; display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(rgba(15,10,30,.15), rgba(15,10,30,.75)),
              url('https://images.unsplash.com/photo-1519741497674-611481863552?q=80&w=1600&auto=format&fit=crop') center/cover;
  color: #fff; padding: 2rem;
}
.hero-nav { display: flex; flex-wrap: wrap; gap: 1.25rem; justify-content: center; margin-bottom: 3rem; font-size: .9rem; }
.hero-contenido { text-align: center; }
.hero-contenido h1 { font-size: clamp(2rem, 6vw, 3.5rem); margin: 0; letter-spacing: .05em; }
.hero-fecha { font-size: 1.1rem; opacity: .9; }

.seccion { max-width: 640px; margin: 0 auto; padding: 3rem 1.5rem; color: #fff; text-align: center; }
.seccion h2 { font-size: 1.6rem; margin-bottom: .5rem; }
.form-rsvp, .form-saludo { text-align: left; background: rgba(255,255,255,.06); padding: 1.5rem; border-radius: var(--radius-card); margin-top: 1.5rem; }
.form-rsvp label, .form-saludo textarea, .form-saludo input { color: #fff; }
.form-rsvp input, .form-saludo input, .form-saludo textarea { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); color: #fff; }
.form-saludo textarea { min-height: 80px; margin-bottom: .85rem; }

.muro-lista { margin-top: 1.5rem; text-align: left; }
.muro-item { background: rgba(255,255,255,.06); border-radius: .7rem; padding: .85rem 1rem; margin-bottom: .6rem; }
.muro-item strong { color: var(--color-primary-light); }
.muro-item p { margin: .25rem 0 0; }
