/* ── Doctor public profile polish ── */
body.profile-page {
  background: #f8fafc;
}

.profile_header {
  background: #fff !important;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

.profile_header .navbar-brand img {
  max-height: 42px;
}

.profile_header .nav-link {
  font-weight: 500;
  color: #475569 !important;
  border-radius: 8px;
  padding: 8px 14px !important;
  margin: 0 2px;
}

.profile_header .nav-link.active,
.profile_header .nav-link:hover {
  color: #2563eb !important;
  background: rgba(37, 99, 235, 0.08);
}

.profile-hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #3b82f6 100%);
  color: #fff;
  padding: 48px 0 80px;
  position: relative;
  overflow: hidden;
}

.profile-hero::before {
  content: "";
  position: absolute;
  top: -30%;
  right: -5%;
  width: 360px;
  height: 360px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.profile-hero::after {
  content: "";
  position: absolute;
  bottom: -40%;
  left: 10%;
  width: 240px;
  height: 240px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  pointer-events: none;
}

.profile-hero .container {
  position: relative;
  z-index: 1;
}

.profile-avatar-wrap {
  text-align: center;
}

.profile-avatar-frame {
  display: inline-block;
  padding: 6px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.profile-avatar-frame img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #fff;
  background: #fff;
}

.profile-hero-info {
  padding-left: 0;
}

@media (min-width: 768px) {
  .profile-hero-info {
    padding-left: 24px;
  }
}

.profile-hero-info .rating_link {
  color: rgba(255, 255, 255, 0.95) !important;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 12px;
}

.profile-hero-info .rating_link span {
  color: rgba(255, 255, 255, 0.85) !important;
}

.profile-hero-name {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  line-height: 1.2;
}

.profile-hero-degree {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 6px;
}

.profile-hero-specialist {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 16px;
}

.profile-hero-about {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 560px;
}

.profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 24px;
}

@media (max-width: 575px) {
  .profile-stat-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.profile-stat-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.profile-stat-card .stat-num {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.profile-stat-card .stat-label {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.profile-hero-cta {
  margin-top: 20px;
}

.profile-hero-cta .btn-book-now {
  background: #fff;
  color: #1d4ed8;
  font-weight: 600;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.profile-hero-cta .btn-book-now:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  color: #1e40af;
}

.profile-booking-section {
  background: #f1f5f9;
  padding: 48px 0 64px;
  margin-top: -40px;
  position: relative;
  z-index: 2;
}

.profile-section-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
  padding: 28px;
  height: 100%;
}

.profile-section-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-section-title i {
  color: #2563eb;
  font-size: 1.2rem;
}

.profile-schedule-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.profile-schedule-item {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  margin-bottom: 8px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  transition: border-color 0.15s ease;
}

.profile-schedule-item.is-open {
  border-color: #93c5fd;
  background: #eff6ff;
}

.profile-schedule-item.is-closed {
  opacity: 0.75;
}

.profile-schedule-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  flex-shrink: 0;
  font-size: 14px;
}

.profile-schedule-icon.open {
  background: #dcfce7;
  color: #16a34a;
}

.profile-schedule-icon.closed {
  background: #fee2e2;
  color: #dc2626;
}

.profile-schedule-day {
  font-weight: 600;
  color: #0f172a;
  flex: 1;
}

.profile-schedule-time {
  font-size: 0.85rem;
  color: #64748b;
}

.profile-booking-card {
  border: none !important;
  border-radius: 16px !important;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.1) !important;
  overflow: hidden;
}

.profile-booking-card .card-header {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  color: #fff !important;
  border: none !important;
  padding: 20px 24px !important;
}

.profile-booking-card .card-header h2 {
  color: #fff !important;
  font-weight: 600;
}

.profile-booking-card .card-body {
  padding: 28px !important;
  background: #fff;
}

.profile-booking-card .form-control {
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  padding: 10px 14px;
  height: auto;
}

.profile-booking-card .form-control:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.profile-booking-card label {
  font-weight: 600;
  font-size: 0.9rem;
  color: #334155;
}

.profile-booking-card .btn-primary {
  border-radius: 10px;
  padding: 12px 20px;
  font-weight: 600;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: none;
}

.profile-booking-card .btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

.profile-consultation-fee {
  display: block;
  text-align: center;
  padding: 10px 16px;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  margin-top: 16px;
}

#load_data .badge,
#load_data .btn {
  margin: 4px;
  min-height: 44px;
  min-width: 44px;
}

.profile-timeline-section {
  padding: 56px 0;
  background: #fff;
}

.profile-timeline-section:nth-child(even) {
  background: #f8fafc;
}

.profile-timeline-section .section-heading {
  text-align: center;
  margin-bottom: 40px;
}

.profile-timeline-section .section-heading h2 {
  font-weight: 700;
  color: #0f172a;
  font-size: 1.75rem;
}

.profile-timeline-section .section-heading i {
  color: #2563eb;
  margin-right: 8px;
}

.profile-timeline-section .card {
  border-radius: 12px !important;
  border: 1px solid #e2e8f0 !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.profile-timeline-section .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08) !important;
}

.profile-timeline-section .card-title {
  font-weight: 700;
  color: #0f172a;
}

.profile-nav-book-btn {
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  font-weight: 600;
  padding: 8px 16px !important;
}

.profile-nav-book-btn:hover {
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

/* ── Navbar mobile ── */
.profile-navbar {
  padding: 12px 0 !important;
}

.profile-navbar-toggler {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 10px;
}

.profile-nav-list {
  padding: 12px 0 8px;
}

.profile-nav-list .nav-item {
  width: 100%;
}

@media (min-width: 992px) {
  .profile-nav-list .nav-item {
    width: auto;
  }
}

.profile-mobile-nav-book {
  margin: 8px 0 12px;
}

.profile-nav-auth {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

@media (min-width: 992px) {
  .profile-nav-auth {
    flex-wrap: nowrap;
    margin-top: 0;
  }
}

.profile-nav-auth .btn {
  flex: 1 1 auto;
  min-width: 120px;
}

/* ── Mobile sticky CTA ── */
body.profile-page.has-mobile-cta {
  padding-bottom: 76px;
}

.profile-mobile-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.1);
}

.profile-mobile-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff !important;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 12px;
  text-decoration: none !important;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
}

.profile-mobile-cta-btn:active {
  transform: scale(0.98);
}

/* ── Booking form actions ── */
.profile-booking-actions {
  margin-top: 8px;
}

.profile-booking-actions--split {
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  padding: 16px 0 0;
}

@media (min-width: 576px) {
  .profile-booking-actions--split {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .profile-booking-actions--split .back_step,
  .profile-booking-actions--split .booking_btn {
    margin-top: 0 !important;
    width: auto;
  }
}

.profile-booking-actions .btn,
.profile-booking-card .confirm_step {
  min-height: 48px;
  font-size: 1rem;
}

.profile-booking-card .nav-tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-bottom: 1px solid #e2e8f0;
  scrollbar-width: none;
}

.profile-booking-card .nav-tabs::-webkit-scrollbar {
  display: none;
}

.profile-booking-card .nav-tabs .nav-link {
  white-space: nowrap;
  font-size: 0.85rem;
  padding: 10px 14px;
  border-radius: 8px 8px 0 0;
}

.profile-booking-card .g-recaptcha {
  transform-origin: left top;
  margin-bottom: 12px;
}

/* ── Timeline mobile ── */
@media (max-width: 767px) {
  .profile-timeline-section .row.no-gutters > .col-sm {
    display: none !important;
  }

  .profile-timeline-section .row.no-gutters {
    margin-bottom: 12px;
  }

  .profile-timeline-section .col-sm.py-2,
  .profile-timeline-section .col-sm-1 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .profile-timeline-section .card-body {
    padding: 16px !important;
  }

  .profile-timeline-section .float-right {
    float: none !important;
    display: block;
    margin-bottom: 8px;
  }
}

/* ── Tablet & mobile breakpoints ── */
@media (max-width: 991px) {
  .profile-booking-section {
    margin-top: -24px;
    padding: 32px 0 48px;
  }

  .profile-section-card {
    padding: 20px;
  }
}

@media (max-width: 767px) {
  .profile-page .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .profile-hero {
    padding: 32px 0 56px;
  }

  .profile-hero-name {
    font-size: 1.5rem;
  }

  .profile-hero-degree {
    font-size: 0.95rem;
  }

  .profile-hero-about {
    font-size: 0.95rem;
    margin-left: auto;
    margin-right: auto;
  }

  .profile-avatar-frame img {
    width: 140px;
    height: 140px;
  }

  .profile-stat-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 20px;
  }

  .profile-stat-card {
    padding: 12px 8px;
  }

  .profile-stat-card .stat-num {
    font-size: 1.35rem;
  }

  .profile-stat-card .stat-label {
    font-size: 0.65rem;
    line-height: 1.3;
  }

  .profile-hero-cta .btn-book-now {
    width: 100%;
    max-width: 320px;
  }

  .profile-booking-section {
    margin-top: 0;
    padding-top: 24px;
  }

  .profile-section-title {
    font-size: 1.15rem;
  }

  .profile-schedule-item {
    padding: 10px 12px;
  }

  .profile-schedule-day {
    font-size: 0.95rem;
  }

  .profile-booking-card .card-header {
    padding: 16px !important;
  }

  .profile-booking-card .card-header h2 {
    font-size: 1.1rem;
  }

  .profile-booking-card .card-body {
    padding: 20px 16px !important;
  }

  .profile-timeline-section {
    padding: 40px 0;
  }

  .profile-timeline-section .section-heading {
    margin-bottom: 24px;
  }

  .profile-timeline-section .section-heading h2 {
    font-size: 1.35rem;
  }
}

@media (max-width: 380px) {
  .profile-stat-grid {
    grid-template-columns: 1fr;
  }

  .profile-stat-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    padding: 12px 16px;
  }

  .profile-stat-card .stat-label {
    font-size: 0.75rem;
    margin-top: 0;
    text-align: right;
  }
}

@media (min-width: 768px) {
  .profile-hero-cta .btn-book-now {
    display: inline-block;
  }
}

/* Safe area for notched phones */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .profile-mobile-cta {
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }

  body.profile-page.has-mobile-cta {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }
}

/* ── Doctor services (listing + detail) ── */
.service-list-section .service-card {
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-list-section .service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1) !important;
}

.service-card-media {
  display: block;
  overflow: hidden;
}

.service-card-media img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.service-card-placeholder,
.service-detail-hero--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 50%, #f8fafc 100%);
  color: #2563eb;
}

.service-card-placeholder {
  height: 200px;
  font-size: 42px;
}

.service-card-price,
.service-detail-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f766e;
  white-space: nowrap;
}

.service-detail-hero {
  background-size: cover;
  background-position: center;
  position: relative;
}

.service-detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.15) 0%, rgba(15, 23, 42, 0.45) 100%);
}

.service-detail-hero--placeholder {
  position: relative;
  min-height: 280px;
}

.service-detail-hero__icon {
  font-size: 64px;
  opacity: 0.85;
}

.service-detail-section {
  margin-top: -48px;
  position: relative;
  z-index: 2;
}

.service-detail-breadcrumb {
  font-size: 14px;
  color: #64748b;
}

.service-detail-breadcrumb a {
  color: #2563eb;
}

.service-detail-breadcrumb span {
  margin: 0 8px;
}

.service-detail-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: #0f172a;
}

.service-detail-body {
  border-radius: 16px;
}

.service-detail-text {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #334155;
}

.service-detail-actions .btn-lg {
  border-radius: 10px;
  padding: 12px 24px;
}

@media (max-width: 575px) {
  .service-detail-actions .btn-lg {
    display: block;
    width: 100%;
    margin: 0 0 10px !important;
  }

  .service-card-price {
    font-size: 1rem;
  }
}

.shop-checkout-card,
.shop-pay-section .card {
  border-radius: 16px;
}

.shop-checkout-summary {
  padding: 16px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.shop-success-icon {
  font-size: 64px;
  color: #22c55e;
}

.shop-cancel-icon {
  font-size: 64px;
  color: #ef4444;
}

.inv-pay-tabs .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 8px 16px;
}

.inv-qr-state.hide {
  display: none;
}

.inv-qr-image {
  width: min(280px, 80vw);
  height: auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.inv-qr-image.inv-qr-image--cropped {
  width: min(240px, 72vw);
  padding: 8px;
  background: transparent;
  border: none;
  box-shadow: none;
}

.inv-qr-amount {
  font-size: 1.25rem;
  color: #0f172a;
}

.inv-upi-pay-btn {
  min-width: min(280px, 90vw);
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(34, 197, 94, 0.25);
}

.inv-upi-pay-btn.hide,
#inv_upi_pay_hint.hide,
#inv_qr_return_notice.hide {
  display: none;
}

.inv-qr-return-notice {
  font-size: 0.875rem;
  padding: 10px 14px;
  border-radius: 10px;
  text-align: left;
}
