/* Clinic Booking Pro - Frontend */
.cbp-booking-wrap {
  direction: rtl;
  font-family: 'Segoe UI', 'Tahoma', 'Arial', sans-serif;
  max-width: 560px;
  margin: 0 auto;
  padding: 1.5rem;
}

.cbp-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(0,0,0,.06);
}

/* Circular logo (like doctor profile in booking card) */
.cbp-logo-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.75rem;
}

.cbp-logo-circle-wrap {
  margin-bottom: 0;
}

.cbp-logo-circle {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #0d9488;
  box-shadow: 0 0 0 4px #1a1a1a, 0 0 0 6px #fff, 0 0 0 8px #1a1a1a;
  background: #fff;
}

.cbp-logo-circle .cbp-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cbp-card h2,
.cbp-card h3 {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1a3d4a;
}

.cbp-step-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  color: #2d5a6b;
  font-weight: 600;
}

.cbp-step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}

/* Select - عيادات دروب دون */
.cbp-select-wrap {
  position: relative;
}

.cbp-booking-wrap select#cbp_clinic {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  padding-left: 2.5rem;
  transition: border-color .2s, box-shadow .2s;
  direction: rtl;
  text-align: right;
}

.cbp-booking-wrap select#cbp_clinic:hover,
.cbp-booking-wrap select#cbp_clinic:focus {
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, .15);
  outline: none;
}

/* Booking type */
.cbp-type-options {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cbp-type-option {
  flex: 1;
  min-width: 120px;
}

.cbp-type-option input {
  display: none;
}

.cbp-type-option label {
  display: block;
  padding: 0.85rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  font-weight: 500;
  color: #475569;
  transition: all .2s;
}

.cbp-type-option input:checked + label {
  border-color: #0d9488;
  background: rgba(13, 148, 136, .08);
  color: #0f766e;
}

.cbp-type-option label:hover {
  border-color: #99f6e4;
}

/* Dates */
.cbp-date-picker-wrap {
  margin-bottom: 1rem;
}
.cbp-date-picker-wrap label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 500;
  color: #334155;
}
.cbp-date-input {
  width: 100%;
  max-width: 220px;
  padding: 0.6rem 0.75rem;
  font-size: 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  color: #334155;
}
.cbp-date-input:focus {
  border-color: #0d9488;
  outline: none;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, .12);
}
.cbp-date-hint {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0 0 0.5rem 0;
}
.cbp-dates-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.cbp-msg-unavailable {
  color: #dc2626;
  font-weight: 500;
}

.cbp-date-btn {
  padding: 0.6rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  font-size: 0.9rem;
  color: #475569;
  cursor: pointer;
  transition: all .2s;
}

.cbp-date-btn:hover {
  border-color: #0d9488;
  color: #0f766e;
  background: rgba(13, 148, 136, .06);
}

.cbp-date-btn.active {
  border-color: #0d9488;
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: #fff;
}

/* Slots */
.cbp-slots-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cbp-slot-btn {
  padding: 0.65rem 1rem;
  border: 2px solid #a7f3d0;
  border-radius: 8px;
  background: #f0fdf4;
  font-size: 0.9rem;
  color: #065f46;
  cursor: pointer;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.cbp-slot-btn:hover {
  border-color: #34d399;
  background: #d1fae5;
  color: #047857;
}

.cbp-slot-btn.active {
  border-color: #059669;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #fff;
}
.cbp-slot-btn .cbp-slot-remain {
  display: block;
  font-size: 0.75rem;
  color: #047857;
  font-weight: 400;
  margin-top: 0.15rem;
}
.cbp-slot-btn.active .cbp-slot-remain { color: rgba(255,255,255,.85); }

.cbp-remaining-day {
  margin: 0 0 0.75rem 0;
  padding: 0.5rem 0.75rem;
  background: rgba(13, 148, 136, .08);
  border-radius: 8px;
  font-size: 0.9rem;
  color: #0f766e;
}
.cbp-remaining-label { margin-left: 0.25rem; }
.cbp-remaining-num { font-size: 1.1rem; }
.cbp-slot-btn .cbp-slot-price {
  color: #047857;
  font-weight: 600;
  font-size: 0.85rem;
  opacity: .95;
}
.cbp-slot-btn.active .cbp-slot-price { color: #fff; }

/* Confirm section */
.cbp-confirm-summary {
  background: #f8fafc;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

/* ثانكيو بيدج — بعد إتمام الحجز */
.cbp-thankyou-card {
  border: 2px solid rgba(13, 148, 136, .2);
  background: linear-gradient(180deg, rgba(13, 148, 136, .04) 0%, #fff 100%);
}

.cbp-thankyou-header {
  text-align: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #e2e8f0;
}

.cbp-thankyou-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: #fff;
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.cbp-thankyou-title {
  margin: 0 0 0.25rem 0;
  font-size: 1.35rem;
  color: #0f766e;
}

.cbp-thankyou-subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: #64748b;
}

.cbp-thankyou-details {
  margin-bottom: 1.5rem;
}

.cbp-thankyou-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.cbp-thankyou-row:last-child {
  border-bottom: none;
}

.cbp-thankyou-label {
  font-size: 0.9rem;
  color: #64748b;
}

.cbp-thankyou-value {
  font-weight: 600;
  color: #1e293b;
}

.cbp-thankyou-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.cbp-thankyou-btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform .15s, box-shadow .2s;
}

.cbp-thankyou-btn:hover {
  transform: translateY(-1px);
}

.cbp-thankyou-btn-primary {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(13, 148, 136, .3);
}

.cbp-thankyou-btn-primary:hover {
  box-shadow: 0 6px 20px rgba(13, 148, 136, .4);
}

.cbp-thankyou-btn-secondary {
  background: #fff;
  color: #0d9488;
  border: 2px solid #0d9488;
}

.cbp-thankyou-btn-secondary:hover {
  background: rgba(13, 148, 136, .06);
  color: #0f766e;
}

.cbp-form-row {
  margin-bottom: 1rem;
}

.cbp-form-row label {
  display: block;
  font-weight: 500;
  color: #334155;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.cbp-form-row input {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color .2s;
  box-sizing: border-box;
}

.cbp-form-row input:focus {
  border-color: #0d9488;
  outline: none;
}

.cbp-optional { font-weight: 400; color: #64748b; font-size: 0.85em; }
.cbp-complaint-input {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
  min-height: 4rem;
  transition: border-color .2s;
  box-sizing: border-box;
}
.cbp-complaint-input:focus {
  border-color: #0d9488;
  outline: none;
}

.cbp-submit-btn {
  width: 100%;
  padding: 0.9rem 1.5rem;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s, box-shadow .2s;
  margin-top: 0.5rem;
}

.cbp-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(13, 148, 136, .35);
}

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

.cbp-next-wrap {
  margin-top: 1rem;
  text-align: center;
}

.cbp-next-wrap.cbp-next-dates-wrap {
  margin-top: 0.75rem;
}

.cbp-next-btn {
  padding: 0.75rem 1.75rem;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s, box-shadow .2s;
}

.cbp-next-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(13, 148, 136, .35);
}

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

.cbp-msg {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  min-height: 1.4em;
}

.cbp-msg.success { color: #0d9488; }
.cbp-msg.error { color: #dc2626; }

/* Loading */
.cbp-loading {
  opacity: .7;
  pointer-events: none;
}

.cbp-loading-dots::after {
  content: '';
  animation: cbp-dots 1s steps(4, end) infinite;
}

@keyframes cbp-dots {
  0%, 20% { content: '.'; }
  40% { content: '..'; }
  60%, 100% { content: '...'; }
}

/* Empty state */
.cbp-empty {
  color: #64748b;
  font-size: 0.95rem;
  padding: 0.5rem 0;
}

/* صفحة الحساب — تسجيل / دخول */
.cbp-account-head {
  margin-bottom: 1.25rem;
  text-align: center;
}

.cbp-account-title {
  margin: 0 0 0.35em 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f766e;
}

.cbp-account-desc {
  margin: 0;
  font-size: 0.95rem;
  color: #64748b;
  line-height: 1.5;
}

.cbp-auth-card {
  max-width: 400px;
  margin: 0 auto;
  padding: 1.5rem 1.75rem;
}

.cbp-auth-hint {
  margin: 0 0 1rem 0;
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.45;
}

.cbp-auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.25rem;
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  background: #f8fafc;
  padding: 4px;
}

.cbp-auth-tabs .cbp-auth-tab {
  flex: 1;
  padding: 0.7rem 1rem;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.95rem;
  color: #64748b;
  font-weight: 600;
  border-radius: 8px;
  margin-bottom: 0;
  transition: color .2s, background .2s;
}

.cbp-auth-tabs .cbp-auth-tab:hover {
  color: #0f766e;
}

.cbp-auth-tabs .cbp-auth-tab.active {
  color: #0f766e;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  border-bottom-color: transparent;
}

.cbp-auth-panel {
  display: none;
}

.cbp-auth-panel.active {
  display: block;
}

/* صفحة الحساب — عند تسجيل الدخول (ترحيب) */
.cbp-account-welcome-card {
  max-width: 420px;
  margin: 0 auto;
  padding: 1.75rem;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
  border: 1px solid rgba(0,0,0,.06);
}

.cbp-account-welcome-head {
  text-align: center;
  margin-bottom: 1.5rem;
}

.cbp-account-welcome-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(13, 148, 136, .15) 0%, rgba(15, 118, 110, .12) 100%);
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.cbp-account-welcome-title {
  margin: 0 0 0.35em 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f766e;
}

.cbp-account-welcome-desc {
  margin: 0;
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.5;
}

.cbp-account-welcome-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cbp-account-action-btn {
  display: block;
  text-align: center;
  padding: 0.9rem 1.25rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
}

.cbp-account-action-btn:active {
  transform: translateY(0);
}

.cbp-account-action-primary {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: #fff;
  border: none;
}

.cbp-account-action-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(13, 148, 136, .35);
}

.cbp-account-action-secondary {
  background: #fff;
  color: #0d9488;
  border: 2px solid #0d9488;
}

.cbp-account-action-secondary:hover {
  background: rgba(13, 148, 136, .08);
  transform: translateY(-1px);
}

.cbp-account-logout-wrap {
  margin: 1.25rem 0 0 0;
  text-align: center;
}

.cbp-account-logout {
  font-size: 0.875rem;
  color: #64748b;
  text-decoration: none;
}

.cbp-account-logout:hover {
  color: #0d9488;
  text-decoration: underline;
}

/* الملف الشخصي — شاشة شبيهة بالتطبيقات (صورة، اسم، معلومات مؤكدة) */
.cbp-profile-card {
  max-width: 420px;
  margin: 0 auto;
  padding: 0 0 2rem 0;
}

.cbp-profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding: 0 0.25rem;
}

.cbp-profile-page-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f766e;
}

.cbp-profile-edit-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: #0d9488;
  text-decoration: none;
}

.cbp-profile-edit-link:hover {
  text-decoration: underline;
}

.cbp-profile-avatar-wrap {
  text-align: center;
  margin-bottom: 1.75rem;
}

.cbp-profile-avatar {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 0.75rem auto;
  flex-shrink: 0;
}

.cbp-profile-avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(13, 148, 136, .2) 0%, rgba(15, 118, 110, .15) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cbp-profile-edit-icon {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #0d9488;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  text-decoration: none;
}

.cbp-profile-edit-icon:hover {
  background: #0f766e;
  color: #fff;
  text-decoration: none;
}

.cbp-profile-edit-icon .cbp-icon-pencil {
  width: 16px;
  height: 16px;
}

.cbp-profile-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cbp-profile-photo-initial {
  font-size: 2.25rem;
  font-weight: 700;
  color: #0f766e;
}

.cbp-profile-name {
  margin: 0 0 0.2em 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: #1e293b;
}

.cbp-profile-meta {
  margin: 0;
  font-size: 0.875rem;
  color: #64748b;
}

.cbp-profile-verified-section {
  background: #f8fafc;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  border: 1px solid #e2e8f0;
}

.cbp-profile-verified-heading {
  margin: 0 0 0.75rem 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.cbp-profile-verified-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.cbp-profile-verified-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.cbp-profile-verified-label {
  font-size: 0.95rem;
  color: #334155;
}

.cbp-profile-verified-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #0d9488;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}

.cbp-profile-verified-none {
  font-size: 0.875rem;
  color: #94a3b8;
}

.cbp-profile-analysis-section {
  background: #f8fafc;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  border: 1px solid #e2e8f0;
}

.cbp-profile-analysis-section .cbp-profile-verified-heading { margin-top: 0; }

.cbp-profile-analysis-hint {
  margin: 0 0 0.75rem 0;
  font-size: 0.875rem;
  color: #64748b;
}

.cbp-analysis-upload-wrap {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cbp-analysis-upload-label { cursor: pointer; }

.cbp-analysis-files-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cbp-analysis-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e2e8f0;
  gap: 0.5rem;
}

.cbp-analysis-file-item:last-child { border-bottom: none; }

.cbp-analysis-file-item a {
  color: #0d9488;
  text-decoration: none;
  font-size: 0.95rem;
}

.cbp-analysis-file-item a:hover { text-decoration: underline; }

.cbp-analysis-file-date {
  font-size: 0.8rem;
  color: #94a3b8;
  white-space: nowrap;
}

.cbp-analysis-empty {
  margin: 0;
  font-size: 0.875rem;
  color: #94a3b8;
}

.cbp-msg.success { color: #0d9488; }
.cbp-msg.error { color: #dc2626; }

.cbp-profile-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cbp-profile-delete-wrap,
.cbp-account-delete-wrap {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}
/* نفس شكل أزرار حجز موعد / حجوزاتي لكن بلون خطر (أحمر) */
.cbp-account-delete-btn,
.cbp-profile-delete-account {
  display: block;
  width: 100%;
  text-align: center;
  padding: 0.9rem 1.25rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid #dc2626;
  background: #fff;
  color: #b91c1c;
  transition: transform .2s, box-shadow .2s, background .2s;
  text-decoration: none;
  box-sizing: border-box;
}
.cbp-account-delete-btn:hover,
.cbp-profile-delete-account:hover {
  background: rgba(220, 38, 38, .08);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, .2);
}
.cbp-account-delete-btn:active,
.cbp-profile-delete-account:active {
  transform: translateY(0);
}
.cbp-account-delete-btn:disabled,
.cbp-profile-delete-account:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* My bookings table */
.cbp-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -0.25rem;
}
.cbp-my-bookings-table {
  width: 100%;
  min-width: 320px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.cbp-my-bookings-table th,
.cbp-my-bookings-table td {
  padding: 0.6rem 0.75rem;
  text-align: right;
  border-bottom: 1px solid #e2e8f0;
}

.cbp-my-bookings-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
}

/* قائمة الحجوزات — كروت */
.cbp-cancel-success-msg {
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  background: rgba(13, 148, 136, .12);
  border: 1px solid rgba(13, 148, 136, .3);
  border-radius: 10px;
  color: #0f766e;
  font-weight: 600;
  transition: opacity .3s;
}
.cbp-cancel-success-msg-hide {
  opacity: 0;
}

.cbp-bookings-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.cbp-booking-card {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 1rem;
  padding: 1.25rem;
  margin-bottom: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.04);
  transition: box-shadow .2s, border-color .2s;
  isolation: isolate;
}

.cbp-booking-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0,0,0,.06);
}

.cbp-booking-card-main {
  flex: 1;
  min-width: 0;
}

.cbp-booking-card-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.cbp-booking-card-row:last-child {
  margin-bottom: 0;
}

.cbp-booking-card-header {
  margin-bottom: 0.6rem;
}

.cbp-booking-card-date {
  font-weight: 700;
  font-size: 1.05rem;
  color: #0f766e;
}

.cbp-booking-card-time {
  font-weight: 600;
  color: #334155;
  padding: 0.2rem 0.5rem;
  background: #f1f5f9;
  border-radius: 6px;
}

.cbp-booking-card-label {
  font-size: 0.85rem;
  color: #64748b;
  min-width: 3.5em;
}

.cbp-booking-card-value {
  font-weight: 500;
  color: #1e293b;
}

.cbp-booking-card-meta {
  margin-top: 0.25rem;
}

.cbp-booking-card-type {
  font-size: 0.9rem;
  color: #475569;
}

.cbp-booking-card-price {
  font-weight: 600;
  color: #0d9488;
  font-size: 0.95rem;
}

.cbp-booking-status {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.cbp-booking-status-confirmed {
  background: rgba(13, 148, 136, .12);
  color: #0f766e;
}

.cbp-booking-status-pending {
  background: rgba(245, 158, 11, .15);
  color: #b45309;
}

.cbp-booking-card-actions {
  display: flex;
  align-items: center;
}

.cbp-booking-cancel-btn {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #dc2626;
  background: #fff;
  border: 1px solid #fecaca;
  border-radius: 8px;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}

.cbp-booking-cancel-btn:hover:not(:disabled) {
  background: #fef2f2;
  border-color: #dc2626;
}

.cbp-booking-cancel-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* ========== تطبيق واحد [cbp_app] — هيدر + محتوى + فوتر (موبايل) ========== */
.cbp-app,
.cbp-app * {
  box-sizing: border-box;
}

.cbp-app {
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, #f0fdfa 0%, #e0f2fe 50%, #f8fafc 100%);
  padding-bottom: env(safe-area-inset-bottom);
  overflow-x: hidden;
}

.cbp-app-header {
  width: 100%;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  padding: 0.6rem 1rem;
  padding-top: calc(0.6rem + env(safe-area-inset-top));
  padding-left: max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
  position: sticky;
  top: 0;
  z-index: 100;
  box-sizing: border-box;
}

.cbp-app-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.cbp-app-logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cbp-app-logo-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #0d9488;
}

.cbp-app-nav {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.cbp-app-nav a,
.cbp-app-logout {
  color: #475569;
  text-decoration: none;
  font-size: 0.9rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.35rem 0.5rem;
}

.cbp-app-nav a:hover,
.cbp-app-logout:hover { color: #0d9488; }

.cbp-app-user-name {
  color: #0f766e;
  font-weight: 500;
  font-size: 0.85rem;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cbp-app-body {
  display: flex;
  flex: 1;
  min-height: 0;
  width: 100%;
}

/* السايد منيو يفتح بالضغط على زر الملف الشخصي في الهيدر (ديسكتوب + موبايل) */
.cbp-app-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  max-width: 85vw;
  z-index: 200;
  background: #f8fafc;
  padding: 1rem;
  padding-top: max(4.5rem, calc(env(safe-area-inset-top) + 3rem));
  padding-right: max(1rem, env(safe-area-inset-right));
  box-sizing: border-box;
  box-shadow: -4px 0 20px rgba(0,0,0,.1);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform .25s ease, visibility .25s;
  overflow-y: auto;
}
.cbp-app-sidebar.open {
  transform: translateX(0);
  visibility: visible;
}
.cbp-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 199;
}
.cbp-app-sidebar.open ~ .cbp-sidebar-backdrop {
  display: block;
}

.cbp-app-sidebar-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
  border: 1px solid rgba(0,0,0,.06);
  padding: 0.5rem 0;
  overflow: hidden;
}

.cbp-app-sidebar-card .cbp-app-profile-menu-head {
  padding: 1rem 1rem 0.75rem;
  margin-bottom: 0.25rem;
}

.cbp-app-sidebar-card .cbp-app-profile-menu-item {
  padding: 0.75rem 1rem;
}

.cbp-app-main {
  flex: 1;
  min-width: 0;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 1rem;
  padding-left: max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
  box-sizing: border-box;
}

.cbp-page-section {
  display: none;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.cbp-page-section.active {
  display: block;
}

.cbp-auth-required-banner {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  text-align: center;
}

.cbp-app-footer {
  width: 100%;
  background: #1a1a1a;
  color: #94a3b8;
  padding: 1rem;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom));
  padding-left: max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
  margin-top: auto;
  box-sizing: border-box;
}

.cbp-app-footer-inner {
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.cbp-app-footer-tagline {
  text-align: center;
  font-size: 0.85rem;
  margin: 0 0 0.5rem 0;
}

.cbp-app-footer-copy {
  text-align: center;
  font-size: 0.8rem;
  color: #64748b;
  margin: 0;
}

.cbp-app-footer-copy a {
  color: #94a3b8;
  text-decoration: none;
}

.cbp-app-footer-copy a:hover {
  color: #0d9488;
}

/* شريط تنقل سريع — موبايل وديسكتوب (حجز جديد، حجوزاتي، الحساب) */
.cbp-quick-nav {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 150;
  background: #fff;
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -2px 12px rgba(0,0,0,.08);
  padding: 0.5rem 0;
  padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
  justify-content: space-around;
  align-items: center;
}

.cbp-quick-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.75rem;
  color: #64748b;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 8px;
  transition: color .2s, background .2s;
}

.cbp-quick-nav-item:hover,
.cbp-quick-nav-item:active {
  color: #0d9488;
  background: rgba(13, 148, 136, .08);
}

.cbp-quick-nav-item.active {
  color: #0d9488;
  font-weight: 600;
}

.cbp-quick-nav-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.cbp-quick-nav-label {
  white-space: nowrap;
}

/* مساحة أسفل المحتوى لعدم اختفاء المحتوى خلف الشريط */
.cbp-app-main {
  padding-bottom: calc(4rem + env(safe-area-inset-bottom));
}

/* ========== تابلت + آيباد: نفس شكل الموبايل بالضبط (بدون توسيع المحتوى) ========== */
@media (min-width: 600px) and (max-width: 1366px) {
  .cbp-app-header-inner,
  .cbp-app-main,
  .cbp-app-footer-inner {
    max-width: 600px;
  }
  .cbp-quick-nav {
    max-width: none;
    left: 0;
    right: 0;
    transform: none;
    border-radius: 0;
    border-left: none;
    border-right: none;
    padding: 0.5rem 0;
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
  }
  .cbp-quick-nav-item {
    font-size: 0.75rem;
    min-height: auto;
    padding: 0.35rem 0.75rem;
    gap: 0.25rem;
  }
  .cbp-quick-nav-icon {
    font-size: 1.35rem;
  }
  .cbp-app-main {
    padding-bottom: calc(4rem + env(safe-area-inset-bottom));
  }
  .cbp-type-option label,
  .cbp-date-btn,
  .cbp-slot-btn {
    -webkit-tap-highlight-color: transparent;
  }
}


@media (min-width: 768px) {
  .cbp-quick-nav {
    padding: 0.75rem 1.5rem;
    max-width: 420px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 16px 16px 0 0;
    border: 1px solid #e2e8f0;
    border-bottom: none;
    box-shadow: 0 -4px 24px rgba(0,0,0,.12);
    gap: 0.5rem;
  }
  .cbp-quick-nav-item {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    gap: 0.5rem;
    border-radius: 12px;
    min-height: 56px;
    justify-content: center;
  }
  .cbp-quick-nav-item:hover {
    background: rgba(13, 148, 136, .1);
    color: #0f766e;
  }
  .cbp-quick-nav-item.active {
    background: linear-gradient(135deg, rgba(13, 148, 136, .15) 0%, rgba(15, 118, 110, .12) 100%);
    color: #0f766e;
    box-shadow: inset 0 0 0 1px rgba(13, 148, 136, .25);
  }
  .cbp-quick-nav-icon {
    font-size: 1.75rem;
  }
  .cbp-app-main {
    padding-bottom: calc(5rem + env(safe-area-inset-bottom));
  }
}

/* التابلت: إلغاء شكل الـ pill وإرجاع الشريط السفلي مثل الموبايل (عرض كامل) */
@media (min-width: 600px) and (max-width: 1366px) {
  .cbp-quick-nav {
    max-width: none !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    padding: 0.5rem 0 !important;
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom)) !important;
    gap: 0;
  }
  .cbp-quick-nav-item {
    font-size: 0.75rem !important;
    min-height: auto !important;
    padding: 0.35rem 0.75rem !important;
    gap: 0.25rem !important;
    border-radius: 8px !important;
    justify-content: center !important;
  }
  .cbp-quick-nav-icon {
    font-size: 1.35rem !important;
  }
  .cbp-app-main {
    padding-bottom: calc(4rem + env(safe-area-inset-bottom)) !important;
  }
}

@media (max-width: 767px) {
  .cbp-app-footer-copy {
    display: none;
  }
  html, body {
    overscroll-behavior-y: none;
  }
}

/* ديسكتوب: إخفاء الفوتر الأسود + شريط الأزرار بعرض كامل متناسق */
@media (min-width: 1024px) {
  .cbp-app-footer {
    display: none;
  }
  .cbp-quick-nav {
    left: 0;
    right: 0;
    transform: none;
    border-radius: 0;
    border-left: none;
    border-right: none;
    padding: 0.6rem 1rem;
    padding-bottom: max(0.6rem, env(safe-area-inset-bottom));
    justify-content: center;
    gap: 2rem;
    max-width: 600px;
    margin: 0 auto;
    box-sizing: border-box;
  }
  .cbp-quick-nav-item {
    flex: 0 1 auto;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    min-height: 48px;
    gap: 0.35rem;
    border-radius: 10px;
  }
  .cbp-quick-nav-icon {
    font-size: 1.5rem;
  }
  .cbp-app-main {
    padding-bottom: calc(4.5rem + env(safe-area-inset-bottom));
  }
}

/* Profile button + اسم المستخدم في الهيدر */
.cbp-app-nav-user {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.cbp-app-header-username {
  font-weight: 600;
  font-size: 0.9rem;
  color: #1e293b;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cbp-app-profile-btn {
  position: relative;
  width: 48px;
  height: 48px;
  min-width: 48px;
  max-width: 48px;
  min-height: 48px;
  max-height: 48px;
  border-radius: 50%;
  border: 2px solid #e2e8f0;
  padding: 0;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.cbp-app-profile-btn:hover {
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, .12);
}
.cbp-app-avatar-img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100% !important;
  height: 100% !important;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  display: block;
}
.cbp-app-avatar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
}
.cbp-app-avatar-icon svg {
  width: 24px;
  height: 24px;
}

/* Sidebar profile menu (shared head + items) */
.cbp-app-profile-menu-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 0.25rem;
}
.cbp-app-profile-menu-avatar {
  width: 52px !important;
  height: 52px !important;
  min-width: 52px;
  max-width: 52px;
  min-height: 52px;
  max-height: 52px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}
.cbp-app-profile-menu-avatar.cbp-app-avatar-placeholder {
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
}
.cbp-app-profile-menu-avatar.cbp-app-avatar-placeholder svg {
  width: 28px;
  height: 28px;
}
.cbp-app-profile-menu-name {
  font-weight: 600;
  color: #1e293b;
  font-size: 0.95rem;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cbp-app-profile-menu-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.7rem 1rem;
  color: #334155;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  text-align: right;
  transition: background .15s, color .15s;
  box-sizing: border-box;
}
.cbp-app-profile-menu-item:hover {
  background: #f1f5f9;
  color: #0d9488;
}
.cbp-app-menu-ico {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* منطقة أزرار خروج وحذف الحساب في السايدبار */
.cbp-app-sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 1rem 1rem 0.75rem;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}
.cbp-app-sidebar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  box-sizing: border-box;
  text-decoration: none;
  font-family: inherit;
}
.cbp-app-sidebar-btn-logout {
  background: #fff;
  color: #475569;
  border-color: #e2e8f0;
}
.cbp-app-sidebar-btn-logout:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #334155;
}
.cbp-app-sidebar-btn-delete {
  background: #fff;
  color: #b91c1c;
  border-color: #fecaca;
}
.cbp-app-sidebar-btn-delete:hover {
  background: #fef2f2;
  border-color: #f87171;
  color: #991b1b;
}

/* موبايل: مساحة أقل للسايد بار */
@media (max-width: 768px) {
  .cbp-app-sidebar {
    width: 280px;
    max-width: 85vw;
  }
}

/* Profile edit form */
.cbp-profile-photo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.25rem;
}
.cbp-profile-photo-preview,
.cbp-profile-photo-placeholder {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin-bottom: 0.5rem;
  border: 3px solid #e2e8f0;
}
.cbp-profile-photo-placeholder {
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
}
.cbp-profile-photo-placeholder svg {
  width: 48px;
  height: 48px;
}
.cbp-profile-photo-upload {
  cursor: pointer;
  font-size: 0.85rem;
  color: #0d9488;
  text-decoration: underline;
}
.cbp-profile-photo-upload input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  overflow: hidden;
}
.cbp-msg {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}
.cbp-msg.success { color: #0d9488; }
.cbp-msg.error { color: #dc2626; }

@media (max-width: 480px) {
  .cbp-booking-card { flex-direction: column; align-items: stretch; }
  .cbp-booking-card-actions { justify-content: stretch; }
  .cbp-booking-cancel-btn { width: 100%; }
  .cbp-app-header { padding: 0.5rem 0.75rem; padding-top: calc(0.5rem + env(safe-area-inset-top)); }
  .cbp-app-logo-img { width: 36px; height: 36px; }
  .cbp-app-nav a, .cbp-app-logout { font-size: 0.85rem; }
  .cbp-app-main { padding: 0.75rem; }
  .cbp-app-footer { padding: 0.75rem; padding-bottom: calc(0.75rem + env(safe-area-inset-bottom)); }
  .cbp-app-profile-btn { width: 44px; height: 44px; min-width: 44px; max-width: 44px; min-height: 44px; max-height: 44px; }
  .cbp-app-avatar-img { width: 100% !important; height: 100% !important; }
  .cbp-app-profile-menu-avatar { width: 48px !important; height: 48px !important; min-width: 48px; max-width: 48px; min-height: 48px; max-height: 48px; }
  .cbp-profile-photo-preview,
  .cbp-profile-photo-placeholder { width: 140px; height: 140px; }
}

/* Responsive */
@media (max-width: 480px) {
  .cbp-booking-wrap { padding: 1rem; max-width: 100%; box-sizing: border-box; }
  .cbp-card { padding: 1rem; max-width: 100%; box-sizing: border-box; }
  .cbp-type-options { flex-direction: column; }
  .cbp-date-btn, .cbp-slot-btn { flex: 1 1 100%; }
  .cbp-my-bookings-table th,
  .cbp-my-bookings-table td { padding: 0.5rem 0.4rem; font-size: 0.8rem; white-space: nowrap; }
  .cbp-table-wrap { margin: 0; border-radius: 8px; }
}
