@charset "UTF-8";
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");
:root {
  --navbar-width: 250px;
  --navbar-width-md: 280px;
  --navbar-width-lg: 300px;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #16a34a;
  --success-dark: #15803d;
  --danger: #dc2626;
  --danger-dark: #b91c1c;
  --warning: #d97706;
  --warning-dark: #b45309;
  --text-main: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-hint: #94a3b8;
  --border-color: #e2e8f0;
  --bg: #f1f5f9;
  --bg-light: #f8fafc;
  --dark: #0f172a;
  --font-family: Inter, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif;
  --z-modal: 1000;
  --z-toast: 1100;
  --z-modal-ui: 1200;
}

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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f1f5f9;
  color: #0f172a;
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
  min-width: 100vw;
  width: 100%;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes slideIn {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes highlight {
  0% {
    background-color: rgba(34, 197, 94, 0.3);
  }
  100% {
    background-color: transparent;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
.navbar-top {
  display: flex;
}

#pantalla-login[style*="display: flex"] ~ .navbar-top,
#pantalla-registro[style*="display: flex"] ~ .navbar-top {
  display: none !important;
}

.navbar-top {
  background: linear-gradient(180deg, #0f172a 0%, #1e2d4a 100%);
  color: #94a3b8;
  z-index: 100;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
}
@media (min-width: 768px) {
  .navbar-top {
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .navbar-top {
    transition: none;
  }
}

.navbar-header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  padding: 0 16px;
  width: 100%;
  height: 60px;
  flex-shrink: 0;
}

.navbar-brand {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}
.navbar-brand:hover {
  opacity: 0.85;
}

.navbar-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #2563eb;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  flex-shrink: 0;
}
.navbar-logo-icon svg {
  width: 18px;
  height: 18px;
  color: white;
}

.navbar-logo-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: 1px;
}

.navbar-logo-name {
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: 0.3px;
  line-height: 1;
}

.navbar-logo-sub {
  font-size: 10px;
  color: #94a3b8;
  line-height: 1;
}

.navbar-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: white;
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  gap: 5px;
  padding: 0;
  flex-shrink: 0;
}
.navbar-toggle:hover {
  background: rgba(255, 255, 255, 0.14);
}
.navbar-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.navbar-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.navbar-toggle.active span:nth-child(2) {
  opacity: 0;
}
.navbar-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}
@media (prefers-reduced-motion: reduce) {
  .navbar-toggle span {
    transition: none;
  }
}

.navbar-menu-wrapper {
  width: 100%;
  transition: all 0.2s ease;
}

.navbar-menu {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar-group-label {
  font-size: 9px;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 10px 14px 4px;
  display: block;
}

.navbar-menu li,
.nav-item {
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  padding: 9px 12px;
  border-radius: 8px;
  transition: all 0.15s ease;
  white-space: nowrap;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
  color: #94a3b8;
  position: relative;
  border: 1px solid transparent;
}
.navbar-menu li svg,
.nav-item svg {
  width: 16px;
  height: 16px;
  opacity: 0.7;
  flex-shrink: 0;
  transition: opacity 0.15s;
}
.navbar-menu li:hover,
.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
}
.navbar-menu li:hover svg,
.nav-item:hover svg {
  opacity: 1;
}
.navbar-menu li.active,
.nav-item.active {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.2);
  font-weight: 600;
}
.navbar-menu li.active svg,
.nav-item.active svg {
  opacity: 1;
}

.btn-salir {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
}
.btn-salir:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.35);
}

.navbar-user {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  margin-top: auto;
  flex-shrink: 0;
}

.navbar-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #2563eb;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  font-size: 11px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.navbar-user-name {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

@media (max-width: 639px) {
  .navbar-top {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    min-height: 60px;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    overflow: visible;
  }
  .navbar-header {
    height: 60px;
    padding: 0 16px;
  }
  .navbar-toggle {
    display: flex;
  }
  .navbar-menu-wrapper {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: #0f172a;
    display: none;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
    z-index: 100;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    max-height: calc(100vh - 60px);
    overflow-y: auto;
  }
  .navbar-menu-wrapper.active {
    display: block;
  }
  .navbar-menu {
    flex-direction: column;
    gap: 3px;
    padding: 10px;
  }
  .navbar-menu li, .navbar-menu .nav-item {
    width: 100%;
    justify-content: flex-start;
    padding: 11px 14px;
  }
  .navbar-menu .btn-salir {
    margin-top: 8px;
  }
  .navbar-group-label {
    padding: 12px 14px 4px;
  }
  .app-container {
    margin-top: 60px !important;
    margin-left: 0 !important;
    width: 100% !important;
  }
  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    padding: 16px !important;
  }
}
@media (min-width: 640px) {
  .navbar-top {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--navbar-width);
    height: 100vh;
    flex-direction: column;
    justify-content: flex-start;
    padding: 18px 0 12px;
    overflow-y: auto;
    overflow-x: hidden;
  }
  .navbar-header {
    flex-direction: column;
    align-items: flex-start;
    height: auto;
    padding: 0 16px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    margin-bottom: 8px;
  }
  .navbar-brand {
    justify-content: flex-start;
  }
  .navbar-toggle {
    display: none !important;
  }
  .navbar-menu-wrapper {
    flex: 1;
    display: flex !important;
    flex-direction: column;
    overflow-y: auto;
    padding-bottom: 8px;
  }
  .navbar-menu {
    flex-direction: column;
    gap: 2px;
    padding: 0 10px;
    width: 100%;
    flex: 1;
  }
  .navbar-menu li, .navbar-menu .nav-item {
    width: 100%;
    justify-content: flex-start;
    padding: 9px 12px;
  }
  .navbar-menu .btn-salir {
    margin-left: 0;
    margin-top: 8px;
  }
  .app-container {
    margin-left: var(--navbar-width);
    width: calc(100% - var(--navbar-width));
    margin-top: 0;
  }
  .main-content {
    margin-top: 0;
    margin-left: 0;
    padding: 24px;
    width: 100%;
  }
}
@media (min-width: 1024px) {
  .navbar-top {
    width: var(--navbar-width-md);
  }
  .app-container {
    margin-left: var(--navbar-width-md);
    width: calc(100% - var(--navbar-width-md));
  }
}
@media (min-width: 1280px) {
  .navbar-top {
    width: var(--navbar-width-lg);
  }
  .app-container {
    margin-left: var(--navbar-width-lg);
    width: calc(100% - var(--navbar-width-lg));
  }
}
.navbar-top {
  display: flex;
}

#pantalla-login.modal[style*="display: flex"] ~ .navbar-top,
#pantalla-registro.modal[style*="display: flex"] ~ .navbar-top {
  display: none !important;
}

.navbar-top {
  background: linear-gradient(180deg, #0f172a 0%, #1e2d4a 100%);
  color: #94a3b8;
  z-index: 100;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
}
@media (min-width: 768px) {
  .navbar-top {
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .navbar-top {
    transition: none;
  }
}

.navbar-header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  padding: 0 16px;
  width: 100%;
  height: 60px;
  flex-shrink: 0;
}

.navbar-brand {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}
.navbar-brand:hover {
  opacity: 0.85;
}

.navbar-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #2563eb;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  flex-shrink: 0;
}
.navbar-logo-icon svg {
  width: 18px;
  height: 18px;
  color: white;
}

.navbar-logo-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: 1px;
}

.navbar-logo-name {
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: 0.3px;
  line-height: 1;
}

.navbar-logo-sub {
  font-size: 10px;
  color: #94a3b8;
  line-height: 1;
}

.navbar-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: white;
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  gap: 5px;
  padding: 0;
  flex-shrink: 0;
}
.navbar-toggle:hover {
  background: rgba(255, 255, 255, 0.14);
}
.navbar-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.navbar-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.navbar-toggle.active span:nth-child(2) {
  opacity: 0;
}
.navbar-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}
@media (prefers-reduced-motion: reduce) {
  .navbar-toggle span {
    transition: none;
  }
}

.navbar-menu-wrapper {
  width: 100%;
  transition: all 0.2s ease;
}

.navbar-menu {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar-group-label {
  font-size: 9px;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 10px 14px 4px;
  display: block;
}

.navbar-menu li,
.nav-item {
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  padding: 9px 12px;
  border-radius: 8px;
  transition: all 0.15s ease;
  white-space: nowrap;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
  color: #94a3b8;
  position: relative;
  border: 1px solid transparent;
}
.navbar-menu li svg,
.nav-item svg {
  width: 16px;
  height: 16px;
  opacity: 0.7;
  flex-shrink: 0;
  transition: opacity 0.15s;
}
.navbar-menu li:hover,
.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
}
.navbar-menu li:hover svg,
.nav-item:hover svg {
  opacity: 1;
}
.navbar-menu li.active,
.nav-item.active {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.2);
  font-weight: 600;
}
.navbar-menu li.active svg,
.nav-item.active svg {
  opacity: 1;
}

.btn-salir {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
}
.btn-salir:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.35);
}

.navbar-user {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  margin-top: auto;
  flex-shrink: 0;
}

.navbar-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #2563eb;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  font-size: 11px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.navbar-user-name {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

@media (max-width: 639px) {
  .navbar-top {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    min-height: 60px;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    overflow: visible;
  }
  .navbar-header {
    height: 60px;
    padding: 0 16px;
  }
  .navbar-toggle {
    display: flex;
  }
  .navbar-menu-wrapper {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: #0f172a;
    display: none;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
    z-index: 100;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    max-height: calc(100vh - 60px);
    overflow-y: auto;
  }
  .navbar-menu-wrapper.active {
    display: block;
  }
  .navbar-menu {
    flex-direction: column;
    gap: 3px;
    padding: 10px;
  }
  .navbar-menu li, .navbar-menu .nav-item {
    width: 100%;
    justify-content: flex-start;
    padding: 11px 14px;
  }
  .navbar-menu .btn-salir {
    margin-top: 8px;
  }
  .navbar-group-label {
    padding: 12px 14px 4px;
  }
  .app-container {
    margin-top: 60px !important;
    margin-left: 0 !important;
    width: 100% !important;
  }
  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    padding: 16px !important;
  }
}
@media (min-width: 640px) {
  .navbar-top {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--navbar-width);
    height: 100vh;
    flex-direction: column;
    justify-content: flex-start;
    padding: 18px 0 12px;
    overflow-y: auto;
    overflow-x: hidden;
  }
  .navbar-header {
    flex-direction: column;
    align-items: flex-start;
    height: auto;
    padding: 0 16px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    margin-bottom: 8px;
  }
  .navbar-brand {
    justify-content: flex-start;
  }
  .navbar-toggle {
    display: none !important;
  }
  .navbar-menu-wrapper {
    flex: 1;
    display: flex !important;
    flex-direction: column;
    overflow-y: auto;
    padding-bottom: 8px;
  }
  .navbar-menu {
    flex-direction: column;
    gap: 2px;
    padding: 0 10px;
    width: 100%;
    flex: 1;
  }
  .navbar-menu li, .navbar-menu .nav-item {
    width: 100%;
    justify-content: flex-start;
    padding: 9px 12px;
  }
  .navbar-menu .btn-salir {
    margin-left: 0;
    margin-top: 8px;
  }
  .app-container {
    margin-left: var(--navbar-width);
    width: calc(100% - var(--navbar-width));
    margin-top: 0;
  }
  .main-content {
    margin-top: 0;
    margin-left: 0;
    padding: 24px;
    width: 100%;
  }
}
@media (min-width: 1024px) {
  .navbar-top {
    width: var(--navbar-width-md);
  }
  .app-container {
    margin-left: var(--navbar-width-md);
    width: calc(100% - var(--navbar-width-md));
  }
}
@media (min-width: 1280px) {
  .navbar-top {
    width: var(--navbar-width-lg);
  }
  .app-container {
    margin-left: var(--navbar-width-lg);
    width: calc(100% - var(--navbar-width-lg));
  }
}
.header-seccion {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.header-titulo {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
  gap: 12px;
  flex: 1;
  flex-wrap: wrap;
}
.header-titulo h1, .header-titulo h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}
.header-titulo .header-sub {
  font-size: 0.8rem;
  color: #94a3b8;
  font-weight: 500;
}

.header-acciones {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  flex-wrap: wrap;
}

.header-busqueda {
  width: 100%;
  margin-top: 8px;
}
.header-busqueda input {
  margin-bottom: 0;
  width: 100%;
  background-color: white;
  background-image: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%2394a3b8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg>');
  background-repeat: no-repeat;
  background-position: 12px center;
  background-size: 15px;
  padding: 10px 14px 10px 38px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.15s ease;
}
.header-busqueda input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}
.header-busqueda input::placeholder {
  color: #94a3b8;
}
@media (min-width: 641px) {
  .header-busqueda {
    width: auto;
    margin-top: 0;
  }
  .header-busqueda input {
    width: 280px;
  }
}

#vista-config .btn-dark, #vista-config .btn-warning, .btn-pagar-individual, .btn-accion, .btn-modal, .btn-link, .btn-guardar-sesion, .btn-eliminar, .btn-nuevo-paciente, .btn-guardar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  touch-action: manipulation;
  min-height: 50px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-guardar {
  background: #2563eb;
  color: white;
  padding: 15px 25px;
  font-size: 16px;
  width: 100%;
}
.btn-guardar:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

.btn-nuevo-paciente {
  background-color: #16a34a;
  color: white;
  padding: 14px 20px;
  font-size: 16px;
  width: 100%;
}
.btn-nuevo-paciente:hover {
  background-color: #15803d;
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

.btn-eliminar {
  background: #dc2626;
  color: white;
  padding: 10px 15px;
  font-size: 0.9rem;
  min-height: 40px;
  min-width: 40px;
}
.btn-eliminar:hover {
  background: #b91c1c;
  transform: scale(1.05);
}

.btn-guardar-sesion {
  background: #2563eb;
  color: white;
  padding: 16px 20px;
  font-size: 16px;
  width: 100%;
  margin: 25px auto 10px;
}
.btn-guardar-sesion:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

.btn-link {
  background: white;
  border: 2px solid #e2e8f0;
  color: #475569;
  padding: 14px 24px;
  font-size: 0.95rem;
  width: 100%;
  margin-top: 10px;
}
.btn-link:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  transform: translateY(-1px);
}

.btn-modal {
  padding: 15px 20px;
  font-size: 16px;
  width: 100%;
}

.btn-modal-primary {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: white;
}
.btn-modal-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
}

.btn-modal-secondary {
  background: white;
  color: #0f172a;
  border: 2px solid #e2e8f0;
}
.btn-modal-secondary:hover {
  border-color: #2563eb;
  color: #2563eb;
  transform: translateY(-2px);
}

.btn-accion {
  padding: 8px 12px;
  font-size: 0.8rem;
  min-height: 36px;
  border-radius: 8px;
  width: auto;
  flex: 0 1 auto;
}
.btn-accion--primary {
  background-color: #2563eb;
  color: white;
}
.btn-accion--primary:hover {
  background-color: #1d4ed8;
  transform: translateY(-2px);
}
.btn-accion--success {
  background-color: #16a34a;
  color: white;
}
.btn-accion--success:hover {
  background-color: #15803d;
  transform: translateY(-2px);
}
.btn-accion--warning {
  background-color: #d97706;
  color: #1e293b;
}
.btn-accion--warning:hover {
  background-color: #b45309;
  transform: translateY(-2px);
}
.btn-accion--danger {
  background-color: #dc2626;
  color: white;
}
.btn-accion--danger:hover {
  background-color: #b91c1c;
  transform: translateY(-2px);
}
.btn-accion--whatsapp {
  background-color: #25D366;
  color: white;
}
.btn-accion--whatsapp:hover {
  background-color: #128C7E;
  transform: translateY(-2px);
}
.btn-accion--dark {
  background-color: #0f172a;
  color: white;
}
.btn-accion--dark:hover {
  background-color: rgb(28.4210526316, 43.5789473684, 79.5789473684);
  transform: translateY(-2px);
}

.btn-pagar-individual {
  background: #2563eb;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  min-height: unset;
  margin-left: 8px;
}
.btn-pagar-individual:hover {
  background: #1d4ed8;
  transform: scale(1.05);
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  user-select: none;
  transition: transform 0.2s, opacity 0.2s;
}

.badge--interactive {
  cursor: pointer;
}
.badge--interactive:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

input,
select,
textarea {
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
  color: #0f172a;
  background: white;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}
input::placeholder,
select::placeholder,
textarea::placeholder {
  color: #64748b;
}

textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
  height: auto;
}

select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  padding-right: 36px;
  cursor: pointer;
}

input[type=number] {
  -moz-appearance: textfield;
}
input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 6px;
}

.password-wrapper {
  position: relative;
  width: 100%;
}
.password-wrapper input {
  padding-right: 44px;
  margin-bottom: 0;
}
.password-wrapper .toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 1.2rem;
  user-select: none;
  z-index: 2;
  color: #64748b;
  transition: color 0.2s;
  line-height: 1;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
}
.password-wrapper .toggle-password svg {
  width: 18px;
  height: 18px;
}
.password-wrapper .toggle-password:hover {
  color: #2563eb;
}

.grid-form {
  display: block;
  width: 100%;
}
@media (min-width: 641px) {
  .grid-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}
@media (min-width: 769px) {
  .grid-form {
    grid-template-columns: repeat(3, 1fr);
  }
}

.full-width {
  width: 100%;
}
@media (min-width: 641px) {
  .full-width {
    grid-column: span 2;
  }
}
@media (min-width: 769px) {
  .full-width {
    grid-column: span 3;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 5px;
}
.form-group input,
.form-group select,
.form-group textarea {
  margin-bottom: 0;
}

.field-error {
  font-size: 0.8rem;
  color: #dc2626;
  margin-top: 4px;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
}
.field-error svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.opcion-grupo {
  margin-bottom: 20px;
}
.opcion-grupo > p,
.opcion-grupo > strong {
  font-weight: 600;
  margin-bottom: 10px;
  color: #0f172a;
  font-size: 0.95rem;
  display: block;
}

.modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 15px;
  animation: fadeIn 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
@media (min-width: 641px) {
  .modal {
    padding: 24px;
  }
}

.modal-content {
  background: white;
  border-radius: 14px;
  width: 100%;
  max-width: 500px;
  position: relative;
  box-shadow: 0 8px 40px rgba(15, 23, 42, 0.12);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  animation: modalSlideIn 0.25s ease-out;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
  background: white;
  position: relative;
}
.modal-header h2 {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
}

.modal-header--accent, #modal-nueva-entrada .modal-header, .modal-historia .modal-header, #modal-editar-consultorio .modal-header {
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
  border-bottom: none;
}
.modal-header--accent h2, #modal-nueva-entrada .modal-header h2, .modal-historia .modal-header h2, #modal-editar-consultorio .modal-header h2 {
  color: white;
}

.modal-header--danger, #modal-confirmar-eliminar .modal-header {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  border-bottom: none;
}
.modal-header--danger h2, #modal-confirmar-eliminar .modal-header h2 {
  color: white;
}
.modal-header--danger .close-modal, #modal-confirmar-eliminar .modal-header .close-modal {
  color: white;
  background: rgba(255, 255, 255, 0.15);
}
.modal-header--danger .close-modal:hover, #modal-confirmar-eliminar .modal-header .close-modal:hover {
  background: rgba(255, 255, 255, 0.25);
  color: white;
  transform: rotate(90deg);
}

.modal-avatar {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #2563eb;
  flex-shrink: 0;
}

.modal-header--accent .modal-avatar, #modal-nueva-entrada .modal-header .modal-avatar, .modal-historia .modal-header .modal-avatar, #modal-editar-consultorio .modal-header .modal-avatar {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  color: white;
}

.modal-header-sub {
  font-size: 12px;
  color: #64748b;
  margin-top: 3px;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  flex-wrap: wrap;
}

.modal-header--accent .modal-header-sub, #modal-nueva-entrada .modal-header .modal-header-sub, .modal-historia .modal-header .modal-header-sub, #modal-editar-consultorio .modal-header .modal-header-sub {
  color: rgba(255, 255, 255, 0.65);
}

.modal-header-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.4;
  flex-shrink: 0;
}

.close-modal {
  position: absolute;
  right: 16px;
  top: 16px;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  transition: all 0.2s ease;
  z-index: 10;
  touch-action: manipulation;
}
.close-modal:hover {
  background: #e2e8f0;
  color: #0f172a;
  transform: rotate(90deg);
}
.close-modal svg {
  width: 13px;
  height: 13px;
}

.modal-stats-strip {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
  gap: 20px;
  padding: 12px 24px;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
  flex-wrap: wrap;
  background: white;
}

.modal-stat {
  text-align: left;
}

.modal-stat-val {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1;
}

.modal-stat-lbl {
  font-size: 10px;
  color: #64748b;
  margin-top: 2px;
}

.modal-stat-sep {
  width: 1px;
  background: #e2e8f0;
  align-self: stretch;
  min-height: 24px;
}

.modal-tabs {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
  padding: 0 24px;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
  background: white;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-tab {
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
  gap: 5px;
  transition: all 0.15s;
  white-space: nowrap;
  touch-action: manipulation;
}
.modal-tab svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}
.modal-tab:hover {
  color: #0f172a;
}
.modal-tab.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
  font-weight: 600;
}

.modal-tab-panel {
  display: none;
}
.modal-tab-panel.active {
  display: block;
}

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

.modal-input,
.modal-select,
.modal-textarea {
  width: 100%;
  padding: 8px 11px;
  border: 1.5px solid #e2e8f0;
  border-radius: 7px;
  font-size: 13px;
  color: #0f172a;
  font-family: inherit;
  background: #f8fafc;
  outline: none;
  transition: all 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}
.modal-input:focus,
.modal-select:focus,
.modal-textarea:focus {
  border-color: #2563eb;
  background: white;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.modal-select {
  background-color: #f8fafc;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 14px;
  cursor: pointer;
}

.modal-textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}

.modal-input-group {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
}
.modal-input-group .modal-input {
  flex: 1;
}

.modal-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.modal-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
@media (min-width: 641px) {
  .modal-form-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

@media (min-width: 641px) {
  .modal-form-grid--three {
    grid-template-columns: repeat(3, 1fr);
  }
}

.modal-field {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 4px;
}
.modal-field--full {
  grid-column: 1/-1;
}

.modal-section-title {
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
}
.modal-section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.modal-footer {
  padding: 12px 24px;
  border-top: 1px solid #e2e8f0;
  background: white;
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
}
.modal-footer .modal-footer-left,
.modal-footer .modal-footer-right {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
}
@media (max-width: 480px) {
  .modal-footer {
    flex-direction: column;
  }
  .modal-footer .modal-footer-left,
  .modal-footer .modal-footer-right {
    width: 100%;
  }
  .modal-footer .modal-footer-left .btn-modal,
  .modal-footer .modal-footer-left .btn-accion,
  .modal-footer .modal-footer-right .btn-modal,
  .modal-footer .modal-footer-right .btn-accion {
    flex: 1;
  }
}

.modal-saldo-card {
  border: 1.5px solid #bbf7d0;
  border-radius: 10px;
  padding: 14px;
  background: #f0fdf4;
  margin-bottom: 16px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: 12px;
}
.modal-saldo-card .modal-saldo-info {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
}
.modal-saldo-card .modal-saldo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: white;
  border: 1px solid #bbf7d0;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
}
.modal-saldo-card .modal-saldo-icon svg {
  width: 14px;
  height: 14px;
  color: #16a34a;
}
.modal-saldo-card .modal-saldo-label {
  font-size: 11px;
  color: #16a34a;
  font-weight: 600;
}
.modal-saldo-card .modal-saldo-val {
  font-size: 18px;
  font-weight: 700;
  color: #16a34a;
}

.modal-hc-card {
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: 12px;
  margin-bottom: 16px;
  background: #f8fafc;
}
.modal-hc-card .modal-hc-info {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
}
.modal-hc-card .modal-hc-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
}
.modal-hc-card .modal-hc-icon svg {
  width: 14px;
  height: 14px;
  color: #2563eb;
}
.modal-hc-card .modal-hc-title {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}
.modal-hc-card .modal-hc-sub {
  font-size: 11px;
  color: #64748b;
  margin-top: 1px;
}

.modal-urgencia-card {
  border: 1.5px solid #fde68a;
  border-radius: 10px;
  padding: 14px;
  background: #fffbeb;
  margin-bottom: 16px;
}
.modal-urgencia-card .modal-urgencia-header {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  margin-bottom: 10px;
}
.modal-urgencia-card .modal-urgencia-header svg {
  width: 14px;
  height: 14px;
  color: #d97706;
  flex-shrink: 0;
}
.modal-urgencia-card .modal-urgencia-header span {
  font-size: 11px;
  font-weight: 600;
  color: #92400e;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#modal-paciente .modal-content {
  max-width: 480px;
  max-height: 90vh;
  overflow: hidden;
}
#modal-paciente .modal-body {
  overflow-y: auto;
  max-height: calc(90vh - 140px);
}
#modal-paciente .opcion-grupo {
  margin-bottom: 20px;
}
#modal-paciente .opcion-grupo p {
  font-weight: 600;
  margin-bottom: 10px;
  color: #0f172a;
  font-size: 0.95rem;
}
#modal-paciente .opcion-grupo label {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
  gap: 12px;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
#modal-paciente .opcion-grupo label:hover {
  background: #f1f5f9;
  border-color: #2563eb;
}
#modal-paciente .opcion-grupo label input[type=radio] {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
  accent-color: #2563eb;
  flex-shrink: 0;
}

#modal-ficha .modal-content {
  max-width: 680px;
}
#modal-ficha #historial-sesiones .table-container {
  max-height: 260px;
  overflow-y: auto;
}
#modal-ficha #historial-sesiones table {
  font-size: 0.85rem;
}
#modal-ficha #historial-sesiones th {
  font-size: 0.75rem;
  padding: 8px 10px;
}
#modal-ficha #historial-sesiones td {
  padding: 8px 10px;
  vertical-align: middle;
}

#modal-editar-consultorio .modal-content {
  max-width: 480px;
}
#modal-editar-consultorio input[type=number] {
  -moz-appearance: textfield;
}
#modal-editar-consultorio input[type=number]::-webkit-outer-spin-button, #modal-editar-consultorio input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.modal-historia .modal-content {
  max-width: 800px;
}
.modal-historia .entries-container {
  max-height: 380px;
  overflow-y: auto;
  margin-bottom: 20px;
  padding-right: 4px;
}

#modal-nueva-entrada .modal-content {
  max-width: 600px;
}
#modal-confirmar-eliminar {
  z-index: 1200;
}
#modal-confirmar-eliminar .modal-content {
  max-width: 400px;
}
#modal-confirmar-eliminar .acciones {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
  margin-top: 16px;
}
#modal-confirmar-eliminar .acciones .btn-modal,
#modal-confirmar-eliminar .acciones .btn-accion {
  flex: 1;
}

.radio-group-horizontal {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.radio-group-horizontal label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  padding: 7px 12px;
  border-radius: 7px;
  border: 1.5px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.85rem;
}
.radio-group-horizontal label:hover {
  background: #f1f5f9;
  border-color: #2563eb;
}
.radio-group-horizontal label input[type=radio] {
  width: auto;
  margin: 0;
  accent-color: #2563eb;
}

.ficha-banner-pausa {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: #fffbeb;
  border-left: 3px solid #d97706;
  padding: 10px 24px;
  font-size: 13px;
  color: #92400e;
}

.ficha-banner-pausa-texto {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.ficha-banner-pausa-texto strong {
  font-weight: 700;
}

.ficha-banner-pausa-acciones {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

@media (max-width: 639px) {
  #modal-ficha .modal-content {
    max-height: 96vh;
    border-radius: 14px 14px 0 0;
  }
  #modal-ficha .modal-tabs {
    padding: 0 12px;
    gap: 0;
  }
  #modal-ficha .modal-tab {
    padding: 10px 12px;
    font-size: 11px;
    gap: 4px;
  }
  #modal-ficha .modal-tab svg {
    width: 11px;
    height: 11px;
  }
  #modal-ficha .modal-stats-strip {
    padding: 10px 16px;
    gap: 12px;
    flex-wrap: wrap;
  }
  #modal-ficha .modal-tab-panel {
    padding: 16px !important;
  }
  #modal-ficha .grid-form-modal {
    grid-template-columns: 1fr;
  }
  #modal-ficha .grid-form-modal [style*="grid-column: span 2"],
  #modal-ficha .grid-form-modal [style*="grid-column:span 2"] {
    grid-column: span 1;
  }
  #modal-ficha .modal-footer {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 16px 20px;
  }
  #modal-ficha .modal-footer-left,
  #modal-ficha .modal-footer-right {
    gap: 6px;
  }
  #modal-ficha .btn-modal {
    padding: 7px 10px;
    font-size: 12px;
  }
}
.table-container {
  background: white;
  border-radius: 12px;
  overflow-x: auto;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
  border: 1px solid #e2e8f0;
  margin-bottom: 20px;
  -webkit-overflow-scrolling: touch;
}
.table-container::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.table-container::-webkit-scrollbar-track {
  background: #f8fafc;
  border-radius: 3px;
}
.table-container::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}
.table-container::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

th {
  background: #f8fafc;
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}

td {
  padding: 12px 14px;
  font-size: 0.9rem;
  color: #0f172a;
  border-bottom: 1px solid #f8fafc;
  vertical-align: middle;
  background: white;
}

tbody tr {
  transition: background-color 0.15s;
}
tbody tr:last-child td {
  border-bottom: none;
}
tbody tr:hover td {
  background: #f8fafc;
}

.nombre-link {
  color: #2563eb;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  padding: 4px 0;
  touch-action: manipulation;
  min-height: 44px;
}
.nombre-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

tr[data-saldo-favor=true] td {
  background: rgba(22, 163, 74, 0.03);
}
tr[data-saldo-favor=true]:hover td {
  background: rgba(22, 163, 74, 0.07);
}

.acciones-buttons {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

#historial-sesiones .table-container {
  max-height: 220px;
  overflow-y: auto;
  margin-bottom: 0;
}
#historial-sesiones table {
  font-size: 0.82rem;
  min-width: 500px;
}
#historial-sesiones th {
  font-size: 0.7rem;
  padding: 8px 10px;
}
#historial-sesiones td {
  padding: 8px 10px;
  vertical-align: middle;
}

.detalle-sesiones-row td {
  background: #f8fafc;
  padding: 0;
}

.detalle-sesiones-content {
  padding: 14px 16px;
}
.detalle-sesiones-content table {
  min-width: auto;
  width: 100%;
  font-size: 0.82rem;
}
.detalle-sesiones-content table th,
.detalle-sesiones-content table td {
  padding: 7px 10px;
  background: transparent;
  border: none;
  font-size: 0.82rem;
}

.tabla-vacia, #vista-consultorios .no-consultorios-mensaje {
  text-align: center;
  padding: 40px 20px;
  color: #64748b;
  font-style: italic;
  background: #f8fafc;
  border-radius: 8px;
  border: 2px dashed #e2e8f0;
  margin: 10px 0;
}
.tabla-vacia svg, #vista-consultorios .no-consultorios-mensaje svg {
  width: 32px;
  height: 32px;
  color: #94a3b8;
  margin-bottom: 10px;
}
.tabla-vacia p, #vista-consultorios .no-consultorios-mensaje p {
  font-size: 0.9rem;
}

.card-registro {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
  border: 1px solid #e2e8f0;
  margin-bottom: 20px;
}
.card-registro h3 {
  margin-bottom: 15px;
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}
.card-registro p {
  margin-bottom: 10px;
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.5;
}

.grid-finanzas {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 24px;
}
@media (min-width: 481px) {
  .grid-finanzas {
    grid-template-columns: repeat(3, 1fr);
  }
}

.metrica-card {
  padding: 18px;
  border-radius: 12px;
  background: white;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.metrica-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 12px 12px 0 0;
}
.metrica-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}
.metrica-card .metrica-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  margin-bottom: 12px;
}
.metrica-card .metrica-icon svg {
  width: 16px;
  height: 16px;
}
.metrica-card h3 {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 4px 0;
  line-height: 1.1;
  color: #0f172a;
}
.metrica-card p {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  margin: 0;
}

.estimado .metrica-card::before, .estimado.metrica-card::before {
  background: #2563eb;
}
.estimado .metrica-icon {
  background: #eff6ff;
}
.estimado .metrica-icon svg {
  color: #2563eb;
}
.estimado h3 {
  color: #1d4ed8;
}

.metrica-card.estimado::before {
  background: #2563eb;
}
.metrica-card.estimado h3 {
  color: #1d4ed8;
}
.metrica-card.estimado .metrica-icon {
  background: #eff6ff;
}

.metrica-card.cobrado::before {
  background: #16a34a;
}
.metrica-card.cobrado h3 {
  color: #16a34a;
}
.metrica-card.cobrado .metrica-icon {
  background: #f0fdf4;
}

.metrica-card.deuda::before {
  background: #dc2626;
}
.metrica-card.deuda h3 {
  color: #dc2626;
}
.metrica-card.deuda .metrica-icon {
  background: #fef2f2;
}

.metrica-card.saldo-favor::before {
  background: #16a34a;
}
.metrica-card.saldo-favor h3 {
  color: #16a34a;
}
.metrica-card.saldo-favor .metrica-icon {
  background: #f0fdf4;
}

.paciente-stats {
  background: #f8fafc;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 18px;
  border: 1px solid #e2e8f0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 10px;
}
@media (min-width: 481px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-card {
  background: white;
  padding: 14px;
  border-radius: 8px;
  text-align: center;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
}

.stat-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: #2563eb;
  margin-bottom: 4px;
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.psi-notification {
  position: fixed;
  top: 15px;
  right: 15px;
  left: 15px;
  padding: 12px 16px;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  z-index: 1100;
  animation: slideIn 0.3s ease;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  border-left-width: 4px;
  border-left-style: solid;
}
.psi-notification .notification-content {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
  flex: 1;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
}
.psi-notification .notification-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.psi-notification button {
  background: none;
  border: none;
  color: inherit;
  opacity: 0.5;
  cursor: pointer;
  margin-left: 12px;
  touch-action: manipulation;
  min-width: 28px;
  min-height: 28px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  border-radius: 5px;
  transition: opacity 0.15s, background 0.15s;
  flex-shrink: 0;
}
.psi-notification button svg {
  width: 14px;
  height: 14px;
}
.psi-notification button:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.06);
}
.psi-notification.success {
  background: #f0fdf4;
  color: #15803d;
  border-left-color: #16a34a;
}
.psi-notification.error {
  background: #fef2f2;
  color: #b91c1c;
  border-left-color: #dc2626;
}
.psi-notification.warning {
  background: #fffbeb;
  color: #92400e;
  border-left-color: #d97706;
}
.psi-notification.info {
  background: #eff6ff;
  color: #1d4ed8;
  border-left-color: #2563eb;
}

@media (min-width: 641px) {
  .psi-notification {
    left: calc(var(--navbar-width) + 20px);
    right: 20px;
    max-width: 480px;
    top: 20px;
  }
}
@media (min-width: 769px) {
  .psi-notification {
    left: calc(var(--navbar-width-md) + 20px);
  }
}
@media (min-width: 1025px) {
  .psi-notification {
    left: calc(var(--navbar-width-lg) + 20px);
  }
}
.evento-presente-pagado {
  border-left: 3px solid #16a34a !important;
  opacity: 1 !important;
  filter: none !important;
}

.evento-presente-pendiente {
  border-left: 3px solid #d97706 !important;
  background: repeating-linear-gradient(45deg, transparent, transparent 8px, rgba(217, 119, 6, 0.08) 8px, rgba(217, 119, 6, 0.08) 16px) !important;
}

.evento-pago-parcial {
  border: 2px dashed #d97706 !important;
  background: repeating-linear-gradient(-45deg, transparent, transparent 5px, rgba(217, 119, 6, 0.07) 5px, rgba(217, 119, 6, 0.07) 10px) !important;
}

.evento-ausente-preaviso {
  opacity: 0.55 !important;
  background-color: #fffbeb !important;
  color: #92400e !important;
  border-left: 3px solid #d97706 !important;
  text-decoration: line-through;
}

.evento-ausente-sin-preaviso {
  opacity: 0.4 !important;
  background-color: #fef2f2 !important;
  color: #b91c1c !important;
  border-left: 3px solid #dc2626 !important;
  text-decoration: line-through;
}

.evento-online {
  border-left: 3px solid #16a34a !important;
}

.evento-sin-deuda {
  opacity: 0.65 !important;
  background-color: #f8fafc !important;
  color: #64748b !important;
  border-left: 3px solid #cbd5e1 !important;
}

.evento-saldo-favor {
  border-right: 3px solid #16a34a !important;
  position: relative;
}
.evento-saldo-favor::after {
  content: "+";
  position: absolute;
  top: 2px;
  right: 2px;
  background: #16a34a;
  color: white;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
}

.evento-monto-personalizado {
  font-weight: 700 !important;
  font-style: italic;
}

.fc-event[data-asistencia=AusenteConPreaviso],
.fc-event[data-asistencia=AusenteSinPreaviso] {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #64748b !important;
  opacity: 0.6 !important;
  filter: grayscale(0.6) !important;
  box-shadow: none !important;
}

.fc-event[data-asistencia=AusenteConPreaviso] {
  border-left: 3px solid rgba(217, 119, 6, 0.5) !important;
}

.fc-event[data-asistencia=AusenteSinPreaviso] {
  border-left: 3px solid rgba(220, 38, 38, 0.5) !important;
}

.fc-event[data-asistencia=AusenteConPreaviso] .fc-event-title,
.fc-event[data-asistencia=AusenteSinPreaviso] .fc-event-title {
  text-decoration: line-through;
  opacity: 0.7;
}

.fc-event[data-saldo-favor=true] {
  border-right: 3px solid #16a34a !important;
}

.evento-vacaciones {
  opacity: 0.45 !important;
  background-color: #e2e8f0 !important;
  color: #64748b !important;
  text-decoration: line-through;
  border: none !important;
}

@media (max-width: 767px) {
  .evento-presente-pagado .fc-list-event-dot {
    border-color: #16a34a !important;
  }
  .evento-presente-pendiente {
    background: transparent !important;
  }
  .evento-presente-pendiente .fc-list-event-dot {
    border-color: #d97706 !important;
  }
  .evento-presente-pendiente .fc-list-event-title {
    color: #b45309 !important;
  }
  .evento-ausente-preaviso {
    opacity: 0.75 !important;
    background: transparent !important;
  }
  .evento-ausente-preaviso .fc-list-event-dot {
    border-color: #d97706 !important;
  }
  .evento-ausente-preaviso .fc-list-event-title {
    text-decoration: line-through;
    color: #64748b !important;
  }
  .evento-ausente-sin-preaviso {
    opacity: 0.65 !important;
    background: transparent !important;
  }
  .evento-ausente-sin-preaviso .fc-list-event-dot {
    border-color: #dc2626 !important;
  }
  .evento-ausente-sin-preaviso .fc-list-event-title {
    text-decoration: line-through;
    color: #dc2626 !important;
  }
  .evento-vacaciones {
    background: transparent !important;
  }
  .evento-vacaciones .fc-list-event-dot {
    border-color: #cbd5e1 !important;
  }
  .evento-vacaciones .fc-list-event-title {
    text-decoration: line-through;
    color: #94a3b8 !important;
  }
}
.asistencia-opts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.asistencia-opt {
  border: 1.5px solid #e2e8f0;
  border-radius: 9px;
  padding: 12px 8px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  user-select: none;
}
.asistencia-opt span {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  line-height: 1.2;
}
.asistencia-opt:hover {
  border-color: #2563eb;
  background: #eff6ff;
}
.asistencia-opt.selected span {
  font-weight: 700;
}
.asistencia-opt.selected.asistencia-opt--green, .asistencia-opt:has(input[value=Presente]:checked) {
  border-color: #16a34a;
  background: #f0fdf4;
}
.asistencia-opt.selected.asistencia-opt--green span, .asistencia-opt:has(input[value=Presente]:checked) span {
  color: #15803d;
}
.asistencia-opt.selected.asistencia-opt--amber, .asistencia-opt:has(input[value=AusenteConPreaviso]:checked) {
  border-color: #d97706;
  background: #fffbeb;
}
.asistencia-opt.selected.asistencia-opt--amber span, .asistencia-opt:has(input[value=AusenteConPreaviso]:checked) span {
  color: #92400e;
}
.asistencia-opt.selected.asistencia-opt--red, .asistencia-opt:has(input[value=AusenteSinPreaviso]:checked) {
  border-color: #dc2626;
  background: #fef2f2;
}
.asistencia-opt.selected.asistencia-opt--red span, .asistencia-opt:has(input[value=AusenteSinPreaviso]:checked) span {
  color: #b91c1c;
}

.asistencia-opt-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  flex-shrink: 0;
}
.asistencia-opt-icon svg {
  width: 15px;
  height: 15px;
}
.asistencia-opt-icon--green {
  background: #f0fdf4;
}
.asistencia-opt-icon--green svg {
  color: #16a34a;
}
.asistencia-opt-icon--amber {
  background: #fffbeb;
}
.asistencia-opt-icon--amber svg {
  color: #d97706;
}
.asistencia-opt-icon--red {
  background: #fef2f2;
}
.asistencia-opt-icon--red svg {
  color: #dc2626;
}

.pago-opts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.pago-opt {
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 8px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  gap: 5px;
  user-select: none;
}
.pago-opt svg {
  width: 16px;
  height: 16px;
  color: #64748b;
  transition: color 0.15s;
}
.pago-opt span {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
}
.pago-opt:hover {
  border-color: #2563eb;
  background: #eff6ff;
}
.pago-opt:hover svg {
  color: #2563eb;
}
.pago-opt:hover span {
  color: #2563eb;
}
.pago-opt.selected {
  border-color: #2563eb;
  background: #eff6ff;
}
.pago-opt.selected svg {
  color: #2563eb;
}
.pago-opt.selected span {
  color: #2563eb;
  font-weight: 700;
}

.monto-box {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 4px;
}

.monto-box-header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  margin-bottom: 10px;
}

.monto-box-lbl {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.monto-box-ref {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
}

.monto-input-wrap {
  position: relative;
}
.monto-input-wrap .monto-prefix {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  pointer-events: none;
}
.monto-input-wrap input {
  width: 100%;
  padding: 9px 12px 9px 24px;
  border: 1.5px solid #e2e8f0;
  border-radius: 7px;
  font-size: 13px;
  color: #0f172a;
  background: white;
  outline: none;
  font-family: inherit;
  margin-bottom: 0;
  transition: all 0.15s ease;
}
.monto-input-wrap input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}
.monto-input-wrap input::placeholder {
  color: #94a3b8;
  font-size: 12px;
}

.monto-hint {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 6px;
}

#modal-paciente .modal-footer {
  padding: 14px 20px;
}
#modal-paciente .btn-guardar-sesion {
  margin: 0;
  padding: 12px 20px;
  font-size: 14px;
  height: 44px;
  min-height: unset;
}
#modal-paciente .btn-guardar-sesion svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.modal-content--nueva-sesion {
  max-width: 420px;
}

.nueva-sesion-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 20px 8px;
}

.ns-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ns-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.ns-label svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  color: #94a3b8;
}

.ns-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ns-info-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 11px;
  color: #2563eb;
  font-weight: 500;
  animation: modalFadeIn 0.2s ease;
}
.ns-info-badge svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  color: #2563eb;
}

#modal-nueva-sesion .modal-input,
#modal-nueva-sesion .modal-select {
  height: 42px;
  font-size: 14px;
  padding: 0 11px;
  background: white !important;
}
#modal-nueva-sesion .modal-select {
  background-color: white !important;
}
#modal-nueva-sesion .modal-footer {
  padding: 12px 20px 16px;
}

@media (max-width: 639px) {
  #modal-nueva-sesion {
    align-items: flex-end !important;
    padding: 0 !important;
    justify-content: flex-end !important;
  }
  #modal-nueva-sesion .modal-content--nueva-sesion {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    max-width: 100% !important;
    width: 100% !important;
    border-radius: 18px 18px 0 0;
    max-height: 85vh;
    max-height: 85dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 0 !important;
    box-shadow: 0 -8px 40px rgba(15, 23, 42, 0.2);
  }
  #modal-nueva-sesion .modal-header {
    padding: 14px 16px;
    border-radius: 18px 18px 0 0;
    flex-shrink: 0;
  }
  #modal-nueva-sesion .modal-header::before {
    content: "";
    display: block;
    width: 36px;
    height: 4px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 2px;
    margin: 0 auto 10px;
  }
  #modal-nueva-sesion .nueva-sesion-body {
    padding: 14px 16px 8px;
    gap: 12px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
  }
  #modal-nueva-sesion .modal-input,
  #modal-nueva-sesion .modal-select {
    height: 48px !important;
    font-size: 16px !important;
  }
  #modal-nueva-sesion .modal-footer {
    flex-shrink: 0;
    padding: 10px 16px 28px;
    border-top: 1px solid #e2e8f0;
    background: white;
  }
  #modal-nueva-sesion .btn-guardar-sesion,
  #modal-nueva-sesion .btn-modal {
    height: 48px;
    font-size: 15px;
  }
}
#modal-nombre:hover {
  color: var(--primary);
  text-decoration: underline;
}
#modal-nombre {
  transition: color 0.15s;
}

.nota-rapida-celda {
  min-width: 120px;
  max-width: 200px;
  vertical-align: middle;
}

.btn-nota-rapida {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 0.72rem;
  color: var(--text-muted);
  background: transparent;
  border: 1px dashed var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  white-space: nowrap;
}
.btn-nota-rapida:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-bg, #eff6ff);
}
.btn-nota-rapida--sm {
  font-size: 0.68rem;
  padding: 2px 6px;
}

.nota-rapida-preview {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  font-size: 0.75rem;
  color: var(--text-secondary, #374151);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
  line-height: 1.4;
}
.nota-rapida-preview span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nota-rapida-preview svg {
  color: var(--text-muted);
  flex-shrink: 0;
}
.nota-rapida-preview:hover {
  background: var(--bg-light, #f9fafb);
  border-color: var(--border-color);
}

.nota-historial {
  font-size: 0.75rem;
  color: var(--text-secondary, #374151);
  cursor: pointer;
  display: block;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nota-historial:hover {
  color: var(--primary);
  text-decoration: underline;
}

.nota-rapida-editor {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nota-rapida-textarea {
  width: 100%;
  min-width: 150px;
  padding: 6px 8px;
  font-size: 0.78rem;
  font-family: inherit;
  color: var(--text-main);
  background: var(--bg-light, #f9fafb);
  border: 1.5px solid var(--primary);
  border-radius: 6px;
  resize: vertical;
  outline: none;
  line-height: 1.4;
  box-sizing: border-box;
}
.nota-rapida-textarea:focus {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.nota-rapida-acciones {
  display: flex;
  gap: 5px;
}

.btn-nota-guardar,
.btn-nota-cancelar {
  flex: 1;
  padding: 4px 0;
  font-size: 0.72rem;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: opacity 0.15s;
}
.btn-nota-guardar:hover,
.btn-nota-cancelar:hover {
  opacity: 0.85;
}

.btn-nota-guardar {
  background: var(--primary);
  color: #fff;
}

.btn-nota-cancelar {
  background: var(--bg-light, #f3f4f6);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

#historial-body tr td:last-child,
#historial-body tr th:last-child {
  min-width: 100px;
}

.ajuste-tipo-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.88rem;
  transition: border-color 0.15s, background 0.15s;
}
.ajuste-tipo-opt input[type=radio] {
  accent-color: var(--primary);
  flex-shrink: 0;
}
.ajuste-tipo-opt:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-bg, #eff6ff);
}

.ajuste-check-custom {
  position: relative;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}
.ajuste-check-custom input[type=checkbox] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}
.ajuste-check-custom::before {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  border: 1.8px solid #cbd5e1;
  border-radius: 5px;
  background: white;
  transition: border-color 0.15s, background 0.15s;
}
.ajuste-check-custom::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 6px;
  width: 5px;
  height: 9px;
  border: 2px solid white;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
  opacity: 0;
  transition: opacity 0.1s;
}
input:checked ~ .ajuste-check-custom::before, .ajuste-check-custom:has(input:checked)::before {
  background: var(--primary, #2563eb);
  border-color: var(--primary, #2563eb);
}
input:checked ~ .ajuste-check-custom::after, .ajuste-check-custom:has(input:checked)::after {
  opacity: 1;
}

.ajuste-grupo-consultorio {
  border-bottom: 1px solid var(--border-color);
}
.ajuste-grupo-consultorio:last-child {
  border-bottom: none;
}

.ajuste-grupo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg-light, #f9fafb);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}
.ajuste-grupo-header:hover {
  background: #f0f4ff;
}

.ajuste-grupo-pacientes {
  padding: 4px 0;
}

.ajuste-paciente-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 28px;
  cursor: pointer;
  transition: background 0.12s;
  font-size: 0.875rem;
}
.ajuste-paciente-row:hover {
  background: #f8faff;
}
.ajuste-paciente-row:has(input:checked) {
  background: #eff6ff;
}
.ajuste-paciente-row:has(input:checked) .ajuste-pac-nombre {
  color: var(--primary, #2563eb);
  font-weight: 600;
}
.ajuste-paciente-row:has(input:checked) .ajuste-pac-valor {
  color: var(--primary, #2563eb);
}
.ajuste-paciente-row:not(:has(input:checked)) {
  opacity: 0.6;
}

.ajuste-pac-nombre {
  flex: 1;
  color: var(--text-main);
  transition: color 0.15s;
}

.ajuste-pac-valor {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition: color 0.15s;
}

.navbar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--primary);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 99px;
  margin-left: auto;
  line-height: 1;
}

.navbar-menu li[onclick*=pacientes] {
  display: flex;
  align-items: center;
  gap: 10px;
}
.navbar-menu li[onclick*=pacientes] span:first-of-type {
  flex: 1;
}

.buscador-shortcut-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 6px;
  padding: 0 2px;
}
.buscador-shortcut-hint kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 5px;
  background: var(--bg-light, #f1f5f9);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.7rem;
  font-family: monospace;
  color: var(--text-secondary, #374151);
  box-shadow: 0 1px 0 var(--border-color);
}

.navbar-search-hint {
  display: none;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.5);
}
.navbar-search-hint kbd {
  padding: 1px 5px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.7);
}
@media (min-width: 640px) {
  .navbar-search-hint {
    display: inline-flex;
  }
}

#spinner-carga-inicial {
  font-family: "Inter", sans-serif;
}

#banner-perfil-incompleto {
  animation: slideDown 0.25s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.estado-vacio {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 56px 20px;
  text-align: center;
}
.estado-vacio-icono {
  color: #94a3b8;
  margin-bottom: 16px;
}
.estado-vacio-titulo {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  margin: 0 0 6px;
}
.estado-vacio-subtitulo {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
  max-width: 320px;
}
.estado-vacio-accion {
  margin-top: 20px;
}

.onb-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 320px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  z-index: 900;
  overflow: hidden;
  animation: onbSlideIn 0.3s ease-out;
}
@media (max-width: 639px) {
  .onb-container {
    width: calc(100vw - 32px);
    bottom: 16px;
    right: 16px;
  }
}

@keyframes onbSlideIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.onb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
}

.onb-header-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.onb-titulo {
  font-size: 0.875rem;
  font-weight: 700;
  color: #0f172a;
}

.onb-progreso-txt {
  font-size: 0.75rem;
  color: #64748b;
}

.onb-cerrar {
  background: none;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.onb-cerrar:hover {
  background: #f1f5f9;
  color: #475569;
}

.onb-progress-bar {
  height: 3px;
  background: #e2e8f0;
}

.onb-progress-fill {
  height: 100%;
  background: #2563eb;
  border-radius: 0 2px 2px 0;
  transition: width 0.4s ease;
}

.onb-items {
  padding: 8px 0;
  max-height: 320px;
  overflow-y: auto;
}

.onb-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 16px;
  transition: background 0.15s;
}
.onb-item:hover {
  background: #f8fafc;
}
.onb-item.onb-item--done {
  opacity: 0.55;
}
.onb-item.onb-item--done .onb-item-check svg {
  stroke: #22c55e;
}

.onb-item-check {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 1px;
}
.onb-item-check svg {
  width: 20px;
  height: 20px;
  stroke: #cbd5e1;
}

.onb-item-body {
  flex: 1;
  min-width: 0;
}

.onb-item-titulo {
  font-size: 0.825rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.3;
}

.onb-item-desc {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 2px;
  line-height: 1.4;
}

.onb-btn {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
  font-family: inherit;
}
.onb-btn:hover {
  background: #dbeafe;
  border-color: #93c5fd;
}

.onb-completado {
  padding: 12px 16px;
  font-size: 0.825rem;
  font-weight: 600;
  color: #166534;
  background: #f0fdf4;
  border-top: 1px solid #bbf7d0;
  text-align: center;
}

#onb-tour-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 950;
  animation: onbSlideIn 0.25s ease-out;
}
@media (max-width: 639px) {
  #onb-tour-toast {
    width: calc(100vw - 32px);
    left: 16px;
    transform: none;
  }
}

.onb-tour-toast {
  background: #0f172a;
  color: #f8fafc;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 0.875rem;
  line-height: 1.5;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 300px;
  max-width: 420px;
}
.onb-tour-toast strong {
  color: #fff;
}

.onb-tour-btns {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.onb-tour-btns button {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  font-family: inherit;
  transition: background 0.15s;
}
.onb-tour-btns button:hover {
  background: rgba(255, 255, 255, 0.18);
}

.onb-tour-btn-primary {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #fff !important;
}
.onb-tour-btn-primary:hover {
  background: #1d4ed8 !important;
}

.am-vista-toggle {
  display: flex;
  gap: 2px;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 3px;
  margin-left: auto;
}

.am-vista-btn {
  padding: 4px 12px;
  border: none;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
}
.am-vista-btn--active {
  background: white;
  color: #2563eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.am-cal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-top: 1px solid #f1f5f9;
}

.agenda-movil--semana {
  display: flex;
  flex-direction: column;
}

.am-sem-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 8px;
}

.am-sem-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  padding: 0 4px 16px;
  overflow-x: auto;
}

.am-sem-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  border-radius: 8px;
  padding: 6px 2px;
  transition: background 0.15s;
  min-width: 40px;
}
.am-sem-col:active {
  background: #f1f5f9;
}
.am-sem-col--hoy .am-sem-dia-num {
  background: #2563eb;
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.am-sem-col--sel {
  background: #eff6ff;
}

.am-sem-col-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.am-sem-dia-nombre {
  font-size: 0.65rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
}

.am-sem-dia-num {
  font-size: 0.82rem;
  font-weight: 600;
  color: #1e293b;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.am-sem-dia-num--hoy {
  background: #2563eb;
  color: white;
  border-radius: 50%;
}

.am-sem-col-sesiones {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  align-items: center;
}

.am-sem-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: white;
  border-radius: 6px;
  padding: 4px 2px;
  width: 100%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: transform 0.1s;
}
.am-sem-card:active {
  transform: scale(0.96);
}

.am-sem-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #2563eb;
  color: white;
  font-size: 0.55rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.am-sem-hora {
  font-size: 0.58rem;
  color: #64748b;
  font-weight: 500;
}

.am-sem-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.am-sem-vacio {
  height: 8px;
}

#pantalla-login,
#pantalla-registro {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  overflow-y: auto;
  box-sizing: border-box;
}

@media (max-height: 700px) {
  #pantalla-login .modal-content,
  #pantalla-registro .modal-content {
    padding: 24px 28px !important;
  }
  .login-header {
    margin-bottom: 16px !important;
  }
  #pantalla-login .opcion-grupo,
  #pantalla-registro .opcion-grupo {
    margin-bottom: 10px !important;
  }
  #pantalla-login .btn-guardar-sesion {
    margin: 14px 0 10px !important;
    height: 44px !important;
  }
  .login-divisor {
    margin: 12px 0 !important;
  }
}
#pantalla-login .modal-content,
#pantalla-registro .modal-content {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 40px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  position: relative;
  animation: modalSlideIn 0.25s ease-out;
  flex-shrink: 0;
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}
.login-logo svg {
  width: 26px;
  height: 26px;
  color: white;
}

.login-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}
.login-title span {
  color: #2563eb;
}

.login-subtitle {
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.5;
}

#pantalla-registro .login-logo {
  background: #7c3aed;
}
#pantalla-registro .login-title span {
  color: #7c3aed;
}

#pantalla-login .opcion-grupo,
#pantalla-registro .opcion-grupo {
  margin-bottom: 18px;
  position: relative;
}
#pantalla-login .opcion-grupo label,
#pantalla-registro .opcion-grupo label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
  background: none;
  padding: 0;
  border: none;
  border-radius: 0;
  height: auto;
  min-height: auto;
  cursor: default;
}
#pantalla-login .opcion-grupo label svg,
#pantalla-registro .opcion-grupo label svg {
  width: 14px;
  height: 14px;
  color: #94a3b8;
}
#pantalla-login .opcion-grupo input,
#pantalla-registro .opcion-grupo input {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 15px;
  color: #0f172a;
  transition: all 0.15s ease;
  width: 100%;
  outline: none;
  height: 48px;
  margin-bottom: 0;
  box-sizing: border-box;
}
#pantalla-login .opcion-grupo input::placeholder,
#pantalla-registro .opcion-grupo input::placeholder {
  color: #94a3b8;
}
#pantalla-login .opcion-grupo input:focus,
#pantalla-registro .opcion-grupo input:focus {
  border-color: #2563eb;
  background: white;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

#pantalla-login .btn-guardar-sesion {
  background: #2563eb;
  color: white;
  border: none;
  padding: 14px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  margin: 24px 0 14px;
  width: 100%;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  font-family: inherit;
}
#pantalla-login .btn-guardar-sesion:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

#pantalla-registro .btn-guardar-sesion {
  background: #7c3aed;
  color: white;
  border: none;
  padding: 14px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  margin: 24px 0 14px;
  width: 100%;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  font-family: inherit;
}
#pantalla-registro .btn-guardar-sesion:hover {
  background: #6d28d9;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.25);
}

.login-divisor {
  border: none;
  height: 1px;
  background: #e2e8f0;
  margin: 20px 0;
  position: relative;
}
.login-divisor::before {
  content: "¿Nuevo aquí?";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 0 14px;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

@media (max-width: 480px) {
  #pantalla-login .modal-content,
  #pantalla-registro .modal-content {
    padding: 28px 20px;
    border-radius: 14px;
  }
  .login-logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }
  .login-logo svg {
    width: 22px;
    height: 22px;
  }
  .login-title {
    font-size: 1.3rem;
  }
  .login-subtitle {
    font-size: 0.85rem;
  }
}
@media (min-width: 481px) and (max-width: 639px) {
  #pantalla-login .modal-content,
  #pantalla-registro .modal-content {
    padding: 36px 30px;
  }
}
#pantalla-login,
#pantalla-registro {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  margin: 0 !important;
}

#formulario-registro .card-registro input,
#formulario-registro .card-registro select,
#formulario-registro .card-registro textarea {
  margin-bottom: 0;
}
#formulario-registro .card-registro textarea {
  min-height: 90px;
}
#formulario-registro .btn-guardar {
  background: #16a34a;
  color: white;
  margin-top: 8px;
}
#formulario-registro .btn-guardar:hover {
  background: #15803d;
}
#formulario-registro .btn-guardar::before {
  content: "";
}

.pacientes-toolbar {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.pacientes-toolbar .search-box {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  background: white;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 14px;
  flex: 1;
  min-width: 200px;
  transition: all 0.15s ease;
}
.pacientes-toolbar .search-box svg {
  width: 15px;
  height: 15px;
  color: #94a3b8;
  flex-shrink: 0;
}
.pacientes-toolbar .search-box input {
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
  color: #0f172a;
  width: 100%;
  outline: none;
  box-shadow: none;
}
.pacientes-toolbar .search-box input::placeholder {
  color: #94a3b8;
}
.pacientes-toolbar .search-box:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.pacientes-filtros {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  width: 100%;
}

.pacientes-buscador {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 9px 14px;
  width: 100%;
  box-sizing: border-box;
  transition: all 0.15s ease;
}
.pacientes-buscador:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}
.pacientes-buscador-icon {
  width: 15px;
  height: 15px;
  color: #94a3b8;
  flex-shrink: 0;
}
.pacientes-buscador input {
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
  color: #0f172a;
  width: 100%;
  outline: none;
}
.pacientes-buscador input::placeholder {
  color: #94a3b8;
}

.pacientes-filtros-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filtro-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 99px;
  border: 1.5px solid #e2e8f0;
  background: white;
  font-size: 0.78rem;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.filtro-chip:hover {
  border-color: #2563eb;
  color: #2563eb;
}
.filtro-chip--active {
  background: #2563eb;
  border-color: #2563eb;
  color: white;
}
.filtro-chip--active .filtro-dot {
  background: white !important;
}

.filtro-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.filtro-dot--success {
  background: #16a34a;
}
.filtro-dot--warning {
  background: #d97706;
}

#pacientes-paginacion {
  margin-top: 12px;
}

.pag-container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
}

.pag-info {
  font-size: 0.8rem;
  color: #64748b;
  margin-right: auto;
}

.pag-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1.5px solid #e2e8f0;
  border-radius: 6px;
  background: white;
  font-size: 0.82rem;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.pag-btn:hover:not(:disabled) {
  border-color: #2563eb;
  color: #2563eb;
  background: #eff6ff;
}
.pag-btn--active {
  background: #2563eb;
  border-color: #2563eb;
  color: white;
  font-weight: 600;
}
.pag-btn--disabled {
  opacity: 0.4;
  cursor: default;
}

.pag-dots {
  font-size: 0.82rem;
  color: #64748b;
  padding: 0 2px;
}

input,
select,
textarea {
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
  color: #0f172a;
  background: white;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}
input::placeholder,
select::placeholder,
textarea::placeholder {
  color: #64748b;
}

textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
  height: auto;
}

select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  padding-right: 36px;
  cursor: pointer;
}

input[type=number] {
  -moz-appearance: textfield;
}
input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 6px;
}

.password-wrapper {
  position: relative;
  width: 100%;
}
.password-wrapper input {
  padding-right: 44px;
  margin-bottom: 0;
}
.password-wrapper .toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 1.2rem;
  user-select: none;
  z-index: 2;
  color: #64748b;
  transition: color 0.2s;
  line-height: 1;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
}
.password-wrapper .toggle-password svg {
  width: 18px;
  height: 18px;
}
.password-wrapper .toggle-password:hover {
  color: #2563eb;
}

.grid-form {
  display: block;
  width: 100%;
}
@media (min-width: 641px) {
  .grid-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}
@media (min-width: 769px) {
  .grid-form {
    grid-template-columns: repeat(3, 1fr);
  }
}

.full-width {
  width: 100%;
}
@media (min-width: 641px) {
  .full-width {
    grid-column: span 2;
  }
}
@media (min-width: 769px) {
  .full-width {
    grid-column: span 3;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 5px;
}
.form-group input,
.form-group select,
.form-group textarea {
  margin-bottom: 0;
}

.field-error {
  font-size: 0.8rem;
  color: #dc2626;
  margin-top: 4px;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
}
.field-error svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.opcion-grupo {
  margin-bottom: 20px;
}
.opcion-grupo > p,
.opcion-grupo > strong {
  font-weight: 600;
  margin-bottom: 10px;
  color: #0f172a;
  font-size: 0.95rem;
  display: block;
}

svg:not([width]):not([height]):not(.fc-icon) {
  max-width: 100%;
  height: auto;
}

#vista-inicio {
  overflow: hidden;
}

#vista-agenda .header-seccion {
  margin-bottom: 16px;
}
#vista-agenda #calendar {
  margin-top: 0;
}

@media (max-width: 767px) {
  #vista-agenda .header-seccion {
    padding: 0 4px;
    margin-bottom: 12px;
  }
  .fc-header-toolbar {
    flex-wrap: wrap !important;
    gap: 6px !important;
    padding: 8px 10px !important;
    margin-bottom: 0 !important;
  }
  .fc-header-toolbar .fc-toolbar-chunk {
    display: flex;
    align-items: center;
    gap: 4px;
  }
  .fc-header-toolbar .fc-toolbar-title {
    font-size: 0.95rem !important;
    font-weight: 600;
  }
  .fc-header-toolbar .fc-button {
    padding: 5px 10px !important;
    font-size: 0.78rem !important;
    border-radius: 6px !important;
  }
  .fc-header-toolbar .fc-button-group .fc-button {
    padding: 5px 10px !important;
    font-size: 0.76rem !important;
    font-weight: 600;
  }
  .fc-header-toolbar .fc-button-active {
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2) !important;
  }
  .fc-list-event {
    cursor: pointer;
  }
  .fc-list-event td {
    padding: 10px 12px !important;
    font-size: 0.88rem !important;
  }
  .fc-list-event:active {
    background: rgba(37, 99, 235, 0.06) !important;
  }
  .fc-list-day-cushion {
    padding: 6px 12px !important;
    font-size: 0.78rem !important;
    background: #f1f5f9 !important;
    color: #475569 !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }
  .fc-list-event-dot {
    border-width: 6px !important;
    margin-right: 8px !important;
  }
  .fc-list-event-title {
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    color: #0f172a !important;
  }
  .fc-list-event-time {
    font-size: 0.8rem !important;
    color: #64748b !important;
    min-width: 48px;
    white-space: nowrap;
  }
  .fc-list-empty {
    padding: 48px 16px !important;
    font-size: 0.9rem;
    color: #64748b;
    text-align: center;
  }
  .fc-list-empty-cushion {
    margin: 0 !important;
  }
  .fc-daygrid-day {
    min-height: 44px !important;
  }
  .fc-daygrid-day-number {
    font-size: 0.78rem !important;
    padding: 2px 4px !important;
  }
  .fc-daygrid-event {
    font-size: 0.7rem !important;
    padding: 1px 3px !important;
    border-radius: 3px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .fc-col-header-cell-cushion {
    font-size: 0.72rem !important;
    padding: 4px 2px !important;
  }
  .fc-event-mobile {
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 100%;
  }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .fc-header-toolbar .fc-toolbar-title {
    font-size: 1.1rem !important;
  }
  .fc-header-toolbar .fc-button {
    padding: 6px 12px !important;
    font-size: 0.82rem !important;
  }
  .fc-daygrid-event {
    font-size: 0.78rem !important;
  }
}
.agenda-movil {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.am-cal {
  background: white;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  margin-bottom: 12px;
}

.am-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid #e2e8f0;
}

.am-cal-titulo {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  text-transform: capitalize;
}

.am-nav-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  touch-action: manipulation;
}
.am-nav-btn svg {
  width: 14px;
  height: 14px;
  color: #64748b;
}
.am-nav-btn:active {
  background: #e2e8f0;
}

.am-cal-dias-semana {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 8px 8px 4px;
}

.am-dia-semana {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 0;
}

.am-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  padding: 4px 8px 8px;
}

.am-dia {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 8px;
  cursor: pointer;
  position: relative;
  gap: 2px;
  transition: background 0.12s ease;
  touch-action: manipulation;
}
.am-dia:active {
  background: #f1f5f9;
}
.am-dia--vacio {
  cursor: default;
}
.am-dia--vacio:active {
  background: transparent;
}
.am-dia--hoy .am-dia-num {
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
  font-weight: 700;
}
.am-dia--sel .am-dia-num {
  background: #2563eb;
  color: white;
  font-weight: 700;
}
.am-dia--hoy.am-dia--sel .am-dia-num {
  background: #2563eb;
  color: white;
}

.am-dia-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  color: #0f172a;
  line-height: 1;
}

.am-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}
.am-dot--success {
  background: #16a34a;
}
.am-dot--warning {
  background: #d97706;
}

.am-cal-footer {
  padding: 6px 16px 12px;
  display: flex;
  justify-content: center;
}

.am-hoy-btn {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
  touch-action: manipulation;
}
.am-hoy-btn:active {
  background: #e2e8f0;
  color: #0f172a;
}

.am-panel {
  background: white;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.am-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
}

.am-panel-fecha {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  text-transform: capitalize;
}

.am-panel-btn-nueva {
  padding: 5px 10px;
  font-size: 12px;
  gap: 4px;
  flex-shrink: 0;
}

.am-panel-lista {
  padding: 8px 0;
  min-height: 80px;
}

.am-sesion-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.12s ease;
  touch-action: manipulation;
}
.am-sesion-card:active {
  background: #f8fafc;
}
.am-sesion-card + .am-sesion-card {
  border-top: 1px solid #f1f5f9;
}

.am-sesion-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #2563eb;
  flex-shrink: 0;
}

.am-sesion-info {
  flex: 1;
  min-width: 0;
}

.am-sesion-nombre {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.am-sesion-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
}

.am-sesion-hora {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

.am-sesion-estado {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
}
.am-sesion-estado--ok {
  background: #f0fdf4;
  color: #15803d;
}
.am-sesion-estado--debe {
  background: #fffbeb;
  color: #b45309;
}
.am-sesion-estado--pendiente {
  background: #f1f5f9;
  color: #64748b;
}
.am-sesion-estado--aviso {
  background: #fffbeb;
  color: #b45309;
}
.am-sesion-estado--falta {
  background: #fef2f2;
  color: #b91c1c;
}

.am-sesion-arrow {
  width: 16px;
  height: 16px;
  color: #94a3b8;
  flex-shrink: 0;
}

.am-sin-sesiones {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 28px 16px;
  color: #94a3b8;
  font-size: 13px;
}
.am-sin-sesiones svg {
  width: 28px;
  height: 28px;
  opacity: 0.4;
}

.am-sesion-card--pendiente {
  border-left: 3px solid #cbd5e1;
}

.am-acciones-rapidas {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  align-items: center;
}

.am-btn-rapido {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease;
  touch-action: manipulation;
  flex-shrink: 0;
}
.am-btn-rapido svg {
  width: 14px;
  height: 14px;
}
.am-btn-rapido:active {
  transform: scale(0.88);
  opacity: 0.8;
}
.am-btn-rapido--ok {
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
}
.am-btn-rapido--ok svg {
  color: #16a34a;
}
.am-btn-rapido--ok:active {
  background: #bbf7d0;
}
.am-btn-rapido--debe {
  background: #fffbeb;
  border: 1.5px solid #fde68a;
}
.am-btn-rapido--debe svg {
  color: #d97706;
}
.am-btn-rapido--debe:active {
  background: #fde68a;
}
.am-btn-rapido--falta {
  background: #fef2f2;
  border: 1.5px solid #fecaca;
}
.am-btn-rapido--falta svg {
  color: #dc2626;
}
.am-btn-rapido--falta:active {
  background: #fecaca;
}

.dash-metricas-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
@media (min-width: 640px) {
  .dash-metricas-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.dash-metrica-card {
  background: white;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 3px solid transparent;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: all 0.15s ease;
}
.dash-metrica-card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}
.dash-metrica-card--primary {
  border-top-color: #2563eb;
}
.dash-metrica-card--success {
  border-top-color: #16a34a;
}
.dash-metrica-card--danger {
  border-top-color: #dc2626;
}
.dash-metrica-card--neutral {
  border-top-color: #cbd5e1;
}

.dash-metrica-icono {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #f8fafc;
}
.dash-metrica-icono svg {
  width: 16px;
  height: 16px;
  color: #64748b;
}
.dash-metrica--primary .dash-metrica-icono {
  background: #eff6ff;
}
.dash-metrica--primary .dash-metrica-icono svg {
  color: #2563eb;
}
.dash-metrica--success .dash-metrica-icono {
  background: #f0fdf4;
}
.dash-metrica--success .dash-metrica-icono svg {
  color: #16a34a;
}
.dash-metrica--danger .dash-metrica-icono {
  background: #fef2f2;
}
.dash-metrica--danger .dash-metrica-icono svg {
  color: #dc2626;
}

.dash-metrica-val {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1;
}

.dash-metrica-lbl {
  font-size: 11px;
  color: #64748b;
  margin-top: 3px;
  line-height: 1.3;
}

.dash-alerta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 8px;
  transition: all 0.15s ease;
}
.dash-alerta--danger {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.dash-alerta--danger:hover {
  background: #fecaca;
}
.dash-alerta--warning {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}
.dash-alerta--warning:hover {
  background: #fde68a;
}

.dash-proxima-card {
  background: white;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
}

.dash-proxima-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
}

.dash-proxima-label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dash-proxima-tiempo {
  font-size: 12px;
  font-weight: 700;
  color: white;
  background: rgba(255, 255, 255, 0.15);
  padding: 3px 10px;
  border-radius: 20px;
}

.dash-proxima-body {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}

.dash-proxima-avatar {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: #2563eb;
  flex-shrink: 0;
}

.dash-proxima-nombre {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.dash-proxima-detalle {
  font-size: 12px;
  color: #64748b;
  margin-top: 3px;
}

.dash-proxima-info {
  flex: 1;
  min-width: 0;
}

.toast-deshacer {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: white;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  z-index: 1100;
  min-width: 280px;
  max-width: 90vw;
  animation: toastSlideUp 0.25s ease;
  overflow: hidden;
}
@media (max-width: 639px) {
  .toast-deshacer {
    bottom: 32px;
    min-width: min(340px, 90vw);
  }
}

@keyframes toastSlideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}
.toast-deshacer-texto {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}
.toast-deshacer-texto svg {
  width: 16px;
  height: 16px;
  color: rgba(255, 255, 255, 0.6);
  flex-shrink: 0;
}

.toast-deshacer-btn {
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 7px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  flex-shrink: 0;
  touch-action: manipulation;
}
.toast-deshacer-btn:hover {
  background: #1d4ed8;
}
.toast-deshacer-btn:active {
  transform: scale(0.95);
}

.toast-deshacer-barra {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: rgba(37, 99, 235, 0.6);
  border-radius: 0 0 12px 12px;
}

#vista-consultorios .table-container th {
  z-index: 2;
  border-bottom: 2px solid #e2e8f0;
}
#vista-consultorios .acciones-buttons {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
}
@media (min-width: 641px) {
  #vista-consultorios .acciones-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  #vista-consultorios .acciones-buttons .btn-accion {
    width: 100%;
    justify-content: center;
  }
}
#vista-config {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
#vista-config .config-card, #vista-config .config-card-full {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
#vista-config .config-card-full {
  width: 100%;
}
#vista-config .config-grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 768px) {
  #vista-config .config-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 640px) and (max-width: 767px) {
  #vista-config .config-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}
#vista-config .config-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}
#vista-config .config-card-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 3px;
  line-height: 1.3;
}
#vista-config .config-card-desc {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
}
#vista-config .config-card-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
#vista-config .config-card-icon svg {
  color: #2563eb;
}
#vista-config .config-card-icon--warning {
  background: rgba(217, 119, 6, 0.12);
}
#vista-config .config-card-icon--warning svg {
  color: #d97706;
}
#vista-config .config-card-icon--success {
  background: rgba(22, 163, 74, 0.12);
}
#vista-config .config-card-icon--success svg {
  color: #16a34a;
}
#vista-config .config-card-icon--danger {
  background: rgba(220, 38, 38, 0.12);
}
#vista-config .config-card-icon--danger svg {
  color: #dc2626;
}
#vista-config .config-grid-4 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}
@media (min-width: 1024px) {
  #vista-config .config-grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 639px) {
  #vista-config .config-grid-4 {
    grid-template-columns: 1fr;
  }
}
#vista-config .btn-warning {
  background-color: #d97706;
  color: white;
}
#vista-config .btn-warning:hover {
  background-color: #b45309;
  transform: translateY(-1px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}
#vista-config .btn-dark {
  background-color: #0f172a;
  color: white;
}
#vista-config .btn-dark:hover {
  background-color: rgb(28.4210526316, 43.5789473684, 79.5789473684);
  transform: translateY(-1px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}
#vista-config .vacaciones-lista {
  margin-top: 12px;
}
#vista-config .vacaciones-lista .vacacion-item {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: #0f172a;
  gap: 10px;
}
#vista-config .vacaciones-lista .vacacion-item:last-child {
  margin-bottom: 0;
}
#vista-config .vacaciones-lista .vacacion-item .vacacion-fechas {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  color: #475569;
  font-size: 0.85rem;
  flex: 1;
}
#vista-config .vacaciones-lista .vacacion-item .vacacion-fechas svg {
  width: 14px;
  height: 14px;
  color: #94a3b8;
  flex-shrink: 0;
}
#vista-config .plantillas-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 12px;
}
@media (min-width: 640px) {
  #vista-config .plantillas-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
#vista-config .plantilla-item {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 6px;
}
#vista-config .plantilla-item label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
#vista-config .plantilla-item textarea {
  min-height: 90px;
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 0;
}
#vista-config .config-card-full,
#vista-config .config-grid-3 {
  margin-bottom: 8px;
}
#vista-config .config-card-full,
#vista-config .config-card {
  padding: 28px 28px;
}
#vista-config .config-card-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
}
@media (max-width: 639px) {
  #vista-config .config-card-full,
  #vista-config .config-card {
    padding: 16px 18px;
  }
  #vista-config .config-card-header {
    margin-bottom: 12px;
  }
}

.fc {
  font-size: 0.9rem;
}
.fc .fc-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
}
.fc .fc-toolbar-chunk {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.fc .fc-toolbar-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
}
.fc .fc-button {
  padding: 10px 14px;
  font-size: 0.9rem;
  border-radius: 8px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  transition: all 0.2s ease;
  font-weight: 500;
}
.fc .fc-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}
.fc .fc-button-primary {
  background-color: #2563eb;
  border-color: #2563eb;
  color: white;
}
.fc .fc-button-primary:hover {
  background-color: #1d4ed8;
  border-color: #1d4ed8;
}
.fc .fc-button-primary:disabled {
  background-color: #e2e8f0;
  border-color: #e2e8f0;
  opacity: 0.6;
  pointer-events: none;
}
@media (max-width: 768px) {
  .fc .fc-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .fc .fc-toolbar-chunk {
    justify-content: center;
    width: 100%;
  }
  .fc .fc-toolbar-chunk:only-child {
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
  }
  .fc .fc-toolbar-title {
    order: -1;
    width: 100%;
    text-align: center;
    margin-bottom: 5px;
  }
  .fc .fc-button {
    flex: 1 1 auto;
    min-width: 70px;
    max-width: 120px;
  }
}
@media (min-width: 769px) {
  .fc .fc-toolbar {
    flex-direction: row;
    flex-wrap: nowrap;
  }
  .fc .fc-toolbar-chunk {
    flex: 0 1 auto;
    width: auto;
  }
  .fc .fc-toolbar-title {
    order: 0;
    width: auto;
    margin: 0;
    font-size: 1.3rem;
  }
  .fc .fc-button {
    flex: none;
    min-width: 80px;
  }
}
.fc .fc-daygrid-day-number,
.fc .fc-col-header-cell-cushion {
  padding: 8px 4px;
  font-size: 0.85rem;
  color: #0f172a;
  text-decoration: none;
  font-weight: 500;
}
.fc .fc-daygrid-day-frame {
  min-height: 80px;
}
.fc .fc-day-other .fc-daygrid-day-frame {
  background-color: #f8fafc;
}
.fc .fc-day-today {
  background-color: rgba(37, 99, 235, 0.1) !important;
}
.fc .fc-daygrid-event {
  font-size: 0.8rem;
  padding: 4px 6px;
  margin: 2px;
  border-radius: 6px;
  min-height: 28px;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.fc .fc-daygrid-event:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  z-index: 10;
}
.fc .fc-daygrid-event-dot {
  display: none;
}
.fc .fc-event-time {
  font-size: 0.75rem;
  margin-right: 4px;
  font-weight: 600;
}
.fc .fc-event-title {
  font-weight: 500;
}
.fc .fc-timegrid-slot {
  height: 50px !important;
}
.fc .fc-timegrid-event {
  font-size: 0.8rem;
  padding: 6px;
  border-radius: 6px;
}

#calendar {
  margin-top: 20px;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 639px) {
  #calendar {
    display: none;
  }
}
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.small {
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.5;
  margin: 8px 0;
}

.text-muted,
.muted {
  color: #64748b;
}

.text-hint {
  color: #94a3b8;
}

.text-secondary {
  color: #475569;
}

.text-success {
  color: #16a34a;
  font-weight: 600;
}

.text-danger {
  color: #dc2626;
  font-weight: 600;
}

.text-warning {
  color: #d97706;
  font-weight: 600;
}

.full-width {
  width: 100%;
}

.link-primary {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}
.link-primary:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.link-muted {
  color: #64748b;
  text-decoration: none;
  cursor: pointer;
}
.link-muted:hover {
  color: #2563eb;
}

.divisor {
  border: none;
  height: 1px;
  background: #e2e8f0;
  margin: 20px 0;
}

.truncate {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.badge-activo {
  background: #f0fdf4;
  color: #15803d;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.badge-pausado {
  background: #fffbeb;
  color: #92400e;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.badge-alta {
  background: #f8fafc;
  color: #64748b;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/*# sourceMappingURL=styles.css.map */
