/* =========================================================
   Klinik Randevu Sistemi — Ortak Stil Dosyası
   ========================================================= */

:root{
  --bg: #F5F8F8;
  --surface: #FFFFFF;
  --primary: #2A6F6F;
  --primary-dark: #1F5555;
  --primary-light: #E4F0EF;
  --text: #1C2B2E;
  --text-secondary: #607072;
  --border: #E1E8E8;
  --success: #2F9E44;
  --success-bg: #EBFBEE;
  --danger: #E0393B;
  --danger-bg: #FDECEC;
  --accent: #D98E3F;
  --info: #2E6FA6;
  --info-bg: #EAF2F8;
  --warn-dark: #8A5A2B;
  --warn-dark-bg: #F4E9DE;
  --locked-bg: #EDEFEF;
  --locked-text: #6B7677;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 3px rgba(28,43,46,0.08), 0 1px 2px rgba(28,43,46,0.04);
  --shadow-md: 0 8px 24px rgba(28,43,46,0.10);
}

*{ box-sizing: border-box; }

html, body{
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand{
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  letter-spacing: -0.01em;
  margin: 0;
}

a{ color: inherit; text-decoration: none; }

button, input, select{ font-family: inherit; font-size: inherit; }

:focus-visible{
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ---------- Top navigation ---------- */
.topnav{
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topnav-inner{
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand{
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 19px;
  font-weight: 600;
  color: var(--primary-dark);
}
.brand-mark{
  width: 26px; height: 26px;
  border-radius: 8px;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 14px; font-weight: 700;
  flex-shrink: 0;
}
.nav-links{
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.nav-links a, .nav-links .nav-dropdown > button{
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 14px;
  color: var(--text-secondary);
  border: none;
  background: transparent;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.nav-links a:hover, .nav-links .nav-dropdown > button:hover{
  background: var(--primary-light);
  color: var(--primary-dark);
}
.nav-links a.active, .nav-links .nav-dropdown > button.active{
  background: var(--primary);
  color: #fff;
}
.nav-dropdown{ position: relative; }
.nav-dropdown-menu{
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 210px;
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
}
.nav-dropdown.open .nav-dropdown-menu{ display: flex; }
.nav-dropdown-menu a{
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 9px;
}
.nav-dropdown-menu a:hover{ background: var(--primary-light); color: var(--primary-dark); }
.nav-dropdown-menu .dot{
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
}
.nav-hamburger{
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 6px 8px;
  color: var(--text);
  border-radius: var(--radius-sm);
}
.nav-hamburger:hover{ background: var(--primary-light); }

.bekleme-zil-btn{
  position: relative; background: none; border: none; cursor: pointer;
  font-size: 18px; line-height: 1; padding: 6px 8px; border-radius: var(--radius-sm);
  margin-left: 8px;
}
.bekleme-zil-btn:hover{ background: var(--primary-light); }
.bekleme-zil-sayac{
  position: absolute; top: 0; right: 0; background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 700; min-width: 15px; height: 15px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; padding: 0 3px;
}

@media (max-width: 900px){
  .nav-hamburger{ display: block; }
  .topnav-inner{ flex-wrap: wrap; padding: 12px 16px; }
  .nav-links, .nav-user-chip{ display: none; width: 100%; }
  .topnav-inner.mobil-acik .nav-links{
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
  }
  .topnav-inner.mobil-acik .nav-user-chip{
    display: flex;
    width: 100%;
    justify-content: space-between;
    margin-top: 10px;
    margin-left: 0 !important;
  }
  .nav-links a, .nav-links .nav-dropdown > button{ width: 100%; text-align: left; box-sizing: border-box; }
  .nav-dropdown-menu{ position: static; box-shadow: none; border: none; width: 100%; padding-left: 14px; min-width: 0; }
  .nav-dropdown.open .nav-dropdown-menu{ margin-top: 4px; }
}

/* Pulse divider — signature element */
.pulse-divider{ width: 100%; height: 20px; display: block; overflow: hidden; background: var(--surface); }
.pulse-divider svg{ width: 100%; height: 100%; display: block; }
.pulse-line{
  fill: none;
  stroke: var(--border);
  stroke-width: 1.5;
}
.pulse-line-glow{
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-dasharray: 90 900;
  stroke-dashoffset: 0;
  animation: pulse-travel 7s linear infinite;
  opacity: 0.85;
}
@keyframes pulse-travel{
  0%{ stroke-dashoffset: 0; }
  100%{ stroke-dashoffset: -990; }
}
@media (prefers-reduced-motion: reduce){
  .pulse-line-glow{ animation: none; opacity: 0; }
}

/* ---------- Layout ---------- */
.page{
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 24px 64px;
}
@media (max-width: 560px){
  .page{ padding: 20px 14px 48px; }
}
.page-header{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}
.page-header h1{ font-size: 26px; font-weight: 600; }
.breadcrumb{
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.breadcrumb a{ color: var(--primary); font-weight: 500; }
.page-subtitle{ color: var(--text-secondary); font-size: 14px; margin-top: 4px; }

/* ---------- Cards ---------- */
.card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-pad{ padding: 24px; }

.settings-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 820px){ .settings-grid{ grid-template-columns: 1fr; } }

.settings-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.settings-card:hover{
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.settings-card-icon{
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 19px;
}
.settings-card h3{ font-size: 17px; font-weight: 600; }
.settings-card p{ color: var(--text-secondary); font-size: 13.5px; margin: 0; }
.settings-card .count-badge{
  font-size: 12.5px;
  color: var(--primary-dark);
  background: var(--primary-light);
  padding: 3px 9px;
  border-radius: 20px;
  width: fit-content;
  font-weight: 600;
}

/* ---------- Forms ---------- */
.form-row{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
label{
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
input[type="text"], input[type="tel"], input[type="email"], input[type="number"], input[type="password"], input[type="date"], input[type="time"], textarea, select{
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  transition: border-color .15s ease, background .15s ease;
}
input[type="number"]{
  -moz-appearance: textfield;
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button{
  -webkit-appearance: none;
  margin: 0;
}
.tel-input-group{ display: flex; align-items: stretch; }
.tel-input-group .tel-prefix{
  display: flex; align-items: center;
  padding: 0 10px;
  background: var(--border);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 14px;
}
.tel-input-group input{ border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important; }
textarea.oto-buyuyen{
  resize: none;
  overflow: hidden;
  min-height: 42px;
  line-height: 1.4;
  font-family: inherit;
}
input:focus, textarea:focus, select:focus{
  border-color: var(--primary);
  background: var(--surface);
}
.form-actions{ display: flex; gap: 10px; margin-top: 4px; align-items: center; }

/* Mobilde form satırları her zaman tek sütuna düşsün (inline stil ile
   zorlanmış grid-template-columns değerlerini de ezer) */
@media (max-width: 560px){
  .form-row{ grid-template-columns: 1fr !important; }
}

.btn{
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary{ background: var(--primary); color: #fff; }
.btn-primary:hover{ background: var(--primary-dark); }
.btn-ghost{ background: transparent; color: var(--text-secondary); border-color: var(--border); }
.btn-ghost:hover{ background: var(--bg); color: var(--text); }
.btn-sm{ padding: 6px 12px; font-size: 13px; }
.btn-danger-text{ background: transparent; color: var(--danger); border: none; padding: 6px 10px; font-weight: 600; font-size: 13px; cursor: pointer; border-radius: var(--radius-sm); }
.btn-danger-text:hover{ background: var(--danger-bg); }
.btn-edit-text{ background: transparent; color: var(--primary); border: none; padding: 6px 10px; font-weight: 600; font-size: 13px; cursor: pointer; border-radius: var(--radius-sm); }
.btn-edit-text:hover{ background: var(--primary-light); }

/* ---------- Table ---------- */
.data-table{ width: 100%; border-collapse: collapse; }
@media (max-width: 720px){
  .data-table{ display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
.data-table th{
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-secondary);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
.data-table td{
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14.5px;
}
.data-table tr:last-child td{ border-bottom: none; }
.data-table tr.editing{ background: var(--primary-light); }
.data-table .row-actions{ display: flex; gap: 4px; justify-content: flex-end; }
.name-cell{ font-weight: 600; }

.badge{ display:inline-flex; align-items:center; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-active{ background: var(--success-bg); color: var(--success); }
.badge-muted{ background: var(--bg); color: var(--text-secondary); }

.empty-state{
  padding: 48px 24px;
  text-align: center;
  color: var(--text-secondary);
}
.empty-state .icon{ font-size: 30px; margin-bottom: 10px; opacity: .5; }
.empty-state p{ margin: 4px 0 0; font-size: 14px; }

.toast{
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translate(-50%, 12px);
  background: var(--text);
  color: #fff;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 100;
  box-shadow: var(--shadow-md);
}
.toast.show{ opacity: 1; transform: translate(-50%, 0); }

.hint{ font-size: 12.5px; color: var(--text-secondary); margin-top: -6px; margin-bottom: 14px; }

/* ---------- Randevu sayfası: filtre çubuğu ---------- */
.filters-bar{
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 22px;
}
@media (max-width: 900px){ .filters-bar{ grid-template-columns: repeat(2, 1fr); } }
.filter-group label{ margin-bottom: 6px; }
.filters-bar .btn{ height: 41px; white-space: nowrap; }

.legend{
  display: flex;
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}
.legend span{ display: inline-flex; align-items: center; gap: 6px; cursor: help; }
.legend .swatch{ width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.swatch-green{ background: var(--success); }
.swatch-red{ background: var(--danger); }

/* ---------- Randevu tablosu ---------- */
.appt-table-wrap{
  overflow-x: auto;
  overflow-y: auto;
  border-radius: var(--radius);
  min-height: 260px;
}
.appt-table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 640px;
}
.appt-table th{
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-secondary);
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  background: var(--surface);
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 8;
}
.appt-table th:last-child{ border-right: none; }
.appt-table th:first-child{
  position: sticky;
  left: 0;
  z-index: 9;
}
.appt-table td.time-cell{
  position: sticky;
  left: 0;
  z-index: 5;
  background: var(--surface);
}
.appt-table td{
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  vertical-align: top;
  padding: 0;
}
.appt-table td:last-child, .appt-table th:last-child{ border-right: none; }
.appt-table tr:last-child td{ border-bottom: none; }

/* Zaman kırılımı 60dk'dan küçükse (ör. 15dk), tam saate denk gelen satırlar (09:00, 10:00...)
   koyu/net bir çizgiyle, aradaki kırılım satırları (09:15, 09:30, 09:45) daha soluk bir
   çizgiyle ayrılır — saatleri takip etmek ızgarada kolaylaşsın diye. */
/* Zaman kırılımı 60dk'dan küçükse (ör. 15dk), tam saate denk gelen satırlar (09:00, 10:00...)
   koyu/net bir çizgiyle, aradaki kırılım satırları (09:15, 09:30, 09:45) daha soluk bir
   çizgiyle ayrılır — saatleri takip etmek ızgarada kolaylaşsın diye. Vurgu çizgisi, o satırın
   ÜSTÜNE konur (border-top) — "burada yeni bir saat başlıyor" anlamına gelsin diye altına değil.
   Ayrıca kırılım satırları normal (60dk) satırlardan daha kompakt/dar tutulur. */
.kirilim-ince-cizgili tr td{ border-top: 0.5px solid var(--border-light, #EDEEF0); border-bottom: none; }
.kirilim-ince-cizgili tr.saat-tam-satir td{ border-top: 1.5px solid var(--text); }
.kirilim-ince-cizgili .time-cell{ padding-top: 5px !important; padding-bottom: 5px !important; }
.kirilim-ince-cizgili tr:not(.saat-tam-satir) .time-cell{ color: var(--text-secondary); font-size: 11.5px; font-weight: 500; }
.kirilim-ince-cizgili tr.saat-tam-satir .time-cell{ font-weight: 700; }
.kirilim-ince-cizgili .room-cell-inner{ min-height: 28px; padding: 5px 8px; gap: 2px; }
.kirilim-ince-cizgili .room-cell{ min-width: 150px; }

.time-cell{
  padding: 12px 14px !important;
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  background-size: 100% 100%;
  position: relative;
  min-width: 108px;
}
.time-cell small{
  display: block;
  font-weight: 500;
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.room-cell{
  min-width: 168px;
  cursor: pointer;
  transition: filter .12s ease;
  height: 1px; /* td'lerin satır boyunca eşit uzayabilmesi için (Chrome/Firefox hilesi) */
}
.room-cell:hover{ filter: brightness(0.97); }
.room-cell-inner{
  min-height: 46px;
  height: 100%;
  box-sizing: border-box;
  padding: 7px 10px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 6px;
  border-radius: 6px;
}
.room-cell.available .room-cell-inner{ background: var(--success-bg); transition: background .12s ease; }
.room-cell.available:hover .room-cell-inner{ background: #8FD4A3; }
.room-cell.occupied .room-cell-inner{ background: var(--danger-bg); transition: background .12s ease, box-shadow .12s ease; box-shadow: inset 0 0 0 1px rgba(224,57,59,.28); }
.room-cell.occupied:hover .room-cell-inner{ background: #F0A8A8; box-shadow: inset 0 0 0 1px rgba(224,57,59,.45); }
.room-cell.available-label{
  color: var(--success);
  font-size: 12.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}
.room-cell.highlight .room-cell-inner{ box-shadow: inset 0 0 0 2px var(--accent); }
.room-cell.coklu .room-cell-inner{ justify-content: flex-start; align-items: stretch; }
.room-cell.coklu .coklu-satir:last-of-type{ border-bottom: none !important; margin-bottom: 0 !important; padding-bottom: 0 !important; }
.room-cell.coklu .coklu-ekle-satir:hover{ text-decoration: underline; }

/* Deneysel "Randevu Ekle 1" sayfası: eşzamanlı/online hücrede yatay grid (chip) düzeni */
.room-cell.coklu-yatay .room-cell-inner{ display: flex; flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 5px; padding: 6px; }
.mini-appt-chip{
  min-width: 84px; max-width: 128px; font-size: 10.5px; line-height: 1.35;
  padding: 5px 7px; border-radius: 7px; background: #fff; border: 1px solid var(--border); cursor: pointer;
}
.mini-appt-chip:hover{ border-color: var(--primary); }
.mini-appt-chip .doktor{ font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-appt-chip .danisan{ color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-appt-ekle-chip{
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); font-weight: 700; background: var(--primary-light) !important; border-style: dashed !important;
}
.doktor-secim-listesi{ display: flex; flex-direction: column; gap: 8px; }
.doktor-secim-item{
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  width: 100%; text-align: left; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: #fff; cursor: pointer; font-family: inherit;
}
.doktor-secim-item:hover{ border-color: var(--primary); background: var(--primary-light); }
.doktor-secim-item:disabled{ opacity: .55; cursor: not-allowed; }
.doktor-secim-item .isim{ font-weight: 600; font-size: 14px; color: var(--text); }
.doktor-secim-item .isim .brans{ font-weight: 400; color: var(--text-secondary); font-size: 12.5px; }
.doktor-secim-item .durum{ font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.doktor-secim-item .doluluk{ font-weight: 400; opacity: .8; }

/* ---------- Randevu Ekle 2: haftalık görünüm ---------- */
#haftaGrid th:not(:first-child){ text-align: center; padding: 8px 6px 10px; }
.hafta-gun-baslik{
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 12.5px; letter-spacing: .03em;
}
.hafta-gun-kisa{
  font-size: 10px; font-weight: 600; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: .04em;
}
.hafta-gun-no{
  font-size: 13px; font-weight: 700; color: var(--text);
  width: 22px; height: 22px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; margin: 0 auto;
}
th.hafta-bugun-sutun .hafta-gun-no{ background: var(--primary); color: #fff; }
th.hafta-bugun-sutun .hafta-gun-kisa{ color: var(--primary-dark); }
.multiselect-panel-actions{ display: flex; gap: 10px; padding: 6px 10px 8px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.multiselect-panel-actions button{ background: none; border: none; color: var(--primary); font-weight: 600; font-size: 12px; cursor: pointer; padding: 0; }
.multiselect-panel-actions button:hover{ text-decoration: underline; }

/* Randevu formunda "hangi doktor" seçimini görsel olarak öne çıkarır — yanlışlıkla
   başka bir doktora randevu girilmesini önlemek için belirgin bir ayraç.
   Native <select>'in kendi rengini zorlamıyoruz (açılan liste okunaksız görünüyordu),
   bunun yerine seçili doktorun adını ayrı, net okunan bir satırda gösteriyoruz.
   Uygulamanın ana yeşil/teal tonuyla (var(--primary)) uyumlu. */
.doktor-sec-kutu{
  background: var(--primary-light);
  border: 1px solid rgba(42,111,111,.28);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.doktor-sec-kutu label{
  display: flex; align-items: center; gap: 6px;
  font-weight: 600; color: var(--primary-dark); font-size: 12.5px;
  text-transform: uppercase; letter-spacing: .04em;
  margin-bottom: 8px;
}
.doktor-sec-secili-ad{
  display: flex; align-items: center; gap: 6px;
  font-weight: 700; font-size: 15.5px; color: var(--primary-dark); margin-bottom: 10px;
}
.doktor-sec-secili-ad::before{
  content: "✓"; display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%; background: var(--primary);
  color: #fff; font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.doktor-sec-kutu select{
  width: 100%; background: #fff; border: 1.5px solid var(--primary);
  border-radius: var(--radius-sm); padding: 9px 11px; font-size: 13.5px; font-weight: 600;
  color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.doktor-sec-kutu select:focus{ outline: none; box-shadow: 0 0 0 3px rgba(42,111,111,.18); }
.doktor-sec-kutu select:disabled{ color: var(--text-secondary); border-color: var(--border); background: var(--locked-bg); box-shadow: none; }
.hafta-gun-durum{ margin-top: 2px; font-size: 9.5px; font-weight: 600; text-transform: none; letter-spacing: 0; }
th.hafta-bugun-sutun{ background: var(--primary-light) !important; }
.room-cell.gecmis .room-cell-inner{ display: flex; align-items: center; justify-content: center; }

/* Belirli bir doktor filtrelenmişken (günlük oda ızgarası), başka bir doktora ait
   dolu/rezerve bilgisi gizlenmiyor (güvenlik: doluluk her zaman görünür kalmalı) ama
   soluklaştırılıp griye çekilerek dikkat seçili doktora ait hücrelere yönlendirilir. */
.room-cell.digerine-ait .room-cell-inner{ opacity: .5; filter: grayscale(.4); }
.room-cell.digerine-ait:hover .room-cell-inner{ opacity: .75; filter: grayscale(.15); }

/* Haftalık ızgara: sol saat sütunu zaten üstte sabitlendi (appt-table th/td.time-cell);
   burada sadece bu ızgaraya özel kompakt ölçüler ve aylıkla aynı chip class'ının
   (gun-hucre-ozet-chip) burada da tıklanabilir olduğunu belli eden imleç eklenir. */
#haftaGrid td.time-cell{ padding: 8px 10px !important; font-size: 12.5px; min-width: 64px; }
#haftaGrid .room-cell{ min-width: 108px; }
#haftaGrid .room-cell-inner{ min-height: 32px; padding: 5px 6px; gap: 3px; }
#haftaGrid .gun-hucre-ozet-chip{ cursor: pointer; }
#haftaGrid .gun-hucre-ozet-chip:hover{ filter: brightness(0.95); }

@media (max-width: 640px){
  #haftaGrid td.time-cell{ min-width: 50px; font-size: 11.5px; padding: 6px !important; }
  #haftaGrid .room-cell{ min-width: 86px; }
  #haftaGrid .room-cell-inner{ min-height: 28px; padding: 3px 4px; }
  #haftaGrid th:not(:first-child){ padding: 6px 3px 8px; }
  #haftaGrid .hafta-gun-no{ width: 19px; height: 19px; font-size: 11.5px; }
  #haftaGrid .hafta-gun-kisa{ font-size: 9px; }
  #haftaGrid .hafta-gun-durum{ display: none; }
  #haftaGrid .gun-hucre-ozet-chip{ font-size: 9px; padding: 1px 4px; }
}

/* Herhangi bir tabloda (haftalık grid, oda ızgarası) satır/sütun hover vurgusu — belirgin,
   mevcut arka plan rengini bozmadan üzerine ton bindirir + kenarlık ekler. */
.hover-satir-vurgu > td, .hover-satir-vurgu > th{ box-shadow: inset 0 0 0 999px rgba(20,120,110,.10); }
.hover-hucre-vurgu{ box-shadow: inset 0 0 0 999px rgba(20,120,110,.16) !important; }
.hover-hucre-vurgu.time-cell, .hover-satir-vurgu > .time-cell{ color: var(--primary-dark); }

/* ---------- Randevu Ekle 1: hücre içi özet chip'leri ---------- */
.gun-hucre-ozet-chip{
  font-size: 10.5px; padding: 2px 6px; border-radius: 5px; background: var(--primary-light); color: var(--primary-dark);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.gun-hucre-fazla{ font-size: 10.5px; color: var(--text-secondary); font-weight: 600; }

/* ---------- Randevu Ekle 1: gün detay popover (hover'da açılır, içi tıklanabilir) ---------- */
.gun-detay-popover{
  position: fixed; background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow-md); z-index: 320; width: 300px; max-height: 360px; overflow-y: auto;
  padding: 12px; display: none; font-size: 12.5px;
}
.gun-detay-popover.show{ display: block; }
.gun-detay-popover h4{ font-size: 13px; margin: 0 0 8px; }
.gun-detay-popover table{ width: 100%; border-collapse: collapse; }
.gun-detay-popover th{ text-align: left; font-size: 10.5px; text-transform: uppercase; color: var(--text-secondary); padding: 3px 4px; }
.gun-detay-popover td{ padding: 4px 4px; border-top: 1px solid var(--border); cursor: pointer; }
.gun-detay-popover tr:hover td{ background: var(--bg); }
.gun-detay-popover .genislet-btn{
  display: block; width: 100%; text-align: center; margin-top: 8px; padding: 6px; background: transparent;
  border: 1px dashed var(--border); border-radius: 6px; color: var(--primary); font-weight: 600; font-size: 12px; cursor: pointer;
}

.mini-appt{
  font-size: 12.5px;
  line-height: 1.4;
}
.mini-appt .doktor{ font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 5px; }
.mini-appt .danisan{ color: var(--text-secondary); display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.mini-appt .saat-araligi{ font-size: 11px; color: var(--text-secondary); margin-top: 1px; }
.mini-appt .randevu-turu-etiket{ font-size: 11px; font-weight: 600; margin-top: 1px; }
.mini-appt .randevu-turu-yerinde{ color: var(--text-secondary); }
.mini-appt .randevu-turu-online{ color: var(--primary); }

.avail-tag{
  color: var(--success);
  font-size: 12.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ---------- Modal / popup ---------- */
.modal-overlay{
  position: fixed;
  inset: 0;
  background: rgba(28,43,46,0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}
.modal-overlay.open{ display: flex; }
.modal{
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-header{
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.modal-header h3{ font-size: 17px; font-weight: 600; }
.modal-header p{ margin: 4px 0 0; font-size: 13px; color: var(--text-secondary); }
.modal-close{
  background: transparent; border: none; cursor: pointer;
  font-size: 18px; color: var(--text-secondary); line-height: 1;
  padding: 4px;
  border-radius: 6px;
}
.modal-close:hover{ background: var(--bg); }
.modal-body{ padding: 20px 22px; }
.modal-actions{ display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

.appt-info{
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 4px;
}
.appt-info-row{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 14px;
}
@media (max-width: 640px){
  .danisan-ust-kart > div{ gap: 14px !important; }
  .danisan-ust-istatistik{ gap: 12px !important; width: 100%; }
  .danisan-ust-istatistik > div > div:first-child{ font-size: 15px !important; }
}
@media (max-width: 480px){
  .yaslandirma-ozet-satiri{ gap: 18px !important; }
}
.appt-info-row .label{ color: var(--text-secondary); font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.r-sayac{ display:inline-block; min-width:16px; padding:0 5px; border-radius:8px; background:var(--bg); color:var(--text-secondary); font-size:11px; font-weight:700; }
.section-tabs button.active .r-sayac{ background:var(--primary-light); color:var(--primary-dark); }

/* Danışan Kartı — Cari Hesap özet grid'i */
.cari-ozet-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px 24px;
  padding: 20px;
}
.cari-ozet-label{ color: var(--text-secondary); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 6px; }
.cari-ozet-deger{ font-size: 20px; font-weight: 700; }
.cari-ozet-alt{ font-size: 11px; color: var(--text-secondary); font-weight: 400; margin-top: 2px; }
@media (max-width: 720px){
  .cari-ozet-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 460px){
  .cari-ozet-grid{ grid-template-columns: 1fr; }
}
.appt-info-row .value{ font-weight: 600; }

/* Randevu Notları popup'ı */
.not-blok{ margin-bottom: 4px; }
.not-liste{ display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.not-satir{
  background: var(--bg); border-radius: var(--radius-sm); padding: 10px 12px;
  border: 1px solid var(--border);
}
.not-satir-icerik{ font-size: 13.5px; color: var(--text); line-height: 1.5; margin-bottom: 6px; white-space: pre-wrap; }
.not-satir-meta{ display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; color: var(--text-secondary); }
.not-satir-meta .btn-edit-text{ padding: 2px 4px; font-size: 11.5px; }

/* Randevu Notları popup'ı normalden geniş — 3 not tipi yan yana, her sütun
   uzun listelerde kendi içinde kayar (böylece popup'ın tamamı aşırı uzamaz). */
.modal.modal-genis{ max-width: 760px; }
.not-grid{ display: flex; flex-direction: column; }
.modal-genis .not-grid{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: start; }
.modal-genis .not-liste{ max-height: 260px; overflow-y: auto; padding-right: 2px; }

/* Randevu Bilgileri sekmesi de aynı geniş modalı kullanır — PC'de rahatça iki sütun
   halinde (randevu bilgileri solda, bakiye/ödeme/durum sağda), mobilde Notlar
   sekmesiyle aynı kırılma noktasında tekrar alt alta tek sütuna döner. */
.bilgi-grid{ display: flex; flex-direction: column; }
.modal-genis .bilgi-grid{ display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; align-items: start; }
@media (max-width: 760px){
  .modal.modal-genis{ max-width: 440px; }
  .modal-genis .not-grid{ display: flex; flex-direction: column; }
  .modal-genis .not-liste{ max-height: none; overflow-y: visible; }
  .modal-genis .bilgi-grid{ display: flex; flex-direction: column; }
}

.form-error{
  background: var(--danger-bg);
  color: var(--danger);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 14px;
  display: none;
}
.form-error.show{ display: block; }

/* ---------- Danışan arama / seç bileşeni ---------- */
.danisan-picker{ position: relative; }
.danisan-sonuclar{
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-top: 6px;
  max-height: 190px;
  overflow-y: auto;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.danisan-sonuc-item{
  padding: 9px 12px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}
.danisan-sonuc-item:last-child{ border-bottom: none; }
.danisan-sonuc-item:hover{ background: var(--primary-light); }
.danisan-sonuc-item .isim{ font-weight: 600; }
.danisan-sonuc-item .tel{ color: var(--text-secondary); font-size: 12.5px; white-space: nowrap; }
.danisan-sonuc-bos{ padding: 12px; color: var(--text-secondary); font-size: 13.5px; text-align: center; }

.danisan-secili-chip{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--primary-dark);
  font-size: 14px;
}
.danisan-secili-chip .tel{ font-weight: 400; font-size: 12.5px; color: var(--primary-dark); opacity: .8; }
.danisan-secili-chip button{
  background: transparent; border: none; cursor: pointer;
  color: var(--primary-dark); font-size: 16px; padding: 2px 4px; border-radius: 5px;
}
.danisan-secili-chip button:hover{ background: rgba(42,111,111,0.15); }

.toggle-link-btn{
  background: transparent; border: none; color: var(--primary);
  font-weight: 600; font-size: 13px; cursor: pointer; padding: 8px 0 2px; display: inline-block;
}

/* ---------- Danışan Kartı: split-view (sol liste + sağ kart) ---------- */
.danisan-split{ display: flex; align-items: flex-start; gap: 20px; }
.danisan-split-sol{
  width: 300px; flex-shrink: 0;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  display: flex; flex-direction: column;
  max-height: calc(100vh - 160px);
  position: sticky; top: 16px;
  overflow: hidden;
}
.danisan-sol-arama{ padding: 14px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.danisan-sol-arama input, .danisan-sol-arama select{ width: 100%; }
.danisan-sol-liste{ overflow-y: auto; flex: 1; }
.danisan-liste-item{
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  width: 100%; text-align: left; padding: 10px 14px; border: none; border-bottom: 1px solid var(--border);
  background: transparent; cursor: pointer; font-family: inherit;
}
.danisan-liste-item:hover{ background: var(--bg); }
.danisan-liste-item.active{ background: var(--primary-light); }
.danisan-liste-item .isim{ font-weight: 600; font-size: 13.5px; color: var(--text); }
.danisan-liste-item .doktor{ font-size: 12px; color: var(--text-secondary); }
.danisan-liste-bos{ padding: 20px 14px; text-align: center; color: var(--text-secondary); font-size: 13px; }
.danisan-split-sag{ flex: 1; min-width: 0; }
@media (max-width: 880px){
  .danisan-split{ flex-direction: column; }
  .danisan-split-sol{ width: 100%; max-height: 320px; position: static; }
}
.toggle-link-btn:hover{ text-decoration: underline; }

.yeni-danisan-form{
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-top: 8px;
  background: var(--bg);
}
.yeni-danisan-form .form-row{ margin-bottom: 10px; }
.yeni-danisan-form .form-row:last-of-type{ margin-bottom: 0; }

.search-box{ max-width: 360px; margin-bottom: 16px; position: relative; }
.search-box input{ padding-left: 34px; }
.search-box::before{
  content: "🔍";
  position: absolute;
  left: 11px; top: 50%; transform: translateY(-50%);
  font-size: 13px; opacity: .55;
}

/* ---------- Görünüm sekmeleri ve filtre çubuğu (randevu sayfası) ---------- */
.view-tabs{
  display: inline-flex;
  max-width: 100%;
  overflow-x: auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
  gap: 2px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.03);
}
.view-tabs button{
  border: none;
  background: transparent;
  padding: 8px 20px;
  white-space: nowrap;
  flex-shrink: 0;
  border-radius: 7px;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background .12s ease, color .12s ease, box-shadow .12s ease;
}
.view-tabs button:hover:not(.active){ color: var(--text); background: rgba(0,0,0,.03); }
.view-tabs button.active{ background: var(--surface); color: var(--primary-dark); box-shadow: var(--shadow); }

/* Bölüm sekmeleri (ör. Danışan Kartı: Takvim/Randevu Geçmişi/Notlar/Cari Hesap) —
   altındaki içerik paneline görsel olarak bağlı, klasik "underline tab" görünümü. */
.section-tabs{
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.section-tabs button{
  border: none;
  background: transparent;
  padding: 11px 18px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color .15s ease, border-color .15s ease;
}
.section-tabs button:hover{ color: var(--primary-dark); }
.section-tabs button.active{ color: var(--primary-dark); border-bottom-color: var(--primary); }

.filters-bar2{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
  justify-content: space-between;
}
.filters-bar2 .left-group{ display:flex; flex-wrap:wrap; gap:12px; align-items:end; }
.filter-group{ min-width: 170px; }

.multiselect{
  position: relative;
}
.multiselect-toggle{
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
}
.multiselect-toggle span.txt{ overflow:hidden; text-overflow:ellipsis; }
.multiselect-panel{
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: max-content;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 6px;
  z-index: 50;
  display: none;
  max-height: 260px;
  overflow-y: auto;
}
.multiselect.open .multiselect-panel{ display: block; }
@media (max-width: 480px){
  .multiselect-panel{ max-width: calc(100vw - 48px); }
  .multiselect-item{ white-space: normal; }
}
.multiselect-item{
  display: flex; align-items: center; gap: 8px;
  padding: 5px 8px; border-radius: 6px; font-size: 13.5px; cursor: pointer;
  white-space: nowrap;
}
.multiselect-item:hover{ background: var(--primary-light); }
.multiselect-item input{ width:auto; flex-shrink: 0; }

/* ---------- Takvim ortak ---------- */
.calendar-nav{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}
.calendar-nav h2{ font-size: 18px; font-weight: 600; text-transform: capitalize; }
.calendar-nav .nav-btns{ display: flex; gap: 6px; }
@media (max-width: 480px){
  .calendar-nav h2{ font-size: 15px; }
  .calendar-nav .today-btn{ padding: 0 10px; font-size: 12px; }
}
.calendar-nav button{
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  width: 34px; height: 34px;
  cursor: pointer;
  font-size: 15px;
  color: var(--text-secondary);
}
.calendar-nav button:hover{ background: var(--primary-light); color: var(--primary-dark); }
.calendar-nav .today-btn{ width: auto; padding: 0 14px; font-weight: 600; font-size: 13px; }

.legend-durum{
  display: flex; flex-wrap: wrap; gap: 14px;
  margin-bottom: 18px; font-size: 12.5px; color: var(--text-secondary);
}
.legend-durum span{ display:inline-flex; align-items:center; gap:6px; cursor: help; }
.legend-durum .sw{ width:11px; height:11px; border-radius:3px; display:inline-block; }

/* ---------- Aylık takvim ---------- */
.month-grid{
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}
.month-grid .weekday-label{
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .03em;
  padding-bottom: 4px;
}
.day-cell{
  border-radius: var(--radius-sm);
  min-height: 92px;
  padding: 8px 9px;
  cursor: pointer;
  border: 1px solid var(--border);
  position: relative;
  transition: transform .1s ease, box-shadow .1s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0; /* grid track'in içerik yüzünden taşmasını (yatay scroll) önler */
  overflow: hidden;
}
@media (max-width: 640px){
  .month-grid{ gap: 4px; }
  .day-cell{ min-height: 58px; padding: 4px 5px; border-radius: 6px; }
  .day-cell .gun-no{ font-size: 12px; }
  .month-grid .weekday-label{ font-size: 9.5px; padding-bottom: 2px; }
  .gun-hucre-ozet-chip{ font-size: 9px; padding: 1px 3px; }
  .gun-hucre-fazla{ font-size: 9px; }
  .appt-satir{ font-size: 9.5px; }
}

/* Aylık takvim — mobilde (≤640px) grid yerine dikey ajanda listesi kullanılır. */
.month-agenda{ display: flex; flex-direction: column; }
.ay-ajanda-satir{
  display: flex; gap: 12px; padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.ay-ajanda-satir:active{ background: var(--bg); }
.ay-ajanda-satir.gecmis{ opacity: 0.55; }
.ay-ajanda-satir.bugun{ background: var(--primary-light); border-radius: var(--radius-sm); border-bottom-color: transparent; }
.ay-ajanda-tarih{ width: 34px; flex-shrink: 0; text-align: center; }
.ay-ajanda-gun-kisa{ display: block; font-size: 10.5px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .03em; }
.ay-ajanda-gun-no{
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; margin: 3px auto 0;
  font-size: 13.5px; font-weight: 600; border-radius: 50%;
}
.ay-ajanda-satir.bugun .ay-ajanda-gun-kisa{ color: var(--primary-dark); }
.ay-ajanda-satir.bugun .ay-ajanda-gun-no{ background: var(--primary); color: #fff; }
.ay-ajanda-govde{ flex: 1; min-width: 0; padding-top: 1px; }
.ay-ajanda-durum{ font-size: 12.5px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.ay-ajanda-satir.bugun .ay-ajanda-durum{ color: var(--primary-dark); }
.ay-ajanda-chipler{ display: flex; flex-wrap: wrap; gap: 5px; }
.ay-ajanda-chipler .gun-hucre-ozet-chip{ font-size: 11px; padding: 3px 8px; border-radius: 6px; }
.day-cell:hover{ transform: translateY(-1px); box-shadow: var(--shadow); }
.day-cell.disi-ay{ opacity: 0.35; }
.day-cell.gecmis{ opacity: 0.85; cursor: pointer; background: var(--locked-bg) !important; }
.day-cell.has-appt{ background: var(--primary-light); border-color: var(--primary); }
.day-cell.no-appt{ opacity: .6; }
.appt-satir{ font-size: 11px; font-weight: 600; color: var(--primary-dark); line-height:1.4; }
.day-cell .gun-no{ font-weight: 700; font-size: 14px; }
.day-cell.bugun .gun-no{ color: var(--primary-dark); }
.day-cell.bugun{ border-color: var(--primary); }
.day-cell .ozet{ font-size: 11px; font-weight: 600; }

.day-cell.durum-a{ background: var(--success-bg); }
.day-cell.durum-a .ozet{ color: var(--success); }
.day-cell.durum-b{ background: var(--info-bg); }
.day-cell.durum-b .ozet{ color: var(--info); }
.day-cell.durum-c{ background: #FBF1E4; }
.day-cell.durum-c .ozet{ color: var(--accent); }
.day-cell.durum-d{ background: var(--warn-dark-bg); }
.day-cell.durum-d .ozet{ color: var(--warn-dark); }
.day-cell.durum-e{ background: var(--locked-bg); }
.day-cell.durum-e .ozet{ color: var(--locked-text); }

/* Gün üstü tooltip */
.day-tooltip{
  position: fixed;
  background: #243238;
  color: #F2F5F5;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.5;
  z-index: 300;
  max-width: 280px;
  box-shadow: var(--shadow-md);
  display: none;
  pointer-events: none;
}
.day-tooltip.show{ display: block; }
.day-tooltip strong{ display:block; margin-bottom:4px; font-size:12.5px; color:#fff; }
.day-tooltip .durum-satir{ display:flex; align-items:flex-start; gap:7px; margin:3px 0; }
.day-tooltip .durum-nokta{ width:9px; height:9px; border-radius:3px; flex-shrink:0; margin-top:3px; }

/* Doktor adı satırlarına hover — tıklanabilir olduğunu belli eder */
.doktor-satir{ padding:1px 5px; margin:-1px -5px; border-radius:5px; transition: background .12s ease; }
.doktor-satir:hover{ background: rgba(28,43,46,0.08); text-decoration: underline; }
.doktor-daha-goster{ padding:1px 5px; margin:-1px -5px; border-radius:5px; transition: background .12s ease; }
.doktor-daha-goster:hover{ background: rgba(42,111,111,0.12); }

/* ---------- Haftalık takvim ---------- */
.week-grid{
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}
.week-grid .day-cell{ min-height: 150px; }

.hafta-saat-cell{
  padding: 10px 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
}

/* ---------- Aktif doktor seçici (günlük görünüm üstü) ---------- */
.active-doktor-bar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--primary-light);
  border: 1px solid rgba(42,111,111,0.2);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 18px;
}
.active-doktor-bar .info{ font-size: 14px; color: var(--primary-dark); font-weight: 600; }
.active-doktor-bar .info small{ display:block; font-weight: 500; font-size: 12.5px; opacity: .85; margin-top:2px; }
.back-link{
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-secondary); font-weight: 600; font-size: 13.5px; cursor: pointer;
  margin-bottom: 14px;
}
.back-link:hover{ color: var(--primary-dark); }

.gunluk-ust-sabit{
  position: sticky;
  z-index: 15;
  background: var(--bg);
  padding-top: 4px;
  margin-bottom: 4px;
}
.gunluk-ust-sabit .legend{ margin-bottom: 0; padding-bottom: 14px; }
.gunluk-ust-sabit .active-doktor-bar{ margin-bottom: 0; }
.gunluk-ust-sabit .filter-group{ margin-bottom: 10px !important; }

.doktor-secim-karti{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 20px;
}
.doktor-secim-karti h3{ font-size: 16px; margin-bottom: 12px; }
.doktor-secenek-list{ display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow-y: auto; }
.doktor-secenek-item{
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; font-size: 14px;
}
.doktor-secenek-item:hover{ border-color: var(--primary); background: var(--primary-light); }
.doktor-secenek-item .durum-etiket{ font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 20px; }
.doktor-secenek-item .durum-etiket.durum-a{ background: var(--success-bg); color: var(--success); }
.doktor-secenek-item .durum-etiket.durum-b{ background: var(--info-bg); color: var(--info); }
.doktor-secenek-item .durum-etiket.durum-c{ background: #FBF1E4; color: var(--accent); }
.doktor-secenek-item .durum-etiket.durum-d{ background: var(--warn-dark-bg); color: var(--warn-dark); }
.doktor-secenek-item .durum-etiket.durum-e{ background: var(--locked-bg); color: var(--locked-text); }

/* ---------- Günlük oda/online tablosundaki yeni hücre durumları ---------- */
.room-cell.closed .room-cell-inner{ background: var(--danger-bg); }
.room-cell.closed .avail-tag{ color: var(--danger); }
.room-cell.conditional .room-cell-inner{ background: #FBF1E4; }
.room-cell.conditional .avail-tag{ color: var(--accent); }
.room-cell.locked .room-cell-inner{ background: var(--locked-bg); cursor: not-allowed; }
.room-cell.locked .avail-tag{ color: var(--locked-text); }
.room-cell.gecmis .room-cell-inner{ background: var(--locked-bg); cursor: not-allowed; }
.room-cell.gecmis .avail-tag{ color: var(--locked-text); }
.room-cell.online-col .room-cell-inner{ border-left: 2px dashed var(--border); }
.room-cell.mesgul .room-cell-inner{ background: var(--danger-bg); }
.room-cell.mesgul .avail-tag{ color: var(--danger); }

/* Randevu Ara sayfasından gelindiğinde hedef hücreyi işaretler */
.room-cell.hedef-vurgu{ position: relative; }
.room-cell.hedef-vurgu .room-cell-inner{
  outline: 3px solid var(--danger);
  outline-offset: -3px;
  background: #FFE8E8 !important;
  animation: hedef-pulse 1.6s ease-in-out 2;
}
@keyframes hedef-pulse{
  0%, 100% { box-shadow: 0 0 0 0 rgba(224,57,59,0.35); }
  50% { box-shadow: 0 0 0 6px rgba(224,57,59,0); }
}

.zorunlu-kutu{
  display: flex; align-items: flex-start; gap: 9px;
  background: #FBF1E4; border: 1px solid rgba(217,142,63,0.35);
  border-radius: var(--radius-sm); padding: 11px 12px; margin-bottom: 14px; font-size: 13px;
}
.zorunlu-kutu input{ width: auto; margin-top: 2px; }
.zorunlu-kutu label{ margin: 0; font-weight: 500; color: var(--text); text-transform: none; font-size: 13px; }

.durum-select-row{
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 4px; border-bottom: 1px solid var(--border); gap: 10px;
}
.durum-select-row:last-child{ border-bottom: none; }
.durum-select-row .gun-adi{ font-weight: 600; font-size: 13.5px; width: 90px; flex-shrink:0; }
.durum-select-row select{ font-size: 13px; padding: 7px 9px; }
