/* ==========================================================================
   CSS DEL PORTAL ADMINISTRATIVO PREMIUM - LIGHT CORPORATIVE THEME
   Clínica Dr. Daniel Camelo
   Diseño: Glassmorphism / Clean Clinical Soft Theme
   ========================================================================== */

:root {
  --bg-primary: #F4F6F9;       /* Soft cool-grey/blue clinical background */
  --bg-secondary: #FFFFFF;     /* Pure white for containers */
  --bg-light: #F8FAFD;         /* Very light blue-grey for card backgrounds */
  --white: #FFFFFF;            /* Pure white */
  --dark: #1C2A38;             /* Deep charcoal for headings */
  --text-main: #1C2A38;        /* Deep charcoal-blue for maximum readability */
  --text-muted: #6C7D93;       /* Slate-grey for descriptions and labels */
  --primary: #5E7AA1;          /* Soft slate blue matching patient site */
  --secondary: #0F4A78;        /* Premium corporate deep clinical blue */
  --accent: #C9D2DD;           /* Soft blue-grey border/accent */
  --accent-light: #EBF0F5;     /* Very light slate blue for highlights */
  --success: #10B981;          /* Healthy clinical green */
  --warning: #F59E0B;          /* Amber alert */
  --danger: #EF4444;           /* Soft clinical red */
  
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(15, 74, 120, 0.08);
  --glass-hover: rgba(94, 122, 161, 0.08);
  --transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
  --glow: 0 10px 30px rgba(15, 74, 120, 0.04);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
}

html, body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, strong {
  font-weight: 700;
  color: var(--secondary);
}

/* ==========================================
   BACKGROUNDS & DECORATIVE ORBS
   ========================================== */
.dashboard-bg {
  position: fixed;
  inset: 0;
  z-index: -10;
  overflow: hidden;
  background: radial-gradient(circle at 50% 50%, #F4F6F9 0%, #E9EDF3 100%);
  pointer-events: none;
}

.dash-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.25;
  will-change: transform;
}

.dash-orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(94, 122, 161, 0.35) 0%, rgba(94, 122, 161, 0) 70%);
  top: -10%;
  left: -15%;
  animation: floatOrb 20s ease-in-out infinite alternate;
}

.dash-orb-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(15, 74, 120, 0.2) 0%, rgba(15, 74, 120, 0) 70%);
  bottom: -15%;
  right: -10%;
  animation: floatOrb 25s ease-in-out infinite alternate-reverse;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(50px, 30px) scale(1.08); }
}

/* ==========================================
   AUTH PORTAL (LOGIN SCREEN - MATCHING SCREENSHOT)
   ========================================== */
.auth-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  width: 100%;
  padding: 2rem;
  background: linear-gradient(135deg, #EEF1F6 0%, #D8E1EB 100%);
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow-y: auto;
}

.auth-wrapper .bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.2;
  z-index: 1;
  pointer-events: none;
  width: 350px;
  height: 350px;
  background: var(--primary);
  animation: authOrbFloat 12s ease-in-out infinite;
}

.auth-wrapper .orb-1 {
  top: 10%;
  left: 10%;
}

.auth-wrapper .orb-2 {
  bottom: 10%;
  right: 10%;
  animation-delay: -6s;
}

@keyframes authOrbFloat {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(25px, -25px); }
}

.auth-card {
  background: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.8);
  padding: 3.5rem 3rem;
  border-radius: 32px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 50px rgba(15, 74, 120, 0.08), 0 0 30px rgba(94, 122, 161, 0.05);
  text-align: center;
  z-index: 10;
  position: relative;
  animation: authSlideUp 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes authSlideUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-logo {
  height: 48px;
  max-height: 48px;
  margin-bottom: 2rem;
  object-fit: contain;
}

.auth-header h2 {
  font-size: 1.8rem;
  margin-bottom: 0.6rem;
  color: var(--secondary);
  font-weight: 700;
  letter-spacing: -0.5px;
}

.auth-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2.5rem;
}

.auth-card .input-group {
  margin-bottom: 1.8rem;
  text-align: left;
}

.auth-card .input-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.6rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--secondary);
}

.auth-card .input-group label i {
  color: var(--primary);
  font-size: 0.95rem;
}

.auth-card .input-group input {
  width: 100%;
  padding: 1rem 1.25rem;
  border-radius: 16px;
  border: 1px solid rgba(15, 74, 120, 0.08);
  background: #EEF2F6;
  color: var(--text-main);
  font-size: 1rem;
  transition: var(--transition);
  outline: none;
  font-family: inherit;
  font-weight: 400;
}

.auth-card .input-group input::placeholder {
  color: #94a3b8;
}

.auth-card .input-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(94, 122, 161, 0.15);
  background: #FFFFFF;
}

.auth-card .btn-login-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  outline: none;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  color: #FFFFFF;
  box-shadow: 0 8px 25px rgba(15, 74, 120, 0.2);
  width: 100%;
  font-family: inherit;
}

.auth-card .btn-login-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(15, 74, 120, 0.3);
}

.auth-card .auth-error-msg {
  color: var(--danger);
  font-size: 0.9rem;
  margin-bottom: 1.2rem;
  text-align: left;
  font-weight: 600;
}

/* ==========================================
   FORM CONTROLS & DASHBOARD INPUTS
   ========================================== */
.form-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 0.9rem 1.2rem;
  background: #FFFFFF;
  border: 1px solid rgba(15, 74, 120, 0.12);
  border-radius: 12px;
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
  font-family: inherit;
  font-weight: 400;
}

.form-group input::placeholder, .form-group textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: var(--primary);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(94, 122, 161, 0.12);
}

.btn-dash {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.85rem 1.8rem;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-size: 0.95rem;
  font-family: inherit;
}

.btn-dash-primary {
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  color: #FFFFFF;
  box-shadow: 0 4px 15px rgba(15, 74, 120, 0.15);
}

.btn-dash-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(15, 74, 120, 0.28);
}

.btn-dash-outline {
  background: transparent;
  border: 1px solid rgba(15, 74, 120, 0.15);
  color: var(--secondary);
}

.btn-dash-outline:hover {
  background: var(--accent-light);
  border-color: var(--primary);
}

/* ==========================================
   DASHBOARD CORE LAYOUT (PREMIUM SIDEBAR)
   ========================================== */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

/* --- COLLAPSIBLE HOVER SIDEBAR ON DESKTOP --- */
.sidebar {
  width: 280px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-right: 1px solid rgba(15, 74, 120, 0.08);
  display: flex;
  flex-direction: column;
  padding: 2.5rem 1.5rem 1.5rem;
  position: fixed;
  height: 100vh;
  z-index: 100;
  box-shadow: 4px 0 25px rgba(15, 74, 120, 0.02);
  transition: var(--transition);
}

.sidebar-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 3rem;
  border-bottom: 1px solid rgba(15, 74, 120, 0.06);
  padding-bottom: 1.5rem;
  transition: var(--transition);
}

.sidebar-logo {
  max-height: 42px;
  object-fit: contain;
  transition: var(--transition);
}

.sidebar-logo-mini {
  display: none !important;
}

.sidebar-logo-full {
  display: block !important;
}

.badge-role {
  font-size: 0.72rem;
  padding: 4px 10px;
  background: var(--accent-light);
  color: var(--secondary);
  border: 1px solid rgba(15, 74, 120, 0.12);
  border-radius: 50px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: var(--transition);
}

.badge-category {
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 50px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: var(--transition);
  display: inline-block;
}

.badge-category.nutricion {
  background: rgba(16, 185, 129, 0.1);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-category.estetica {
  background: rgba(147, 51, 234, 0.1);
  color: #9333ea;
  border: 1px solid rgba(147, 51, 234, 0.2);
}

.badge-category.corporal {
  background: rgba(6, 182, 212, 0.1);
  color: #06b6d4;
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.sidebar-nav {
  flex: 1;
}

.sidebar-nav ul {
  list-style: none;
}

.sidebar-nav li {
  margin-bottom: 0.5rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.9rem 1.2rem;
  border-radius: 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  position: relative;
}

.nav-item i {
  font-size: 1.1rem;
  transition: var(--transition);
}

.nav-item:hover {
  color: var(--secondary);
  background: rgba(15, 74, 120, 0.04);
}

.nav-item.active {
  color: #FFFFFF;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  box-shadow: 0 8px 20px rgba(15, 74, 120, 0.15);
}

.nav-item.active i {
  color: #FFFFFF;
}

.sidebar-badge {
  background: var(--danger);
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 50px;
  position: absolute;
  right: 15px;
  box-shadow: 0 3px 6px rgba(239, 68, 68, 0.2);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid rgba(15, 74, 120, 0.06);
  padding-top: 1.5rem;
  margin-top: 1.5rem;
  transition: var(--transition);
}

.user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  box-shadow: 0 4px 10px rgba(15, 74, 120, 0.12);
  transition: var(--transition);
}

.user-avatar.mini {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 0.95rem;
  box-shadow: none;
}

.user-info {
  flex: 1;
  overflow: hidden;
  transition: var(--transition);
}

.user-info h4 {
  font-size: 0.9rem;
  margin-bottom: 2px;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  color: var(--secondary);
}

.user-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.logout-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  transition: var(--transition);
  outline: none;
}

.logout-btn:hover {
  color: var(--danger);
  transform: scale(1.1);
}

/* Sidebar hover system for desktop */
@media (min-width: 1025px) {
  .sidebar {
    width: 80px;
    padding: 2.5rem 0.75rem 1.5rem;
    align-items: center;
  }
  
  .sidebar:hover {
    width: 280px;
    padding: 2.5rem 1.5rem 1.5rem;
    align-items: stretch;
  }

  .sidebar .sidebar-logo-mini {
    display: block !important;
    height: 38px;
  }
  .sidebar .sidebar-logo-full {
    display: none !important;
  }

  .sidebar:hover .sidebar-logo-mini {
    display: none !important;
  }
  .sidebar:hover .sidebar-logo-full {
    display: block !important;
    height: 42px;
  }
  
  .sidebar .badge-role {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.9);
  }
  .sidebar:hover .badge-role {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
  }

  .nav-item {
    justify-content: center;
    padding: 0.9rem;
    width: 50px;
    height: 50px;
    margin: 0 auto 0.5rem;
  }
  
  .sidebar:hover .nav-item {
    justify-content: flex-start;
    padding: 0.9rem 1.2rem;
    width: 100%;
    height: auto;
  }

  .nav-item span:not(.sidebar-badge) {
    opacity: 0;
    width: 0;
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity 0.25s ease, width 0.25s ease;
  }
  
  .sidebar:hover .nav-item span:not(.sidebar-badge) {
    opacity: 1;
    width: auto;
    margin-left: 8px;
  }

  .sidebar-badge {
    position: absolute;
    right: 3px;
    top: 3px;
    padding: 2px 5px;
    font-size: 0.65rem;
  }
  
  .sidebar:hover .sidebar-badge {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    padding: 2px 7px;
    font-size: 0.75rem;
  }

  .sidebar-user {
    justify-content: center;
    width: 50px;
    border-top: 1px solid rgba(15, 74, 120, 0.04);
  }
  
  .sidebar:hover .sidebar-user {
    justify-content: flex-start;
    width: 100%;
    border-top: 1px solid rgba(15, 74, 120, 0.06);
  }

  .user-info {
    opacity: 0;
    width: 0;
    display: none;
  }
  
  .sidebar:hover .user-info {
    opacity: 1;
    width: auto;
    display: block;
  }

  .main-content {
    margin-left: 80px;
    transition: margin-left 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
  }
}

/* --- MAIN PANEL CONTENT --- */
.main-content {
  flex: 1;
  padding: 2.5rem 3rem;
  min-height: 100vh;
}

.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid rgba(15, 74, 120, 0.06);
  padding-bottom: 1.5rem;
}

.header-title h1 {
  font-size: 2rem;
  margin-bottom: 0.3rem;
  color: var(--secondary);
}

.header-title p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.green {
  background: var(--success);
  box-shadow: 0 0 10px var(--success);
}

/* ==========================================
   UI CARDS & SECTIONS (GLASSMORPHISM LIGHT)
   ========================================== */
.panel-card {
  background: #FFFFFF;
  border: 1px solid rgba(15, 74, 120, 0.05);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px rgba(15, 74, 120, 0.02), 0 1px 3px rgba(0, 0, 0, 0.01);
  transition: var(--transition);
}

.panel-card:hover {
  box-shadow: 0 15px 35px rgba(15, 74, 120, 0.05);
}

.panel-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--secondary);
}

.section-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* Filter / Section select tabs */
.filter-bar {
  padding: 1.2rem 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.filter-bar h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--secondary);
  white-space: nowrap;
}

.edit-tabs {
  display: flex;
  gap: 0.8rem;
  overflow-x: auto;
  width: 100%;
}

.edit-tab-btn {
  padding: 0.6rem 1.2rem;
  background: rgba(15, 74, 120, 0.03);
  border: 1px solid rgba(15, 74, 120, 0.08);
  border-radius: 50px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  font-family: inherit;
  outline: none;
}

.edit-tab-btn:hover, .edit-tab-btn.active {
  color: var(--secondary);
  border-color: var(--primary);
  background: rgba(15, 74, 120, 0.06);
}

.edit-tab-btn.active {
  background: var(--secondary);
  color: #FFFFFF;
  border-color: var(--secondary);
  box-shadow: 0 4px 10px rgba(15, 74, 120, 0.15);
}

.edit-tab-btn.active:hover {
  color: #FFFFFF;
  background: var(--secondary);
}

/* Edit Section SPA Forms */
.edit-section-form {
  display: none;
}

.edit-section-form.active {
  display: block;
  animation: panelFadeUp 0.4s ease-out;
}

@keyframes panelFadeUp {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 2rem;
}

.grid-3-1 {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 2rem;
}

.grid-2-1 {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 2rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* Form Controls code details */
.code-font {
  font-family: monospace !important;
  font-size: 0.85rem !important;
  background: #FAFBFD !important;
  border-color: rgba(15, 74, 120, 0.15) !important;
  color: #0E5E97 !important;
}

/* Tab Panels */
.tab-panel {
  display: none;
}

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

/* ==========================================
   DATA TABLES (CRUD VIEW)
   ========================================== */
.panel-header-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(15, 74, 120, 0.06);
  padding-bottom: 1rem;
}

.panel-header-action h3 {
  margin: 0;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(15, 74, 120, 0.06);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  background: #FFFFFF;
}

.data-table th, .data-table td {
  padding: 0.85rem 1.2rem;
  border-bottom: 1px solid rgba(15, 74, 120, 0.05);
  font-size: 0.9rem;
  color: var(--text-main);
  vertical-align: middle;
}

.data-table th {
  color: var(--secondary);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 1px;
  background: rgba(15, 74, 120, 0.02);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: rgba(15, 74, 120, 0.015);
}

.data-table img {
  max-width: 60px;
  border-radius: 8px;
  object-fit: cover;
  aspect-ratio: 1;
  border: 1px solid rgba(15, 74, 120, 0.1);
}

/* Status Pill classes */
.pill-status {
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-block;
}

.pill-status.pendiente {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.pill-status.confirmado {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.pill-status.cancelado {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.pill-status.asistio {
  background: rgba(40, 167, 69, 0.12);
  color: #28a745;
  border: 1px solid rgba(40, 167, 69, 0.25);
}

.pill-status.no_asistio {
  background: rgba(108, 117, 125, 0.12);
  color: #6c757d;
  border: 1px solid rgba(108, 117, 125, 0.25);
}

.btn-sidebar-asistencia:hover {
  background: #28a745 !important;
  color: #ffffff !important;
  border-color: #28a745 !important;
}

.btn-sidebar-undo:hover {
  background: rgba(108, 117, 125, 0.15) !important;
  color: #343a40 !important;
  border-color: rgba(108, 117, 125, 0.3) !important;
}

/* Actions in tables */
.table-action-btns {
  display: flex;
  gap: 8px;
}

.btn-action {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  color: #FFFFFF;
  font-size: 0.9rem;
  outline: none;
}

.btn-action.edit {
  background: rgba(94, 122, 161, 0.1);
  border: 1px solid rgba(94, 122, 161, 0.2);
  color: var(--secondary);
}

.btn-action.edit:hover {
  background: var(--secondary);
  color: #FFFFFF;
  border-color: var(--secondary);
}

.btn-action.delete {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--danger);
}

.btn-action.delete:hover {
  background: var(--danger);
  color: #FFFFFF;
  border-color: var(--danger);
}

.btn-action.move {
  background: rgba(15, 74, 120, 0.1);
  border: 1px solid rgba(15, 74, 120, 0.2);
  color: var(--primary);
}

.btn-action.move:hover:not(:disabled) {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}

.btn-action.move:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.table-text-truncated {
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Gallery thumbnail cells in admin table */
.gallery-thumb-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-thumb {
  width: 80px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid rgba(15, 74, 120, 0.12);
  box-shadow: 0 2px 8px rgba(15, 74, 120, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  display: block;
}

.gallery-thumb:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 16px rgba(15, 74, 120, 0.18);
  border-color: var(--primary);
}

.gallery-thumb-error {
  width: 80px;
  height: 56px;
  border-radius: 8px;
  border: 2px dashed rgba(15, 74, 120, 0.2);
  background: rgba(15, 74, 120, 0.03);
  color: rgba(15, 74, 120, 0.3);
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

/* ==========================================
   STAT CARDS (MARKETING / CLINIC STATS)
   ========================================== */
.stat-card {
  background: #FFFFFF;
  border: 1px solid rgba(15, 74, 120, 0.05);
  border-radius: 18px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  box-shadow: 0 10px 20px rgba(15, 74, 120, 0.015);
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(15, 74, 120, 0.06);
}

.stat-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #FFFFFF;
}

.stat-icon.purple { background: rgba(94, 122, 161, 0.12); color: var(--secondary); border: 1px solid rgba(94, 122, 161, 0.2); }
.stat-icon.yellow { background: rgba(245, 158, 11, 0.12); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.2); }
.stat-icon.green { background: rgba(16, 185, 129, 0.12); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.2); }
.stat-icon.red { background: rgba(239, 68, 68, 0.12); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.2); }

.stat-info-dash h3 {
  font-size: 1.6rem;
  margin-bottom: 2px;
  color: var(--secondary);
}

.stat-info-dash p {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
}

/* Mini stat cards */
.stat-card.inline {
  padding: 1rem 1.2rem;
  gap: 10px;
}

.stat-icon-mini {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.stat-icon-mini.green { background: rgba(16, 185, 129, 0.12); color: var(--success); }
.stat-icon-mini.blue { background: rgba(15, 74, 120, 0.12); color: var(--secondary); }
.stat-icon-mini.purple { background: rgba(94, 122, 161, 0.12); color: var(--primary); }
.stat-icon-mini.yellow { background: rgba(245, 158, 11, 0.12); color: var(--warning); }

.stat-info-mini h4 {
  font-size: 1.1rem;
  margin: 0;
  color: var(--secondary);
}

.stat-info-mini p {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin: 0;
}

.badge-status {
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-status.connected {
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

/* ==========================================
   RESPONSIVE PREVIEW SYSTEM (DEVICE SIMULATOR)
   ========================================== */
.responsive-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(15, 74, 120, 0.06);
  padding-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.responsive-toolbar h3 {
  margin: 0;
}

.responsive-selector-btns {
  display: flex;
  gap: 8px;
}

.resp-btn {
  padding: 0.6rem 1.2rem;
  background: rgba(15, 74, 120, 0.03);
  border: 1px solid rgba(15, 74, 120, 0.08);
  border-radius: 8px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  outline: none;
}

.resp-btn:hover, .resp-btn.active {
  color: var(--secondary);
  border-color: var(--primary);
  background: rgba(15, 74, 120, 0.06);
}

.resp-btn.active {
  border-color: var(--secondary);
  background: rgba(15, 74, 120, 0.08);
  color: var(--secondary);
}

.resp-zoom-controls {
  display: flex;
  gap: 5px;
}

.resp-zoom-controls button {
  background: rgba(15, 74, 120, 0.04);
  border: 1px solid rgba(15, 74, 120, 0.08);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}

.resp-zoom-controls button:hover {
  color: var(--secondary);
  background: rgba(15, 74, 120, 0.08);
}

.device-frame-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem;
  background: #EBF0F5;
  border-radius: 16px;
  overflow: auto;
  max-height: 80vh;
  border: 1px solid rgba(15, 74, 120, 0.06);
}

.device-mockup {
  position: relative;
  background: #000000;
  border-radius: 36px;
  border: 10px solid #1A2530;
  box-shadow: 0 25px 60px rgba(15, 74, 120, 0.12);
  overflow: hidden;
  transition: width 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), height 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  transform-origin: top center;
}

.device-header-bar {
  height: 24px;
  background: #1A2530;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  padding: 5px;
  position: relative;
  z-index: 10;
}

.device-header-bar .speaker {
  width: 60px;
  height: 4px;
  background: #384A5C;
  border-radius: 10px;
}

.device-header-bar .camera {
  width: 8px;
  height: 8px;
  background: #0D1620;
  border-radius: 50%;
}

.device-mockup iframe {
  width: 100%;
  height: calc(100% - 24px);
  background: #FFFFFF;
}

/* ==========================================
   TOAST SYSTEM & MODALS (LIGHT REFLECTION)
   ========================================== */
.toast-card {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #FFFFFF;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-left: 5px solid var(--success);
  padding: 1.1rem 2rem;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: var(--text-main);
  box-shadow: 0 10px 30px rgba(15, 74, 120, 0.08);
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
}

.toast-card.active {
  transform: translateY(0);
  opacity: 1;
}

.toast-card i {
  font-size: 1.25rem;
  color: var(--success);
}

/* Custom Modal design */
.dash-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 30, 48, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.dash-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.dash-modal-card {
  background: #FFFFFF;
  border: 1px solid rgba(15, 74, 120, 0.08);
  border-radius: 24px;
  width: 100%;
  max-width: 650px;
  box-shadow: 0 30px 60px rgba(15, 30, 48, 0.15);
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  transform: scale(0.9) translateY(30px);
  transition: var(--transition);
  overflow: hidden;
}

.dash-modal-overlay.active .dash-modal-card {
  transform: scale(1) translateY(0);
}

.dash-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(15, 74, 120, 0.06);
  padding: 2rem 2.5rem 1.2rem 2.5rem;
  margin-bottom: 0;
  flex-shrink: 0;
}

.dash-modal-header h3 {
  margin: 0;
  font-size: 1.3rem;
  color: var(--secondary);
}

.close-modal-btn {
  background: transparent;
  border: none;
  font-size: 1.6rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  outline: none;
}

.close-modal-btn:hover {
  color: var(--secondary);
  transform: scale(1.1) rotate(90deg);
}

.dash-modal-body {
  padding: 1.5rem 2.5rem 2.5rem 2.5rem;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 74, 120, 0.2) transparent;
}

.dash-modal-body::-webkit-scrollbar {
  width: 6px;
}

.dash-modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.dash-modal-body::-webkit-scrollbar-thumb {
  background-color: rgba(15, 74, 120, 0.2);
  border-radius: 10px;
}

.dash-modal-body select.form-control {
  background: #FFFFFF;
}

/* Agenda clinical notes textareas inside tables */
.agenda-notes-textarea {
  background: rgba(15, 74, 120, 0.02);
  border: 1px solid rgba(15, 74, 120, 0.08);
  color: var(--text-main);
  padding: 6px 10px;
  width: 100%;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.85rem;
  resize: vertical;
  transition: var(--transition);
  outline: none;
}

.agenda-notes-textarea:focus {
  background: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(94, 122, 161, 0.1);
}

.agenda-status-select {
  background: #FFFFFF;
  color: var(--text-main);
  border: 1px solid rgba(15, 74, 120, 0.12);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 0.82rem;
  outline: none;
  transition: var(--transition);
  font-family: inherit;
  cursor: pointer;
}

.agenda-status-select:focus {
  border-color: var(--primary);
}

/* Responsive Overrides */
@media (max-width: 1024px) {
  .sidebar {
    width: 80px;
    padding: 2rem 0.5rem;
    align-items: center;
  }
  .sidebar-logo {
    display: none;
  }
  .sidebar-logo-mini {
    display: block !important;
    height: 34px !important;
    max-height: 34px !important;
    margin: 0 auto;
  }
  .sidebar-logo-full {
    display: none !important;
  }
  .sidebar .badge-role {
    display: none;
  }
  .nav-item {
    padding: 0.9rem;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
  }
  .nav-item span:not(.sidebar-badge) {
    display: none;
  }
  .sidebar-user {
    flex-direction: column;
    text-align: center;
    border-top: 1px solid rgba(15, 74, 120, 0.04);
  }
  .user-info {
    display: none;
  }
  .main-content {
    margin-left: 80px;
    padding: 2rem;
  }
}

@media (max-width: 768px) {
  .main-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .grid-2, .grid-3-1, .grid-2-1 {
    grid-template-columns: 1fr;
  }
}

/* ==========================================
   ESTILOS PREMIUM: CERO CÓDIGOS Y CARGA INTUITIVA
   ========================================== */
.image-upload-group {
  margin-bottom: 1.5rem;
}

.image-uploader-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(15, 74, 120, 0.03);
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed rgba(15, 74, 120, 0.15);
  transition: all 0.3s ease;
}

.image-uploader-wrapper:hover {
  background: rgba(15, 74, 120, 0.05);
  border-color: rgba(15, 74, 120, 0.3);
}

.img-preview-thumbnail {
  max-width: 100%;
  max-height: 120px;
  object-fit: contain;
  border-radius: 8px;
  background: white;
  border: 1px solid rgba(15, 74, 120, 0.08);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
  align-self: flex-start;
  transition: transform 0.2s ease;
}

.img-preview-thumbnail:hover {
  transform: scale(1.05);
}

.uploader-controls {
  display: flex;
  gap: 10px;
  width: 100%;
  align-items: center;
}

.uploader-controls .image-url-input {
  flex: 1;
}

.btn-upload-image {
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
}

/* Visual Links Container */
.visual-links-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(15, 74, 120, 0.02);
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 74, 120, 0.06);
  min-height: 60px;
}

.visual-link-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  background: white;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(15, 74, 120, 0.08);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  transition: all 0.2s ease;
}

.visual-link-item:hover {
  border-color: rgba(15, 74, 120, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.visual-link-item input, .visual-link-item select {
  font-size: 0.85rem;
  padding: 6px 10px;
  height: 34px;
}

.visual-link-item .link-label {
  flex: 2;
  min-width: 120px;
}

.visual-link-item .link-target {
  flex: 2;
  min-width: 120px;
}

.visual-link-item .link-custom-url {
  width: 100%;
  margin-top: 5px;
}

.visual-link-controls {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.btn-link-action {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.btn-link-action.up, .btn-link-action.down {
  background: rgba(15, 74, 120, 0.05);
  color: var(--secondary);
}

.btn-link-action.up:hover, .btn-link-action.down:hover {
  background: var(--secondary);
  color: white;
}

.btn-link-action.delete {
  background: rgba(220, 53, 69, 0.08);
  color: var(--danger);
}

.btn-link-action.delete:hover {
  background: var(--danger);
  color: white;
}

/* ==========================================================================
   ESTILOS PREMIUM DE COMPOSICIÓN Y ORGANIZACIÓN DEL MÓDULO DE EDICIÓN
   ========================================================================== */
.form-subsection-card {
  background: rgba(15, 74, 120, 0.015);
  border: 1px solid rgba(15, 74, 120, 0.06);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  box-shadow: inset 0 2px 4px rgba(15, 74, 120, 0.005);
}

.form-subsection-card:hover {
  background: rgba(15, 74, 120, 0.025);
  border-color: rgba(15, 74, 120, 0.12);
  box-shadow: 0 4px 15px rgba(15, 74, 120, 0.03);
}

.form-subsection-title {
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  color: var(--secondary) !important;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(15, 74, 120, 0.06);
  padding-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.form-subsection-title i {
  color: var(--primary);
  font-size: 0.95rem;
}

.field-help {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 400;
}

.field-help i {
  color: var(--primary);
  margin-right: 3px;
}

.form-actions-bar {
  display: flex;
  justify-content: flex-end;
  padding-top: 1rem;
  margin-top: 0.5rem;
  border-top: 1px solid rgba(15, 74, 120, 0.06);
  width: 100%;
}

.form-actions-bar .btn-dash-primary {
  min-width: 160px;
}

/* Grid de 3 columnas para sub-elementos compactos */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

/* Títulos "Live Composer" para la edición de títulos ricos */
.title-visual-wrapper {
  background: rgba(94, 122, 161, 0.03);
  border: 1px solid rgba(94, 122, 161, 0.12);
  border-radius: 12px;
  padding: 1rem;
  margin-top: 0.5rem;
}

.title-visual-wrapper .form-group-sub {
  margin-bottom: 0px;
}

.form-group-sub label {
  text-transform: none !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.3px !important;
}

/* Bordes y sombras estilizadas en el modal */
.dash-modal-card {
  border: 1px solid rgba(15, 74, 120, 0.12) !important;
  box-shadow: 0 30px 60px rgba(15, 30, 48, 0.18) !important;
}

.dash-modal-card .grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
}

.dash-modal-body .form-subsection-card {
  padding: 1.2rem;
  background: rgba(15, 74, 120, 0.01);
}

@media (max-width: 768px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .dash-modal-overlay {
    padding: 0.75rem;
  }
  .dash-modal-card {
    border-radius: 16px;
  }
  .dash-modal-header {
    padding: 1.5rem 1.5rem 1rem 1.5rem;
  }
  .dash-modal-body {
    padding: 1rem 1.5rem 1.5rem 1.5rem;
  }
  .dash-modal-card .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* ==========================================
   TAGS INPUT SYSTEM (SEO CHIPS)
   ========================================== */
.tags-input-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 48px;
  padding: 8px 12px;
  background: #FFFFFF;
  border: 1px solid rgba(15, 74, 120, 0.12);
  border-radius: 12px;
  cursor: text;
  transition: var(--transition);
}

.tags-input-wrapper:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(94, 122, 161, 0.12);
}

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

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: linear-gradient(135deg, rgba(15, 74, 120, 0.08), rgba(94, 122, 161, 0.10));
  border: 1px solid rgba(15, 74, 120, 0.15);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--secondary);
  animation: chipAppear 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes chipAppear {
  from { opacity: 0; transform: scale(0.8); }
  to   { opacity: 1; transform: scale(1); }
}

.tag-chip-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
  transition: color 0.2s;
  outline: none;
}

.tag-chip-remove:hover {
  color: var(--danger);
}

.tags-text-input {
  border: none !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 4px 4px !important;
  flex: 1;
  min-width: 150px;
  font-size: 0.9rem;
  color: var(--text-main);
  font-family: inherit;
}

.tags-display {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.tags-display .tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: var(--accent-light);
  border: 1px solid rgba(15, 74, 120, 0.12);
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--secondary);
}

/* ==========================================
   INTERFAZ DE CALENDARIO MENSUAL DE CITAS
   ========================================== */
.calendar-wrapper {
  background: var(--white);
  border-radius: 16px;
  border: 1px solid rgba(94, 122, 161, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  padding: 1.5rem;
  margin-top: 1rem;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--secondary);
  border-bottom: 2px solid rgba(94, 122, 161, 0.1);
  padding-bottom: 0.8rem;
  margin-bottom: 0.5rem;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.calendar-day-cell {
  min-height: 120px;
  background: var(--bg-light);
  border-radius: 12px;
  padding: 0.6rem;
  border: 1px solid rgba(94, 122, 161, 0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  transition: all 0.2s ease;
}

.calendar-day-cell:hover {
  background: var(--white);
  border-color: var(--primary);
  box-shadow: 0 8px 20px rgba(15, 74, 120, 0.08);
  transform: translateY(-2px);
  z-index: 5;
}

.calendar-day-cell.prev-month,
.calendar-day-cell.next-month {
  opacity: 0.45;
  background: #fdfefe;
}

.calendar-day-cell.today {
  background: rgba(15, 74, 120, 0.04);
  border: 2px solid var(--primary);
}

.calendar-day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.calendar-day-number {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark);
}

.calendar-day-cell.today .calendar-day-number {
  color: var(--primary);
  background: rgba(15, 74, 120, 0.1);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-add-btn {
  opacity: 0;
  border: none;
  background: var(--primary);
  color: var(--white);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.calendar-day-cell:hover .calendar-add-btn {
  opacity: 1;
}

.calendar-add-btn:hover {
  transform: scale(1.15);
}

.calendar-appointments {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 85px;
  scrollbar-width: none; /* Firefox */
}

.calendar-appointments::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.calendar-app-item {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 6px;
  border-radius: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.calendar-app-item:hover {
  transform: scale(1.03);
  filter: brightness(0.95);
}

.calendar-app-item.pendiente {
  background: rgba(243, 156, 18, 0.12);
  color: #d35400;
  border-left: 3px solid #f39c12;
}

.calendar-app-item.confirmado,
.calendar-app-item.confirmada {
  background: rgba(46, 204, 113, 0.12);
  color: #27ae60;
  border-left: 3px solid #2ecc71;
}


.calendar-app-item.cancelado,
.calendar-app-item.cancelada {
  background: rgba(231, 76, 60, 0.12);
  color: #c0392b;
  border-left: 3px solid #e74c3c;
}

/* ==========================================
   SINCRONIZACIÓN VISUAL CONFIG → CALENDARIO
   ========================================== */

/* Banner de resumen de configuración */
.calendar-info-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 0.8rem;
  padding: 6px 12px;
  background: linear-gradient(135deg, rgba(15, 74, 120, 0.04), rgba(94, 122, 161, 0.06));
  border: 1px solid rgba(94, 122, 161, 0.15);
  border-radius: 12px;
}

.cal-banner-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: white;
  border: 1px solid rgba(94, 122, 161, 0.2);
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--secondary);
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.cal-banner-chip i {
  color: var(--primary);
  font-size: 0.65rem;
}

.cal-banner-chip.active-days {
  background: linear-gradient(135deg, #0F4A78, #5E7AA1);
  color: white;
  border-color: transparent;
}

.cal-banner-chip.active-days i {
  color: rgba(255,255,255,0.8);
}

.cal-banner-chip.blocked {
  background: rgba(231, 76, 60, 0.08);
  border-color: rgba(231, 76, 60, 0.25);
  color: #c0392b;
}

.cal-banner-chip.blocked i {
  color: #e74c3c;
}

/* Cabecera de día no laboral */
.calendar-weekdays > div.non-working-header {
  color: #b0b8c4;
  position: relative;
}

.calendar-weekdays > div.non-working-header::after {
  content: '';
  display: block;
  width: 18px;
  height: 2px;
  background: #d8dde5;
  border-radius: 2px;
  margin: 3px auto 0;
}

/* Celda de día no laboral */
.calendar-day-cell.non-working {
  background: repeating-linear-gradient(
    -45deg,
    #f5f7fa,
    #f5f7fa 6px,
    #edf0f4 6px,
    #edf0f4 12px
  );
  border-color: rgba(94, 122, 161, 0.06);
}

.calendar-day-cell.non-working .calendar-day-number {
  color: #b0b8c4;
}

.calendar-day-cell.non-working:hover {
  background: repeating-linear-gradient(
    -45deg,
    #eef1f6,
    #eef1f6 6px,
    #e5e9f0 6px,
    #e5e9f0 12px
  );
  transform: none;
  box-shadow: none;
}

/* Etiqueta "No laboral" dentro de la celda */
.cal-no-work-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  color: #b0b8c4;
  margin-top: auto;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(176, 184, 196, 0.15);
}

.cal-no-work-label i {
  font-size: 0.62rem;
}

/* Celda de fecha inactiva (feriado / vacación) */
.calendar-day-cell.inactive-date {
  background: repeating-linear-gradient(
    45deg,
    rgba(231, 76, 60, 0.04),
    rgba(231, 76, 60, 0.04) 6px,
    rgba(231, 76, 60, 0.09) 6px,
    rgba(231, 76, 60, 0.09) 12px
  );
  border: 1.5px solid rgba(231, 76, 60, 0.2);
}

.calendar-day-cell.inactive-date .calendar-day-number {
  color: #e74c3c;
}

.calendar-day-cell.inactive-date:hover {
  transform: none;
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.1);
}

/* Ícono de bloqueo en fechas inactivas */
.cal-inactive-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: rgba(231, 76, 60, 0.15);
  border-radius: 50%;
  color: #e74c3c;
  font-size: 0.65rem;
}

/* Etiqueta "Inactivo" dentro de la celda */
.cal-inactive-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #c0392b;
  margin-top: auto;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(231, 76, 60, 0.1);
}

.cal-inactive-label i {
  font-size: 0.65rem;
}

/* ==========================================
   MODAL PREMIUM: CONFIGURACIÓN DE AGENDA
   ========================================== */

.agenda-config-modal-card {
  background: #FFFFFF;
  border-radius: 24px;
  max-width: 800px;
  width: 95%;
  height: 90vh;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(15, 74, 120, 0.18), 0 0 0 1px rgba(94, 122, 161, 0.08);
  transform: scale(0.92) translateY(24px);
  transition: transform 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.dash-modal-overlay.active .agenda-config-modal-card {
  transform: scale(1) translateY(0);
}

.agenda-config-header {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 2rem 2.2rem;
  background: linear-gradient(135deg, #0F4A78 0%, #1a5e90 50%, #5E7AA1 100%);
  position: relative;
  overflow: hidden;
}

.agenda-config-header::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.agenda-config-header-icon {
  width: 52px;
  height: 52px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #fff;
  flex-shrink: 0;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
}

.agenda-config-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0;
}

.agenda-config-subtitle {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
  margin-top: 3px;
  font-weight: 400;
}

.agenda-config-header .close-modal-btn {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  transition: all 0.2s ease;
  position: relative;
  z-index: 10;
  flex-shrink: 0;
}

.agenda-config-header .close-modal-btn:hover {
  background: rgba(255,255,255,0.25);
  transform: rotate(90deg);
}

.agenda-config-modal-card > form {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.agenda-config-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.8rem 2.2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-height: 0;
  /* Scroll suave */
  scroll-behavior: smooth;
}

/* Scrollbar premium para el cuerpo del modal */
.agenda-config-body::-webkit-scrollbar {
  width: 6px;
}

.agenda-config-body::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 10px;
}

.agenda-config-body::-webkit-scrollbar-thumb {
  background: rgba(94, 122, 161, 0.3);
  border-radius: 10px;
  transition: background 0.2s ease;
}

.agenda-config-body::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 74, 120, 0.5);
}

.agenda-config-section {
  background: #F8FAFD;
  border: 1px solid rgba(94, 122, 161, 0.12);
  border-radius: 16px;
  padding: 1.4rem 1.6rem;
  transition: box-shadow 0.2s ease;
}

.agenda-config-section:hover {
  box-shadow: 0 4px 18px rgba(15, 74, 120, 0.07);
}

.agenda-config-section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1.5px solid rgba(94, 122, 161, 0.12);
}

.agenda-config-section-label i {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #0F4A78, #5E7AA1);
  color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* Grid de días laborales */
.agenda-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

@media (max-width: 600px) {
  .agenda-days-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.agenda-day-toggle {
  cursor: pointer;
}

.agenda-day-toggle input[type="checkbox"] {
  display: none;
}

.agenda-day-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 6px;
  border-radius: 12px;
  background: #fff;
  border: 1.5px solid rgba(94, 122, 161, 0.2);
  transition: all 0.2s ease;
  cursor: pointer;
  min-height: 64px;
  gap: 3px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.agenda-day-btn .day-abbr {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--secondary);
  text-transform: uppercase;
}

.agenda-day-btn .day-full {
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--text-muted);
}

.agenda-day-toggle input:checked + .agenda-day-btn {
  background: linear-gradient(135deg, #0F4A78, #5E7AA1);
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(15, 74, 120, 0.3);
}

.agenda-day-toggle input:checked + .agenda-day-btn .day-abbr,
.agenda-day-toggle input:checked + .agenda-day-btn .day-full {
  color: #fff;
}

.agenda-day-toggle:hover .agenda-day-btn {
  border-color: var(--primary);
  background: rgba(94, 122, 161, 0.06);
}

/* Grids de campos */
.agenda-config-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.agenda-config-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (max-width: 600px) {
  .agenda-config-grid-3,
  .agenda-config-grid-2 {
    grid-template-columns: 1fr;
  }
}

.agenda-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 0.5rem;
}

.agenda-field-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.agenda-field-label i {
  color: var(--primary);
  font-size: 0.75rem;
}

.agenda-field-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid rgba(94, 122, 161, 0.2);
  border-radius: 10px;
  background: #fff;
  font-size: 0.9rem;
  font-family: 'Montserrat', sans-serif;
  color: var(--text-main);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  appearance: auto;
}

.agenda-field-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(94, 122, 161, 0.12);
}

/* Toggle switches */
.agenda-toggles-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.agenda-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  border: 1.5px solid rgba(94, 122, 161, 0.12);
  transition: box-shadow 0.2s ease;
}

.agenda-toggle-row:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  border-color: rgba(94, 122, 161, 0.25);
}

.agenda-toggle-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.agenda-toggle-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.agenda-toggle-title i {
  color: var(--primary);
}

.agenda-toggle-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* Premium Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
  cursor: pointer;
}

.toggle-switch input {
  display: none;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: #D8E1EB;
  border-radius: 50px;
  transition: background 0.3s ease;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  background: white;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.toggle-switch input:checked + .toggle-slider {
  background: linear-gradient(135deg, #25d366, #128c7e);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(24px);
}

/* Small premium toggle switches for roles table */
.toggle-switch.switch-sm {
  width: 44px;
  height: 24px;
}
.toggle-switch.switch-sm .toggle-slider::before {
  width: 18px;
  height: 18px;
  top: 3px;
  left: 3px;
}
.toggle-switch.switch-sm input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* Footer del modal */
.agenda-config-footer {
  padding: 1.2rem 2.2rem;
  border-top: 1.5px solid rgba(94, 122, 161, 0.1);
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #FAFBFD;
}

.agenda-config-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.agenda-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: linear-gradient(135deg, #0F4A78 0%, #5E7AA1 100%);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 16px rgba(15, 74, 120, 0.3);
}

.agenda-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 74, 120, 0.4);
}

.agenda-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: transparent;
  color: var(--secondary);
  border: 1.5px solid rgba(94, 122, 161, 0.3);
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
}

.agenda-btn-secondary:hover {
  background: var(--accent-light);
  border-color: var(--primary);
  color: var(--primary);
}

.agenda-config-feedback {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Contenedor de acciones del header del día */
.calendar-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Indicador de capacidad de citas al medio de la tarjeta (diseño premium y centrado) */
.calendar-day-capacity {
  position: absolute;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 12px;
  min-width: 75px;
  text-align: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
  pointer-events: none; /* Evita interferir con los clics en la tarjeta del día */
}

.calendar-day-capacity-value {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.5px;
  font-family: 'Montserrat', sans-serif;
}

.calendar-day-capacity-label {
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  opacity: 0.8;
  margin-top: 2px;
  font-family: 'Inter', sans-serif;
}

.calendar-day-capacity.available {
  background: rgba(46, 204, 113, 0.08);
  color: #27ae60;
  border: 1px solid rgba(46, 204, 113, 0.2);
}

.calendar-day-capacity.limited {
  background: rgba(243, 156, 18, 0.08);
  color: #d35400;
  border: 1px solid rgba(243, 156, 18, 0.2);
}

.calendar-day-capacity.full {
  background: rgba(231, 76, 60, 0.08);
  color: #c0392b;
  border: 1px solid rgba(231, 76, 60, 0.2);
}

/* ==========================================
   CAMPO DE NOTAS CLÍNICAS PREMIUM (MODAL DETALLE CITA)
   ========================================== */
#detail-clinical-notes {
  width: 100%;
  min-height: 120px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(15, 74, 120, 0.15);
  background: #FFFFFF;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.5;
  box-sizing: border-box;
  resize: vertical;
  transition: all 0.25s ease;
  outline: none;
}

#detail-clinical-notes:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 74, 120, 0.12);
  background: #FFFFFF;
}

/* Botón de guardar notas clínicas con estilo premium */
.btn-update-notes {
  width: 100%;
  font-size: 0.82rem;
  font-weight: 600;
  height: 38px;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(15, 74, 120, 0.05);
  color: var(--primary);
  border: 1px solid rgba(15, 74, 120, 0.12);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-update-notes:hover {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(15, 74, 120, 0.15);
}

/* Celdas clickables de días laborables */
.calendar-day-cell.clickable-day {
  cursor: pointer;
}

.calendar-day-cell.clickable-day:hover {
  background: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 10px 25px rgba(15, 74, 120, 0.12);
  transform: translateY(-3px);
  z-index: 5;
}

/* ==========================================
   CUADRÍCULA DE SLOTS EN MODAL DE AGENDAMIENTO
   ========================================== */
.admin-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  padding: 12px;
  background: rgba(15, 74, 120, 0.02);
  border: 1px solid rgba(15, 74, 120, 0.08);
  border-radius: 14px;
  min-height: 50px;
  max-height: 200px;
  overflow-y: auto;
}

.admin-slots-placeholder {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 14px 0;
  font-style: italic;
}

.admin-slot-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  background: #FFFFFF;
  border: 1px solid rgba(15, 74, 120, 0.12);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-slot-btn:hover {
  border-color: var(--primary);
  background: rgba(15, 74, 120, 0.04);
  color: var(--primary);
}

.admin-slot-btn.selected {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 4px 10px rgba(15, 74, 120, 0.2);
}

.admin-slot-btn.ocupado {
  background: rgba(231, 76, 60, 0.03);
  border-color: rgba(231, 76, 60, 0.08);
  color: #c0392b;
  text-decoration: line-through;
  opacity: 0.5;
  cursor: not-allowed;
}

.admin-slot-btn.ocupado:hover {
  background: rgba(231, 76, 60, 0.03);
  border-color: rgba(231, 76, 60, 0.08);
  color: #c0392b;
}

/* ==========================================
   BLOQUES DE AGENDA DIARIA EN MODAL DETALLADO
   ========================================== */
.day-schedule-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: #FFFFFF;
  border: 1px solid rgba(15, 74, 120, 0.08);
  border-radius: 14px;
  transition: all 0.2s ease;
}

.day-schedule-row:hover {
  border-color: rgba(15, 74, 120, 0.16);
  box-shadow: 0 4px 14px rgba(15, 74, 120, 0.05);
}

.day-schedule-row.ocupado {
  background: rgba(15, 74, 120, 0.01);
  border-color: rgba(15, 74, 120, 0.05);
}

.day-schedule-time {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 52px;
  background: rgba(15, 74, 120, 0.05);
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--primary);
}

.day-schedule-content {
  flex: 1;
  min-width: 0;
}

.day-schedule-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.day-schedule-status-badge.available {
  background: rgba(46, 204, 113, 0.08);
  color: #27ae60;
  border: 1px solid rgba(46, 204, 113, 0.18);
}

.day-schedule-patient-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.day-schedule-patient-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.day-schedule-patient-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
}

.day-schedule-action {
  flex-shrink: 0;
}

.btn-day-schedule-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-day-schedule-action.add {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(15, 74, 120, 0.15);
}

.btn-day-schedule-action.add:hover {
  background: #092e4a;
  box-shadow: 0 4px 10px rgba(15, 74, 120, 0.25);
  transform: translateY(-1px);
}

.btn-day-schedule-action.view {
  background: rgba(15, 74, 120, 0.06);
  color: var(--primary);
  border: 1px solid rgba(15, 74, 120, 0.12);
}

.btn-day-schedule-action.view:hover {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 4px 10px rgba(15, 74, 120, 0.15);
  transform: translateY(-1px);
}

/* Custom thin scrollbar for timeline list inside dayScheduleModal */
#day-schedule-slots-container::-webkit-scrollbar {
  width: 5px;
}

#day-schedule-slots-container::-webkit-scrollbar-track {
  background: transparent;
}

#day-schedule-slots-container::-webkit-scrollbar-thumb {
  background-color: rgba(15, 74, 120, 0.15);
  border-radius: 10px;
}

/* Custom scrollbar for today's patient sidebar */
#sidebar-today-list::-webkit-scrollbar {
  width: 5px;
}
#sidebar-today-list::-webkit-scrollbar-track {
  background: transparent;
}
#sidebar-today-list::-webkit-scrollbar-thumb {
  background-color: rgba(15, 74, 120, 0.15);
  border-radius: 10px;
}

/* Responsive wrapper for calendar + sidebar layout */
@media (max-width: 1024px) {
  .agenda-calendar-layout {
    flex-direction: column !important;
  }
  .calendar-today-sidebar {
    width: 100% !important;
    max-height: 400px !important;
  }
}

/* Celda de día pasado deshabilitado */
.calendar-day-cell.past-day {
  background: #fcfdfe;
  opacity: 0.55;
  cursor: not-allowed !important;
  pointer-events: none !important;
}
.calendar-day-cell.past-day .calendar-day-number {
  color: #94a3b8;
}
.calendar-day-cell.past-day .calendar-day-capacity {
  background: #f1f5f9 !important;
  color: #94a3b8 !important;
  border-color: #e2e8f0 !important;
  box-shadow: none !important;
}

/* =========================================
   ZONA HORARIA Y FORMATO REGIONAL
   ========================================= */

.agenda-regional-info-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: linear-gradient(135deg, rgba(15, 74, 120, 0.06) 0%, rgba(94, 122, 161, 0.04) 100%);
  border: 1px solid rgba(15, 74, 120, 0.12);
  border-left: 3px solid var(--primary);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 1.1rem;
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 500;
  line-height: 1.4;
}

.agenda-regional-info-banner i {
  font-size: 0.9rem;
  margin-top: 1px;
  flex-shrink: 0;
  opacity: 0.85;
}

.timezone-preview-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, #0F4A78 0%, #1a6ea8 100%);
  color: #fff;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  letter-spacing: 0.3px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(15, 74, 120, 0.25);
  border: 1px solid rgba(255,255,255,0.15);
  min-width: 120px;
  justify-content: center;
  transition: all 0.3s ease;
}

.timezone-preview-badge i {
  font-size: 0.78rem;
  animation: tz-pulse 2s ease-in-out infinite;
}

@keyframes tz-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

#clinic_timezone optgroup {
  font-weight: 700;
  font-size: 0.8rem;
}

/* =========================================
   SUITE DE SEO ORGÁNICO PROFESIONAL
   ========================================= */

/* Score SEO Radial Animado */
.seo-audit-radial {
  transition: background 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.seo-audit-radial.excelente {
  box-shadow: 0 4px 14px rgba(40, 167, 69, 0.2);
}

.seo-audit-radial.bueno {
  box-shadow: 0 4px 14px rgba(243, 156, 18, 0.2);
}

.seo-audit-radial.critico {
  box-shadow: 0 4px 14px rgba(231, 76, 60, 0.2);
}

/* Simulador SERP */
.google-serp-container {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  border: 1px solid #dadce0;
  background-color: #fff;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.google-serp-container.desktop-view {
  max-width: 600px;
  border-radius: 8px;
  box-shadow: 0 1px 6px rgba(32,33,36,0.1);
  padding: 16px;
}

.google-serp-container.mobile-view {
  max-width: 375px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  padding: 14px;
}

.google-serp-container .serp-title {
  color: #1a0dab;
  font-size: 1.25rem;
  line-height: 1.3;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.google-serp-container.desktop-view .serp-title:hover {
  text-decoration: underline;
}

.google-serp-container.mobile-view .serp-title {
  font-size: 1.15rem;
  color: #1558d6;
}

.google-serp-container .serp-description {
  font-size: 0.88rem;
  color: #4d5156;
  line-height: 1.4;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

/* Botones de dispositivo toggle */
.btn-device-toggle {
  outline: none;
}
.btn-device-toggle:hover {
  color: var(--primary) !important;
  background: rgba(15, 74, 120, 0.05);
}

/* Auditoría Lista de Chequeo */
.seo-audit-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid rgba(15, 74, 120, 0.05);
  box-shadow: 0 2px 4px rgba(0,0,0,0.01);
  transition: all 0.2s ease;
}

.seo-audit-item:hover {
  transform: translateX(2px);
  border-color: rgba(15, 74, 120, 0.1);
  box-shadow: 0 4px 8px rgba(15, 74, 120, 0.03);
}

.seo-audit-item i {
  font-size: 1rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.seo-audit-item.passed i {
  color: #28a745;
}

.seo-audit-item.warning i {
  color: #ffc107;
}

.seo-audit-item.danger i {
  color: #e74c3c;
}

.seo-audit-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.seo-audit-item-info .audit-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--dark);
  font-family: 'Montserrat', sans-serif;
}

.seo-audit-item-info .audit-desc {
  font-size: 0.72rem;
  color: #7f8c8d;
  font-weight: 500;
  line-height: 1.35;
}

/* Keyword Density recommendations styling */
.kw-audit-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 4px;
  width: fit-content;
}
.kw-audit-pill.success {
  background: rgba(40, 167, 69, 0.08);
  color: #28a745;
}
.kw-audit-pill.warning {
  background: rgba(243, 156, 18, 0.08);
  color: #e67e22;
}
.kw-audit-pill.danger {
  background: rgba(231, 76, 60, 0.08);
  color: #e74c3c;
}

/* =========================================
   SUITE SEO PREMIUM: COMPONENTES EXTRA
   ========================================= */

/* Corrector de Etiquetas ALT en Caliente */
.alt-fix-item {
  background: #ffffff;
  border: 1px solid rgba(15, 74, 120, 0.05);
  box-shadow: 0 1px 3px rgba(0,0,0,0.01);
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
.alt-fix-item:hover {
  transform: translateY(-1.5px);
  border-color: rgba(15, 74, 120, 0.12);
  box-shadow: 0 5px 12px rgba(15, 74, 120, 0.05);
}

/* Redirecciones 301 Activas */
.redirect-active-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #fafafa;
  border: 1px solid rgba(0,0,0,0.02);
  padding: 8px 12px;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.01);
  transition: all 0.2s ease;
}
.redirect-active-row:hover {
  border-color: rgba(231, 76, 60, 0.15);
  background: rgba(231, 76, 60, 0.01);
}

/* Visual Sitemap cards */
#visual-sitemap-tree > div {
  transition: all 0.2s ease;
}
#visual-sitemap-tree > div:hover {
  transform: translateX(1.5px);
  border-color: rgba(15, 74, 120, 0.1);
  background: #ffffff !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

/* Hide Chrome/Safari/Webkit scrollbars for the tab row */
.seo-inner-nav::-webkit-scrollbar {
  display: none;
}

.seo-tab-btn {
  padding: 0.42rem 0.8rem;
  background: #ffffff;
  border: 1px solid rgba(15, 74, 120, 0.08);
  border-radius: 50px;
  color: #7f8c8d;
  font-weight: 600;
  font-size: 0.76rem;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  font-family: 'Montserrat', sans-serif;
  outline: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.seo-tab-btn i {
  font-size: 0.9rem;
  transition: transform 0.2s ease;
}

.seo-tab-btn:hover {
  color: var(--secondary);
  border-color: var(--primary);
  background: rgba(15, 74, 120, 0.04);
  transform: translateY(-0.5px);
}

.seo-tab-btn.active {
  background: var(--secondary);
  color: #FFFFFF !important;
  border-color: var(--secondary);
  box-shadow: 0 4px 10px rgba(15, 74, 120, 0.15);
  font-weight: 700;
}

.seo-tab-btn.active i {
  color: #FFFFFF !important;
  transform: scale(1.05);
}

.seo-tab-btn.active:hover {
  background: var(--secondary);
  color: #FFFFFF !important;
  box-shadow: 0 4px 12px rgba(15, 74, 120, 0.2);
}

/* =========================================
   ESTILOS PREMIUM PARA SIMULADOR RESPONSIVE
   ========================================= */

.device-card {
  background: #ffffff;
  border: 2px solid rgba(15, 74, 120, 0.08);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 5px rgba(0,0,0,0.01);
}

.device-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(15, 74, 120, 0.08);
}

.device-card.active {
  border-color: var(--secondary) !important;
  box-shadow: 0 8px 20px rgba(15, 74, 120, 0.12) !important;
}

.device-card.active i {
  color: var(--secondary) !important;
  transform: scale(1.08);
}

/* Dynamic pulse animation for QR Code scanner active status */
@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.5);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(40, 167, 69, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
  }
}



