/* ======================================================
   RESET + BASE (MOBILE FIRST)
   ====================================================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont,
               'Segoe UI', sans-serif;
  color: var(--text-main);
  background: linear-gradient(
    180deg,
    #fff7fb 0%,
    #fffafd 100%
  );
  line-height: 1.5;
}

/* ======================================================
   VARIABLES (PALETA FEMENINA SUAVE)
   ====================================================== */
:root {
  --bg-main: #fff7fb;
  --bg-card: #ffffff;

  --primary: #e86aa6;
  --secondary: #8fd3f4;
  --accent: #f6c1d1;

  --text-main: #3a3a3a;
  --text-soft: #777;

  --border-soft: #f1dbe5;
}

/* ======================================================
   TIPOGRAFÍA
   ====================================================== */
h1 {
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

h2 {
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
  color: var(--primary);
}

h3 {
  font-weight: 500;
}

p {
  margin-bottom: 10px;
}

.text-soft {
  color: var(--text-soft);
  font-weight: 300;
}

/* ======================================================
   LAYOUT GENERAL
   ====================================================== */
.app {
  display: block;
  min-height: 100vh;
}

/* ======================================================
   SIDEBAR / BOTTOM BAR (MOBILE FIRST)
   ====================================================== */
.sidebar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;

  display: flex;
  flex-direction: column;
  justify-content: flex-end;

  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px);

  border-top: 1px solid rgba(0,0,0,0.05);
  padding: 8px 12px;
  z-index: 100;
}

/* Header oculto en móvil */
.sidebar-header {
  display: none;
  text-align: center;
  padding: 20px 16px;
}

.sidebar-logo img {
  max-width: 120px;
  height: auto;
}

/* ======================================================
   NAV
   ====================================================== */
.nav {
  display: flex;
  gap: 8px;
}

.nav-main {
  justify-content: space-around;
}

.nav-item {
  flex: 1;
  text-decoration: none;
  color: var(--text-soft);
  font-size: 0.7rem;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;

  padding: 6px 0;
}

.nav-icon {
  font-size: 1.2rem;
}

.nav-item.active {
  color: var(--primary);
  font-weight: 500;
}

.nav-secondary {
  display: none;
}

.nav-item.logout {
  color: var(--text-soft);
}

/* ======================================================
   CONTENIDO
   ====================================================== */
.content {
  padding: 16px;
  padding-bottom: 100px;
}

/* ======================================================
   TARJETAS (SUPERFICIE MODERNA)
   ====================================================== */
.card {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 18px;
  margin-bottom: 20px;
  border: none;
  box-shadow:
    0 10px 25px rgba(0,0,0,0.05),
    0 1px 2px rgba(0,0,0,0.04);
}

/* ======================================================
   BOTONES
   ====================================================== */
.button {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--primary);
  color: white;
  padding: 14px;
  border-radius: 16px;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  margin-top: 12px;
  box-shadow: 0 6px 16px rgba(232,106,166,.35);
}

.button:hover {
  background: #d85b97;
}

/* ======================================================
   BADGES
   ====================================================== */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
}

.badge-pending {
  background: #fff1f6;
  color: var(--primary);
}

.badge-done {
  background: #eef8ff;
  color: #4b91c9;
}

/* ======================================================
   FORMULARIOS
   ====================================================== */
form label {
  font-size: 0.85rem;
  color: var(--text-soft);
}

form input,
form select,
form textarea {
  width: 100%;
  padding: 12px;
  margin-top: 4px;
  margin-bottom: 14px;
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  font-size: 0.95rem;
}

form textarea {
  min-height: 80px;
}

form button {
  width: 100%;
  background: var(--primary);
  color: white;
  border: none;
  padding: 14px;
  border-radius: 16px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
}

/* ======================================================
   APP GRID – HOME TIPO APP
   ====================================================== */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 24px;
}

.app-tile {
  text-decoration: none;
  color: inherit;
  text-align: center;
}

.app-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 10px;
  border-radius: 20px;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 30px;

  background: linear-gradient(
    135deg,
    var(--accent),
    #fdebf3
  );

  box-shadow:
    0 12px 30px rgba(232,106,166,.25),
    inset 0 0 0 1px rgba(255,255,255,.4);

  backdrop-filter: blur(6px);
  transition: transform .15s ease;
}

.app-tile:active .app-icon {
  transform: scale(.92);
}

.app-label {
  font-size: .75rem;
  font-weight: 500;
  line-height: 1.2;
}

/* Estados */
.app-tile.disabled {
  opacity: .45;
  pointer-events: none;
}

/* Variantes */
.app-icon.primary {
  background: linear-gradient(
    135deg,
    var(--primary),
    var(--accent)
  );
}

.app-icon.secondary {
  background: linear-gradient(
    135deg,
    var(--secondary),
    #bfe9fb
  );
}

.app-icon.soft {
  background: linear-gradient(
    135deg,
    var(--accent),
    #fde8f0
  );
}

/* ======================================================
   MODAL
   ====================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 26px;
  max-width: 340px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0,0,0,.15);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-soft);
  font-size: 0.85rem;
  cursor: pointer;
}

/* ======================================================
   MOBILE HEADER LOGO
   ====================================================== */
.mobile-header {
  display: none;
  background: var(--bg-main);
  padding: 14px;
  text-align: center;
  border-bottom: 1px solid var(--border-soft);
}

.mobile-header img {
  max-width: 110px;
}

/* ======================================================
   DESKTOP / TABLET
   ====================================================== */
@media (min-width: 768px) {

  .app {
    display: grid;
    grid-template-columns: 240px 1fr;
  }

  .sidebar {
    position: static;
    display: block;
    padding: 24px;
    border-top: none;
    border-right: 1px solid var(--border-soft);
    background: var(--bg-card);
    backdrop-filter: none;
  }

  .sidebar-header {
    display: block;
    margin-bottom: 24px;
  }

  .nav-main {
    display: block;
  }

  .nav-item {
    flex-direction: row;
    gap: 10px;
    font-size: 0.9rem;
    padding: 10px 12px;
    border-radius: 12px;
  }

  .nav-item:hover {
    background: var(--accent);
  }

  .nav-secondary {
    display: block;
    margin-top: 20px;
  }

  .content {
    padding: 32px;
    padding-bottom: 0;
  }

  .mobile-header {
    display: none;
  }
}

/* ======================================================
   MOBILE ONLY
   ====================================================== */
@media (max-width: 768px) {
  .mobile-header {
    display: block;
  }
}
/* ======================================================
   DASHBOARD – HERO
   ====================================================== */
.dashboard-hero {
  margin-bottom: 26px;
}

.dashboard-hero h1 {
  font-size: 1.8rem;
}

.dashboard-hero p {
  font-size: 0.95rem;
}

/* ======================================================
   MEDICACIÓN PENDIENTE (ALERTA SUAVE)
   ====================================================== */
.card.meds-alert {
  background: linear-gradient(
    135deg,
    #fff1f6,
    #fffafd
  );
  box-shadow:
    0 12px 28px rgba(232,106,166,.18),
    inset 0 0 0 1px rgba(232,106,166,.15);
}

/* ======================================================
   CARD TRH
   ====================================================== */
.card.trh-card p {
  font-size: 0.9rem;
}

.card.trh-card strong {
  font-weight: 500;
}

/* ======================================================
   CARD HOY – SOFT NOTE (ARMÓNICA)
   ====================================================== */

.card.today-card {
  background: linear-gradient(
    135deg,
    #fffafd,
    #fff7fb
  );
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow:
    0 8px 22px rgba(0,0,0,0.04),
    inset 0 0 0 1px var(--border-soft);
}

.card.today-card h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
  font-size: 1.05rem;
}

/* lista sin bullets feos */
.card.today-card .list {
  margin-top: 10px;
}

.card.today-card .list li {
    list-style: none; 
  border-bottom: none;
  padding: 6px 0;
  font-size: 0.9rem;
  color: var(--text-soft);
  position: relative;
  padding-left: 16px;
}

/* bullet personalizado */
.card.today-card .list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent);
}


/* ======================================================
   INSTALL CARD
   ====================================================== */
#installCard {
  background: linear-gradient(
    135deg,
    var(--accent),
    #fffafd
  );
  box-shadow:
    0 14px 32px rgba(232,106,166,.2);
}

/* ======================================================
   MODAL ANIMATION
   ====================================================== */
.modal {
  animation: modalFade .25s ease-out;
}

@keyframes modalFade {
  from {
    opacity: 0;
    transform: scale(.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.card .button{
    color: #fff !important;
}
/* ======================================================
   LIST ITEMS DENTRO DE SECCIONES
   ====================================================== */

.card .list li {
  padding: 14px 0;
  border-bottom: 1px dashed var(--border-soft);
  list-style: none;
}

.card .list li:last-child {
  border-bottom: none;
}

.card .list li p {
  margin-bottom: 6px;
}
/* ======================================================
   LISTADO TIPO DIARIO / MEMORIA
   ====================================================== */

.list li {
  padding: 14px 0;
}

.list li p {
  margin-bottom: 4px;
}

.list li strong {
  font-size: 0.95rem;
}

.list li .badge {
  margin-top: 6px;
}
/* ======================================================
   PLANES – TARJETITAS PULIDAS
   ====================================================== */

.content .list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* tarjeta */
.content .list > li {
  background: linear-gradient(135deg, #ffffff, #fff7fb);
  border-radius: 20px;
  padding: 18px 20px;
  border: 1px solid var(--border-soft);
  box-shadow:
    0 10px 26px rgba(0,0,0,0.05);
  position: relative;
  list-style: none;
  margin-top: 10px;
}

/* fecha (más discreta) */
.content .list > li strong {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-soft);
  display: block;
  margin-bottom: 4px;
}

/* título del plan */
.content .list > li p:first-of-type + p {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-main);
}

/* lugares */
.content .list > li p.text-soft {
  font-size: 0.85rem;
  color: var(--text-soft);
}

/* badge como chip */
.content .list > li .badge {
  margin-top: 10px;
  font-size: 0.7rem;
  padding: 4px 10px;
}

/* acción */
.content .list > li a {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--primary);
}

/* micro interacción */
.content .list > li:active {
  transform: scale(0.97);
}
.mt{
    margin-top: 10px;
}
.card-alert {
  border: 1px solid #f3b3c8;
  background: linear-gradient(135deg, #fff5f8, #ffe9f1);
}
.calendar-card {
  padding: 14px;
}

.calendar-row {
  display: flex;
  gap: 14px;
  align-items: stretch;
}

/* FOTO */
.calendar-photo {
  width: 120px;
  min-width: 120px;
  height: 120px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--shadow-soft);
}

.calendar-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Placeholder si no hay foto */
.calendar-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  background: var(--bg-main);
}

/* INFO */
.calendar-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Tarjetitas */
.calendar-chip {
  display: inline-block;
  background: var(--bg-main);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px;
  color: var(--text-soft);
  width: fit-content;
}

.calendar-title {
  margin: 4px 0;
  font-size: 18px;
}

/* Acciones */
.calendar-actions a {
  font-size: 14px;
}

/* Responsive */
@media (max-width: 600px) {
  .calendar-row {
    flex-direction: column;
  }

  .calendar-photo {
    width: 100%;
    height: 180px;
  }
}
/* Cancelled plans */
.cancelled-card {
  position: relative;
  padding-left: 26px;
}

.cancelled-line {
  position: absolute;
  left: 10px;
  top: 16px;
  bottom: 16px;
  width: 3px;
  background: linear-gradient(
    to bottom,
    #f6c1d1,
    #e86aa6
  );
  border-radius: 999px;
}

/* ============================================================
   LUCIDE ICONS – sistema global de iconografía
   ============================================================ */
.icon {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  vertical-align: middle;
  flex-shrink: 0;
  transition: color .2s ease;
}

.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 24px; height: 24px; }
.icon-xl { width: 32px; height: 32px; }

.icon-soft  { color: var(--primary); }
.icon-muted { color: var(--text-soft); }

/* Nav sidebar icons */
.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-icon .icon { width: 22px; height: 22px; }

/* App tile icons */
.app-icon .icon {
  width: 30px;
  height: 30px;
  stroke-width: 1.5;
  color: white;
}
.app-icon.soft   .icon { color: var(--primary); }
.app-icon.accent .icon { color: var(--primary); }
.app-icon.secondary .icon { color: #2a7a9e; }
