/**
 * SentinelCareAI — layout.css
 * Layout — fondo animado, screens, header compartido
 * ─────────────────────────────────────────────────────────────
 */


/* ─── BACKGROUND ─────────────────────────────── */
.bg-layer {
  position: fixed; inset:0; z-index:0; pointer-events:none;
  background: linear-gradient(135deg, #e8f4e8 0%, #d4ecf0 40%, #f5ecd7 80%, #faf0e8 100%);
}
.bg-blob {
  position: fixed; border-radius: 50%; filter: blur(80px); opacity:0.35; pointer-events:none; z-index:0;
}
.bg-blob-1 { width:600px; height:600px; background:radial-gradient(circle, var(--sage-light), transparent); top:-200px; left:-200px; animation: blobFloat 12s ease-in-out infinite alternate; }
.bg-blob-2 { width:500px; height:500px; background:radial-gradient(circle, var(--teal-light), transparent); bottom:-150px; right:-150px; animation: blobFloat 15s ease-in-out 3s infinite alternate; }
.bg-blob-3 { width:400px; height:400px; background:radial-gradient(circle, var(--gold-light), transparent); top:40%; left:40%; animation: blobFloat 18s ease-in-out 6s infinite alternate; }

@keyframes blobFloat { 0%{transform:translate(0,0) scale(1);} 100%{transform:translate(30px,40px) scale(1.08);} }

/* ─── OFFLINE BANNER ──────────────────────────── */
#offline-banner {
  display: none;
  background: linear-gradient(90deg, #b7601a, #e67e22);
  color: white;
  text-align: center;
  padding: 9px 16px;
  position: sticky;
  top: 0;
  z-index: 20000;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid rgba(255,255,255,0.15);
  letter-spacing: 0.01em;
}
#offline-banner i { margin-right: 6px; }

/* ─── SCREENS ─────────────────────────────────── */
.screen { display:none; min-height:100vh; position:relative; z-index:1; }
.screen.active { display:flex; flex-direction:column; }

/* ─── SCREEN 1: LANDING ────────────────────────── */
#s-landing {
  align-items:center; justify-content:center;
  padding: 40px 20px;
  animation: fadeIn 0.8s ease;
}

@keyframes fadeIn { from{opacity:0; transform:translateY(20px);} to{opacity:1; transform:translateY(0);} }

.landing-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 56px 48px 48px;
  max-width: 760px;
  width: 100%;
  text-align: center;
}

.logo-mark {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, var(--sage), var(--teal));
  border-radius: 50%;
  display: flex; align-items:center; justify-content:center;
  margin: 0 auto 24px;
  font-size: 28px; color: white;
  box-shadow: 0 8px 24px rgba(107,143,113,0.4);
}

.landing-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.15;
  margin-bottom: 12px;
}
.landing-title span { color: var(--teal); }

.landing-subtitle {
  font-size: 1.1rem;
  color: var(--text-mid);
  line-height: 1.7;
  max-width: 520px;
  margin: 0 auto 40px;
}

.divider {
  height:1px; background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 32px 0; border:none;
}

.choose-label {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 20px;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
}

.profile-card {
  background: var(--warm-white);
  border: 2px solid var(--border);
  border-radius: 18px;
  padding: 28px 20px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  text-align: center;
  position:relative; overflow:hidden;
}
.profile-card::before {
  content:''; position:absolute; inset:0; opacity:0;
  transition: opacity 0.3s;
  border-radius: 16px;
}
.profile-card.joven::before   { background: linear-gradient(135deg, rgba(107,143,113,0.08), rgba(168,197,173,0.12)); }
.profile-card.adulto::before  { background: linear-gradient(135deg, rgba(61,122,138,0.08), rgba(126,184,196,0.12)); }
.profile-card.salud::before   { background: linear-gradient(135deg, rgba(200,151,74,0.08), rgba(232,196,138,0.12)); }
.profile-card.maestro::before { background: linear-gradient(135deg, rgba(150,100,180,0.08), rgba(200,160,220,0.12)); }
.profile-card.padre::before   { background: linear-gradient(135deg, rgba(155,139,180,0.12), rgba(197,185,218,0.12)); }

.profile-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.profile-card:hover::before { opacity:1; }
.profile-card:hover { border-color: var(--sage); }

.profile-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex; align-items:center; justify-content:center;
  margin: 0 auto 14px;
  font-size: 22px;
}
.joven .profile-icon   { background: rgba(107,143,113,0.15); color: var(--sage); }
.adulto .profile-icon  { background: rgba(61,122,138,0.15);  color: var(--teal); }
.salud .profile-icon   { background: rgba(200,151,74,0.15);  color: var(--gold); }
.maestro .profile-icon { background: rgba(150,100,180,0.15); color: #9664b4; }
.padre .profile-icon   { background: rgba(155,139,180,0.2);  color: #7a5f9e; }


.profile-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem; font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}
.profile-desc {
  font-size: 0.82rem;
  color: var(--text-light);
  line-height: 1.5;
}

.notice-box {
  background: rgba(107,143,113,0.08);
  border: 1px solid rgba(107,143,113,0.2);
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 0.85rem;
  color: var(--text-mid);
  line-height: 1.6;
}
.notice-box i { color: var(--sage); margin-right: 6px; }

/* ─── SHARED HEADER ───────────────────────────── */
.app-header {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  display: flex; align-items:center; justify-content:space-between;
  height: 64px; position:sticky; top:0; z-index:100;
}
.header-brand {
  display:flex; align-items:center; gap: 12px;
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem; font-weight: 600;
  color: var(--text-dark);
  flex-shrink: 0;
}
.header-dot {
  width: 32px; height:32px; border-radius:50%;
  background: linear-gradient(135deg, var(--sage), var(--teal));
  display:flex; align-items:center; justify-content:center;
  color:white; font-size:14px;
}
.header-badge {
  font-size: 0.75rem; font-weight:600;
  padding: 4px 12px; border-radius: 20px;
  background: rgba(107,143,113,0.12);
  color: var(--sage);
}
.btn-back {
  background:none; border: 1px solid var(--border); border-radius:8px;
  padding: 6px 14px; cursor:pointer; font-size:0.85rem;
  color: var(--text-mid); display:flex; align-items:center; gap:6px;
  transition: all 0.2s; font-family: 'DM Sans', sans-serif;
}
.btn-back:hover { background: white; color: var(--teal); border-color: var(--teal); }

/* Fila de botones del chat — scroll horizontal como los tabs del panel pro */
.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex-shrink: 1;
  min-width: 0;
  padding-right: 4px;
}
.chat-header-actions::-webkit-scrollbar { display: none; }
.chat-header-actions .btn-back,
.chat-header-actions .btn-save-session,
.chat-header-actions .dark-toggle { white-space: nowrap; flex-shrink: 0; }

