/* ======================================================
   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; }

/* ======================================================
   MÓDULO SALUD – HUB REDISEÑADO
   ====================================================== */
.salud-hero {
  margin-bottom: 16px;
}

.salud-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.summary-chip .icon { width: 14px; height: 14px; }

.chip-ok      { background: #e8f8f0; color: #2d8a56; }
.chip-pending { background: #fff1f6; color: var(--primary); }
.chip-info    { background: #eef4ff; color: #4a6fa8; }

.salud-section {
  margin-bottom: 28px;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-soft);
  margin-bottom: 14px;
}

.section-label .icon { width: 16px; height: 16px; }

.salud-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.salud-tile {
  text-decoration: none;
  color: inherit;
  background: #ffffff;
  border-radius: 18px;
  padding: 14px 10px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
  border: 1px solid var(--border-soft);
  transition: transform .15s ease, box-shadow .15s ease;
  position: relative;
}

.salud-tile:active {
  transform: scale(0.94);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.salud-tile.tile-soon {
  opacity: 0.65;
  pointer-events: none;
}

.tile-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tile-icon .icon {
  width: 26px;
  height: 26px;
  stroke-width: 1.6;
  color: white;
}

.tier-primary {
  background: linear-gradient(135deg, var(--primary), #f0a3c4);
}

.tier-secondary {
  background: linear-gradient(135deg, var(--secondary), #7ecff0);
}

.tier-accent {
  background: linear-gradient(135deg, #b48ef0, #d4b3f8);
}

.tier-soft {
  background: linear-gradient(135deg, var(--accent), #fce4ef);
}

.tier-soft .icon { color: var(--primary); }

.tile-label {
  font-size: 0.72rem;
  font-weight: 500;
  text-align: center;
  line-height: 1.25;
  color: var(--text-main);
}

.tile-status {
  font-size: 0.65rem;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 999px;
}

.status-ok      { background: #e8f8f0; color: #2d8a56; }
.status-pending { background: #fff1f6; color: var(--primary); }
.status-info    { background: #eef4ff; color: #4a6fa8; }
.status-soft    { background: #f5f5f5; color: #aaa; }
.status-soon    { background: #f5f5f5; color: #bbb; }

/* ======================================================
   MÓDULO TRH – ESTILOS COMPARTIDOS
   ====================================================== */
.trh-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

.trh-breadcrumb {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--text-soft);
  text-decoration: none;
  margin-bottom: 6px;
}

.trh-breadcrumb:hover { color: var(--primary); }

.trh-page-header h1 { margin-bottom: 0; }

.trh-btn-add {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(232,106,166,.35);
}

.trh-btn-add .icon { width: 18px; height: 18px; color: white; }

.trh-btn-outline {
  background: transparent !important;
  color: var(--primary) !important;
  box-shadow: none !important;
  border: 1.5px solid var(--border-soft) !important;
}

/* ── Inyecciones: Banner próxima dosis ── */
.trh-inj-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #fff1f6, #fffafd);
  border: 1px solid rgba(232,106,166,.2);
  border-radius: 18px;
  padding: 16px 18px;
  margin-bottom: 20px;
}

.trh-inj-banner--urgent {
  background: linear-gradient(135deg, #fff0f5, #ffe4ef);
  border-color: rgba(232,106,166,.4);
}

.trh-inj-banner__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.trh-inj-banner__icon .icon { width: 22px; height: 22px; color: white; }

.trh-inj-banner__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.trh-inj-banner__label {
  font-size: 0.72rem;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.trh-inj-banner__body strong { font-size: 1rem; font-weight: 600; }

.trh-inj-banner__med { font-size: 0.8rem; color: var(--text-soft); }

.trh-inj-banner__cta {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
}

/* ── Inyecciones: Cards ── */
.trh-inj-card {
  display: flex;
  background: white;
  border-radius: 18px;
  margin-bottom: 14px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,.05);
  border: 1px solid var(--border-soft);
}

.trh-inj-card__bar {
  width: 5px;
  flex-shrink: 0;
}

.trh-inj-card--done   .trh-inj-card__bar { background: #6dc78e; }
.trh-inj-card--pending .trh-inj-card__bar { background: var(--primary); }

.trh-inj-card__body { flex: 1; padding: 16px; }

.trh-inj-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  gap: 8px;
}

.trh-inj-card__name { font-size: .95rem; font-weight: 600; display: block; }

.trh-inj-card__dosage {
  font-size: .78rem;
  color: var(--text-soft);
  margin-top: 2px;
  display: block;
}

.trh-inj-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: .78rem;
  color: var(--text-soft);
  margin-bottom: 10px;
}

.trh-inj-card__meta .icon { vertical-align: middle; margin-right: 2px; }

.trh-inj-card__notes {
  font-size: .8rem;
  color: var(--text-soft);
  background: #fafafa;
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 10px;
}

.trh-inj-card__actions {
  display: flex;
  gap: 16px;
}

/* ── Acciones genéricas TRH ── */
.trh-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .78rem;
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.trh-action--danger { color: #c0627e; }

/* ── Formularios de una sola acción (eliminar) que se ven como enlace ── */
.inline-form { display: inline; margin: 0; }
.inline-form button { width: auto; }
.inline-form .link-button {
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  font: inherit;
  color: var(--primary);
  cursor: pointer;
}

/* ── Medicación: Status card ── */
.trh-meds-status {
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: 20px;
  padding: 18px 20px;
  margin-bottom: 16px;
}

.trh-meds-status--done {
  background: linear-gradient(135deg, #e8f8f0, #f4fdf7);
  border: 1px solid rgba(109,199,142,.25);
}

.trh-meds-status--pending {
  background: linear-gradient(135deg, #fff1f6, #fffafd);
  border: 1px solid rgba(232,106,166,.2);
}

.trh-meds-status__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.trh-meds-status--done    .trh-meds-status__icon { background: #6dc78e; }
.trh-meds-status--pending .trh-meds-status__icon { background: var(--primary); }
.trh-meds-status__icon .icon { width: 24px; height: 24px; color: white; }

.trh-meds-status__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.trh-meds-status__body strong { font-size: .95rem; }

.trh-meds-status__time  { font-size: .8rem; color: var(--text-soft); }
.trh-meds-status__alert { font-size: .8rem; color: #c0627e; }

.trh-streak {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.trh-streak__num {
  font-size: 1.4rem;
  font-weight: 700;
  color: #2d8a56;
  line-height: 1;
}

.trh-streak__label { font-size: .65rem; color: var(--text-soft); text-align: center; }

/* ── Medicación: Lista de meds ── */
.trh-meds-list { display: flex; flex-direction: column; gap: 10px; }

.trh-med-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border-soft);
}

.trh-med-item:last-child { border-bottom: none; }

.trh-med-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}

/* ── Citas: Secciones ── */
.trh-section {
  background: white;
  border-radius: 20px;
  padding: 18px 18px 8px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,.05);
  border: 1px solid var(--border-soft);
}

.trh-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.trh-section__title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--primary);
}

.trh-section__title .icon { width: 17px; height: 17px; }

.trh-item-list { display: flex; flex-direction: column; gap: 0; }

.trh-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--border-soft);
}

.trh-item:last-child { border-bottom: none; padding-bottom: 6px; }

.trh-item--done    { opacity: .65; }
.trh-item--cancelled { opacity: .5; text-decoration: line-through; }

.trh-item__main { flex: 1; }

.trh-item__title {
  font-size: .88rem;
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

.trh-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: .75rem;
  color: var(--text-soft);
  margin-bottom: 4px;
}

.trh-item__meta .icon { vertical-align: middle; }

.trh-item__notes {
  font-size: .78rem;
  color: var(--text-soft);
  margin-top: 4px;
  line-height: 1.4;
}

.trh-item__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.trh-item__actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ======================================================
   NAVEGACIÓN – MEJORAS ACTIVO + ICONOS
   ====================================================== */

/* Items secundarios: solo en desktop */
.nav-item--desktop { display: none; }

/* Separador visual antes de items secundarios en desktop */
@media (min-width: 768px) {
  .nav-item--desktop { display: flex; }

  /* Línea divisoria antes del primer item secundario */
  .nav-item--desktop:first-of-type {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--border-soft);
  }

  /* Estado activo sidebar desktop */
  .nav-item.active {
    background: linear-gradient(135deg, #fff1f6, #fffafd);
    color: var(--primary);
    font-weight: 500;
  }

  .nav-item.active .icon { color: var(--primary); }

  /* Tagline bajo logo */
  .sidebar-tagline {
    font-size: .72rem;
    color: var(--text-soft);
    text-align: center;
    margin-top: 4px;
  }

  /* Logout en desktop */
  .nav-item.logout:hover {
    background: #fff5f5;
    color: #c0627e;
  }
}

/* Estado activo mobile (bottom bar) */
@media (max-width: 767px) {
  .nav-item.active {
    color: var(--primary);
    font-weight: 600;
  }

  /* Punto indicador activo en mobile */
  .nav-item.active::after {
    content: '';
    display: block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--primary);
    margin: 0 auto;
  }

  .sidebar-tagline { display: none; }
}

/* ======================================================
   DASHBOARD – REDISEÑO
   ====================================================== */

/* Hero */
.dash-hero {
  margin-bottom: 20px;
}

.dash-hero__greeting {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 2px;
}

.dash-hero__date {
  font-size: .88rem;
  margin-bottom: 0;
}

/* Alertas de acción rápida */
.dash-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  margin-bottom: 10px;
  text-decoration: none;
  font-size: .88rem;
  font-weight: 500;
  transition: opacity .15s;
}

.dash-alert:active { opacity: .8; }

.dash-alert span { flex: 1; }

.dash-alert__arrow { color: currentColor; opacity: .5; flex-shrink: 0; }

.dash-alert--meds {
  background: linear-gradient(135deg, #fff1f6, #ffe8f2);
  color: var(--primary);
  border: 1px solid rgba(232,106,166,.2);
}

.dash-alert--gatitas {
  background: linear-gradient(135deg, #fff8ed, #fff3e0);
  color: #c07a20;
  border: 1px solid rgba(192,122,32,.15);
}

/* Cards del dashboard */
.dash-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.dash-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dash-card__icon .icon { width: 22px; height: 22px; color: white; stroke-width: 1.8; }

.dash-card__icon--primary  { background: linear-gradient(135deg, var(--primary), #f0a3c4); }
.dash-card__icon--soft     { background: linear-gradient(135deg, #f6b8d4, #f8cfe0); }
.dash-card__icon--soft .icon { color: var(--primary); }
.dash-card__icon--love     { background: linear-gradient(135deg, #f87171, #fb9ca0); }

.dash-card__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0;
}

.dash-card__sub {
  font-size: .78rem;
  margin-bottom: 0;
}

/* Chips de estado dentro de cards */
.dash-row-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.dash-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 500;
}

.dash-chip .icon { width: 13px; height: 13px; }

.dash-chip--ok      { background: #e8f8f0; color: #2d8a56; }
.dash-chip--pending { background: #fff1f6; color: var(--primary); }
.dash-chip--urgent  { background: #fff0f0; color: #c0627e; }
.dash-chip--info    { background: #eef4ff; color: #4a6fa8; }
.dash-chip--neutral { background: #f5f5f5; color: #888; }

/* Línea de detalle bajo chips */
.dash-detail {
  font-size: .78rem;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 0;
}

.dash-detail .icon { width: 13px; height: 13px; }
.dash-detail--warn { color: #c07a20; }
