﻿/* ============================================
   ESTILOS GENERALES
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Etiquetas solo para lectores de pantalla (accesibilidad) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f0f2f5;
  color: #333;
  line-height: 1.6;
}

/* ============================================
   PÃGINA DE LOGIN
   ============================================ */

.login-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #f4feff;
}

.login-container {
  width: 100%;
  max-width: 450px;
  padding: 20px;
}

.login-box {
  background: #1c3c49;
  border-radius: 25px;
  box-shadow: 0 15px 40px rgba(28, 60, 73, 0.3);
  overflow: visible;
  padding: 40px;
  position: relative;
}

.login-header {
  background: transparent;
  color: white;
  padding: 0;
  text-align: center;
  margin-bottom: 30px;
}

.login-logo {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px auto;
  color: white;
  position: relative;
}

.login-logo-container {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-logo-container svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
}

.login-isotipo {
  position: relative;
  width: 50px;
  height: 50px;
  object-fit: contain;
  z-index: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Logo en esquina superior izquierda del login */
.login-box {
  position: relative;
}

.login-page-logo {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
}

.login-page-logo img {
  height: 55px;
  width: auto;
}

@media (max-width: 768px) {
  .login-page-logo {
    top: 10px;
    left: 10px;
  }

  .login-page-logo img {
    height: 35px;
  }

  .login-page-v2-top-strip {
    top: 10px;
    right: 10px;
    max-width: calc(100vw - 20px);
    justify-content: flex-end;
  }

  .login-page-v2 .login-page-v2-top-strip .login-aux-link {
    font-size: 15px;
  }
}

.login-header h1 {
  font-size: 24px;
  margin-bottom: 10px;
}

.login-header p {
  font-size: 14px;
  opacity: 0.9;
}

.login-form {
  padding: 30px;
}

.form-group {
  margin-bottom: 20px;
}

.login-form {
  padding: 0;
}

.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-group input {
  width: 100%;
  padding: 15px 20px 15px 50px;
  border: none;
  border-radius: 25px;
  font-size: 14px;
  background: white;
  color: #333;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-group input::placeholder {
  color: #999;
}

.form-group .input-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.form-group .input-icon svg {
  display: block;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #2c5aa0;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-primary {
  background: #00bcd4;
  color: black;
  font-weight: bold;
  text-transform: uppercase;
  border-radius: 25px;
  padding: 15px 30px;
  box-shadow: 0 8px 25px rgba(0, 188, 212, 0.4);
  border: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(0, 188, 212, 0.5);
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #5a6268;
}

/* Modal trial vencido: CTA suscripciÃ³n (mÃ¡s vivo que btn-secondary gris) */
.btn-trial-pay {
  background: linear-gradient(135deg, #3ddfef 0%, #00bcd4 48%, #008fa3 100%);
  color: #06222a;
  font-weight: 700;
  border: none;
  border-radius: 25px;
  padding: 13px 28px;
  box-shadow: 0 8px 26px rgba(0, 188, 212, 0.5);
}

.btn-trial-pay:hover {
  background: linear-gradient(135deg, #5ae8ff 0%, #26d0e5 52%, #00a8bf 100%);
  color: #041015;
  transform: translateY(-2px);
  box-shadow: 0 12px 34px rgba(0, 188, 212, 0.6);
}

.btn-trial-pay--outline {
  background: #fff;
  color: #007c8f;
  font-weight: 600;
  border: 2px solid #00bcd4;
  border-radius: 25px;
  padding: 11px 22px;
  box-shadow: 0 2px 12px rgba(0, 188, 212, 0.15);
}

.btn-trial-pay--outline:hover {
  background: #e8fbfd;
  color: #006064;
  border-color: #00838f;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 188, 212, 0.25);
}

.btn-success {
  background: #28a745;
  color: white;
}

.btn-success:hover {
  background: #218838;
}

.btn-danger {
  background: #dc3545;
  color: white;
}

.btn-danger:hover {
  background: #c82333;
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.error-message {
  margin-top: 15px;
  padding: 12px;
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  border-radius: 6px;
  font-size: 14px;
}

/* Barra de enlaces: FAQ, Planes, Registrarse */
.login-aux-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 10px;
  margin-top: 24px;
  padding-top: 4px;
  text-align: center;
}

.login-aux-link {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 4px 2px;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}

a.login-aux-link {
  display: inline;
  text-decoration: underline;
}

.login-aux-link:hover,
.login-aux-link:focus-visible {
  color: #fff;
  outline: none;
  text-decoration-thickness: 2px;
}

.login-aux-link-cta {
  font-weight: 600;
  color: #b2ebf2;
}

.login-aux-sep {
  color: rgba(255, 255, 255, 0.45);
  user-select: none;
}

/* Modales login (FAQ / Planes) */
body.login-modal-open {
  overflow: hidden;
}

.login-modal[hidden] {
  display: none !important;
}

.login-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px 100px;
  box-sizing: border-box;
}

.login-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 30, 40, 0.55);
  cursor: pointer;
}

.login-modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  max-height: min(85vh, 640px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.login-modal-panel-wide {
  max-width: 900px;
}

.login-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  background: #1c3c49;
  color: #fff;
  flex-shrink: 0;
}

.login-modal-header h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
}

.login-modal-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s;
}

.login-modal-close:hover,
.login-modal-close:focus-visible {
  background: rgba(255, 255, 255, 0.28);
  outline: none;
}

.login-modal-body {
  padding: 20px 22px 24px;
  overflow-y: auto;
  color: #333;
  font-size: 15px;
  line-height: 1.55;
}

.login-faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-faq-item {
  border: 1px solid #e0e4e8;
  border-radius: 10px;
  padding: 0 4px 0 0;
  background: #fafbfc;
}

.login-faq-item summary {
  padding: 12px 14px;
  font-weight: 600;
  color: #1c3c49;
  cursor: pointer;
  list-style: none;
}

.login-faq-item summary::-webkit-details-marker {
  display: none;
}

.login-faq-item summary::after {
  content: ">";
  float: right;
  color: #00bcd4;
  font-weight: 700;
  transform: rotate(0deg);
  transition: transform 0.2s;
}

.login-faq-item[open] summary::after {
  transform: rotate(90deg);
}

.login-faq-item p {
  margin: 0 14px 14px 14px;
  padding-top: 0;
  color: #555;
  font-size: 14px;
}

.login-faq-item a {
  color: #0d47a1;
  font-weight: 600;
}

.login-plans-intro {
  margin: 0 0 18px 0;
  color: #555;
  font-size: 14px;
}

.login-plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.login-plan-card {
  border: 2px solid #e0e4e8;
  border-radius: 12px;
  padding: 16px 18px;
  background: #fafbfc;
}

.login-plan-card-featured {
  border-color: #00acc1;
  background: linear-gradient(180deg, #e0f7fa 0%, #fff 100%);
  box-shadow: 0 4px 16px rgba(0, 188, 212, 0.15);
}

.login-plan-card h3 {
  margin: 0 0 8px 0;
  color: #1c3c49;
  font-size: 1.05rem;
}

.login-plan-desc {
  margin: 0 0 10px 0;
  color: #444;
  font-size: 14px;
}

.login-plan-hint {
  margin: 0;
  font-size: 12px;
  color: #78909c;
  font-style: italic;
}

.login-plans-cta {
  margin: 0;
  font-size: 14px;
  color: #555;
  text-align: center;
  padding-top: 8px;
  border-top: 1px solid #eee;
}

.login-plans-cta a {
  color: #0d47a1;
  font-weight: 600;
}

/* Botones flotantes: WhatsApp + Instagram + web (login/registro) */
.login-social-fabs {
  position: fixed;
  right: 22px;
  bottom: 72px;
  z-index: 1500;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 14px;
}

.login-whatsapp-fab,
.login-instagram-fab,
.login-web-fab {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 3px solid rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
  box-sizing: border-box;
}

.login-whatsapp-fab {
  background: linear-gradient(145deg, #25d366 0%, #128c7e 100%);
  box-shadow: 0 6px 20px rgba(18, 140, 126, 0.45);
}

.login-instagram-fab {
  background: linear-gradient(to top right, #fcb045 0%, #fd1d1d 42%, #e1306c 68%, #833ab4 100%);
  box-shadow: 0 6px 22px rgba(131, 58, 180, 0.34), 0 2px 10px rgba(253, 29, 29, 0.18);
}

.login-web-fab {
  background: linear-gradient(145deg, #00acc1 0%, #00838f 55%, #006064 100%);
  box-shadow: 0 6px 20px rgba(0, 131, 143, 0.38);
}

.login-whatsapp-fab:hover,
.login-whatsapp-fab:focus-visible,
.login-instagram-fab:hover,
.login-instagram-fab:focus-visible,
.login-web-fab:hover,
.login-web-fab:focus-visible {
  transform: scale(1.05);
  outline: none;
}

.login-whatsapp-fab:hover,
.login-whatsapp-fab:focus-visible {
  box-shadow: 0 8px 26px rgba(18, 140, 126, 0.55);
}

.login-instagram-fab:hover,
.login-instagram-fab:focus-visible {
  box-shadow: 0 8px 28px rgba(131, 58, 180, 0.42), 0 3px 14px rgba(253, 29, 29, 0.22);
}

.login-web-fab:hover,
.login-web-fab:focus-visible {
  box-shadow: 0 8px 26px rgba(0, 131, 143, 0.52);
}

.login-whatsapp-fab:active,
.login-instagram-fab:active,
.login-web-fab:active {
  transform: scale(0.98);
}

.login-whatsapp-fab-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.15));
}

@media (max-width: 480px) {
  .login-social-fabs {
    right: 14px;
    bottom: 68px;
    gap: 12px;
  }

  .login-social-fabs .login-whatsapp-fab {
    width: 54px;
    height: 54px;
  }

  .page-footer .login-footer-icon-btn {
    width: 36px;
    height: 36px;
  }

  .page-footer .login-footer-icon-btn .login-whatsapp-fab-inner svg {
    width: 20px;
    height: 20px;
  }

  .login-aux-bar {
    flex-direction: column;
    gap: 10px;
  }

  .login-aux-sep {
    display: none;
  }
}

/* ============================================
   LOGIN v2 (index: dos columnas, panel hÃ©roe)
   ============================================ */

.login-page.login-page-v2 {
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.login-page-v2 {
  min-height: 100vh;
  background: linear-gradient(165deg, #e8f4f8 0%, #f4feff 40%, #edf7fa 100%);
  padding: 56px 16px 92px;
  box-sizing: border-box;
}

.login-container-v2 {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 0 8px 0;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 32px rgba(28, 60, 73, 0.1), 0 20px 60px rgba(28, 60, 73, 0.08);
  min-height: min(560px, calc(100vh - 104px));
}

.login-panel--form {
  background: #fff;
  padding: 36px 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid rgba(28, 60, 73, 0.08);
  border-right: none;
  border-radius: 20px 0 0 20px;
}

.login-form-header {
  margin-bottom: 28px;
}

.login-form-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1c3c49;
  margin: 0 0 8px 0;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.login-form-sub {
  font-size: 0.9rem;
  color: #607d8b;
  margin: 0;
  line-height: 1.45;
}

.login-form-v2 {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.login-form-v2 .login-field {
  margin-bottom: 20px;
}

.login-field-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1c3c49;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.login-input-wrap {
  position: relative;
}

.login-form-v2 .login-input-wrap--password .login-input-with-toggle {
  padding-right: 48px;
}

.login-password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #546e7a;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.login-password-toggle:hover {
  background: rgba(0, 172, 193, 0.08);
  color: #00838f;
}

.login-password-toggle:focus {
  outline: none;
}

.login-password-toggle:focus-visible {
  outline: 2px solid #00acc1;
  outline-offset: 2px;
}

.login-password-toggle-icon.hidden {
  display: none !important;
}

.login-form-v2 .form-group .input-icon {
  left: 16px;
  top: 50%;
  color: #546e7a;
}

.login-form-v2 .form-group input {
  width: 100%;
  padding: 14px 16px 14px 48px;
  border: 1px solid #e0e8ec;
  border-radius: 12px;
  font-size: 15px;
  background: #fbfcfd;
  box-shadow: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.login-form-v2 .form-group input:hover {
  border-color: #b0bec5;
  background: #fff;
}

.login-form-v2 .form-group input:focus {
  border-color: #00acc1;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 172, 193, 0.15);
}

.login-form-v2 .login-input-wrap select {
  width: 100%;
  padding: 14px 16px 14px 48px;
  border: 1px solid #e0e8ec;
  border-radius: 12px;
  font-size: 15px;
  background-color: #fbfcfd;
  color: #1c3c49;
  cursor: pointer;
  appearance: auto;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.login-form-v2 .login-input-wrap select:hover {
  border-color: #b0bec5;
  background: #fff;
}

.login-form-v2 .login-input-wrap select:focus {
  border-color: #00acc1;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 172, 193, 0.15);
  outline: none;
}

.login-trust {
  font-size: 12px;
  color: #90a4ae;
  margin: 0 0 18px 0;
  line-height: 1.4;
}

.btn-login-primary {
  border-radius: 12px;
  text-transform: none;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  padding: 14px 24px;
  box-shadow: 0 4px 16px rgba(0, 188, 212, 0.28);
  border: none;
}

.btn-login-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(0, 188, 212, 0.38);
}

.btn-login-primary:disabled,
.btn-login-primary.is-loading {
  cursor: wait;
  opacity: 0.9;
  transform: none;
}

a.btn-login-secondary {
  display: block;
  text-align: center;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  color: #1c3c49;
  background: #fff;
  border: 2px solid #cfd8dc;
  text-decoration: none;
  margin-top: 12px;
  line-height: 1.4;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  box-sizing: border-box;
}

a.btn-login-secondary:hover {
  background: #e0f7fa;
  border-color: #00bcd4;
  color: #006064;
}

.error-message-v2 {
  background: #ffebee;
  color: #b71c1c;
  border: 1px solid #ffcdd2;
  border-radius: 10px;
  font-size: 14px;
  margin-top: 16px;
}

.login-aux-bar-v2 {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #eceff1;
  justify-content: center;
  gap: 8px 12px;
}

.login-page-v2 .login-aux-bar-v2 .login-aux-link {
  color: #00695c;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
}

.login-page-v2 .login-aux-bar-v2 .login-aux-link:hover,
.login-page-v2 .login-aux-bar-v2 .login-aux-link:focus-visible {
  color: #004d40;
  text-decoration: none;
  border-bottom-color: #00bcd4;
}

.login-page-v2 .login-aux-bar-v2 .login-aux-sep {
  color: #bdbdbd;
}

/*
 * Login/registro v2: logo fixed arriba a la izquierda (sin override; igual que .login-page-logo global).
 * FAQ / Planes: franja horizontal fija arriba a la derecha, fuera de la tarjeta.
 */
.login-page-v2-top-strip {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  margin: 0;
  padding: 0;
  border: none;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px 12px;
  max-width: min(480px, calc(100vw - 40px));
  box-sizing: border-box;
}

.login-page-v2 .login-page-v2-top-strip .login-aux-link {
  font-size: 16px;
  font-weight: 600;
}

/* Panel hÃ©roe */
.login-panel--hero {
  position: relative;
  padding: 44px 38px 40px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: none;
  border-radius: 0 20px 20px 0;
  overflow: hidden;
  background: linear-gradient(155deg, #1e4352 0%, #132e38 46%, #0b1c22 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}

.login-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 95% 55% at 18% 12%, rgba(0, 188, 212, 0.22) 0%, transparent 52%),
    radial-gradient(ellipse 70% 45% at 82% 88%, rgba(0, 137, 123, 0.14) 0%, transparent 48%),
    radial-gradient(ellipse 45% 35% at 28% 42%, rgba(129, 96, 208, 0.07) 0%, transparent 55%);
  pointer-events: none;
}

.login-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.65;
  pointer-events: none;
}

.login-hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  min-height: 0;
}

.login-hero-mark {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 22px;
}

.login-hero-icon-ring {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(0, 188, 212, 0.12),
    0 0 36px rgba(0, 188, 212, 0.14);
}

.login-hero-isologo {
  object-fit: contain;
  width: 68px;
  height: 68px;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.28));
}

.login-hero-brand {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 4px 0;
  letter-spacing: -0.03em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.login-hero-main-title {
  font-size: 1.68rem;
  line-height: 1.22;
  margin: 0 0 14px 0;
  color: #fff;
  letter-spacing: -0.025em;
  font-weight: 700;
}

.login-hero-subtitle {
  margin: 0 0 22px 0;
  font-size: 0.98rem;
  line-height: 1.55;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
}

.login-hero-tagline {
  font-size: 0.95rem;
  opacity: 0.9;
  margin: 0 0 0 0;
  font-weight: 500;
  color: #b2ebf2;
}

.login-hero-text {
  font-size: 0.9rem;
  line-height: 1.6;
  opacity: 0.92;
  margin: 0 0 20px 0;
  color: #eceff1;
}

.login-hero-text.login-hero-subtitle {
  color: rgba(255, 255, 255, 0.88);
}

.login-hero-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-hero-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.93);
  padding: 11px 13px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.login-hero-check {
  flex-shrink: 0;
  color: #4dd0e1;
  margin-top: 2px;
}

/* Modales: entrada suave */
.login-modal-backdrop {
  animation: loginModalFadeIn 0.22s ease;
}

.login-modal-panel {
  animation: loginModalPopIn 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes loginModalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes loginModalPopIn {
  from {
    opacity: 0;
    transform: scale(0.97) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* WhatsApp / Instagram: pulso sutil (solo login v2) */
.login-page-v2 .login-whatsapp-fab {
  animation: loginWhatsappPulse 2.8s ease-in-out infinite;
}

.login-page-v2 .login-instagram-fab {
  animation: loginInstagramPulse 2.8s ease-in-out infinite;
}

.login-page-v2 .login-web-fab {
  animation: loginWebPulse 2.8s ease-in-out infinite;
}

@keyframes loginWhatsappPulse {
  0%, 100% { box-shadow: 0 6px 20px rgba(18, 140, 126, 0.45); }
  50% { box-shadow: 0 6px 24px rgba(18, 140, 126, 0.65), 0 0 0 0 rgba(37, 211, 102, 0.35); }
}

@keyframes loginInstagramPulse {
  0%, 100% {
    box-shadow: 0 6px 22px rgba(131, 58, 180, 0.34), 0 2px 10px rgba(253, 29, 29, 0.18);
  }
  50% {
    box-shadow:
      0 6px 26px rgba(131, 58, 180, 0.46),
      0 0 0 0 rgba(225, 48, 108, 0.22),
      0 2px 12px rgba(253, 29, 29, 0.24);
  }
}

@keyframes loginWebPulse {
  0%, 100% { box-shadow: 0 6px 20px rgba(0, 131, 143, 0.38); }
  50% { box-shadow: 0 6px 24px rgba(0, 131, 143, 0.52), 0 0 0 0 rgba(0, 188, 212, 0.25); }
}

.login-page-v2 .login-whatsapp-fab:hover,
.login-page-v2 .login-whatsapp-fab:focus-visible,
.login-page-v2 .login-whatsapp-fab:active,
.login-page-v2 .login-instagram-fab:hover,
.login-page-v2 .login-instagram-fab:focus-visible,
.login-page-v2 .login-instagram-fab:active,
.login-page-v2 .login-web-fab:hover,
.login-page-v2 .login-web-fab:focus-visible,
.login-page-v2 .login-web-fab:active {
  animation: none;
}

/* Login v2 responsive */
@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
    min-height: 0;
    border-radius: 16px;
  }

  .login-panel--form {
    border-radius: 16px 16px 0 0;
    border: 1px solid rgba(28, 60, 73, 0.08);
    border-bottom: none;
    padding: 28px 22px 20px;
  }

  .login-panel--hero {
    border-radius: 0 0 16px 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: none;
    padding: 24px 22px 28px;
  }

  /* Mantener visible el subtÃ­tulo del hero (login-hero-subtitle); antes se ocultaba todo .login-hero-text */
  .login-hero-text:not(.login-hero-subtitle) {
    display: none;
  }

  .login-hero-list {
    gap: 8px;
  }

  .login-hero-list li {
    font-size: 0.85rem;
  }

  .login-hero-icon-ring {
    width: 78px;
    height: 78px;
    margin-bottom: 12px;
  }

  .login-hero-isologo {
    width: 56px;
    height: 56px;
  }

  .login-hero-main-title {
    font-size: 1.45rem;
  }
}

@media (max-width: 480px) {
  .login-page-v2 {
    padding: 44px 10px 78px;
  }

  .login-form-title {
    font-size: 1.3rem;
  }

  .login-panel--form {
    padding: 24px 18px 18px;
  }
}

/* Registro pÃºblico: mismo layout que login v2; formulario algo mÃ¡s alto */
.registro-page.login-page-v2 .login-shell {
  min-height: min(620px, calc(100vh - 104px));
}

.registro-page .login-form-title {
  font-size: 1.75rem;
  margin-bottom: 4px;
}

.registro-page-kicker {
  margin: 0 0 10px 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #00838f;
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.registro-success-banner {
  padding: 16px 18px;
  background: #e8f5e9;
  color: #1b5e20;
  border: 1px solid #c8e6c9;
  border-radius: 12px;
  margin-bottom: 18px;
  font-size: 14px;
  line-height: 1.5;
}

.registro-success-banner strong {
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}

.registro-inline-msg {
  padding: 14px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 14px;
}

.registro-inline-msg--error {
  background: #ffebee;
  color: #b71c1c;
  border: 1px solid #ffcdd2;
}

/* Registro: escritorio = formulario completo; mÃ³vil = wizard */
.reg-mw {
  display: none;
}

.reg-desktop-shell {
  display: flex;
  flex-direction: column;
}

.reg-mw-meta {
  font-size: 12px;
  font-weight: 700;
  color: #00838f;
  margin: 0 0 8px 0;
}

.reg-mw-progress {
  display: flex;
  gap: 8px;
  margin: 0 0 16px 0;
}

.reg-mw-progress span {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: #e0f7fa;
  transition: background 0.2s;
}

.reg-mw-progress span.is-on {
  background: #00bcd4;
}

.reg-mw-panel {
  display: none;
}

.reg-mw-panel.is-active {
  display: block;
}

.reg-mw-step-title {
  margin: 0 0 6px 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1c3c49;
}

.reg-mw-lead {
  margin: 0 0 16px 0;
  font-size: 14px;
  color: #546e7a;
  line-height: 1.45;
}

.reg-mw-bar {
  display: none;
  gap: 10px;
  margin-top: 20px;
}

.reg-mw-bar .btn {
  flex: 1;
  margin: 0;
}

.reg-mw-footer {
  margin-top: 14px;
}

@media (max-width: 767px) {
  .reg-mw {
    display: block;
  }

  .reg-desktop-shell {
    display: none !important;
  }

  .registro-page .login-panel--hero {
    display: none !important;
  }

  .registro-page .login-shell {
    min-height: auto;
  }

  .reg-mw-bar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3500;
    margin-top: 0;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    border-top: 1px solid #e0f7fa;
    box-shadow: 0 -4px 20px rgba(28, 60, 73, 0.1);
  }

  body.reg-mw-active {
    padding-bottom: 72px;
  }

  body.reg-mw-active.registro-page .login-container {
    padding-bottom: 88px;
  }
}

/* Login: escritorio = formulario completo; mÃ³vil = wizard */
.login-mw {
  display: none;
}

.login-desktop-shell {
  display: flex;
  flex-direction: column;
}

.login-mw-meta {
  font-size: 12px;
  font-weight: 700;
  color: #00838f;
  margin: 0 0 8px 0;
}

.login-mw-progress {
  display: flex;
  gap: 8px;
  margin: 0 0 16px 0;
}

.login-mw-progress span {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: #e0f7fa;
  transition: background 0.2s;
}

.login-mw-progress span.is-on {
  background: #00bcd4;
}

.login-mw-panel {
  display: none;
}

.login-mw-panel.is-active {
  display: block;
}

.login-mw-step-title {
  margin: 0 0 6px 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1c3c49;
}

.login-mw-lead {
  margin: 0 0 16px 0;
  font-size: 14px;
  color: #546e7a;
  line-height: 1.45;
}

.login-mw-bar {
  display: none;
  gap: 10px;
  margin-top: 20px;
}

.login-mw-bar .btn {
  flex: 1;
  margin: 0;
}

.login-mw-footer {
  margin-top: 14px;
}

@media (max-width: 767px) {
  .login-mw {
    display: block;
  }

  .login-desktop-shell {
    display: none !important;
  }

  .login-page .login-panel--hero {
    display: none !important;
  }

  .login-page.login-mw-active .login-mw-desktop-header {
    display: none;
  }

  .login-page .login-shell {
    min-height: auto;
  }

  .login-page.login-mw-active .login-panel--form {
    padding: 16px 14px 10px;
  }

  .login-mw-header {
    text-align: center;
    margin-bottom: 18px;
    padding-top: 4px;
  }

  .login-mw-brand {
    margin: 0 0 4px 0;
    font-size: 1.7rem;
    font-weight: 700;
    color: #1c3c49;
    letter-spacing: -0.02em;
    line-height: 1.15;
  }

  .login-mw-kicker {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #00838f;
  }

  .login-mw-top {
    margin-bottom: 14px;
  }

  .login-mw-meta {
    text-align: center;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 11px;
    margin-bottom: 10px;
  }

  .login-mw-progress span {
    height: 5px;
    border-radius: 6px;
  }

  .login-mw-card {
    background: #fff;
    border: 1px solid #e0f7fa;
    border-left: 4px solid #1c3c49;
    border-radius: 16px;
    padding: 20px 18px 22px;
    box-shadow: 0 10px 28px rgba(28, 60, 73, 0.1);
  }

  .login-mw-step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin-bottom: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00bcd4 0%, #00838f 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 4px 12px rgba(0, 131, 143, 0.28);
  }

  .login-mw-step-title {
    font-size: 1.2rem;
    margin-bottom: 8px;
  }

  .login-mw-lead {
    font-size: 15px;
    margin-bottom: 20px;
    line-height: 1.4;
  }

  .login-mw .login-field {
    margin-bottom: 0;
  }

  .login-mw .login-field-label {
    font-size: 13px;
    margin-bottom: 6px;
  }

  .login-mw .login-input-wrap input {
    min-height: 48px;
    font-size: 16px;
    padding-top: 12px;
    padding-bottom: 12px;
    border-radius: 10px;
  }

  .login-mw-trust {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 16px 0 0;
    padding: 10px 12px;
    background: linear-gradient(180deg, #f4feff 0%, #fff 100%);
    border: 1px solid #e0f7fa;
    border-radius: 10px;
    font-size: 12px;
    color: #546e7a;
    line-height: 1.4;
  }

  .login-mw-trust-icon {
    flex-shrink: 0;
    font-size: 14px;
    line-height: 1.2;
  }

  .login-mw-error {
    margin-bottom: 12px;
    border-radius: 10px;
  }

  .login-mw-bar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3500;
    margin-top: 0;
    gap: 12px;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, #fff 28%);
    border-top: 1px solid #e0f7fa;
    box-shadow: 0 -6px 24px rgba(28, 60, 73, 0.12);
    backdrop-filter: blur(10px);
  }

  .login-mw-bar .btn {
    min-height: 48px;
    border-radius: 10px;
    font-size: 15px;
  }

  .login-mw-bar .btn-primary {
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(0, 131, 143, 0.32);
  }

  .login-mw-footer {
    margin-top: 10px;
    padding-bottom: 6px;
    text-align: center;
  }

  .login-mw-footer .btn-login-secondary {
    background: transparent;
    border: none;
    box-shadow: none;
    color: #00838f;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 12px;
  }

  .login-mw-footer .btn-login-secondary:hover {
    background: rgba(0, 188, 212, 0.08);
  }

  body.login-mw-active {
    padding-bottom: 80px;
  }

  body.login-mw-active.login-page .login-container {
    padding-bottom: 96px;
  }
}

/* ============================================
   FOOTER DE PÃGINA
   ============================================ */

.page-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(28, 60, 73, 0.1);
  padding: 15px;
  text-align: center;
  color: #1c3c49;
  font-size: 14px;
  border-top: 1px solid rgba(28, 60, 73, 0.2);
}

.page-footer p {
  margin: 0;
  font-weight: 500;
}

.page-footer-login-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
}

.page-footer-social-cluster {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* Instagram y web en el pie: monocromÃ¡ticos y sutiles (WhatsApp sigue flotante y a color) */
.page-footer .login-footer-icon-btn {
  width: 40px;
  height: 40px;
  border-width: 1px;
  border-style: solid;
  border-color: rgba(28, 60, 73, 0.2);
  background: transparent;
  color: #607d8b;
  box-shadow: none;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

.page-footer .login-instagram-fab.login-footer-icon-btn,
.page-footer .login-web-fab.login-footer-icon-btn {
  background: transparent;
  box-shadow: none;
}

.page-footer .login-footer-icon-btn .login-whatsapp-fab-inner svg {
  width: 22px;
  height: 22px;
  opacity: 0.9;
}

.page-footer .login-footer-icon-btn:hover,
.page-footer .login-footer-icon-btn:focus-visible {
  transform: translateY(-1px);
  color: #37474f;
  background: rgba(28, 60, 73, 0.05);
  border-color: rgba(28, 60, 73, 0.28);
  box-shadow: none;
  outline: none;
}

.page-footer .login-footer-icon-btn:active {
  transform: translateY(0);
  background: rgba(28, 60, 73, 0.08);
}

.login-page-v2 .page-footer .login-instagram-fab,
.login-page-v2 .page-footer .login-web-fab {
  animation: none;
}

/* ============================================
   DASHBOARD
   ============================================ */

.dashboard {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.header {
  background: white;
  color: #333;
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid #e0e0e0;
}

.header h1 {
  font-size: 20px;
}

.header-left img {
  max-height: 45px;
  width: auto;
  object-fit: contain;
}

.header-right {
  display: flex;
  gap: 15px;
  align-items: center;
}

.user-info {
  font-size: 14px;
  background: #f8f9fa;
  color: #333;
  padding: 8px 15px;
  border-radius: 20px;
  border: 1px solid #e0e0e0;
}

.main-content {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.sidebar {
  width: 250px;
  background: #1c3c49;
  border-right: 1px solid #1c3c49;
  overflow-y: auto;
}

.nav-menu {
  padding: 20px 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 25px;
  color: white;
  text-decoration: none;
  transition: all 0.3s;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.nav-item.active {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border-left-color: #00bcd4;
  font-weight: 600;
}

.nav-item span {
  font-size: 20px;
}

/* PromociÃ³n referidos (mÃ©dico): botÃ³n junto a notificaciones en la cabecera */
.medico-header-invite-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  min-height: auto;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
  border: 1px solid rgba(255, 152, 0, 0.55);
  background: linear-gradient(180deg, #fff8e1 0%, #ffecb3 100%);
  color: #1c3c49;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.medico-header-invite-btn:hover {
  border-color: #ff9800;
  box-shadow: 0 2px 8px rgba(255, 152, 0, 0.25);
}
.medico-header-invite-btn:active {
  transform: scale(0.98);
}
.medico-header-invite-btn svg {
  flex-shrink: 0;
}

.medico-invite-modal {
  position: fixed;
  inset: 0;
  z-index: 10060;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}
.medico-invite-modal.is-open {
  display: flex;
}
.medico-invite-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 35, 45, 0.55);
  cursor: pointer;
}
.medico-invite-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 540px;
  max-height: min(92vh, 780px);
  overflow-y: auto;
  background: #fff;
  border-radius: 14px;
  padding: 22px 22px 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  color: #263238;
}
.medico-invite-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #eceff1;
  color: #37474f;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.medico-invite-modal__close:hover {
  background: #cfd8dc;
}
.medico-invite-modal__title {
  margin: 0 36px 10px 0;
  font-size: 1.35rem;
  color: #1c3c49;
}
.medico-invite-modal__lead {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.5;
  color: #455a64;
}
.medico-invite-modal__field {
  margin-bottom: 14px;
}
.medico-invite-modal__label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #546e7a;
  margin-bottom: 6px;
}
.medico-invite-modal__value {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex-wrap: wrap;
}
.medico-invite-modal__value code,
.medico-invite-modal__value a {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f5fafb;
  border: 1px solid #cfd8dc;
  font-size: 13px;
  word-break: break-all;
}
.medico-invite-modal__value a {
  color: #006064;
  text-decoration: none;
}
.medico-invite-modal__value a:hover {
  text-decoration: underline;
}
.medico-invite-modal__btn {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #b0bec5;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: #37474f;
  cursor: pointer;
  white-space: nowrap;
}
.medico-invite-modal__btn:hover {
  background: #eceff1;
}
.medico-invite-modal__btn--primary {
  border-color: #00acc1;
  background: #e0f7fa;
  color: #006064;
}
.medico-invite-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #eceff1;
}
.medico-invite-modal__hint {
  margin: 14px 0 0;
  font-size: 12px;
  color: #78909c;
  line-height: 1.45;
}

.medico-invite-modal__dash {
  margin: 0 0 8px;
  padding: 14px 0 6px;
  border-top: 1px solid #eceff1;
}
.medico-invite-modal__subtitle {
  margin: 0 0 10px;
  font-size: 1.05rem;
  color: #1c3c49;
}
.medico-invite-modal__dash-meta {
  margin: 0;
  font-size: 13px;
  color: #78909c;
}
.medico-invite-modal__dash-kicker {
  margin: 12px 0 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #78909c;
}
#medicoInviteDashContent .medico-invite-modal__dash-kicker:first-child {
  margin-top: 0;
}
.medico-invite-modal__dash-text {
  margin: 0 0 4px;
  font-size: 13px;
  line-height: 1.5;
  color: #455a64;
}
.medico-invite-modal__dash-error {
  margin: 10px 0 0;
  font-size: 13px;
  color: #c62828;
  line-height: 1.4;
}
.medico-invite-modal__section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #90a4ae;
  margin: 18px 0 10px;
}
.medico-invite-chip {
  display: inline-block;
  padding: 2px 8px;
  margin-right: 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  vertical-align: baseline;
}
.medico-invite-chip--pending {
  background: #fff3e0;
  color: #e65100;
}
.medico-invite-chip--used {
  background: #e8f5e9;
  color: #2e7d32;
}
.medico-invite-chip--expired {
  background: #ffebee;
  color: #c62828;
}
.medico-invite-chip--muted {
  background: #eceff1;
  color: #546e7a;
}
.medico-invite-referrals-wrap {
  margin-top: 4px;
}
.medico-invite-referrals-scroll {
  max-height: 240px;
  overflow: auto;
  border: 1px solid #e0e7ea;
  border-radius: 10px;
  background: #fafcfd;
}
.medico-invite-referrals-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.medico-invite-referrals-table th,
.medico-invite-referrals-table td {
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #eceff1;
}
.medico-invite-referrals-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eef5f7;
  color: #37474f;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 700;
}
.medico-invite-referrals-table tbody tr:last-child td {
  border-bottom: none;
}
.medico-invite-referrals-detail {
  font-size: 12px;
  color: #607d8b;
  line-height: 1.4;
}
.medico-invite-rules-list {
  margin: 12px 0 0;
  padding-left: 18px;
  font-size: 12px;
  color: #78909c;
  line-height: 1.5;
}

/* Modal: editar consultorio desde Mi perfil (direcciÃ³n y datos completos en ventana emergente) */
.profile-consultorio-modal {
  position: fixed;
  inset: 0;
  z-index: 10062;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}
.profile-consultorio-modal.is-open {
  display: flex;
}
.profile-consultorio-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 35, 45, 0.55);
  cursor: pointer;
}
.profile-consultorio-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  max-height: min(92vh, 680px);
  overflow-y: auto;
  background: #fff;
  border-radius: 14px;
  padding: 22px 22px 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  color: #263238;
}
.profile-consultorio-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #eceff1;
  color: #37474f;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.profile-consultorio-modal__close:hover {
  background: #cfd8dc;
}
.profile-consultorio-modal__title {
  margin: 0 36px 8px 0;
  font-size: 1.3rem;
  color: #1c3c49;
}
.profile-consultorio-modal__lead {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.45;
  color: #546e7a;
}
.profile-consultorio-modal__default {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: #37474f;
  cursor: pointer;
  user-select: none;
}
.profile-consultorio-modal__default input {
  margin: 3px 0 0;
  accent-color: #1c3c49;
}
.profile-consultorio-modal__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid #eceff1;
}

.content {
  flex: 1;
  padding: 30px;
  overflow-y: auto;
  background: #f4feff;
}

.content-section {
  display: none;
}

.content-section.active {
  display: block;
}

.content h2 {
  color: #1c3c49;
  margin-bottom: 25px;
  font-size: 28px;
  font-weight: 700;
}

.content h3 {
  color: #1c3c49;
  margin-bottom: 15px;
  margin-top: 30px;
  font-size: 20px;
  font-weight: 600;
}

.form-card,
.card {
  background: white;
  color: #1c3c49;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(28, 60, 73, 0.2);
  margin-bottom: 20px;
  border: 1px solid #e0f7fa;
}

.form-card label,
.card label {
  color: #1c3c49;
  font-weight: 600;
}

.form-card input,
.form-card select,
.form-card textarea,
.card input,
.card select,
.card textarea {
  background: white;
  color: #333;
  border: 1px solid #ddd;
}

.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus,
.card input:focus,
.card select:focus,
.card textarea:focus {
  border-color: #00bcd4;
  box-shadow: 0 0 0 2px rgba(0, 188, 212, 0.2);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-control {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
  background: white;
  color: #333;
  transition: border-color 0.3s;
}

.form-control:focus {
  outline: none;
  border-color: #2c5aa0;
  box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

.text-muted {
  color: #666;
  font-size: 14px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.spacer {
  height: 30px;
}

/* ============================================
   TABLAS
   ============================================ */

.table-container {
  background: white;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(28, 60, 73, 0.2);
  overflow: hidden;
  border: 1px solid #e0f7fa;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead {
  background: #f4feff;
}

.data-table th {
  padding: 15px;
  text-align: left;
  font-weight: 600;
  color: #1c3c49;
  border-bottom: 2px solid #00bcd4;
  font-size: 14px;
}

.data-table td {
  padding: 15px;
  border-bottom: 1px solid #f0f8ff;
  font-size: 14px;
  color: #1c3c49;
}

.data-table tbody tr:hover {
  background: #f4feff;
}

/* --- Admin: CRM mÃ©dicos --- */
.crm-toolbar-card {
  margin-bottom: 18px;
}

.crm-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.crm-toolbar-row--with-view .crm-view-switch {
  flex: 1 1 160px;
  max-width: 100%;
}

@media (min-width: 920px) {
  .crm-toolbar-row--with-view .crm-view-switch {
    flex: 0 0 auto;
    max-width: none;
    margin-right: 8px;
  }
}

.crm-view-switch {
  display: inline-flex;
  padding: 4px;
  border-radius: 11px;
  background: linear-gradient(180deg, #e8f2f5 0%, #dfeaf0 100%);
  border: 1px solid #c9d9df;
  align-self: flex-end;
}

.crm-view-btn {
  flex: 1 1 50%;
  min-width: 100px;
  border: none;
  background: transparent;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #557080;
  border-radius: 8px;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.crm-view-btn:hover {
  color: #1c3c49;
}

.crm-view-btn--active {
  background: #fff;
  color: #05505c;
  box-shadow: 0 2px 8px rgba(28, 60, 73, 0.1);
}

.crm-kanban-outer {
  margin-bottom: 18px;
}

.crm-kanban-board-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
}

.crm-kanban-board {
  display: flex;
  flex-direction: row;
  gap: 14px;
  align-items: flex-start;
  min-height: 240px;
}

.crm-kanban-col {
  flex: 0 0 clamp(258px, 26vw, 300px);
  width: clamp(258px, 26vw, 300px);
  max-height: min(72vh, 780px);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #fafcfd 0%, #f4f8fa 100%);
  border-radius: 13px;
  border: 1px solid #d0e3e9;
  box-shadow:
    0 4px 18px rgba(28, 60, 73, 0.07),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.crm-kanban-col[data-lead='perdido'] {
  border-color: rgba(251, 113, 133, 0.45);
}

.crm-kanban-col[data-lead='suscrito'] {
  border-color: rgba(52, 211, 153, 0.5);
}

.crm-kanban-col-hd {
  padding: 12px 14px;
  border-bottom: 2px solid rgba(0, 188, 212, 0.35);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.crm-kanban-col-title {
  font-weight: 700;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #1c3c49;
}

.crm-kanban-col-count {
  font-size: 11px;
  font-weight: 700;
  background: rgba(0, 188, 212, 0.2);
  color: #075a63;
  padding: 4px 10px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.crm-kanban-col-cards {
  padding: 10px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.crm-kanban-card {
  background: #fff;
  border: 1px solid #e3eef2;
  border-radius: 10px;
  padding: 11px 12px;
  box-shadow: 0 2px 6px rgba(28, 60, 73, 0.05);
}

.crm-kanban-card-hd {
  margin: 0;
  padding: 0;
}

.crm-kanban-card-title {
  font-weight: 700;
  font-size: 14px;
  color: #143542;
  line-height: 1.33;
}

.crm-kanban-card-user {
  margin-top: 5px;
  font-family:
    ui-monospace,
    'Cascadia Code',
    Consolas,
    monospace;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.02em;
  word-break: break-all;
}

.crm-kanban-card-spec {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  color: #1a5f6e;
  background: rgba(0, 188, 212, 0.12);
  border: 1px solid rgba(0, 188, 212, 0.22);
  border-radius: 6px;
  padding: 4px 8px;
  display: inline-block;
  max-width: 100%;
}

.crm-kanban-card-org {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.35;
  color: #4a6573;
}

.crm-kanban-card-oid {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
}

.crm-kanban-trial-chip {
  margin-top: 8px;
}

.crm-kanban-card-ft {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eef4f7;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.crm-kanban-phone {
  width: 100%;
}

.crm-kanban-phone-num {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #1c3c49;
  word-break: break-word;
  line-height: 1.35;
  letter-spacing: 0.02em;
}

.crm-kanban-phone-num--empty {
  font-weight: 600;
  color: #cbd5e1;
  font-size: 12px;
}

.crm-kanban-card-ft-actions {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.crm-kanban-card-act {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 11px;
  font-weight: 600;
  color: #728496;
}

.crm-kanban-card-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.crm-kanban-act-a {
  font-size: 11px;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 7px;
  text-decoration: none !important;
  white-space: nowrap;
}

.crm-kanban-act-a.crm-kanban-act-a--wa {
  background: linear-gradient(180deg, #2fe06d 0%, #22c55e 100%);
  color: #fff !important;
}

.crm-kanban-act-a.crm-kanban-act-a--tel {
  background: #fff;
  color: #1c3c49 !important;
  border: 2px solid rgba(28, 60, 73, 0.16);
}

.crm-kanban-ext {
  border: none;
  background: linear-gradient(180deg, #9d74f6 0%, #7c3aed 100%);
  color: #fff !important;
  font-size: 10px;
  font-weight: 700;
  padding: 5px 8px;
  border-radius: 6px;
  cursor: pointer;
}

.crm-kanban-empty {
  text-align: center;
  color: #a8b9c9;
  font-size: 12px;
  font-style: italic;
  padding: 18px 8px;
}

.crm-kanban-loading {
  grid-column: 1 / -1;
  padding: 28px 16px;
  text-align: center;
  color: #627a82;
}

.crm-kanban-error {
  padding: 24px 16px;
  text-align: center;
  color: #b91c1c;
}

.crm-kanban-hint {
  font-size: 12px;
  margin-top: 10px;
  line-height: 1.45;
}

.crm-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}

.crm-sort-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-left: 14px;
  margin-left: 4px;
  border-left: 1px solid rgba(28, 60, 73, 0.12);
}

.crm-sort-box-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #7a8f99;
  white-space: nowrap;
}

.crm-search-field {
  flex: 1;
  min-width: 240px;
  margin-bottom: 0 !important;
}

.crm-count-label {
  margin-top: 14px !important;
  margin-bottom: 0 !important;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.crm-filter-panel {
  margin-top: 18px;
  padding: 16px 18px 18px;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f6f9 100%);
  border: 1px solid #dfe8ec;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.crm-filter-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.crm-filter-block--secondary .crm-filter-heading {
  color: #64748b;
}

.crm-filter-heading {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #475569;
}

.crm-segment-strip {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #c9d9df;
  background: #fff;
  box-shadow: 0 1px 3px rgba(28, 60, 73, 0.07);
}

.crm-segment-strip--compact {
  max-width: 560px;
}

.crm-segment-btn.crm-facet-btn {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #334e50;
  background: #fff;
  border: none;
  border-radius: 0 !important;
  border-right: 1px solid #e5edf0 !important;
  box-shadow: none !important;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background 0.12s ease,
    color 0.12s ease;
}

.crm-segment-strip--compact .crm-segment-btn.crm-facet-btn {
  flex: 1 1 50%;
  min-width: 160px;
  white-space: normal;
  line-height: 1.3;
  text-align: center;
}

.crm-segment-btn.crm-facet-btn:last-child {
  border-right: none !important;
}

.crm-segment-btn.crm-facet-btn:hover {
  background: #f0fbfd;
  color: #0d5c6b;
}

.crm-segment-btn.crm-facet-btn--active {
  background: linear-gradient(180deg, #e5f9fc 0%, #d5f3f8 100%) !important;
  color: #064e5b !important;
  font-weight: 700;
  box-shadow: inset 0 -2px 0 #00bcd4 !important;
}

.crm-sort-reg-btn {
  border: 1px solid #c9d9df;
  background: #fff;
  color: #2d4a52;
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition:
    border-color 0.15s ease,
    background 0.15s ease;
}

.crm-sort-reg-btn:hover {
  border-color: #00bcd4;
  background: #f0fcfe;
}

.crm-sort-reg-btn--active {
  border-color: rgba(0, 188, 212, 0.55);
  background: linear-gradient(180deg, #e8fbfd 0%, #dff7fb 100%);
  color: #035a66;
}

.crm-sort-reg-ind {
  font-size: 10px;
  opacity: 0.85;
}

@media (max-width: 900px) {
  .crm-sort-box {
    flex: 1 1 100%;
    border-left: none;
    padding-left: 0;
    margin-left: 0;
    margin-top: 4px;
  }

  .crm-toolbar-actions {
    flex: 1 1 100%;
  }

  .crm-toolbar-actions .btn {
    flex: 1 1 auto;
    min-width: 120px;
  }
}

@media (max-width: 640px) {
  .crm-segment-strip:not(.crm-segment-strip--compact) {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .crm-segment-strip:not(.crm-segment-strip--compact) .crm-segment-btn.crm-facet-btn {
    flex: 0 0 auto;
    min-width: 7.2rem;
  }

  .crm-segment-strip--compact {
    flex-direction: column;
  }

  .crm-segment-strip--compact .crm-segment-btn.crm-facet-btn {
    border-right: none !important;
    border-bottom: 1px solid #e5edf0 !important;
    min-width: 0;
    flex: none;
  }

  .crm-segment-strip--compact .crm-segment-btn.crm-facet-btn:last-child {
    border-bottom: none !important;
  }
}

#crm-section .crm-board thead .crm-th-sort {
  margin: 0;
  padding: 0;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: inherit;
  text-align: left;
}

#crm-section .crm-board thead .crm-th-sort:hover {
  color: #0097a7;
}

#crm-section .crm-board thead .crm-th-sort:focus-visible {
  outline: 2px solid #00bcd4;
  outline-offset: 2px;
}

#crm-section .crm-board thead .crm-th-sort--active {
  color: #006064;
}

.crm-sort-ind {
  font-size: 9px;
  opacity: 0.75;
  flex-shrink: 0;
}

#crm-section .table-container.crm-board-outer {
  overflow: visible;
  padding: 0;
  border-radius: 14px;
  border: 1px solid rgba(0, 188, 212, 0.22);
  box-shadow: 0 10px 32px rgba(28, 60, 73, 0.12), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.crm-board-scroll {
  overflow-x: auto;
  overflow-y: auto;
  max-height: min(72vh, 880px);
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
}

#crm-section .crm-board {
  min-width: 720px;
}

#crm-section .crm-board thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 14px 16px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #3d5a66;
  background: linear-gradient(180deg, #f0fcfe 0%, #e8f9fc 100%);
  border-bottom: 2px solid rgba(0, 188, 212, 0.45);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

#crm-section .crm-board tbody td {
  padding: 16px 16px 18px;
  vertical-align: top;
  border-bottom: 1px solid rgba(0, 188, 212, 0.1);
  font-size: 14px;
}

#crm-section .crm-board tbody tr.crm-row:hover {
  background: linear-gradient(90deg, rgba(240, 252, 254, 0.85) 0%, #fbfeff 40%);
}

#crm-section .crm-th-actions {
  min-width: 148px;
  width: 1%;
  white-space: nowrap;
}

#crm-section .crm-th-spec {
  width: 16%;
}

#crm-section .crm-th-trial,
#crm-section .crm-th-activity {
  width: 18%;
}

.crm-medico-title {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: #143542;
  line-height: 1.35;
}

.crm-medico-login-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 8px;
}

.crm-medico-login-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  flex-shrink: 0;
}

.crm-medico-login-val {
  font-family:
    ui-monospace,
    'Cascadia Code',
    'Consolas',
    monospace;
  font-size: 12.5px;
  font-weight: 600;
  color: #1c3c49;
  letter-spacing: 0.02em;
  word-break: break-all;
}

.crm-medico-meta {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 188, 212, 0.12);
}

.crm-medico-meta-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  line-height: 1.45;
  color: #5c7280;
}

.crm-detail-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
}

.crm-detail-row--lead .crm-lead-badge {
  vertical-align: middle;
}

.crm-detail-label {
  flex: 0 0 6.25rem;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.crm-detail-value {
  flex: 1 1 140px;
  min-width: 0;
  color: #4a6573;
}

.crm-detail-email {
  word-break: break-word;
}

.crm-detail-pax {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #4a6573;
}

.crm-detail-pax-hint {
  font-weight: 500;
  font-size: 10px;
  color: #94a3b8;
}

.crm-detail-flags {
  flex: 1 1 100%;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.crm-meta-flag {
  font-weight: 600;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.crm-meta-flag--risk {
  color: #9f1239;
  background: rgba(244, 63, 94, 0.12);
}

.crm-meta-flag--ok {
  color: #0f5132;
  background: rgba(25, 135, 84, 0.12);
}

.crm-spec-pill {
  display: inline-block;
  max-width: 100%;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #235a69;
  background: rgba(0, 188, 212, 0.1);
  border: 1px solid rgba(0, 188, 212, 0.22);
}

.crm-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  border: 1px solid transparent;
  max-width: 100%;
}

.crm-chip--ok {
  color: #0f5132;
  background: #ecfdf5;
  border-color: rgba(16, 185, 129, 0.35);
}

.crm-chip--soft {
  color: #3d7a5f;
  background: #f0fdf6;
  border-color: rgba(34, 197, 94, 0.25);
}

.crm-chip--warn {
  color: #854d0e;
  background: #fffbeb;
  border-color: rgba(245, 158, 11, 0.4);
}

.crm-chip--danger {
  color: #9f1239;
  background: #fff1f2;
  border-color: rgba(244, 63, 94, 0.35);
}

.crm-chip--muted {
  color: #64748b;
  background: #f8fafc;
  border-color: #e2e8f0;
}

.crm-chip--sub {
  color: #0f5132;
  background: #d1fae5;
  border-color: rgba(5, 150, 105, 0.35);
}

.crm-lead-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  vertical-align: middle;
  background: #f1f5f9;
  color: #334155;
}

.crm-lead-badge--nuevo {
  background: #f1f5f9;
  color: #334155;
}

.crm-lead-badge--en_prueba {
  background: #dbeafe;
  color: #1e40af;
}

.crm-lead-badge--caliente {
  background: #fee2e2;
  color: #991b1b;
}

.crm-lead-badge--por_vencer {
  background: #fef3c7;
  color: #92400e;
}

.crm-lead-badge--suscrito {
  background: #d1fae5;
  color: #065f46;
}

.crm-lead-badge--perdido {
  background: #e2e8f0;
  color: #475569;
}

/* --- CRM pÃ¡gina dedicada (/crm) â€” pantalla completa --- */
.crm-app {
  overflow: hidden;
}

.crm-dashboard {
  height: 100vh;
  overflow: hidden;
}

.crm-header {
  flex-shrink: 0;
  padding: 12px 24px;
}

.crm-header .header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.crm-logo {
  height: 42px;
  width: auto;
}

.crm-header-brand {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.crm-header-product {
  font-size: 15px;
  font-weight: 700;
  color: #1c3c49;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.crm-header-tagline {
  font-size: 12px;
  color: #64748b;
}

.crm-header-actions {
  gap: 10px !important;
}

.crm-user-info {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 8px !important;
}

.crm-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1c3c49;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b2ebf2;
  flex-shrink: 0;
}

.crm-user-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.crm-user-name {
  font-weight: 600;
  font-size: 13px;
}

.crm-user-role {
  font-size: 11px;
  opacity: 0.75;
}

.crm-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 14px 18px 16px;
  background: linear-gradient(180deg, #f4feff 0%, #eef8fa 100%);
  overflow: hidden;
}

.crm-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.crm-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #d8e8ec;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(28, 60, 73, 0.06);
  flex-shrink: 0;
}

.crm-topbar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.crm-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.crm-search-wrap {
  flex: 1;
  min-width: min(100%, 280px);
  max-width: 520px;
}

.crm-search-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin-bottom: 4px;
}

.crm-search-input {
  width: 100%;
}

.crm-total-pill {
  margin: 0 !important;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #0d5c6b;
  background: linear-gradient(180deg, #e8fbfd 0%, #dff5f9 100%);
  border: 1px solid rgba(0, 188, 212, 0.28);
  border-radius: 999px;
  white-space: nowrap;
}

.crm-refresh-btn {
  white-space: nowrap;
}

.crm-status-line {
  margin: 0 !important;
  font-size: 13px;
  flex-shrink: 0;
}

.crm-stats-strip {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 8px;
  flex-shrink: 0;
}

@media (max-width: 1200px) {
  .crm-stats-strip {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .crm-stats-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.crm-stat-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #d5e5ea;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.12s ease;
  min-width: 0;
}

.crm-stat-card:hover {
  border-color: #00bcd4;
  box-shadow: 0 4px 14px rgba(0, 188, 212, 0.12);
}

.crm-stat-card--active {
  border-color: #00bcd4;
  background: linear-gradient(180deg, #e8fbfd 0%, #dff5f9 100%);
  box-shadow: inset 0 -2px 0 #00bcd4;
}

.crm-stat-card-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.crm-stat-card-value {
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: #143542;
}

.crm-stat-card--nuevo .crm-stat-card-value { color: #334155; }
.crm-stat-card--en_prueba .crm-stat-card-value { color: #1e40af; }
.crm-stat-card--caliente .crm-stat-card-value { color: #991b1b; }
.crm-stat-card--por_vencer .crm-stat-card-value { color: #92400e; }
.crm-stat-card--perdido .crm-stat-card-value { color: #475569; }
.crm-stat-card--suscrito .crm-stat-card-value { color: #065f46; }
.crm-stat-card--total .crm-stat-card-value { color: #0d5c6b; }
.crm-stat-card--alert .crm-stat-card-value { color: #7c2d12; }
.crm-stat-card--warn .crm-stat-card-value { color: #b45309; }

.crm-facet-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  min-width: 0;
}

.crm-facet-bar-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #64748b;
  flex-shrink: 0;
}

.crm-segment-strip--inline {
  flex: 1;
  min-width: 0;
}

.crm-board-area {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.crm-dashboard .crm-kanban-outer {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}

.crm-dashboard .crm-kanban-board-wrap {
  flex: 1;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
}

.crm-dashboard .crm-kanban-board {
  height: 100%;
  min-height: 320px;
  align-items: stretch;
}

.crm-dashboard .crm-kanban-col {
  flex: 1 1 0;
  min-width: 210px;
  width: auto;
  max-width: none;
  max-height: none;
  height: 100%;
  transition: opacity 0.2s ease, box-shadow 0.2s ease;
}

.crm-dashboard .crm-kanban-col--dim {
  opacity: 0.45;
}

.crm-dashboard .crm-kanban-col--focus {
  box-shadow:
    0 0 0 2px rgba(0, 188, 212, 0.45),
    0 8px 24px rgba(28, 60, 73, 0.12);
}

.crm-kanban-col-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.crm-kanban-col[data-lead='nuevo'] .crm-kanban-col-dot { background: #94a3b8; }
.crm-kanban-col[data-lead='en_prueba'] .crm-kanban-col-dot { background: #3b82f6; }
.crm-kanban-col[data-lead='caliente'] .crm-kanban-col-dot { background: #ef4444; }
.crm-kanban-col[data-lead='por_vencer'] .crm-kanban-col-dot { background: #f59e0b; }
.crm-kanban-col[data-lead='perdido'] .crm-kanban-col-dot { background: #64748b; }
.crm-kanban-col[data-lead='suscrito'] .crm-kanban-col-dot { background: #10b981; }

.crm-kanban-col-hd {
  gap: 8px;
}

.crm-kanban-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.crm-kanban-card-meta {
  margin-top: 8px;
}

.crm-kanban-card-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 188, 212, 0.1);
}

.crm-kanban-metric--wide {
  grid-column: 1 / -1;
}

.crm-kanban-metric-label {
  display: block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin-bottom: 2px;
}

.crm-kanban-metric-val {
  font-size: 12px;
  font-weight: 600;
  color: #334e50;
  line-height: 1.35;
}

#crm-page .table-container.crm-board-outer {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: visible;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(0, 188, 212, 0.22);
  box-shadow: 0 8px 28px rgba(28, 60, 73, 0.1);
  margin-bottom: 0;
}

#crm-page .crm-board-scroll {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow: auto;
  border-radius: 12px;
}

#crm-page .crm-board {
  min-width: 900px;
}

#crm-page .crm-board thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 12px 14px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #3d5a66;
  background: linear-gradient(180deg, #f0fcfe 0%, #e8f9fc 100%);
  border-bottom: 2px solid rgba(0, 188, 212, 0.45);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

#crm-page .crm-board tbody td {
  padding: 14px;
  vertical-align: top;
  border-bottom: 1px solid rgba(0, 188, 212, 0.1);
  font-size: 14px;
}

#crm-page .crm-board tbody tr.crm-row:hover {
  background: linear-gradient(90deg, rgba(240, 252, 254, 0.85) 0%, #fbfeff 40%);
}

#crm-page .crm-board thead .crm-th-sort {
  margin: 0;
  padding: 0;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: inherit;
  text-align: left;
}

#crm-page .crm-board thead .crm-th-sort:hover {
  color: #0097a7;
}

#crm-page .crm-board thead .crm-th-sort--active {
  color: #006064;
}

#crm-page .crm-th-actions {
  min-width: 120px;
  width: 1%;
  white-space: nowrap;
}

.crm-wa-btn {
  background: #25d366 !important;
  color: #fff !important;
  border: none !important;
}

@media (max-width: 900px) {
  .crm-main {
    padding: 10px 12px;
  }

  .crm-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .crm-topbar-right {
    justify-content: space-between;
  }

  .crm-facet-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .crm-segment-strip--inline {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .crm-segment-strip--inline .crm-segment-btn.crm-facet-btn {
    flex: 0 0 auto;
    min-width: 7rem;
  }
}

.crm-phone-display {
  font-size: 12.5px;
  font-weight: 700;
  color: #143542;
  line-height: 1.35;
  word-break: break-word;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  padding-bottom: 2px;
}

.crm-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

.crm-actions .btn-sm {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border-radius: 9px;
  font-weight: 600;
  text-align: center;
  justify-content: center;
  padding: 8px 12px;
  border: none;
  transition: transform 0.06s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.crm-actions .btn-sm:hover {
  transform: translateY(-1px);
}

.crm-action-wa {
  background: linear-gradient(180deg, #2fe06d 0%, #22c55e 100%);
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.35);
  text-decoration: none !important;
}

.crm-action-wa:hover {
  filter: brightness(1.05);
}

.crm-action-call {
  background: #fff;
  color: #1c3c49 !important;
  border: 2px solid rgba(28, 60, 73, 0.18) !important;
  text-decoration: none !important;
}

.crm-action-call:hover {
  border-color: #00bcd4 !important;
  color: #0e7490 !important;
}

.crm-action-trial {
  background: linear-gradient(180deg, #8b5cf6 0%, #7c3aed 100%);
  color: #fff !important;
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.35);
}

.crm-action-empty {
  display: block;
  font-size: 12px;
  color: #94a3b8;
  text-align: center;
  padding: 10px 6px;
  border-radius: 8px;
  background: #f8fafc;
}

.crm-pagination {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.crm-page-meta {
  font-size: 13px;
  color: #5c7280;
  font-variant-numeric: tabular-nums;
}

.text-center {
  text-align: center;
}

/* ============================================
   BÃšSQUEDA DE PACIENTES
   ============================================ */

.search-results {
  position: relative;
  margin-top: 5px;
  background: white;
  border: 1px solid #00bcd4;
  border-radius: 8px;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: 0 4px 15px rgba(0, 188, 212, 0.2);
}

.search-item {
  padding: 12px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.2s;
  color: #333;
}

.search-item:hover {
  background: #e0f7fa;
}

.search-item:last-child {
  border-bottom: none;
}

.selected-info {
  margin-top: 10px;
}

.alert {
  padding: 12px;
  border-radius: 8px;
  margin-top: 10px;
}

.alert-info {
  background: rgba(0, 188, 212, 0.1);
  color: #1c3c49;
  border: 1px solid #00bcd4;
}

/* ============================================
   ESTADOS Y BADGES
   ============================================ */

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.status-pending {
  background: #fff3cd;
  color: #856404;
}

.status-confirmed {
  background: #d1ecf1;
  color: #0c5460;
}

.status-completed {
  background: #d4edda;
  color: #155724;
}

.status-cancelled {
  background: #f8d7da;
  color: #721c24;
}

/* ============================================
   ROLES
   ============================================ */

.role-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.role-badge-assistant {
  background: #d1ecf1;
  color: #0c5460;
}

.role-badge-doctor {
  background: #d4edda;
  color: #155724;
}

.role-badge-admin {
  background: #f8d7da;
  color: #721c24;
}

.role-select {
  padding: 6px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 12px;
  margin-right: 5px;
}

/* ============================================
   HISTORIAS CLÃNICAS
   ============================================ */

.patient-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  font-size: 14px;
}

.patient-info-grid .full-width {
  grid-column: 1 / -1;
}

.consultation-card {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 15px;
}

.consultation-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #dee2e6;
}

.consultation-header h4 {
  color: #2c5aa0;
  margin: 0;
}

.consultation-header span {
  color: #6c757d;
  font-size: 13px;
}

.consultation-body p {
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.6;
}

.consultation-body p:last-child {
  margin-bottom: 0;
}

/* LÃ­nea de tiempo (Historias clÃ­nicas â€” listado de consultas) */
#consultationsHistoryDisplay .hc-timeline {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0.25rem 0 0 0;
  padding-left: 1.5rem;
}

#consultationsHistoryDisplay .hc-timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 0.4rem;
  bottom: 0.5rem;
  width: 3px;
  background: #c5d9e4;
  border-radius: 2px;
}

#consultationsHistoryDisplay .hc-timeline-item {
  position: relative;
  padding: 0 0 1.5rem 0;
  margin-left: 0;
}

#consultationsHistoryDisplay .hc-timeline-item:last-child {
  padding-bottom: 0;
}

#consultationsHistoryDisplay .hc-timeline-item::before {
  content: "";
  position: absolute;
  left: -1.45rem;
  top: 0.75rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #1c3c49;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px #b0c4d0;
  z-index: 1;
}

#consultationsHistoryDisplay .hc-timeline-item:first-child::before {
  background: #00acc1;
  box-shadow: 0 0 0 2px #80deea;
}

#consultationsHistoryDisplay .hc-timeline-item .consultation-card {
  margin-bottom: 0;
  background: #fff;
  box-shadow: 0 1px 4px rgba(28, 60, 73, 0.08);
}

.hc-timeline-hint {
  font-size: 13px;
  color: #5a6a72;
  margin: 0 0 16px 0;
  padding: 8px 12px;
  background: #f0f7fa;
  border-radius: 8px;
  border-left: 3px solid #1c3c49;
}

/* Historial: filtros, cuadrÃ­cula y detalle desplegable */
#consultationsHistoryDisplay .hc-hist-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: flex-end;
  margin-bottom: 12px;
  padding: 14px 16px;
  background: #f5f9fb;
  border: 1px solid #d6e4ec;
  border-radius: 10px;
}

#consultationsHistoryDisplay .hc-hist-filters label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: #1c3c49;
  font-weight: 600;
}

#consultationsHistoryDisplay .hc-hist-filters input[type="date"],
#consultationsHistoryDisplay .hc-hist-filters input[type="text"],
#consultationsHistoryDisplay .hc-hist-filters select {
  padding: 8px 10px;
  border: 1px solid #b8c9d4;
  border-radius: 6px;
  font-size: 13px;
  min-width: 0;
}

#consultationsHistoryDisplay .hc-hist-filters .hc-hist-filter-grow {
  flex: 1 1 200px;
  min-width: 180px;
}

#consultationsHistoryDisplay .hc-hist-meta {
  font-size: 13px;
  color: #5a6a72;
  margin: 0 0 12px 0;
}

/* Maestro-detalle (lista + panel de consulta seleccionada) */
#consultationsHistoryDisplay .hc-hist-shell {
  display: grid;
  grid-template-columns: minmax(260px, 34%) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 8px;
}

#consultationsHistoryDisplay .hc-hist-master {
  border: 1px solid #d6e4ec;
  border-radius: 10px;
  background: #f8fcfd;
  display: flex;
  flex-direction: column;
  min-height: 200px;
  max-height: 70vh;
  min-width: 0;
}

#consultationsHistoryDisplay .hc-hist-master-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.045em;
  color: #1c3c49;
  padding: 10px 12px 8px;
  border-bottom: 1px solid #d6e4ec;
  background: linear-gradient(180deg, #fff 0%, #eef5f9 100%);
  border-radius: 10px 10px 0 0;
}

#consultationsHistoryDisplay .hc-hist-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#consultationsHistoryDisplay .hc-hist-item {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  margin: 0;
  cursor: pointer;
  border-radius: 10px;
  border: 1px solid #cfd8dc;
  background: #fff;
  padding: 10px 12px;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

#consultationsHistoryDisplay .hc-hist-item:hover {
  border-color: #00acc1;
  box-shadow: 0 2px 8px rgba(28, 60, 73, 0.08);
}

#consultationsHistoryDisplay .hc-hist-item--active {
  border-color: #2c5aa0;
  background: #eef6f8;
  box-shadow: 0 0 0 2px rgba(44, 90, 160, 0.2);
}

#consultationsHistoryDisplay .hc-hist-detail-panel {
  min-width: 0;
  border: 1px solid #d6e4ec;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 8px rgba(28, 60, 73, 0.06);
}

#consultationsHistoryDisplay .hc-hist-detail {
  display: flex;
  flex-direction: column;
  max-height: 70vh;
  min-height: 200px;
}

#consultationsHistoryDisplay .hc-hist-detail-head {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, #1c3c49 0%, #2c5aa0 100%);
  color: #fff;
}

#consultationsHistoryDisplay .hc-hist-detail-title {
  margin: 0 0 4px 0;
  font-size: 1rem;
  font-weight: 700;
  color: inherit;
}

#consultationsHistoryDisplay .hc-hist-detail-time {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.95;
}

#consultationsHistoryDisplay .hc-hist-offpage-hint {
  margin: 0;
  padding: 10px 14px;
  font-size: 12px;
  color: #5d4037;
  background: #fff8e1;
  border-bottom: 1px solid #ffe082;
}

#consultationsHistoryDisplay .hc-hist-detail-placeholder {
  margin: 0;
  padding: 28px 16px;
  text-align: center;
  color: #78909c;
  font-size: 14px;
}

#consultationsHistoryDisplay .hc-consult-inner--standalone {
  border: none;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 0;
  max-height: none;
}

#consultationsHistoryDisplay .hc-hist-item .hc-sum-m {
  margin-bottom: 2px;
}

@media (max-width: 920px) {
  #consultationsHistoryDisplay .hc-hist-shell {
    grid-template-columns: 1fr;
  }

  #consultationsHistoryDisplay .hc-hist-master {
    max-height: 42vh;
  }

  #consultationsHistoryDisplay .hc-hist-detail {
    max-height: none;
    min-height: 240px;
  }
}

#consultationsHistoryDisplay .hc-consult-box {
  min-width: 0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(28, 60, 73, 0.08);
}

#consultationsHistoryDisplay .hc-consult-box > summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  border: 1px solid #d6e4ec;
  border-radius: 10px;
  background: #f8fcfd;
  outline: none;
}

#consultationsHistoryDisplay .hc-consult-box > summary::-webkit-details-marker {
  display: none;
}

#consultationsHistoryDisplay .hc-consult-box[open] > summary {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom: none;
  background: #eef6f8;
}

#consultationsHistoryDisplay .hc-sum-row1 {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12px;
  color: #5a6a72;
}

#consultationsHistoryDisplay .hc-sum-pos {
  font-weight: 700;
  color: #1c3c49;
}

#consultationsHistoryDisplay .hc-sum-date {
  font-weight: 600;
  color: #0d47a1;
  font-size: 12px;
}

#consultationsHistoryDisplay .hc-sum-m {
  font-size: 14px;
  color: #222;
  line-height: 1.35;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#consultationsHistoryDisplay .hc-sum-d {
  font-size: 12px;
  color: #555;
  line-height: 1.3;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#consultationsHistoryDisplay .hc-sum-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e3f2fd;
  color: #1565c0;
}

#consultationsHistoryDisplay .hc-consult-inner {
  border: 1px solid #d6e4ec;
  border-top: none;
  border-radius: 0 0 10px 10px;
  padding: 0 0 4px 0;
  background: #fff;
}

#consultationsHistoryDisplay .hc-consult-inner .consultation-header {
  margin: 0 16px 0 16px;
  padding: 10px 0 10px 0;
}

#consultationsHistoryDisplay .hc-consult-inner .consultation-body {
  margin: 0 16px 12px 16px;
  padding: 0;
}

#consultationsHistoryDisplay .hc-hist-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 16px;
  margin-top: 4px;
  padding: 10px 0;
}

#consultationsHistoryDisplay .hc-hist-pager .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 600px) {
  #consultationsHistoryDisplay .hc-timeline {
    padding-left: 1.2rem;
  }
  #consultationsHistoryDisplay .hc-timeline::before {
    left: 4px;
  }
  #consultationsHistoryDisplay .hc-timeline-item::before {
    left: -1.15rem;
  }
}

/* ============================================
   ESTADÃSTICAS
   ============================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(28, 60, 73, 0.2);
  text-align: center;
  transition: transform 0.3s;
  color: #1c3c49;
  border: 1px solid #e0f7fa;
}

.stat-card:hover {
  transform: translateY(-5px);
}

.stat-icon {
  font-size: 40px;
  margin-bottom: 10px;
  color: #00bcd4;
}

.stat-value {
  font-size: 36px;
  font-weight: bold;
  color: #00bcd4;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 14px;
  color: #1c3c49;
  text-transform: uppercase;
  font-weight: 600;
}

/* ============================================
   TARJETAS PRINCIPALES (ESTILO REFERENCIA)
   ============================================ */

.main-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.main-card {
  background: linear-gradient(135deg, #2c5aa0 0%, #4a9eff 100%);
  color: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(44, 90, 160, 0.3);
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.main-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(44, 90, 160, 0.4);
}

.main-card-icon {
  font-size: 48px;
  margin-bottom: 15px;
  opacity: 0.9;
}

.main-card-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
}

.main-card-description {
  font-size: 14px;
  opacity: 0.9;
  line-height: 1.5;
}

.main-card-button {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  margin-top: 15px;
  cursor: pointer;
  transition: all 0.3s;
}

.main-card-button:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ============================================
   MÃ‰TRICAS MODERNAS
   ============================================ */

.metrics-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.metric-card {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
  border-left: 4px solid #2c5aa0;
}

.metric-number {
  font-size: 32px;
  font-weight: bold;
  color: #2c5aa0;
  margin-bottom: 5px;
}

.metric-label {
  font-size: 14px;
  color: #6c757d;
  text-transform: uppercase;
  font-weight: 600;
}

/* ============================================
   WELCOME SECTION
   ============================================ */

.welcome-section {
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.welcome-text h2 {
  color: #333;
  font-size: 28px;
  margin-bottom: 10px;
}

.welcome-text p {
  color: #6c757d;
  font-size: 16px;
}

.welcome-button {
  background: linear-gradient(135deg, #2c5aa0 0%, #4a9eff 100%);
  color: white;
  padding: 12px 24px;
  border-radius: 25px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.welcome-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(44, 90, 160, 0.3);
}

/* ============================================
   MODAL DE CÃ“DIGO QR
   ============================================ */

.qr-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.qr-modal-content {
  background: white;
  border-radius: 15px;
  padding: 0;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

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

.qr-modal-header {
  background: #1c3c49;
  color: white;
  padding: 20px;
  border-radius: 15px 15px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.qr-modal-header h2 {
  margin: 0;
  font-size: 20px;
}

.close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.3s;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.qr-modal-body {
  padding: 30px;
}

.qr-code-display {
  background: #f4feff;
  border: 2px solid #e0f7fa;
  border-radius: 10px;
  padding: 20px;
  margin: 20px 0;
  text-align: center;
}

.qr-code-image {
  width: 200px;
  height: 200px;
  margin: 0 auto 15px auto;
  display: block;
  border: 2px solid #00bcd4;
  border-radius: 10px;
  background: white;
  padding: 10px;
}

.qr-code-text {
  font-family: 'Courier New', monospace;
  font-size: 14px;
  font-weight: bold;
  color: #1c3c49;
  word-break: break-all;
  background: white;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.qr-instructions {
  background: #e0f7fa;
  padding: 15px;
  border-radius: 8px;
  margin: 20px 0;
  font-size: 14px;
  line-height: 1.6;
}

.qr-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
}

.qr-actions .btn {
  padding: 12px 20px;
  font-size: 14px;
}

/* Estilos para antecedentes mÃ©dicos */
.medical-section {
  background: #f8f9fa;
  border: 1px solid #e0f7fa;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
}

.medical-section h4 {
  color: #1c3c49;
  margin-bottom: 15px;
  font-size: 1.2rem;
  border-bottom: 2px solid #00bcd4;
  padding-bottom: 8px;
}

.section-content {
  margin-bottom: 15px;
}

.section-content p {
  margin-bottom: 8px;
  color: #333;
  line-height: 1.5;
}

/* ============================================
   COMBOBOX CON BÃšSQUEDA
   ============================================ */

.combobox-container {
  position: relative;
  width: 100%;
}

.combobox-input {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
  background: white;
  color: #333;
  transition: border-color 0.3s;
}

.combobox-input:focus {
  outline: none;
  border-color: #2c5aa0;
  box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

.combobox-input.error {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.combobox-input::placeholder {
  color: #999;
}

.combobox-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 5px 5px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-top: -1px;
}

.combobox-dropdown-item {
  padding: 12px 15px;
  cursor: pointer;
  transition: background-color 0.2s;
  border-bottom: 1px solid #f0f0f0;
}

.combobox-dropdown-item:last-child {
  border-bottom: none;
}

.combobox-dropdown-item:hover {
  background-color: #f5f5f5;
}

.combobox-dropdown-item.selected {
  background-color: #e3f2fd;
  font-weight: 600;
}

.combobox-dropdown-item.empty {
  padding: 15px;
  text-align: center;
  color: #999;
  font-style: italic;
  cursor: default;
}

.combobox-dropdown-item.empty:hover {
  background-color: white;
}

/* Scrollbar personalizado para el dropdown */
.combobox-dropdown::-webkit-scrollbar {
  width: 8px;
}

.combobox-dropdown::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.combobox-dropdown::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.combobox-dropdown::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.section-content strong {
  color: #1c3c49;
  font-weight: 600;
}

.section-meta {
  text-align: right;
  color: #666;
  font-style: italic;
}

.alert {
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.alert-info {
  background: rgba(0, 188, 212, 0.1);
  border: 1px solid #00bcd4;
  color: #1c3c49;
}

.alert-danger {
  background: rgba(220, 53, 69, 0.1);
  border: 1px solid #dc3545;
  color: #dc3545;
}

.text-muted {
  color: #666;
  font-style: italic;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablets (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  /* Login Page */
  .login-container {
    max-width: 500px;
  }
  
  .login-box {
    padding: 35px;
  }
  
  /* Dashboard - Mantener sidebar visible pero mÃ¡s estrecho */
  .dashboard {
    height: 100vh;
    overflow: hidden;
  }
  
  .sidebar {
    width: 180px;
    min-width: 180px;
  }
  
  .nav-item {
    padding: 12px 15px;
    font-size: 14px;
  }
  
  .nav-item span {
    font-size: 18px;
  }
  
  .content {
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .header {
    padding: 12px 20px;
  }
  
  .header h1 {
    font-size: 18px;
  }
  
  .header-left img {
    max-height: 40px;
  }
  
  /* Formularios */
  .form-row {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  
  /* Tablas - Scroll horizontal suave */
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
  
  .data-table {
    min-width: 700px;
    font-size: 13px;
  }
  
  .data-table th,
  .data-table td {
    padding: 12px 10px;
  }
  
  /* Grids */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
  
  .main-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
  
  .metrics-container {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .patient-info-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  /* Cards */
  .form-card,
  .card {
    padding: 20px;
  }
  
  .stat-card {
    padding: 20px;
  }
  
  .stat-value {
    font-size: 32px;
  }
  
  .stat-icon {
    font-size: 36px;
  }
  
  /* Modal */
  .qr-modal-content {
    max-width: 600px;
    width: 90%;
  }
  
  /* Welcome section */
  .welcome-section {
    padding: 25px;
  }
  
  .welcome-text h2 {
    font-size: 24px;
  }
  
  /* Content headings */
  .content h2 {
    font-size: 24px;
  }
  
  .content h3 {
    font-size: 19px;
  }
}

/* MÃ³viles y tablets pequeÃ±as */
@media (max-width: 768px) {
  /* Login Page */
  .login-page {
    padding: 10px;
  }
  
  .login-container {
    max-width: 100%;
    padding: 10px;
  }
  
  .login-box {
    padding: 25px 20px;
    border-radius: 15px;
  }
  
  .login-header h1 {
    font-size: 20px;
  }
  
  .login-header p {
    font-size: 12px;
  }
  
  .login-logo {
    width: 60px;
    height: 60px;
    font-size: 12px;
  }
  
  .form-group input {
    padding: 12px 15px 12px 45px;
    font-size: 16px; /* Evita zoom en iOS */
  }
  
  .btn-primary {
    padding: 12px 20px;
    font-size: 14px;
  }
  
  /* Logo GMedix en esquina */
  .login-page > div[style*="position: fixed"] {
    top: 10px !important;
    left: 10px !important;
  }
  
  .login-page > div[style*="position: fixed"] img {
    height: 35px !important;
  }
  
  /* Footer */
  .page-footer {
    padding: 10px;
    font-size: 12px;
  }
  
  /* Dashboard */
  .dashboard {
    height: auto;
    min-height: 100vh;
  }
  
  .header {
    padding: 10px 15px;
    flex-wrap: wrap;
  }
  
  .header-left img {
    max-height: 35px;
  }
  
  .header h1 {
    font-size: 16px;
    width: 100%;
    margin-top: 10px;
  }
  
  .header-right {
    width: 100%;
    justify-content: space-between;
    margin-top: 10px;
  }
  
  .user-info {
    font-size: 12px;
    padding: 6px 12px;
  }
  
  .btn {
    font-size: 12px;
    padding: 8px 16px;
  }
  
  .main-content {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    max-height: 60px;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  }
  
  .nav-menu {
    display: flex;
    padding: 10px 0;
    overflow-x: auto;
    white-space: nowrap;
  }
  
  .nav-item {
    padding: 10px 15px;
    min-width: auto;
    white-space: nowrap;
    border-left: none;
    border-bottom: 3px solid transparent;
  }
  
  .nav-item.active {
    border-left: none;
    border-bottom-color: #00bcd4;
  }
  
  .nav-item span {
    font-size: 18px;
  }
  
  .content {
    padding: 15px;
  }
  
  .content h2 {
    font-size: 22px;
    margin-bottom: 20px;
  }
  
  .content h3 {
    font-size: 18px;
  }
  
  /* Formularios */
  .form-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .form-card,
  .card {
    padding: 15px;
    border-radius: 10px;
  }
  
  .form-control {
    font-size: 16px; /* Evita zoom en iOS */
    padding: 12px 15px;
  }
  
  /* Tablas */
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .data-table {
    min-width: 600px;
  }
  
  .data-table th,
  .data-table td {
    padding: 10px 8px;
    font-size: 12px;
  }
  
  /* Grids */
  .patient-info-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .main-cards {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .metrics-container {
    grid-template-columns: 1fr;
  }
  
  .welcome-section {
    flex-direction: column;
    text-align: center;
    gap: 15px;
    padding: 20px;
  }
  
  .welcome-text h2 {
    font-size: 22px;
  }
  
  .welcome-text p {
    font-size: 14px;
  }
  
  /* Cards */
  .stat-card {
    padding: 20px;
  }
  
  .stat-value {
    font-size: 28px;
  }
  
  .main-card {
    padding: 20px;
  }
  
  .main-card-icon {
    font-size: 36px;
  }
  
  .main-card-title {
    font-size: 18px;
  }
  
  /* Modal */
  .qr-modal-content {
    width: 95%;
    margin: 10px;
  }
  
  .qr-modal-header {
    padding: 15px;
  }
  
  .qr-modal-header h2 {
    font-size: 18px;
  }
  
  .qr-modal-body {
    padding: 20px;
  }
  
  .qr-code-image {
    width: 150px;
    height: 150px;
  }
  
  /* Search */
  .search-results {
    max-height: 150px;
  }
  
  /* Combobox */
  .combobox-dropdown {
    max-height: 200px;
  }
}

@media (max-width: 480px) {
  .login-box {
    padding: 20px 15px;
  }
  
  .login-header h1 {
    font-size: 18px;
  }
  
  .content {
    padding: 10px;
  }
  
  .content h2 {
    font-size: 20px;
  }
  
  .header-right {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }
  
  .btn-block {
    width: 100%;
  }
  
  .nav-item span {
    font-size: 18px;
  }
  
  .nav-item {
    font-size: 13px;
    padding: 8px 12px;
  }
}

/* Consulta: modo Â«Campos visiblesÂ» â€” chips y franja para bloques ocultos */
.consult-std-card {
  position: relative;
  border-radius: 12px;
  transition: opacity 0.2s ease, box-shadow 0.2s ease;
}
.consult-std-edit-mode.consult-std-card[data-std-field-key] {
  padding-right: 44px;
  box-sizing: border-box;
}
.consult-std-card.consult-std-block--on {
  opacity: 1;
  box-shadow: 0 0 0 1px rgba(28, 60, 73, 0.08);
}
.consult-std-card.consult-std-block--off {
  opacity: 0.72;
  box-shadow: 0 0 0 1px dashed rgba(148, 163, 184, 0.55);
}
.consult-std-hidden-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 12px;
  margin-bottom: 10px;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1px dashed #cbd5e1;
  font-size: 13px;
  color: #64748b;
}
.consult-std-hidden-strip-label {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
}
.consult-vis-legend {
  margin: 0 0 14px 0;
  padding: 10px 14px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  font-size: 13px;
  color: #334155;
  line-height: 1.5;
}
.consult-vis-legend strong {
  color: #0f172a;
}
.consult-vis-legend-tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  vertical-align: baseline;
}
.consult-vis-legend-tag--form {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #93c5fd;
}
.consult-vis-legend-tag--print {
  background: #ffedd5;
  color: #c2410c;
  border: 1px solid #fdba74;
}
.consult-std-block--off .consult-std-card-body {
  display: none;
}
.consult-template-section--off > :not(.consult-section-hidden-strip):not(.consult-vis-controls-bar) {
  display: none !important;
}
.consult-fixed-block--off > :not(.consult-block-hidden-strip):not(.consult-vis-controls-bar) {
  display: none !important;
}
/* Secciones de plantilla (p. ej. Signos vitales cardÃ­acos) en modo Â«Campos visiblesÂ» */
.consult-template-section.consult-template-section--edit {
  position: relative;
  margin-bottom: 18px;
  padding: 12px 14px 14px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(28, 60, 73, 0.1);
  box-sizing: border-box;
}
.consult-template-section.consult-template-section--edit.consult-template-section--on {
  box-shadow: 0 0 0 1px rgba(28, 60, 73, 0.14);
}
.consult-template-section.consult-template-section--edit.consult-template-section--off {
  opacity: 0.78;
  box-shadow: 0 0 0 1px dashed rgba(148, 163, 184, 0.7);
  background: #f8fafc;
}
.consult-template-section.consult-template-section--edit > .consult-vis-controls-bar {
  margin-top: 0;
  margin-bottom: 10px;
}
.consult-template-field--off > :not(.consult-field-hidden-strip):not(.consult-vis-controls-bar) {
  display: none !important;
}
.consult-template-field.consult-template-field--edit {
  position: relative;
  padding: 8px 10px 10px;
  margin-bottom: 10px;
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(28, 60, 73, 0.08);
  box-sizing: border-box;
  background: #fff;
}
.consult-template-field.consult-template-field--edit.consult-template-field--off {
  opacity: 0.78;
  box-shadow: 0 0 0 1px dashed rgba(148, 163, 184, 0.7);
  background: #f8fafc;
}
.consult-vis-controls-bar--field {
  margin-bottom: 8px;
  padding: 6px 8px;
  background: #f1f5f9;
}
.consult-vis-controls-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 0 0 12px 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.consult-vis-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  border: 1px solid transparent;
  line-height: 1.2;
}
.consult-vis-option-text {
  white-space: nowrap;
}
.consult-vis-option--form {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1e40af;
}
.consult-vis-option--form input[type='checkbox'] {
  accent-color: #2563eb;
}
.consult-vis-option--print {
  background: #fff7ed;
  border-color: #fdba74;
  color: #c2410c;
}
.consult-vis-option--print input[type='checkbox'] {
  accent-color: #ea580c;
}
.consult-vis-option--disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.consult-vis-option input[type='checkbox'] {
  width: 15px;
  height: 15px;
  margin: 0;
  cursor: pointer;
  flex-shrink: 0;
}
.consult-std-hidden-strip .consult-vis-option {
  flex-shrink: 0;
}
.consult-vis-chip {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin: 0;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(28, 60, 73, 0.15);
  flex-shrink: 0;
}
.consult-vis-chip-row {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 4;
  display: flex;
  gap: 6px;
  align-items: center;
}
.consult-vis-chip-row .consult-vis-chip {
  position: relative;
  top: auto;
  right: auto;
}
.consult-vis-print-chip {
  background: #0f766e;
  border: 1px solid #0d5c56;
}
.consult-std-block--on .consult-vis-print-chip {
  background: #0f766e;
  border: 1px solid #0d5c56;
}
.consult-vis-print-chip:not(:has(input:checked)) {
  background: #ccfbf1;
  border: 1px solid #99f6e4;
  opacity: 0.85;
}
.consult-std-hidden-strip .consult-vis-chip {
  position: relative;
  top: auto;
  right: auto;
  box-shadow: none;
}
.consult-std-block--on .consult-vis-chip {
  background: #1c3c49;
  border: 1px solid #0f2830;
}
.consult-std-block--off .consult-vis-chip {
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  opacity: 1;
}
.consult-vis-chip input[type='checkbox'] {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
  accent-color: #38bdf8;
}
.consult-std-card-body {
  position: relative;
}

/* ============================================
   PERFIL MÃ‰DICO (alineado con login v2)
   ============================================ */

#profile-section.medico-profile-v2 {
  /* Un solo plano: hereda el fondo de .content (sin capa/gradiente encima) */
  background: transparent;
  border-radius: 0;
  padding: 0 0 28px;
  box-sizing: border-box;
}

/* Hueco lateral: mismo ancho Ãºtil que Informes cuando Mi perfil (mÃ©dico) estÃ¡ activo */
.content:has(#profile-section.content-section.medico-profile-v2.active),
.content:has(.admin-panel-v2.content-section.active) {
  padding-left: 14px;
  padding-right: 14px;
}

/* --- AdministraciÃ³n GMedix: secciones GestiÃ³n usuarios, CRM, orgsâ€¦ (visual alineado a Mi perfil v2) --- */
.admin-panel-v2 {
  background: transparent;
  padding: 0 0 28px;
  box-sizing: border-box;
}

.admin-panel-v2 > .medico-profile-page-head {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto 16px;
  padding: 0 4px 6px;
  box-sizing: border-box;
}

.admin-panel-v2 .admin-panel-subtitle {
  max-width: 1200px;
  margin: 0 auto 12px;
  padding: 0 4px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1c3c49;
  letter-spacing: -0.01em;
}

.admin-panel-v2 .admin-panel-subtitle + .form-text {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 4px;
  color: #607d8b;
}

.admin-panel-v2 .card {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  background: #fff;
  border: 1px solid #e0e8ec;
  border-radius: 16px;
  padding: 24px 26px;
  box-shadow: 0 2px 16px rgba(28, 60, 73, 0.06);
  margin-bottom: 20px;
  box-sizing: border-box;
}

.admin-panel-v2 .card > h3:first-child,
.admin-panel-v2 .card > h4:first-child {
  margin: 0 0 18px 0;
  padding-bottom: 14px;
  border-bottom: 1px solid #eceff1;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1c3c49;
  letter-spacing: -0.01em;
}

.admin-panel-v2 .card label {
  font-size: 0.8125rem;
  margin-bottom: 8px;
}

.admin-panel-v2 .card input:not([type='file']),
.admin-panel-v2 .card select,
.admin-panel-v2 .card textarea {
  border-radius: 12px;
  border: 1px solid #e0e8ec;
  padding: 12px 14px;
}

.admin-panel-v2 .card input:not([type='file']):focus,
.admin-panel-v2 .card select:focus,
.admin-panel-v2 .card textarea:focus {
  outline: none;
  border-color: #00acc1;
  box-shadow: 0 0 0 3px rgba(0, 172, 193, 0.15);
}

.admin-panel-v2 .card .form-control {
  border-radius: 12px;
  border: 1px solid #e0e8ec;
  padding: 12px 14px;
}

.admin-panel-v2 .card .form-control:focus {
  border-color: #00acc1;
  box-shadow: 0 0 0 3px rgba(0, 172, 193, 0.15);
}

.admin-panel-v2 .card .combobox-input {
  border-radius: 12px !important;
  border: 1px solid #e0e8ec !important;
  padding: 12px 14px !important;
}

.admin-panel-v2 .table-container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 20px;
  border-radius: 16px;
  border: 1px solid #e0e8ec;
  box-shadow: 0 2px 16px rgba(28, 60, 73, 0.06);
  background: #fff;
}

.admin-panel-v2 .stats-grid {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.admin-panel-v2 .stats-grid .stat-card {
  border: 1px solid #e0e8ec;
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(28, 60, 73, 0.06);
  padding: 22px;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.admin-panel-v2 .stats-grid .stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(28, 60, 73, 0.1);
}

.admin-panel-v2 #crmKanbanRoot {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.admin-panel-v2 #crmTableWrap {
  max-width: 1200px;
}

.admin-panel-v2 .btn.btn-primary {
  border-radius: 12px;
  font-weight: 600;
  padding: 12px 22px;
}

.admin-panel-v2 .btn.btn-primary:not(.crm-view-btn):not(.crm-segment-btn):not(.crm-th-sort):not(.crm-facet-btn) {
  box-shadow: 0 4px 12px rgba(0, 188, 212, 0.25);
}

.admin-panel-v2 .btn.btn-secondary:not(.crm-view-btn):not(.crm-th-sort):not(.crm-facet-btn) {
  border-radius: 12px;
  font-weight: 600;
  border-color: #cfd8dc;
}

.admin-panel-v2 #orgCustomFieldsListContainer {
  max-width: 1200px;
  margin: 8px auto 0;
}

.admin-panel-v2 > p.form-text:first-of-type,
.admin-panel-v2 > .medico-profile-page-head + .form-text {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  color: #607d8b;
}

#profile-section.medico-profile-v2 > .medico-profile-page-head {
  max-width: 900px;
  width: 100%;
  margin: 0 auto 6px;
  padding: 0 0 12px;
  box-sizing: border-box;
}

#profile-section.medico-profile-v2 .medico-profile-tabs {
  max-width: 900px;
  width: 100%;
  margin: 0 auto 14px;
  padding: 0;
  box-sizing: border-box;
}

/* Mi perfil mÃ©dico: tarjetas alineadas en columna (ancho legible, sin franjas horizontales a pantalla completa) */
#profile-section.medico-profile-v2 .medico-profile-card {
  max-width: 900px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 14px;
  box-sizing: border-box;
  padding: 17px 20px 18px;
}

#profile-section.medico-profile-v2 .medico-profile-card-title {
  margin: 0 0 10px 0;
  padding-bottom: 10px;
}

#profile-section.medico-profile-v2 .medico-profile-tab,
#profile-section.medico-profile-v2 .profile-tab-btn.medico-profile-tab {
  padding: 8px 16px;
  font-size: 0.875rem;
}

#profile-section.medico-profile-v2 .medico-profile-identity {
  padding: 4px 0 12px 0;
  margin-bottom: 12px;
  gap: 14px;
}

#profile-section.medico-profile-v2 .medico-profile-avatar-sm {
  width: 64px;
  height: 64px;
  border-width: 2px;
}

#profile-section.medico-profile-v2 .medico-profile-identity-text h3 {
  font-size: 1.1rem;
}

#profile-section.medico-profile-v2 .medico-profile-card .medico-profile-subsection-title {
  margin: 0 0 10px 0;
}

#profile-section.medico-profile-v2 .medico-profile-card .form-group {
  margin-bottom: 11px;
}

#profile-section.medico-profile-v2 .medico-profile-card .form-group small {
  margin-top: 4px;
}

#profile-section.medico-profile-v2 .medico-profile-label {
  margin-bottom: 6px;
}

#profile-section.medico-profile-v2 .medico-profile-input,
#profile-section.medico-profile-v2 .medico-profile-card .form-group input,
#profile-section.medico-profile-v2 .medico-profile-card .form-group textarea,
#profile-section.medico-profile-v2 .medico-profile-card .form-group select {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
}

#profile-section.medico-profile-v2 .medico-profile-actions:not([style*="border: none"]) {
  padding-top: 12px;
  margin-top: 12px;
}

#profile-section.medico-profile-v2 #changePasswordForm .medico-profile-actions {
  padding-top: 10px !important;
  margin-top: 8px !important;
}

/* ContraseÃ±a: siempre una columna (sin campos lado a lado) */
#profile-section.medico-profile-v2 .medico-password-grid {
  display: block;
}

#profile-section.medico-profile-v2 .medico-profile-card .medico-profile-lead {
  margin-bottom: 14px !important;
  line-height: 1.4;
}

#profile-section.medico-profile-v2 .medico-profile-report-block {
  margin-bottom: 18px;
}

/* Foto de perfil: vista previa circular centrada en la tarjeta */
#profile-section.medico-profile-v2 #noProfilePhotoMessage {
  width: 180px;
  height: 180px;
  font-size: 14px;
  margin-left: auto;
  margin-right: auto;
}

#profile-section.medico-profile-v2 #profilePhotoPreviewNew img {
  max-width: 150px;
  max-height: 150px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

#profile-section.medico-profile-v2 input[type="file"] {
  margin: 8px auto;
  padding: 8px 10px;
}

/* Foto circular y bloques centrados en la tarjeta */
#profile-section.medico-profile-v2 .medico-profile-photo-area.logo-upload-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

#profile-section.medico-profile-v2 #profilePhotoPreview.logo-preview {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

#profile-section.medico-profile-v2 #profilePhotoImage {
  display: block;
  max-width: 180px;
  max-height: 180px;
  margin-left: auto;
  margin-right: auto;
}

#profile-section.medico-profile-v2 #profilePhotoPreviewNew {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

#profile-section.medico-profile-v2 .profile-consultorios-list {
  gap: 12px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.medico-profile-page-head {
  max-width: 900px;
  margin: 0 auto 8px;
  padding: 0 4px 20px;
}

.medico-profile-page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1c3c49;
  margin: 0 0 8px 0 !important;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.content .medico-profile-v2 .medico-profile-page-title {
  font-size: 1.5rem !important;
  margin-bottom: 8px !important;
}

/* Asistente: misma densidad tipogrÃ¡fica que perfil mÃ©dico (evita mÃ¡rgenes de .content h2/h3) */
.content .medico-patients-v2 .medico-profile-page-title {
  font-size: 1.5rem !important;
  margin: 0 0 8px 0 !important;
}

.content .medico-patients-v2 .medico-patients-list-title {
  margin: 0 !important;
}

.medico-profile-page-desc {
  margin: 0;
  font-size: 0.95rem;
  color: #607d8b;
  line-height: 1.45;
  max-width: 40rem;
}

.medico-profile-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 900px;
  margin: 0 auto 20px;
  padding: 0 4px;
}

.medico-profile-v2 .profile-tab-btn.medico-profile-tab,
.medico-profile-v2 .medico-profile-tab {
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid #cfd8dc;
  border-radius: 12px;
  background: #fff;
  color: #546e7a;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 2px rgba(28, 60, 73, 0.06);
}

.medico-profile-v2 .profile-tab-btn.medico-profile-tab:hover,
.medico-profile-v2 .medico-profile-tab:hover {
  border-color: #b2dfdb;
  color: #1c3c49;
  background: #f4feff;
}

.medico-profile-v2 .profile-tab-btn.medico-profile-tab.active,
.medico-profile-v2 .medico-profile-tab.active {
  background: linear-gradient(180deg, #1c3c49 0%, #152f38 100%);
  color: #fff;
  border-color: #1c3c49;
  box-shadow: 0 4px 14px rgba(28, 60, 73, 0.25);
}

.medico-profile-card {
  max-width: 900px;
  margin: 0 auto 20px;
  background: #fff;
  border: 1px solid #e0e8ec;
  border-radius: 16px;
  padding: 24px 26px 26px;
  box-shadow: 0 2px 16px rgba(28, 60, 73, 0.06);
}

.medico-profile-card-title {
  margin: 0 0 18px 0;
  padding-bottom: 14px;
  border-bottom: 1px solid #eceff1;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1c3c49;
  letter-spacing: -0.01em;
}

.medico-profile-v2 .medico-profile-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1c3c49;
  margin-bottom: 8px;
}

.medico-profile-v2 .medico-profile-input,
.medico-profile-v2 .medico-profile-card .form-group input,
.medico-profile-v2 .medico-profile-card .form-group textarea,
.medico-profile-v2 .medico-profile-card .form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e0e8ec;
  border-radius: 12px;
  font-size: 15px;
  background: #fff;
  color: #333;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  font-family: inherit;
}

.medico-profile-v2 .form-group small {
  color: #78909c;
  font-size: 12px;
  margin-top: 6px;
  display: block;
}

.medico-profile-v2 .medico-profile-input:hover,
.medico-profile-v2 .medico-profile-card .form-group input:hover,
.medico-profile-v2 .medico-profile-card .form-group textarea:hover {
  border-color: #b0bec5;
  background: #fff;
}

.medico-profile-v2 .medico-profile-input:focus,
.medico-profile-v2 .medico-profile-card .form-group input:focus,
.medico-profile-v2 .medico-profile-card .form-group textarea:focus {
  outline: none;
  border-color: #00acc1;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 172, 193, 0.15);
}

.medico-profile-v2 .medico-profile-input.medico-profile-input--locked,
.medico-profile-v2 .medico-profile-input.medico-profile-input--locked:hover,
.medico-profile-v2 .medico-profile-input.medico-profile-input--locked:focus,
.medico-profile-v2 .medico-profile-card .form-group input.medico-profile-input--locked,
.medico-profile-v2 .medico-profile-card .form-group input.medico-profile-input--locked:hover,
.medico-profile-v2 .medico-profile-card .form-group input.medico-profile-input--locked:focus {
  background: #f1f4f6;
  color: #546e7a;
  border-color: #d5dee3;
  box-shadow: none;
  cursor: not-allowed;
}

.medico-profile-identity {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 8px 0 24px 0;
  margin-bottom: 22px;
  border-bottom: 1px solid #eceff1;
  flex-wrap: wrap;
}

.medico-profile-avatar-sm {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(145deg, #1c3c49 0%, #0f2830 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(28, 60, 73, 0.2);
  border: 3px solid rgba(0, 188, 212, 0.25);
}

.medico-profile-avatar-sm img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.medico-profile-avatar-fallback {
  color: #b2ebf2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.medico-profile-identity-text h3 {
  margin: 0 0 4px 0;
  font-size: 1.2rem;
  color: #1c3c49;
  font-weight: 700;
}

.medico-profile-identity-text p {
  margin: 2px 0;
  color: #607d8b;
  font-size: 0.9rem;
}

/* Consultorios: tarjetas en rejilla â€” 2 columnas en pantallas anchas */
.medico-profile-v2 .profile-consultorios-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  max-width: 900px;
  width: 100%;
  margin: 8px auto 0;
  align-items: start;
}

@media (min-width: 640px) {
  .medico-profile-v2 .profile-consultorios-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.medico-profile-v2 .profile-consultorio-card {
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e0e8ec;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(28, 60, 73, 0.07);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.medico-profile-v2 .profile-consultorio-card:hover {
  border-color: #cfe8ec;
  box-shadow: 0 4px 18px rgba(28, 60, 73, 0.1);
}

.medico-profile-v2 .profile-consultorio-summary-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  box-sizing: border-box;
  border-radius: 14px 14px 0 0;
  border-top: 4px solid #1c3c49;
  background: linear-gradient(180deg, #fbfdfe 0%, #f8fbfc 100%);
}

.medico-profile-v2 .profile-consultorio-summary[data-pc-open] {
  flex: none;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 16px 16px 12px;
  cursor: pointer;
  border: none;
  background: transparent;
  font: inherit;
  text-align: left;
}

.medico-profile-v2 .profile-consultorio-summary[data-pc-open]:focus {
  outline: none;
}
.medico-profile-v2 .profile-consultorio-summary[data-pc-open]:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(0, 172, 193, 0.45);
}

.medico-profile-v2 .profile-consultorio-summary__text {
  width: 100%;
  min-width: 0;
}

.medico-profile-v2 .profile-consultorio-summary__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1c3c49;
  line-height: 1.3;
  margin-bottom: 4px;
}

.medico-profile-v2 .profile-consultorio-summary__addr {
  font-size: 13px;
  color: #455a64;
  line-height: 1.45;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.medico-profile-v2 .profile-consultorio-summary__addr.is-empty {
  color: #90a4ae;
  font-style: italic;
}

.medico-profile-v2 .profile-consultorio-summary__phone {
  font-size: 12px;
  color: #78909c;
  margin-top: 6px;
}

.medico-profile-v2 .profile-consultorio-summary__phone:empty {
  display: none;
}

.medico-profile-v2 .profile-consultorio-summary__badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: rgba(38, 166, 154, 0.15);
  color: #00695c;
  flex-shrink: 0;
}

.medico-profile-v2 .profile-consultorio-summary__badge[hidden] {
  display: none !important;
}

.medico-profile-v2 .profile-consultorio-summary__aside {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 16px 16px;
  border-top: 1px solid #eceff1;
  background: #fff;
}

.medico-profile-v2 .profile-consultorio-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(38, 166, 154, 0.12);
  color: #1c3c49;
}

.medico-profile-v2 .profile-consultorio-card__remove {
  margin: 0 !important;
  padding: 6px 12px !important;
  font-size: 12px !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: #c62828 !important;
  border: 1px solid #ffcdd2 !important;
}

.medico-profile-v2 .profile-consultorio-card__remove:hover {
  background: #ffebee !important;
  border-color: #ef9a9a !important;
}

.medico-profile-v2 .profile-consultorio-hidden-fields {
  display: none !important;
}

.medico-profile-v2 #profileConsultoriosSection > .medico-profile-label {
  font-size: 0.9375rem;
}

.medico-profile-v2 .profile-consultorios-add-btn {
  margin-top: 12px !important;
  align-self: flex-start;
}

.medico-profile-v2 .profile-consultorio-summary__edit {
  margin: 0 !important;
  padding: 8px 14px !important;
  font-size: 13px !important;
  flex-shrink: 0;
}

.medico-profile-v2 .profile-consultorio-hidden-default {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.medico-profile-v2 .profile-consultorio-card__opt {
  font-weight: 500;
  color: #78909c;
  font-size: 0.8125rem;
}

.medico-profile-subsection-title {
  margin: 0 0 18px 0;
  color: #1c3c49;
  font-size: 1rem;
  font-weight: 600;
}

.medico-profile-v2 .medico-profile-card .form-row {
  margin-bottom: 0;
}

.medico-profile-v2 .medico-profile-card .form-group {
  margin-bottom: 16px;
}

.medico-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  justify-content: flex-end;
  padding-top: 8px;
  margin-top: 8px;
  border-top: 1px solid #eceff1;
  padding-top: 20px;
  margin-top: 20px;
}

.medico-profile-v2 .btn.btn-primary,
.medico-profile-v2 .medico-profile-btn-primary {
  border-radius: 12px;
  text-transform: none;
  font-weight: 600;
  padding: 12px 24px;
  font-size: 15px;
  box-shadow: 0 4px 12px rgba(0, 188, 212, 0.25);
}

.medico-profile-v2 .btn.btn-secondary {
  border-radius: 12px;
  text-transform: none;
  font-weight: 600;
  padding: 10px 20px;
  border: 1px solid #cfd8dc;
  background: #fff;
  color: #37474f;
}

.medico-profile-v2 .btn.btn-danger {
  border-radius: 12px;
  text-transform: none;
  font-weight: 600;
  padding: 10px 20px;
}

.profile-msg {
  display: none;
  padding: 12px 14px;
  margin: 16px 0 0 0;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.45;
  border: 1px solid transparent;
}

.profile-msg--success {
  display: block;
  background: #e8f5e9;
  color: #2e7d32;
  border-color: #c8e6c9;
}

.profile-msg--error {
  display: block;
  background: #ffebee;
  color: #b71c1c;
  border-color: #ffcdd2;
}

/* Foto: preview area */
.medico-profile-photo-area {
  text-align: center;
}

.medico-profile-v2 .logo-upload-container {
  text-align: center;
}

.medico-profile-v2 #noProfilePhotoMessage {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: #f1f5f9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #b0bec5;
  color: #78909c;
  font-size: 14px;
  font-weight: 500;
}

.medico-profile-v2 #profilePhotoImage {
  max-width: 180px;
  max-height: 180px;
  border-radius: 50%;
  border: 3px solid #e0e8ec;
  box-shadow: 0 4px 16px rgba(28, 60, 73, 0.12);
}

.medico-profile-v2 #profilePhotoPreviewNew img {
  max-width: 150px;
  max-height: 150px;
  border-radius: 50%;
  border: 2px solid #e0e8ec;
  box-shadow: 0 2px 12px rgba(28, 60, 73, 0.08);
  padding: 4px;
  object-fit: cover;
}

.medico-profile-v2 input[type="file"] {
  margin: 12px auto;
  padding: 10px 12px;
  border: 1px solid #e0e8ec;
  border-radius: 12px;
  max-width: 100%;
  background: #fbfcfd;
  font-size: 13px;
}

/* PersonalizaciÃ³n de informes (misma caja) */
.medico-profile-v2 .medico-profile-card .medico-profile-lead {
  color: #607d8b;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 20px 0;
}

.medico-profile-report-block {
  border-left: 4px solid #1c3c49;
  padding-left: 16px;
  margin-bottom: 28px;
}

.medico-profile-report-block h4 {
  margin: 0 0 8px 0;
  color: #1c3c49;
  font-size: 1rem;
}

#profile-section.medico-profile-v2 .medico-wompi-payments-table-wrap {
  margin-top: 4px;
  border-radius: 10px;
  overflow-x: auto;
  border: 1px solid #d6e4ec;
  background: #fff;
  box-shadow: 0 1px 4px rgba(28, 60, 73, 0.06);
  -webkit-overflow-scrolling: touch;
}

#profile-section.medico-profile-v2 .medico-wompi-payments-table {
  min-width: 460px;
  margin: 0;
}

#profile-section.medico-profile-v2 .medico-wompi-payments-table thead {
  background: linear-gradient(135deg, #1c3c49 0%, #2c5aa0 100%);
}

#profile-section.medico-profile-v2 .medico-wompi-payments-table thead th {
  color: #fff;
  border-bottom: none;
  font-size: 12px;
  padding: 10px 12px;
}

#profile-section.medico-profile-v2 .medico-wompi-payments-table tbody td {
  font-size: 13px;
  padding: 10px 12px;
  vertical-align: middle;
}

@media (max-width: 640px) {
  .medico-profile-identity {
    flex-direction: column;
    align-items: flex-start;
  }

  .medico-profile-tabs {
    flex-direction: column;
  }

  .medico-profile-v2 .profile-tab-btn.medico-profile-tab,
  .medico-profile-v2 .medico-profile-tab {
    width: 100%;
    text-align: left;
  }

  .medico-profile-card {
    padding: 18px 16px 20px;
  }

  .medico-profile-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .medico-profile-actions .btn {
    width: 100%;
  }
}

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

/* ============================================
   INICIO / DASHBOARD (mÃ©dico â€” UI v2)
   ============================================ */

#dashboard-section.medico-dashboard-v2 {
  background: transparent;
  padding: 8px 8px 28px;
  box-sizing: border-box;
}

.medico-dashboard-v2 .medico-dashboard-fragment-wrap {
  min-height: 200px;
  max-width: 1200px;
  margin: 0 auto;
}

.content .medico-dashboard-v2 .medico-profile-page-title {
  font-size: 1.5rem !important;
  margin-bottom: 8px !important;
  max-width: 48rem;
}

.medico-dashboard-v2 .medico-dashboard-motive {
  margin: 0;
  max-width: 40rem;
  font-size: 0.95rem;
  line-height: 1.5;
  font-style: italic;
  color: #607d8b;
  font-weight: 500;
}

.medico-dashboard-v2 .medico-dashboard-welcome {
  margin: 0 auto 20px;
  padding: 0 4px;
}

.medico-dashboard-v2 .medico-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 20px;
  align-items: stretch;
}

.medico-dashboard-v2 .medico-dashboard-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #fff;
  border: 1px solid #e0e8ec;
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(28, 60, 73, 0.06);
  overflow: hidden;
}

.medico-dashboard-v2 .medico-dashboard-card-title {
  margin: 0;
  padding: 16px 20px 14px 18px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1c3c49;
  letter-spacing: -0.02em;
  border-bottom: 1px solid #eceff1;
  border-left: 3px solid #b0bec5;
}

.medico-dashboard-v2 .medico-dashboard-card--today .medico-dashboard-card-title {
  border-left-color: #1c3c49;
}

.medico-dashboard-v2 .medico-dashboard-card--week .medico-dashboard-card-title {
  border-left-color: #00897b;
}

.medico-dashboard-v2 .medico-dashboard-card--month .medico-dashboard-card-title {
  border-left-color: #1565c0;
}

.medico-dashboard-v2 .medico-dashboard-card--demographics .medico-dashboard-card-title {
  border-left-color: #7b1fa2;
}

.medico-dashboard-v2 .medico-dashboard-card--gyn .medico-dashboard-card-title {
  border-left-color: #8e24aa;
}

.medico-dashboard-v2 .medico-dashboard-card-body {
  flex: 1;
  min-height: 0;
  padding: 0;
  box-sizing: border-box;
}

.medico-dashboard-v2 .medico-dashboard-card-body--list {
  max-height: 300px;
  overflow-y: auto;
}

.medico-dashboard-v2 .medico-dashboard-card-body--chart {
  height: 220px;
  padding: 12px 16px 20px;
  position: relative;
}

.medico-dashboard-v2 .medico-dashboard-card-body--chart canvas {
  max-height: 100%;
  max-width: 100%;
}

.medico-dashboard-v2 .medico-dashboard-empty {
  text-align: center;
  padding: 36px 20px;
  color: #90a4ae;
  font-size: 0.95rem;
  line-height: 1.5;
}

.medico-dashboard-v2 .medico-dashboard-empty p {
  margin: 0 0 0.5rem;
}

.medico-dashboard-v2 .medico-dashboard-empty p:last-child {
  margin-bottom: 0;
}

.medico-dashboard-v2 .medico-dashboard-empty--error {
  color: #c62828;
}

.medico-dashboard-v2 .medico-dashboard-empty--error .medico-dashboard-empty-lead {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.medico-dashboard-v2 .medico-dashboard-empty--muted {
  color: #78909c;
  font-size: 0.875rem;
}

.medico-dashboard-v2 .medico-dashboard-empty--gap {
  margin-top: 12px;
}

.medico-dashboard-v2 .medico-dashboard-appointment-row {
  padding: 14px 18px;
  border-bottom: 1px solid #eceff1;
  cursor: pointer;
  transition: background 0.2s ease;
  background: #fff;
}

.medico-dashboard-v2 .medico-dashboard-appointment-row:hover {
  background: #e3f2fd;
}

.medico-dashboard-v2 .medico-dashboard-appointment-row:last-child {
  border-bottom: none;
}

.medico-dashboard-v2 .medico-dashboard-apt-time {
  font-weight: 600;
  color: #1c3c49;
  font-size: 0.95rem;
}

.medico-dashboard-v2 .medico-dashboard-apt-reason {
  font-size: 0.8125rem;
  color: #607d8b;
  margin-top: 4px;
  line-height: 1.4;
}

.medico-dashboard-v2 .medico-dashboard-loading,
.medico-dashboard-v2 .medico-dashboard-error {
  text-align: center;
  padding: 40px 20px;
  color: #90a4ae;
}

.medico-dashboard-v2 .medico-dashboard-error {
  color: #c62828;
}

.medico-dashboard-v2 .medico-dashboard-error a {
  color: #00838f;
  font-weight: 600;
}

@media (max-width: 640px) {
  .medico-dashboard-v2 .medico-dashboard-card-body--chart {
    height: 200px;
  }
}

/* ============================================
   MIS CITAS (mÃ©dico) â€” calendario + filtro por estado
   ============================================ */

#appointments-section.medico-appointments-v2 {
  background: transparent;
  padding: 8px 12px 28px;
  box-sizing: border-box;
  max-width: none;
  width: 100%;
  margin: 0;
}

.medico-appointments-v2 .medico-appointments-page-head.medico-profile-page-head {
  max-width: 100%;
  margin-bottom: 16px;
  padding: 0 4px 12px;
  border-bottom: 1px solid #e0e8ec;
}

.medico-appointments-v2 .medico-appointments-status-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.medico-appointments-v2 .medico-appointments-status-tab {
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid #e0e8ec;
  border-radius: 12px;
  background: #fff;
  color: #546e7a;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.medico-appointments-v2 .medico-appointments-status-tab:hover {
  border-color: #b0bec5;
  color: #1c3c49;
}

.medico-appointments-v2 .medico-appointments-status-tab.active {
  background: linear-gradient(180deg, #1c3c49 0%, #152f38 100%);
  color: #fff;
  border-color: #1c3c49;
  box-shadow: 0 2px 10px rgba(28, 60, 73, 0.15);
}

/* Filtros de citas: texto guÃ­a + desplegable de estado + bÃºsqueda plegable */
.medico-appointments-v2 .gmedix-apt-filter-hint {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: #78909c;
  max-width: 52em;
}

.medico-appointments-v2 .gmedix-apt-filter-hint strong {
  color: #546e7a;
  font-weight: 600;
}

.medico-appointments-v2 .gmedix-apt-filters-wrap {
  margin-bottom: 20px;
  max-width: 100%;
}

.medico-appointments-v2 .gmedix-apt-filters-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 12px;
}

.medico-appointments-v2 .gmedix-apt-filters-wrap:has(.gmedix-apt-filters-details) .gmedix-apt-filters-toolbar {
  margin-bottom: 0;
}

.medico-appointments-v2 .gmedix-apt-filter-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1c3c49;
  margin: 0;
}

.medico-appointments-v2 .gmedix-apt-status-select {
  min-width: 220px;
  max-width: 100%;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #1c3c49;
  border: 1px solid #e0e8ec;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.medico-appointments-v2 .gmedix-apt-status-select:focus {
  outline: 2px solid #80deea;
  outline-offset: 1px;
  border-color: #00acc1;
}

.medico-appointments-v2 .gmedix-apt-filters-details {
  border: 1px solid #e0e8ec;
  border-radius: 10px;
  background: #fafcfd;
  padding: 0 14px 12px;
  margin-top: 12px;
}

.medico-appointments-v2 .gmedix-apt-filters-wrap:not(:has(.gmedix-apt-filters-details)) .gmedix-apt-filters-toolbar {
  margin-bottom: 0;
}

.medico-appointments-v2 .gmedix-apt-filters-details summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 0 4px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #1c3c49;
  user-select: none;
}

.medico-appointments-v2 .gmedix-apt-filters-details summary::-webkit-details-marker {
  display: none;
}

.medico-appointments-v2 .gmedix-apt-filters-details summary::before {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-right: 8px;
  vertical-align: middle;
  border-style: solid;
  border-width: 5px 0 5px 7px;
  border-color: transparent transparent transparent #00acc1;
}

.medico-appointments-v2 .gmedix-apt-filters-details[open] summary::before {
  border-width: 7px 5px 0 5px;
  border-color: #00acc1 transparent transparent transparent;
}

.medico-appointments-v2 .gmedix-apt-filters-details-inner {
  padding-top: 4px;
}

.medico-appointments-v2 .gmedix-apt-filters-sublabel {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #78909c;
  margin-bottom: 8px;
}

.medico-appointments-v2 .gmedix-apt-filters-patient-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.medico-appointments-v2 .gmedix-apt-filters-patient-input {
  flex: 1 1 200px;
  min-width: 180px;
  padding: 10px 14px;
  border: 2px solid #e0e8ec;
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  box-sizing: border-box;
}

.medico-appointments-v2 .gmedix-apt-filters-clear-btn {
  padding: 10px 16px;
  font-size: 13px;
  border-radius: 8px;
  flex-shrink: 0;
}

.medico-appointments-v2 .medico-appointments-calendar-card {
  max-width: 100%;
  margin-bottom: 20px;
  padding: 20px 22px 18px;
}

.medico-appointments-v2 .medico-appointments-cal-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.medico-appointments-v2 .medico-appointments-cal-title {
  flex: 1 1 200px;
  text-align: center;
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #1c3c49;
  letter-spacing: -0.02em;
}

.medico-appointments-v2 .medico-appointments-cal-nav-btn {
  min-width: 40px;
  font-size: 1.25rem;
  line-height: 1;
  padding: 8px 12px;
  border-radius: 10px;
}

.medico-appointments-v2 .medico-appointments-cal-today {
  border-radius: 10px;
  font-weight: 600;
  margin-left: auto;
}

@media (max-width: 520px) {
  .medico-appointments-v2 .medico-appointments-cal-today {
    width: 100%;
    margin-left: 0;
  }
}

.medico-appointments-v2 .medico-appointments-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 6px;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #78909c;
}

.medico-appointments-v2 .medico-appointments-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.medico-appointments-v2 .medico-appointments-cal-cell {
  min-height: 72px;
  border: 1px solid #eceff1;
  border-radius: 10px;
  background: #fff;
  padding: 5px 4px 4px;
  cursor: default;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  font: inherit;
  color: inherit;
  box-sizing: border-box;
}

.medico-appointments-v2 .medico-appointments-cal-cell[role="button"]:hover {
  background: #f4feff;
  border-color: #b2ebf2;
}

.medico-appointments-v2 .medico-appointments-cal-cell--oom {
  background: #fafbfc;
  color: #b0bec5;
  border-style: dashed;
}

.medico-appointments-v2 .medico-appointments-cal-cell--oom .medico-appointments-cal-dnum {
  opacity: 0.65;
}

.medico-appointments-v2 .medico-appointments-cal-cell--today {
  border-color: #00acc1;
  box-shadow: inset 0 0 0 1px rgba(0, 172, 193, 0.3);
}

.medico-appointments-v2 .medico-appointments-cal-cell--selected {
  background: #e0f7fa;
  border-color: #00acc1;
  box-shadow: 0 0 0 2px rgba(0, 172, 193, 0.2);
}

.medico-appointments-v2 .medico-appointments-cal-dnum {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #1c3c49;
  margin-bottom: 2px;
}

.medico-appointments-v2 .medico-appointments-cal-pills {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
  overflow: hidden;
}

.medico-appointments-v2 .medico-appointments-cal-pill {
  display: block;
  font-size: 0.62rem;
  line-height: 1.2;
  padding: 2px 4px;
  border-radius: 4px;
  background: rgba(0, 172, 193, 0.15);
  color: #006064;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.medico-appointments-v2 .medico-appointments-cal-more {
  font-size: 0.62rem;
  font-weight: 700;
  color: #00838f;
  padding: 0 2px;
}

.medico-appointments-v2 .medico-appointments-cal-legend {
  margin: 12px 0 0 0;
  font-size: 0.8rem;
  color: #78909c;
  line-height: 1.4;
}

.medico-appointments-v2 .medico-appointments-day-card {
  max-width: 100%;
  padding: 0;
  overflow: hidden;
}

.medico-appointments-v2 .medico-appointments-day-heading {
  margin: 0;
  padding: 18px 20px 12px;
  font-size: 1.02rem;
  font-weight: 700;
  color: #1c3c49;
  border-bottom: 1px solid #eceff1;
}

.medico-appointments-v2 .medico-appointments-day-table-wrap {
  padding: 0 12px 16px 12px;
  overflow-x: auto;
}

.medico-appointments-v2 .medico-appointments-day-table-wrap .data-table th,
.medico-appointments-v2 .medico-appointments-day-table-wrap .data-table td {
  padding: 10px 10px;
  font-size: 0.875rem;
}

.medico-appointments-v2 .medico-appointments-empty-cell {
  padding: 32px 16px !important;
  color: #90a4ae;
}

/* Calendario + detalle: una columna por defecto (menos carga visual); dos columnas solo en ventanas amplias */
.medico-appointments-v2 .gmedix-apt-split {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 100%;
}
.medico-appointments-v2 .gmedix-apt-week-full {
  width: 100%;
  max-width: none;
}

.medico-appointments-v2 .gmedix-apt-week-full .medico-profile-card.medico-appointments-calendar-card {
  width: 100%;
  max-width: none;
}

#assistant-appointments-section .medico-appointments-v2:not(.gmedix-apt-schedule-modal__panel) {
  max-width: none;
  width: 100%;
  margin: 0;
  padding-left: 12px;
  padding-right: 12px;
  box-sizing: border-box;
}

@media (min-width: 1240px) {
  .medico-appointments-v2 .gmedix-apt-split {
    display: grid;
    grid-template-columns: minmax(300px, 0.95fr) minmax(300px, 1.15fr);
    align-items: start;
    gap: 20px 28px;
  }
}

.medico-appointments-v2 .gmedix-apt-day-panel {
  position: relative;
  overflow: hidden;
}

.medico-appointments-v2 .gmedix-apt-day-panel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(90deg, #80deea, #1c3c49 50%, #b2ebf2);
  opacity: 0.9;
  pointer-events: none;
  z-index: 1;
}

/* Formulario "Nueva cita" bajo el calendario (asistente y vista mÃ©dico-asistente) */
.medico-appointments-v2 .gmedix-apt-schedule-form {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #eceff1;
}

.medico-appointments-v2 .gmedix-apt-schedule-title {
  margin: 0 0 6px 0;
  font-size: 1rem;
  font-weight: 700;
  color: #1c3c49;
}

.medico-appointments-v2 .gmedix-apt-schedule-hint {
  margin: 0 0 14px 0;
  font-size: 0.8rem;
  color: #78909c;
  line-height: 1.45;
}

.medico-appointments-v2 .gmedix-apt-schedule-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.medico-appointments-v2 .gmedix-apt-schedule-row .gmedix-apt-schedule-field {
  flex: 1 1 200px;
}

.medico-appointments-v2 .gmedix-apt-schedule-field > label,
.medico-appointments-v2 .gmedix-apt-schedule-field > div > label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  color: #1c3c49;
  margin-bottom: 6px;
}

.medico-appointments-v2 .gmedix-apt-schedule-field input,
.medico-appointments-v2 .gmedix-apt-schedule-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e0e8ec;
  border-radius: 10px;
  font-size: 0.9rem;
  box-sizing: border-box;
  font-family: inherit;
}

.medico-appointments-v2 .gmedix-apt-schedule-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #eceff1;
}

.medico-appointments-v2 .gmedix-apt-req {
  color: #c62828;
}

.medico-appointments-v2 .gmedix-apt-opt {
  font-size: 0.75rem;
  color: #90a4ae;
  font-weight: 400;
}

.medico-appointments-v2 .gmedix-apt-form-msg {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
  line-height: 1.4;
}

.gmedix-apt-cal-hint {
  margin: 12px 0 0 0;
  font-size: 0.8rem;
  color: #78909c;
  line-height: 1.4;
  padding: 0 2px;
}

/* Modal: nueva cita (asistente / mÃ©dico-asistente) */
.gmedix-apt-schedule-modal {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: max(12px, env(safe-area-inset-top, 0px)) 16px 24px;
  overflow-y: auto;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}

.gmedix-apt-schedule-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
}

.gmedix-apt-schedule-modal > .gmedix-apt-schedule-modal__panel {
  position: relative;
  z-index: 1;
  width: min(calc(100vw - 28px), 496px);
  max-width: 496px;
  flex-shrink: 0;
  margin-left: auto;
  margin-right: auto;
  margin-top: 4vh;
  margin-bottom: 24px;
  padding: 26px 28px 28px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
  max-height: min(90vh, 900px);
  overflow: visible;
}

/* Mayor especificidad: el panel del modal nunca debe heredar el layout ancho-del-asistente */
#appointments-section .gmedix-apt-schedule-modal > .gmedix-apt-schedule-modal__panel,
#assistant-appointments-section .gmedix-apt-schedule-modal > .gmedix-apt-schedule-modal__panel {
  width: min(calc(100vw - 28px), 496px);
  max-width: 496px;
}

/* Modal "Nueva cita": campo y texto un poco mÃ¡s amplios (asistente + mÃ©dico asistente) */
.gmedix-apt-schedule-modal .medico-appointments-v2 .gmedix-apt-schedule-title {
  font-size: 1.15rem;
}

.gmedix-apt-schedule-modal .medico-appointments-v2 .gmedix-apt-schedule-form {
  margin-top: 18px;
  padding-top: 18px;
}

.gmedix-apt-schedule-modal .medico-appointments-v2 .gmedix-apt-schedule-field input,
.gmedix-apt-schedule-modal .medico-appointments-v2 .gmedix-apt-schedule-field textarea,
.gmedix-apt-schedule-modal .medico-appointments-v2 .gmedix-apt-schedule-field select {
  padding: 12px 14px;
  font-size: 0.9375rem;
}

.gmedix-apt-schedule-modal .medico-appointments-v2 .gmedix-apt-schedule-field > label {
  font-size: 0.875rem;
  margin-bottom: 8px;
}

.gmedix-apt-schedule-modal .medico-appointments-v2 .gmedix-apt-schedule-row {
  gap: 14px;
}

.gmedix-apt-schedule-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.gmedix-apt-schedule-modal__close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  margin: -4px -8px 0 0;
  padding: 0;
  border: none;
  background: transparent;
  color: #78909c;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
}

.gmedix-apt-schedule-modal__close:hover {
  background: #eceff1;
  color: #1c3c49;
}

.gmedix-apt-schedule-modal .search-results {
  position: relative;
  z-index: 4;
  max-height: 200px;
  overflow-y: auto;
}

@keyframes gmedixCalGridIn {
  from {
    opacity: 0.4;
    transform: scale(0.985);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.medico-appointments-v2 .medico-appointments-cal-grid.gmedix-cal-repaint {
  animation: gmedixCalGridIn 0.28s ease-out;
  transform-origin: center top;
}

@keyframes gmedixDetailRefresh {
  from {
    opacity: 0.45;
  }
  to {
    opacity: 1;
  }
}

.medico-appointments-v2 .medico-appointments-day-table-wrap.gmedix-detail-refresh {
  animation: gmedixDetailRefresh 0.32s ease-out;
}

@keyframes gmedixDayPanelPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 172, 193, 0.45);
  }
  100% {
    box-shadow: 0 0 0 12px rgba(0, 172, 193, 0);
  }
}

.medico-appointments-v2 .gmedix-apt-day-panel.gmedix-day-panel--pop {
  animation: gmedixDayPanelPulse 0.55s ease-out;
}

.medico-appointments-v2 .medico-appointments-cal-cell[role="button"] {
  transition: transform 0.12s ease, background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.medico-appointments-v2 .medico-appointments-cal-cell[role="button"]:active {
  transform: scale(0.97);
}

@media (max-width: 700px) {
  .medico-appointments-v2 .medico-appointments-cal-grid {
    gap: 2px;
  }

  .medico-appointments-v2 .medico-appointments-cal-cell {
    min-height: 58px;
    padding: 3px 2px 2px;
  }

  .medico-appointments-v2 .medico-appointments-cal-dnum {
    font-size: 0.7rem;
  }
}

/* Sin altura fija: la rejilla forma parte del flujo y solo hace scroll la pÃ¡gina (evita doble barra). */
.medico-appointments-v2 .gmedix-week-scroll {
  max-height: none;
  overflow: visible;
  border-radius: 12px;
  border: 1px solid #e0e8ec;
  background: #fff;
}

.medico-appointments-v2 .gmedix-appt-view-toolbar-top {
  margin-bottom: 12px;
}

.medico-appointments-v2 .gmedix-appt-view-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0;
  padding: 4px;
  border-radius: 12px;
  background: #eef3f6;
  border: 1px solid #dde5ea;
}

.medico-appointments-v2 .gmedix-appt-view-btn {
  border: none;
  background: transparent;
  color: #546e7a;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 8px 18px;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.medico-appointments-v2 .gmedix-appt-view-btn:hover {
  color: #1c3c49;
  background: rgba(255, 255, 255, 0.65);
}

.medico-appointments-v2 .gmedix-appt-view-btn--active {
  background: #fff;
  color: #1c3c49;
  box-shadow: 0 1px 4px rgba(28, 60, 73, 0.12);
}

.medico-appointments-v2 .gmedix-appt-cal-pane-inner {
  margin-top: 0;
}

.medico-appointments-v2 .gmedix-week-shell--day .gmedix-week-header-row {
  grid-template-columns: 76px minmax(0, 1fr);
}

.medico-appointments-v2 .gmedix-week-shell--day .gmedix-week-day-columns--single {
  grid-template-columns: minmax(0, 1fr);
}

.medico-appointments-v2 .gmedix-appt-list-scroll {
  padding: 8px 12px 16px;
}

.medico-appointments-v2 .gmedix-appt-list-host {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.medico-appointments-v2 .gmedix-appt-list-day-title {
  margin: 16px 0 8px 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1c3c49;
  text-transform: capitalize;
  border-bottom: 1px solid #e0e8ec;
  padding-bottom: 6px;
}

.medico-appointments-v2 .gmedix-appt-list-day-title:first-child {
  margin-top: 4px;
}

.medico-appointments-v2 .gmedix-appt-list-card {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px 16px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #e3ecef;
  background: #fafcfd;
}

.medico-appointments-v2 .gmedix-appt-list-card-time {
  font-weight: 700;
  color: #00838f;
  min-width: 52px;
  font-size: 0.9rem;
}

.medico-appointments-v2 .gmedix-appt-list-card-main {
  flex: 1 1 200px;
  min-width: 0;
}

.medico-appointments-v2 .gmedix-appt-list-card-patient {
  font-weight: 600;
  color: #1c3c49;
  font-size: 0.9rem;
}

.medico-appointments-v2 .gmedix-appt-list-card-reason {
  font-size: 0.82rem;
  color: #607d8b;
  margin-top: 2px;
}

.medico-appointments-v2 .gmedix-appt-list-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.medico-appointments-v2 .gmedix-appt-list-empty {
  margin: 24px 12px;
  text-align: center;
  color: #78909c;
  font-size: 0.9rem;
}

.medico-appointments-v2 .gmedix-week-shell {
  min-width: 620px;
  background: #fafcfd;
}

.medico-appointments-v2 .gmedix-week-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.medico-appointments-v2 .gmedix-week-agendar-btn.btn-primary {
  margin-left: auto;
  white-space: nowrap;
}

.medico-appointments-v2 .gmedix-week-header-row {
  display: grid;
  grid-template-columns: 76px repeat(7, minmax(0, 1fr));
  gap: 0;
  align-items: stretch;
  border-bottom: 1px solid #dde5ea;
  position: sticky;
  top: 0;
  z-index: 4;
  background: linear-gradient(180deg, #f4feff 0%, #eef6f9 100%);
}

.medico-appointments-v2 .gmedix-week-corner.gmedix-week-cell-fix {
  border-right: 1px solid #dde5ea;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #1c3c49;
}

.medico-appointments-v2 .gmedix-week-day-head {
  text-align: center;
  padding: 8px 4px;
  cursor: pointer;
  border-right: 1px solid #e8eef2;
  user-select: none;
  transition: background 0.15s ease;
}

.medico-appointments-v2 .gmedix-week-day-head:last-child {
  border-right: none;
}

.medico-appointments-v2 .gmedix-week-day-head:hover {
  background: rgba(0, 172, 193, 0.08);
}

.medico-appointments-v2 .gmedix-week-day-head--today .gmedix-week-day-head-dow {
  color: #00838f;
  font-weight: 800;
}

.medico-appointments-v2 .gmedix-week-day-head--selected {
  background: rgba(156, 39, 176, 0.1);
}

.medico-appointments-v2 .gmedix-week-day-head-dow {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: #5a6f78;
}

.medico-appointments-v2 .gmedix-week-day-head-num {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1c3c49;
}

.medico-appointments-v2 .gmedix-week-body-row {
  display: flex;
  align-items: stretch;
  min-height: 200px;
}

.medico-appointments-v2 .gmedix-week-time-col {
  width: 76px;
  flex-shrink: 0;
  border-right: 1px solid #dde5ea;
  background: #f8fbfc;
}

.medico-appointments-v2 .gmedix-week-time-slot {
  box-sizing: border-box;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 4px 6px 0 0;
}

.medico-appointments-v2 .gmedix-week-time-slot span {
  font-size: 0.7rem;
  color: #7a9099;
  line-height: 1;
}

.medico-appointments-v2 .gmedix-week-time-slot--half span {
  font-size: 0.635rem;
  color: #9aaab2;
  font-weight: 500;
}

.medico-appointments-v2 .gmedix-week-canvas {
  flex: 1;
  position: relative;
  min-width: 0;
}

.medico-appointments-v2 .gmedix-week-now-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: #e53935;
  z-index: 3;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.85);
}

.medico-appointments-v2 .gmedix-week-day-columns {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  position: relative;
  background: #fff;
}

.medico-appointments-v2 .gmedix-week-day-col {
  position: relative;
  border-right: 1px solid #eceff2;
  cursor: pointer;
  box-sizing: border-box;
}

.medico-appointments-v2 .gmedix-week-day-col:last-child {
  border-right: none;
}

.medico-appointments-v2 .gmedix-week-day-col--today {
  background: rgba(0, 131, 143, 0.04);
}

.medico-appointments-v2 .gmedix-week-day-col--selected {
  box-shadow: inset 0 0 0 2px rgba(156, 39, 176, 0.25);
}

.medico-appointments-v2 .gmedix-week-day-grid-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.medico-appointments-v2 .gmedix-week-hline {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  border-top: 1px solid #f0f3f6;
}

.medico-appointments-v2 .gmedix-week-hline--half {
  border-top-style: dashed;
  border-top-color: #e4e9ed;
}

.medico-appointments-v2 .gmedix-week-day-events {
  position: relative;
  z-index: 2;
  height: 100%;
  pointer-events: none;
}

.medico-appointments-v2 .gmedix-week-appt-block {
  position: absolute;
  left: 3px;
  right: 3px;
  box-sizing: border-box;
  text-align: left;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid #b2dfbd;
  background: linear-gradient(135deg, #e8f5e9 0%, #dcf2e0 100%);
  cursor: pointer;
  padding: 4px 6px;
  pointer-events: auto;
  box-shadow: 0 1px 2px rgba(28, 60, 73, 0.08);
  font-family: inherit;
}

.medico-appointments-v2 .gmedix-week-appt-block-t {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  color: #256029;
  line-height: 1.2;
}

.medico-appointments-v2 .gmedix-week-appt-block-sub {
  display: block;
  font-size: 0.65rem;
  color: #1c3c49;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 700px) {
  .medico-appointments-v2 .gmedix-week-shell {
    min-width: unset;
  }
}

/* ============================================
   REGISTRAR PACIENTES (mÃ©dico â€” alineado UI)
   ============================================ */

#patients-section.medico-patients-v2 {
  background: transparent;
  padding: 8px 8px 28px;
  box-sizing: border-box;
}

.medico-patients-v2 .medico-patients-page-head.medico-profile-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  max-width: min(1200px, 100%);
  margin: 0 auto 12px;
  padding: 0 4px 16px;
  border-bottom: 1px solid #e0e8ec;
}

.medico-patients-page-head-text {
  flex: 1;
  min-width: 220px;
}

.medico-patients-v2 .medico-patients-clear-top {
  border-radius: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.medico-patients-v2 .medico-profile-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1c3c49;
  margin-bottom: 8px;
}

.medico-patients-v2 .medico-req {
  color: #c62828;
  font-weight: 700;
  margin-right: 2px;
}

.medico-patients-v2 .medico-optional {
  font-size: 12px;
  color: #78909c;
  font-weight: 400;
}

.medico-patient-input,
.medico-patients-v2 .medico-patient-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e0e8ec;
  border-radius: 12px;
  font-size: 15px;
  background: #fff;
  color: #333;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  box-sizing: border-box;
}

.medico-patients-v2 .medico-patient-input:hover {
  border-color: #b0bec5;
  background: #fff;
}

.medico-patients-v2 .medico-patient-input:focus {
  outline: none;
  border-color: #00acc1;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 172, 193, 0.15);
}

.medico-patients-v2 textarea.medico-patient-input {
  resize: vertical;
  min-height: 80px;
}

.medico-patient-block {
  padding: 20px 18px;
  margin-bottom: 18px;
  border-radius: 14px;
  border: 1px solid #e8edf0;
}

.medico-patient-block--basic {
  background: #fff;
  border-left: 4px solid #1c3c49;
}

.medico-patient-block--contact {
  background: #fff;
  border-left: 4px solid #26a69a;
}

.medico-patient-block--medical {
  background: #fff;
  border-left: 4px solid #ff9800;
}

.medico-patient-block--vitals {
  background: #fff;
  border-left: 4px solid #00bcd4;
}

.medico-patient-block-title {
  margin: 0 0 18px 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1c3c49;
  letter-spacing: -0.01em;
}

.medico-patient-block--contact .medico-patient-block-title {
  color: #00695c;
}

.medico-patient-block--medical .medico-patient-block-title {
  color: #e65100;
}

.medico-patient-block--vitals .medico-patient-block-title {
  color: #00838f;
}

.medico-patient-hint {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: #78909c;
}

.medico-patients-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  justify-content: flex-end;
  padding-top: 20px;
  margin-top: 8px;
  border-top: 1px solid #eceff1;
}

.medico-patients-v2 .medico-patients-submit {
  border-radius: 12px;
  text-transform: none;
  font-weight: 600;
  padding: 12px 24px;
  font-size: 15px;
  box-shadow: 0 4px 12px rgba(0, 188, 212, 0.25);
}

.medico-patients-v2 .medico-patient-form.medico-profile-card {
  max-width: min(1200px, 100%);
  margin-bottom: 28px;
}

.medico-patients-v2 .medico-patients-list-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: min(1200px, 100%);
  margin: 0 auto 16px;
  padding: 0 4px;
}

.medico-patients-list-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #1c3c49;
  letter-spacing: -0.02em;
}

.medico-patients-count-badge {
  color: #1c3c49;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 14px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e0e8ec;
}

.medico-patients-v2 .medico-profile-card.medico-patients-filters {
  max-width: min(1200px, 100%);
  margin-bottom: 20px !important;
}

.medico-patients-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
}

.medico-patients-search-wrap {
  flex: 1;
  min-width: 220px;
  margin-bottom: 0 !important;
}

.medico-patients-filter-gender {
  flex: 0 0 160px;
  margin-bottom: 0 !important;
}

.medico-patients-filter-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 2px;
}

.medico-patients-v2 .medico-patients-filter-btns .btn {
  border-radius: 12px;
  font-weight: 600;
}

.medico-patients-advanced {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #eceff1;
  animation: slideDown 0.3s ease;
}

.medico-patients-advanced-title {
  margin: 0 0 16px 0;
  font-size: 1rem;
  font-weight: 700;
  color: #1c3c49;
}

.medico-patients-advanced-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.medico-patients-v2 .medico-patients-table-wrap {
  box-sizing: border-box;
  max-width: min(1200px, 100%);
  margin: 0 auto;
  border-radius: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e0e8ec;
  box-shadow: 0 2px 16px rgba(28, 60, 73, 0.08);
}

.medico-patients-v2 .medico-patients-data-table {
  width: max(760px, 100%);
}

.medico-patients-data-table thead tr {
  background: linear-gradient(135deg, #1c3c49 0%, #2c5aa0 100%);
}

.medico-patients-data-table thead th {
  color: #fff;
  font-weight: 600;
  padding: 14px 12px;
  font-size: 13px;
}

.medico-patients-th-actions {
  text-align: center;
  min-width: 9.5rem;
}

.medico-patient-actions-cell {
  padding: 12px 10px !important;
  text-align: center;
  vertical-align: middle;
  min-width: 9.5rem;
}

.medico-patient-action-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
}

.medico-patient-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  min-height: 36px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
}

.medico-patient-action-btn:hover {
  box-shadow: 0 2px 8px rgba(28, 60, 73, 0.12);
}

.medico-patient-action-btn:focus-visible {
  outline: 2px solid #2c5aa0;
  outline-offset: 2px;
}

.medico-patient-action-btn:active {
  transform: translateY(0.5px);
}

.medico-patient-action-icon {
  display: flex;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.medico-patient-action-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.medico-patient-action-btn--qr {
  color: #fff;
  background: linear-gradient(135deg, #1c3c49 0%, #2c5aa0 100%);
  border-color: rgba(28, 60, 73, 0.35);
}

.medico-patient-action-btn--qr:hover {
  background: linear-gradient(135deg, #234a56 0%, #356abd 100%);
}

.medico-patient-action-btn--edit {
  color: #1c3c49;
  background: #fff;
  border-color: #2c5aa0;
}

.medico-patient-action-btn--edit:hover {
  color: #0f2933;
  background: rgba(44, 90, 160, 0.1);
  border-color: #1c3c49;
}

.medico-patient-action-btn--loyalty {
  color: #fff;
  background: linear-gradient(135deg, #00897b 0%, #00695c 100%);
  border-color: rgba(0, 0, 0, 0.08);
}

.medico-patient-action-btn--loyalty:hover {
  background: linear-gradient(135deg, #26a69a 0%, #00897b 100%);
}

.medico-patient-action-btn--delete {
  color: #fff;
  background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
  border-color: rgba(0, 0, 0, 0.08);
}

.medico-patient-action-btn--delete:hover {
  background: linear-gradient(135deg, #ef5350 0%, #e53935 100%);
}

.medico-patient-action-btn--view {
  color: #fff;
  background: linear-gradient(135deg, #00acc1 0%, #00838f 100%);
  border-color: rgba(0, 0, 0, 0.08);
}

.medico-patient-action-btn--view:hover {
  background: linear-gradient(135deg, #00bcd4 0%, #00acc1 100%);
}

@media (max-width: 640px) {
  .medico-patient-action-group {
    flex-direction: column;
    width: 100%;
  }

  .medico-patient-action-btn {
    width: 100%;
    min-height: 40px;
  }
}

.medico-patients-loading-cell {
  padding: 40px 20px !important;
  color: #607d8b;
}

@media (max-width: 640px) {
  .medico-patients-v2 .medico-patients-page-head.medico-profile-page-head {
    flex-direction: column;
    align-items: stretch;
  }

  .medico-patients-filter-row {
    flex-direction: column;
    align-items: stretch;
  }

  .medico-patients-filter-gender {
    flex: 1 1 auto;
  }

  .medico-patients-form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .medico-patients-form-actions .btn {
    width: 100%;
  }

  .medico-patients-data-table {
    font-size: 13px;
  }
}

/* ============================================
   REGISTRAR CONSULTA (mÃ©dico â€” misma lÃ­nea UI v2)
   ============================================ */

#consultations-section.medico-consultation-v2 {
  background: transparent;
  padding: 8px 8px 28px;
  box-sizing: border-box;
}

.medico-consultation-v2 .medico-consultation-page-head.medico-profile-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  max-width: 900px;
  margin: 0 auto 20px;
  padding: 0 4px 16px;
  border-bottom: 1px solid #e0e8ec;
}

.medico-consultation-v2 .medico-consultation-page-head-text {
  flex: 1;
  min-width: 220px;
}

.medico-consultation-v2 .medico-consultation-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.medico-consultation-v2 .medico-consultation-toolbar .btn.btn-secondary,
.medico-consultation-v2 .medico-consultation-toolbar .btn.btn-primary {
  border-radius: 12px;
  font-weight: 600;
  padding: 8px 14px;
  font-size: 14px;
}

.content .medico-consultation-v2 .medico-profile-page-title {
  font-size: 1.5rem !important;
  margin-bottom: 0 !important;
}

.medico-consultation-v2 .medico-consultation-bloques-panel {
  max-width: 900px;
  margin: 0 auto 16px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #e0e8ec;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(28, 60, 73, 0.06);
}

.medico-consultation-v2 .medico-consultation-bloques-panel > p:first-of-type {
  font-size: 13px;
  color: #607d8b;
  margin: 0 0 12px 0;
  line-height: 1.45;
}

.medico-consultation-v2 .medico-consultation-inline-add-panel {
  margin-top: 12px;
  padding: 14px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e0e8ec;
}

.medico-consultation-v2 .medico-consultation-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

.medico-consultation-v2 .medico-consultation-main-col {
  flex: 1;
  min-width: 0;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.medico-consultation-v2 .medico-consultation-form.medico-profile-card {
  margin-bottom: 0;
  width: 100%;
  box-sizing: border-box;
}

.medico-consultation-v2 .medico-consultation-section-title {
  margin: 0 0 20px 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.medico-consultation-v2 .medico-consultation-section {
  margin-bottom: 25px;
  padding-left: 15px;
  border-left: 4px solid #1c3c49;
}

.medico-consultation-v2 .medico-consultation-section--patient {
  border-left-color: #1c3c49;
}

.medico-consultation-v2 .medico-consultation-section--patient .medico-consultation-section-title {
  color: #1c3c49;
}

.medico-consultation-v2 .medico-consultation-section--motivo {
  border-left-color: #43a047;
}

.medico-consultation-v2 .medico-consultation-section--motivo .medico-consultation-section-title {
  color: #2e7d32;
}

.medico-consultation-v2 .medico-consultation-section--eval {
  border-left-color: #fb8c00;
}

.medico-consultation-v2 .medico-consultation-section--eval .medico-consultation-section-title {
  color: #e65100;
}

.medico-consultation-v2 .medico-consultation-section--estudios {
  border-left-color: #f4511e;
}

.medico-consultation-v2 .medico-consultation-section--estudios .medico-consultation-section-title {
  color: #d84315;
}

.medico-consultation-v2 .medico-consultation-section--tratamiento {
  border-left-color: #1976d2;
}

.medico-consultation-v2 .medico-consultation-section--tratamiento .medico-consultation-section-title {
  color: #1565c0;
}

.medico-consultation-v2 .medico-consultation-section--obs {
  border-left-color: #8e24aa;
}

.medico-consultation-v2 .medico-consultation-section--obs .medico-consultation-section-title {
  color: #6a1b9a;
}

.medico-consultation-v2 .medico-consultation-meds-panel {
  width: 300px;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid #e0e8ec;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 2px 10px rgba(28, 60, 73, 0.06);
}

.medico-consultation-v2 .medico-consultation-meds-panel h4 {
  margin: 0 0 8px 0;
  color: #1565c0;
  font-size: 14px;
  font-weight: 700;
}

.medico-consultation-v2 .medico-consultation-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 20px;
  margin-top: 8px;
  border-top: 1px solid #eceff1;
}

.medico-consultation-v2 .medico-consultation-aside {
  width: 380px;
  min-width: 320px;
  flex-shrink: 0;
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  border: 1px solid #e0e8ec;
  box-shadow: 0 2px 16px rgba(28, 60, 73, 0.06);
  box-sizing: border-box;
}

.medico-consultation-v2 .medico-consultation-aside h3 {
  margin: 0 0 16px 0;
  color: #1c3c49;
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Antecedentes (sidebar registrar consulta) â€” marca GMedix + tarjetas */
.medico-consultation-v2 .consultation-antecedents-widget {
  background: linear-gradient(165deg, #f4feff 0%, #e8f4f8 55%, #edf7fa 100%);
  border: 1px solid rgba(0, 172, 193, 0.22);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 4px 14px rgba(28, 60, 73, 0.07);
}

.medico-consultation-v2 .consultation-antecedents-widget__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(28, 60, 73, 0.09);
}

.medico-consultation-v2 .consultation-antecedents-widget__logo-ring {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(0, 172, 193, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 131, 143, 0.12);
}

.medico-consultation-v2 .consultation-antecedents-widget__logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
}

.medico-consultation-v2 .consultation-antecedents-widget h3.consultation-antecedents-widget__title {
  margin: 0 0 4px 0;
  padding: 0;
  font-size: 1.06rem;
  font-weight: 700;
  color: #1c3c49;
  letter-spacing: -0.02em;
  display: block;
}

.medico-consultation-v2 .consultation-antecedents-widget__tagline {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  color: #546e7a;
  font-weight: 500;
}

.medico-consultation-v2 .consultation-antecedents-widget__body {
  min-height: 52px;
}

.medico-consultation-v2 .medico-antecedents-msg {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #37474f;
}

.medico-consultation-v2 .medico-antecedents-msg--muted {
  color: #78909c;
}

.medico-consultation-v2 .medico-antecedents-msg--hint {
  margin-top: 8px;
  font-size: 12px;
  color: #90a4ae;
}

.medico-consultation-v2 .medico-antecedents-msg--error {
  color: #c62828;
  font-weight: 600;
}

.medico-consultation-v2 .medico-antecedents-empty {
  padding: 4px 0 2px 0;
}

.medico-consultation-v2 .medico-antecedents-mini-card {
  border: 1px solid rgba(28, 60, 73, 0.1);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 1px 6px rgba(28, 60, 73, 0.04);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.medico-consultation-v2 .medico-antecedents-mini-card:hover {
  border-color: rgba(0, 172, 193, 0.35);
  box-shadow: 0 2px 12px rgba(0, 131, 143, 0.08);
}

.medico-consultation-v2 .medico-antecedents-mini-card:last-child {
  margin-bottom: 0;
}

.medico-consultation-v2 .medico-antecedents-mini-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}

.medico-consultation-v2 .medico-antecedents-mini-card__name {
  color: #1c3c49;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.medico-consultation-v2 .medico-antecedents-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.medico-consultation-v2 .medico-antecedents-badge--ok {
  background: rgba(46, 125, 50, 0.12);
  color: #2e7d32;
  border: 1px solid rgba(46, 125, 50, 0.25);
}

.medico-consultation-v2 .medico-antecedents-badge--pending {
  background: rgba(245, 124, 0, 0.1);
  color: #e65100;
  border: 1px solid rgba(245, 124, 0, 0.28);
}

.medico-consultation-v2 .medico-antecedents-mini-card__body {
  font-size: 12px;
  color: #455a64;
  max-height: 88px;
  overflow-y: auto;
  line-height: 1.45;
}

.medico-consultation-v2 .medico-antecedents-mini-card__body p {
  margin: 0 0 6px 0;
}

.medico-consultation-v2 .medico-antecedents-mini-card__body p:last-child {
  margin-bottom: 0;
}

.medico-consultation-v2 .medico-antecedents-mini-card__body strong {
  color: #37474f;
}

.medico-consultation-v2 .medico-antecedents-mini-card__btn {
  margin-top: 10px;
  width: 100%;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  background: linear-gradient(145deg, #00acc1 0%, #0097a7 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s;
}

.medico-consultation-v2 .medico-antecedents-mini-card__btn:hover {
  box-shadow: 0 4px 12px rgba(0, 172, 193, 0.35);
  transform: translateY(-1px);
}

.medico-consultation-v2 .medico-antecedents-mini-card__btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 172, 193, 0.3);
}

.medico-consultation-v2 .medico-antecedents-widget-cta {
  border-radius: 12px;
  font-weight: 600;
  border: 2px solid rgba(0, 172, 193, 0.45);
  color: #006064;
  background: rgba(255, 255, 255, 0.92);
}

.medico-consultation-v2 #consultationForm input:not([type="file"]):not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]),
.medico-consultation-v2 #consultationForm select,
.medico-consultation-v2 #consultationForm textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid #e0e8ec;
  border-radius: 12px;
  font-size: 15px;
  background: #fff;
  color: #333;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.medico-consultation-v2 #consultationForm textarea {
  resize: vertical;
  min-height: 2.75rem;
  line-height: 1.45;
}

.medico-consultation-v2 #consultationForm input[readonly],
.medico-consultation-v2 #consultationForm input:disabled,
.medico-consultation-v2 #consultationForm textarea:disabled,
.medico-consultation-v2 #consultationForm select:disabled {
  background: #eceff1;
  color: #555;
  cursor: not-allowed;
}

.medico-consultation-v2 #consultationForm input::placeholder,
.medico-consultation-v2 #consultationForm textarea::placeholder {
  color: #90a4ae;
}

.medico-consultation-v2 #consultationForm input:hover:not([readonly]):not(:disabled),
.medico-consultation-v2 #consultationForm select:hover:not(:disabled),
.medico-consultation-v2 #consultationForm textarea:hover:not(:disabled) {
  border-color: #b0bec5;
}

.medico-consultation-v2 #consultationForm input:focus:not([readonly]),
.medico-consultation-v2 #consultationForm select:focus,
.medico-consultation-v2 #consultationForm textarea:focus {
  outline: none;
  border-color: #00acc1;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 172, 193, 0.15);
}

.medico-consultation-v2 #consultationForm select {
  cursor: pointer;
}

/* Archivos visibles (excluye #studyFiles, que sigue oculto vÃ­a estilos inline) */
.medico-consultation-v2 #consultationForm input[type="file"]:not(#studyFiles) {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  font-size: 14px;
  border: 1px solid #e0e8ec;
  border-radius: 12px;
  background: #fff;
  color: #333;
  cursor: pointer;
}

/* Panel aÃ±adir bloque propio (fuera del form) */
.medico-consultation-v2 .medico-consultation-bloques-panel .medico-consultation-panel-field,
.medico-consultation-v2 .medico-consultation-inline-add-panel .medico-consultation-panel-field {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
  font-weight: 600;
  color: #1c3c49;
}

.medico-consultation-v2 .medico-consultation-bloques-panel input[type="text"],
.medico-consultation-v2 .medico-consultation-bloques-panel select,
.medico-consultation-v2 .medico-consultation-inline-add-panel input[type="text"],
.medico-consultation-v2 .medico-consultation-inline-add-panel select {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-family: inherit;
  font-size: 15px;
  border: 1px solid #e0e8ec;
  border-radius: 12px;
  background: #fff;
  color: #333;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.medico-consultation-v2 .medico-consultation-bloques-panel input:hover,
.medico-consultation-v2 .medico-consultation-bloques-panel select:hover,
.medico-consultation-v2 .medico-consultation-inline-add-panel input:hover,
.medico-consultation-v2 .medico-consultation-inline-add-panel select:hover {
  border-color: #b0bec5;
}

.medico-consultation-v2 .medico-consultation-bloques-panel input:focus,
.medico-consultation-v2 .medico-consultation-bloques-panel select:focus,
.medico-consultation-v2 .medico-consultation-inline-add-panel input:focus,
.medico-consultation-v2 .medico-consultation-inline-add-panel select:focus {
  outline: none;
  border-color: #00acc1;
  box-shadow: 0 0 0 3px rgba(0, 172, 193, 0.15);
}

/* Subpanel medicamentos: compacto */
.medico-consultation-v2 .medico-consultation-meds-panel input,
.medico-consultation-v2 .medico-consultation-meds-panel select,
.medico-consultation-v2 .medico-consultation-meds-panel textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  font-size: 12px;
  border: 1px solid #e0e8ec;
  border-radius: 10px;
  background: #fff;
  color: #333;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.medico-consultation-v2 .medico-consultation-meds-panel input:focus,
.medico-consultation-v2 .medico-consultation-meds-panel select:focus,
.medico-consultation-v2 .medico-consultation-meds-panel textarea:focus {
  outline: none;
  border-color: #00acc1;
  box-shadow: 0 0 0 2px rgba(0, 172, 193, 0.15);
}

.medico-consultation-v2 .medico-consultation-meds-panel .medico-consultation-meds-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #546e7a;
  margin-bottom: 4px;
}

/* Acciones del formulario */
.medico-consultation-v2 .medico-consultation-form-actions .btn {
  border-radius: 12px;
  font-weight: 600;
  padding: 12px 24px;
  font-size: 16px;
}

.medico-consultation-v2 .medico-consultation-form #studyFilesAddBtn {
  border-radius: 12px;
  font-weight: 600;
  padding: 10px 16px;
  font-size: 14px;
}

.medico-consultation-v2 .medico-consultation-form #btnAddMedication {
  width: 100%;
  border-radius: 10px;
  font-weight: 600;
  padding: 8px 12px;
  font-size: 12px;
}

@media (max-width: 900px) {
  .medico-consultation-v2 .medico-consultation-page-head.medico-profile-page-head {
    flex-direction: column;
    align-items: stretch;
  }

  .medico-consultation-v2 .medico-consultation-aside,
  .medico-consultation-v2 .medico-consultation-meds-panel {
    width: 100%;
    min-width: 0;
  }
}

/* ============================================
   INFORMES MÃ‰DICOS (mÃ©dico â€” misma lÃ­nea UI v2)
   ============================================ */

#reports-section.medico-reports-v2 {
  background: transparent;
  padding: 0 0 28px;
  box-sizing: border-box;
}

/* Hueco lateral: mismo ancho Ãºtil que otras vistas largas cuando Informes estÃ¡ activo */
.content:has(#reports-section.content-section.active) {
  padding-left: 14px;
  padding-right: 14px;
}

.medico-reports-v2 .medico-reports-page-head.medico-profile-page-head {
  max-width: none;
  width: 100%;
  margin: 0 0 12px;
  padding: 0 0 16px;
  border-bottom: 1px solid #e0e8ec;
}

.medico-reports-v2 .medico-reports-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px 0;
  padding: 0 2px;
}

.medico-reports-v2 .medico-reports-tab-btn {
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid #cfd8dc;
  border-radius: 12px;
  background: #fff;
  color: #546e7a;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 2px rgba(28, 60, 73, 0.06);
}

.medico-reports-v2 .medico-reports-tab-btn:hover {
  border-color: #b2dfdb;
  color: #1c3c49;
  background: #f4feff;
}

.medico-reports-v2 .medico-reports-tab-btn.active {
  background: linear-gradient(180deg, #1c3c49 0%, #152f38 100%);
  color: #fff;
  border-color: #1c3c49;
  box-shadow: 0 4px 14px rgba(28, 60, 73, 0.25);
}

.medico-reports-v2 .reports-tab-panel {
  width: 100%;
}

.medico-reports-v2 .medico-reports-form-wrap {
  width: 100%;
  box-sizing: border-box;
}

.content .medico-reports-v2 .medico-profile-page-title {
  font-size: 1.5rem !important;
  margin-bottom: 0 !important;
}

.medico-reports-v2 .medico-profile-card.medico-reports-form {
  max-width: none;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 24px;
  box-sizing: border-box;
}

.content .medico-reports-v2 h3.medico-reports-list-title {
  margin-top: 0 !important;
}

.medico-reports-v2 .medico-reports-block {
  margin-bottom: 25px;
  padding-left: 15px;
  border-left: 4px solid #1c3c49;
}

.medico-reports-v2 .medico-reports-block-title {
  margin: 0 0 16px 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.medico-reports-v2 .medico-reports-block-title--sm {
  font-size: 1rem;
}

.medico-reports-v2 .medico-reports-block--patient {
  border-left-color: #1c3c49;
}

.medico-reports-v2 .medico-reports-block--patient .medico-reports-block-title {
  color: #1c3c49;
}

.medico-reports-v2 .medico-reports-block--doc {
  border-left-color: #43a047;
}

.medico-reports-v2 .medico-reports-block--doc .medico-reports-block-title {
  color: #2e7d32;
}

.medico-reports-v2 .medico-reports-block--datos {
  border-left-color: #fb8c00;
}

.medico-reports-v2 .medico-reports-block--datos .medico-reports-block-title {
  color: #e65100;
}

.medico-reports-v2 .medico-reports-block--lentes {
  border-left-color: #00acc1;
}

.medico-reports-v2 .medico-reports-block--lentes .medico-reports-block-title {
  color: #00838f;
}

.medico-reports-v2 .medico-reports-block--colpos {
  border-left-color: #c2185b;
}

.medico-reports-v2 .medico-reports-block--colpos .medico-reports-block-title {
  color: #ad1457;
}

.medico-reports-v2 .medico-reports-block--orden-g {
  border-left-color: #00897b;
}

.medico-reports-v2 .medico-reports-block--orden-g .medico-reports-block-title {
  color: #00695c;
}

.medico-reports-v2 .medico-reports-block--orden-c {
  border-left-color: #5c6bc0;
}

.medico-reports-v2 .medico-reports-block--orden-c .medico-reports-block-title {
  color: #3949ab;
}

.medico-reports-v2 .medico-reports-block--preview {
  border-left-color: #8e24aa;
}

.medico-reports-v2 .medico-reports-block--preview .medico-reports-block-title {
  color: #6a1b9a;
}

.medico-reports-v2 .medico-reports-block-hint {
  font-size: 13px;
  color: #607d8b;
  margin: -8px 0 12px 0;
  line-height: 1.45;
}

.medico-reports-v2 .medico-reports-lentes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.medico-reports-v2 .medico-reports-colpos-scale {
  max-width: 640px;
}

.medico-reports-v2 .medico-reports-colpos-row {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eceff1;
}

.medico-reports-v2 .medico-reports-colpos-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.medico-reports-v2 .medico-reports-colpos-head > label {
  font-weight: 600;
  font-size: 14px;
  color: #1c3c49;
  margin: 0;
}

.medico-reports-v2 .medico-reports-colpos-desc-label {
  display: block;
  font-size: 12px;
  color: #607d8b;
  margin: 2px 0 0 0;
}

.medico-reports-v2 .medico-reports-colpos-total {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  max-width: 320px;
  margin-left: auto;
  margin-top: 12px;
}

.medico-reports-v2 .medico-reports-colpos-total label {
  font-weight: 600;
  color: #1c3c49;
  margin: 0;
}

.medico-reports-v2 .medico-reports-colpos-desc-label + textarea {
  margin-top: 4px;
}

.medico-reports-v2 .medico-reports-score-input {
  width: 88px;
  max-width: 100%;
  flex-shrink: 0;
}

.medico-reports-v2 .medico-reports-meds-panel {
  width: 300px;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid #e0e8ec;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 2px 10px rgba(28, 60, 73, 0.06);
}

.medico-reports-v2 .medico-reports-meds-panel h4 {
  margin: 0 0 8px 0;
  color: #e65100;
  font-size: 14px;
  font-weight: 700;
}

.medico-reports-v2 .medico-reports-meds-panel input,
.medico-reports-v2 .medico-reports-meds-panel select,
.medico-reports-v2 .medico-reports-meds-panel textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  font-size: 12px;
  border: 1px solid #e0e8ec;
  border-radius: 10px;
  background: #fff;
  color: #333;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.medico-reports-v2 .medico-reports-meds-panel input:focus,
.medico-reports-v2 .medico-reports-meds-panel select:focus,
.medico-reports-v2 .medico-reports-meds-panel textarea:focus {
  outline: none;
  border-color: #00acc1;
  box-shadow: 0 0 0 2px rgba(0, 172, 193, 0.15);
}

.medico-reports-v2 .medico-reports-meds-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #546e7a;
  margin-bottom: 4px;
}

.medico-reports-v2 #reportForm #btnReportAddMedication {
  width: 100%;
  border-radius: 10px;
  font-weight: 600;
  padding: 8px 12px;
  font-size: 12px;
}

.medico-reports-v2 .medico-reports-layout-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.medico-reports-v2 .medico-reports-layout-row > .medico-reports-flex-grow {
  flex: 1;
  min-width: 280px;
}

.medico-reports-v2 .medico-reports-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 20px;
  margin-top: 8px;
  border-top: 1px solid #eceff1;
}

.medico-reports-v2 .medico-reports-form-actions .btn {
  border-radius: 12px;
  font-weight: 600;
  padding: 12px 24px;
  font-size: 16px;
}

/* Controles #reportForm */
.medico-reports-v2 #reportForm input:not([type="file"]):not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]),
.medico-reports-v2 #reportForm select,
.medico-reports-v2 #reportForm textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid #e0e8ec;
  border-radius: 12px;
  font-size: 15px;
  background: #fff;
  color: #333;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.medico-reports-v2 #reportForm textarea {
  resize: vertical;
  min-height: 2.75rem;
  line-height: 1.45;
}

.medico-reports-v2 #reportForm input[readonly],
.medico-reports-v2 #reportForm textarea[readonly],
.medico-reports-v2 #reportForm input:disabled,
.medico-reports-v2 #reportForm textarea:disabled,
.medico-reports-v2 #reportForm select:disabled {
  background: #eceff1;
  color: #555;
  cursor: not-allowed;
}

.medico-reports-v2 #reportForm input::placeholder,
.medico-reports-v2 #reportForm textarea::placeholder {
  color: #90a4ae;
}

.medico-reports-v2 #reportForm input:hover:not([readonly]):not(:disabled),
.medico-reports-v2 #reportForm select:hover:not(:disabled),
.medico-reports-v2 #reportForm textarea:hover:not(:disabled) {
  border-color: #b0bec5;
}

.medico-reports-v2 #reportForm input:focus:not([readonly]),
.medico-reports-v2 #reportForm select:focus,
.medico-reports-v2 #reportForm textarea:focus {
  outline: none;
  border-color: #00acc1;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 172, 193, 0.15);
}

.medico-reports-v2 #reportForm select {
  cursor: pointer;
}

.medico-reports-v2 #reportForm input[type="file"] {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  font-size: 14px;
  border: 1px solid #e0e8ec;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

/* Lista de informes + filtros */
.medico-reports-v2 .medico-reports-list-card {
  max-width: none;
  width: 100%;
  margin: 0 0 24px;
  padding: 22px 20px 24px;
  box-sizing: border-box;
}

.medico-reports-v2 .medico-reports-list-title {
  margin: 0 0 20px 0;
  padding-bottom: 15px;
  border-bottom: 1px solid #eceff1;
  color: #1c3c49;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.medico-reports-v2 .medico-reports-list-title .medico-reports-count {
  font-size: 14px;
  font-weight: 500;
  color: #78909c;
  margin-left: 8px;
}

.medico-reports-v2 .medico-reports-filters {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eceff1;
}

.medico-reports-v2 .medico-reports-filters .medico-reports-filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: flex-end;
}

.medico-reports-v2 .medico-reports-filters .medico-reports-filters-row > .form-group {
  margin-bottom: 0;
  flex: 1 1 150px;
  min-width: 0;
}

.medico-reports-v2 .medico-reports-filters .medico-reports-filter-search {
  flex: 1 1 200px;
  min-width: 200px;
}

.medico-reports-v2 .medico-reports-filters .medico-reports-filters-clear {
  margin-bottom: 0;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: flex-end;
}

.medico-reports-v2 .medico-reports-filters input,
.medico-reports-v2 .medico-reports-filters select {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  font-size: 15px;
  border: 1px solid #e0e8ec;
  border-radius: 12px;
  background: #fff;
  color: #333;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.medico-reports-v2 .medico-reports-filters input:focus,
.medico-reports-v2 .medico-reports-filters select:focus {
  outline: none;
  border-color: #00acc1;
  box-shadow: 0 0 0 3px rgba(0, 172, 193, 0.15);
}

.medico-reports-v2 .medico-reports-filters select {
  cursor: pointer;
}

.medico-reports-v2 .medico-reports-table-wrap {
  max-width: none;
  width: 100%;
  margin: 0;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e0e8ec;
  box-shadow: 0 2px 16px rgba(28, 60, 73, 0.06);
}

.reports-history-accordion {
  display: flex;
  flex-direction: column;
}

.reports-history-empty {
  padding: 24px 16px;
  color: #607d8b;
  margin: 0;
}

.reports-history-patient {
  border-bottom: 1px solid #e8eef1;
}

.reports-history-patient:last-child {
  border-bottom: none;
}

.reports-history-patient-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: none;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}

.reports-history-patient-head:hover {
  background: #f8fafb;
}

.reports-history-patient--open .reports-history-patient-head {
  background: #f3f8fa;
}

.reports-history-patient-chevron {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-right: 2px solid #546e7a;
  border-bottom: 2px solid #546e7a;
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}

.reports-history-patient--open .reports-history-patient-chevron {
  transform: rotate(45deg);
  margin-top: 4px;
}

.reports-history-patient-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.reports-history-patient-name {
  font-size: 15px;
  font-weight: 600;
  color: #1c3c49;
}

.reports-history-patient-id {
  font-weight: 500;
  color: #607d8b;
  font-size: 14px;
}

.reports-history-patient-meta {
  font-size: 13px;
  color: #78909c;
  line-height: 1.4;
}

.reports-history-patient-body {
  padding: 0 16px 12px 38px;
  background: #fafcfd;
  border-top: 1px solid #e8eef1;
}

.reports-history-report-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #eef3f5;
}

.reports-history-report-row:last-child {
  border-bottom: none;
}

.reports-history-report-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
}

.reports-history-report-date {
  font-size: 13px;
  font-weight: 600;
  color: #37474f;
  white-space: nowrap;
}

.reports-history-report-type {
  font-size: 12px;
  color: #00838f;
  background: #e0f7fa;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.reports-history-report-title {
  flex: 1 1 100%;
  font-size: 13px;
  color: #455a64;
  line-height: 1.4;
}

.reports-history-report-title small {
  display: block;
  margin-top: 2px;
  color: #90a4ae;
  font-size: 12px;
}

@media (max-width: 640px) {
  .reports-history-patient-body {
    padding-left: 16px;
  }

  .reports-history-report-row {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Modal post-consulta: documentos clÃ­nicos */
.post-consult-modal-overlay {
  position: fixed;
  z-index: 2000;
  inset: 0;
  background: rgba(15, 32, 39, 0.55);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12px;
  overflow-y: auto;
}

@media (min-width: 640px) {
  .post-consult-modal-overlay {
    align-items: center;
    padding: 28px 24px;
  }
}

.post-consult-modal-dialog {
  width: min(800px, calc(100vw - 24px));
  max-height: min(94vh, 960px);
  margin: auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(28, 60, 73, 0.22);
  overflow: hidden;
}

.post-consult-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 28px 16px;
  border-bottom: 1px solid #e8eef1;
}

.post-consult-modal-title {
  margin: 0 0 4px 0;
  font-size: 19px;
  color: #1c3c49;
}

.post-consult-modal-subtitle {
  margin: 0;
  font-size: 13px;
  color: #78909c;
  line-height: 1.4;
}

.post-consult-modal-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: #f5f7f8;
  color: #546e7a;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.post-consult-modal-close:hover {
  background: #ffebee;
  color: #c62828;
}

.post-consult-modal-body {
  padding: 20px 28px;
  overflow-y: auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-content: start;
}

.post-consult-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 0;
}

.post-consult-meta-grid label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #1c3c49;
}

.post-consult-meta-grid input {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #e0e8ec;
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
}

.post-consult-doc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 0;
}

.post-consult-empty {
  margin: 0;
  padding: 12px;
  font-size: 13px;
  color: #78909c;
  background: #f8fafb;
  border-radius: 8px;
}

.post-consult-doc-row {
  border: 1px solid #e0e8ec;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.post-consult-doc-row--open {
  border-color: #b2dfdb;
  box-shadow: 0 2px 8px rgba(0, 172, 193, 0.08);
}

.post-consult-doc-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  margin: 0;
}

.post-consult-doc-check {
  margin-top: 3px;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.post-consult-doc-head-text {
  flex: 1;
  min-width: 0;
}

.post-consult-doc-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #1c3c49;
  line-height: 1.35;
}

.post-consult-doc-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.post-consult-doc-badge {
  display: inline-block;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-radius: 4px;
}

.post-consult-doc-badge--pre {
  color: #1565c0;
  background: #e3f2fd;
}

.post-consult-doc-badge--custom {
  color: #5e35b1;
  background: #ede7f6;
}

.post-consult-doc-badge--studies {
  color: #00838f;
  background: #e0f7fa;
}

.post-consult-doc-fields {
  padding: 0 14px 14px 44px;
  border-top: 1px solid #eef3f5;
  background: #fafcfd;
}

.post-consult-doc-fields .form-group {
  margin-bottom: 10px;
}

.post-consult-doc-fields label,
.post-consult-field-label {
  display: block;
  margin: 10px 0 6px;
  font-size: 12px;
  font-weight: 600;
  color: #37474f;
}

.post-consult-doc-fields input,
.post-consult-doc-fields select,
.post-consult-doc-fields textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 2px solid #e0e8ec;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
}

.post-consult-doc-fields--solicitud .solicitud-exam-modal-controls input,
.post-consult-doc-fields--solicitud .solicitud-exam-modal-controls select {
  width: auto;
  padding: 4px 6px;
  border-width: 1px;
  font-size: 11px;
}

.post-consult-doc-fields--solicitud .solicitud-exam-modal-controls label.solicitud-exam-contrast-compact {
  display: inline-flex;
  margin: 0;
  width: auto;
}

.post-consult-doc-fields input[readonly] {
  background: #f5f7f8;
}

.post-consult-doc-fields--solicitud {
  border-left: 3px solid #00acc1;
}

.post-consult-modal-body .post-consult-doc-fields--solicitud {
  margin-left: 0;
  margin-right: 0;
  padding: 16px 18px 18px 44px;
  border-left: none;
  border-top: 1px solid #e0f2f4;
  background: #f5fbfc;
}

.post-consult-doc-fields--custom {
  border-left: 3px solid #7b1fa2;
}

.post-consult-doc-fields--colpos {
  border-left: 3px solid #e91e63;
}

.post-consult-fields-hint {
  margin: 10px 0;
  font-size: 12px;
  color: #78909c;
}

.post-consult-reposo-grid {
  display: grid;
  grid-template-columns: 80px 1fr 1fr;
  gap: 10px;
  align-items: end;
  padding-top: 10px;
}

.post-consult-colpos-item {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e8eef1;
}

.post-consult-colpos-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
}

.post-consult-colpos-item-head input {
  width: 72px;
  flex-shrink: 0;
}

.post-consult-colpos-total {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  font-weight: 600;
}

.post-consult-colpos-total input {
  width: 72px;
}

.post-consult-sign-block {
  padding: 12px 14px;
  background: #f8fafb;
  border: 1px solid #e0e8ec;
  border-radius: 10px;
}

.post-consult-sign-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: #1c3c49;
}

.post-consult-sign-option {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 14px;
  cursor: pointer;
}

.post-consult-sign-option:last-child {
  margin-bottom: 0;
}

.post-consult-modal-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 28px 20px;
  border-top: 1px solid #e8eef1;
  background: #fafcfd;
}

.post-consult-selected-count {
  font-size: 13px;
  color: #607d8b;
}

.post-consult-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-left: auto;
}

@media (max-width: 639px) {
  .post-consult-modal-dialog {
    width: 100%;
    max-height: calc(100vh - 24px);
    border-radius: 12px;
  }

  .post-consult-modal-body {
    padding: 16px 18px;
  }

  .post-consult-modal-header {
    padding: 18px 18px 14px;
  }

  .post-consult-modal-footer {
    padding: 14px 18px 16px;
  }

  .post-consult-modal-body .post-consult-doc-fields--solicitud {
    padding: 14px 16px 16px 14px;
  }

  .post-consult-meta-grid {
    grid-template-columns: 1fr;
  }

  .post-consult-reposo-grid {
    grid-template-columns: 1fr;
  }

  .post-consult-doc-fields {
    padding-left: 14px;
  }

  .post-consult-modal-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .post-consult-modal-actions {
    margin-left: 0;
    justify-content: stretch;
  }

  .post-consult-modal-actions .btn {
    flex: 1;
  }
}

@media (max-width: 900px) {
  .medico-reports-v2 .medico-reports-meds-panel {
    width: 100%;
    min-width: 0;
  }

  .medico-reports-v2 .medico-reports-lentes-grid {
    grid-template-columns: 1fr;
  }

  .study-catalog-panel-grid {
    grid-template-columns: 1fr;
  }
}

.medico-reports-v2 .medico-reports-catalog-card {
  margin-bottom: 18px;
}

.study-catalog-panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 16px;
}

.study-catalog-label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 8px;
  color: #1c3c49;
}

.study-catalog-add-row,
.study-catalog-fav-add-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.study-catalog-select,
.study-catalog-input {
  flex: 1;
  min-width: 160px;
  padding: 8px 10px;
  border: 1px solid #e0e8ec;
  border-radius: 8px;
  font-size: 14px;
}

.study-catalog-selected-list,
.study-catalog-favorites-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.study-catalog-selected-item,
.study-catalog-favorite-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: #f8fafb;
  border: 1px solid #e0e8ec;
  border-radius: 8px;
  font-size: 14px;
}

.study-catalog-favorite-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.study-catalog-badge-custom {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #5e35b1;
  background: #ede7f6;
  border-radius: 4px;
  vertical-align: middle;
}

.study-catalog-combo-hint {
  margin: 0 0 8px 0;
  font-size: 12px;
  color: #78909c;
  line-height: 1.4;
}

.study-combo-editor {
  margin: 10px 0 12px;
  padding: 12px;
  background: #f3f8fb;
  border: 1px solid #b2dfdb;
  border-radius: 10px;
}

.study-combo-editor-title {
  margin: 0 0 8px 0;
  font-size: 13px;
  font-weight: 600;
  color: #37474f;
}

.study-combo-editor-name-row {
  margin-bottom: 10px;
}

.study-combo-editor-list {
  margin-bottom: 10px;
}

.study-combo-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.study-catalog-favorite-item--editing {
  border-color: #00acc1;
  background: #e0f7fa;
}


.study-catalog-empty {
  padding: 10px 12px;
  color: #607d8b;
  font-size: 13px;
  background: #f8fafb;
  border-radius: 8px;
  border: 1px dashed #cfd8dc;
  margin: 0;
}

.study-catalog-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.study-catalog-save-status {
  font-size: 13px;
  color: #2e7d32;
}

.solicitud-exam-study-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.solicitud-exam-picker {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 12px;
}

.solicitud-exam-section {
  padding: 12px 14px;
  border: 1px solid #e3ecef;
  border-radius: 10px;
  background: #fafcfd;
}

.solicitud-exam-section--catalog {
  background: #fff;
}

.solicitud-exam-section-title {
  margin: 0 0 8px 0;
  font-size: 13px;
  font-weight: 700;
  color: #263238;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.solicitud-exam-section-hint {
  margin: 0 0 10px 0;
  font-size: 12px;
  color: #607d8b;
  line-height: 1.4;
}

.solicitud-exam-combo-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.solicitud-exam-combo-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border: 1px solid #b2dfdb;
  border-radius: 999px;
  background: #e0f7fa;
  color: #006064;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.solicitud-exam-combo-btn:hover {
  background: #b2ebf2;
  border-color: #80cbc4;
}

.solicitud-exam-combo-btn--active {
  background: #00acc1;
  border-color: #00838f;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 131, 143, 0.25);
}

.solicitud-exam-combo-btn--active .solicitud-exam-combo-count {
  color: rgba(255, 255, 255, 0.85);
}

.solicitud-exam-combo-count {
  font-weight: 500;
  font-size: 12px;
  color: #00838f;
}

.solicitud-exam-combo-empty {
  margin: 0;
  font-size: 13px;
  color: #78909c;
  line-height: 1.45;
}

.post-consult-doc-fields--solicitud .solicitud-exam-picker {
  margin-top: 4px;
}

.post-consult-doc-fields--solicitud .solicitud-exam-section {
  padding: 12px 14px;
}

.post-consult-doc-fields--solicitud .solicitud-exam-catalog-chip-grid {
  max-height: 220px;
}

.solicitud-exam-selected-empty {
  margin: 0 0 8px 0;
  font-size: 12px;
  color: #78909c;
  line-height: 1.45;
}

.solicitud-exam-selected-empty[hidden] {
  display: none !important;
}

.solicitud-exam-section--catalog-add {
  background: #fff;
}

.solicitud-exam-catalog-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.solicitud-exam-catalog-tab {
  padding: 6px 14px;
  border: 1px solid #cfd8dc;
  border-radius: 999px;
  background: #fff;
  color: #455a64;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.solicitud-exam-catalog-tab:hover {
  background: #e0f7fa;
  border-color: #80cbc4;
  color: #006064;
}

.solicitud-exam-catalog-tab--active {
  background: #00acc1;
  border-color: #00838f;
  color: #fff;
}

.solicitud-exam-catalog-grid {
  min-height: 48px;
}

.solicitud-exam-catalog-empty {
  margin: 0;
  font-size: 12px;
  color: #78909c;
}

.solicitud-exam-catalog-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 148px;
  overflow-y: auto;
  padding: 2px;
}

.solicitud-exam-catalog-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid #b2dfdb;
  border-radius: 8px;
  background: #f1fafb;
  color: #006064;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.solicitud-exam-catalog-chip:hover:not([disabled]) {
  background: #e0f7fa;
  border-color: #4dd0e1;
}

.solicitud-exam-catalog-chip:active:not([disabled]) {
  transform: scale(0.98);
}

.solicitud-exam-catalog-chip--added,
.solicitud-exam-catalog-chip[disabled] {
  opacity: 0.55;
  cursor: default;
  background: #eceff1;
  border-color: #cfd8dc;
  color: #78909c;
}

.post-consult-doc-fields--solicitud .solicitud-exam-study-list--selected {
  margin-bottom: 0;
  max-height: none;
  overflow: visible;
  gap: 6px;
}

.solicitud-exam-study-row--modal-compact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas:
    "label meta remove";
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #cfe9ed;
  border-radius: 8px;
  background: #fff;
}

.solicitud-exam-study-row--modal-compact > .solicitud-exam-check {
  display: none;
}

.solicitud-exam-study-row--modal-compact--with-contrast {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "label remove"
    "meta meta";
  align-items: start;
  gap: 6px 8px;
}

.solicitud-exam-selected-label {
  grid-area: label;
  font-size: 13px;
  font-weight: 600;
  color: #263238;
  line-height: 1.3;
  min-width: 0;
}

.solicitud-exam-selected-meta {
  grid-area: meta;
  min-width: 0;
}

.solicitud-exam-study-row--modal-compact .solicitud-exam-selected-meta {
  display: block;
}

.solicitud-exam-study-row--modal-compact:not(.solicitud-exam-study-row--modal-compact--with-contrast) .solicitud-exam-selected-meta {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.solicitud-exam-modal-controls {
  display: grid;
  align-items: center;
  column-gap: 10px;
  width: max-content;
  max-width: 100%;
}

.solicitud-exam-modal-controls:not(.solicitud-exam-modal-controls--with-contrast) {
  grid-template-columns: 76px 88px;
}

.solicitud-exam-modal-controls--with-contrast {
  grid-template-columns: 76px max-content 96px;
}

.solicitud-exam-modal-control-cell--lat {
  width: 76px;
}

.solicitud-exam-modal-control-cell--contrast {
  min-width: max-content;
  overflow: visible;
}

.solicitud-exam-modal-control-cell--notes {
  width: 88px;
}

.solicitud-exam-modal-controls--with-contrast .solicitud-exam-modal-control-cell--notes {
  width: 96px;
}

.solicitud-exam-modal-control-cell--contrast label.solicitud-exam-contrast-compact {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  color: #546e7a;
}

.solicitud-exam-modal-control-cell--contrast label.solicitud-exam-contrast-compact input {
  margin: 0;
  flex-shrink: 0;
}

.solicitud-exam-contrast-label {
  display: inline-block;
  flex-shrink: 0;
}

.solicitud-exam-study-row--modal-compact .solicitud-exam-remove-btn {
  grid-area: remove;
}

.solicitud-exam-remove-btn {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #78909c;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.solicitud-exam-remove-btn:hover {
  background: #ffebee;
  color: #c62828;
}

.solicitud-exam-lat--compact,
.solicitud-exam-notes--compact {
  padding: 4px 6px;
  border: 1px solid #e0e8ec;
  border-radius: 6px;
  font-size: 11px;
  box-sizing: border-box;
}

.solicitud-exam-contrast-compact {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: #546e7a;
  white-space: nowrap;
  cursor: pointer;
}

.solicitud-exam-contrast-compact input {
  margin: 0;
  flex-shrink: 0;
}

@media (max-width: 520px) {
  .solicitud-exam-study-row--modal-compact:not(.solicitud-exam-study-row--modal-compact--with-contrast) {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "label remove"
      "meta meta";
  }

  .solicitud-exam-study-row--modal-compact:not(.solicitud-exam-study-row--modal-compact--with-contrast) .solicitud-exam-selected-meta {
    justify-content: flex-start;
  }

  .solicitud-exam-modal-controls {
    column-gap: 8px;
  }

  .solicitud-exam-modal-controls--with-contrast {
    grid-template-columns: 76px max-content minmax(72px, 96px);
  }
}

.medico-reports-block--solicitud .solicitud-exam-section--catalog .solicitud-exam-study-list {
  max-height: 320px;
  overflow-y: auto;
  margin-bottom: 0;
}

.solicitud-exam-study-row {
  padding: 10px 12px;
  border: 1px solid #e0e8ec;
  border-radius: 8px;
  background: #fafcfd;
}

.solicitud-exam-study-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  margin-bottom: 8px;
  cursor: pointer;
}

.solicitud-exam-study-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.solicitud-exam-study-meta select,
.solicitud-exam-study-meta input[type="text"] {
  padding: 6px 8px;
  border: 1px solid #e0e8ec;
  border-radius: 6px;
  font-size: 13px;
}

.medico-reports-v2 .medico-reports-block--solicitud {
  border-left-color: #00acc1;
}

/* Etapa 5 â€” Documentos clÃ­nicos (perfil mÃ©dico) */
.clinical-documents-card {
  max-width: none;
}

.clinical-documents-hint {
  margin: 0 0 16px 0;
  font-size: 13px;
  color: #607d8b;
  padding: 10px 12px;
  background: #f5fafb;
  border-radius: 8px;
  border: 1px solid #e0e8ec;
}

.clinical-documents-list {
  list-style: none;
  margin: 0 0 16px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.clinical-documents-item {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: #f8fafb;
  border: 1px solid #e0e8ec;
  border-radius: 10px;
}

.clinical-documents-item--disabled {
  opacity: 0.72;
  background: #f3f4f5;
}

.clinical-documents-item-main {
  display: flex;
  gap: 12px;
  flex: 1;
  min-width: 240px;
}

.clinical-documents-order {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}

.clinical-documents-move-btn {
  min-width: 36px;
  padding: 4px 8px;
}

.clinical-documents-info {
  flex: 1;
  min-width: 0;
}

.clinical-documents-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.clinical-documents-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e3f2fd;
  color: #1565c0;
}

.clinical-documents-badge--studies {
  background: #e0f7fa;
  color: #00838f;
}

.clinical-documents-display-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #546e7a;
  margin-bottom: 8px;
}

.clinical-documents-display-input {
  display: block;
  width: 100%;
  max-width: 420px;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid #e0e8ec;
  border-radius: 8px;
  font-size: 14px;
}

.clinical-documents-visibility {
  margin: 0;
  font-size: 12px;
  color: #78909c;
}

.clinical-documents-toggles {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 180px;
}

.clinical-documents-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #37474f;
  cursor: pointer;
}

.clinical-documents-toggle--muted {
  color: #90a4ae;
  cursor: default;
}

.clinical-documents-empty {
  padding: 12px;
  color: #607d8b;
  font-size: 13px;
  background: #f8fafb;
  border: 1px dashed #cfd8dc;
  border-radius: 8px;
  margin: 0 0 16px 0;
}

.clinical-documents-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.clinical-documents-save-status {
  font-size: 13px;
  color: #2e7d32;
}

.clinical-documents-custom-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #e0e7ea;
}

.clinical-documents-custom-section h4 {
  margin: 0 0 8px 0;
  font-size: 16px;
  color: #1c3c49;
}

.clinical-document-custom-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
  padding: 16px;
  background: #faf5fc;
  border: 1px solid #e1bee7;
  border-radius: 10px;
}

.clinical-documents-item--custom {
  border-left: 3px solid #7b1fa2;
}

.clinical-documents-badge--custom {
  background: #f3e5f5;
  color: #6a1b9a;
}

.clinical-documents-badge--muted {
  background: #eceff1;
  color: #546e7a;
}

.my-documents-card {
  max-width: none;
}

.my-documents-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.my-documents-header-text {
  flex: 1;
  min-width: 220px;
}

.my-documents-header .medico-reports-block-title {
  margin-bottom: 6px;
}

.clinical-documents-custom-count {
  margin: 0 0 12px 0;
  font-size: 12px;
  color: #78909c;
}

.study-catalog-embedded-panel {
  margin: 12px 0 0 0;
  width: 100%;
  flex-basis: 100%;
  padding: 16px;
  background: #f0fafb;
  border: 1px solid #b2ebf2;
  border-radius: 10px;
  border-left: 3px solid #00acc1;
  box-sizing: border-box;
}

.study-catalog-embedded-panel-host {
  display: none;
}

.clinical-documents-item--full {
  flex-direction: column;
  align-items: stretch;
}

.clinical-documents-item--full .study-catalog-embedded-panel {
  order: 99;
}

.study-catalog-embedded-inner .medico-reports-block-title--sm {
  margin-top: 0;
}

.clinical-document-custom-form-wrap {
  margin: 0 0 20px 0;
}

.clinical-documents-studies-row {
  margin-top: 8px;
}

.clinical-documents-studies-toggle-btn small {
  font-weight: 600;
  opacity: 0.85;
}

.clinical-documents-custom-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.medico-reports-block--custom-doc {
  border-left: 3px solid #7b1fa2;
}

/* OpciÃ³n A â€” Mis documentos (lista simple + modales) */
.my-documents-intro {
  margin-bottom: 0;
  font-size: 14px;
  color: #607d8b;
}

.my-documents-specialty-details {
  margin: 0 0 16px 0;
  font-size: 13px;
}

.my-documents-specialty-details summary {
  cursor: pointer;
  color: #546e7a;
  font-weight: 600;
  margin-bottom: 8px;
}

.my-documents-list {
  list-style: none;
  margin: 0 0 20px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.my-documents-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #e3eaed;
  border-radius: 12px;
  transition: box-shadow 0.15s ease, opacity 0.15s ease;
}

.my-documents-row:hover {
  box-shadow: 0 2px 8px rgba(28, 60, 73, 0.06);
}

.my-documents-row--off {
  opacity: 0.55;
}

.my-documents-row--custom {
  border-left: 3px solid #7b1fa2;
}

.my-documents-row-order {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}

.my-documents-order-btn {
  min-width: 28px;
  padding: 2px 6px;
  font-size: 12px;
  line-height: 1.2;
  border: 1px solid #e0e8ec;
  background: #f8fafb;
  border-radius: 6px;
  cursor: pointer;
  color: #546e7a;
}

.my-documents-order-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.my-documents-row-open {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 4px 8px;
  margin: -4px -8px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  border-radius: 8px;
}

.my-documents-row-open:hover {
  background: #f5fafb;
}

.my-documents-row-name {
  font-size: 15px;
  font-weight: 600;
  color: #1c3c49;
}

.my-documents-row-meta {
  font-size: 12px;
  color: #78909c;
}

.my-documents-switch {
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
}

.my-documents-switch-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.my-documents-switch-ui {
  display: block;
  width: 44px;
  height: 26px;
  background: #cfd8dc;
  border-radius: 999px;
  transition: background 0.2s ease;
  position: relative;
}

.my-documents-switch-ui::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

.my-documents-switch-input:checked + .my-documents-switch-ui {
  background: #2e7d32;
}

.my-documents-switch-input:checked + .my-documents-switch-ui::after {
  transform: translateX(18px);
}

.my-documents-switch-input:focus-visible + .my-documents-switch-ui {
  outline: 2px solid #1c3c49;
  outline-offset: 2px;
}

.my-documents-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid #eef2f4;
}

.my-documents-reset-link {
  background: none;
  border: none;
  color: #607d8b;
  text-decoration: underline;
  padding: 6px 0;
  cursor: pointer;
  font-size: 13px;
}

.my-documents-reset-link:hover {
  color: #1c3c49;
}

.my-documents-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.my-documents-modal[hidden] {
  display: none !important;
}

body.my-documents-modal-open {
  overflow: hidden;
}

.my-documents-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 60, 73, 0.5);
  backdrop-filter: blur(2px);
}

.my-documents-modal-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  max-height: min(90vh, 720px);
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(28, 60, 73, 0.22);
}

.my-documents-modal:not([hidden]) .my-documents-modal-dialog {
  animation: myDocumentsModalIn 0.24s ease-out;
}

@keyframes myDocumentsModalIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.my-documents-modal-dialog--detail {
  display: flex;
  flex-direction: column;
  max-width: 520px;
  max-height: min(92vh, 680px);
  overflow: hidden;
}

.my-documents-modal-dialog--wizard {
  max-width: 480px;
}

.my-documents-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid #eef2f4;
}

.my-documents-modal-header--detail {
  background: linear-gradient(180deg, #f8fafb 0%, #fff 100%);
  border-radius: 16px 16px 0 0;
}

.my-documents-modal-header-main {
  flex: 1;
  min-width: 0;
}

.my-documents-modal-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.my-documents-modal-badge--system {
  background: #e3f2fd;
  color: #1565c0;
}

.my-documents-modal-badge--custom {
  background: #f3e5f5;
  color: #6a1b9a;
}

.my-documents-modal-badge--studies {
  background: #e0f7fa;
  color: #00838f;
}

.my-documents-modal-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #1c3c49;
  line-height: 1.25;
}

.my-documents-modal-subtitle {
  margin: 6px 0 0 0;
  font-size: 13px;
  color: #78909c;
}

.my-documents-modal-close {
  border: none;
  background: #f0f4f6;
  font-size: 22px;
  line-height: 1;
  color: #546e7a;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.my-documents-modal-close:hover {
  background: #e3eaed;
  color: #1c3c49;
}

.my-documents-detail-banner {
  margin: 0;
  padding: 10px 20px;
  font-size: 13px;
  color: #e65100;
  background: #fff3e0;
  border-bottom: 1px solid #ffe0b2;
}

.my-documents-modal-body {
  padding: 20px;
}

.my-documents-modal-body--detail {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #f4f7f9;
}

.my-documents-detail-card {
  background: #fff;
  border: 1px solid #e3eaed;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(28, 60, 73, 0.04);
}

.my-documents-detail-card--custom {
  border-left: 3px solid #7b1fa2;
}

.my-documents-detail-card--studies {
  border-left: 3px solid #00acc1;
}

.my-documents-detail-card-title {
  margin: 0 0 4px 0;
  font-size: 14px;
  font-weight: 700;
  color: #1c3c49;
}

.my-documents-detail-card-hint {
  margin: 0 0 12px 0;
  font-size: 12px;
  color: #78909c;
  line-height: 1.45;
}

.my-documents-detail-info {
  margin: 0 0 12px 0;
  padding: 10px 12px;
  font-size: 12px;
  color: #546e7a;
  background: #f5fafb;
  border-radius: 8px;
  border: 1px solid #e0e8ec;
  line-height: 1.45;
}

.my-documents-detail-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #dce4e8;
  border-radius: 10px;
  font-size: 15px;
  color: #1c3c49;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.my-documents-detail-input:focus {
  outline: none;
  border-color: #1c3c49;
  box-shadow: 0 0 0 3px rgba(28, 60, 73, 0.1);
}

.my-documents-detail-input:disabled {
  background: #f5f5f5;
  color: #90a4ae;
}

.my-documents-detail-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.my-documents-detail-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #546e7a;
  margin-bottom: 6px;
}

.my-documents-settings-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid #eef2f4;
  border-radius: 10px;
  overflow: hidden;
}

.my-documents-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  background: #fafbfc;
}

.my-documents-setting-row + .my-documents-setting-row {
  border-top: 1px solid #eef2f4;
}

.my-documents-setting-row--disabled {
  opacity: 0.5;
}

.my-documents-setting-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.my-documents-setting-label {
  font-size: 14px;
  font-weight: 600;
  color: #37474f;
}

.my-documents-setting-desc {
  font-size: 12px;
  color: #90a4ae;
  line-height: 1.35;
}

.my-documents-switch--sm .my-documents-switch-ui {
  width: 40px;
  height: 24px;
}

.my-documents-switch--sm .my-documents-switch-ui::after {
  width: 18px;
  height: 18px;
  top: 3px;
  left: 3px;
}

.my-documents-switch--sm .my-documents-switch-input:checked + .my-documents-switch-ui::after {
  transform: translateX(16px);
}

.study-catalog-in-detail-modal .study-catalog-panel-grid {
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 0;
}

.study-catalog-in-detail-modal .study-catalog-panel-col--favorites {
  padding-top: 16px;
  border-top: 1px dashed #e0e8ec;
}

.study-catalog-in-detail-modal .study-catalog-selected-list,
.study-catalog-in-detail-modal .study-catalog-favorites-list {
  max-height: 160px;
  overflow-y: auto;
}

.my-documents-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid #eef2f4;
  background: #fff;
}

.my-documents-modal-footer--detail {
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  border-radius: 0 0 16px 16px;
  padding: 12px 16px;
}

.my-documents-modal-footer-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.my-documents-footer-delete {
  border: none;
  background: transparent;
  color: #c62828;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 4px;
}

.my-documents-footer-delete:hover {
  text-decoration: underline;
}

.my-documents-modal-toggles {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0;
}

.my-documents-modal-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #37474f;
  cursor: pointer;
}

.my-documents-modal-hint {
  margin: 0 0 12px 0;
  font-size: 13px;
  color: #78909c;
}

.my-documents-modal-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #eef2f4;
}

.my-documents-modal-section-title {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: #1c3c49;
}

.my-documents-delete-btn {
  margin-top: 8px;
  color: #c62828;
  border-color: #ffcdd2;
}

.document-wizard-presets {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.document-wizard-preset {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 2px solid #e0e8ec;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.document-wizard-preset:has(input:checked) {
  border-color: #1c3c49;
  background: #f5fafb;
}

.document-wizard-preset input {
  margin-top: 4px;
  flex-shrink: 0;
}

.document-wizard-preset span {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.document-wizard-preset strong {
  font-size: 14px;
  color: #1c3c49;
}

.document-wizard-preset small {
  font-size: 12px;
  color: #78909c;
}

@media (max-width: 720px) {
  .my-documents-row {
    flex-wrap: wrap;
  }

  .my-documents-switch {
    margin-left: auto;
  }
}

@media (max-width: 720px) {
  .clinical-documents-item {
    flex-direction: column;
  }

  .clinical-documents-toggles {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
  }
}

/* ========== Odontograma FDI â€” estilo clÃ­nico (referencia) ========== */
.odontogram-widget--clinical {
  width: 100%;
  margin-top: 8px;
}

.odontogram-chart--clinical {
  min-width: 680px;
  max-width: 980px;
  padding: 18px 14px 20px;
  background: linear-gradient(180deg, #dceefb 0%, #e8f4fc 35%, #e8f4fc 65%, #dceefb 100%);
  border: 1px solid #90caf9;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}

.odontogram-chart--clinical::before {
  top: 52%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ef5350 20%, #c62828 50%, #ef5350 80%, transparent);
  opacity: 0.45;
}

.odontogram-row--anatomic-upper {
  align-items: flex-end;
  margin-bottom: 2px;
}

.odontogram-row--schematic-upper,
.odontogram-row--schematic-lower {
  gap: 4px;
  margin: 2px 0;
}

.odontogram-row--numbers {
  gap: 4px;
  margin: 4px 0;
}

.odontogram-row--numbers-upper {
  margin-bottom: 6px;
}

.odontogram-row--numbers-lower {
  margin-top: 6px;
  margin-bottom: 2px;
}

.odontogram-row--anatomic-lower {
  align-items: flex-start;
  margin-top: 2px;
}

.odontogram-cell {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.odontogram-cell--number {
  min-width: 34px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #1565c0;
  padding: 2px 0;
  justify-content: center;
}

.odontogram-schematic-btn {
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
  line-height: 0;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.odontogram-schematic-btn:hover {
  transform: scale(1.08);
}

.odontogram-schematic-btn.is-selected {
  outline: 2px solid #1565c0;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.2);
}

.odontogram-schematic-svg {
  display: block;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.1));
}

.odontogram-tooth-svg--realistic {
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.16));
}

.odontogram-legend-surfaces {
  flex-basis: 100%;
  font-size: 10px;
  color: #607d8b;
  margin-top: 4px;
}

.odontogram-surface-seg {
  cursor: pointer;
  transition: opacity 0.12s ease;
}

.odontogram-surface-seg:hover {
  opacity: 0.85;
}

.odontogram-widget {
  width: 100%;
  margin-top: 8px;
}

.odontogram-toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.odontogram-dentition-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.odontogram-dentition-btn {
  padding: 10px 18px;
  border-radius: 999px;
  border: 2px solid #e0e0e0;
  background: #f5f5f5;
  color: #444;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}

.odontogram-dentition-btn.is-active {
  background: rgba(28, 60, 73, 0.12);
  border-color: #1c3c49;
  color: #1c3c49;
}

.odontogram-status-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.odontogram-status-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 2px solid #e8e8e8;
  background: #fff;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.odontogram-status-btn.is-active {
  border-color: #1c3c49;
  box-shadow: 0 0 0 2px rgba(28, 60, 73, 0.15);
}

.odontogram-status-swatch,
.odontogram-legend-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 2px solid #999;
  flex-shrink: 0;
}

.odontogram-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.odontogram-action-btn {
  padding: 8px 14px !important;
  font-size: 13px !important;
}

.odontogram-chart-wrap {
  overflow-x: auto;
  padding: 8px 4px 16px;
}

.odontogram-chart {
  position: relative;
  min-width: 560px;
  max-width: 920px;
  margin: 0 auto;
  padding: 20px 12px 16px;
  background: linear-gradient(180deg, #f3faf6 0%, #fff 45%, #fff 55%, #f3faf6 100%);
  border: 1px solid #c8e6c9;
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.odontogram-chart::before {
  content: '';
  position: absolute;
  left: 8%;
  right: 8%;
  top: 50%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #ef9a9a 15%, #ef5350 50%, #ef9a9a 85%, transparent);
  transform: translateY(-50%);
  border-radius: 2px;
  opacity: 0.55;
  pointer-events: none;
}

.odontogram-midline {
  position: absolute;
  left: 50%;
  top: 6%;
  bottom: 6%;
  width: 2px;
  background: linear-gradient(180deg, transparent, #90a4ae 20%, #607d8b 50%, #90a4ae 80%, transparent);
  transform: translateX(-50%);
  pointer-events: none;
}

.odontogram-row {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 6px 0;
  position: relative;
  z-index: 1;
}

.odontogram-row--upper {
  padding-bottom: 4px;
  align-items: flex-end;
}

.odontogram-row--lower {
  padding-top: 4px;
  align-items: flex-start;
}

.odontogram-quadrant {
  display: flex;
  gap: 2px;
  align-items: flex-end;
}

.odontogram-row--lower .odontogram-quadrant {
  align-items: flex-start;
}

.odontogram-quadrant--right {
  flex-direction: row-reverse;
}

.odontogram-quadrant--left {
  flex-direction: row;
}

.odontogram-tooth {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2px;
  border: none;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.12s ease, filter 0.12s ease;
  line-height: 0;
}

.odontogram-tooth--incisor { min-width: 28px; }
.odontogram-tooth--canine { min-width: 30px; }
.odontogram-tooth--premolar { min-width: 34px; }
.odontogram-tooth--molar { min-width: 40px; }

.odontogram-tooth-svg {
  display: block;
  pointer-events: none;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.12));
}

.odontogram-row--upper .odontogram-tooth:hover {
  transform: translateY(1px) scale(1.04);
  filter: brightness(1.02);
}

.odontogram-row--lower .odontogram-tooth:hover {
  transform: translateY(-1px) scale(1.04);
  filter: brightness(1.02);
}

.odontogram-tooth.is-selected {
  outline: 3px solid rgba(28, 60, 73, 0.45);
  outline-offset: 2px;
  border-radius: 8px;
  transform: scale(1.06);
  z-index: 2;
}

.odontogram-tooth.is-absent {
  opacity: 0.72;
}

.odontogram-tooth.is-absent .odontogram-tooth-svg {
  filter: grayscale(0.35) drop-shadow(0 1px 1px rgba(0, 0, 0, 0.08));
}

.odontogram-tooth-num,
.odontogram-tooth-symbol {
  display: none;
}

.odontogram-selected-info {
  font-size: 13px;
  color: #607d8b;
  margin-bottom: 4px;
  line-height: 1.4;
}

.odontogram-notes-input {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
}

.odontogram-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #eee;
  font-size: 11px;
  color: #666;
}

.odontogram-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

@media (max-width: 640px) {
  .odontogram-chart {
    min-width: 100%;
    padding: 14px 6px;
  }

  .odontogram-tooth--incisor { min-width: 24px; }
  .odontogram-tooth--canine { min-width: 26px; }
  .odontogram-tooth--premolar { min-width: 28px; }
  .odontogram-tooth--molar { min-width: 32px; }

  .odontogram-tooth-svg {
    max-width: 100%;
  }
}

/* ── Control de pagos (Fase 4 UI) ── */
.content:has(#payments-section.content-section.active) {
  padding: 18px 16px;
  min-width: 0;
  overflow-x: hidden;
}

.control-pagos-v2 {
  max-width: 100%;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.control-pagos-v2 > .medico-profile-page-head {
  max-width: none;
  width: 100%;
  margin: 0 0 12px;
  padding: 0 0 16px;
  border-bottom: 1px solid #e0e8ec;
}

.control-pagos-v2 .medico-profile-card {
  max-width: none !important;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  box-sizing: border-box;
  overflow: visible;
}
.control-pagos-v2 .medico-profile-card.cp-table-card {
  padding: 0;
  overflow: hidden;
}
.control-pagos-v2 .cp-table-card > .cp-muted,
.control-pagos-v2 .cp-table-card > .cp-error {
  padding: 16px 18px;
}

.control-pagos-v2 .cp-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}
.control-pagos-v2 .cp-tab-btn {
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid #cfd8dc;
  border-radius: 12px;
  background: #fff;
  color: #546e7a;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.control-pagos-v2 .cp-tab-btn:hover {
  border-color: #90a4ae;
  color: #1c3c49;
}
.control-pagos-v2 .cp-tab-btn.active {
  background: #1c3c49;
  border-color: #1c3c49;
  color: #fff;
}
.control-pagos-v2 .cp-filters {
  padding: 14px 16px;
  margin-bottom: 14px;
}
.control-pagos-v2 .cp-filters-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}
.control-pagos-v2 .cp-filters-grid > .form-group {
  flex: 1 1 140px;
  min-width: 140px;
}
.control-pagos-v2 .cp-filters-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  min-width: auto;
}
.control-pagos-v2 .cp-filters-actions .btn {
  text-transform: none;
  white-space: nowrap;
  height: auto;
  min-height: 0;
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: none;
  transform: none;
}
.control-pagos-v2 .cp-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.control-pagos-v2 .cp-kpi {
  background: #fff;
  border: 1px solid #e3eaed;
  border-radius: 12px;
  padding: 14px 16px;
}
.control-pagos-v2 .cp-kpi-label {
  font-size: 12px;
  color: #78909c;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.control-pagos-v2 .cp-kpi-value {
  margin-top: 6px;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1c3c49;
}
.control-pagos-v2 .cp-kpi-hint {
  margin-top: 4px;
  font-size: 12px;
  color: #90a4ae;
}
.control-pagos-v2 .cp-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.control-pagos-v2 .cp-card {
  padding: 16px 18px;
}
.control-pagos-v2 .cp-card-wide {
  grid-column: 1 / -1;
}
.control-pagos-v2 .cp-card-title {
  margin: 0 0 10px;
  font-size: 15px;
  color: #1c3c49;
}
.control-pagos-v2 .cp-simple-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.control-pagos-v2 .cp-simple-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #eef2f4;
  font-size: 13px;
  color: #546e7a;
}
.control-pagos-v2 .cp-simple-list li strong {
  color: #1c3c49;
}
.control-pagos-v2 .cp-table-wrap {
  display: block;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.control-pagos-v2 .cp-table {
  width: 100%;
  min-width: 1280px;
  border-collapse: collapse;
  table-layout: auto;
  font-size: 13px;
}
.control-pagos-v2 .cp-table th {
  text-align: left;
  padding: 10px 12px;
  background: #f1f5f9;
  color: #546e7a;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.control-pagos-v2 .cp-table td {
  padding: 10px 12px;
  border-top: 1px solid #eef2f4;
  vertical-align: middle;
  color: #37474f;
  white-space: nowrap;
}
.control-pagos-v2 .cp-table td .cp-strong,
.control-pagos-v2 .cp-table td .cp-sub {
  white-space: nowrap;
}
.control-pagos-v2 .cp-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.control-pagos-v2 .cp-muted { color: #78909c; font-size: 14px; }
.control-pagos-v2 .cp-error { color: #c62828; font-size: 14px; }
.control-pagos-v2 .cp-strong { font-weight: 600; color: #1c3c49; }
.control-pagos-v2 .cp-sub { font-size: 12px; color: #78909c; }
.control-pagos-v2 .cp-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  white-space: nowrap;
}
.control-pagos-v2 .cp-actions .btn,
.control-pagos-v2 .cp-actions .btn.btn-sm,
.control-pagos-v2 .cp-actions .btn.btn-primary,
.control-pagos-v2 .cp-actions .btn.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  flex: 0 0 auto;
  box-sizing: border-box;
  height: auto;
  min-height: 0;
  min-width: 0;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  text-transform: none !important;
  letter-spacing: normal;
  white-space: nowrap;
  overflow: visible;
  box-shadow: none !important;
  transform: none !important;
}
.control-pagos-v2 .cp-table th.cp-actions-col,
.control-pagos-v2 .cp-table td.cp-actions {
  position: static;
  z-index: auto;
  box-shadow: none;
  width: auto;
  min-width: 220px;
  max-width: none;
  padding-right: 16px;
  background: transparent;
}
.control-pagos-v2 .cp-table th.cp-actions-col {
  background: #f1f5f9;
}
.control-pagos-v2 .cp-reg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}
.control-pagos-v2 .cp-methods {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.control-pagos-v2 .cp-method-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.3fr) minmax(120px, 1fr) minmax(140px, 1.2fr) auto;
  gap: 12px 14px;
  align-items: end;
  padding: 14px 16px;
  background: linear-gradient(180deg, #fbfcfd 0%, #f4f7f9 100%);
  border: 1px solid #dce5ea;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(28, 60, 73, 0.04);
}
.control-pagos-v2 .cp-method-row .form-group {
  margin: 0;
  position: static;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.control-pagos-v2 .cp-method-row .form-group label {
  display: block;
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: #546e7a;
  letter-spacing: 0.01em;
}
.control-pagos-v2 .cp-method-row .form-group input,
.control-pagos-v2 .cp-method-row .form-group select,
.control-pagos-v2 .cp-method-code,
.control-pagos-v2 .cp-method-amount,
.control-pagos-v2 .cp-method-ref {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 10px 12px;
  min-height: 42px;
  border: 1px solid #cfd8dc;
  border-radius: 10px;
  background: #fff;
  color: #1c3c49;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
}
.control-pagos-v2 .cp-method-row .form-group select,
.control-pagos-v2 .cp-method-code {
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23546e7a' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}
.control-pagos-v2 .cp-method-row .form-group input:focus,
.control-pagos-v2 .cp-method-row .form-group select:focus,
.control-pagos-v2 .cp-method-code:focus,
.control-pagos-v2 .cp-method-amount:focus,
.control-pagos-v2 .cp-method-ref:focus {
  outline: none;
  border-color: #00bcd4;
  box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.15);
}
.control-pagos-v2 .cp-method-row .cp-method-remove {
  width: 42px;
  height: 42px;
  min-width: 42px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid #d7dee3;
  background: #fff;
  color: #607d8b;
  font-size: 20px;
  line-height: 1;
  font-weight: 600;
  box-shadow: none;
  text-transform: none;
  align-self: end;
}
.control-pagos-v2 .cp-method-row .cp-method-remove:hover {
  background: #ffebee;
  border-color: #ef9a9a;
  color: #c62828;
  transform: none;
}
.control-pagos-v2 #cpRegAddMethod {
  align-self: flex-start;
  margin: 2px 0 4px;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px dashed #90a4ae;
  background: #fff;
  color: #1c3c49;
  font-weight: 600;
  text-transform: none;
  box-shadow: none;
}
.control-pagos-v2 #cpRegAddMethod:hover {
  border-style: solid;
  border-color: #00bcd4;
  background: #e8fbfd;
  transform: none;
}
/* Campos del formulario de registro (evitar estilo login con padding de ícono) */
.control-pagos-v2 .medico-profile-card .form-group {
  position: static;
}
.control-pagos-v2 .medico-profile-card .form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #1c3c49;
}
.control-pagos-v2 .medico-profile-card .form-group input,
.control-pagos-v2 .medico-profile-card .form-group select,
.control-pagos-v2 .medico-profile-card .form-group textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 12px;
  border: 1px solid #cfd8dc;
  border-radius: 10px;
  background: #fff;
  color: #1c3c49;
  font-size: 14px;
  box-shadow: none;
}
.control-pagos-v2 .medico-profile-card .form-group input:focus,
.control-pagos-v2 .medico-profile-card .form-group select:focus,
.control-pagos-v2 .medico-profile-card .form-group textarea:focus {
  outline: none;
  border-color: #00bcd4;
  box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.15);
}
.control-pagos-v2 .cp-totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  padding: 12px 14px;
  background: #eef7f6;
  border: 1px solid #c8e6e3;
  border-radius: 10px;
  font-size: 14px;
  color: #37474f;
}
.control-pagos-v2 .cp-disclaimer {
  font-size: 12px;
  color: #78909c;
  background: #f8fafb;
  border-left: 3px solid #90a4ae;
  padding: 8px 12px;
  margin: 12px 0;
}
.control-pagos-v2 .cp-search-results {
  margin-top: 6px;
  border: 1px solid #e3eaed;
  border-radius: 8px;
  max-height: 220px;
  overflow-y: auto;
  background: #fff;
}
.control-pagos-v2 .cp-pick-patient {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: none;
  border-bottom: 1px solid #eee;
  background: #fff;
  cursor: pointer;
}
.control-pagos-v2 .cp-pick-patient span { color: #78909c; font-size: 12px; }
.control-pagos-v2 .cp-search-empty { padding: 8px; color: #78909c; font-size: 13px; }
.control-pagos-v2 .cp-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.cp-modal-overlay {
  position: fixed;
  z-index: 2300;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
.cp-modal {
  background: #fff;
  padding: 20px 22px;
  border-radius: 14px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
}
.cp-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.cp-modal-head h3 {
  margin: 0;
  color: #1c3c49;
  font-size: 18px;
}
.cp-modal-head .cp-modal-close {
  background: #eceff1;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}
.cp-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
  align-items: center;
}
.cp-modal-actions .btn {
  min-width: auto;
  width: auto;
  height: auto;
  border-radius: 8px;
  padding: 10px 18px;
  white-space: nowrap;
  text-transform: none;
}
.cp-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.control-pagos-v2 .cp-method-remove-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
}
.control-pagos-v2 .cp-method-remove-label {
  display: block;
  height: 15px;
  line-height: 15px;
  visibility: hidden;
  user-select: none;
}
@media (max-width: 720px) {
  .control-pagos-v2 .cp-method-row {
    grid-template-columns: 1fr 1fr;
  }
  .control-pagos-v2 .cp-method-row .form-group:first-child,
  .control-pagos-v2 .cp-method-remove-wrap {
    grid-column: 1 / -1;
  }
  .control-pagos-v2 .cp-method-remove-wrap {
    align-items: flex-end;
  }
  .control-pagos-v2 .cp-method-remove-label {
    display: none;
  }
  .control-pagos-v2 .cp-filters-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

.control-pagos-v2 .cp-cash-banner {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff8e1;
  border: 1px solid #ffe082;
  color: #6d4c00;
  font-size: 13px;
}
.control-pagos-v2 .cp-cash-banner--ok {
  background: #e8f5e9;
  border-color: #a5d6a7;
  color: #1b5e20;
}
.control-pagos-v2 .cp-cash-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.control-pagos-v2 .cp-cash-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Turnos / tickets (asistente) ── */
.content:has(#turns-section.content-section.active) {
  padding: 12px;
  min-width: 0;
  overflow-x: hidden;
}

.patient-turns-v1 {
  max-width: 100%;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.patient-turns-v1 > .medico-profile-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: none;
  width: 100%;
  margin: 0 0 10px;
  padding: 0 0 10px;
  border-bottom: 1px solid #e0e8ec;
}

.patient-turns-v1 .pt-layout {
  display: grid;
  grid-template-columns: minmax(300px, 440px) minmax(320px, 1fr);
  gap: 12px;
  align-items: start;
  width: 100%;
  margin: 0;
}
@media (max-width: 960px) {
  .patient-turns-v1 .pt-layout { grid-template-columns: 1fr; }
}
.patient-turns-v1 .pt-card {
  padding: 18px 20px 20px;
  max-width: none !important;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}
.patient-turns-v1 .pt-card-head {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e8eef0;
}
.patient-turns-v1 .pt-card-title {
  margin: 0;
  color: #1c3c49;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.patient-turns-v1 .pt-card-sub {
  margin: 4px 0 0;
  color: #78909c;
  font-size: 13px;
  line-height: 1.35;
}
.patient-turns-v1 .pt-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.patient-turns-v1 .pt-field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  margin: 0;
  position: static;
}
.patient-turns-v1 .pt-field > label,
.patient-turns-v1 .pt-field > .pt-label {
  display: block;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #1c3c49;
}
.patient-turns-v1 .pt-req { color: #e53935; }
.patient-turns-v1 .pt-input,
.patient-turns-v1 .pt-select,
.patient-turns-v1 .pt-textarea {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 11px 13px !important;
  border: 1px solid #cfd8dc !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #1c3c49 !important;
  font-size: 14px !important;
  line-height: 1.35;
  box-shadow: none !important;
  appearance: auto;
}
.patient-turns-v1 .pt-textarea {
  min-height: 84px;
  resize: vertical;
  font-family: inherit;
}
.patient-turns-v1 .pt-input:focus,
.patient-turns-v1 .pt-select:focus,
.patient-turns-v1 .pt-textarea:focus {
  outline: none;
  border-color: #00bcd4 !important;
  box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.15) !important;
}
.patient-turns-v1 .pt-patient-pick { position: relative; }
.patient-turns-v1 .pt-patient-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #b2ebf2;
  border-radius: 10px;
  background: #e0f7fa;
}
.patient-turns-v1 .pt-patient-chip[hidden] { display: none !important; }
.patient-turns-v1 .pt-patient-chip__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.patient-turns-v1 .pt-patient-chip__text strong {
  color: #006064;
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.patient-turns-v1 .pt-patient-chip__text span {
  color: #00838f;
  font-size: 12px;
}
.patient-turns-v1 .pt-patient-chip__clear {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 96, 100, 0.12);
  color: #006064;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.patient-turns-v1 .pt-patient-chip__clear:hover {
  background: rgba(0, 96, 100, 0.22);
}
.patient-turns-v1 .pt-seg {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.patient-turns-v1 .pt-seg__opt {
  position: relative;
  margin: 0;
  cursor: pointer;
}
.patient-turns-v1 .pt-seg__opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  appearance: none !important;
}
.patient-turns-v1 .pt-seg__opt span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 6px;
  border: 1px solid #cfd8dc;
  border-radius: 10px;
  background: #fff;
  color: #455a64;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.patient-turns-v1 .pt-seg__opt input:checked + span {
  border-color: #00838f;
  background: #e0f7fa;
  color: #006064;
  box-shadow: inset 0 0 0 1px #00838f;
}
.patient-turns-v1 .pt-seg__opt:hover span {
  border-color: #90a4ae;
}
.patient-turns-v1 .pt-last-turn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #c8e6c9;
  background: linear-gradient(180deg, #f1f8e9 0%, #e8f5e9 100%);
}
.patient-turns-v1 .pt-last-turn[hidden] { display: none !important; }
.patient-turns-v1 .pt-last-turn__label {
  font-size: 12px;
  font-weight: 600;
  color: #558b2f;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.patient-turns-v1 .pt-last-turn__num {
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
  color: #1b5e20;
  letter-spacing: 0.04em;
}
.patient-turns-v1 .pt-last-turn__meta {
  font-size: 12px;
  color: #558b2f;
  margin-bottom: 4px;
}
.patient-turns-v1 .pt-actions {
  margin-top: 4px;
}
.patient-turns-v1 .pt-create-btn {
  width: 100%;
  text-transform: none;
  font-weight: 700;
  padding: 12px 16px;
  border-radius: 10px;
  box-shadow: none;
}
.patient-turns-v1 .pt-muted { color: #78909c; font-size: 13px; }
.patient-turns-v1 .pt-msg {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
}
.patient-turns-v1 .pt-msg--ok { background: #e8f5e9; color: #1b5e20; }
.patient-turns-v1 .pt-msg--err { background: #ffebee; color: #b71c1c; }
.patient-turns-v1 .pt-search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  margin: 0;
  border: 1px solid #e0e6ea;
  border-radius: 10px;
  max-height: 220px;
  overflow: auto;
  background: #fff;
  box-shadow: 0 8px 24px rgba(28, 60, 73, 0.12);
}
.patient-turns-v1 .pt-search-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  border-bottom: 1px solid #eef2f4;
  background: transparent;
  cursor: pointer;
  color: #1c3c49;
}
.patient-turns-v1 .pt-search-item:hover { background: #f5fafb; }
.patient-turns-v1 .pt-search-item span { font-size: 12px; color: #78909c; }
.patient-turns-v1 .pt-search-empty { padding: 10px 12px; color: #78909c; font-size: 13px; }
.patient-turns-v1 .pt-queue-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 12px;
  border-bottom: 1px solid #e8eef0;
}
.patient-turns-v1 .pt-queue-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.patient-turns-v1 .pt-queue-tools .pt-select {
  min-width: 180px;
  width: auto;
  padding: 8px 10px !important;
}
.patient-turns-v1 .pt-queue-list { display: flex; flex-direction: column; gap: 10px; }
.patient-turns-v1 .pt-queue-card {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid #e3eaed;
  border-radius: 10px;
  background: #fafcfd;
}
.patient-turns-v1 .pt-queue-main { display: flex; gap: 12px; align-items: center; min-width: 0; }
.patient-turns-v1 .pt-queue-num {
  font-size: 22px;
  font-weight: 800;
  color: #1c3c49;
  min-width: 52px;
}
.patient-turns-v1 .pt-queue-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.patient-turns-v1 .pt-queue-meta span { font-size: 12px; color: #607d8b; }
.patient-turns-v1 .pt-queue-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.patient-turns-v1 .pt-badge {
  display: inline-block;
  width: fit-content;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.patient-turns-v1 .pt-badge--wait { background: #fff8e1; color: #f57f17; }
.patient-turns-v1 .pt-badge--call { background: #e3f2fd; color: #1565c0; }
.patient-turns-v1 .pt-badge--done { background: #e8f5e9; color: #2e7d32; }
.patient-turns-v1 .pt-badge--cancel { background: #eceff1; color: #546e7a; }
.patient-turns-v1 .pt-badge--muted { background: #f5f5f5; color: #757575; }

/* Aviso diario: confirmar citas (asistente) */
.asist-call-reminder-sec { margin: 0 0 12px; }
.asist-call-reminder-sec__title {
  margin: 0 0 6px;
  font-size: 13px;
  color: #1c3c49;
  font-weight: 700;
}
.asist-call-reminder-sec__date {
  font-weight: 500;
  color: #607d8b;
}
.asist-call-reminder-empty {
  margin: 0;
  font-size: 13px;
  color: #78909c;
}
.asist-call-reminder-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  color: #37474f;
}
.asist-call-reminder-list li { margin: 4px 0; }
.asist-call-reminder-time {
  font-weight: 700;
  color: #00897b;
  margin-right: 4px;
}
.asist-call-reminder-meta {
  display: block;
  font-size: 12px;
  color: #78909c;
  margin-top: 2px;
}
.asist-call-reminder-nophone { color: #90a4ae; }
.asist-call-reminder-summary {
  margin: 0;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 13px;
  color: #455a64;
}
