/* Global Loader */
#global-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-main);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.loader-logo {
  width: 130px;
  animation: pulse-logo 2s infinite ease-in-out;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.05));
}

@keyframes pulse-logo {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

.loader-text {
  margin-top: 25px;
  font-family: 'Cairo';
  font-weight: 800;
  color: var(--text-primary);
  font-size: 15px;
  letter-spacing: 1px;
}

#login-screen,
#app-container {
  display: none;
}

@keyframes pulse-badge {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.75;
    transform: scale(1.1);
  }
}

.sidebar-rail {
  display: flex;
  flex-direction: column;
}

.sidebar-rail .rail-item:last-child {
  margin-top: auto;
}

/* Premium Controls (Search & Filter) */
.premium-controls-row .select2-container--default .select2-selection--single {
  height: 52px !important;
  border-radius: 16px !important;
  border: 1.5px solid var(--border-medium) !important;
  background-color: var(--bg-elevated) !important;
  display: flex !important;
  align-items: center !important;
  transition: all 0.3s ease !important;
}

.premium-controls-row .select2-container--default .select2-selection--single:hover {
  border-color: var(--remind-teal) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

.premium-controls-row .select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 52px !important;
  padding-right: 20px !important;
  font-weight: 700 !important;
  color: var(--text-primary) !important;
  font-size: 14px !important;
}

.premium-controls-row .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 52px !important;
  left: 12px !important;
  right: auto !important;
}

@media (max-width: 768px) {
  .premium-controls-row .select2-container--default .select2-selection--single {
    height: 46px !important;
    border-radius: 12px !important;
  }
  .premium-controls-row .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 46px !important;
    font-size: 13px !important;
    padding-right: 15px !important;
  }
  .premium-controls-row .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 46px !important;
    left: 8px !important;
  }
}

.history-tab {
  color: var(--text-muted);
  background: transparent;
  transition: all 0.2s ease;
}

.history-tab.active {
  background: var(--active-bg);
  color: var(--remind-blue);
  box-shadow: inset 0 0 0 1px var(--border-subtle);
}

.history-tab:hover:not(.active) {
  background: var(--hover-bg);
  color: var(--text-primary);
}

/* Premium Family Package Card & Switch */
.family-pkg-btn {
  background: var(--bg-elevated) !important;
  border: 1.5px solid var(--border-medium) !important;
  border-radius: 16px !important;
  padding: 8px 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  cursor: pointer !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  user-select: none !important;
  width: 100% !important;
  min-height: 52px !important;
  height: auto !important;
  box-sizing: border-box !important;
  margin-top: 3px !important;
  gap: 12px !important;
}

.family-pkg-btn:hover {
  border-color: var(--remind-teal) !important;
  background: var(--hover-bg) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

.family-pkg-btn.active {
  border-color: #f97316 !important;
  background: rgba(249, 115, 22, 0.03) !important;
}

.family-pkg-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(249, 115, 22, 0.08); /* light orange tint */
  color: #f97316; /* Orange color matching switch */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.family-pkg-btn.active .family-pkg-icon-box {
  background: #f97316 !important;
  color: white !important;
}

.family-pkg-label-group {
  text-align: right !important;
  flex: 1 !important;
  min-width: 0 !important;
}

.family-pkg-title {
  font-size: 13px !important;
  font-weight: 800 !important;
  color: var(--text-primary) !important;
  line-height: 1.4 !important;
  white-space: nowrap !important;
}

.family-pkg-subtitle {
  font-size: 10px !important;
  color: var(--text-muted) !important;
  line-height: 1.4 !important;
  margin-top: 2px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Fix client summary card wrapping and layout */
.session-client-summary {
  flex-wrap: wrap !important;
  gap: 8px !important;
  min-height: 38px !important;
  padding: 10px 14px !important;
}

.session-client-summary span {
  white-space: nowrap !important;
}

/* Responsiveness adjustments for smaller devices */
@media (max-width: 1200px) {
  .family-pkg-btn {
    padding: 8px 12px !important;
    gap: 8px !important;
  }
  .family-pkg-icon-box {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }
  .family-pkg-title {
    font-size: 12px !important;
  }
  .family-pkg-subtitle {
    font-size: 9px !important;
  }
  .toggle-switch.large {
    width: 55px;
    height: 28px;
  }
  .toggle-switch.large .slider:before {
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
  }
  .toggle-switch.large input:checked+.slider:before {
    transform: translateX(27px);
  }
}

/* Prevent 'الرصيد المتبقي' from splitting onto two lines on screen width <= 1250px */
@media (max-width: 1250px) {
  .session-registration-summary .summary-label {
    font-size: 11px !important;
    white-space: nowrap !important;
  }
  .session-registration-summary .summary-value {
    font-size: 18px !important;
    white-space: nowrap !important;
  }
  .session-registration-summary {
    gap: 15px !important;
    padding: 15px 20px !important;
  }
  .summary-item {
    gap: 8px !important;
  }
  .summary-icon {
    width: 40px !important;
    height: 40px !important;
    font-size: 16px !important;
  }
}

/* Global Fluid Typography & Wrapping Prevention Rule */
/* Enforces text to shrink in font-size instead of wrapping to multiple lines */
.stat-label,
.stat-subtitle,
.summary-label,
.family-pkg-title,
.family-pkg-subtitle,
.input-group-premium label,
.card h3,
.modal-header span,
.session-client-summary span {
  white-space: nowrap !important;
  text-overflow: ellipsis;
  overflow: hidden;
}

/* Values/Numbers do not need overflow:hidden which clips Arabic descenders */
.stat-value,
.stat-value-simple,
.team-stat-value {
  white-space: nowrap !important;
  overflow: visible !important;
}

/* Responsive font scaling instead of line splitting */
@media (max-width: 1400px) {
  .card h3 {
    font-size: 15px !important;
  }
  .input-group-premium label {
    font-size: 12px !important;
  }
  .stat-label, .summary-label {
    font-size: 12px !important;
  }
  .stat-value {
    font-size: 26px !important;
  }
  .stat-value-simple, .team-stat-value {
    font-size: 20px !important;
  }
}

/* When screen wraps to 3 columns (width <= 1200px), cards are wider so text can be larger again, then scales down */
@media (max-width: 1200px) {
  .card h3 {
    font-size: 16px !important;
  }
  .input-group-premium label {
    font-size: 12px !important;
  }
  .stat-label, .summary-label {
    font-size: 14px !important;
  }
  .family-pkg-title {
    font-size: 13px !important;
  }
  .stat-subtitle, .family-pkg-subtitle {
    font-size: 11px !important;
  }
  .stat-value {
    font-size: 30px !important;
  }
  .stat-value-simple, .team-stat-value {
    font-size: 22px !important;
  }
}

@media (max-width: 992px) {
  .card h3 {
    font-size: 14px !important;
  }
  .input-group-premium label {
    font-size: 11px !important;
  }
  .stat-label, .summary-label {
    font-size: 12px !important;
  }
  .family-pkg-title {
    font-size: 12px !important;
  }
  .stat-subtitle, .family-pkg-subtitle {
    font-size: 10px !important;
  }
  .stat-value {
    font-size: 26px !important;
  }
  .stat-value-simple, .team-stat-value {
    font-size: 18px !important;
  }
}

/* When screen wraps to 2 columns (width <= 768px), cards are narrower */
@media (max-width: 768px) {
  .card h3 {
    font-size: 13px !important;
  }
  .input-group-premium label {
    font-size: 10px !important;
  }
  .stat-label, .summary-label {
    font-size: 11px !important;
  }
  .family-pkg-title {
    font-size: 11px !important;
  }
  .stat-subtitle, .family-pkg-subtitle {
    font-size: 9px !important;
  }
  .stat-value {
    font-size: 22px !important;
  }
  .stat-value-simple, .team-stat-value {
    font-size: 16px !important;
  }
}

/* When screen wraps to 1 column (width <= 480px), cards are full-width again */
@media (max-width: 480px) {
  .card h3 {
    font-size: 15px !important;
  }
  .input-group-premium label {
    font-size: 12px !important;
  }
  .stat-label, .summary-label {
    font-size: 13px !important;
  }
  .family-pkg-title {
    font-size: 12px !important;
  }
  .stat-subtitle, .family-pkg-subtitle {
    font-size: 11px !important;
  }
  .stat-value {
    font-size: 26px !important;
  }
  .stat-value-simple, .team-stat-value {
    font-size: 20px !important;
  }
}

/* Lighten and refine the Bold weight of numbers and headings in all cards */
.stat-value,
.stat-value-simple,
.team-stat-value,
.session-client-summary span,
.summary-value,
.info-val {
  font-weight: 600 !important; /* Clean semi-bold (instead of thick bold) */
}

/* Enforce bold weight for primary card headings as requested by the user */
.card h3,
.card-title {
  font-weight: 800 !important; /* Premium thick bold for main titles */
}

.stat-label,
.summary-label,
.family-pkg-title,
.input-group-premium label,
.modal-header span,
.info-label {
  font-weight: 500 !important; /* Elegant medium weight (instead of semi-bold) */
}

.stat-subtitle,
.family-pkg-subtitle {
  font-weight: 400 !important; /* Soft regular weight (instead of medium) */
}

/* ============================================================
   CALENDAR + APPOINTMENTS LIST: Always side-by-side
   Never stack — scale down instead. Scroll if list is long.
   ============================================================ */

#appointments_split_view {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 24px !important;
  align-items: stretch !important;
  min-height: 0 !important;
}

#remind_calendar_container {
  flex: 1.5 1 320px !important;
  min-width: 280px !important;
  max-width: 500px !important;
  min-height: fit-content !important;
}

/* Appointments list container: handles layout and flex spacing */
.appt-list-container {
  flex: 1 1 220px !important;
  min-width: 180px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 15px !important;
  min-height: 0 !important;
}

/* Appointments list: handles scrolling and height */
#appt_list {
  flex: 1 1 auto !important;
  max-height: 500px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-left: 2px !important;
  min-height: 0 !important;
}

/* Thin custom scrollbar for the appointments list */
#appt_list::-webkit-scrollbar {
  width: 4px;
}
#appt_list::-webkit-scrollbar-track {
  background: transparent;
}
#appt_list::-webkit-scrollbar-thumb {
  background: var(--border-medium, #e2e8f0);
  border-radius: 4px;
}

/* At ≤ 992px: Calendar keeps its size — appointments list shrinks */
@media (max-width: 992px) {
  #appointments_split_view {
    gap: 16px !important;
    flex-wrap: nowrap !important;
    flex-direction: row !important;
  }
  /* Calendar: locked size, never shrinks */
  #remind_calendar_container {
    flex: 0 0 320px !important;
    width: 320px !important;
    min-width: 300px !important;
    max-width: 340px !important;
    flex-shrink: 0 !important;
  }
  /* Appointments list: fills remaining space, compresses as needed */
  #appt_list_container {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
  }
  #appt_list {
    flex: 1 1 auto !important;
    max-height: 400px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }
}

/* At ≤ 768px: Calendar slightly smaller fixed width — list still fills remaining space */
@media (max-width: 768px) {
  #appointments_split_view {
    gap: 10px !important;
  }
  /* Calendar: slightly smaller fixed size */
  #remind_calendar_container {
    flex: 0 0 270px !important;
    width: 270px !important;
    min-width: 250px !important;
    max-width: 290px !important;
    flex-shrink: 0 !important;
  }
  /* Appointments list: takes all remaining width */
  #appt_list_container {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }
  #appt_list {
    flex: 1 1 auto !important;
    max-height: 320px !important;
  }
}

/* ============================================================
   PREVENT SCHEDULE-MAIN-CARD FROM WRAPPING BELOW BOOKING CARD
   Keep both cards side-by-side from 1151px to 1350px
   by shrinking booking card width instead of stacking
   ============================================================ */

/* Force the outer schedule flex row to never wrap above 1150px */
#p-schedule > div[style*="flex-wrap: wrap"],
#p-schedule > div[style*="flex-wrap:wrap"] {
  flex-wrap: nowrap !important;
}

/* At 1350px: shrink booking card from 450px → 360px */
@media (max-width: 1350px) {
  .schedule-booking-card {
    flex: 0 0 360px !important;
    padding: 25px !important;
  }
  .schedule-booking-card h3 {
    font-size: 17px !important;
    margin-bottom: 22px !important;
  }
  .schedule-book-btn {
    height: 55px !important;
    font-size: 16px !important;
  }
}

/* At 1250px: shrink booking card to 320px */
@media (max-width: 1250px) {
  .schedule-booking-card {
    flex: 0 0 300px !important;
    padding: 20px !important;
  }
  .schedule-booking-card h3 {
    font-size: 15px !important;
    margin-bottom: 18px !important;
  }
  .schedule-book-btn {
    height: 48px !important;
    font-size: 14px !important;
    border-radius: 16px !important;
  }
  .schedule-input {
    height: 42px !important;
    font-size: 13px !important;
  }
}

/* At 1150px: restore stacking only here, booking card goes full-width */
@media (max-width: 1150px) {
  #p-schedule > div[style*="flex-wrap: wrap"],
  #p-schedule > div[style*="flex-wrap:wrap"] {
    flex-wrap: wrap !important;
  }
  .schedule-booking-card {
    flex: none !important;
    width: 100% !important;
    padding: 25px !important;
  }
}

/* For screens 578px to 1150px: 
   Sleek side-by-side grid. Appointments list stretches from top to bottom on the left,
   while title, filter bar, and calendar stack on the right. */
@media (min-width: 578px) and (max-width: 1150px) {
  #app-container .schedule-main-card {
    display: grid !important;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    gap: 20px !important;
    align-items: start !important;
    height: auto !important;
    min-height: 500px !important;
  }
  
  #app-container #appointments_split_view {
    display: contents !important;
  }
  
  #app-container .schedule-header-row {
    grid-column: 1 !important;
    grid-row: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    width: 100% !important;
  }

  #app-container .schedule-filter-bar {
    width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    align-items: flex-end !important;
  }

  #app-container .schedule-filter-bar .filter-item {
    flex: 1 1 150px !important;
    min-width: 0 !important;
  }

  #app-container .schedule-filter-bar .schedule-date-input {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  #app-container .schedule-filter-bar .select2-container {
    width: 100% !important;
  }

  #app-container .schedule-filter-bar .filter-divider {
    display: none !important;
  }
  
  #app-container #remind_calendar_container {
    grid-column: 1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: fit-content !important;
    flex: none !important;
    margin-bottom: 0 !important;
  }
  
  #app-container .remind-calendar-container {
    height: auto !important;
    min-height: fit-content !important;
    max-height: none !important;
    overflow: hidden !important;
  }
  
  #app-container .remind-calendar-grid {
    height: auto !important;
    min-height: fit-content !important;
    max-height: none !important;
  }
  
  #app-container #appt_list_container {
    grid-column: 2 !important;
    grid-row: 1 / span 2 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
  }
  
  #app-container #appt_list {
    width: 100% !important;
    max-height: 520px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }
}

/* Split equally (50% / 50%) between the calendar/header on the right and appointments list on the left for screens 920px to 1150px */
@media (min-width: 920px) and (max-width: 1150px) {
  #app-container .schedule-main-card {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  }
}

/* Between 1151px and 1350px: booking card and schedule card are side-by-side.
   Hide "حضور" text label to prevent squishing client/therapist info in cards. */
@media (min-width: 1151px) and (max-width: 1350px) {
  #appt_list_container {
    flex: 1 1 190px !important;
    min-width: 180px !important;
  }
  .appt-item-card {
    padding: 8px 10px !important;
    gap: 8px !important;
  }
  .appt-time-tag {
    font-size: 11px !important;
    padding: 4px 6px !important;
  }
  .appt-btn-label {
    display: none !important;
  }
  .appt-btn-checkin {
    width: 28px !important;
    height: 28px !important;
    padding: 0 !important;
    justify-content: center !important;
    border-radius: 8px !important;
  }
  .appt-btn-delete {
    width: 26px !important;
    height: 26px !important;
    font-size: 10px !important;
  }
}

/* Dynamically scale down calendar fonts and spacing as viewport shrinks to fit side-by-side */
@media (max-width: 1450px) {

  /* --- Top Stats Cards (#p-schedule) --- */
  #p-schedule .stat-card {
    padding: 14px !important;
    gap: 10px !important;
  }
  #p-schedule .card-icon-box {
    width: 36px !important;
    height: 36px !important;
    font-size: 15px !important;
    border-radius: 10px !important;
  }
  #p-schedule .card-arrow-box {
    width: 26px !important;
    height: 26px !important;
    font-size: 9px !important;
  }
  #p-schedule .stat-label {
    font-size: 12px !important;
  }
  #p-schedule .stat-value {
    font-size: 22px !important;
  }
  #p-schedule .stat-subtitle {
    font-size: 10px !important;
  }

  /* --- Appointments Timeline List (#appt_list) --- */
  /* Scoped to override inline styles from JS */
  #appt_list .admin-timeline-item {
    padding: 14px !important;
    gap: 12px !important;
    border-radius: 14px !important;
    margin-bottom: 10px !important;
  }
  #appt_list .admin-timeline-item > div:first-child > div:first-child {
    /* Time box */
    width: 48px !important;
    height: 48px !important;
    border-radius: 12px !important;
  }
  #appt_list .admin-timeline-item > div:first-child > div:first-child span {
    font-size: 12px !important;
  }
  #appt_list .admin-timeline-item > div:first-child > div:last-child > div:first-child {
    /* Client name */
    font-size: 14px !important;
  }
  #appt_list .admin-timeline-item > div:first-child > div:last-child > div:not(:first-child) {
    /* Therapist / notes */
    font-size: 11px !important;
  }
  #appt_list .admin-timeline-item button {
    font-size: 11px !important;
    height: 34px !important;
    padding: 0 10px !important;
    border-radius: 10px !important;
  }

  /* --- Schedule Main Card (filters + header) --- */
  .schedule-main-card {
    padding: 24px !important;
  }
  .schedule-header-row {
    margin-bottom: 20px !important;
    padding-bottom: 15px !important;
  }
  .schedule-main-card h3 {
    font-size: 16px !important;
  }
  .schedule-main-card p {
    font-size: 11px !important;
  }
  .filter-label {
    font-size: 10px !important;
  }
  .schedule-date-input {
    font-size: 12px !important;
    height: 42px !important;
  }
  .schedule-main-card .select2-container--default .select2-selection--single {
    height: 42px !important;
  }
  .schedule-main-card .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 42px !important;
    font-size: 12px !important;
  }
  .schedule-main-card .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px !important;
  }

  /* --- Calendar --- */
  .remind-calendar-header {
    padding: 12px 15px !important;
  }
  .remind-calendar-title {
    font-size: 14px !important;
  }
  .cal-nav-btn {
    width: 30px !important;
    height: 30px !important;
    font-size: 12px !important;
  }
  .cal-day-label {
    font-size: 10px !important;
    padding: 10px 0 !important;
  }
  .cal-day-number {
    font-size: 14.5px !important;
    font-weight: 800 !important;
  }
  .cal-day-cell {
    border-radius: 8px !important;
    margin: 1px !important;
    min-height: 40px !important;
  }
  .cal-event-indicators {
    margin-top: 2px !important;
    height: 4px !important;
    gap: 2px !important;
  }
  .cal-event-dot {
    width: 4px !important;
    height: 4px !important;
  }

  /* Timeline activity cards (dashboard feed) */
  .activity-card {
    padding: 8px 12px !important;
    gap: 10px !important;
  }
  .activity-icon {
    width: 32px !important;
    height: 32px !important;
    font-size: 13px !important;
    border-radius: 8px !important;
  }
  .activity-title {
    font-size: 11px !important;
  }
  .activity-desc {
    font-size: 10px !important;
  }
  .activity-time {
    font-size: 9px !important;
  }
  .activity-status {
    font-size: 8px !important;
    padding: 1px 6px !important;
  }
}

@media (max-width: 1250px) {

  /* --- Top Stats Cards (#p-schedule) --- */
  #p-schedule .stat-card {
    padding: 10px !important;
    gap: 7px !important;
  }
  #p-schedule .card-icon-box {
    width: 30px !important;
    height: 30px !important;
    font-size: 12px !important;
    border-radius: 8px !important;
  }
  #p-schedule .card-arrow-box {
    width: 22px !important;
    height: 22px !important;
    font-size: 8px !important;
  }
  #p-schedule .stat-label {
    font-size: 10px !important;
  }
  #p-schedule .stat-value {
    font-size: 18px !important;
    letter-spacing: -0.5px !important;
  }
  #p-schedule .stat-subtitle {
    font-size: 9px !important;
  }

  /* --- Appointments Timeline List (#appt_list) --- */
  #appt_list .admin-timeline-item {
    padding: 10px 12px !important;
    gap: 10px !important;
    border-radius: 12px !important;
    margin-bottom: 8px !important;
  }
  #appt_list .admin-timeline-item > div:first-child > div:first-child {
    width: 40px !important;
    height: 40px !important;
    border-radius: 10px !important;
  }
  #appt_list .admin-timeline-item > div:first-child > div:first-child span {
    font-size: 10px !important;
  }
  #appt_list .admin-timeline-item > div:first-child > div:last-child > div:first-child {
    font-size: 12px !important;
  }
  #appt_list .admin-timeline-item > div:first-child > div:last-child > div:not(:first-child) {
    font-size: 10px !important;
  }
  #appt_list .admin-timeline-item button {
    font-size: 10px !important;
    height: 30px !important;
    padding: 0 8px !important;
    border-radius: 8px !important;
  }
  #appt_list .admin-timeline-item > div:last-child {
    gap: 6px !important;
  }

  /* --- Schedule Main Card --- */
  .schedule-main-card {
    padding: 16px !important;
  }
  .schedule-main-card h3 {
    font-size: 14px !important;
  }
  .schedule-main-card p {
    font-size: 10px !important;
  }
  .filter-label {
    font-size: 9px !important;
  }
  .schedule-date-input {
    font-size: 11px !important;
    height: 36px !important;
  }
  .schedule-main-card .select2-container--default .select2-selection--single {
    height: 36px !important;
  }
  .schedule-main-card .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 36px !important;
    font-size: 11px !important;
  }
  .schedule-main-card .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 34px !important;
  }

  /* --- Calendar --- */
  .remind-calendar-header {
    padding: 8px 10px !important;
  }
  .remind-calendar-title {
    font-size: 12px !important;
  }
  .cal-nav-btn {
    width: 26px !important;
    height: 26px !important;
  }
  .cal-day-label {
    font-size: 9px !important;
    padding: 8px 0 !important;
  }
  .cal-day-number {
    font-size: 13.5px !important;
    font-weight: 800 !important;
  }
  .cal-day-cell {
    min-height: 36px !important;
  }

  /* Timeline activity cards (dashboard feed) */
  .activity-card {
    padding: 6px 10px !important;
    gap: 8px !important;
  }
  .activity-icon {
    width: 28px !important;
    height: 28px !important;
    font-size: 11px !important;
  }
  .activity-title {
    font-size: 10px !important;
  }
  .activity-desc {
    font-size: 9px !important;
  }
  .activity-time {
    font-size: 8px !important;
  }
  .activity-status {
    font-size: 7.5px !important;
    padding: 1px 4px !important;
  }
}

/* ============================================================
   SCHEDULE PAGE: Scale down at ≤ 992px (side-by-side preserved)
   ============================================================ */
@media (max-width: 992px) {
  /* --- Schedule Main Card --- */
  .schedule-main-card {
    padding: 12px !important;
  }
  .schedule-main-card h3 {
    font-size: 13px !important;
  }
  .schedule-main-card p {
    font-size: 9px !important;
  }
  .schedule-header-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
    margin-bottom: 12px !important;
    padding-bottom: 10px !important;
  }
  .schedule-filter-bar {
    padding: 6px 10px !important;
    gap: 8px !important;
    border-radius: 12px !important;
  }
  .filter-label {
    font-size: 8px !important;
  }
  .schedule-date-input {
    font-size: 10px !important;
    height: 32px !important;
    width: 120px !important;
  }
  .schedule-main-card .select2-container--default .select2-selection--single {
    height: 32px !important;
  }
  .schedule-main-card .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 32px !important;
    font-size: 10px !important;
  }
  .schedule-main-card .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 30px !important;
  }

  /* --- Calendar --- */
  .remind-calendar-header {
    padding: 6px 8px !important;
  }
  .remind-calendar-title {
    font-size: 10px !important;
  }
  .cal-nav-btn {
    width: 22px !important;
    height: 22px !important;
    font-size: 10px !important;
  }
  .cal-day-label {
    font-size: 8px !important;
    padding: 6px 0 !important;
  }
  .cal-day-number {
    font-size: 12.5px !important;
    font-weight: 800 !important;
  }
  .cal-day-cell {
    border-radius: 6px !important;
    margin: 1px !important;
    min-height: 32px !important;
  }
  .cal-event-dot {
    width: 3px !important;
    height: 3px !important;
  }

  /* --- Appointments Timeline Items --- */
  #appt_list .admin-timeline-item {
    padding: 8px 10px !important;
    gap: 8px !important;
    border-radius: 10px !important;
    margin-bottom: 6px !important;
  }
  #appt_list .admin-timeline-item > div:first-child {
    gap: 8px !important;
  }
  #appt_list .admin-timeline-item > div:first-child > div:first-child {
    width: 36px !important;
    height: 36px !important;
    border-radius: 8px !important;
  }
  #appt_list .admin-timeline-item > div:first-child > div:first-child span {
    font-size: 9px !important;
  }
  #appt_list .admin-timeline-item > div:first-child > div:last-child > div:first-child {
    font-size: 11px !important;
  }
  #appt_list .admin-timeline-item > div:first-child > div:last-child > div:not(:first-child) {
    font-size: 9px !important;
  }
  /* Hide action buttons on small screens to save space */
  #appt_list .admin-timeline-item > div:last-child button:last-child {
    display: none !important;
  }
  #appt_list .admin-timeline-item button {
    font-size: 9px !important;
    height: 28px !important;
    padding: 0 6px !important;
    border-radius: 7px !important;
  }
}

/* ============================================================
   SCHEDULE PAGE: Scale down at ≤ 768px (still side-by-side)
   ============================================================ */
@media (max-width: 768px) {
  /* Calendar further shrinks */
  .remind-calendar-title {
    font-size: 9px !important;
  }
  .cal-nav-btn {
    width: 18px !important;
    height: 18px !important;
    font-size: 8px !important;
  }
  .cal-day-label {
    font-size: 7px !important;
    padding: 4px 0 !important;
  }
  .cal-day-number {
    font-size: 11.5px !important;
    font-weight: 800 !important;
  }
  .cal-day-cell {
    min-height: 26px !important;
  }

  /* Appointments list items */
  #appt_list .admin-timeline-item > div:first-child > div:first-child {
    width: 30px !important;
    height: 30px !important;
    flex-shrink: 0 !important;
  }
  #appt_list .admin-timeline-item > div:first-child > div:first-child span {
    font-size: 8px !important;
  }
  #appt_list .admin-timeline-item > div:first-child > div:last-child > div:first-child {
    font-size: 10px !important;
  }
  #appt_list .admin-timeline-item > div:first-child > div:last-child > div:not(:first-child) {
    font-size: 8px !important;
  }
  /* Keep only the check-in button, hide delete */
  #appt_list .admin-timeline-item > div:last-child {
    flex-direction: column !important;
    gap: 4px !important;
  }
}


/* ════════════════════════════════════════════════════════════════
   REDESIGNED APPOINTMENT CARDS (.appt-item-card)
   Clean, responsive, class-based — no inline styles
   ════════════════════════════════════════════════════════════════ */

.appt-item-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, var(--bg-surface) 0%, rgba(255, 255, 255, 0.98) 100%);
  border: 1px solid var(--border-subtle);
  border-right: 4px solid var(--remind-blue);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 12px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease;
  cursor: default;
  direction: rtl;
  min-width: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.appt-item-card:hover {
  transform: translateX(-4px) translateY(-2px);
  box-shadow: 0 12px 24px rgba(8, 104, 163, 0.08);
  border-right-color: var(--remind-teal);
}

/* Time Badge */
.appt-time-col {
  flex-shrink: 0;
}

.appt-time-tag {
  display: block;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.06) 0%, rgba(59, 130, 246, 0.12) 100%);
  color: var(--remind-blue);
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  letter-spacing: 0.5px;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 2px 5px rgba(59, 130, 246, 0.05);
}

/* Info Column */
.appt-info-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.appt-client-name {
  font-weight: 800;
  color: var(--text-primary);
  font-size: 14.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.appt-therapist-name {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.appt-therapist-name i {
  font-size: 11px;
  color: var(--remind-blue);
  opacity: 0.85;
  flex-shrink: 0;
}

.appt-note {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 4px;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.9;
  background: rgba(0, 0, 0, 0.025);
  padding: 3px 8px;
  border-radius: 6px;
  width: fit-content;
  max-width: 90%;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.appt-note i {
  font-size: 9px;
  color: var(--text-muted);
  opacity: 0.7;
}

/* Actions Column */
.appt-actions-col {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  align-items: center;
}

.appt-btn-checkin {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.07) 0%, rgba(16, 185, 129, 0.15) 100%);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 10px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 800;
  font-family: 'Cairo', sans-serif;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  line-height: 1;
}

.appt-btn-checkin:hover {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: white !important;
  border-color: #059669 !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
  transform: translateY(-2px);
}

.appt-btn-checkin:active {
  transform: translateY(0) scale(0.96);
}

.appt-btn-delete {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.06) 0%, rgba(239, 68, 68, 0.14) 100%);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.24);
  border-radius: 10px;
  width: 32px;
  height: 32px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.appt-btn-delete:hover {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  color: white !important;
  border-color: #dc2626 !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
  transform: translateY(-2px);
}

.appt-btn-delete:active {
  transform: translateY(0) scale(0.96);
}

/* Empty State */
.appt-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  text-align: center;
  color: var(--text-muted);
  padding: 30px;
  animation: fadeIn 0.4s ease;
}

.appt-empty-icon {
  width: 80px;
  height: 80px;
  background: var(--bg-elevated);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  border: 1px solid var(--border-subtle);
  font-size: 32px;
  color: var(--text-muted);
  opacity: 0.7;
}

.appt-empty-state h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px;
}

.appt-empty-state p {
  font-size: 12px;
  line-height: 1.6;
  max-width: 220px;
  opacity: 0.75;
}

/* ─── Responsive Card Scaling ──────────────────────────────── */

/* Hide checkin button text label below 1450px to prevent info text from disappearing when list is narrow */
@media (max-width: 1450px) {
  .appt-btn-label {
    display: none !important;
  }
  .appt-btn-checkin {
    width: 28px !important;
    height: 28px !important;
    padding: 0 !important;
    justify-content: center !important;
    border-radius: 8px !important;
  }
  .appt-btn-delete {
    width: 26px !important;
    height: 26px !important;
    font-size: 10px !important;
  }
}

/* Medium screens (≤ 1250px): tighten up cards */
@media (max-width: 1250px) {
  .appt-item-card {
    padding: 9px 11px !important;
    gap: 9px !important;
    border-radius: 11px !important;
    margin-bottom: 7px !important;
  }
  .appt-time-tag {
    font-size: 11px !important;
    padding: 4px 8px !important;
    border-radius: 7px !important;
  }
  .appt-client-name {
    font-size: 12px !important;
  }
  .appt-therapist-name {
    font-size: 10px !important;
  }
}

/* Small screens (≤ 992px): further tighten card spacing and fonts */
@media (max-width: 992px) {
  .appt-item-card {
    padding: 8px 10px !important;
    gap: 8px !important;
    border-radius: 10px !important;
    margin-bottom: 6px !important;
  }
  .appt-time-tag {
    font-size: 10px !important;
    padding: 3px 6px !important;
  }
  .appt-client-name {
    font-size: 11px !important;
  }
  .appt-therapist-name {
    font-size: 9px !important;
  }
  .appt-note {
    font-size: 9px !important;
  }
}

/* Mobile (< 577px): hide inline list, show modal trigger button, calendar full-width */
@media (max-width: 577px) {
  #appointments_split_view {
    flex-direction: column !important;
    gap: 0px !important;
  }
  #remind_calendar_container {
    flex: 1 1 100% !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    flex-shrink: 1 !important;
  }
  .cal-day-number {
    font-size: 15px !important;
    font-weight: 800 !important;
  }
  #appt_list_container {
    display: none !important;
  }
  .appt-mobile-trigger {
    display: flex !important;
  }
}


/* ════════════════════════════════════════════════════════════════
   MOBILE APPOINTMENTS BOTTOM SHEET MODAL
   Slides up from bottom when a calendar date is tapped on mobile
   ════════════════════════════════════════════════════════════════ */

.appt-mobile-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: flex-end;
  direction: rtl;
}

.appt-mobile-modal.active {
  display: flex;
  animation: apptModalFadeIn 0.25s ease;
}

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

.appt-mobile-sheet {
  background: var(--bg-surface);
  border-radius: 24px 24px 0 0;
  padding: 14px 16px 30px;
  width: 100%;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: apptSheetSlideUp 0.32s cubic-bezier(0.34, 1.2, 0.64, 1);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.2);
}

@keyframes apptSheetSlideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

/* Drag Handle */
.appt-sheet-handle {
  width: 44px;
  height: 4px;
  background: var(--border-medium);
  border-radius: 2px;
  margin: 0 auto 14px;
  flex-shrink: 0;
}

/* Sheet Header */
.appt-sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.appt-sheet-header-info {
  flex: 1;
}

.appt-sheet-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.appt-sheet-title i {
  color: var(--remind-blue);
  font-size: 14px;
}

.appt-sheet-date-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.4;
}

/* Close Button */
.appt-sheet-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin-right: 8px;
}

.appt-sheet-close-btn:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
}

/* Sheet Appointments List */
.appt-sheet-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-top: 4px;
  padding-left: 2px;
}

/* Thin scrollbar inside sheet */
.appt-sheet-list::-webkit-scrollbar {
  width: 3px;
}
.appt-sheet-list::-webkit-scrollbar-track {
  background: transparent;
}
.appt-sheet-list::-webkit-scrollbar-thumb {
  background: var(--border-medium, #e2e8f0);
  border-radius: 2px;
}

/* Cards inside modal adapt to mobile width */
.appt-sheet-list .appt-item-card {
  padding: 10px 12px !important;
  gap: 10px !important;
}

.appt-sheet-list .appt-btn-label {
  display: inline !important; /* Show label inside modal */
}

.appt-sheet-list .appt-btn-checkin {
  width: auto !important;
  height: auto !important;
  padding: 6px 10px !important;
}

/* ============================================================
   PREMIUM GLASS FILTER BAR & ACCENTS (VISUAL REDESIGN)
   ============================================================ */
#app-container .schedule-header-row {
  border-bottom: 1px dashed rgba(8, 104, 163, 0.15) !important;
  padding-bottom: 20px !important;
  margin-bottom: 25px !important;
}

#app-container .schedule-filter-bar {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-medium, rgba(8, 104, 163, 0.12)) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02) !important;
  border-radius: 16px !important;
  padding: 10px 18px !important;
  gap: 16px !important;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

#app-container .schedule-filter-bar:hover {
  box-shadow: 0 8px 25px rgba(8, 104, 163, 0.05) !important;
  border-color: rgba(8, 104, 163, 0.25) !important;
}

#app-container .filter-label {
  font-size: 10px !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted) !important;
  margin-bottom: 6px !important;
  opacity: 0.9;
}

#app-container .schedule-date-input {
  border-radius: 12px !important;
  border: 1.5px solid var(--border-subtle) !important;
  background: var(--bg-elevated) !important;
  color: var(--text-primary) !important;
  height: 42px !important;
  padding: 0 14px !important;
  font-weight: 700 !important;
  transition: all 0.25s ease !important;
}

#app-container .schedule-date-input:focus {
  border-color: var(--remind-blue) !important;
  background: var(--bg-surface) !important;
  box-shadow: 0 0 0 3px rgba(8, 104, 163, 0.15) !important;
}

#app-container .schedule-filter-bar .filter-divider {
  width: 1px !important;
  height: 28px !important;
  background: var(--border-subtle) !important;
  margin: 0 4px !important;
  display: block !important;
  border: none !important;
}

/* Select2 Custom Premium Styling */
#app-container .schedule-main-card .select2-container--default .select2-selection--single {
  border-radius: 12px !important;
  border: 1.5px solid var(--border-subtle) !important;
  background: var(--bg-elevated) !important;
  height: 42px !important;
  transition: all 0.25s ease !important;
}

#app-container .schedule-main-card .select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 40px !important;
  padding-right: 14px !important;
  font-weight: 700 !important;
  color: var(--text-primary) !important;
}

#app-container .schedule-main-card .select2-container--default.select2-container--open .select2-selection--single,
#app-container .schedule-main-card .select2-container--default .select2-selection--single:focus {
  border-color: var(--remind-blue) !important;
  background: var(--bg-surface) !important;
  box-shadow: 0 0 0 3px rgba(8, 104, 163, 0.15) !important;
}

/* ============================================================
   APPOINTMENTS LIST HEADER DESIGN
   ============================================================ */
.appt-list-container {
  display: flex !important;
  flex-direction: column !important;
  gap: 15px !important;
}

.appt-list-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding-bottom: 12px !important;
  border-bottom: 1px dashed var(--border-subtle) !important;
}

.appt-list-title {
  margin: 0 !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  color: var(--text-primary) !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.appt-list-title i {
  color: var(--remind-blue) !important;
  font-size: 14px !important;
}

.appt-list-date {
  font-size: 12px !important;
  font-weight: 800 !important;
  color: var(--remind-blue) !important;
  background: rgba(8, 104, 163, 0.08) !important;
  padding: 4px 12px !important;
  border-radius: 20px !important;
  font-variant-numeric: tabular-nums !important;
  border: 1px solid rgba(8, 104, 163, 0.12) !important;
}

/* Dark Mode Overrides for Appointment Cards */
body.dark-mode .appt-item-card {
  background: linear-gradient(135deg, var(--bg-surface) 0%, rgba(30, 41, 59, 0.8) 100%) !important;
  border-color: var(--border-subtle) !important;
  border-right-color: var(--remind-blue) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

body.dark-mode .appt-item-card:hover {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3) !important;
  border-right-color: var(--remind-teal) !important;
}

body.dark-mode .appt-time-tag {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08) 0%, rgba(56, 189, 248, 0.18) 100%) !important;
  color: #38bdf8 !important;
  border-color: rgba(56, 189, 248, 0.3) !important;
  box-shadow: 0 2px 6px rgba(56, 189, 248, 0.08) !important;
}

body.dark-mode .appt-btn-checkin {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.08) 0%, rgba(52, 211, 153, 0.18) 100%) !important;
  color: #34d399 !important;
  border-color: rgba(52, 211, 153, 0.3) !important;
}

body.dark-mode .appt-btn-checkin:hover {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: white !important;
  border-color: #059669 !important;
}

body.dark-mode .appt-btn-delete {
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.08) 0%, rgba(248, 113, 113, 0.18) 100%) !important;
  color: #f87171 !important;
  border-color: rgba(248, 113, 113, 0.3) !important;
}

body.dark-mode .appt-btn-delete:hover {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  color: white !important;
  border-color: #dc2626 !important;
}

body.dark-mode .appt-note {
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--text-muted) !important;
}

body.dark-mode .appt-note i {
  color: var(--text-muted) !important;
}

body.dark-mode .appt-list-date {
  color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.1) !important;
  border-color: rgba(56, 189, 248, 0.2) !important;
}

/* Responsive Grid for Settings Services List */
.settings-services-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 15px !important;
  margin-top: 20px !important;
}

@media (max-width: 1200px) {
  .settings-services-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

@media (max-width: 992px) {
  .settings-services-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 576px) {
  .settings-services-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ============================================================
   RESPONSIVE GRID & COMPACT CARD FOR STAFF & THERAPISTS
   ============================================================ */
.team-grid-rects {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 15px !important;
  margin-top: 20px !important;
}

.team-member-rect {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 12px 16px !important;
  background: var(--bg-surface) !important;
  border: 1.5px solid var(--border-subtle) !important;
  border-radius: 16px !important;
  box-shadow: var(--shadow-sm) !important;
  cursor: pointer !important;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s ease !important;
  position: relative !important;
  direction: rtl !important;
}

.team-member-rect:hover {
  transform: translateY(-2px) !important;
  box-shadow: var(--shadow-md), 0 4px 12px rgba(59, 130, 246, 0.08) !important;
  border-color: var(--remind-blue) !important;
}

/* Role-specific colored borders matching UI accents */
.team-member-rect.role-admin {
  border-right: 4px solid #f59e0b !important;
}
.team-member-rect.role-data {
  border-right: 4px solid #3b82f6 !important;
}
.team-member-rect.role-cs {
  border-right: 4px solid #10b981 !important;
}
.team-member-rect.role-therapist {
  border-right: 4px solid #8b5cf6 !important;
}

/* Responsiveness overrides for team-grid-rects */
@media (max-width: 1200px) {
  .team-grid-rects {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

@media (max-width: 992px) {
  .team-grid-rects {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 576px) {
  .team-grid-rects {
    grid-template-columns: 1fr !important;
  }
}

/* WhatsApp Daily Report Styles */
.btn-whatsapp-report {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.btn-whatsapp-report:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.35) !important;
  filter: brightness(1.05);
}
.btn-whatsapp-report:active {
  transform: translateY(0) !important;
}

.report-appt-card {
  background: var(--bg-surface) !important;
  border-radius: 16px !important;
  padding: 18px !important;
  border: 1.5px solid var(--border-subtle) !important;
  border-right: 4px solid var(--remind-teal) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  box-shadow: var(--shadow-sm) !important;
  transition: all 0.2s ease !important;
}
.report-appt-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: var(--shadow-md) !important;
  border-color: var(--remind-blue) !important;
}
body.dark-mode .report-appt-card select {
  background: var(--bg-elevated) !important;
  border-color: var(--border-subtle) !important;
  color: var(--text-primary) !important;
}

.report-select {
  width: 100% !important;
  height: 46px !important;
  padding: 0 12px !important;
  border-radius: 12px !important;
  border: 1.5px solid var(--border-medium) !important;
  font-family: 'Cairo', sans-serif !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  color: var(--text-primary) !important;
  background: var(--bg-elevated) !important;
  outline: none !important;
  transition: all 0.25s ease !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
  display: block !important;
}

.report-select:focus {
  border-color: var(--remind-blue) !important;
  box-shadow: 0 0 0 3px var(--focus-ring) !important;
}



