/* ============================================================
   elita-remaster.css — ELITA de antes (antes de la 2.0), REMASTERIZADA.
   Misma app y misma forma: cabecera arriba, chat con el robot, barra de abajo pegada al borde,
   mismos emojis y mismos textos. Lo que sube de nivel: fondo con luz y textura, vidrio con
   borde degradado, botones con brillo, pestaña activa iluminada, campos redondos.
   Va al final del <head> de cada página. No toca la lógica de la app.
   ============================================================ */
:root {
  color-scheme: dark;
  --v-morado: #7c4dff;
  --v-morado-2: #a879ff;
  --v-rosa: #ff6fb1;
  --v-lila: #b388ff;
  --v-texto: #f7f2ff;
  --v-texto-2: #bcaee0;
  --v-texto-3: #8e81b2;
  --v-degradado: linear-gradient(135deg, #8b5cff 0%, #6a3ff0 100%);
  /* Vidrio: relleno + borde degradado (claro arriba a la izquierda, morado abajo a la derecha) */
  --v-relleno: linear-gradient(160deg, rgba(48, 32, 88, .72), rgba(22, 14, 44, .78));
  --v-filo: linear-gradient(140deg, rgba(196, 160, 255, .45), rgba(255, 255, 255, .05) 38%, rgba(255, 255, 255, .03) 62%, rgba(124, 77, 255, .35));
  --v-sombra: 0 18px 44px rgba(3, 0, 12, .5);
  --v-brillo: inset 0 1px 0 rgba(255, 255, 255, .08);
}

/* ---------- Fondo: noche morada con luces suaves y textura fina ---------- */
body.home-body {
  background:
    radial-gradient(ellipse 80% 40% at 50% -6%, rgba(138, 92, 255, .38), transparent 70%),
    radial-gradient(ellipse 55% 35% at 0% 60%, rgba(255, 111, 177, .07), transparent 70%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(124, 77, 255, .16), transparent 70%),
    linear-gradient(180deg, #1c1036 0%, #0f0824 55%, #08041a 100%) !important;
  background-attachment: fixed !important;
  color: var(--v-texto);
  -webkit-font-smoothing: antialiased;
}
body.home-body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .045; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.home-container { position: relative; z-index: 1; gap: 14px !important; }
.home-body * { font-family: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif; }

/* ---------- Vidrio con borde degradado: cabecera, chat, cajas ---------- */
.home-header, .chat-area, .notes-area, .priv-card, .lock-form {
  border: 1px solid transparent !important;
  background: var(--v-relleno) padding-box, var(--v-filo) border-box !important;
  box-shadow: var(--v-sombra), var(--v-brillo) !important;
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.home-header { border-radius: 24px !important; }
.chat-area, .notes-area { border-radius: 28px !important; }

/* Entrada suave al abrir cada pantalla */
@keyframes v-entra { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.home-header, .chat-area, .notes-area, .tab-switch, .bottom-nav { animation: v-entra .45s cubic-bezier(.2, .7, .2, 1) both; }
.chat-area, .notes-area, .tab-switch { animation-delay: .06s; }
.bottom-nav { animation-delay: .12s; }

/* ---------- Cabecera ---------- */
.home-header { gap: 6px !important; padding: 12px !important; }
.home-header .user-info { flex: 1; min-width: 0; gap: 10px !important; }
.home-header .section-title { white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 700 !important; letter-spacing: -.01em; color: var(--v-texto) !important; }
.home-header .avatar {
  background: linear-gradient(140deg, #c09bff, #7c4dff 55%, #5a2fe0) !important;
  box-shadow: 0 0 0 2px rgba(15, 8, 36, 1), 0 0 0 4px rgba(179, 136, 255, .55), 0 8px 22px rgba(124, 77, 255, .55) !important;
}
.home-header .greeting-small { color: var(--v-texto-2) !important; font-size: .8em !important; }
.home-header .greeting-name {
  font-weight: 750 !important;
  background: linear-gradient(90deg, #ffffff, #dccbff); -webkit-background-clip: text; background-clip: text; color: transparent !important;
}
.home-header .logout-btn, .home-header .menu-btn {
  margin: 0 !important; height: 40px; min-width: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 14px !important; border: 1px solid rgba(255, 255, 255, .09) !important;
  background: linear-gradient(160deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .03)) !important;
  color: var(--v-texto-2) !important; box-shadow: var(--v-brillo), 0 4px 12px rgba(3, 0, 12, .25) !important;
  transition: background .18s, border-color .18s, color .18s, transform .1s, box-shadow .18s;
}
.home-header .logout-btn { padding: 0 11px !important; font-weight: 600; }
.home-header .logout-btn:hover, .home-header .menu-btn:hover {
  background: linear-gradient(160deg, rgba(139, 92, 255, .5), rgba(106, 63, 240, .35)) !important;
  border-color: rgba(196, 160, 255, .45) !important; color: #fff !important;
  box-shadow: var(--v-brillo), 0 6px 18px rgba(124, 77, 255, .4) !important;
}
.home-header .logout-btn:active, .home-header .menu-btn:active { transform: scale(.94); }
.home-header:has(.logout-btn ~ .logout-btn ~ .logout-btn ~ .logout-btn) { gap: 5px !important; }
.home-header:has(.logout-btn ~ .logout-btn ~ .logout-btn ~ .logout-btn) .logout-btn { height: 36px; min-width: 36px; padding: 0 8px !important; border-radius: 12px !important; }

/* ---------- Chat ---------- */
/* Un foco de luz detrás del robot */
.chat-area {
  background: radial-gradient(circle at 50% 42%, rgba(138, 92, 255, .2), rgba(138, 92, 255, .05) 38%, transparent 62%) padding-box,
              var(--v-relleno) padding-box, var(--v-filo) border-box !important;
}
.chat-bubble-user {
  background: var(--v-degradado) !important; color: #fff !important;
  border-radius: 20px 20px 6px 20px !important;
  box-shadow: 0 8px 20px rgba(106, 63, 240, .35), inset 0 1px 0 rgba(255, 255, 255, .18) !important;
}
.chat-bubble-elita {
  background: linear-gradient(160deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .05)) !important;
  border: 1px solid rgba(255, 255, 255, .09) !important; border-radius: 20px 20px 20px 6px !important;
  box-shadow: var(--v-brillo) !important;
}

/* Barra de escribir: cápsula con el botón redondo brillante */
.chat-input-bar {
  background: rgba(8, 4, 22, .45) !important; border: 1px solid rgba(255, 255, 255, .09) !important;
  border-radius: 999px !important; padding: 6px !important; gap: 6px !important;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .3) !important;
}
.chat-input-bar input, .chat-input-bar textarea {
  background: transparent !important; border: none !important; box-shadow: none !important; padding-left: 14px !important;
}
.chat-input-bar:focus-within { border-color: rgba(168, 121, 255, .6) !important; box-shadow: inset 0 2px 6px rgba(0, 0, 0, .3), 0 0 0 3px rgba(124, 77, 255, .2) !important; }
.chat-input-bar button { border-radius: 50% !important; aspect-ratio: 1; min-width: 44px; padding: 0 !important; }

/* ---------- Campos de escribir del resto ---------- */
.home-body input[type="text"], .home-body input[type="date"], .home-body input[type="time"], .home-body input[type="url"],
.home-body input[type="search"], .home-body input[type="password"], .home-body input:not([type]), .home-body textarea, .home-body select {
  background-color: rgba(8, 4, 22, .4); border: 1px solid rgba(255, 255, 255, .09); border-radius: 16px; color: var(--v-texto);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .25);
  transition: border-color .18s, box-shadow .18s;
}
.home-body input::placeholder, .home-body textarea::placeholder { color: var(--v-texto-3); }
.home-body input:focus, .home-body textarea:focus, .home-body select:focus {
  outline: none; border-color: rgba(168, 121, 255, .65) !important;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .25), 0 0 0 3px rgba(124, 77, 255, .22) !important;
}
.chat-input-bar input:focus { box-shadow: none !important; }

/* ---------- Botones de enviar / agregar: morado con brillo ---------- */
.chat-input-bar button, .notes-input-bar button, .reminder-input-bar button, .event-input-bar button,
.milestone-input-bar button, .photo-input-bar button, .book-input-bar button, .support-form button[type="submit"] {
  background: var(--v-degradado) !important; border: none !important; color: #fff !important;
  box-shadow: 0 8px 20px rgba(106, 63, 240, .45), inset 0 1px 0 rgba(255, 255, 255, .25) !important;
  transition: filter .15s, transform .1s, box-shadow .18s;
}
.notes-input-bar button, .reminder-input-bar button, .event-input-bar button, .milestone-input-bar button,
.photo-input-bar button, .book-input-bar button, .support-form button[type="submit"] { border-radius: 16px !important; }
.chat-input-bar button:hover, .notes-input-bar button:hover, .reminder-input-bar button:hover, .event-input-bar button:hover,
.milestone-input-bar button:hover, .photo-input-bar button:hover, .book-input-bar button:hover, .support-form button[type="submit"]:hover {
  filter: brightness(1.1); box-shadow: 0 10px 26px rgba(124, 77, 255, .6), inset 0 1px 0 rgba(255, 255, 255, .25) !important;
}
.chat-input-bar button:active, .notes-input-bar button:active, .reminder-input-bar button:active, .event-input-bar button:active,
.milestone-input-bar button:active, .photo-input-bar button:active, .book-input-bar button:active { transform: scale(.93); }
.chat-input-bar button:disabled { filter: saturate(.5) brightness(.75); box-shadow: none !important; }
/* 📷 del chat: redondo y suave, para que el de enviar resalte */
.chat-input-bar .fotos-btn, .chat-input-bar button[aria-label*="oto"] {
  background: rgba(255, 255, 255, .07) !important; border: 1px solid rgba(255, 255, 255, .1) !important; box-shadow: none !important;
}

/* ---------- Pestañas: cápsula con la activa iluminada ---------- */
.tab-switch {
  background: rgba(8, 4, 22, .4) !important; border: 1px solid rgba(255, 255, 255, .08) !important;
  border-radius: 20px !important; padding: 5px !important; gap: 4px !important;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .25) !important;
}
.tab-btn {
  border: none !important; border-radius: 15px !important; background: transparent !important;
  color: var(--v-texto-2) !important; font-weight: 600 !important; transition: background .18s, color .18s, box-shadow .18s;
}
.tab-btn:hover { color: #fff !important; background: rgba(255, 255, 255, .05) !important; }
.tab-btn.active {
  background: var(--v-degradado) !important; color: #fff !important;
  box-shadow: 0 6px 18px rgba(106, 63, 240, .45), inset 0 1px 0 rgba(255, 255, 255, .22) !important;
}

/* ---------- Notas, recordatorios, eventos, recuerdos: tarjetas con una rayita de color ---------- */
.note-item {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .03)) !important;
  border: 1px solid rgba(255, 255, 255, .08) !important; border-radius: 18px !important;
  box-shadow: var(--v-brillo), 0 6px 16px rgba(3, 0, 12, .25) !important;
  transition: background .18s, border-color .18s, transform .12s;
}
.note-item::before {
  content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--v-morado-2), var(--v-rosa)); opacity: .85;
}
.note-item:hover { border-color: rgba(196, 160, 255, .3) !important; }
.note-item:active { transform: scale(.99); }
.note-text { color: var(--v-texto) !important; }
.note-item input[type="checkbox"] { accent-color: var(--v-morado); }
.note-delete { border-radius: 10px; color: var(--v-texto-3) !important; transition: color .15s, background .15s; }
.note-delete:hover { color: #ff8fb8 !important; background: rgba(255, 111, 177, .12) !important; }
.notes-empty { color: var(--v-texto-3) !important; }

/* ---------- Barra de abajo: pegada al borde, vidrio, la pestaña activa con luz y puntito ---------- */
.bottom-nav {
  border: 1px solid transparent !important; border-bottom: none !important;
  background: linear-gradient(180deg, rgba(36, 22, 70, .86), rgba(18, 10, 38, .94)) padding-box, var(--v-filo) border-box !important;
  border-radius: 26px 26px 0 0 !important;
  box-shadow: 0 -12px 32px rgba(3, 0, 12, .45), var(--v-brillo) !important;
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  padding: 8px 6px max(10px, env(safe-area-inset-bottom)) !important;
}
.bottom-nav .nav-item {
  position: relative; border-radius: 16px !important; color: var(--v-texto-3) !important;
  transition: background .2s, color .2s, transform .12s;
}
.bottom-nav .nav-item:active { transform: scale(.94); }
.bottom-nav .nav-item .nav-icon { transition: transform .2s; }
.bottom-nav .nav-item.active {
  background: linear-gradient(160deg, rgba(139, 92, 255, .45), rgba(106, 63, 240, .22)) !important;
  box-shadow: inset 0 0 0 1px rgba(196, 160, 255, .35), 0 0 22px rgba(124, 77, 255, .35) !important;
}
.bottom-nav .nav-item.active .nav-icon { transform: translateY(-1px) scale(1.08); filter: drop-shadow(0 0 6px rgba(196, 160, 255, .6)); }
.bottom-nav .nav-item.active .nav-label { color: #fff !important; font-weight: 700; }

/* ---------- Bloqueo ---------- */
.lock-form { border-radius: 28px !important; }

::selection { background: rgba(124, 77, 255, .45); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
