/* =============================================================================
   DARK MODE - Yaşam Hastaneleri Randevu Sistemi
   Yönetim: partials/dark-mode-toggle.php (tek yer)
   Zaman bazlı: 21:00–06:00 otomatik dark, diğer saatlerde light
   ============================================================================= */

/* ── Geçiş animasyonu ─────────────────────────────────────────────────────── */
html[data-theme="dark"],
html[data-theme="dark"] *,
html[data-theme="dark"] *::before,
html[data-theme="dark"] *::after {
  transition:
    background-color 0.28s ease,
    background    0.28s ease,
    color         0.28s ease,
    border-color  0.28s ease,
    box-shadow    0.28s ease;
}

/* ── Ana arka plan & genel metin ──────────────────────────────────────────── */
html[data-theme="dark"] body,
html[data-theme="dark"] .portal-body {
  background: #0f1117 !important;
  color: #e2e8f0;
}

/* ── Sidebar ──────────────────────────────────────────────────────────────── */
html[data-theme="dark"] .portal-sidebar {
  background: #161b2e !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45) !important;
}

html[data-theme="dark"] .portal-brand {
  border-bottom-color: #252d44 !important;
}

html[data-theme="dark"] .portal-brand__text {
  color: #b0bcc9 !important;
}

/* ── Menü öğeleri ─────────────────────────────────────────────────────────── */
html[data-theme="dark"] .portal-menu__item {
  color: #9aacbe !important;
}

html[data-theme="dark"] .portal-menu__item i {
  color: #6b7c93 !important;
}

html[data-theme="dark"] .portal-menu__item:hover {
  background: #1c2540 !important;
  color: #63a7ff !important;
}

html[data-theme="dark"] .portal-menu__item:hover i {
  color: #63a7ff !important;
}

html[data-theme="dark"] .portal-menu__item.is-active {
  background: rgba(99, 167, 255, 0.14) !important;
  color: #63a7ff !important;
  box-shadow: inset 0 0 0 1px rgba(99, 167, 255, 0.22) !important;
}

html[data-theme="dark"] .portal-menu__item.is-active i {
  color: #63a7ff !important;
}

html[data-theme="dark"] .portal-sidebar__footer {
  border-top-color: #252d44 !important;
}

/* ── Portal içerik bölgesi ────────────────────────────────────────────────── */
html[data-theme="dark"] .portal-header h1 {
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .portal-subtitle {
  color: #7d8fa3 !important;
}

html[data-theme="dark"] .portal-pill {
  background: #1c2540 !important;
  color: #63a7ff !important;
  box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.35), -5px -5px 10px rgba(255, 255, 255, 0.02) !important;
}

/* ── Portal kartları (anasayfa) ───────────────────────────────────────────── */
html[data-theme="dark"] .portal-card {
  background: linear-gradient(120deg, #1a2138 0%, #151c30 100%) !important;
  border-color: #252d44 !important;
  box-shadow: 0 6px 32px rgba(0, 0, 0, 0.35), 0 1.5px 8px rgba(0, 0, 0, 0.2) !important;
}

html[data-theme="dark"] .portal-card:hover {
  background: linear-gradient(120deg, #1f283e 0%, #1a2238 100%) !important;
  border-color: #3a5290 !important;
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.45), 0 4px 16px rgba(0, 0, 0, 0.3) !important;
}

html[data-theme="dark"] .portal-card__icon {
  background: linear-gradient(135deg, #1c2a4e 0%, #1e3260 100%) !important;
  color: #63a7ff !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
}

html[data-theme="dark"] .portal-card__title {
  background: linear-gradient(90deg, #63a7ff 0%, #93c5fd 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  filter: none !important;
}

html[data-theme="dark"] .portal-card__desc {
  color: #7d8fa3 !important;
  opacity: 1 !important;
}

/* ── Randevu kartları ─────────────────────────────────────────────────────── */
html[data-theme="dark"] .appointment-card {
  background: #161b2e !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35) !important;
}

html[data-theme="dark"] .appointment-card__label {
  color: #6b7c93 !important;
}

html[data-theme="dark"] .appointment-card__value {
  color: #63a7ff !important;
}

html[data-theme="dark"] .appointment-card__cancel {
  background: #2a1818 !important;
  color: #fc8181 !important;
  border-color: #4a2222 !important;
}

html[data-theme="dark"] .appointment-card__cancel:hover {
  background: #3d2020 !important;
  color: #feb2b2 !important;
}

/* ── Tab sistemi ──────────────────────────────────────────────────────────── */
html[data-theme="dark"] .tabs {
  border-bottom-color: #252d44 !important;
}

html[data-theme="dark"] .tab-button {
  color: #7d8fa3 !important;
}

html[data-theme="dark"] .tab-button:hover {
  color: #b0bcc9 !important;
}

html[data-theme="dark"] .tab-button.active {
  color: #63a7ff !important;
  border-bottom-color: #63a7ff !important;
}

/* ── Sonuçlar sayfası ─────────────────────────────────────────────────────── */
html[data-theme="dark"] .sonuclar-page {
  background: #0f1117 !important;
}

html[data-theme="dark"] .sonuclar-card {
  background: #161b2e !important;
  border-color: #252d44 !important;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35) !important;
}

html[data-theme="dark"] .sonuclar-subtitle {
  color: #7d8fa3 !important;
}

html[data-theme="dark"] .sonuclar-chip {
  background: #1c2540 !important;
  color: #63a7ff !important;
}

html[data-theme="dark"] .sonuclar-table {
  background: #161b2e !important;
}

html[data-theme="dark"] .sonuclar-table thead {
  background: #1c2540 !important;
}

html[data-theme="dark"] .sonuclar-table thead th {
  color: #b0bcc9 !important;
  border-color: #252d44 !important;
}

html[data-theme="dark"] .sonuclar-table tbody td {
  color: #d4dce8 !important;
  border-color: #252d44 !important;
}

html[data-theme="dark"] .sonuclar-date-header {
  background: linear-gradient(135deg, #1a2550 0%, #24306a 100%) !important;
}

html[data-theme="dark"] .sonuclar-tab-summary {
  background: linear-gradient(135deg, #1a1f2e 0%, #1c2540 100%) !important;
  color: #b0bcc9 !important;
  border-left-color: #63a7ff !important;
}

html[data-theme="dark"] .sonuclar-tab-summary i {
  color: #63a7ff !important;
}

html[data-theme="dark"] .sonuclar-warning {
  background: #2a2200 !important;
  color: #fcd34d !important;
  border-left-color: #d97706 !important;
}

html[data-theme="dark"] .sonuclar-empty {
  color: #7d8fa3 !important;
}

html[data-theme="dark"] .sonuclar-loading {
  background: rgba(22, 27, 46, 0.92) !important;
  border-color: #252d44 !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3) !important;
}

html[data-theme="dark"] .sonuclar-loading-tip {
  background: #1c2540 !important;
  color: #7d8fa3 !important;
  border-left-color: #63a7ff !important;
  border-right-color: #63a7ff !important;
}

html[data-theme="dark"] .sonuclar-spinner {
  border-color: #252d44 !important;
  border-top-color: #63a7ff !important;
}

html[data-theme="dark"] .sonuclar-filters-sticky {
  background: #0f1117 !important;
}

html[data-theme="dark"] .sonuclar-filters-sticky.scrolled {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

html[data-theme="dark"] .sonuclar-result-row.abnormal,
html[data-theme="dark"] .sonuclar-result-row.abnormal td {
  background: rgba(220, 53, 69, 0.12) !important;
  color: #fc8181 !important;
}

html[data-theme="dark"] .sonuclar-badge--abnormal {
  background: rgba(220, 53, 69, 0.22) !important;
  color: #fca5a5 !important;
  border-color: rgba(220, 53, 69, 0.4) !important;
}

html[data-theme="dark"] .sonuclar-badge--normal {
  background: rgba(25, 135, 84, 0.22) !important;
  color: #86efac !important;
  border-color: rgba(25, 135, 84, 0.4) !important;
}

/* ── Reçetelerim filter kutusu ────────────────────────────────────────────── */
html[data-theme="dark"] .portal-placeholder__box {
  background: #161b2e !important;
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.35) !important;
}

/* ── Form elemanları ──────────────────────────────────────────────────────── */
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="tel"],
html[data-theme="dark"] input[type="password"],
html[data-theme="dark"] input[type="date"],
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background-color: #1c2540 !important;
  border-color: #2e3a55 !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] .form-select:focus,
html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus {
  background-color: #1c2540 !important;
  border-color: #63a7ff !important;
  color: #e2e8f0 !important;
  box-shadow: 0 0 0 0.2rem rgba(99, 167, 255, 0.2) !important;
}

html[data-theme="dark"] .form-control::placeholder,
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #4e5e76 !important;
}

html[data-theme="dark"] .form-label,
html[data-theme="dark"] label {
  color: #b0bcc9 !important;
}

/* ── Bootstrap tablolar ───────────────────────────────────────────────────── */
html[data-theme="dark"] .table {
  color: #d4dce8 !important;
  --bs-table-bg: #161b2e;
  --bs-table-border-color: #252d44;
  --bs-table-striped-bg: rgba(255,255,255,0.03);
  --bs-table-hover-bg: #1c2540;
}

html[data-theme="dark"] .table > :not(caption) > * > * {
  background-color: var(--bs-table-bg) !important;
  border-bottom-color: #252d44 !important;
  color: #d4dce8 !important;
}

html[data-theme="dark"] .table thead th,
html[data-theme="dark"] .table > thead > tr > th {
  background: #1c2540 !important;
  color: #b0bcc9 !important;
  border-color: #252d44 !important;
}

html[data-theme="dark"] .table-hover > tbody > tr:hover > * {
  background: #1c2540 !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > * {
  background: rgba(255, 255, 255, 0.025) !important;
}

/* ── Modal & Loader ───────────────────────────────────────────────────────── */
html[data-theme="dark"] .portal-modal__content {
  background: #161b2e !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .portal-modal__content h3 {
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .portal-modal__content p {
  color: #7d8fa3 !important;
}

html[data-theme="dark"] .portal-loader__content {
  background: #161b2e !important;
}

html[data-theme="dark"] .portal-loader__text {
  color: #b0bcc9 !important;
}

html[data-theme="dark"] .portal-loader__spinner {
  border-color: #252d44 !important;
  border-top-color: #63a7ff !important;
}

html[data-theme="dark"] .portal-loader__tip {
  background: rgba(22, 27, 46, 0.95) !important;
  color: #7d8fa3 !important;
  border-left-color: #63a7ff !important;
  border-right-color: #63a7ff !important;
}

/* ── Hastane bilgi kartları ───────────────────────────────────────────────── */
html[data-theme="dark"] .hospital-info-card {
  background: #161b2e !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4) !important;
  border-color: transparent !important;
}

html[data-theme="dark"] .hospital-info-card__header {
  background: linear-gradient(135deg, #1c2540 0%, #1a2d54 100%) !important;
  border-bottom-color: #63a7ff !important;
}

html[data-theme="dark"] .hospital-info-card__header h3 {
  color: #63a7ff !important;
}

html[data-theme="dark"] .hospital-info-card__subtitle {
  color: #7d8fa3 !important;
}

html[data-theme="dark"] .hospital-info-section__title {
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .hospital-info-section__title i {
  background: #1c2540 !important;
  color: #63a7ff !important;
}

html[data-theme="dark"] .hospital-info-section__content {
  color: #9aacbe !important;
}

html[data-theme="dark"] .hospital-address-link {
  background: #1c2540 !important;
  color: #9aacbe !important;
}

html[data-theme="dark"] .hospital-address-link:hover {
  background: #22305a !important;
  color: #63a7ff !important;
}

html[data-theme="dark"] .hospital-info-contact__link {
  background: #1c2540 !important;
  color: #63a7ff !important;
}

html[data-theme="dark"] .hospital-info-contact__link:hover {
  background: #22305a !important;
  color: #93c5fd !important;
}

html[data-theme="dark"] .hospital-info-card__footer {
  background: #1c2540 !important;
  border-top-color: #252d44 !important;
}

html[data-theme="dark"] .hospital-empty-state {
  background: #161b2e !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35) !important;
}

html[data-theme="dark"] .hospital-empty-state h3 {
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .hospital-empty-state p {
  color: #7d8fa3 !important;
}

/* ── Alert kutuları ───────────────────────────────────────────────────────── */
html[data-theme="dark"] .alert-info {
  background: #162040 !important;
  border-color: #1e3060 !important;
  color: #93c5fd !important;
}

html[data-theme="dark"] .alert-success {
  background: #0f2218 !important;
  border-color: #1a3d26 !important;
  color: #86efac !important;
}

html[data-theme="dark"] .alert-danger {
  background: #240e0e !important;
  border-color: #3d1a1a !important;
  color: #fca5a5 !important;
}

html[data-theme="dark"] .alert-warning {
  background: #241a00 !important;
  border-color: #3d2e00 !important;
  color: #fcd34d !important;
}

/* ── Bootstrap card ───────────────────────────────────────────────────────── */
html[data-theme="dark"] .card {
  background: #161b2e !important;
  border-color: #252d44 !important;
  color: #d4dce8 !important;
}

html[data-theme="dark"] .card-header {
  background: #1c2540 !important;
  border-bottom-color: #252d44 !important;
  color: #b0bcc9 !important;
}

html[data-theme="dark"] .card-footer {
  background: #1c2540 !important;
  border-top-color: #252d44 !important;
}

/* ── Overlay ──────────────────────────────────────────────────────────────── */
html[data-theme="dark"] .portal-overlay {
  background: rgba(0, 0, 10, 0.65) !important;
}

/* ── Scroll to top (mevcut rengi koru, sadece dark'ta tonu ayarla) ─────────── */
html[data-theme="dark"] .scroll-to-top {
  background: linear-gradient(135deg, #3a4d8f 0%, #2a3870 100%) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45) !important;
}

/* ── hr & border ──────────────────────────────────────────────────────────── */
html[data-theme="dark"] hr {
  border-color: #252d44 !important;
}

/* ── Metin yardımcı sınıfları ─────────────────────────────────────────────── */
html[data-theme="dark"] .text-muted {
  color: #7d8fa3 !important;
}

html[data-theme="dark"] .text-dark {
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .bg-white,
html[data-theme="dark"] .bg-light {
  background-color: #161b2e !important;
}

/* ── Logo görünürlüğü (dark arka plan üzerinde) ───────────────────────────── */
/* Sidebar, login, verify logolarına beyaz huni zemin */
html[data-theme="dark"] .portal-brand__logo img,
html[data-theme="dark"] .login-logo img,
html[data-theme="dark"] .verify-logo img {
  background: rgba(255, 255, 255, 0.92) !important;
  border-radius: 10px !important;
  padding: 5px 10px !important;
}

/* ── Randevu formu (portal-randevu.css) ───────────────────────────────────── */
html[data-theme="dark"] .booking-step {
  background: #161b2e !important;
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3) !important;
  border-color: #252d44 !important;
}

html[data-theme="dark"] .booking-step span {
  background: #1c2540 !important;
  color: #63a7ff !important;
}

html[data-theme="dark"] .booking-step h4 {
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .booking-step p {
  color: #7d8fa3 !important;
}

html[data-theme="dark"] .booking-step.is-active {
  background: #182040 !important;
  border-color: rgba(99, 167, 255, 0.35) !important;
}

html[data-theme="dark"] .booking-card {
  background: #161b2e !important;
  border-color: #252d44 !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3) !important;
}

html[data-theme="dark"] .booking-doctor {
  background: #1c2540 !important;
}

html[data-theme="dark"] .booking-doctor img {
  border-color: #252d44 !important;
}

html[data-theme="dark"] .booking-calendar {
  background: #1c2540 !important;
}

html[data-theme="dark"] .booking-panel__header {
  border-bottom-color: #252d44 !important;
}

html[data-theme="dark"] .booking-panel__header h3 {
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .booking-panel__icon {
  background: #1c2540 !important;
  color: #63a7ff !important;
}

html[data-theme="dark"] .booking-badge {
  background: #1c2540 !important;
  color: #63a7ff !important;
}

html[data-theme="dark"] .booking-field label {
  color: #b0bcc9 !important;
}

html[data-theme="dark"] .booking-input select,
html[data-theme="dark"] .booking-input input.form-control {
  background-color: #1c2540 !important;
  box-shadow: inset 0 0 0 1px #2e3a55 !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .booking-times select {
  background-color: #1c2540 !important;
  color: #e2e8f0 !important;
  box-shadow: inset 0 0 0 1px #2e3a55 !important;
}

html[data-theme="dark"] .booking-hero__badge {
  background: #1c2540 !important;
  color: #63a7ff !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3) !important;
}

/* ── Login & Register kartları ────────────────────────────────────────────── */
html[data-theme="dark"] .login-card,
html[data-theme="dark"] .register-card {
  background: #161b2e !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45) !important;
}

html[data-theme="dark"] .login-greeting__text {
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .login-greeting__subtitle {
  color: #7d8fa3 !important;
}

html[data-theme="dark"] .form-group input {
  background: #1c2540 !important;
  border-color: #2e3a55 !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .form-group input:focus {
  background: #1c2540 !important;
  border-color: #63a7ff !important;
  box-shadow: 0 0 0 3px rgba(99, 167, 255, 0.15) !important;
}

html[data-theme="dark"] .form-group label {
  color: #b0bcc9 !important;
}

/* login/register içindeki diğer metin alanları */
html[data-theme="dark"] .login-divider-text,
html[data-theme="dark"] .register-divider-text {
  color: #7d8fa3 !important;
}

html[data-theme="dark"] .login-card a,
html[data-theme="dark"] .register-card a {
  color: #63a7ff !important;
}

/* ── Verify sayfası CSS değişken override'ı ──────────────────────────────── */
html[data-theme="dark"] {
  --verify-bg: #0f1117;
  --verify-card: #161b2e;
  --verify-text: #e2e8f0;
  --verify-muted: #7d8fa3;
  --verify-border: #252d44;
  --verify-shadow: 0 22px 45px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] .verify-body {
  background: radial-gradient(circle at top, #141a2e 0%, #0f1117 55%) !important;
  color: var(--verify-text) !important;
}

/* ── Genel beyaz arka plan düzeltmeleri ───────────────────────────────────── */
/* Inline style'da doğrudan background:white veya #fff olan elementler */
html[data-theme="dark"] [style*="background: white"],
html[data-theme="dark"] [style*="background:white"],
html[data-theme="dark"] [style*="background-color: white"],
html[data-theme="dark"] [style*="background-color:#fff"],
html[data-theme="dark"] [style*="background: #fff"],
html[data-theme="dark"] [style*="background:#fff"] {
  background-color: #161b2e !important;
}

/* Bootstrap input-group, breadcrumb vs. */
html[data-theme="dark"] .input-group-text {
  background-color: #1c2540 !important;
  border-color: #2e3a55 !important;
  color: #b0bcc9 !important;
}

html[data-theme="dark"] .breadcrumb {
  background-color: #161b2e !important;
}

html[data-theme="dark"] .breadcrumb-item.active {
  color: #7d8fa3 !important;
}

html[data-theme="dark"] .list-group-item {
  background-color: #161b2e !important;
  border-color: #252d44 !important;
  color: #d4dce8 !important;
}

html[data-theme="dark"] .list-group-item:hover {
  background-color: #1c2540 !important;
}

/* Bootstrap modal native */
html[data-theme="dark"] .modal-content {
  background-color: #161b2e !important;
  border-color: #252d44 !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .modal-header {
  border-bottom-color: #252d44 !important;
}

html[data-theme="dark"] .modal-footer {
  border-top-color: #252d44 !important;
}

html[data-theme="dark"] .modal-title {
  color: #e2e8f0 !important;
}

/* Bootstrap dropdown */
html[data-theme="dark"] .dropdown-menu {
  background-color: #161b2e !important;
  border-color: #252d44 !important;
}

html[data-theme="dark"] .dropdown-item {
  color: #d4dce8 !important;
}

html[data-theme="dark"] .dropdown-item:hover,
html[data-theme="dark"] .dropdown-item:focus {
  background-color: #1c2540 !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .dropdown-divider {
  border-top-color: #252d44 !important;
}

/* Badge */
html[data-theme="dark"] .badge.bg-light,
html[data-theme="dark"] .badge.badge-light {
  background-color: #1c2540 !important;
  color: #b0bcc9 !important;
}

/* ============================================================================
   PORTAL-BOOKING & PORTAL-GORUNTULU-RANDEVU
   ============================================================================ */

/* Ana kart */
html[data-theme="dark"] .portal-booking-card {
  background: #161b2e !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
}

/* Progress bar */
html[data-theme="dark"] .multisteps-form__progress {
  background: #161b2e !important;
  border-color: #252d44 !important;
}

html[data-theme="dark"] .multisteps-form__progress-btn {
  background: #1c2540 !important;
  border-color: #2e3a55 !important;
  color: #7d8fa3 !important;
}

html[data-theme="dark"] .multisteps-form__progress-btn::before {
  background: #252d44 !important;
}

html[data-theme="dark"] .multisteps-form__progress-btn.is-active,
html[data-theme="dark"] .multisteps-form__progress-btn.js-active {
  color: #63a7ff !important;
}

/* İçerik alanı */
html[data-theme="dark"] .multisteps-form__content {
  background: #161b2e !important;
}

/* Modal başlığı */
html[data-theme="dark"] .modal-header-wrapper {
  background: #1c2540 !important;
  border-bottom-color: #252d44 !important;
  color: #e2e8f0 !important;
}

/* Başarı modalı (randevu kaydedildi pop-up) */
html[data-theme="dark"] .success-modal {
  background: #161b2e !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6) !important;
}

html[data-theme="dark"] .success-modal h2,
html[data-theme="dark"] .success-modal h3,
html[data-theme="dark"] .success-modal p {
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .success-modal__btn--close {
  background: #252d44 !important;
  color: #b0bcc9 !important;
  border-color: #2e3a55 !important;
}

html[data-theme="dark"] .success-modal__btn--close:hover {
  background: #2e3a55 !important;
}

/* Datepicker (Bootstrap Datepicker) */
html[data-theme="dark"] .datepicker,
html[data-theme="dark"] .datepicker-dropdown {
  background: #161b2e !important;
  border-color: #252d44 !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .datepicker table tr th,
html[data-theme="dark"] .datepicker table tr td {
  color: #d4dce8 !important;
}

html[data-theme="dark"] .datepicker table tr td.day:hover,
html[data-theme="dark"] .datepicker table tr td.day.focused {
  background: #1c2540 !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .datepicker table tr td.today,
html[data-theme="dark"] .datepicker table tr td.today:hover,
html[data-theme="dark"] .datepicker table tr td.today.focused {
  background: #22305a !important;
  color: #93c5fd !important;
  border-color: #3d5a9a !important;
}

html[data-theme="dark"] .datepicker table tr td.active,
html[data-theme="dark"] .datepicker table tr td.active:hover {
  background: linear-gradient(135deg, #1f4fd1 0%, #173cad 100%) !important;
  color: #fff !important;
}

html[data-theme="dark"] .datepicker table tr td.disabled,
html[data-theme="dark"] .datepicker table tr td.disabled:hover {
  color: #3d4d63 !important;
}

html[data-theme="dark"] .datepicker table tr th.prev,
html[data-theme="dark"] .datepicker table tr th.next,
html[data-theme="dark"] .datepicker table tr th.datepicker-switch {
  background: #1c2540 !important;
  color: #b0bcc9 !important;
}

html[data-theme="dark"] .datepicker table tr th.prev:hover,
html[data-theme="dark"] .datepicker table tr th.next:hover,
html[data-theme="dark"] .datepicker table tr th.datepicker-switch:hover {
  background: #252d44 !important;
}

/* jQuery UI datepicker */
html[data-theme="dark"] .ui-datepicker {
  background: #161b2e !important;
  border-color: #252d44 !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .ui-datepicker th {
  background: #1c2540 !important;
  color: #b0bcc9 !important;
  border-color: #252d44 !important;
}

html[data-theme="dark"] .ui-datepicker td {
  border-color: #252d44 !important;
}

html[data-theme="dark"] .ui-datepicker .ui-state-highlight {
  background: #22305a !important;
  color: #93c5fd !important;
  border-color: #3d5a9a !important;
}

html[data-theme="dark"] .ui-datepicker .ui-state-active {
  background: #1f4fd1 !important;
  color: #fff !important;
  border-color: #1f4fd1 !important;
}

html[data-theme="dark"] .ui-datepicker .ui-datepicker-header {
  background: #1c2540 !important;
  border-color: #252d44 !important;
  color: #e2e8f0 !important;
}

/* Geri/ileri butonları */
html[data-theme="dark"] .btn-prev,
html[data-theme="dark"] .btn-next {
  background: #1c2540 !important;
  color: #b0bcc9 !important;
  border-color: #252d44 !important;
}

html[data-theme="dark"] .btn-prev:hover,
html[data-theme="dark"] .btn-next:hover {
  background: #252d44 !important;
}

/* ============================================================================
   RANDEVULARIM - Kart yapısı
   ============================================================================ */

/* Randevu kartları – dark modda gradient yumuşatılır */
html[data-theme="dark"] .appointment-card {
  background: linear-gradient(170deg, #1a2240 0%, #0f1420 100%) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4) !important;
  border: 1px solid #252d44 !important;
}

html[data-theme="dark"] .appointment-card__caption {
  border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .appointment-card__label {
  color: #6b7c93 !important;
}

html[data-theme="dark"] .appointment-card__value {
  color: #93c5fd !important;
}

html[data-theme="dark"] .appointment-card__title {
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .appointment-card__status {
  background: rgba(255, 255, 255, 0.07) !important;
}

/* Randevu kart butonları */
html[data-theme="dark"] .appointment-card__btn,
html[data-theme="dark"] .appointment-card__btn--primary {
  background: linear-gradient(135deg, #1f4fd1 0%, #173cad 100%) !important;
  color: #fff !important;
  border-color: transparent !important;
}

html[data-theme="dark"] .appointment-card__btn--danger {
  background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 100%) !important;
  color: #fca5a5 !important;
  border-color: #4a2222 !important;
}

html[data-theme="dark"] .appointment-card__btn--disabled,
html[data-theme="dark"] .appointment-card__btn.disabled {
  background: #252d44 !important;
  color: #4b5a72 !important;
}

html[data-theme="dark"] .join-btn {
  background: linear-gradient(135deg, #065f46 0%, #047857 100%) !important;
  color: #a7f3d0 !important;
}

html[data-theme="dark"] .join-btn.disabled {
  background: #252d44 !important;
  color: #4b5a72 !important;
}

/* ============================================================================
   REÇETELERİM
   ============================================================================ */

html[data-theme="dark"] .recete-card {
  background: #161b2e !important;
  border-color: #252d44 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
}

html[data-theme="dark"] .recete-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4) !important;
}

html[data-theme="dark"] .recete-card__summary {
  color: #d4dce8 !important;
}

html[data-theme="dark"] .recete-card__summary:hover {
  background-color: #1c2540 !important;
}

html[data-theme="dark"] .recete-card__badge {
  background: rgba(99, 167, 255, 0.15) !important;
  color: #63a7ff !important;
  border-color: rgba(99, 167, 255, 0.25) !important;
}

html[data-theme="dark"] .recete-card__title,
html[data-theme="dark"] .recete-card__meta {
  color: #d4dce8 !important;
}

html[data-theme="dark"] .recete-card__date,
html[data-theme="dark"] .recete-card__hospital {
  color: #7d8fa3 !important;
}

html[data-theme="dark"] .recete-card__details-inner {
  border-top-color: #252d44 !important;
}

html[data-theme="dark"] .recete-drug-item {
  background: #1c2540 !important;
  border-color: #252d44 !important;
  color: #d4dce8 !important;
}

html[data-theme="dark"] .recete-drug-item:hover {
  background: #22305a !important;
}

html[data-theme="dark"] .recete-drug-name {
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .recete-drug-dose,
html[data-theme="dark"] .recete-drug-info {
  color: #7d8fa3 !important;
}

html[data-theme="dark"] .recete-empty,
html[data-theme="dark"] .recete-count {
  color: #7d8fa3 !important;
}

html[data-theme="dark"] .recete-header {
  border-bottom-color: #252d44 !important;
}

/* ============================================================================
   PROFİL
   ============================================================================ */

html[data-theme="dark"] .profile-card {
  background: #161b2e !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
}

html[data-theme="dark"] .profile-header {
  border-bottom-color: #252d44 !important;
}

html[data-theme="dark"] .profile-name,
html[data-theme="dark"] .profile-title {
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .profile-detail-row {
  background: #1c2540 !important;
  border-color: #252d44 !important;
}

html[data-theme="dark"] .profile-detail-row:hover {
  background: #22305a !important;
}

html[data-theme="dark"] .profile-detail-label {
  color: #7d8fa3 !important;
}

html[data-theme="dark"] .profile-detail-value {
  color: #d4dce8 !important;
}

html[data-theme="dark"] .profile-section-title {
  color: #b0bcc9 !important;
  border-bottom-color: #252d44 !important;
}

/* Profil form alanları */
html[data-theme="dark"] .profile-form .form-control,
html[data-theme="dark"] .profile-form input,
html[data-theme="dark"] .profile-form select,
html[data-theme="dark"] .profile-form textarea {
  background: #1c2540 !important;
  border-color: #2e3a55 !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .profile-form label {
  color: #b0bcc9 !important;
}

/* ============================================================================
   RANDEVU İPTAL
   ============================================================================ */

html[data-theme="dark"] .cancel-card,
html[data-theme="dark"] .cancel-container .card,
html[data-theme="dark"] .randevu-iptal-card {
  background: #161b2e !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
}

html[data-theme="dark"] .cancel-card h1,
html[data-theme="dark"] .cancel-card h2,
html[data-theme="dark"] .cancel-card h3,
html[data-theme="dark"] .cancel-card label {
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .cancel-card p,
html[data-theme="dark"] .cancel-header__subtitle {
  color: #7d8fa3 !important;
}

html[data-theme="dark"] .cancel-header__title {
  color: #e2e8f0 !important;
}

/* cancel-logo logosuna beyaz arka plan (karanlık logolar için) */
html[data-theme="dark"] .cancel-logo img {
  background: rgba(255, 255, 255, 0.92) !important;
  border-radius: 10px !important;
  padding: 5px 10px !important;
}

/* randevu-iptal form inputs (inline style'ı override et) */
html[data-theme="dark"] .form-group input,
html[data-theme="dark"] .form-group select {
  background: #1c2540 !important;
  border-color: #2e3a55 !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .form-group input:focus,
html[data-theme="dark"] .form-group select:focus {
  background: #1c2540 !important;
  border-color: #63a7ff !important;
}

/* ============================================================================
   DARK MODE TOGGLE BUTONU
   Sol alt köşe – sabit konum, mobil uyumlu
   ============================================================================ */
.dark-mode-toggle {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  z-index: 1000;
  background: linear-gradient(135deg, #1f4fd1 0%, #173cad 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(31, 79, 209, 0.4);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.28s ease;
  outline: none;
}

.dark-mode-toggle:hover {
  transform: scale(1.12) translateY(-2px);
  box-shadow: 0 6px 20px rgba(31, 79, 209, 0.55);
}

.dark-mode-toggle:active {
  transform: scale(0.94);
}

/* Light modda ay ikonu görünür */
.dark-mode-toggle .dm-icon-moon { display: block; }
.dark-mode-toggle .dm-icon-sun  { display: none;  }

/* Dark modda güneş ikonu görünür */
html[data-theme="dark"] .dark-mode-toggle {
  background: linear-gradient(135deg, #252e50 0%, #161e38 100%);
  color: #fbbf24;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  border: 1.5px solid #2e3a5c;
}

html[data-theme="dark"] .dark-mode-toggle:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

html[data-theme="dark"] .dark-mode-toggle .dm-icon-moon { display: none;  }
html[data-theme="dark"] .dark-mode-toggle .dm-icon-sun  { display: block; }

/* ── Logo: Loading ekranı (portal-loader.php) ────────────────────────────── */
/* Spinner halka rengi – portal-loader.php içindeki inline ::before override */
html[data-theme="dark"] .portal-loader__spinner::before {
  border-color: #252d44 !important;
  border-top-color: #63a7ff !important;
}

/* Logo img'e beyaz daire zemin – spinner içinde düzgün görünür */
html[data-theme="dark"] .portal-loader__logo,
html[data-theme="dark"] .portal-loader__spinner img {
  background: rgba(255, 255, 255, 0.92) !important;
  border-radius: 50% !important;
  padding: 6px !important;
  box-sizing: content-box !important;
}

/* ── Logo: index.php booking header ─────────────────────────────────────── */
html[data-theme="dark"] .booking-header__logo img {
  background: rgba(255, 255, 255, 0.92) !important;
  border-radius: 10px !important;
  padding: 6px 14px !important;
}

/* ── index.php inline stil overrides ────────────────────────────────────── */

/* Progress bar (beyaz kutu → koyu) */
html[data-theme="dark"] .booking-progress {
  background: #161b2e !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

html[data-theme="dark"] .booking-progress__icon {
  background: #252d44 !important;
  color: #7d8fa3 !important;
}

html[data-theme="dark"] .booking-progress__step.active .booking-progress__icon {
  background: linear-gradient(135deg, #3d5aad 0%, #4a3a7a 100%) !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .booking-progress__label {
  color: #7d8fa3 !important;
}

html[data-theme="dark"] .booking-progress__step.active .booking-progress__label {
  color: #63a7ff !important;
}

/* Form paneller (beyaz kutu → koyu) */
html[data-theme="dark"] .booking-panel {
  background: #161b2e !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

html[data-theme="dark"] .booking-panel__title {
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .booking-header__title {
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .booking-header__subtitle {
  color: #7d8fa3 !important;
}

/* Aksiyon çubuğu (açık gri → koyu) */
html[data-theme="dark"] .booking-action-bar {
  background: #1c2540 !important;
}

/* Normal/Video randevu toggle kutusu */
html[data-theme="dark"] .booking-action-bar .appointment-type-toggle {
  background: #161b2e !important;
  border-color: #3d5a9a !important;
}

html[data-theme="dark"] .appointment-type-link {
  color: #63a7ff !important;
}

html[data-theme="dark"] .appointment-type-link.is-normal {
  color: #34d399 !important;
}

html[data-theme="dark"] .appointment-type-link.is-video {
  color: #fbbf24 !important;
}

html[data-theme="dark"] .appointment-type-divider {
  color: #4b5a72 !important;
}

/* Outline secondary buton (beyaz → koyu) */
html[data-theme="dark"] .booking-action-bar .btn-outline-secondary {
  background: #161b2e !important;
  color: #63a7ff !important;
  border-color: #3d5a9a !important;
}

html[data-theme="dark"] .booking-action-bar .btn-outline-secondary:hover {
  background: #1c2540 !important;
  color: #93c5fd !important;
}

/* İkincil buton */
html[data-theme="dark"] .booking-btn-secondary {
  background: #252d44 !important;
  color: #b0bcc9 !important;
}

html[data-theme="dark"] .booking-btn-secondary:hover {
  background: #2e3a55 !important;
  color: #e2e8f0 !important;
}

/* Aksiyon satırı üst kenarı */
html[data-theme="dark"] .booking-actions {
  border-top-color: #252d44 !important;
}

/* Form inputları */
html[data-theme="dark"] .booking-input-group label {
  color: #b0bcc9 !important;
}

html[data-theme="dark"] .booking-input-group .custom-select,
html[data-theme="dark"] .booking-input-group .form-control,
html[data-theme="dark"] .booking-input-group .form-select {
  background-color: #1c2540 !important;
  border-color: #2e3a55 !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .booking-input-group .custom-select:focus,
html[data-theme="dark"] .booking-input-group .form-control:focus,
html[data-theme="dark"] .booking-input-group .form-select:focus {
  border-color: #63a7ff !important;
  box-shadow: 0 0 0 3px rgba(99, 167, 255, 0.15) !important;
}

/* ── Mobil ────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .dark-mode-toggle {
    bottom: 20px;
    left: 20px;
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
  }
}
