:root {
  --wa-primary: #008069;
  --wa-dark: #075E54;
  --wa-accent: #25D366;
  --wa-light-green: #e1f7cb;
  --wa-bg: #eae6df;
  --wa-chat-bg: #efeae2;
  --wa-surface: #ffffff;
  --wa-text: #111b21;
  --wa-text-secondary: #667781;
  --wa-border: #e9edef;
  --wa-unread-badge: #25D366;
  --wa-danger: #ea4335;
  --wa-warning: #f59e0b;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 3px rgba(11, 20, 26, 0.08);
  --shadow-md: 0 3px 8px rgba(11, 20, 26, 0.12);
  --shadow-lg: 0 8px 24px rgba(11, 20, 26, 0.16);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: #0b141a;
  color: var(--wa-text);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: stretch;
}

/* Mobile App Frame Container */
#app-container {
  width: 100%;
  max-width: 500px;
  min-height: 100vh;
  background-color: var(--wa-chat-bg);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.4);
  overflow-x: hidden;
}

/* ========================================================
   TOAST / NOTIFICACIONES EN PANTALLA ESTILO WHATSAPP
   ======================================================== */
#toast-container {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  max-width: 460px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast-banner {
  pointer-events: auto;
  background: #ffffff;
  border-left: 6px solid var(--wa-accent);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideDown 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
}

.toast-banner.closing {
  transform: translateY(-20px) scale(0.95);
  opacity: 0;
}

.toast-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--wa-accent);
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--wa-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.toast-time {
  font-size: 11px;
  color: var(--wa-text-secondary);
  font-weight: 400;
}

.toast-body {
  font-size: 13px;
  color: var(--wa-text);
  margin-top: 2px;
  line-height: 1.35;
}

@keyframes slideDown {
  from {
    transform: translateY(-50px) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* ========================================================
   PANTALLA DE ACCESO / LOGIN (INSPIRADA EN LA FOTO DEL USUARIO)
   ======================================================== */
.login-screen {
  min-height: 100vh;
  background: radial-gradient(circle at 50% 20%, #0d6b5b, #063d33 80%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 28px 22px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
  text-align: center;
}

.login-logo {
  width: 68px;
  height: 68px;
  margin: 0 auto 12px;
  background: #e8f5f2;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--wa-primary);
  box-shadow: 0 4px 12px rgba(0, 128, 105, 0.15);
}

.login-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--wa-text);
  margin-bottom: 2px;
}

.login-subtitle {
  font-size: 13px;
  color: var(--wa-text-secondary);
  margin-bottom: 20px;
}

.login-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #3b4a54;
  text-align: left;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.users-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.user-card {
  background: #f7f9fa;
  border: 2px solid transparent;
  border-radius: 16px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-card:hover {
  background: #f0f4f4;
  transform: translateY(-2px);
}

.user-card.selected {
  background: #e8f7f0;
  border-color: #00a884;
  box-shadow: 0 4px 12px rgba(0, 168, 132, 0.2);
}

.user-avatar-wrap {
  position: relative;
  width: 58px;
  height: 58px;
  margin-bottom: 8px;
}

.user-card-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.user-badge-role {
  position: absolute;
  bottom: -2px;
  right: -2px;
  background: var(--wa-dark);
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 10px;
}

.user-card-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--wa-text);
  line-height: 1.2;
}

.user-card-role {
  font-size: 11px;
  color: var(--wa-text-secondary);
  margin-top: 3px;
}

.pin-section {
  text-align: left;
  margin-bottom: 20px;
}

.pin-label {
  font-size: 12.5px;
  color: var(--wa-text-secondary);
  margin-bottom: 6px;
  display: block;
}

.pin-input {
  width: 100%;
  padding: 12px;
  font-size: 18px;
  letter-spacing: 8px;
  text-align: center;
  border: 1.5px solid #d1d7db;
  border-radius: 12px;
  outline: none;
  font-weight: 700;
}

.pin-input:focus {
  border-color: var(--wa-primary);
  box-shadow: 0 0 0 3px rgba(0, 128, 105, 0.15);
}

.remember-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #3b4a54;
  margin-bottom: 18px;
  cursor: pointer;
  text-align: left;
}

.remember-checkbox-label input {
  width: 18px;
  height: 18px;
  accent-color: var(--wa-primary);
  cursor: pointer;
}

.btn-login {
  width: 100%;
  background: linear-gradient(135deg, #008069, #056150);
  color: white;
  border: none;
  border-radius: 28px;
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 128, 105, 0.35);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-login:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

/* ========================================================
   HEADER ESTILO WHATSAPP
   ======================================================== */
.wa-header {
  background-color: var(--wa-primary);
  color: #ffffff;
  padding: 12px 14px 0 14px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  position: sticky;
  top: 0;
  z-index: 100;
}

.wa-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
}

.wa-app-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wa-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.current-user-pill {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 20px;
  padding: 4px 10px 4px 5px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.current-user-pill:hover {
  background: rgba(255, 255, 255, 0.3);
}

.user-pill-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid white;
}

.user-pill-name {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  max-width: 90px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-icon-btn {
  background: none;
  border: none;
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background 0.2s;
}

.header-icon-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.badge-counter {
  position: absolute;
  top: 3px;
  right: 2px;
  background: var(--wa-accent);
  color: #111b21;
  font-size: 10px;
  font-weight: 800;
  border-radius: 10px;
  padding: 1px 5px;
  min-width: 16px;
  text-align: center;
}

/* TABS WHATSAPP */
.wa-tabs {
  display: flex;
  position: relative;
}

.wa-tab {
  flex: 1;
  text-align: center;
  padding: 10px 4px;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: color 0.2s;
}

.wa-tab.active {
  color: #ffffff;
}

.tab-badge {
  background: #ffffff;
  color: var(--wa-primary);
  font-size: 11px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 12px;
}

.tab-badge.alert {
  background: #ff5252;
  color: white;
}

.wa-tabs-slider {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3.5px;
  background-color: #ffffff;
  width: 33.333%;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 4px 4px 0 0;
}

/* ========================================================
   CONTENIDO PRINCIPAL Y VISTAS
   ======================================================== */
.main-content {
  flex: 1;
  padding: 14px 12px 90px 12px;
  overflow-y: auto;
  background-image: 
    radial-gradient(#d3cbbe 1px, transparent 1px);
  background-size: 20px 20px;
}

/* BANNER DE AYUDA SENIOR */
.senior-helper-banner {
  background: #ffffff;
  border: 1px solid #d1d7db;
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.senior-helper-text h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--wa-dark);
}

.senior-helper-text p {
  font-size: 13px;
  color: var(--wa-text-secondary);
  margin-top: 2px;
}

.btn-big-add {
  background: var(--wa-accent);
  color: #0b141a;
  border: none;
  font-weight: 800;
  font-size: 14px;
  padding: 10px 16px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.4);
  white-space: nowrap;
}

.btn-big-add:hover {
  filter: brightness(1.05);
}

/* LISTA DE CITAS - TARJETAS ESTILO MENSAJE WHATSAPP */
.appointments-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cita-card {
  background: var(--wa-surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 6px rgba(11, 20, 26, 0.1);
  overflow: hidden;
  border: 1px solid #e2e8f0;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.cita-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.cita-card.sin-acompanante {
  border-left: 6px solid #ff5252;
}

.cita-card.con-acompanante {
  border-left: 6px solid var(--wa-accent);
}

.cita-header {
  padding: 12px 14px;
  background: #fbfcfc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--wa-border);
}

.cita-paciente-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  color: var(--wa-text);
}

.cita-paciente-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--wa-primary);
}

.cita-status-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.cita-status-pill.urgente {
  background: #ffebee;
  color: #d32f2f;
}

.cita-status-pill.cubierto {
  background: #e8f5e9;
  color: #2e7d32;
}

.cita-body {
  padding: 14px;
}

.cita-specialty-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.specialty-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #e7f7f3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.cita-specialty-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--wa-text);
  line-height: 1.2;
}

.cita-doctor-place {
  font-size: 13px;
  color: var(--wa-text-secondary);
  margin-top: 2px;
}

.cita-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  background: #f8fafc;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  margin: 10px 0;
  gap: 8px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #334155;
  font-weight: 600;
}

.cita-notes {
  background: #fffdf5;
  border-left: 3px solid #fbbf24;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 13px;
  color: #475569;
  margin-bottom: 12px;
  line-height: 1.35;
}

.cita-photo-thumb-container {
  margin-bottom: 12px;
}

.cita-photo-thumb {
  max-width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid #cbd5e1;
}

/* SECCIÓN ACOMPAÑANTE */
.cita-companion-box {
  background: #f0fdf4;
  border: 1.5px dashed #86efac;
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.cita-companion-box.unassigned {
  background: #fff1f2;
  border-color: #fca5a5;
}

.companion-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.companion-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.companion-text-label {
  font-size: 11px;
  color: var(--wa-text-secondary);
  text-transform: uppercase;
  font-weight: 700;
}

.companion-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--wa-text);
}

/* BOTONES DE ACCIÓN DE CITA */
.cita-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-action-primary {
  flex: 1;
  background: var(--wa-accent);
  color: #0b141a;
  border: none;
  border-radius: 20px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-action-secondary {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.btn-action-whatsapp {
  background: #25d366;
  color: white;
  border: none;
  border-radius: 20px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

/* ========================================================
   PESTAÑA DE HISTORIAL MÉDICO
   ======================================================== */
.historial-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.filter-chip {
  padding: 7px 14px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-chip.active {
  background: var(--wa-primary);
  color: white;
  border-color: var(--wa-primary);
}

.historial-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #e2e8f0;
}

.historial-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}

.historial-doctor-speech {
  background: #f8fafc;
  border-left: 4px solid var(--wa-primary);
  padding: 10px 12px;
  border-radius: 6px;
  margin: 10px 0;
  font-size: 13.5px;
  line-height: 1.4;
  color: #1e293b;
}

.historial-doctor-speech strong {
  color: var(--wa-dark);
  display: block;
  font-size: 12px;
  margin-bottom: 3px;
}

.historial-rx-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
  color: #1e40af;
  margin-top: 8px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

/* ========================================================
   PESTAÑA DE AVISOS / CHAT GRUPAL ESTILO WHATSAPP
   ======================================================== */
.activity-chat-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-bubble {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13.5px;
  position: relative;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  line-height: 1.35;
}

.chat-bubble.event-cita {
  align-self: flex-start;
  background: #ffffff;
  border-bottom-left-radius: 2px;
}

.chat-bubble.event-acompanante {
  align-self: flex-end;
  background: var(--wa-light-green);
  border-bottom-right-radius: 2px;
}

.chat-bubble.event-informe {
  align-self: center;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  text-align: center;
  max-width: 95%;
}

.bubble-author {
  font-weight: 800;
  font-size: 12px;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.bubble-author.tomas { color: #0284c7; }
.bubble-author.filio { color: #16a34a; }
.bubble-author.francisco { color: #d97706; }
.bubble-author.papa { color: #7c3aed; }
.bubble-author.mama { color: #db2777; }

.bubble-time {
  font-size: 10px;
  color: #8696a0;
  text-align: right;
  margin-top: 4px;
}

/* ========================================================
   BOTÓN FLOTANTE (FAB) ESTILO WHATSAPP
   ======================================================== */
.wa-fab {
  position: fixed;
  bottom: 24px;
  right: calc(50% - 220px);
  background: var(--wa-accent);
  color: #0b141a;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  border: none;
  cursor: pointer;
  z-index: 90;
  transition: transform 0.2s, background 0.2s;
}

@media (max-width: 500px) {
  .wa-fab {
    right: 20px;
  }
}

.wa-fab:hover {
  transform: scale(1.08);
  background: #20ba5a;
}

/* ========================================================
   MODALES Y FORMULARIOS (SENIOR ACCESIBLE)
   ======================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11, 20, 26, 0.7);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #ffffff;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  border-radius: 24px 24px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.open .modal-card {
  transform: translateY(0);
}

.modal-header {
  background: var(--wa-primary);
  color: #ffffff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-close-modal {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}

.modal-scrollable-body {
  padding: 18px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group-label {
  font-size: 15px;
  font-weight: 800;
  color: var(--wa-text);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-group-helper {
  font-size: 12px;
  color: var(--wa-text-secondary);
  margin-top: -4px;
  margin-bottom: 8px;
}

/* SELECTOR DE PACIENTE GIGANTE (SENIOR) */
.paciente-selector-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.paciente-btn {
  background: #f1f5f9;
  border: 2.5px solid transparent;
  border-radius: 16px;
  padding: 12px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
  color: #334155;
  transition: all 0.2s;
}

.paciente-btn.selected {
  background: #e8f7f0;
  border-color: #008069;
  color: #008069;
  box-shadow: 0 4px 12px rgba(0, 128, 105, 0.2);
}

.paciente-btn img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

/* CUADRÍCULA DE ESPECIALIDADES MÉDICAS (SENIOR) */
.especialidades-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.especialidad-btn {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.especialidad-btn:hover {
  background: #f1f5f9;
}

.especialidad-btn.selected {
  background: #e7f7f3;
  border-color: #008069;
  box-shadow: 0 2px 8px rgba(0, 128, 105, 0.25);
}

.especialidad-btn .esp-icon {
  font-size: 24px;
}

.especialidad-btn .esp-name {
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
  text-align: center;
}

/* LUGARES / AMBULATORIOS */
.lugares-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.lugar-chip {
  padding: 7px 12px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 18px;
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
}

.lugar-chip.selected {
  background: #008069;
  color: white;
  border-color: #008069;
}

/* INPUTS GRANDES */
.input-big {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  outline: none;
  font-weight: 500;
}

.input-big:focus {
  border-color: var(--wa-primary);
  box-shadow: 0 0 0 3px rgba(0, 128, 105, 0.15);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* NOTAS Y DICTADO POR VOZ */
.textarea-wrapper {
  position: relative;
}

.textarea-big {
  width: 100%;
  padding: 12px 14px 44px 14px;
  font-size: 15px;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  outline: none;
  min-height: 80px;
  resize: vertical;
}

.textarea-big:focus {
  border-color: var(--wa-primary);
}

.btn-mic-voice {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: #e2e8f0;
  border: none;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
}

.btn-mic-voice.recording {
  background: #ef4444;
  color: white;
  animation: pulseMic 1s infinite alternate;
}

@keyframes pulseMic {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}

/* FOTO DE LA CITA / PAPEL */
.photo-upload-box {
  border: 2px dashed #cbd5e1;
  border-radius: 14px;
  padding: 14px;
  text-align: center;
  cursor: pointer;
  background: #f8fafc;
  transition: all 0.2s;
}

.photo-upload-box:hover {
  background: #f1f5f9;
  border-color: var(--wa-primary);
}

.photo-preview {
  max-width: 100%;
  max-height: 180px;
  border-radius: 10px;
  margin-top: 10px;
  display: none;
}

/* FOOTER DEL MODAL */
.modal-footer {
  padding: 14px 20px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 10px;
}

.btn-save-big {
  flex: 1;
  background: var(--wa-accent);
  color: #0b141a;
  border: none;
  border-radius: 24px;
  padding: 14px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-save-big:hover {
  filter: brightness(1.05);
}

.btn-cancel {
  background: #e2e8f0;
  color: #475569;
  border: none;
  border-radius: 24px;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

/* ASIGNAR HERMANO MODAL */
.hermanos-selector-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hermano-option-card {
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s;
}

.hermano-option-card:hover {
  border-color: #008069;
  background: #f0fdf4;
}

.hermano-option-card.active {
  border-color: #008069;
  background: #e7f7f3;
}

.hermano-option-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hermano-option-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

.hermano-option-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--wa-text);
}

/* ========================================================
   EMPTY STATES
   ======================================================== */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #64748b;
}

.empty-icon {
  font-size: 54px;
  margin-bottom: 12px;
}

.empty-title {
  font-size: 17px;
  font-weight: 800;
  color: #334155;
  margin-bottom: 6px;
}

.empty-desc {
  font-size: 13.5px;
  line-height: 1.4;
}
