#tab-bookings .bookings-summary-cards-row{grid-template-columns:repeat(8,minmax(0,1fr))!important;gap:8px!important}#tab-bookings .bookings-summary-cards-row .summary-stat-card{min-height:90px!important}.booking-qr-confirm-card-v2068 .card-icon{background:#eef2ff!important;color:#4338ca!important}.booking-qr-confirm-card-v2068 .card-value{font-size:11px!important;white-space:nowrap!important}.booking-modal-close-v2068,.booking-slot-modal-head-v2067>button{display:flex!important;align-items:center!important;justify-content:center!important;line-height:1!important;padding:0!important;text-align:center!important}.booking-slot-profile-v2068{display:grid;grid-template-columns:48px 1fr auto;align-items:center;gap:10px;margin-bottom:12px}.booking-slot-profile-v2068 img{width:48px;height:48px;border-radius:10px;object-fit:cover;border:1px solid #dbe4ef}.booking-slot-patient-link-v2068{border:0;background:transparent;text-align:right;padding:0;cursor:pointer;min-width:0}.booking-slot-patient-link-v2068 b{display:block;font-size:16px;color:#1d4ed8;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.booking-slot-patient-link-v2068 span{display:inline-flex;margin-top:3px;padding:2px 7px;border-radius:6px;background:#eef2ff;color:#4338ca;font-size:10px;font-weight:800;direction:ltr}.booking-slot-detail-grid-v2067 span{font-size:10px!important}.booking-slot-detail-grid-v2067 b{font-size:12px!important}.booking-slot-detail-grid-v2067 .wide{grid-column:span 2}.booking-slot-detail-actions-v2067 button{font-size:12px!important;height:39px!important}.booking-slot-free-shell-v2068{width:min(660px,96vw)!important}.booking-slot-free-shell-v2068 .booking-slot-modal-head-v2067 span{font-size:17px!important}.booking-free-new-v2067{padding:16px!important}.booking-free-new-v2067 b{font-size:14px!important}.booking-free-new-v2067 span{font-size:11px!important}.booking-free-move-v2067>div b{font-size:14px!important}.booking-free-move-v2067 select,.booking-free-move-v2067>button{font-size:12px!important;height:42px!important}.booking-free-date-label-v2068{font-size:11px;font-weight:800;color:#64748b;align-self:center}.booking-qr-scanner-v2068{position:fixed;inset:0;z-index:10090;background:rgba(15,23,42,.72);backdrop-filter:blur(5px);display:flex;align-items:center;justify-content:center;padding:16px;direction:rtl;font-family:'Cairo',sans-serif}.booking-qr-scanner-shell-v2068{width:min(520px,96vw);background:#fff;border-radius:18px;padding:14px;box-shadow:0 24px 70px rgba(0,0,0,.35)}.booking-qr-scanner-head-v2068{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.booking-qr-scanner-head-v2068 b{font-size:16px;color:#172033}.booking-qr-scanner-head-v2068 button{width:34px;height:34px;border-radius:9px;border:1px solid #e2e8f0;background:#f8fafc;font-size:22px;display:flex;align-items:center;justify-content:center}.booking-qr-scanner-v2068 video{width:100%;aspect-ratio:4/3;object-fit:cover;background:#0f172a;border-radius:14px}.booking-qr-scanner-v2068 p{font-size:12px;text-align:center;color:#64748b;margin:10px 0}.booking-qr-manual-v2068{display:grid;grid-template-columns:1fr auto;gap:8px}.booking-qr-manual-v2068 input{height:40px;border:1px solid #dbe4ef;border-radius:9px;padding:0 10px;font-family:'Cairo'}.booking-qr-manual-v2068 button{border:0;border-radius:9px;background:#213d7d;color:#fff;padding:0 16px;font-family:'Cairo';font-weight:800}.booking-timeline-legend-v2062 .pending i,.booking-timeline-legend-v2062 i.pending{background:#f97316!important;border-color:#f97316!important}body.dark-mode .booking-slot-patient-link-v2068 b{color:#93c5fd}body.dark-mode .booking-slot-patient-link-v2068 span{background:#312e81;color:#e0e7ff}body.dark-mode .booking-qr-scanner-shell-v2068{background:#111827;color:#f8fafc}body.dark-mode .booking-qr-scanner-head-v2068 b{color:#f8fafc}@media(max-width:768px){.booking-timeline-actions-v2062{width:100%!important;justify-content:center!important;margin-inline:auto!important}.booking-day-timeline-v2066{overflow:hidden!important}.booking-timeline-days-v2062{grid-template-columns:repeat(7,minmax(0,1fr))!important;gap:3px!important}.booking-day-chip-v2062{min-width:0!important;padding:5px 2px!important}.booking-day-chip-v2062 .day-name{font-size:7px!important}.booking-day-chip-v2062 .day-date{font-size:10px!important}.booking-day-chip-v2062 .day-count{font-size:6px!important}.booking-timeline-slots-v2062{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:4px!important}.booking-slot-v2062{min-width:0!important;padding:7px 2px!important}.booking-slot-v2062 .slot-time{font-size:10px!important}.booking-slot-v2062 .slot-state{font-size:7px!important}.booking-timeline-head-v2062{display:flex!important;flex-direction:column!important;align-items:stretch!important}.booking-timeline-eyebrow-v2062,.booking-timeline-title-v2066{display:block!important;width:100%!important}.booking-timeline-sub-v2066{display:none!important}.booking-timeline-summary-v2062{order:4!important;grid-template-columns:repeat(3,minmax(0,1fr))!important}.booking-timeline-summary-v2062>div:nth-child(2){grid-column:1/-1!important;order:-1!important}.booking-timeline-slots-v2062{order:3!important}.analytics-booking-mini-open-v2065,.analytics-booking-mini-open-v2066{width:30px!important;height:30px!important;min-width:30px!important;max-width:30px!important;padding:0!important;border-radius:8px!important}.analytics-period-box.mb-4,.analytics-toggles-box.mb-4{padding:9px!important;margin-bottom:10px!important}.analytics-period-box.mb-4 label,.analytics-toggles-box.mb-4 label{font-size:10px!important}.booking-stat-line-v2054 .card-label{font-size:11px!important}.summary-stat-card.total .card-label{font-size:0!important}.summary-stat-card.total .card-label:after{content:'كل الحجوزات';font-size:11px}.summary-stat-card.confirmed .card-label{font-size:0!important}.summary-stat-card.confirmed .card-label:after{content:'الحجز المؤكد';font-size:11px}.bookings-calendar-en-v2067{display:none!important}.booking-slot-detail-grid-v2067{grid-template-columns:repeat(2,minmax(0,1fr))!important}.booking-slot-profile-v2068{grid-template-columns:42px 1fr auto!important}.booking-slot-profile-v2068 img{width:42px;height:42px}.booking-slot-patient-link-v2068 b{font-size:14px!important}}

/* v20.69 — booking summary: 8 cards on one desktop row and QR card parity with reschedule */
@media (min-width:769px){
  body #tab-bookings .bookings-summary-cards-row.pc25-summary-ready{
    display:grid!important;
    grid-template-columns:repeat(8,minmax(0,1fr))!important;
    gap:7px!important;
    align-items:stretch!important;
  }
  body #tab-bookings .bookings-summary-cards-row.pc25-summary-ready>.summary-stat-card{
    min-width:0!important;
    width:100%!important;
  }
}
body #tab-bookings .bookings-summary-cards-row .summary-stat-card.total{order:1!important}
body #tab-bookings .bookings-summary-cards-row .summary-stat-card.confirmed{order:2!important}
body #tab-bookings .bookings-summary-cards-row .summary-stat-card.pending{order:3!important}
body #tab-bookings #booking-qr-confirm-card-v2068{order:4!important}
body #tab-bookings .bookings-summary-cards-row .booking-tool-card--numbers{order:5!important}
body #tab-bookings .bookings-summary-cards-row .pc25-booking-action-card[data-pc25="reschedule"]{order:6!important}
body #tab-bookings .bookings-summary-cards-row #queue-display-tool-card{order:7!important}
body #tab-bookings .bookings-summary-cards-row .pc25-booking-action-card[data-pc25="message"]{order:8!important}
body #tab-bookings .booking-qr-confirm-card-v2068{
  position:relative!important;overflow:hidden!important;
  width:100%!important;min-height:96px!important;padding:12px 16px!important;
  background:#fff!important;color:inherit!important;border:1px solid #eef2f7!important;
  border-radius:20px!important;box-shadow:0 10px 30px rgba(0,0,0,.05)!important;
  display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:6px!important;
}
body #tab-bookings .booking-qr-confirm-card-v2068::before{
  content:''!important;position:absolute!important;top:0!important;left:0!important;right:0!important;height:5px!important;
  background:linear-gradient(90deg,#2563eb,#60a5fa)!important;
}
body #tab-bookings .booking-qr-confirm-card-v2068 .card-icon{
  width:46px!important;height:46px!important;margin:0!important;border-radius:50%!important;
  background:#dbeafe!important;color:#2563eb!important;
}
body #tab-bookings .booking-qr-confirm-card-v2068 .card-value{
  font-size:1rem!important;font-weight:900!important;text-align:center!important;width:100%!important;
  color:#1d4ed8!important;white-space:normal!important;line-height:1.35!important;
}
body.dark-mode #tab-bookings .booking-qr-confirm-card-v2068{
  background:#111827!important;border-color:#334155!important;box-shadow:0 8px 24px rgba(0,0,0,.28)!important;
}
body.dark-mode #tab-bookings .booking-qr-confirm-card-v2068 .card-value{color:#93c5fd!important}


/* v20.70 — mobile analytics calendar, booking cards, pending legend and patient empty-state fixes */
.booking-timeline-legend-v2062 i.pending{
  width:10px!important;height:10px!important;min-width:10px!important;min-height:10px!important;
  border-radius:3px!important;display:inline-block!important;flex:0 0 10px!important;
  background:#f97316!important;border:1px solid #f97316!important;
}

.patients-empty-state-v2070{
  display:none;
  text-align:center;
  padding:28px 20px;
  color:#64748b;
  font-size:15px;
  font-weight:700;
  line-height:1.9;
  background:#f8fafc;
  border-radius:12px;
  border:1px dashed #e2e8f0;
  margin-bottom:20px;
}
body.dark-mode .patients-empty-state-v2070{
  color:#cbd5e1;background:#111827;border-color:#334155;
}

@media(max-width:768px){
  /* Analytics calendar: force all seven weekdays/dates to fit inside the mobile card. */
  html body #analytics-three-cols-wrapper,
  html body #analytics-three-cols-wrapper .analytics-col-1,
  html body #analytics-smart-calendar-card{
    width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important;
  }
  html body #analytics-smart-calendar-card{
    padding:10px!important;overflow:hidden!important;
  }
  html body #analytics-smart-calendar-card>.chart-header-flex{
    flex-wrap:wrap!important;gap:7px!important;margin-bottom:10px!important;padding-bottom:8px!important;min-width:0!important;
  }
  html body #analytics-smart-calendar-card .analytics-header{
    min-width:0!important;font-size:12px!important;line-height:1.45!important;white-space:normal!important;
  }
  html body #analytics-smart-calendar-card .smart-month-picker-shell-v2048{
    margin-inline-start:0!important;max-width:100%!important;min-width:0!important;
  }
  html body #analytics-smart-calendar-card .chart-container{
    width:100%!important;max-width:100%!important;min-width:0!important;
    padding:6px!important;overflow:hidden!important;box-sizing:border-box!important;
  }
  html body #analytics-smart-calendar-card .bookings-cal-header-grid,
  html body #analytics-smart-calendar-card .smart-calendar-grid-body{
    display:grid!important;grid-template-columns:repeat(7,minmax(0,1fr))!important;
    gap:3px!important;width:100%!important;max-width:100%!important;min-width:0!important;
    box-sizing:border-box!important;
  }
  html body #analytics-smart-calendar-card .bookings-cal-header-grid{
    margin:0 0 7px!important;padding:0 0 7px!important;
  }
  html body #analytics-smart-calendar-card .bookings-cal-header-grid>div{
    min-width:0!important;min-height:26px!important;padding:4px 0!important;
    font-size:8px!important;line-height:1.2!important;white-space:nowrap!important;
    overflow:hidden!important;text-overflow:clip!important;border-radius:7px!important;
  }
  html body #analytics-smart-calendar-card .smart-cal-cell,
  html body #analytics-smart-calendar-card .smart-cal-cell.active-cell,
  html body #analytics-smart-calendar-card .smart-cal-cell.empty-cell{
    width:auto!important;min-width:0!important;max-width:100%!important;
    min-height:50px!important;padding:4px 1px!important;gap:3px!important;
    border-radius:8px!important;box-sizing:border-box!important;overflow:hidden!important;
  }
  html body #analytics-smart-calendar-card .cal-day-num{
    min-width:22px!important;width:auto!important;height:22px!important;padding:0 3px!important;
    border-radius:7px!important;font-size:12px!important;
  }
  html body #analytics-smart-calendar-card .cal-badge-bookings,
  html body #analytics-smart-calendar-card .cal-badge-none{
    max-width:100%!important;font-size:6.5px!important;line-height:1.1!important;
    padding:1px 2px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
  }

  /* Booking summary: one clear title + the numeric value underneath on mobile. */
  html body #tab-bookings .bookings-summary-cards-row .booking-filter-stat-v2054 .booking-stat-line-v2054{
    display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;
    gap:3px!important;width:100%!important;max-width:100%!important;white-space:normal!important;margin:0!important;
  }
  html body #tab-bookings .bookings-summary-cards-row .booking-filter-stat-v2054 .booking-stat-line-v2054 .card-label{
    display:block!important;width:100%!important;max-width:100%!important;
    font-size:11px!important;font-weight:900!important;line-height:1.35!important;
    white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;text-align:center!important;
  }
  html body #tab-bookings .bookings-summary-cards-row .summary-stat-card.total .card-label::after,
  html body #tab-bookings .bookings-summary-cards-row .summary-stat-card.confirmed .card-label::after{
    content:none!important;display:none!important;
  }
  html body #tab-bookings .bookings-summary-cards-row .booking-filter-stat-v2054 .booking-stat-line-v2054 .booking-stat-colon-v2054{
    display:none!important;
  }
  html body #tab-bookings .bookings-summary-cards-row .booking-filter-stat-v2054 .booking-stat-line-v2054 .card-value{
    display:block!important;width:100%!important;margin:0!important;
    font-size:21px!important;font-weight:950!important;line-height:1!important;text-align:center!important;white-space:nowrap!important;
  }

  /* Patient Records: same mobile empty-state behaviour as Nursing records. */
  html body #patients-view-list .clinic-table-card:has(#patients-table-body-main tr.patients-empty-row-v2070:only-child){
    display:none!important;
  }
  html body #patients-view-list:has(#patients-table-body-main tr.patients-empty-row-v2070:only-child) .patients-empty-state-v2070{
    display:block!important;
  }
  html body #patients-view-list:has(#patients-table-body-main tr.patients-empty-row-v2070:only-child) #patients-list-pagination{
    display:none!important;
  }
}
