/* =====================================================================
   AVIDENTIX — Identidad visual v5
   Paleta: azul pastel + blanco, minimalista, profesional, clínico.
   Tipografía: Outfit (títulos) + Inter (cuerpo)
   Nota interna: los nombres de variable (--rd-blush-*, --rd-gold-*,
   --rd-terracotta-*) quedaron de paletas anteriores — cambiar solo los
   VALORES de abajo alcanza para re-temizar todo el sitio sin tocar
   ninguna vista, porque todo el CSS se apoya en estas variables.
   ===================================================================== */

:root {
  /* --- Neutros fríos / base (blanco pastel) --- */
  --rd-ink:      #263646;   /* texto principal */
  --rd-ink-soft: #64798D;   /* texto secundario */
  --rd-cream:    #F4F8FB;   /* fondo general — blanco azulado pastel */
  --rd-line:     #DCE6EE;

  /* --- Azul pastel (acento principal) --- */
  --rd-blush-700: #5B84A8;   /* botones primarios */
  --rd-blush-500: #8FB0C9;
  --rd-blush-200: #D3E3EE;
  --rd-blush-100: #E8F1F7;

  /* --- Azul profundo (hover y acentos secundarios — le da profundidad a la paleta) --- */
  --rd-terracotta-700: #33566F;
  --rd-terracotta-500: #4A7A98;

  /* --- Azul marino (tipografía de títulos y detalles) --- */
  --rd-gold-800: #2C4A63;
  --rd-gold-600: #3D6584;
  --rd-gold-400: #7FA8C4;
  --rd-gold-100: #EAF3F9;

  /* --- Sidebar (claro, minimalista) --- */
  --rd-dark-900: #22384A;

  /* --- Header superior "estilo Dentalink": azul vivo, distinto del azul
     pastel del resto del sitio — le da jerarquía visual a la barra fija --- */
  --rd-header-blue: #3B66D6;
  --rd-header-blue-dark: #2E51B0;
  --rd-nav-bg: #F2F5FA;

  --rd-radius: 14px;
  --rd-shadow: 0 8px 24px rgba(38, 54, 70, 0.08);

  --rd-sidebar-width: 250px;
  --rd-header-height: 56px;
  --rd-nav-height: 46px;
}


* { box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--rd-ink);
  background-color: var(--rd-cream);
}

h1, h2, h3, h4, h5, h6, .rd-heading {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-weight: 600;
  color: var(--rd-gold-800);
}

a { color: var(--rd-gold-600); }
a:hover { color: var(--rd-gold-800); }

/* --- Botones de marca --- */
.btn-rd-primary {
  background-color: var(--rd-blush-700);
  border-color: var(--rd-blush-700);
  color: #fff;
  font-weight: 500;
  border-radius: 10px;
  padding: 0.65rem 1.4rem;
  transition: background-color .15s ease, transform .1s ease;
}
.btn-rd-primary:hover {
  background-color: var(--rd-terracotta-700);
  border-color: var(--rd-terracotta-700);
  color: #fff;
}
.btn-rd-gold {
  background-color: var(--rd-gold-400);
  border-color: var(--rd-gold-400);
  color: var(--rd-ink);
  font-weight: 500;
  border-radius: 10px;
}
.btn-rd-gold:hover { background-color: var(--rd-gold-600); color: #fff; }

.btn-outline-secondary { border-radius: 10px; }

/* --- Tarjetas --- */
.rd-card {
  background: #fff;
  border: 1px solid var(--rd-line);
  border-radius: var(--rd-radius);
  box-shadow: var(--rd-shadow);
}

/* --- Logo (con fallback automático a monograma si no hay archivo aún) --- */
.rd-logo-wrap { display: flex; align-items: center; gap: 0.75rem; }
.rd-logo-img { max-height: 52px; max-width: 180px; object-fit: contain; }
.rd-logo-mark {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--rd-gold-400);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 1.3rem;
  color: var(--rd-ink); flex-shrink: 0;
}
.rd-logo-mark.small { width: 38px; height: 38px; font-size: 1rem; border-radius: 10px; }

/* Fallback del logo del sitio cuando no hay ninguna imagen cargada: solo
   el nombre de la clínica como texto, sin monograma ni ícono con letras. */
.rd-logo-texto {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--rd-gold-800);
}
.rd-logo-texto.small { font-size: 1.05rem; }

/* --- Pantalla de login (sin logo — solo tipografía y color) --- */
.rd-auth-shell { min-height: 100vh; display: flex; }
.rd-auth-brand {
  background: linear-gradient(155deg, var(--rd-header-blue) 0%, var(--rd-header-blue-dark) 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem;
  position: relative;
  overflow: hidden;
}
.rd-auth-brand::after {
  content: "";
  position: absolute;
  right: -100px;
  bottom: -100px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
.rd-auth-brand::before {
  content: "";
  position: absolute;
  left: -60px;
  top: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}
.rd-auth-brand-badges { display: flex; flex-direction: column; gap: 0.75rem; position: relative; z-index: 1; }
.rd-auth-brand-badges span {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  background: rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 0.6rem 1rem;
  width: fit-content;
}

.rd-auth-form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
  background: var(--rd-cream);
}
.rd-auth-form .card { border: none; border-radius: var(--rd-radius); box-shadow: var(--rd-shadow); }

/* --- Panel izquierdo específico del login (con logo + pie de página) --- */
.rd-login-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3rem 3rem 1.5rem;
  background: #fff;
  min-height: 100vh;
}
.rd-login-panel-inner { width: 100%; max-width: 380px; margin: auto; padding: 2rem 0; }
.rd-auth-footer { text-align: left; color: var(--rd-ink-soft); font-size: 0.78rem; }

.rd-campo-password { position: relative; }
.rd-campo-password input { padding-right: 2.6rem; }
.rd-toggle-password {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--rd-ink-soft);
  font-size: 1.1rem;
  padding: 0.2rem;
  line-height: 1;
}
.rd-toggle-password:hover { color: var(--rd-header-blue); }

/* --- Tabla de Pacientes rediseñada (minimalista, con foto) --- */
.rd-tabla-pacientes td { border-color: var(--rd-line); }
.rd-tabla-pacientes-nombre { color: var(--rd-ink); }
.rd-tabla-pacientes-nombre:hover { color: var(--rd-header-blue); }
.rd-avatar-paciente {
  width: 38px; height: 38px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
}
.rd-avatar-paciente-iniciales {
  display: flex; align-items: center; justify-content: center;
  background: var(--rd-blush-100); color: var(--rd-header-blue);
  font-weight: 600; font-size: 0.85rem;
}
.rd-barra-presupuesto {
  height: 6px; border-radius: 999px; background: var(--rd-blush-100); overflow: hidden; width: 100%;
}
.rd-barra-presupuesto-relleno {
  height: 100%; background: var(--rd-header-blue); border-radius: 999px;
}
.rd-badge-fuente {
  background: var(--rd-blush-100); color: var(--rd-header-blue);
  font-weight: 500; font-size: 0.72rem; padding: 0.35rem 0.65rem;
}

/* --- Encabezado de la ficha del paciente (estilo Dentalink) --- */
.rd-ficha-header {
  background: linear-gradient(155deg, var(--rd-header-blue) 0%, var(--rd-header-blue-dark) 100%);
  border-radius: var(--rd-radius);
  padding: 1.25rem 1.5rem;
  color: #fff;
}
.rd-ficha-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 1.4rem;
  color: #fff; flex-shrink: 0;
}
.rd-ficha-avatar-foto { object-fit: cover; }

/* --- Formulario de paciente rediseñado: minimalista, secciones con ícono --- */
.rd-form-label-min {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--rd-ink-soft);
  margin-bottom: 0.3rem;
}
.rd-form-seccion {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--rd-header-blue);
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--rd-line);
}
.rd-form-seccion i { font-size: 1.1rem; }
.rd-form-seccion-nota {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--rd-ink-soft);
  margin-left: auto;
}
.rd-form-paciente .form-control,
.rd-form-paciente .form-select {
  border-color: var(--rd-line);
}
.rd-form-paciente .form-control:focus,
.rd-form-paciente .form-select:focus {
  border-color: var(--rd-header-blue);
  box-shadow: 0 0 0 0.2rem rgba(59, 102, 214, 0.12);
}

.rd-ficha-alerta {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 10px;
  padding: 0.55rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  color: #fff;
  min-width: 150px;
}
.rd-ficha-alerta i { font-size: 1.1rem; opacity: 0.7; }
.rd-ficha-alerta-activa { background: rgba(230, 126, 34, 0.22); border-color: rgba(230, 126, 34, 0.4); }
.rd-ficha-alerta-activa i { opacity: 1; color: #FFD08A; }

/* --- Pestañas de dos niveles de la ficha del paciente --- */
.rd-ficha-tabs-nivel1 { border-bottom: 2px solid var(--rd-line); margin-bottom: 0; }
.rd-ficha-tabs-nivel1 .nav-link {
  color: var(--rd-ink-soft);
  font-size: 0.88rem;
  font-weight: 500;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 0.65rem 0.9rem;
}
.rd-ficha-tabs-nivel1 .nav-link.active { color: var(--rd-header-blue); border-bottom-color: var(--rd-header-blue); font-weight: 600; background: none; }
.rd-ficha-tabs-nivel2 {
  background: var(--rd-nav-bg);
  border-radius: 0 0 10px 10px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 1.5rem;
  gap: 0.25rem;
}
.rd-ficha-tabs-nivel2 .nav-link {
  color: var(--rd-ink-soft);
  font-size: 0.8rem;
  padding: 0.4rem 0.7rem;
  border-radius: 7px;
}
.rd-ficha-tabs-nivel2 .nav-link.active { background: #fff; color: var(--rd-header-blue); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.rd-ficha-tabs-nivel2 .nav-link.disabled { opacity: 0.45; }

/* --- Respaldo: todos los modales del sistema siempre pueden hacer scroll
   interno en su cuerpo, aunque el formulario sea largo y la pantalla chica --- */
.modal-dialog-scrollable .modal-body { max-height: 65vh; overflow-y: auto; }
@media (max-height: 700px) {
  .modal-dialog-scrollable .modal-body { max-height: 55vh; }
}

/* =====================================================================
   Header superior (azul) + barra de navegación horizontal — estilo Dentalink
   ===================================================================== */
.rd-app-shell { display: flex; flex-direction: column; min-height: 100vh; }

/* --- Banner de impersonación: bien distinto del resto, para que nunca pase desapercibido --- */
.rd-banner-impersonacion {
  background: #B45309;
  color: #fff;
  text-align: center;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  position: sticky;
  top: 0;
  z-index: 30;
}
.rd-banner-impersonacion i { margin-right: 0.35rem; }

.rd-header {
  height: var(--rd-header-height);
  background: var(--rd-header-blue);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.25rem;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 20;
}
.rd-header .rd-brand-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.rd-header-buscador {
  flex: 1;
  max-width: 480px;
}
.rd-header-buscador input {
  border: none;
  border-radius: 8px;
  padding: 0.5rem 0.9rem 0.5rem 2.2rem;
  width: 100%;
  font-size: 0.85rem;
  background: rgba(255,255,255,0.92);
}
.rd-header-buscador-wrap { position: relative; }
.rd-header-buscador-wrap i {
  position: absolute; left: 0.7rem; top: 50%; transform: translateY(-50%);
  color: var(--rd-ink-soft); font-size: 0.95rem;
}
.rd-header-buscador-resultados {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(20, 30, 50, 0.22);
  max-height: 320px;
  overflow-y: auto;
  z-index: 30;
  padding: 0.4rem;
}
.rd-header-buscador-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.7rem;
  border-radius: 7px;
  color: var(--rd-ink);
  text-decoration: none;
  font-size: 0.87rem;
}
.rd-header-buscador-item:hover { background: var(--rd-blush-100); color: var(--rd-header-blue); }
.rd-header-buscador-item .nombre { font-weight: 500; }
.rd-header-buscador-item .detalle { color: var(--rd-ink-soft); font-size: 0.78rem; white-space: nowrap; }
.rd-header-buscador-vacio { padding: 0.6rem 0.7rem; font-size: 0.82rem; color: var(--rd-ink-soft); }
.rd-header-derecha { margin-left: auto; display: flex; align-items: center; gap: 1.1rem; flex-shrink: 0; }
.rd-header-derecha a, .rd-header-derecha button {
  color: rgba(255,255,255,0.92);
  font-size: 0.83rem;
  background: none;
  border: none;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.rd-header-derecha a:hover { color: #fff; }
.rd-header-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255,255,255,0.22);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 600; color: #fff; flex-shrink: 0;
}
.rd-header-clinica {
  background: rgba(255,255,255,0.14);
  border-radius: 8px;
  padding: 0.35rem 0.7rem;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.rd-header-derecha a.rd-header-clinica { background: rgba(255,255,255,0.14); color: #fff; font-size: 0.82rem; padding: 0.35rem 0.7rem; border-radius: 8px; gap: 0.4rem; }
.rd-header-derecha a.rd-header-clinica:hover { background: rgba(255,255,255,0.24); }
.rd-header-derecha .dropdown-menu { padding: .35rem; min-width: 210px; }
.rd-header-derecha .dropdown-menu a.dropdown-item { display: flex; align-items: center; color: var(--rd-ink, #263646); font-size: .88rem; padding: .5rem .7rem; border-radius: 6px; }
.rd-header-derecha .dropdown-menu a.dropdown-item:hover { background: #eef3fa; color: var(--rd-ink, #263646); }
.rd-header-derecha .dropdown-menu a.dropdown-item.text-danger, .rd-header-derecha .dropdown-menu a.dropdown-item.text-danger:hover { color: #dc3545; }
.rd-header-derecha button.rd-header-usuario {
  color: #fff; display: inline-flex; align-items: center; gap: .5rem;
  padding: .2rem .35rem; border-radius: 8px; font: inherit; cursor: pointer;
}
.rd-header-derecha button.rd-header-usuario:hover, .rd-header-derecha button.rd-header-usuario.show { background: rgba(255,255,255,0.14); }
.rd-header-usuario::after { margin-left: .15rem; }
.rd-header-usuario .rd-header-texto { font-size: inherit; }
.rd-header-clinica-logo { height: 18px; width: auto; max-width: 60px; object-fit: contain; }
.rd-logo-header-avidentix { max-height: 32px; width: auto; }

/* --- Barra de navegación horizontal (segunda fila) --- */
.rd-nav {
  min-height: var(--rd-nav-height);
  background: var(--rd-nav-bg);
  border-bottom: 1px solid var(--rd-line);
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  padding: 0 1rem;
  flex-shrink: 0;
  position: sticky;
  top: var(--rd-header-height);
  z-index: 19;
}
.rd-nav-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  height: var(--rd-nav-height);
  box-sizing: border-box;
  padding: 0 0.9rem;
  margin: 0;
  color: var(--rd-ink-soft);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 500;
  line-height: normal;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  background: none;
  cursor: pointer;
  border-top: none; border-left: none; border-right: none;
}
.rd-nav-link:hover { color: var(--rd-header-blue); }
.rd-nav-link.activo { color: var(--rd-header-blue); border-bottom-color: var(--rd-header-blue); font-weight: 600; }
.rd-nav .dropdown-menu { border-radius: 10px; border: 1px solid var(--rd-line); box-shadow: var(--rd-shadow); padding: 0.4rem; margin-top: 0; }
.rd-nav .dropdown-menu .dropdown-item { border-radius: 6px; padding: 0.5rem 0.7rem; font-size: 0.85rem; display: flex; align-items: center; gap: 0.5rem; }
.rd-nav .dropdown-menu .dropdown-item:hover { background: var(--rd-blush-100); color: var(--rd-header-blue); }

.rd-role-badge {
  background: var(--rd-blush-100);
  color: var(--rd-gold-800);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 500;
}
.rd-content { padding: 2rem; flex: 1; }

.rd-stat-card { border-left: 4px solid var(--rd-gold-400); }
.rd-stat-card .rd-stat-value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--rd-gold-800);
}

/* --- Menú móvil: botón con dropdown --- */
.rd-mobile-menu-btn {
  background: var(--rd-blush-100);
  border: 1px solid var(--rd-blush-200);
  color: var(--rd-gold-800);
  border-radius: 10px;
  padding: 0.4rem 0.9rem;
  font-weight: 500;
  font-size: 0.88rem;
}
.rd-mobile-menu-btn:hover { background: var(--rd-blush-200); color: var(--rd-gold-800); }
.rd-mobile-dropdown-menu {
  min-width: 220px;
  border-radius: 12px;
  border: 1px solid var(--rd-line);
  box-shadow: var(--rd-shadow);
  padding: 0.5rem;
}
.rd-mobile-dropdown-menu .dropdown-item {
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  font-size: 0.92rem;
  color: var(--rd-ink);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.rd-mobile-dropdown-menu .dropdown-item.active,
.rd-mobile-dropdown-menu .dropdown-item:hover {
  background: var(--rd-blush-100);
  color: var(--rd-gold-800);
}
.rd-mobile-dropdown-menu .dropdown-item.text-danger:hover { background: #FBEAEA; }

/* =====================================================================
   RESPONSIVE — celulares y tablets (iPad incluido, breakpoint 992px)
   ===================================================================== */
@media (max-width: 991.98px) {
  .rd-content { padding: 1.25rem; }
  .rd-auth-brand { padding: 2.5rem; }
  .rd-header-buscador { display: none; }
  .rd-header-clinica { display: none; }
  .rd-nav-desktop { display: none; }
}

@media (min-width: 992px) {
  .rd-mobile-menu-btn { display: none; }
}

@media (max-width: 575.98px) {
  .rd-content { padding: 1rem; }
  .rd-login-panel { padding: 2rem 1.25rem 1rem; min-height: auto; }
  .rd-auth-form { padding: 1.5rem 1rem; }
  .rd-stat-value { font-size: 1.5rem !important; }
  .rd-header-derecha span.rd-header-texto { display: none; }
}


/* --- Modales con encabezado azul de marca (compartido por todas las pantallas) --- */
.rd-modal-cita { border-radius: var(--rd-radius); overflow: hidden; border: none; }
.rd-modal-cita .modal-header { background: linear-gradient(135deg, var(--rd-header-blue), var(--rd-header-blue-dark)); border-bottom: none; padding: 1.05rem 1.4rem; }
.rd-modal-cita .modal-header .modal-title { color: #fff; font-weight: 700; display: flex; align-items: center; gap: .5rem; }
.rd-modal-cita .modal-footer { background: var(--rd-cream); border-top: 1px solid var(--rd-line); }

/* --- Categorías como pestañas (Servicios) --- */
.rd-cat-tabs { display: flex; flex-wrap: wrap; gap: .5rem; }
.rd-cat-tab {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .45rem .95rem; border-radius: 999px; text-decoration: none;
  background: #fff; border: 1px solid var(--rd-line); color: var(--rd-ink);
  font-size: .85rem; font-weight: 600; transition: all .12s ease;
}
.rd-cat-tab:hover { border-color: var(--rd-header-blue); color: var(--rd-header-blue-dark); }
.rd-cat-tab .rd-cat-n { background: var(--rd-cream); color: var(--rd-ink-soft); border-radius: 999px; padding: 0 .5rem; font-size: .72rem; line-height: 1.5; }
.rd-cat-tab.activa { background: var(--rd-header-blue); border-color: var(--rd-header-blue); color: #fff; box-shadow: 0 2px 8px rgba(59,102,214,.28); }
.rd-cat-tab.activa .rd-cat-n { background: rgba(255,255,255,.22); color: #fff; }
.rd-cat-pick { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .45rem; }
.rd-cat-pick button { border: 1px solid var(--rd-line); background: #fff; border-radius: 999px; padding: .15rem .7rem; font-size: .78rem; color: var(--rd-ink-soft); }
.rd-cat-pick button:hover, .rd-cat-pick button.on { border-color: var(--rd-header-blue); color: var(--rd-header-blue-dark); background: rgba(59,102,214,.08); font-weight: 600; }


/* --- Ficha del paciente: barra de pestañas con acciones a la derecha (Agendar) --- */
.rd-ficha-tabs-barra { display: flex; align-items: flex-end; border-bottom: 2px solid var(--rd-line); gap: .5rem; }
.rd-ficha-tabs-barra .rd-ficha-tabs-nivel1 { border-bottom: 0; flex: 1 1 auto; min-width: 0; }
.rd-ficha-acciones { flex: none; display: flex; align-items: center; gap: .25rem; padding-bottom: .35rem; }
.rd-ficha-accion {
  background: none; border: 0; color: var(--rd-ink); font-size: .82rem; font-weight: 600;
  display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .7rem; border-radius: 8px; cursor: pointer;
}
.rd-ficha-accion i { color: #2F8F57; font-size: 1.05rem; }
.rd-ficha-accion:hover { background: #E7F4EC; color: #1F6B40; }

/* --- Modal verde (acciones de "agregar/agendar": se distingue del azul de gestión) --- */
.rd-modal-verde .modal-header { background: linear-gradient(135deg, #3FA66A, #2B8553); }
.rd-ag-dialog { max-width: 520px; }
.rd-ag-sub { color: rgba(255,255,255,.85); font-size: .78rem; margin-top: .1rem; }
.rd-modal-verde .modal-body { padding: 1.25rem 1.4rem; }
.rd-ag-label { display: block; font-size: .74rem; font-weight: 600; color: var(--rd-ink-soft); text-transform: uppercase; letter-spacing: .03em; margin-bottom: .3rem; }
.rd-modal-verde .form-control, .rd-modal-verde .form-select { border-radius: 9px; border-color: var(--rd-line); }
.rd-modal-verde .form-control:focus, .rd-modal-verde .form-select:focus { border-color: #3FA66A; box-shadow: 0 0 0 .18rem rgba(63,166,106,.18); }
.rd-ag-paciente { display: flex; align-items: center; gap: .75rem; background: #F1F8F4; border: 1px solid #D5EAD9; border-radius: 12px; padding: .65rem .8rem; margin-bottom: 1.1rem; }
.rd-ag-avatar { width: 38px; height: 38px; border-radius: 50%; background: #D5EAD9; color: #2B8553; font-weight: 700; display: flex; align-items: center; justify-content: center; object-fit: cover; flex: none; }
.rd-ag-proxima { font-size: .72rem; color: #1F6B40; background: #fff; border: 1px solid #D5EAD9; border-radius: 999px; padding: .2rem .6rem; white-space: nowrap; }
.rd-ag-duraciones { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.rd-ag-pill { border: 1px solid var(--rd-line); border-radius: 999px; padding: .28rem .8rem; font-size: .82rem; cursor: pointer; color: var(--rd-ink); background: #fff; transition: all .12s; }
.rd-ag-pill:hover { border-color: #3FA66A; }
.btn-check:checked + .rd-ag-pill { background: #3FA66A; border-color: #3FA66A; color: #fff; font-weight: 600; }
.rd-ag-termina { font-size: .78rem; color: var(--rd-ink-soft); margin-left: auto; }
.rd-btn-verde { background: #3FA66A; border-color: #3FA66A; color: #fff; font-weight: 600; border-radius: 9px; padding: .45rem 1.1rem; }
.rd-btn-verde:hover { background: #2B8553; border-color: #2B8553; color: #fff; }
.rd-filtro-tratamientos { color: var(--rd-header-blue); font-weight: 500; font-size: .9rem; background: none; border: 0; display: inline-flex; align-items: center; gap: .3rem; }
.rd-filtro-tratamientos:hover { text-decoration: underline; }
#filtroPlanesMenu .dropdown-item.active { background: var(--rd-blush-100); color: var(--rd-header-blue-dark); font-weight: 600; }
#filtroPlanesMenu .dropdown-item.active .text-muted { color: var(--rd-header-blue-dark) !important; opacity: .7; }

/* Botón PDF del cierre de caja */
.rd-btn-pdf { background:#C23838; color:#fff; border:none; border-radius:8px; padding:.45rem .9rem; font-weight:600; }
.rd-btn-pdf:hover { background:#a82e2e; color:#fff; }

.rd-ag-pill.activo { background: #3FA66A; border-color: #3FA66A; color: #fff; font-weight: 600; }
