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

:root{
  --bg: #F5F8F8;
  --surface: #FFFFFF;
  --primary: #10b981;
  --primary-dark: #059669;
  --primary-light: #ecfdf5;
  --text: #1C2B2E;
  --text-secondary: #607072;
  --border: #E1E8E8;
  --success: #059669;
  --success-bg: #ecfdf5;
  --danger: #E0393B;
  --danger-bg: #FDECEC;
  --accent: #d97706;
  --info: #2563eb;
  --info-bg: #eff6ff;
  --warn-dark: #c2410c;
  --warn-dark-bg: #fff7ed;
  --locked-bg: #f1f5f9;
  --locked-text: #64748b;
  --radius: 14px;
  --radius-sm: 8px;
  --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: 16px;
}
.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: 18px; }

.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; }

/* ---------- Seans Bazlı Muhasebe Raporu — kompakt "finansal tablo" görünümü ----------
   Renk paleti tamamen projenin kendi CSS değişkenlerinden (var(--primary) vb.) gelir;
   sadece yoğunluk/tipografi/rozet fikirleri farklı bir tasarımdan esinlenmiştir. */
.sb-filtre-cubugu{ display:flex; align-items:center; gap:14px; flex-wrap:wrap; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-sm); padding:10px 14px; margin-bottom:12px; }
.sb-filtre-alan{ display:flex; flex-direction:column; gap:3px; }
.sb-filtre-alan label{ font-size:10px; color:var(--text-secondary); font-weight:700; letter-spacing:.05em; text-transform:uppercase; margin:0; }
.sb-filtre-alan input,
.sb-filtre-alan select{ border:1px solid var(--border); border-radius:6px; height:32px; padding:0 8px; font-size:12.5px; background:var(--bg); min-width:0; }
.sb-filtre-ayrac{ width:1px; height:30px; background:var(--border); flex-shrink:0; }
@media (max-width:760px){
  .sb-filtre-cubugu{ flex-direction:column; align-items:stretch; }
  .sb-filtre-ayrac{ display:none; }
  .sb-filtre-alan, .sb-filtre-alan select, .sb-filtre-alan input{ width:100%; }
}

.sb-ozet-serit{ display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-bottom:12px; }
@media (max-width:700px){ .sb-ozet-serit{ grid-template-columns:1fr 1fr; } }
.sb-ozet-kart{ background:var(--surface); border:1px solid var(--border); border-radius:7px; padding:10px 14px; }
.sb-ozet-yontem{ font-size:11px; color:var(--text-secondary); margin-top:4px; }
.sb-ozet-etiket{ font-size:10px; color:var(--text-secondary); font-weight:700; letter-spacing:.05em; text-transform:uppercase; margin-bottom:4px; }
.sb-ozet-deger{ font-size:18px; font-weight:700; color:var(--text); letter-spacing:-.02em; }
.sb-mono{ font-variant-numeric: tabular-nums; }

.sb-tablo-scroll{ overflow:auto; max-height:calc(100vh - 380px); min-height:220px; }
.sb-tablo{ font-size:12px; }
.sb-tablo thead th{ position:sticky; top:0; z-index:2; background:#f7fafb; font-size:10px; letter-spacing:.05em; padding:8px 12px; white-space:nowrap; }
.sb-tablo tbody td{ padding:6px 12px; white-space:nowrap; }
.sb-tablo tbody tr:nth-child(even){ background:#fafbfb; }
.sb-tablo tbody tr:hover{ background:var(--primary-light); }
.sb-tablo .sb-num{ text-align:right; font-variant-numeric: tabular-nums; }
.sb-tablo .sb-avatar-mini{ width:20px; height:20px; border-radius:50%; background:var(--primary-light); color:var(--primary-dark); font-size:9px; font-weight:700; display:inline-flex; align-items:center; justify-content:center; flex-shrink:0; margin-right:6px; }
.sb-rozet{ display:inline-block; font-size:10px; font-weight:600; padding:2px 7px; border-radius:5px; border:1px solid transparent; white-space:nowrap; }
.sb-rozet-tip{ background:var(--primary-light); color:var(--primary-dark); border-color:#a7f3d0; }
.sb-rozet-odendi{ background:var(--success-bg); color:var(--success); border-color:#a7f3d0; }
.sb-rozet-kismi{ background:#fffbeb; color:#b45309; border-color:#fde68a; }
.sb-rozet-bekliyor{ background:var(--danger-bg); color:var(--danger); border-color:#fecaca; }
.sb-tablo tfoot td{ background:var(--bg); font-weight:700; border-top:2px solid var(--border); padding:8px 12px; }
@media (max-width: 720px){
  .data-table{ display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
/* Randevular sayfası tabloları: table{display:block} yerine kanıtlanmış çalışan
   scroll-wrapper deseni (bkz. .dp-table-scroll) — tablo normal table düzeninde kalır,
   sadece etrafındaki div yatayda kaydırılabilir. Böylece WhatsApp/Görüntüle butonları
   sütunu taşmaz/kaybolmaz, tüm sütunlar hizalı kalır. */
.rt-table-scroll{ overflow-x: auto; -webkit-overflow-scrolling: touch; }
.rt-table-scroll .data-table{ display: table; min-width: 640px; }
/* Muhasebe Raporu'ndaki (Ödeme Raporu, Danışan Muhasebesi, Borç Yaşlandırma, Doktor
   Hakedişi) tablo sarmalayıcıları — aynı display:block çakışması buradaki sağ sütunların
   (örn. son sütunlar) mobilde görünmeden kaybolmasına yol açıyordu. */
.table-scroll-wrap{ overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll-wrap .data-table{ display: table; min-width: 720px; }
.sb-tablo-scroll .data-table{ display: table; min-width: 900px; }
@media (max-width: 640px){
  .data-table .row-actions{ flex-direction: column; align-items: flex-end; gap: 6px; }
}
.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: #6ee7b7; }
.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(16,185,129,.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(16,185,129,.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); }
/* Aynı saatte birden fazla randevu (çoklu-kullanım/online odası) varsa, hücre YANA
   doğru genişleyip sütunu şişirmek yerine chip'ler alt alta dizilir — bir saatte
   normalde en fazla 3-5 doktor olduğundan hücre boyu makul kalır, genişlik sabit kalır. */
#haftaGrid .room-cell.coklu-yatay .room-cell-inner{ flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
#haftaGrid .room-cell.coklu-yatay .gun-hucre-ozet-chip{ white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@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: 14px;
  padding: 18px;
}
.cari-ozet-item{
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
}
.cari-ozet-label{ color: var(--text-secondary); font-size: 11px; 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: 940px; width: min(940px, calc(100vw - 32px)); }

/* ---------- Randevu Ekle formu — iki sütunlu yeni tasarım (RF = Randevu Formu) ---------- */
/* ---------- Randevu Ekle — modern header / footer ---------- */
.modal-head-main{ min-width: 0; }
.modal-header-doctor{
  margin-left:auto;
  min-width:320px;
  max-width:420px;
  padding:7px 12px 8px;
  border-left:1px solid var(--border);
}
.modal-header-doctor-label{
  font-size:10px;
  color:var(--text-secondary);
  text-transform:uppercase;
  letter-spacing:.06em;
  font-weight:800;
  margin-bottom:4px;
}
.modal-header-doctor-row{ display:flex; align-items:center; gap:8px; }
.modal-header-doctor-check{
  width:20px; height:20px; border-radius:50%;
  background:var(--primary); color:#fff; display:grid; place-items:center;
  font-size:11px; font-weight:800; flex-shrink:0;
}
.modal-header-doctor select{
  width:100%; min-width:0; height:36px;
  border:1px solid var(--primary);
  border-radius:9px; background:#fff;
  color:var(--text); font-weight:650; padding:6px 10px;
}
.rf-divider{ height:1px; background:var(--border); margin:18px 0 20px; }
.rf-footer{
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  border-top:1px solid var(--border);
  margin:20px -22px -16px;
  padding:16px 22px;
}
.rf-footer-actions{ margin:0; }
.form-note{ font-weight:400; color:var(--text-secondary); }
.required-note{ font-size:11px; color:var(--text-secondary); }
.rf-grid-v2 .rf-col{ padding-top:8px; padding-bottom:8px; }
.rf-grid{ display:grid; grid-template-columns:1fr 1fr; gap:0; margin:0 -22px; }
.rf-col{ padding:16px 22px; }
.rf-col + .rf-col{ border-left:1px solid var(--border); }
.rf-col-baslik{ font-size:11px; letter-spacing:.06em; font-weight:800; color:#8795a7; margin-bottom:14px; }
@media (max-width:720px){
  .rf-grid{ grid-template-columns:1fr; margin:0; }
  .rf-col + .rf-col{ border-left:0; border-top:1px solid var(--border); }
  .modal-header-doctor{ width:100%; max-width:none; min-width:0; margin:10px 0 0; padding:8px 0 0; border-left:0; border-top:1px solid var(--border); }
  .rf-footer{ align-items:flex-start; flex-direction:column; }
  .rf-footer-actions{ width:100%; }
}

.rf-toggle-card{ border:1px solid var(--border); border-radius:10px; padding:12px 14px; display:flex; align-items:center; justify-content:space-between; margin-top:12px; background:#fff; }
.rf-toggle-left{ display:flex; gap:10px; align-items:center; }
.rf-toggle-icon{ width:28px; height:28px; border-radius:50%; background:var(--primary-light); color:var(--primary-dark); display:flex; align-items:center; justify-content:center; font-size:14px; flex-shrink:0; }
.rf-toggle-title{ font-size:13px; font-weight:700; color:var(--text); }
.rf-toggle-help{ font-size:10.5px; color:var(--text-secondary); margin-top:2px; }
.rf-expand{ margin-top:10px; padding:13px; background:var(--bg); border:1px solid var(--border); border-radius:9px; }

/* Checkbox'ı gerçek bir yuvarlak "switch" gibi göster — JS mantığı hiç değişmiyor, sadece görünüm. */
.rf-switch{ -webkit-appearance:none; appearance:none; width:40px; height:22px; border-radius:20px; background:#c8d2df; position:relative; cursor:pointer; transition:.2s; flex-shrink:0; margin:0; }
.rf-switch::after{ content:""; position:absolute; width:16px; height:16px; border-radius:50%; background:#fff; top:3px; left:3px; box-shadow:0 1px 3px rgba(0,0,0,.2); transition:.2s; }
.rf-switch:checked{ background:var(--primary); }
.rf-switch:checked::after{ left:21px; }

.rf-pay-status{ display:grid; grid-template-columns:1fr 1fr; border:1px solid var(--border); border-radius:9px; overflow:hidden; }
.rf-pay-option{ min-height:42px; display:flex; align-items:center; justify-content:center; gap:8px; font-size:12.5px; font-weight:700; background:#fff; cursor:pointer; color:var(--text-secondary); }
.rf-pay-option:first-child{ border-right:1px solid var(--border); }
.rf-pay-option input{ accent-color:var(--primary); }
.rf-pay-option.active{ background:var(--primary-light); color:var(--primary-dark); }
.rf-pay-amount{ display:none; margin-top:12px; padding:12px 0 2px; border-top:1px dashed var(--border); }
.rf-pay-amount.open{ display:block; }

.rf-methods{ display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.rf-method{ height:38px; border:1px solid var(--border); border-radius:20px; background:#fff; font-size:12px; font-weight:700; color:var(--text-secondary); cursor:pointer; }
.rf-method.active{ background:var(--primary); border-color:var(--primary); color:#fff; }
.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; }

.mukerrer-uyari{
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 16px;
}

.odeme-ozet-satir{ display:flex; flex-wrap:wrap; align-items:center; gap:20px; row-gap:16px; }
.odeme-ozet-kalem{ min-width:110px; }
.odeme-ozet-deger{ font-size:22px; font-weight:700; line-height:1.1; }
.odeme-ozet-etiket{ font-size:11.5px; color:var(--text-secondary); margin-top:4px; white-space:nowrap; }
.odeme-ozet-pip{ width:1px; height:34px; background:linear-gradient(180deg, transparent, var(--border) 20%, var(--border) 80%, transparent); flex-shrink:0; }
@media (max-width:900px){ .odeme-ozet-pip{ display:none; } }

/* ---------- 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(16,185,129,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: row; align-items: center; gap: 10px;
  width: 100%; text-align: left; padding: 9px 12px; border: none; border-radius: 10px;
  background: transparent; cursor: pointer; font-family: inherit; margin: 2px 6px;
  width: calc(100% - 12px);
}
.danisan-liste-item:hover{ background: var(--bg); }
.danisan-liste-item.active{ background: var(--primary-light); }
.danisan-liste-item .avatar{
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff;
}
.danisan-liste-item .bilgi{ min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 1px; }
.danisan-liste-item .isim{ font-weight: 600; font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.danisan-liste-item .doktor{ font-size: 11px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.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; }
  /* .danisan-split'in align-items:flex-start'ı, dikey (column) düzende sağ tarafın
     tam genişlik almasını engelliyordu (çapraz eksende gerilmiyordu) — bu yüzden
     danışan detay kartı mobilde daralmış/kırpılmış görünüyordu. */
  .danisan-split-sag{ width: 100%; }
}
.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: inline-flex;
  max-width: 100%;
  gap: 2px;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 3px;
  border-bottom: none;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.section-tabs button{
  border: none;
  background: transparent;
  padding: 7px 16px;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 9px;
  border-bottom: none;
  margin-bottom: 0;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color .15s ease, background .15s ease, box-shadow .15s ease;
}
.section-tabs button:hover{ color: var(--primary-dark); }
.section-tabs button.active{ color: #1e293b; background: #fff; box-shadow: 0 1px 3px rgba(15,23,42,.12); border-bottom-color: transparent; }

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

/* Filtre çubuklarındaki input/select'ler (tarih aralığı, arama, dropdown) — eski genel
   input stilinden bağımsız, sabit ve kompakt bir yükseklikte, tutarlı görünsün. */
.filters-bar2 input,
.filters-bar2 select{
  height: 36px;
  padding: 0 10px;
  font-size: 12.5px;
  min-width: 0;
}
.filters-bar2 input[type="date"]{ min-width: 128px; }
@media (max-width: 760px){
  .filters-bar2{ flex-direction:column; align-items:stretch; }
  .filters-bar2 .left-group{
    display:grid;
    grid-template-columns: 1fr 1fr;
    width:100%;
    overflow-x:visible;
  }
  .filters-bar2 .left-group > input,
  .filters-bar2 .left-group > select{ width:100%; }
  .filters-bar2 .left-group > span{ display:none; } /* "–" ayracı gibi salt görsel öğeler mobilde gizlenir */
  .filters-bar2 .left-group > input[type="text"]{ grid-column: 1 / -1; min-width:0; }
  .filters-bar2 .left-group > select{ grid-column: 1 / -1; }
}

.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: 10px;
  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: 10px;
  width: 32px; height: 32px;
  cursor: pointer;
  font-size: 15px;
  color: var(--text-secondary);
  transition: background .15s, color .15s;
}
.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: 12.5px; border-radius: 10px; }

.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: 6px;
}
.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: 62px;
  padding: 6px 8px;
  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: #fffbeb; }
.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(16,185,129,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(16,185,129,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: #fffbeb; 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: #fffbeb; }
.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: #fffbeb; 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; }


/* ============================================================
   "MediKlinik" Kabuk (Sidebar + Topbar) — TÜM sayfalarda ortak.
   js/auth.js içindeki mkKabukOlustur() tarafından çalışma zamanında
   enjekte edilir (eski yatay .topnav kaldırılıp yerine bu konur).
   Sadece .mk- ön ekli sınıflar kullanılır — projenin geri kalan
   CSS'iyle çakışmaz.
   ============================================================ */
body.mk-dashboard{ margin:0; font-family:'Plus Jakarta Sans',sans-serif; background:#f5f8f7; color:#17312b; }
body.mk-dashboard *{ box-sizing:border-box; }
body.mk-dashboard ::-webkit-scrollbar{ width:14px; height:14px; }
body.mk-dashboard ::-webkit-scrollbar-track{ background:transparent; }
body.mk-dashboard ::-webkit-scrollbar-thumb{ background:#c7d6d6; border-radius:8px; border:3px solid transparent; background-clip:padding-box; }
body.mk-dashboard ::-webkit-scrollbar-thumb:hover{ background:#9fb3b3; background-clip:padding-box; }
body.mk-dashboard *{ scrollbar-width:auto; }

/* Eski (yatay) menü ile sayfa içeriği, JS onları yeni kabuğa taşıyıp/kaldırana kadar
   bir anlığına (yükleme sırasında) görünmesin diye baştan gizli tutulur. mkKabukOlustur()
   çalışır çalışmaz body'ye "mk-dashboard" sınıfı ekliyor — bu kural o an devre dışı kalır.
   Bu bekleme sırasında (özellikle sunucusuz fonksiyonun "soğuk başlangıç" yaptığı, normalden
   yavaş olduğu anlarda) kullanıcı çıplak/eski menü yerine şık bir yükleniyor göstergesi görür.
   Güvenlik ağı: JS gerçekten hiç çalışamazsa (beklenmeyen bir hata), sayfa sonsuza kadar
   asılı kalmasın diye 9 saniye sonra otomatik olarak eski hâliyle görünür hale getirilir —
   bu süre normal bir soğuk başlangıcı fazlasıyla kapsar, sadece gerçek bir arıza durumunda devreye girer. */
@keyframes mkGuvenlikAgiGoster{ to{ visibility:visible; } }
body:not(.mk-dashboard) .topnav,
body:not(.mk-dashboard) .pulse-divider,
body:not(.mk-dashboard) .page{ visibility:hidden; animation:mkGuvenlikAgiGoster 0s 9s forwards; }

@keyframes mkYukleniyorDondur{ to{ transform:rotate(360deg); } }
@keyframes mkYukleniyorSolFade{ to{ opacity:0; visibility:hidden; } }
body:not(.mk-dashboard) #mkYukleniyorGosterge{
  position:fixed; inset:0; z-index:9999; display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:14px; background:#f5f8f7; animation:mkYukleniyorSolFade 0s 9s forwards;
}
body.mk-dashboard #mkYukleniyorGosterge{ display:none; }
#mkYukleniyorGosterge .mk-yukleniyor-spin{
  width:34px; height:34px; border-radius:50%; border:3px solid #d1e7e0; border-top-color:#087a5b;
  animation:mkYukleniyorDondur .8s linear infinite;
}
#mkYukleniyorGosterge .mk-yukleniyor-metin{ font-size:13px; color:#64827a; font-family:'Plus Jakarta Sans',sans-serif; }

.mk-shell{ display:flex; height:100vh; width:100%; overflow:hidden; }

.mk-sidebar{ display:flex; flex-direction:column; flex-shrink:0; width:232px; height:100%; background:linear-gradient(180deg,#075c44 0%,#086e52 100%); transition:width .18s ease; }
.mk-sidebar.mk-collapsed{ width:76px; }
.mk-sidebar.mk-collapsed .mk-brand-name,
.mk-sidebar.mk-collapsed .mk-brand-sub,
.mk-sidebar.mk-collapsed .mk-nav-txt,
.mk-sidebar.mk-collapsed .mk-nav-badge,
.mk-sidebar.mk-collapsed .mk-nav-label,
.mk-sidebar.mk-collapsed .mk-profile-info,
.mk-sidebar.mk-collapsed .mk-wave-label{ display:none; }
.mk-sidebar.mk-collapsed .mk-sidebar-logo{ justify-content:center; padding:16px 8px; }
.mk-sidebar.mk-collapsed .mk-nav-item{ justify-content:center; padding:10px; }
.mk-sidebar.mk-collapsed .mk-nav-item.active::before{ left:50%; top:auto; bottom:-2px; transform:translateX(-50%); width:20px; height:3px; border-radius:3px 3px 0 0; }
.mk-sidebar.mk-collapsed .mk-profile-card{ flex-direction:column; padding:10px 6px; gap:6px; }
.mk-sidebar.mk-collapsed .mk-wave-status{ justify-content:center; gap:0; }
.mk-desktop-collapse-btn{ width:32px; height:32px; border-radius:8px; border:0; background:none; color:#64748b; display:flex; align-items:center; justify-content:center; cursor:pointer; flex-shrink:0; }
.mk-desktop-collapse-btn:hover{ background:#f1f5f9; }
.mk-desktop-collapse-btn svg{ width:18px; height:18px; }
.mk-sidebar-logo{ display:flex; align-items:center; gap:12px; padding:16px; border-bottom:1px solid rgba(255,255,255,.06); flex-shrink:0; }
.mk-logo-box{ width:32px; height:32px; border-radius:8px; display:flex; align-items:center; justify-content:center; flex-shrink:0; background:linear-gradient(135deg,#10b981,#059669); overflow:hidden; }
.mk-logo-box svg{ width:16px; height:16px; }
.mk-sidebar-brandtext{ overflow:hidden; }
.mk-sidebar-brandtext .mk-brand-name{ color:#fff; font-weight:600; font-size:13px; line-height:1.2; letter-spacing:-.01em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mk-sidebar-brandtext .mk-brand-sub{ color:rgba(52,211,153,.7); font-size:10px; font-weight:500; letter-spacing:.03em; }
.mk-sidebar-close{ margin-left:auto; background:none; border:0; color:rgba(255,255,255,.4); cursor:pointer; display:none; padding:4px; }

.mk-nav{ flex:1; overflow-y:auto; padding:12px 10px; min-height:0; }
.mk-nav-label{ display:block; padding:2px 8px 8px; font-size:9px; font-weight:600; color:rgba(255,255,255,.25); text-transform:uppercase; letter-spacing:.18em; }
.mk-nav-item{ position:relative; width:100%; display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:8px; margin-bottom:2px; color:rgba(255,255,255,.45); text-decoration:none; font-size:13px; font-weight:500; transition:background .15s,color .15s; cursor:pointer; border:0; background:none; text-align:left; }
.mk-nav-item:hover{ background:rgba(16,185,129,.16); color:#fff; }
.mk-nav-item.active{ background:linear-gradient(135deg,#10b981,#059669); color:#fff; box-shadow:0 2px 8px rgba(16,185,129,.35); }
.mk-nav-item.active:hover{ background:linear-gradient(135deg,#0da271,#047857); }
.mk-nav-item.active::before{ display:none; }
.mk-nav-item svg{ width:16px; height:16px; flex-shrink:0; }
.mk-nav-item span.mk-nav-txt{ flex:1; }
.mk-nav-badge{ font-size:10px; font-weight:600; padding:2px 6px; border-radius:999px; background:#ffffff0d; color:#ffffff40; }
.mk-nav-item.active .mk-nav-badge{ background:rgba(255,255,255,.25); color:#fff; }

.mk-nav-grup{ margin-bottom:2px; }
.mk-nav-acilir{ width:100%; }
.mk-nav-ok{ width:14px; height:14px; flex-shrink:0; opacity:.5; transition:transform .18s ease; }
.mk-nav-grup.mk-nav-alt-acik .mk-nav-ok{ transform:rotate(180deg); }
.mk-nav-altmenu{ max-height:0; overflow:hidden; transition:max-height .2s ease; padding-left:14px; }
.mk-nav-grup.mk-nav-alt-acik .mk-nav-altmenu{ max-height:280px; }
.mk-nav-alt-item{ display:flex; align-items:center; justify-content:space-between; gap:8px; width:100%; text-align:left; padding:7px 10px; margin:1px 0; border-radius:7px; color:rgba(255,255,255,.4); text-decoration:none; font-size:12.5px; font-weight:500; border:0; background:none; cursor:pointer; position:relative; }
.mk-nav-alt-item:hover{ background:rgba(16,185,129,.10); color:#fff; }
.mk-nav-alt-item.active{ color:#34d399; font-weight:600; }
.mk-nav-tema-hizli{ margin-top:4px; border-top:1px dashed rgba(255,255,255,.08); padding-top:9px; }
.mk-nav-tema-degistir{ font-size:11px; color:#34d399; font-weight:600; }

body.mk-tema-acik .mk-nav-alt-item{ color:#94a3b8; }
body.mk-tema-acik .mk-nav-alt-item:hover{ background:rgba(16,185,129,.10); color:#065f46; }
body.mk-tema-acik .mk-nav-alt-item.active{ color:#065f46; }
body.mk-tema-acik .mk-nav-tema-hizli{ border-top-color:#e2e8f0; }
body.mk-tema-acik .mk-nav-tema-degistir{ color:#059669; }

.mk-sidebar-bottom{ flex-shrink:0; padding:4px 10px 12px; display:flex; flex-direction:column; gap:8px; }
.mk-logo-shimmer-card{ border-radius:12px; overflow:hidden; background:#06503b; border:1px solid #ffffff1a; padding:14px 10px; }
.mk-logo-shimmer{ position:relative; height:36px; }
.mk-logo-shimmer-base,
.mk-logo-shimmer-sweep{ position:absolute; inset:0; }
.mk-logo-shimmer-base{ opacity:.32; filter:grayscale(.15) brightness(1.6); }
.mk-logo-shimmer-sweep{
  -webkit-mask-image:linear-gradient(100deg, transparent 35%, rgba(0,0,0,1) 50%, transparent 65%);
  mask-image:linear-gradient(100deg, transparent 35%, rgba(0,0,0,1) 50%, transparent 65%);
  -webkit-mask-size:300% 100%;
  mask-size:300% 100%;
  -webkit-mask-repeat:no-repeat;
  mask-repeat:no-repeat;
  animation:mkLogoShimmerDalga 3.2s linear infinite;
}
@keyframes mkLogoShimmerDalga{
  0%{ -webkit-mask-position:-120% 0; mask-position:-120% 0; }
  100%{ -webkit-mask-position:120% 0; mask-position:120% 0; }
}
@media (prefers-reduced-motion: reduce){
  .mk-logo-shimmer-sweep{ animation:none; -webkit-mask-image:none; mask-image:none; opacity:.7; }
}
.mk-sidebar.mk-collapsed .mk-logo-shimmer-card{ padding:10px 6px; }

.mk-profile-card{ border-radius:12px; padding:9px 8px; display:flex; align-items:center; gap:6px; background:#06503b; border:1px solid #ffffff1a; }
.mk-profile-avatar{ width:30px; height:30px; border-radius:8px; flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:10.5px; font-weight:700; color:#fff; background:linear-gradient(135deg,#10b981,#059669); box-shadow:0 0 0 1.5px #10b98135,0 2px 6px #00000030; }
.mk-profile-info{ flex:1; min-width:0; }
.mk-profile-name{ color:rgba(255,255,255,.9); font-size:11.5px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mk-profile-role{ color:rgba(52,211,153,.55); font-size:9.5px; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-top:2px; }
.mk-profile-logout{ width:20px; height:20px; border-radius:6px; border:0; background:none; color:rgba(255,255,255,.2); display:flex; align-items:center; justify-content:center; cursor:pointer; flex-shrink:0; }
.mk-profile-logout:hover{ color:rgba(248,113,113,.8); background:rgba(255,255,255,.04); }
.mk-profile-logout svg{ width:12px; height:12px; }

.mk-sidebar-overlay{ display:none; position:fixed; inset:0; background:rgba(0,0,0,.4); z-index:35; }

.mk-main{ flex:1; display:flex; flex-direction:column; min-width:0; overflow:hidden; }

.mk-topbar{ display:flex; align-items:center; gap:12px; padding:0 20px; height:56px; background:#fff; border-bottom:1px solid #f1f5f9; flex-shrink:0; position:relative; }
.mk-ekg-canvas{ position:absolute; left:0; bottom:0; width:100%; height:30px; pointer-events:none; }
.mk-menu-btn{ width:32px; height:32px; border-radius:8px; border:0; background:none; color:#64748b; display:none; align-items:center; justify-content:center; cursor:pointer; flex-shrink:0; }
.mk-menu-btn:hover{ background:#f1f5f9; }
.mk-search{ flex:1; max-width:320px; display:flex; align-items:center; gap:8px; background:#f8fafc; border:1px solid #e2e8f0; border-radius:8px; padding:4px 12px; position:relative; }
.mk-search-sonuclar{ position:absolute; top:calc(100% + 6px); left:0; right:0; background:#fff; border:1px solid var(--border); border-radius:10px; box-shadow:0 12px 32px rgba(15,23,42,.12); max-height:340px; overflow-y:auto; z-index:200; }
.mk-search-satir{ display:flex; flex-direction:column; gap:2px; padding:9px 14px; text-decoration:none; border-bottom:1px solid #f1f5f9; }
.mk-search-satir:last-child{ border-bottom:0; }
.mk-search-satir:hover{ background:var(--primary-light); }
.mk-search-satir strong{ font-size:13px; color:var(--text); font-weight:600; }
.mk-search-satir span{ font-size:11.5px; color:var(--text-secondary); }
.mk-search-bos{ padding:14px; font-size:12.5px; color:var(--text-secondary); text-align:center; }
.mk-search svg{ width:14px; height:14px; color:#94a3b8; flex-shrink:0; }
.mk-search input{ border:0; outline:0; background:transparent; font-size:13px; color:#475569; flex:1; min-width:0; font-family:inherit; }
.mk-search input::placeholder{ color:#94a3b8; }
.mk-topbar-right{ margin-left:auto; display:flex; align-items:center; gap:8px; }
.mk-icon-btn{ width:32px; height:32px; border-radius:8px; border:0; background:none; color:#64748b; display:flex; align-items:center; justify-content:center; cursor:pointer; position:relative; }
.mk-icon-btn:hover{ background:#f1f5f9; }
.mk-icon-btn svg{ width:17px; height:17px; }
.mk-notif-dot{ position:absolute; top:6px; right:6px; width:6px; height:6px; border-radius:999px; background:#10b981; }
.mk-avatar-chip{ width:32px; height:32px; border-radius:8px; flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; color:#fff; background:linear-gradient(135deg,#10b981,#059669); }

.mk-page{ flex:1; overflow-y:auto; overflow-x:hidden; }

/* Sayfa içeriği (eski .page) — kabuk içinde konumlandığında biraz daha ferah */
.mk-page > .page{ max-width:1320px; }

/* ---------- Dashboard (ana-sayfa.html) ---------- */
.mk-dash-inner{ padding:20px; display:flex; flex-direction:column; gap:20px; max-width:1400px; margin:0 auto; }

.mk-hero{ border-radius:16px; padding:20px; position:relative; overflow:hidden; background:linear-gradient(110deg,#086e52,#07815e 55%,#09946d); }
.mk-hero-glow-a{ position:absolute; top:-24px; right:-24px; width:144px; height:144px; border-radius:999px; background:radial-gradient(circle,#10b98118,transparent 70%); pointer-events:none; }
.mk-hero-glow-b{ position:absolute; bottom:-40px; right:80px; width:192px; height:192px; border-radius:999px; background:radial-gradient(circle,#34d39908,transparent 70%); pointer-events:none; }
.mk-hero-row{ position:relative; z-index:1; display:flex; align-items:flex-start; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.mk-hero-eyebrow{ display:inline-block; font-size:10px; font-weight:600; padding:5px 10px; border-radius:999px; color:#6ee7b7; text-transform:uppercase; letter-spacing:.14em; background:#10b98118; border:1px solid #10b98128; margin-bottom:12px; }
.mk-hero-title{ color:#fff; font-size:20px; font-weight:700; margin:0 0 6px; display:flex; align-items:center; gap:8px; }
.mk-hero-title svg{ width:17px; height:17px; color:rgba(52,211,153,.8); flex-shrink:0; }
.mk-hero-date{ color:rgba(110,231,183,.6); font-size:13px; margin:0; text-transform:capitalize; }
.mk-gun-ok-hero{ background:rgba(255,255,255,.1); border-color:rgba(255,255,255,.18); color:#fff; }
.mk-gun-ok-hero:hover{ background:rgba(255,255,255,.2); border-color:rgba(255,255,255,.3); color:#fff; }
.mk-gun-bugun-btn-hero{ background:rgba(255,255,255,.14); color:#fff; }
.mk-gun-bugun-btn-hero:hover{ background:rgba(255,255,255,.24); }
.mk-hero-sub{ color:rgba(255,255,255,.4); font-size:12px; margin:4px 0 0; line-height:1.5; }
.mk-hero-stats{ display:flex; align-items:center; gap:16px; align-self:center; }
.mk-hero-stat{ text-align:center; }
.mk-hero-stat-label{ font-size:10px; font-weight:600; text-transform:uppercase; letter-spacing:.15em; margin-bottom:4px; }
.mk-hero-stat-val{ color:#fff; font-size:28px; font-weight:700; line-height:1; }
.mk-hero-stat-note{ color:rgba(255,255,255,.35); font-size:10px; margin-top:4px; }
.mk-hero-divider{ width:1px; height:40px; background:rgba(255,255,255,.1); align-self:center; }

.mk-kpi-grid{ display:grid; grid-template-columns:repeat(6,1fr); gap:10px; }
@media (max-width:1400px){ .mk-kpi-grid{ grid-template-columns:repeat(3,1fr); } }
@media (max-width:760px){ .mk-kpi-grid{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:480px){ .mk-kpi-grid{ grid-template-columns:1fr; } }
.mk-kpi-card{ background:#fff; border-radius:12px; padding:14px; border:1px solid #f1f5f9; transition:box-shadow .2s, transform .2s; cursor:default; min-width:0; }
.mk-kpi-card:hover{ box-shadow:0 4px 14px rgba(148,163,184,.15); transform:translateY(-1px); }
.mk-kpi-top{ display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:12px; }
.mk-kpi-icon{ width:36px; height:36px; border-radius:8px; display:flex; align-items:center; justify-content:center; }
.mk-kpi-icon svg{ width:17px; height:17px; }
.mk-kpi-trend{ display:flex; align-items:center; gap:2px; font-size:11px; font-weight:600; }
.mk-kpi-trend svg{ width:12px; height:12px; }
.mk-kpi-trend.up{ color:#059669; }
.mk-kpi-trend.down{ color:#ef4444; }
.mk-kpi-value{ font-size:22px; font-weight:700; line-height:1; margin-bottom:4px; }
.mk-kpi-label{ color:#334155; font-size:13px; font-weight:500; margin-bottom:2px; }
.mk-kpi-sub{ color:#94a3b8; font-size:11px; }
.mk-kpi-govde{ display:flex; align-items:center; gap:14px; }
.mk-kpi-sol{ flex:1; min-width:0; }
.mk-kpi-detay{ flex-shrink:0; display:flex; flex-direction:column; gap:5px; padding-left:14px; border-left:1px solid #f1f5f9; }
.mk-kpi-detay-satir{ display:flex; flex-direction:column; gap:1px; font-size:11px; white-space:nowrap; }
.mk-kpi-detay-satir span{ color:#94a3b8; }
.mk-kpi-detay-satir strong{ color:#334155; font-size:12.5px; font-weight:700; }
@media (max-width:1300px) and (min-width:761px){ .mk-kpi-detay{ display:none; } }
@media (max-width:760px){
  .mk-kpi-govde{ flex-direction:column; align-items:stretch; }
  .mk-kpi-detay{ flex-direction:row; flex-wrap:wrap; border-left:0; border-top:1px solid #f1f5f9; padding-left:0; padding-top:10px; margin-top:2px; gap:12px; }
}

.mk-bottom-grid{ display:grid; grid-template-columns:2fr 1fr; gap:16px; align-items:start; }
.mk-panel{ background:#fff; border-radius:12px; border:1px solid #f1f5f9; overflow:hidden; }
.mk-panel-head{ display:flex; align-items:center; justify-content:space-between; padding:14px 16px; border-bottom:1px solid #f8fafc; gap:10px; }
.mk-panel-head-right{ display:flex; align-items:center; gap:12px; flex-shrink:0; }
.mk-appt-arama{ display:flex; align-items:center; gap:5px; background:#f8fafc; border:1px solid #eef2f2; border-radius:7px; padding:4px 8px; width:118px; transition:width .15s ease, border-color .15s ease; }
.mk-appt-arama:focus-within{ width:160px; border-color:#a7f3d0; background:#fff; }
.mk-appt-arama svg{ width:12px; height:12px; color:#b8c2c9; flex-shrink:0; }
.mk-appt-arama input{ border:0; outline:0; background:transparent; font-size:11.5px; color:#64748b; flex:1; min-width:0; font-family:inherit; }
.mk-appt-arama input::placeholder{ color:#b8c2c9; }
@media (max-width:640px){
  /* Mobilde dar (118px) sabit genişlik yerine, üstteki genel arama kutusuyla aynı
     üst sınıra (320px) kadar genişleyen, satırı dolduran bir kutu — daralmak/gizlenmek
     yerine mevcut alanı kullanır. */
  .mk-panel-head{ flex-wrap:wrap; }
  .mk-panel-head-right{ width:100%; }
  .mk-appt-arama{ flex:1; width:auto; max-width:320px; }
  .mk-appt-arama:focus-within{ width:auto; }
}
.mk-panel-head h2{ color:#1e293b; font-size:13px; font-weight:600; margin:0; }
.mk-gun-ok{ width:22px; height:22px; border-radius:6px; border:1px solid #e2e8f0; background:#fff; color:#64748b; font-size:14px; line-height:1; display:flex; align-items:center; justify-content:center; cursor:pointer; flex-shrink:0; transition:background .15s, border-color .15s; }
.mk-gun-ok:hover{ background:#f0fdf4; border-color:#a7f3d0; color:#087a5b; }
.mk-gun-bugun-btn{ font-size:10.5px; font-weight:700; color:#087a5b; background:#e7f8f2; border:0; border-radius:999px; padding:3px 9px; cursor:pointer; flex-shrink:0; }
.mk-gun-bugun-btn:hover{ background:#d1f5e4; }
.mk-tamamlanmis-check{ display:flex; align-items:center; gap:5px; font-size:11.5px; color:var(--text-secondary); cursor:pointer; font-weight:500; margin-left:4px; }
.mk-tamamlanmis-check input{ width:13px; height:13px; accent-color:#10b981; cursor:pointer; margin:0; }
@media (max-width:760px){ .mk-tamamlanmis-check span{ display:none; } }
.mk-panel-head p{ color:#94a3b8; font-size:11px; margin:2px 0 0; }
.mk-panel-link{ font-size:11px; color:#059669; font-weight:600; text-decoration:none; display:inline-flex; align-items:center; gap:2px; white-space:nowrap; }
.mk-panel-link:hover{ color:#047857; }
.mk-panel-link svg{ width:12px; height:12px; }

.mk-appt-row{ display:flex; align-items:center; gap:12px; padding:12px 16px; border-bottom:1px solid #f8fafc; transition:background .15s; }
.mk-appt-row-gecikmis{ background:#fffbf5; }
.mk-appt-git-uyari{ color:#c2410c !important; font-weight:700 !important; }
.mk-appt-git-uyari:hover{ background:#fff7ed !important; }
.mk-appt-row:last-child{ border-bottom:0; }
.mk-appt-row:hover{ background:#f8fafc99; }
.mk-appt-avatar{ width:32px; height:32px; border-radius:8px; flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; color:#fff; }
.mk-appt-name{ color:#1e293b; font-size:13px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; line-height:1.2; }
.mk-appt-dosyano{ color:#94a3b8; font-size:11px; font-weight:500; }
.mk-appt-meta{ color:#94a3b8; font-size:11px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-top:2px; }
.mk-appt-info{ flex:1; min-width:0; }
.mk-appt-time{ color:#64748b; font-size:11px; font-weight:600; flex-shrink:0; }
.mk-appt-time-inline{ color:#64748b; font-weight:500; font-size:12px; }
.mk-appt-git{ font-size:11.5px; font-weight:600; color:#087a5b; text-decoration:none; white-space:nowrap; flex-shrink:0; padding:5px 10px; border-radius:8px; transition:background .15s; }
.mk-appt-git:hover{ background:#e7f8f2; }
.mk-appt-wa{ display:flex; align-items:center; justify-content:center; width:30px; height:30px; border-radius:8px; flex-shrink:0; transition:background .15s; border:0; background:transparent; cursor:pointer; color:inherit; padding:0; }
.mk-appt-wa:hover{ background:#e7f8f2; }
.mk-appt-actions{ display:flex; align-items:center; gap:12px; flex-shrink:0; }

.wa-sablon-secenek{ display:flex; flex-direction:column; gap:3px; width:100%; text-align:left; padding:10px 12px; border:1px solid var(--border); border-radius:var(--radius-sm); background:#fff; cursor:pointer; margin-bottom:8px; transition:border-color .15s, background .15s; }
.wa-sablon-secenek:hover{ border-color:#25D366; background:#f0fdf4; }
.wa-sablon-secenek strong{ font-size:13px; color:var(--text); }
.wa-sablon-secenek span{ font-size:12px; color:var(--text-secondary); }
.mk-appt-status{ display:inline-flex; align-items:center; gap:5px; font-size:10px; font-weight:600; padding:4px 8px; border-radius:999px; flex-shrink:0; white-space:nowrap; }
.mk-appt-status .dot{ width:6px; height:6px; border-radius:999px; }
.mk-empty{ padding:32px 16px; text-align:center; color:#94a3b8; font-size:13px; }

.mk-quick-panel{ background:#e7f8f2; border-color:#d0eee3 !important; }
.mk-quick-list{ padding:0 11px 14px; display:flex; flex-direction:column; gap:7px; }
.mk-quick-row{ width:100%; display:flex; align-items:center; gap:11px; padding:11px 12px; border-radius:12px; color:#17312b; text-decoration:none; border:1px solid rgba(255,255,255,.8); background:rgba(255,255,255,.88); transition:background .15s, transform .15s, box-shadow .15s; }
.mk-quick-row:hover{ transform:translateY(-1px); box-shadow:0 7px 18px rgba(20,80,60,.10); background:#ecfdf5; border-color:#a7f3d0; }
.mk-quick-row:active{ background:linear-gradient(135deg,#10b981,#059669); color:#fff; border-color:transparent; }
.mk-quick-row:active .mk-quick-txt small{ color:rgba(255,255,255,.75); }
.mk-quick-row:active svg.chev{ color:#fff; }
.mk-quick-icon{ width:33px; height:33px; border-radius:9px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.mk-quick-icon svg{ width:16px; height:16px; }
.mk-quick-txt{ flex:1; min-width:0; }
.mk-quick-txt strong{ display:block; font-size:12.5px; font-weight:700; }
.mk-quick-txt small{ display:block; color:#8a9a95; font-size:10.5px; margin-top:2px; font-weight:400; }
.mk-quick-row svg.chev{ width:14px; height:14px; opacity:.4; flex-shrink:0; color:#17312b; }
/* Eski (koyu tema) hızlı-işlem butonu — artık kullanılmıyor ama başka bir yerde
   referans kalmışsa diye geriye dönük uyumluluk için tanımlı bırakılmıştır. */
.mk-quick-btn{ width:100%; display:flex; align-items:center; gap:10px; padding:10px 14px; border-radius:10px; color:#fff; text-decoration:none; font-size:13px; font-weight:600; border:0; cursor:pointer; }

.mk-summary-wrap{ padding:0 12px 12px; margin-top:auto; }
.mk-summary-box{ border-radius:12px; padding:14px; background:#f0fdf4; border:1px solid #d1fae5; }
.mk-summary-title{ display:flex; align-items:center; gap:6px; margin-bottom:10px; color:#047857; font-size:11px; font-weight:600; }
.mk-summary-title svg{ width:12px; height:12px; }
.mk-summary-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:8px; text-align:center; }
.mk-summary-val{ font-size:16px; font-weight:700; }
.mk-summary-label{ font-size:10px; color:#94a3b8; margin-top:2px; }

@media (max-width:1024px){
  .mk-bottom-grid{ grid-template-columns:1fr; }
}
@media (max-width:900px){
  .mk-desktop-collapse-btn{ display:none; }
  .mk-sidebar.mk-collapsed{ width:232px; }
  .mk-sidebar.mk-collapsed .mk-brand-name, .mk-sidebar.mk-collapsed .mk-brand-sub, .mk-sidebar.mk-collapsed .mk-nav-txt,
  .mk-sidebar.mk-collapsed .mk-nav-badge, .mk-sidebar.mk-collapsed .mk-nav-label, .mk-sidebar.mk-collapsed .mk-profile-info,
  .mk-sidebar.mk-collapsed .mk-wave-label{ display:revert; }
  .mk-sidebar{ position:fixed; top:0; left:0; height:100%; z-index:40; transform:translateX(-100%); transition:transform .3s ease; }
  .mk-sidebar.mk-open{ transform:translateX(0); }
  .mk-sidebar-close{ display:block; }
  .mk-menu-btn{ display:flex; }
  .mk-sidebar-overlay.mk-open{ display:block; }
  .mk-search{ max-width:none; }
  .mk-kpi-grid{ grid-template-columns:repeat(2,1fr); }
}
@media (max-width:640px){
  .mk-hero-row{ flex-direction:column; }
  .mk-appt-time{ display:none; }
  /* Randevu satırı 3 görsel satıra iner: 1) avatar + danışan adı/saat (yan yana),
     doktor/seans tipi satırı hemen altında aynı blokta; 2) doktor + seans tipi zaten
     info içinde ayrı satır olarak akıyor; 3) durum rozeti + Randevuya Git + WhatsApp
     tek satırda birlikte, altta. */
  .mk-appt-row{ flex-wrap:wrap; align-items:flex-start; row-gap:8px; padding:14px; }
  .mk-appt-avatar{ order:1; }
  .mk-appt-info{ order:2; flex:1; min-width:0; }
  .mk-appt-name, .mk-appt-meta{ white-space:normal; overflow:visible; text-overflow:clip; }
  .mk-appt-actions{ order:3; flex-basis:100%; width:100%; justify-content:space-between; }
  .mk-appt-status{ margin-left:0; }
  .mk-appt-git{ display:inline-flex; align-items:center; justify-content:center; flex:1; text-align:center; background:#f0fdfa; }
  .mk-appt-wa{ background:#f0fdfa; }
}
@media (max-width:900px){
  /* Dekoratif EKG çizgisi mobilde arama kutusu/simgelerle çakışıyordu — eski
     pulse-divider'da olduğu gibi dar ekranlarda tamamen gizliyoruz. */
  .mk-ekg-canvas{ display:none; }
}

/* ---------- Eski global "Premium V4" katmanının (üstteki, class ile
   sınırlanmamış .page/button/input kuralları) yeni kabukla çakışmasını
   önleyen düzeltmeler. Bu blok dosyanın en sonunda olduğu için ve daha
   yüksek özgüllük kullandığı için üsttekileri geçersiz kılar. ---------- */
.mk-page > .page{ max-width:1600px!important; margin-left:auto!important; margin-right:auto!important; padding:16px 28px 48px!important; min-height:0!important; }
@media (max-width:640px){
  .mk-page > .page{ padding:18px 14px 40px; }
}
.mk-search input{ border-radius:8px!important; border:0!important; background:transparent!important; min-height:0!important; height:auto!important; }
.mk-menu-btn, .mk-icon-btn, .mk-profile-logout, .mk-sidebar-close{ border-radius:8px!important; font-weight:500!important; min-height:0!important; }
.mk-quick-btn{ border-radius:10px!important; font-weight:600!important; min-height:0!important; }
.mk-nav-item{ border-radius:8px!important; font-weight:500!important; }
.dp-patient-header{
  background:var(--surface);border:1px solid var(--border);border-radius:18px;box-shadow:0 8px 26px rgba(11,37,48,.05);
  padding:20px 22px 18px;margin-bottom:12px;
}
.dp-patient-top{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;}
.dp-patient-identity{display:flex;align-items:center;gap:16px;min-width:0;}
.dp-avatar{
  width:62px;height:62px;border-radius:17px;background:var(--primary-light);border:1px solid var(--primary-light);
  color:var(--primary-dark);display:grid;place-items:center;font-size:20px;font-weight:800;flex-shrink:0;
}
.dp-name-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.dp-name-row h2{font-size:24px;letter-spacing:-.02em;color:var(--text);font-weight:700;font-family:'Plus Jakarta Sans','Inter',sans-serif;}
.dp-meta-chip{padding:5px 9px;border-radius:999px;background:var(--bg);color:var(--text-secondary);font-size:12px;font-weight:650;}
.dp-status-chip{display:inline-flex;align-items:center;gap:6px;padding:4px 9px;border-radius:999px;border:1px solid var(--border);background:var(--bg);color:var(--text-secondary);font-size:11px;font-weight:700;}
.dp-status-chip.success{color:var(--primary-dark);border-color:var(--primary-light);background:var(--primary-light);}
.dp-status-chip.danger{color:var(--danger);border-color:var(--danger-bg);background:var(--danger-bg);}
.dp-status-chip i,.dp-doctor-line i{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--primary);}
.dp-doctor-line{margin-top:5px;color:var(--text-secondary);font-size:14px;display:flex;align-items:center;gap:7px;}
.dp-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;}
.dp-action-btn{
  display:inline-flex;align-items:center;gap:7px;min-height:38px;padding:0 13px;border:1px solid var(--border);border-radius:10px;
  background:var(--surface);color:var(--text-secondary);font-size:12px;font-weight:700;cursor:pointer;transition:.16s;
}
.dp-action-btn:hover{background:var(--bg);border-color:var(--primary-light);}
.dp-action-btn.whatsapp{border-color:var(--primary-light);background:var(--primary-light);color:var(--primary-dark);}
.dp-patient-summary{
  margin-top:18px;padding-top:16px;border-top:1px solid var(--border);display:grid;grid-template-columns:repeat(5,minmax(0,1fr)) 2.2fr;
  gap:16px;align-items:center;
}
.dp-info-item span{display:block;color:var(--text-secondary);font-size:10px;font-weight:800;letter-spacing:.06em;margin-bottom:4px;}
.dp-info-item strong{display:block;color:var(--text);font-size:14px;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.dp-balance.danger{color:var(--danger)!important}.dp-balance.success{color:var(--success)!important}.dp-balance.neutral{color:var(--text-secondary)!important}
.dp-attendance{border-left:1px solid var(--border);padding-left:18px;display:flex;align-items:center;gap:12px;min-width:0;}
.dp-attendance-number{display:flex;flex-direction:column;align-items:center;min-width:46px;}
.dp-attendance-number strong{font-size:30px;line-height:1;color:var(--text);letter-spacing:-.05em;}
.dp-attendance-number span,.dp-rate span{font-size:10px;color:var(--text-secondary);margin-top:3px;}
.dp-bars{flex:1;min-width:125px;display:grid;gap:5px;}
.dp-bars>div{display:grid;grid-template-columns:48px 1fr 18px;gap:7px;align-items:center;font-size:10px;color:var(--text-secondary);}
.dp-bars b{display:block;height:6px;border-radius:999px;background:var(--border);overflow:hidden;}
.dp-bars b i{display:block;height:100%;border-radius:999px;background:var(--primary);}
.dp-bars b.muted i{background:var(--border)}.dp-bars b.red i{background:var(--danger)}
.dp-bars strong{font-size:10px;color:var(--text-secondary);text-align:right;}
.dp-rate{display:flex;flex-direction:column;align-items:flex-end;padding-left:4px;}
.dp-rate strong{font-size:26px;line-height:1;color:var(--primary-dark);letter-spacing:-.04em;}
.dp-tabs{
  display:flex;align-items:center;gap:4px;padding:0 8px;border-bottom:1px solid var(--border);margin-bottom:14px;
}
.dp-tabs button{
  min-height:48px;padding:0 18px;border:0;background:transparent;color:var(--text-secondary);font-weight:650;font-size:13px;position:relative;cursor:pointer;
}
.dp-tabs button:hover{color:var(--primary-dark)}.dp-tabs button.active{color:var(--primary-dark);font-weight:700;}
.dp-tabs button.active:after{content:"";position:absolute;left:10px;right:10px;bottom:-1px;height:3px;border-radius:3px 3px 0 0;background:var(--primary);}
.dp-tab-panel{min-height:360px;}
.dp-toolbar,.dp-filterbar,.dp-contract-head{
  display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:12px;
}
.dp-month-title{display:flex;align-items:center;gap:6px;}
.dp-month-title h3{font-size:16px;color:var(--text);min-width:130px;text-align:center;}
.dp-month-title button{
  width:32px;height:32px;border:1px solid var(--border);background:var(--surface);border-radius:9px;color:var(--text-secondary);cursor:pointer;
}
.dp-toolbar-right{display:flex;align-items:center;gap:8px;}
.dp-toolbar .view-tabs{margin:0;}
.dp-calendar-layout{display:grid;grid-template-columns:minmax(0,1fr) 250px;gap:14px;min-height:520px;}
.dp-calendar-card{padding:14px;min-height:520px;background:var(--surface);}
.dp-calendar-card #calendarGrid{height:100%;}
/* Haftalık görünüm (tek satır, 7 gün) aylık ızgara gibi 520px'lik bir alana ihtiyaç
   duymuyor — bu min-height/height:100% kombinasyonu, gün hücrelerinin (varsayılan grid
   align-items:stretch nedeniyle) gereksiz yere upcoming panel kadar uzamasına yol açıyordu. */
.dp-calendar-layout:has(.week-grid){ min-height:0; align-items:start; }
.dp-calendar-card:has(.week-grid){ min-height:0; }
.dp-calendar-card #calendarGrid.week-grid{ height:auto; align-items:start; }
.dp-upcoming{background:var(--surface);border:1px solid var(--border);border-radius:18px;box-shadow:0 8px 24px rgba(11,37,48,.045);padding:16px;min-height:100%;}
.dp-panel-title{font-size:11px;font-weight:800;color:var(--text-secondary);letter-spacing:.11em;margin-bottom:12px;}
.dp-upcoming-list{display:grid;gap:8px;}
.dp-upcoming-item{
  display:flex;gap:9px;padding:11px 10px;border-radius:12px;background:var(--bg);border:1px solid transparent;
  color:inherit;transition:.16s;
}
.dp-upcoming-item:hover{background:var(--primary-light);border-color:var(--primary-light);}
.dp-upcoming-item>i{width:4px;border-radius:999px;background:var(--primary);flex-shrink:0;}
.dp-upcoming-item strong{display:block;font-size:12px;color:var(--text)}.dp-upcoming-item span{display:block;font-size:10px;color:var(--text-secondary);margin-top:2px}.dp-upcoming-item small{display:block;font-size:10px;color:var(--text-secondary);margin-top:3px;}
.dp-empty-mini{padding:20px 8px;text-align:center;color:var(--text-secondary);font-size:12px;}
.dp-filterbar{align-items:center;}
.dp-filterchips{display:flex;gap:2px;padding:4px;background:var(--surface);border:1px solid var(--border);border-radius:12px;box-shadow:0 4px 14px rgba(11,37,48,.04);}
.dp-filterchips button{border:0;background:transparent;color:var(--text-secondary);padding:7px 12px;border-radius:8px;font-size:11px;font-weight:650;cursor:pointer;}
.dp-filterchips button.active{background:var(--primary);color:var(--surface);box-shadow:0 4px 11px rgba(16,185,129,.18);}
.dp-history-tools{display:flex;align-items:center;gap:10px}.filter-group.compact{display:flex;align-items:center;gap:7px;margin:0}.filter-group.compact label{font-size:10px;margin:0;color:var(--text-secondary)}.filter-group.compact select{min-height:34px;width:160px;}
.dp-record-count{font-size:11px;color:var(--text-secondary);font-weight:650;}
.dp-table-card{overflow:hidden;background:var(--surface);border-radius:16px;}
.dp-table-scroll{overflow:auto;max-height:500px;}
/* .data-table'ın genel mobil kuralı (display:block) bu wrapper'ın kendi overflow:auto'suyla
   iç içe çakışıp bazı sütunları (örn. Makbuz butonu) görünmez/kesik bırakıyordu — burada
   normal table düzenini koruyup TEK kaydırma mekanizması olarak wrapper'ı kullanıyoruz. */
.dp-table-scroll .data-table{ display:table; min-width:560px; }
.dp-data-table thead th{padding:12px 15px;font-size:10px;letter-spacing:.08em;color:var(--text-secondary);background:var(--bg);}
.dp-data-table tbody td{padding:14px 15px;font-size:12px;color:var(--text-secondary);vertical-align:middle;}
.dp-data-table tbody tr:hover{background:var(--bg);}
.dp-data-table .name-cell strong{display:block;color:var(--text)}.dp-time{display:block;color:var(--text-secondary);font-size:11px;margin-top:2px;font-weight:500;}
.dp-table-note{display:block;max-width:240px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--text-secondary);}
.dp-muted{color:var(--text-secondary);}
.dp-notes-layout{display:grid;grid-template-columns:minmax(0,1fr) 250px;gap:14px;align-items:start;}
.dp-notes-list{display:grid;gap:10px;min-height:300px;}
.dp-note-card{background:var(--surface);border:1px solid var(--border);border-radius:16px;box-shadow:0 6px 20px rgba(11,37,48,.04);padding:17px 18px;}
.dp-note-card.compact{padding:14px 18px;background:var(--bg);}
.dp-note-top{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;}
.dp-note-author{display:flex;align-items:center;gap:10px;}
.dp-note-avatar{width:34px;height:34px;border-radius:50%;background:var(--primary-light);color:var(--primary-dark);display:grid;place-items:center;font-size:11px;font-weight:800;}
.dp-note-avatar.admin{background:var(--border);color:var(--text-secondary);}
.dp-note-author strong{display:block;font-size:12px;color:var(--text)}.dp-note-author small{display:block;color:var(--text-secondary);font-size:10px;margin-top:2px;}
.dp-note-actions{display:flex;gap:7px;align-items:center;}
.dp-note-tag{padding:5px 8px;border-radius:999px;font-size:10px;font-weight:700;background:var(--primary-light);color:var(--primary-dark);border:1px solid var(--primary-light);}
.dp-note-tag.info{background:var(--bg);color:var(--info);border-color:var(--primary-light)}.dp-note-tag.neutral{background:var(--bg);color:var(--text-secondary);border-color:var(--border);}
.dp-note-card p{margin:12px 0 0;font-size:13px;line-height:1.65;color:var(--text-secondary);}
.dp-new-note{background:var(--surface);border:1px solid var(--border);border-radius:16px;box-shadow:0 8px 22px rgba(11,37,48,.045);padding:16px;position:sticky;top:84px;}
.dp-new-note textarea{width:100%;min-height:140px;resize:vertical;border:1px solid var(--border);border-radius:11px;padding:10px;font-size:12px;margin-bottom:8px;}
.dp-new-note select{width:100%;min-height:36px;font-size:11px;margin-bottom:8px;}
.dp-new-note .btn{width:100%;justify-content:center;}
.dp-note-help{font-size:9px;line-height:1.45;color:var(--text-secondary);margin:9px 0 0;}
.dp-finance-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:12px;}
.dp-finance-summary-6 .dp-finance-card strong{ font-size:22px; }
@media(max-width:900px){ .dp-finance-summary-6{ grid-template-columns:repeat(2,1fr); } }
@media(max-width:560px){ .dp-finance-summary-6{ grid-template-columns:1fr; } }
.dp-finance-card{background:var(--surface);border:1px solid var(--border);border-radius:16px;box-shadow:0 6px 20px rgba(11,37,48,.04);padding:18px;}
.dp-finance-card span{display:block;font-size:10px;letter-spacing:.08em;font-weight:800;color:var(--text-secondary);}
.dp-finance-card strong{display:block;font-size:29px;letter-spacing:-.045em;color:var(--text);margin-top:9px;}
.dp-finance-card strong.danger{color:var(--danger)}.dp-finance-card strong.success{color:var(--primary-dark)}.dp-finance-card strong.neutral{color:var(--text-secondary)}
.dp-finance-card small{display:block;color:var(--text-secondary);font-size:10px;margin-top:4px;}
.dp-finance-note{font-size:12px;color:var(--text-secondary);margin:2px 3px 12px;}
.dp-finance-head{display:flex;align-items:center;justify-content:flex-start;gap:20px;margin-bottom:12px;flex-wrap:wrap;}
.dp-finance-head .section-tabs{margin:0;}.dp-finance-actions{display:flex;gap:8px;flex-wrap:wrap;}
.dp-finance-actions button{ transition:transform .12s ease, box-shadow .12s ease, background .12s ease, filter .12s ease; }
.dp-finance-actions button:hover{ transform:translateY(-1px); filter:brightness(1.04); }
.dp-finance-actions button:active{ transform:translateY(0); filter:brightness(.97); }
.dp-finance-actions .btn-ghost:hover{ background:var(--primary-light); color:var(--primary-dark); border-color:#a7f3d0; }
.dp-finance-actions #odemeAlBtn{ background:var(--primary) !important; box-shadow:0 6px 16px rgba(16,185,129,.3) !important; font-weight:700; color:#fff !important; }
.dp-finance-actions #odemeAlBtn:hover{ background:var(--primary-dark) !important; box-shadow:0 8px 20px rgba(16,185,129,.4) !important; }

/* Borç/tahsil edilecek tutar kartları, tutar sıfırdan büyükse (dikkat gerektiriyorsa)
   sadece metin rengiyle değil, kart zeminiyle de dikkat çeker. */
.dp-finance-card.attention{ background:var(--danger-bg); border-color:#fecaca; }
.dp-finance-card.attention strong{ color:var(--danger); }
.dp-contract-head h3{font-size:16px;color:var(--text)}.dp-contract-head p{font-size:11px;color:var(--text-secondary);margin:3px 0 0;}
@media(max-width:1100px){
  .dp-patient-summary{grid-template-columns:repeat(3,1fr);}
  .dp-attendance{grid-column:1/-1;border-left:0;border-top:1px solid var(--border);padding:12px 0 0;}
}
@media(max-width:900px){
  .dp-patient-top{flex-direction:column}.dp-actions{justify-content:flex-start;}
  .dp-calendar-layout,.dp-notes-layout{grid-template-columns:1fr;}
  .dp-upcoming,.dp-new-note{position:static;}
  .dp-finance-summary{grid-template-columns:1fr;}
  /* Notlar boşken (yeni danışan vb.) sabit 300px min-height, "YENİ NOT" kutusundan
     önce büyük ve anlamsız bir boşluk bırakıyordu — mobilde kaldırıyoruz. */
  .dp-notes-list{ min-height:0; }
}
@media(max-width:600px){
  .dp-patient-header{padding:15px}.dp-name-row h2{font-size:20px}.dp-patient-summary{grid-template-columns:1fr 1fr;gap:12px;}
  .dp-attendance{grid-column:1/-1}.dp-toolbar,.dp-filterbar,.dp-contract-head{align-items:flex-start;flex-direction:column}
  .dp-toolbar-right,.dp-history-tools{width:100%;flex-wrap:wrap;}
  .dp-filterchips{width:100%;overflow:auto;}.dp-filterchips button{white-space:nowrap;}
  .dp-tabs{overflow:auto}.dp-tabs button{white-space:nowrap;padding:0 13px;}
  .dp-finance-head{align-items:flex-start;flex-direction:column;}
}
