:root {

  --bg-app: #ebf1f0;

  --surface: #f7faf9;

  --surface-hover: #e6eeec;

  --border: #cbdad7;


  --primary: #2563eb;
  --primary-light: #eff6ff;
  --primary-border: #bfdbfe;

  --text: #1e293b;
  --text-muted: #64748b;
  --text-inverse: #ffffff;


  --appt-video-bg: rgba(244, 63, 94, 0.12);
  --appt-video-border: rgba(244, 63, 94, 0.35);
  --appt-video-text: #e11d48;

  --appt-audio-bg: rgba(16, 185, 129, 0.12);
  --appt-audio-border: rgba(16, 185, 129, 0.35);
  --appt-audio-text: #059669;

  --appt-face-bg: rgba(234, 179, 8, 0.12);
  --appt-face-border: rgba(234, 179, 8, 0.35);
  --appt-face-text: #ca8a04;

  --appt-waiting-bg: rgba(139, 92, 246, 0.12);
  --appt-waiting-border: rgba(139, 92, 246, 0.35);
  --appt-waiting-text: #7c3aed;


  --radius-xl: 20px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 50px rgba(37, 99, 235, 0.1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}


body.dark {
  color-scheme: dark;
  --bg-app: #070a0f;

  --surface: #0f141d;

  --surface-hover: #171f2c;

  --border: #1a2533;


  --primary: #0d9488;

  --primary-light: rgba(13, 148, 136, 0.12);

  --primary-border: rgba(13, 148, 136, 0.25);

  --text: #f1f5f9;

  --text-muted: #889bb0;

  --text-inverse: #070a0f;


  --appt-video-bg: rgba(13, 148, 136, 0.15);
  --appt-video-border: rgba(13, 148, 136, 0.35);
  --appt-video-text: #14b8a6;

  --appt-audio-bg: rgba(217, 119, 6, 0.15);
  --appt-audio-border: rgba(217, 119, 6, 0.35);
  --appt-audio-text: #fbbf24;

  --appt-face-bg: rgba(225, 29, 72, 0.15);
  --appt-face-border: rgba(225, 29, 72, 0.35);
  --appt-face-text: #f43f5e;

  --appt-waiting-bg: rgba(139, 92, 246, 0.18);
  --appt-waiting-border: rgba(139, 92, 246, 0.45);
  --appt-waiting-text: #a78bfa;

  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.6);
}


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

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-app);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s, color 0.3s;
}

h1,
h2,
h3,
h4,
strong {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--text);
}

button,
input,
select {
  font-family: inherit;
  outline: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  transition: var(--transition);
}

.hidden {
  display: none !important;
}



.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;

  background: radial-gradient(circle at 100% 100%, #e0f2fe 0%, #ccfbf1 100%), #ebf1f0;
  position: relative;
  overflow: hidden;
  transition: background 0.3s ease;
}

body.dark .login-container {

  background: linear-gradient(135deg, #090e17 0%, #072a29 100%);
}

.login-glow-orbs {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 1;
}

.login-glow-orbs .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
}

.login-glow-orbs .orb-1 {
  width: 320px;
  height: 320px;
  background: #0d9488;
  top: -60px;
  left: -60px;
  animation: floatOrb1 15s infinite alternate ease-in-out;
}

.login-glow-orbs .orb-2 {
  width: 400px;
  height: 400px;
  background: #3b82f6;
  bottom: -100px;
  right: -60px;
  animation: floatOrb2 20s infinite alternate ease-in-out;
}

@keyframes floatOrb1 {
  0% {
    transform: translate(0, 0) scale(1);
  }

  100% {
    transform: translate(40px, 30px) scale(1.1);
  }
}

@keyframes floatOrb2 {
  0% {
    transform: translate(0, 0) scale(1);
  }

  100% {
    transform: translate(-60px, -45px) scale(1.15);
  }
}


.login-card {

  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(13, 148, 136, 0.18);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 20px;
  z-index: 2;
  position: relative;
  transition: all 0.3s ease;
}

body.dark .login-card {

  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}


.login-card .login-title {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-align: center;
  color: #0f172a;
  transition: color 0.3s ease;
}

body.dark .login-card .login-title {
  color: #ffffff;
}

.login-card .login-subtitle {
  font-size: 0.68rem;
  color: #0d9488;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: block;
  margin-top: 6px;
  line-height: 1.4;
  text-align: center;
}

.login-card .login-desc {
  text-align: center;
  color: #475569;
  font-size: 0.85rem;
  line-height: 1.5;
  transition: color 0.3s ease;
}

body.dark .login-card .login-desc {
  color: rgba(255, 255, 255, 0.7);
}

.login-card .form-group label {
  color: #334155;
  font-weight: 600;
  transition: color 0.3s ease;
}

body.dark .login-card .form-group label {
  color: rgba(255, 255, 255, 0.9);
}


.login-card .login-input {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #0f172a;
  transition: all 0.3s ease;
}

body.dark .login-card .login-input {
  background: rgba(15, 23, 42, 0.5);
  border-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.login-card .login-input:focus {
  border-color: #0d9488 !important;
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.25), 0 0 15px rgba(13, 148, 136, 0.15) !important;
  background: #ffffff !important;
  outline: none;
}

body.dark .login-card .login-input:focus {
  background: rgba(15, 23, 42, 0.7) !important;
}

.login-card .input-icon {
  color: #64748b;
  transition: color 0.3s ease;
}

body.dark .login-card .input-icon {
  color: rgba(255, 255, 255, 0.7);
}


.login-card .login-submit-btn {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  border: 0;
  box-shadow: 0 4px 15px rgba(13, 148, 136, 0.3);
  color: #ffffff;
  transition: all 0.3s ease;
}

.login-card .login-submit-btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.45);
}


.login-card .login-error {
  background: rgba(239, 68, 68, 0.08);
  border: 1.5px solid rgba(239, 68, 68, 0.2);
  color: #ef4444;
  transition: all 0.3s ease;
}

body.dark .login-card .login-error {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}


.login-card .login-footer {
  text-align: center;
  color: #64748b;
  font-size: 0.72rem;
  transition: color 0.3s ease;
}

body.dark .login-card .login-footer {
  color: rgba(255, 255, 255, 0.4);
}


.login-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.login-brand-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.brand-logo-large {
  width: 80px;
  height: 80px;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.brand-logo-large .eye-brand-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 8px rgba(13, 148, 136, 0.4));
}

.brand-icon-wrap {
  width: 52px;
  height: 52px;
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-md);
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-info h1 {
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}

.brand-info span {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.login-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 16px;
  font-size: 1.1rem;
}

.input-with-icon .styled-input {
  padding-left: 48px;
}

.styled-input {
  width: 100%;
  height: 52px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0 16px;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--surface);
  transition: var(--transition);
}

.styled-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.btn-primary {
  height: 52px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-md);
  font-size: 0.98rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary.full-width {
  width: 100%;
}

.login-error {
  font-size: 0.8rem;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  padding: 12px;
  border-radius: var(--radius-sm);
}

.login-footer {
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 10px;
}


.dashboard-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  transition: grid-template-columns 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard-layout.collapsed {
  grid-template-columns: 80px 1fr;
}

@media (max-width: 1024px) {
  .dashboard-layout {
    grid-template-columns: 80px 1fr;
  }

  .sidebar .sidebar-brand h2,
  .sidebar .nav-label,
  .sidebar .theme-toggle-btn,
  .sidebar .logout-btn,
  .sidebar .btn-text {
    display: none !important;
  }

  .sidebar {
    align-items: center;
    padding: 24px 8px !important;
  }

  .sidebar-nav {
    align-items: center;
  }

  .sidebar .nav-item {
    justify-content: center;
    padding: 0;
    gap: 0;
  }

  .sidebar .theme-toggle-btn,
  .sidebar .logout-btn {
    justify-content: center;
    padding: 0;
    width: 48px;
    height: 48px;
  }
}

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 10;
  transition: padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}


.dashboard-layout.collapsed .sidebar {
  padding: 32px 10px;
  align-items: center;
}

.dashboard-layout.collapsed .sidebar .sidebar-brand-info,
.dashboard-layout.collapsed .sidebar .nav-label,
.dashboard-layout.collapsed .sidebar .btn-text {
  display: none !important;
}

.dashboard-layout.collapsed .sidebar .nav-item {
  justify-content: center;
  padding: 0;
  gap: 0;
}

.dashboard-layout.collapsed .sidebar .theme-toggle-btn,
.dashboard-layout.collapsed .sidebar .logout-btn {
  justify-content: center;
  padding: 0;
  width: 48px;
  height: 48px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}

.sidebar-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-brand h2 {
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.nav-item {
  width: 100%;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-item:hover,
.nav-item.active {
  color: var(--primary);
  background: var(--primary-light);
}

.nav-item.active {
  font-weight: 700;
}

.nav-icon {
  font-size: 1.25rem;
}

.sidebar-bottom {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px dashed var(--border);
  padding-top: 24px;
}

.theme-toggle-btn,
.logout-btn {
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  font-size: 0.9rem;
  font-weight: 600;
}

.theme-toggle-btn {
  color: var(--text);
  border: 1px solid var(--border);
}

.theme-toggle-btn:hover {
  background: var(--surface-hover);
}

.logout-btn {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.06);
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.12);
}


.content-area {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
}

.topbar {
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: 80px;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 9;
}

body.dark .topbar {
  background: rgba(15, 23, 42, 0.85);
}

.search-bar-wrap {
  position: relative;
  width: 100%;
  max-width: 460px;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-bar-wrap input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--border);
  background: var(--bg-app);
  border-radius: var(--radius-lg);
  padding: 0 16px 0 44px;
  font-size: 0.9rem;
  color: var(--text);
  transition: var(--transition);
}

.search-bar-wrap input:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.search-autocomplete-results {
  position: absolute;
  top: 52px;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  max-height: 320px;
  overflow-y: auto;
  z-index: 100;
}

.search-result-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: var(--transition);
}

.search-result-item:hover {
  background: var(--primary-light);
}

.search-result-item strong {
  font-size: 0.9rem;
  color: var(--text);
}

.search-result-item span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-outline {
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.btn-outline:hover {
  background: var(--surface-hover);
}

.header-divider {
  width: 1px;
  height: 30px;
  background-color: var(--border);
}

.icon-btn {
  font-size: 1.3rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.icon-btn:hover {
  background: var(--surface-hover);
}

.badge-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background-color: #ef4444;
  border-radius: 50%;
  border: 2px solid var(--surface);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 1px solid var(--border);
  padding-left: 16px;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-border);
}

.user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.user-info strong {
  font-size: 0.88rem;
}

.user-info span {
  font-size: 0.72rem;
  color: var(--text-muted);
}


.tab-pane {
  display: none;
  padding: 40px;
  flex-grow: 1;
}

.tab-pane.active {
  display: flex;
  flex-direction: column;
  gap: 40px;
}


.welcome-banner {
  background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
  border-radius: var(--radius-xl);
  padding: 32px 40px;
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-lg);
}

.welcome-text h2 {
  color: #ffffff;
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.welcome-text p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
}

.welcome-icon {
  font-size: 3rem;
  opacity: 0.9;
}

.stats-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

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

.stat-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

.stat-icon {
  font-size: 2.2rem;
  width: 56px;
  height: 56px;
  background: var(--primary-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-box h3 {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.stat-box strong {
  font-size: 1.8rem;
  line-height: 1;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.section-header h2 {
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}

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

.header-filters {
  display: flex;
  align-items: center;
  gap: 16px;
}

.segmented-control {
  display: flex;
  background: var(--border);
  border-radius: var(--radius-md);
  padding: 4px;
}

.segment {
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

.segment.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}


.appointments-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: 32px;
}

.calendar-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.week-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.nav-arrow:hover {
  background: var(--surface-hover);
}

.btn-today {
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0 16px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.btn-today:hover {
  background: var(--surface-hover);
}

.calendar-week-range {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
}

.calendar-status-legend {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 16px;
}

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

.legend-dot.video {
  background-color: var(--appt-video-text);
}

.legend-dot.audio {
  background-color: var(--appt-audio-text);
}

.legend-dot.face {
  background-color: var(--appt-face-text);
}


.calendar-viewport {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-hover);
}

.calendar-grid {
  display: grid;
  grid-template-columns: 80px repeat(6, 1fr);
  min-width: 860px;
  position: relative;
}


.grid-header-corner {
  background: var(--surface);
  border-right: 1px solid var(--border);
  border-bottom: 2px solid var(--border);
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  position: sticky;
  left: 0;
  z-index: 3;
}

.grid-header-day {
  background: var(--surface);
  border-right: 1px solid var(--border);
  border-bottom: 2px solid var(--border);
  height: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#day-col-1 {
  grid-column: 2;
}

#day-col-2 {
  grid-column: 3;
}

#day-col-3 {
  grid-column: 4;
}

#day-col-4 {
  grid-column: 5;
}

#day-col-5 {
  grid-column: 6;
}

#day-col-6 {
  grid-column: 7;
}

.grid-header-day strong {
  font-size: 0.85rem;
  font-weight: 600;
}

.day-num {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-muted);
}

.grid-header-day:nth-child(even) .day-num {
  color: var(--primary);
}


.calendar-slots-contents {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 80px repeat(6, 1fr);
  position: relative;
}


.time-slot-label {
  background: var(--surface);
  border-right: 1px solid var(--border);
  border-bottom: 1px dashed var(--border);
  height: 44px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  position: sticky;
  left: 0;
  z-index: 2;
  transition: var(--transition);
}

.time-slot-label[style*="cursor: pointer"]:hover {
  background: var(--surface-hover);
  color: var(--primary);
}


.day-slot-cell {
  height: 44px;
  border-right: 1px solid var(--border);
  border-bottom: 1px dashed var(--border);
  position: relative;
  background: var(--surface);
  transition: var(--transition);
}

.day-slot-cell:hover {
  background: var(--primary-light) !important;
}

.day-slot-cell.slot-blocked {
  background: repeating-linear-gradient(45deg,
      rgba(100, 116, 139, 0.03),
      rgba(100, 116, 139, 0.03) 10px,
      rgba(100, 116, 139, 0.08) 10px,
      rgba(100, 116, 139, 0.08) 20px) !important;
  cursor: not-allowed;
  pointer-events: auto;
}

.day-slot-cell.slot-occupied {
  cursor: not-allowed;
  pointer-events: auto;
}

body.dark .day-slot-cell.slot-blocked {
  background: repeating-linear-gradient(45deg,
      rgba(148, 163, 184, 0.03),
      rgba(148, 163, 184, 0.03) 10px,
      rgba(148, 163, 184, 0.08) 10px,
      rgba(148, 163, 184, 0.08) 20px) !important;
}

.day-slot-cell.slot-blocked::after {
  content: 'Libre';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  opacity: 0.45;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.day-slot-cell.slot-blocked:hover {
  background: repeating-linear-gradient(45deg,
      rgba(100, 116, 139, 0.05),
      rgba(100, 116, 139, 0.05) 10px,
      rgba(100, 116, 139, 0.1) 10px,
      rgba(100, 116, 139, 0.1) 20px) !important;
}


.appointment-card {
  position: absolute;
  inset: 4px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  padding: 3px 6px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
  z-index: 4;
  line-height: 1.15;
}

.appointment-card:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-md);
  z-index: 5;
}

.appointment-card strong {
  font-size: 0.74rem;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  display: block;
  line-height: 1.15;
  margin: 0;
}

.appointment-stacked-wrapper {
  display: flex !important;
  flex-direction: row !important;
  gap: 3px !important;
  padding: 3px !important;
  position: relative !important;
  z-index: 10 !important;
  height: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.appointment-card.stacked-card {
  position: relative !important;
  inset: auto !important;
  margin: 0 !important;
  height: 100% !important;
  min-height: 0 !important;
  flex: 1 !important;
  width: 0 !important;
  min-width: 0 !important;
  padding: 2px 4px !important;
  box-sizing: border-box !important;
}

.appt-type-badge {
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.15;
  margin: 0;
}


.appointment-card.video {
  background-color: var(--appt-video-bg);
  border-color: var(--appt-video-border);
  color: var(--appt-video-text);
}

.appointment-card.video strong {
  color: var(--appt-video-text);
}

.appointment-card.audio {
  background-color: var(--appt-audio-bg);
  border-color: var(--appt-audio-border);
  color: var(--appt-audio-text);
}

.appointment-card.audio strong {
  color: var(--appt-audio-text);
}

.appointment-card.face {
  background-color: var(--appt-face-bg);
  border-color: var(--appt-face-border);
  color: var(--appt-face-text);
}

.appointment-card.face strong {
  color: var(--appt-face-text);
}

.appointment-card.waiting {
  background-color: var(--appt-waiting-bg);
  border-color: var(--appt-waiting-border);
  color: var(--appt-waiting-text);
}

.appointment-card.waiting strong {
  color: var(--appt-waiting-text);
}


.appointment-card.general,
.appointment-card.consulta-general {
  background-color: rgba(13, 148, 136, 0.12);
  border-color: rgba(13, 148, 136, 0.35);
  color: #0d9488;
}

.appointment-card.general strong,
.appointment-card.consulta-general strong {
  color: #0d9488;
}

body.dark .appointment-card.general,
body.dark .appointment-card.consulta-general {
  background-color: rgba(13, 148, 136, 0.2);
  border-color: rgba(13, 148, 136, 0.5);
  color: #2dd4bf;
}

body.dark .appointment-card.general strong,
body.dark .appointment-card.consulta-general strong {
  color: #2dd4bf;
}

.appointment-card.retiro,
.appointment-card.retiro-de-puntos {
  background-color: rgba(217, 119, 6, 0.12);
  border-color: rgba(217, 119, 6, 0.35);
  color: #d97706;
}

.appointment-card.retiro strong,
.appointment-card.retiro-de-puntos strong {
  color: #d97706;
}

body.dark .appointment-card.retiro,
body.dark .appointment-card.retiro-de-puntos {
  background-color: rgba(217, 119, 6, 0.2);
  border-color: rgba(217, 119, 6, 0.5);
  color: #fbbf24;
}

body.dark .appointment-card.retiro strong,
body.dark .appointment-card.retiro-de-puntos strong {
  color: #fbbf24;
}

.appointment-card.operacion,
.appointment-card.operación {
  background-color: rgba(225, 29, 72, 0.12);
  border-color: rgba(225, 29, 72, 0.35);
  color: #e11d48;
}

.appointment-card.operacion strong,
.appointment-card.operación strong {
  color: #e11d48;
}

body.dark .appointment-card.operacion,
body.dark .appointment-card.operación {
  background-color: rgba(225, 29, 72, 0.2);
  border-color: rgba(225, 29, 72, 0.5);
  color: #f43f5e;
}

body.dark .appointment-card.operacion strong,
body.dark .appointment-card.operación strong {
  color: #f43f5e;
}



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

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

.insight-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.card-title-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title-wrap h3 {
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.small-select {
  height: 36px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 0 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}


.queue-chart-wrap {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto;
}

.queue-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-10deg);
}

.svg-progress-arc {
  transition: stroke-dashoffset 0.8s ease-in-out;
}

.queue-chart-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  padding-bottom: 10px;
}

.queue-chart-label strong {
  font-size: 2rem;
  line-height: 1.1;
}

.queue-chart-label span {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.queue-legends {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top: 1px dashed var(--border);
  padding-top: 24px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.legend-color-pulp {
  width: 14px;
  height: 14px;
  border-radius: 4px;
}

.legend-color-pulp.blue {
  background-color: #3b82f6;
}

.legend-color-pulp.green {
  background-color: #10b981;
}

.legend-color-pulp.dashed {
  border: 2px dashed var(--text-muted);
}

.legend-text {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.legend-text span {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.legend-text strong {
  font-size: 0.9rem;
}


.search-field-small {
  position: relative;
  display: flex;
  align-items: center;
}

.search-field-small span {
  position: absolute;
  left: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.search-field-small input {
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding-left: 28px;
  padding-right: 10px;
  font-size: 0.8rem;
  background: var(--bg-app);
  color: var(--text);
  width: 140px;
  transition: var(--transition);
}

.search-field-small input:focus {
  width: 200px;
  background: var(--surface);
  border-color: var(--primary);
}

.table-responsive {
  overflow-x: auto;
}

.patients-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.patients-table th {
  padding: 14px 16px;
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  border-bottom: 1.5px solid var(--border);
}

.patients-table td {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text);
}

.patient-meta-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.patient-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.patients-table tr:hover td {
  background-color: var(--surface-hover);
}


.status-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  display: inline-block;
}

.status-badge.done {
  background-color: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.status-badge.pending {
  background-color: rgba(234, 179, 8, 0.12);
  color: #ca8a04;
}

.status-badge.canceled {
  background-color: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.action-dots-btn {
  font-size: 1.2rem;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-dots-btn:hover {
  background: var(--border);
  color: var(--text);
}

.table-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1.5px solid var(--border);
  padding-top: 20px;
}

.pagination-info {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.pagination-buttons {
  display: flex;
  gap: 8px;
}

.btn-nav-page {
  height: 36px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}

.btn-nav-page:hover {
  background: var(--surface-hover);
}


.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 36px;
  width: 90%;
  max-width: 460px;
  position: relative;
  animation: scaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleUp {
  from {
    transform: scale(0.92);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 1.8rem;
  color: var(--text-muted);
}

.modal-close:hover {
  color: var(--text);
}

.modal-header {
  margin-bottom: 24px;
}

.modal-header h2 {
  font-size: 1.35rem;
  margin-bottom: 4px;
}

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

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.action-buttons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.btn-danger {
  height: 52px;
  background-color: #ef4444;
  color: #fff;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
  filter: brightness(1.1);
}


.toast-container {
  position: fixed;
  bottom: 32px;
  right: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999;
}

.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: var(--shadow-md);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes slideIn {
  from {
    transform: translateY(40px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.toast.success {
  border-left-color: #10b981;
}

.toast.error {
  border-left-color: #ef4444;
}


.input-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.notification-dropdown {
  position: absolute;
  top: 52px;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  width: 280px;
  box-shadow: var(--shadow-md);
  padding: 16px;
  z-index: 1000;
}

.notification-dropdown h3 {
  font-size: 0.95rem;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.notification-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notification-item {
  display: flex;
  gap: 10px;
  font-size: 0.8rem;
}

.n-body {
  display: flex;
  flex-direction: column;
}

.n-body strong {
  font-size: 0.8rem;
  color: var(--text);
}

.n-body span {
  font-size: 0.72rem;
  color: var(--text-muted);
}


@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.pending-appt-banner {
  background: var(--primary-light) !important;
  border: 1.5px solid var(--primary-border) !important;
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: var(--shadow-sm);
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) ease;
}

body.dark .pending-appt-banner {
  background: rgba(37, 99, 235, 0.1) !important;
  border-color: rgba(37, 99, 235, 0.3) !important;
}

.express-form-card {
  background: var(--surface) !important;
  border: 1.5px dashed var(--primary) !important;
  border-radius: var(--radius-md);
  padding: 24px;
  margin-top: 16px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) ease;
  transition: var(--transition);
}

body.dark .express-form-card {
  border-color: rgba(59, 130, 246, 0.5) !important;
  background: rgba(30, 41, 59, 0.3) !important;
}

.express-form-card:hover {
  border-style: solid;
  box-shadow: var(--shadow-lg);
}

.express-form-card h3 {
  color: var(--primary);
  margin-bottom: 6px;
}

.express-form-card .styled-input {
  background: var(--bg-app) !important;
  border: 1.5px solid var(--border) !important;
  transition: var(--transition);
}

.express-form-card .styled-input:focus {
  background: var(--surface) !important;
  border-color: var(--primary) !important;
}


.calendar-grid.focus-day-1 {
  grid-template-columns: 80px 1fr 0fr 0fr 0fr 0fr 0fr;
}

.calendar-grid.focus-day-2 {
  grid-template-columns: 80px 0fr 1fr 0fr 0fr 0fr 0fr;
}

.calendar-grid.focus-day-3 {
  grid-template-columns: 80px 0fr 0fr 1fr 0fr 0fr 0fr;
}

.calendar-grid.focus-day-4 {
  grid-template-columns: 80px 0fr 0fr 0fr 1fr 0fr 0fr;
}

.calendar-grid.focus-day-5 {
  grid-template-columns: 80px 0fr 0fr 0fr 0fr 1fr 0fr;
}

.calendar-grid.focus-day-6 {
  grid-template-columns: 80px 0fr 0fr 0fr 0fr 0fr 1fr;
}

.calendar-grid.focus-day-1 .calendar-slots-contents {
  grid-template-columns: 80px 1fr 0fr 0fr 0fr 0fr 0fr;
}

.calendar-grid.focus-day-2 .calendar-slots-contents {
  grid-template-columns: 80px 0fr 1fr 0fr 0fr 0fr 0fr;
}

.calendar-grid.focus-day-3 .calendar-slots-contents {
  grid-template-columns: 80px 0fr 0fr 1fr 0fr 0fr 0fr;
}

.calendar-grid.focus-day-4 .calendar-slots-contents {
  grid-template-columns: 80px 0fr 0fr 0fr 1fr 0fr 0fr;
}

.calendar-grid.focus-day-5 .calendar-slots-contents {
  grid-template-columns: 80px 0fr 0fr 0fr 0fr 1fr 0fr;
}

.calendar-grid.focus-day-6 .calendar-slots-contents {
  grid-template-columns: 80px 0fr 0fr 0fr 0fr 0fr 1fr;
}


.calendar-grid.focus-day-1 [data-col]:not([data-col="1"]) {
  display: none !important;
}

.calendar-grid.focus-day-2 [data-col]:not([data-col="2"]) {
  display: none !important;
}

.calendar-grid.focus-day-3 [data-col]:not([data-col="3"]) {
  display: none !important;
}

.calendar-grid.focus-day-4 [data-col]:not([data-col="4"]) {
  display: none !important;
}

.calendar-grid.focus-day-5 [data-col]:not([data-col="5"]) {
  display: none !important;
}

.calendar-grid.focus-day-6 [data-col]:not([data-col="6"]) {
  display: none !important;
}


.calendar-grid.focus-day-1 .grid-header-day:not(#day-col-1) {
  display: none !important;
}

.calendar-grid.focus-day-2 .grid-header-day:not(#day-col-2) {
  display: none !important;
}

.calendar-grid.focus-day-3 .grid-header-day:not(#day-col-3) {
  display: none !important;
}

.calendar-grid.focus-day-4 .grid-header-day:not(#day-col-4) {
  display: none !important;
}

.calendar-grid.focus-day-5 .grid-header-day:not(#day-col-5) {
  display: none !important;
}

.calendar-grid.focus-day-6 .grid-header-day:not(#day-col-6) {
  display: none !important;
}


.grid-header-day {
  cursor: pointer;
  position: relative;
  transition: background-color 0.2s ease, transform 0.2s ease;
  -webkit-user-select: none;
  user-select: none;
}

.grid-header-day:hover {
  background-color: var(--primary-light) !important;
}


.calendar-grid[class*="focus-day-"] .grid-header-day {
  background: var(--primary-light) !important;
  border-bottom: 3px solid var(--primary) !important;
}

.calendar-grid[class*="focus-day-"] .grid-header-day strong {
  color: var(--primary) !important;
}


.grid-header-day::after {
  content: '🔍';
  font-size: 0.65rem;
  position: absolute;
  top: 4px;
  right: 6px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.grid-header-day:hover::after {
  opacity: 0.7;
}

.calendar-grid[class*="focus-day-"] .grid-header-day::after {
  content: '✕';
  opacity: 0.9;
  color: var(--primary);
  font-weight: bold;
}


.dashboard-split-layout {
  display: grid;
  grid-template-columns: 2.1fr 1fr;
  gap: 24px;
  margin-top: 24px;
  align-items: stretch;
}

@media (max-width: 1024px) {
  .dashboard-split-layout {
    grid-template-columns: 1fr;
  }
}


.dash-upcoming-table th {
  padding: 14px 16px;
  border-bottom: 2px solid var(--border);
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.dash-upcoming-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text);
  vertical-align: middle;
}

.dash-upcoming-table tbody tr {
  transition: var(--transition);
}

.dash-upcoming-table tbody tr:hover {
  background: var(--primary-light);
}

body.dark .dash-upcoming-table tbody tr:hover {
  background: rgba(13, 148, 136, 0.08);
}


.patient-avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, #0f766e 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}


.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.badge-success,
.badge-confirmada {
  background: rgba(16, 185, 129, 0.12) !important;
  color: #10b981 !important;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-warning,
.badge-pendiente {
  background: rgba(245, 158, 11, 0.12) !important;
  color: #d97706 !important;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-danger,
.badge-cancelada {
  background: rgba(239, 68, 68, 0.12) !important;
  color: #ef4444 !important;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-info {
  background: rgba(59, 130, 246, 0.12) !important;
  color: #3b82f6 !important;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

body.dark .badge-success,
body.dark .badge-confirmada {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #34d399 !important;
}

body.dark .badge-warning,
body.dark .badge-pendiente {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #fbbf24 !important;
}

body.dark .badge-danger,
body.dark .badge-cancelada {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #f87171 !important;
}

body.dark .badge-info {
  background: rgba(59, 130, 246, 0.15) !important;
  color: #60a5fa !important;
}


.badge-asis {
  background: rgba(13, 148, 136, 0.12) !important;
  color: #0d9488 !important;
  border: 1px solid rgba(13, 148, 136, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

body.dark .badge-asis {
  background: rgba(20, 184, 166, 0.15) !important;
  color: #2dd4bf !important;
}

.badge-asis::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #0d9488;
  animation: badgePulse 1.5s infinite ease-in-out;
}

body.dark .badge-asis::before {
  background-color: #2dd4bf;
}

@keyframes badgePulse {
  0% {
    transform: scale(0.85);
    opacity: 0.5;
    box-shadow: 0 0 0 0 rgba(13, 148, 136, 0.7);
  }

  50% {
    transform: scale(1.1);
    opacity: 1;
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0);
  }

  100% {
    transform: scale(0.85);
    opacity: 0.5;
    box-shadow: 0 0 0 0 rgba(13, 148, 136, 0);
  }
}


.live-waiting-card {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.05) 0%, rgba(15, 118, 110, 0.05) 100%) !important;
  border: 1.5px solid rgba(13, 148, 136, 0.2) !important;
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) ease;
}

body.dark .live-waiting-card {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.07) 0%, rgba(13, 148, 136, 0.03) 100%) !important;
  border-color: rgba(20, 184, 166, 0.25) !important;
}

.live-waiting-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 4px;
  background: var(--primary);
}

.waiting-patients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.waiting-patient-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-xs);
}

.waiting-patient-item:hover {
  transform: translateY(-2px);
  border-color: var(--primary-border);
  box-shadow: var(--shadow-sm);
}

.waiting-patient-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.waiting-patient-details h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.waiting-patient-details span {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  display: block;
  margin-top: 2px;
}

.waiting-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.waiting-time-badge {
  font-size: 0.65rem;
  background: var(--border);
  color: var(--text);
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}


.mini-calendar-grid .mini-day {
  aspect-ratio: 1/1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
  color: var(--text);
  position: relative;
}

.mini-calendar-grid .mini-day:hover {
  background: var(--border);
}

.mini-calendar-grid .mini-day.active-day {
  background: var(--primary) !important;
  color: #ffffff !important;
  font-weight: 700;
}

.mini-calendar-grid .mini-day.other-month {
  color: var(--text-muted);
  opacity: 0.4;
}


.mini-day-dot {
  width: 4px;
  height: 4px;
  background: var(--primary);
  border-radius: 50%;
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
}

.mini-day.active-day .mini-day-dot {
  background: #ffffff !important;
}


.reminder-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  gap: 12px;
  transition: var(--transition);
}

.reminder-item:hover {
  border-color: var(--primary-border);
  background: var(--primary-light);
}

.reminder-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.reminder-text {
  font-size: 0.85rem;
  color: var(--text);
  font-weight: 500;
  transition: var(--transition);
  line-height: 1.4;
}

.reminder-item.completed .reminder-text {
  text-decoration: line-through;
  opacity: 0.45;
}


.reminder-checkbox {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--text-muted);
  border-radius: 50%;
  outline: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.reminder-checkbox:checked {
  border-color: var(--primary);
  background: var(--primary);
}

.reminder-checkbox:checked::after {
  content: '✓';
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: bold;
}

.reminder-delete-btn {
  background: none;
  border: 0;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 0.85rem;
  opacity: 0.5;
  transition: var(--transition);
  border-radius: var(--radius-sm);
}

.reminder-item:hover .reminder-delete-btn {
  opacity: 0.9;
}

.reminder-delete-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}



.patients-split-layout {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 24px;
  margin-top: 20px;
  align-items: start;
}

.patients-main-col {
  min-width: 0;

}

.patients-side-col {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.patients-premium-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.patients-premium-table th {
  padding: 14px 16px;
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  border-bottom: 1.5px solid var(--border);
}

.patients-premium-table td {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text);
  vertical-align: middle;
}

.patients-premium-table tr {
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.patients-premium-table tr:hover td {
  background-color: var(--surface-hover);
}

.patients-premium-table tr.selected-row td {
  background-color: var(--primary-light) !important;
  border-bottom-color: var(--primary-border);
}


.timeline-item {
  position: relative;
  padding-bottom: 20px;
  padding-left: 12px;
}

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

.timeline-dot {
  position: absolute;
  left: -19px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease;
}

.timeline-item:hover .timeline-dot {
  transform: scale(1.3);
}

.timeline-content {
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.timeline-content:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-sm);
}


@media (max-width: 1024px) {
  .patients-split-layout {
    grid-template-columns: 1fr;
  }

  .patients-side-col {
    position: static;
  }
}




body.role-secretaria .hide-for-secretary,
body.role-secretaria #tabPacConsultasBtn,
body.role-secretaria #pacPanelConsultas {
  display: none !important;
}


body.role-doctor .hide-for-doctor {
  display: none !important;
}


.popout-mode body {
  background: var(--bg-app);
  padding: 0;
  margin: 0;
  overflow-x: hidden;
}

.popout-mode .sidebar,
.popout-mode .topbar,
.popout-mode .dash-support-banner,
.popout-mode .dash-welcome-row,
.popout-mode .stats-overview-grid,
.popout-mode .dash-side-col,
.popout-mode .insight-card {
  display: none !important;
}

.popout-mode .dashboard-layout {
  display: block !important;
  grid-template-columns: 1fr;
  padding: 0 !important;
  margin: 0 !important;
}

.popout-mode .content-area {
  margin-left: 0 !important;
  padding: 0 !important;
  height: 100vh !important;
}

.popout-mode .main-content {
  margin-left: 0 !important;
  padding: 0 !important;
}

.popout-mode .tab-pane {
  padding: 12px !important;
}

.popout-mode #liveWaitingRoomCard {
  margin: 0 !important;
  min-height: 100vh;
  border-radius: 0;
  border: none;
  box-shadow: none;
  background: transparent;
}


.popout-mode #popoutWaitingRoomBtn,
.popout-mode .hide-in-popout {
  display: none !important;
}


.live-sync-indicator {
  display: flex !important;
  align-items: center;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-dot-effect 1.8s infinite;
}

@keyframes pulse-dot-effect {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}


.popout-mode #waitingPatientsGrid {
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  padding-right: 4px;
}

.popout-mode #waitingPatientsGrid::-webkit-scrollbar {
  width: 6px;
}

.popout-mode #waitingPatientsGrid::-webkit-scrollbar-track {
  background: transparent;
}

.popout-mode #waitingPatientsGrid::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
}

.popout-mode #waitingPatientsGrid::-webkit-scrollbar-thumb:hover {
  background: var(--primary-border);
}


.appointment-card.appointment-extraordinary {
  border: 2px dashed #f59e0b !important;
  background: linear-gradient(135deg, var(--surface) 0%, rgba(245, 158, 11, 0.05) 100%) !important;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.appointment-card.appointment-extraordinary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.25) !important;
}

body.dark .appointment-card.appointment-extraordinary {
  background: linear-gradient(135deg, #1e1e2f 0%, rgba(245, 158, 11, 0.08) 100%) !important;
}


@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-5px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.whatsapp-dropdown-menu button:active {
  background: var(--border) !important;
}


.mobile-nav {
  display: none;
}

@media (max-width: 640px) {

  .dashboard-layout {
    grid-template-columns: 1fr !important;
  }
  
  .sidebar {
    display: none !important;
  }
  
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    z-index: 10000;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
    padding: 0 8px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  
  .mobile-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 600;
    height: 100%;
    width: auto;
    flex: 1;
    gap: 4px;
    padding: 6px 0;
    border-radius: 0;
  }
  
  .mobile-nav .nav-item .nav-icon {
    font-size: 1.25rem;
    line-height: 1;
  }
  
  .mobile-nav .nav-item.active {
    color: var(--primary);
    background: transparent !important;
    font-weight: 700;
  }
  
  .mobile-nav .nav-item.active .nav-icon {
    transform: translateY(-2px);
    transition: transform 0.2s ease;
  }

  .content-area {
    height: 100vh;
    overflow-y: auto;
  }
  
  .tab-pane {
    padding: 16px 16px 90px 16px !important; 
    gap: 20px !important;
  }
  
  .tab-pane.active {
    gap: 20px !important;
  }
  

  .topbar {
    display: grid !important;
    grid-template-areas: 
      "brand actions"
      "search search" !important;
    grid-template-columns: 1fr auto !important;
    gap: 12px !important;
    height: auto !important;
    padding: 12px 16px !important;
    position: sticky !important;
    top: 0 !important;
  }
  
  .mobile-brand-header {
    display: flex !important;
    grid-area: brand;
    align-items: center;
    align-self: center;
  }
  
  .search-bar-wrap {
    grid-area: search;
    max-width: 100% !important;
  }
  
  .topbar-actions {
    grid-area: actions;
    width: auto !important;
    justify-content: flex-end !important;
    gap: 12px !important;
    align-self: center;
  }
  
  .user-profile {
    border-left: none !important;
    padding-left: 0 !important;
  }


  .stats-overview-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  
  
  .dashboard-split-layout {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  
  .patients-split-layout {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  } 
  

  .modal-overlay {
    align-items: flex-start !important;
    overflow-y: auto !important;
    padding: 20px 10px !important;
  }
  
  .modal-box {
    margin-top: auto !important;
    margin-bottom: auto !important;
    padding: 24px 16px !important;
    width: 100% !important;
    max-height: none !important;
  }
  

  .modal-box div[style*="grid-template-columns: 1fr 1fr"],
  .modal-box div[style*="1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  

  #pacModal .modal-box {
    max-height: 90vh !important;
    display: flex;
    flex-direction: column;
  }


  .calendar-grid[class*="focus-day-"] {
    min-width: 100% !important; 
  }
  

  .styled-input, button, .btn-primary, .btn-outline {
    min-height: 40px; 
  }


  .desktop-calendar-view {
    display: none !important;
  }
  
  .mobile-calendar-view {
    display: flex !important;
    flex-direction: column;
    gap: 16px;
    padding: 8px 0 20px 0;
  }
  
  .mobile-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    box-shadow: var(--shadow-sm);
  }
  
  .mobile-week-nav-btn {
    background: var(--surface-hover);
    border: none;
    color: var(--text);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
  }
  
  .mobile-week-nav-btn:active {
    background: var(--border);
  }
  
  .mobile-week-range-selector {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
  }
  
  .mobile-day-strip {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px;
    box-shadow: var(--shadow-sm);
  }
  
  .mobile-day-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px 4px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
  }
  
  .mobile-day-btn .day-name {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 600;
  }
  
  .mobile-day-btn .day-num {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
  }
  
  .mobile-day-btn.active .day-num {
    background: var(--primary);
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
  }
  
  .mobile-day-btn.active .day-name {
    color: var(--primary);
    font-weight: 700;
  }
  
  .mobile-selected-day-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 6px;
    border-bottom: 1px dashed var(--border);
    padding-bottom: 12px;
  }
  
  #mobileSelectedDayLabel {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
  }
  
  .mobile-btn-today {
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
  }
  
  .mobile-btn-today:active {
    background: var(--primary-border);
  }
  
  .mobile-slots-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  
  .mobile-slot-card {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
    overflow: hidden;
  }
  
  .mobile-slot-card:active {
    transform: scale(0.98);
    background: var(--surface-hover);
  }
  
  .mobile-slot-card.available {
    border-left: 4px solid #10b981;
  }
  
  .mobile-slot-card.occupied.normal {
    border-left: 4px solid var(--primary);
  }
  
  .mobile-slot-card.occupied.operacion {
    border-left: 4px solid #f43f5e;
  }
  
  .mobile-slot-card.occupied.retiro {
    border-left: 4px solid #eab308;
  }
  
  .mobile-slot-card.blocked {
    border-left: 4px solid #64748b;
    opacity: 0.8;
  }
  
  .mobile-slot-time-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-right: 14px;
    border-right: 1px solid var(--border);
    min-width: 55px;
  }
  
  .mobile-slot-time-col .time-val {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
  }
  
  .mobile-slot-time-col .time-period {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
  }
  
  .mobile-slot-info-col {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 14px;
  }
  
  .mobile-slot-icon-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    background: var(--surface-hover);
  }
  
  .mobile-slot-icon-badge.normal {
    background: var(--primary-light);
    color: var(--primary);
  }
  
  .mobile-slot-icon-badge.operacion {
    background: rgba(244, 63, 94, 0.12);
    color: #e11d48;
  }
  
  .mobile-slot-icon-badge.retiro {
    background: rgba(234, 179, 8, 0.12);
    color: #ca8a04;
  }
  
  .mobile-slot-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  
  .mobile-slot-details .patient-name,
  .mobile-slot-details .status-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
  }
  
  .mobile-slot-details .patient-phone-row,
  .mobile-slot-details .status-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
  }
  
  .mobile-slot-badge-col {
    display: flex;
    align-items: center;
    padding-left: 8px;
  }
  
  .mobile-appt-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.02em;
  }
  
  .mobile-appt-badge.normal {
    background: var(--primary-light);
    color: var(--primary);
  }
  
  .mobile-appt-badge.operacion {
    background: rgba(244, 63, 94, 0.12);
    color: #e11d48;
  }
  
  .mobile-appt-badge.retiro {
    background: rgba(234, 179, 8, 0.12);
    color: #ca8a04;
  }
  
  .mobile-slot-arrow-col {
    color: var(--text-muted);
    font-size: 0.85rem;
    opacity: 0.6;
    padding-left: 10px;
  }
  
  .mobile-fab-btn {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: #ffffff;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
    cursor: pointer;
    z-index: 9999;
    transition: all 0.2s ease;
    border: none;
  }
  
  .mobile-fab-btn:active {
    transform: scale(0.9) rotate(90deg);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
  }

  .dash-welcome-actions {
    display: flex !important;
    width: 100% !important;
    overflow-x: auto !important;
    padding: 4px 0 12px 0 !important;
    gap: 8px !important;
    scrollbar-width: none; 
  }
  .dash-welcome-actions::-webkit-scrollbar {
    display: none; 
  }
  .dash-welcome-actions button,
  .dash-welcome-actions select {
    flex-shrink: 0 !important;
    height: 40px !important;
    font-size: 0.85rem !important;
    padding: 0 12px !important;
  }


  .stats-overview-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
    margin-bottom: 16px !important;
  }
  
  .stat-box {
    flex-direction: column !important;
    text-align: center !important;
    gap: 6px !important;
    padding: 10px 4px !important;
    border-radius: var(--radius-md) !important;
  }
  
  .stat-box .stat-icon {
    width: 34px !important;
    height: 34px !important;
    font-size: 1rem !important;
    margin: 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
  }
  
  .stat-box h3 {
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    color: var(--text-muted) !important;
    letter-spacing: 0.02em !important;
    margin-bottom: 0 !important;
  }
  
  .stat-box strong {
    font-size: 1.25rem !important;
    display: block !important;
    line-height: 1.1 !important;
    color: var(--text) !important;
  }


  #miniCalendarCard {
    display: none !important;
  }


  .dash-upcoming-table, 
  .dash-upcoming-table tbody, 
  .dash-upcoming-table tr, 
  .dash-upcoming-table td {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .dash-upcoming-table thead {
    display: none !important;
  }
  .dash-upcoming-table tr {
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-md) !important;
    background: var(--surface) !important;
    padding: 12px 14px !important;
    margin-bottom: 12px !important;
    position: relative !important;
  }
  .dash-upcoming-table td {
    padding: 0 !important;
    border: none !important;
    text-align: left !important;
    height: auto !important;
    line-height: 1.3 !important;
  }
  

  .dash-upcoming-table tr td:first-child {
    font-size: 0.85rem !important;
    color: var(--primary) !important;
    font-weight: 800 !important;
    margin-bottom: 8px !important;
  }
  

  .dash-upcoming-table tr td:nth-child(2) {
    margin-bottom: 10px !important;
  }
  

  .dash-upcoming-table tr td:nth-child(3) {
    display: inline-block !important;
    width: auto !important;
    margin-right: 8px !important;
    vertical-align: middle !important;
  }
  .dash-upcoming-table tr td:nth-child(3) .appt-type-badge {
    font-size: 0.7rem !important;
    padding: 3px 8px !important;
  }
  .dash-upcoming-table tr td:nth-child(3) span[style*="display: block"] {
    display: inline !important;
    font-size: 0.75rem !important;
    color: var(--text-muted) !important;
    margin-left: 6px !important;
  }
  

  .dash-upcoming-table tr td:nth-child(4) {
    display: inline-block !important;
    width: auto !important;
    vertical-align: middle !important;
  }
  .dash-upcoming-table tr td:nth-child(4) .badge {
    font-size: 0.7rem !important;
    padding: 3px 8px !important;
  }
  

  .dash-upcoming-table tr td:nth-child(5) {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    width: auto !important;
  }
  .dash-upcoming-table tr td:nth-child(5) > div {
    display: flex !important;
    gap: 6px !important;
    justify-content: flex-end !important;
  }
  

  .dash-support-banner {
    flex-direction: column !important;
    text-align: center !important;
    padding: 20px !important;
    gap: 16px !important;
  }
  .dash-support-banner button {
    margin: 0 auto !important;
  }


  
  .patient-sub-desktop {
    display: none !important;
  }
  .patient-sub-mobile {
    display: block !important;
    margin-top: 2px !important;
  }
  
  .patients-premium-table, 
  .patients-premium-table tbody, 
  .patients-premium-table tr, 
  .patients-premium-table td {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .patients-premium-table thead {
    display: none !important;
  }
  .patients-premium-table tr {
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-md) !important;
    background: var(--surface) !important;
    padding: 12px 36px 12px 14px !important;
    margin-bottom: 12px !important;
    position: relative !important;
    cursor: pointer !important;
  }
  .patients-premium-table tr:has(button) {
    padding-right: 130px !important;
  }
  .patients-premium-table td {
    padding: 0 !important;
    border: none !important;
    text-align: left !important;
    height: auto !important;
    line-height: 1.3 !important;
  }
  

  .patients-premium-table tr td:first-child {
    margin-bottom: 8px !important;
  }
  .patients-premium-table tr td:first-child .patient-meta-cell {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
  }
  

  .patients-premium-table tr td:nth-child(2) {
    display: none !important;
  }
  

  .patients-premium-table tr td:nth-child(3) {
    display: inline-block !important;
    width: auto !important;
    margin-right: 12px !important;
    font-size: 0.8rem !important;
    color: var(--text-muted) !important;
    vertical-align: middle !important;
  }
  .patients-premium-table tr td:nth-child(3)::before {
    content: "Última: " !important;
    font-weight: 600 !important;
    color: var(--text-muted) !important;
  }
  

  .patients-premium-table tr td:nth-child(4) {
    display: inline-block !important;
    width: auto !important;
    vertical-align: middle !important;
  }
  .patients-premium-table tr td:nth-child(4) .badge {
    font-size: 0.7rem !important;
    padding: 3px 8px !important;
  }
  

  .patients-premium-table tr td:nth-child(5) {
    position: absolute !important;
    top: 50% !important;
    right: 14px !important;
    transform: translateY(-50%) !important;
    width: auto !important;
  }
}


.appointment-card.status-confirmada {
  border-left: 4px solid #10b981 !important;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.15);
}

.appointment-card.status-asistio {
  border-left: 4px solid #8b5cf6 !important;
  background-color: rgba(139, 92, 246, 0.08) !important;
  box-shadow: 0 2px 6px rgba(139, 92, 246, 0.15);
  animation: cardPulse 2.5s infinite ease-in-out;
}

@keyframes cardPulse {
  0% { box-shadow: 0 2px 6px rgba(139, 92, 246, 0.15); }
  50% { box-shadow: 0 2px 12px rgba(139, 92, 246, 0.3); border-color: rgba(139, 92, 246, 0.5); }
  100% { box-shadow: 0 2px 6px rgba(139, 92, 246, 0.15); }
}

.appointment-card.status-completada {
  opacity: 0.65;
  filter: grayscale(30%);
  border-left: 4px solid #3b82f6 !important;
  text-decoration: line-through;
}


.mobile-slot-card.status-confirmada {
  border-left: 5px solid #10b981 !important;
}

.mobile-slot-card.status-asistio {
  border-left: 5px solid #8b5cf6 !important;
  background-color: rgba(139, 92, 246, 0.05) !important;
}

.mobile-slot-card.status-completada {
  opacity: 0.65;
  border-left: 5px solid #3b82f6 !important;
}

.status-indicator {
  font-size: 0.72rem;
  margin-right: 3px;
  display: inline-block;
  vertical-align: middle;
}