/* ===================================================================
   SEZAR PT COACH  |  Ortak stil dosyasi
   Tasarim kanvasindaki (.dc.html) renk, tipografi ve bilesen
   degerlerinden cikarilmistir.
   =================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

:root,
[data-theme="dark"] {
  --bg: #0B0B0D;
  --bg2: #121317;
  --card: #181A20;
  --line: #2B2E37;
  --ink: #F3F2EE;
  --ink2: #A7AAB3;
  --gold: #E3BE5C;
  --gold2: #C29A32;
  --danger: #E06B5A;
  --success: #6FBF73;
  --warning: #E3BE5C;
  --shadow: 0 18px 50px rgba(0, 0, 0, .55);
}

[data-theme="light"] {
  --bg: #F6F5F2;
  --bg2: #EDEAE4;
  --card: #FFFFFF;
  --line: #DDD8CE;
  --ink: #15161A;
  --ink2: #5B5E67;
  --gold: #96711A;
  --gold2: #7C5D10;
  --danger: #C4442F;
  --success: #2F7A36;
  --warning: #8A6A12;
  --shadow: 0 14px 38px rgba(20, 18, 10, .12);
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Barlow', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;

  /* Bosluk icermeyen uzun metinler (e-posta, URL, uzun bir hedef yazisi)
     kutularina sigmadiginda satir kirilmaz ve sayfayi yana uzatirlar.
     break-word yalnizca SIGMADIGINDA kirer; normal metni etkilemez. */
  overflow-wrap: break-word;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold2); }

input, select, textarea, button { font-family: 'Barlow', system-ui, sans-serif; }
input::placeholder, textarea::placeholder { color: var(--ink2); opacity: .8; }
::selection { background: var(--gold); color: #111; }

[hidden] { display: none !important; }

/* --- tipografi ------------------------------------------------- */

.display,
h1.display,
h2.display {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  line-height: .98;
  margin: 0;
}

h1.display { font-size: clamp(34px, 6vw, 64px); }
h2.display { font-size: clamp(26px, 4vw, 34px); line-height: 1.05; }
h3.display { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; text-transform: uppercase; font-size: 20px; margin: 0; }

.kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: .26em;
  color: var(--gold);
  text-transform: uppercase;
}

.mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink2);
}

.muted { color: var(--ink2); }
.lead { color: var(--ink2); font-size: 16.5px; line-height: 1.7; }
.small { font-size: 13px; color: var(--ink2); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-gold { color: var(--gold); }

/* --- iskelet ---------------------------------------------------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.site-header__inner,
.page,
.site-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.site-header__inner {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: nowrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-right: auto;
  color: var(--ink);
  min-width: 0;
}
.brand:hover { color: var(--ink); }

.brand__logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid var(--gold);
  flex: none;
}
.brand__logo img { width: 210%; height: 210%; object-fit: cover; margin: -55% 0 0 -55%; }

.brand__name {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 21px;
  letter-spacing: .12em;
  text-transform: uppercase;
  line-height: 1;
}
.brand__sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  letter-spacing: .22em;
  color: var(--gold);
  text-transform: uppercase;
  line-height: 1.4;
}

.header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; flex: none; }

/* public sayfadaki ana menu */
.site-nav { display: flex; align-items: center; gap: 22px; font-size: 14px; }
.site-nav a { color: var(--ink); opacity: .85; white-space: nowrap; }
.site-nav a:hover { color: var(--gold); opacity: 1; }

/* mobil menu butonu - yalnizca dar ekranda gorunur */
.nav-toggle { display: none; }

.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--gold);
  color: #17150E;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  flex: none;
}

.who { line-height: 1.2; text-align: right; }
.who__role { font-family: 'JetBrains Mono', monospace; font-size: 9.5px; letter-spacing: .18em; color: var(--gold); text-transform: uppercase; }
.who__name { font-size: 13.5px; font-weight: 600; }

.page { padding: 34px 20px 72px; flex: 1; }

.site-footer { border-top: 1px solid var(--line); background: var(--bg2); }
.site-footer__inner {
  padding: 26px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
}
.site-footer__brand {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: 14px;
}

/* Sitenin ne oldugunu duz metin olarak anlatan satir. Ziyaretci icin
   kisa bir tanim, tarayici disi siniflandiricilar (kurumsal guvenlik
   duvarlari) icin de sayfanin JavaScript'siz okunabilen tek icerigi. */
.site-footer__about {
  flex: 1 1 320px;
  max-width: 62ch;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink2);
}

/* --- panel menusu ---------------------------------------------- */

.panel-nav { border-bottom: 1px solid var(--line); background: var(--bg2); }
.panel-nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
}
.panel-nav a {
  padding: 13px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink2);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.panel-nav a:hover { color: var(--ink); }
.panel-nav a.is-active { color: var(--gold); border-bottom-color: var(--gold); }

/* --- butonlar --------------------------------------------------- */

.btn {
  height: 44px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color .15s, background .15s, color .15s;
}
.btn:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn--primary {
  background: var(--gold);
  border-color: var(--gold);
  color: #17150E;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.btn--primary:hover:not(:disabled) { background: var(--gold2); border-color: var(--gold2); color: #17150E; }

.btn--block { width: 100%; }
.btn--lg { height: 50px; font-size: 14px; }
.btn--sm { height: 36px; padding: 0 12px; font-size: 13px; }
.btn--danger:hover:not(:disabled) { border-color: var(--danger); color: var(--danger); }

.btn--icon {
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: 14px;
}

.btn--ghost { border: none; background: none; color: var(--gold); text-decoration: underline; height: auto; padding: 4px 0; }
.btn--ghost:hover { color: var(--gold2); border: none; }

.btn--link { border: none; background: none; color: var(--ink2); height: auto; padding: 4px 0; font-weight: 500; }
.btn--link:hover { border: none; color: var(--ink); }

.icon-btn {
  width: 26px; height: 26px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink2);
  border-radius: 7px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  flex: none;
}
.icon-btn:hover { border-color: var(--danger); color: var(--danger); }

/* --- formlar ---------------------------------------------------- */

.field { display: grid; gap: 6px; }
.field > span,
.field > label {
  font-size: 12.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink2);
}
.field__hint { font-size: 12px; color: var(--ink2); text-transform: none; letter-spacing: 0; }

.input, .select, .textarea {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font-size: 16px;
}
.textarea { height: auto; padding: 12px 14px; min-height: 84px; resize: vertical; font-size: 15px; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--gold); outline: none; }
.input--sm { height: 40px; font-size: 14px; }

.form-grid { display: grid; gap: 14px; }
.form-grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }

.required::after { content: ' *'; color: var(--gold); }

/* Onay kutusu satiri: uzun riza metinleri kutunun hizasinda kalsin. */
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink);
}
.check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex: 0 0 auto;
  accent-color: var(--gold);
  cursor: pointer;
}
.check a { text-decoration: underline; }

/* Tiklanabilir yildiz puanlama (ogrenci degerlendirme formu) */
.stars { display: flex; gap: 4px; }
.stars .star {
  background: none;
  border: 0;
  padding: 0 2px;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink2);
  transition: color .12s ease, transform .12s ease;
}
.stars .star.is-on { color: var(--gold); }
.stars .star:hover { transform: scale(1.12); }
.stars .star:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

/* --- arama kutusu (combobox) ------------------------------------ */

.combo { position: relative; display: block; }

.combo__menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 30;
  max-height: 260px;
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--gold);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 4px;
}

.combo__item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  font-size: 14px;
}
.combo__item:hover,
.combo__item.is-active { background: var(--bg2); }

.combo__label { flex: 1; min-width: 0; }
.combo__meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: var(--ink2);
  white-space: nowrap;
}

.combo__empty { padding: 12px 10px; font-size: 12.5px; color: var(--ink2); line-height: 1.5; }

/* --- kartlar ---------------------------------------------------- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
}
.card--pad-lg { padding: 32px 28px; border-radius: 18px; box-shadow: var(--shadow); }
.card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.card__title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 19px;
  letter-spacing: .04em;
  margin: 0;
  margin-right: auto;
}

.stack { display: grid; gap: 16px; }
.stack--sm { gap: 10px; }
.stack--lg { gap: 26px; }

/* --- KPI kartlari ----------------------------------------------- */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  gap: 12px;
}
.kpi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
}
.kpi__label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink2);
  margin-bottom: 6px;
}
.kpi__value {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 28px;
  line-height: 1;
}
.kpi__unit { font-size: 14px; color: var(--ink2); margin-left: 3px; }

/* Ilgili yonetim ekranina giden KPI karti (orn. "Yeni mesaj" -> Gelen Mesajlar) */
a.kpi--link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: border-color .15s ease, transform .15s ease;
}
/* Ok isareti etiketin yanina gelir: deger satirini asagi itmez. */
a.kpi--link .kpi__label::after {
  content: ' →';
  color: var(--gold);
  letter-spacing: 0;
}
a.kpi--link:hover { border-color: var(--gold); transform: translateY(-1px); }
a.kpi--link:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* --- listeler / satirlar ---------------------------------------- */

.row-list { display: grid; gap: 8px; }

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.row__no {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: var(--ink2);
  flex: none;
}
.row__main { flex: 1; min-width: 0; }
.row__name { font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; }
.row__meta { font-size: 12.5px; color: var(--ink2); }
.row__load {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--gold);
  white-space: nowrap;
}

/* ogrenci listesi */
.student-list { display: grid; gap: 6px; max-height: 420px; overflow-y: auto; padding-right: 4px; }
.student-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 13px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.student-item:hover { border-color: var(--gold); }
.student-item.is-active { border-color: var(--gold); background: var(--bg2); }
.student-item__dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.student-item__dot--active { background: var(--success); }
.student-item__dot--pending { background: var(--warning); }
.student-item__dot--passive { background: var(--ink2); }

/* --- sekmeler --------------------------------------------------- */

.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 18px;
}
.tab {
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink2);
  border-radius: 9px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
}
.tab:hover { color: var(--ink); border-color: var(--gold); }
.tab.is-active { background: var(--gold); border-color: var(--gold); color: #17150E; }

.day-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.day-tab {
  width: 44px; height: 38px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink2);
  border-radius: 9px;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  font-weight: 500;
}
.day-tab:hover { border-color: var(--gold); color: var(--gold); }
.day-tab.is-active { background: var(--gold); border-color: var(--gold); color: #17150E; }
.day-tab.has-items:not(.is-active) { border-color: var(--gold2); color: var(--ink); }

/* Secili gunu baska bir gune kopyalama satiri */
.copy-day {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding: 10px 12px;
  margin-bottom: 16px;
  background: var(--card2, var(--card));
  border: 1px dashed var(--line);
  border-radius: 10px;
}
.copy-day__label { font-size: 13px; color: var(--ink2); }
.copy-day__label strong { color: var(--gold); }

/* Antrenorun gune yazdigi not (ogrenci panelinde gorunur) */
.day-note {
  display: grid;
  gap: 4px;
  margin: 12px 0;
  padding: 11px 13px;
  border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0;
  /* color-mix desteklemeyen eski tarayicilar icin duz zemin */
  background: var(--card);
  background: color-mix(in srgb, var(--gold) 8%, transparent);
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
}
.day-note__label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
}

/* Ogrenci panelindeki once/sonra yayin izni kartlari */
.consent-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.consent-photo { position: relative; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.consent-photo img { display: block; width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.consent-photo__empty {
  display: grid;
  place-items: center;
  aspect-ratio: 3/4;
  padding: 10px;
  text-align: center;
  font-size: 12.5px;
  color: var(--ink2);
  background: var(--card);
}
.consent-photo__label {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #17150E;
  background: var(--gold);
}

/* --- etiketler -------------------------------------------------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink2);
  white-space: nowrap;
}
.pill--gold { border-color: var(--gold); color: var(--gold); }
.pill--success { border-color: var(--success); color: var(--success); }
.pill--danger { border-color: var(--danger); color: var(--danger); }
.pill--warning { border-color: var(--warning); color: var(--warning); }

/* --- bildirimler ------------------------------------------------ */

.alert {
  padding: 13px 16px;
  border: 1px solid var(--line);
  background: var(--bg2);
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.6;
}
.alert--error { border-color: var(--danger); color: var(--danger); }
.alert--success { border-color: var(--success); }
.alert--info { border-color: var(--gold); }

.empty {
  padding: 22px 16px;
  text-align: center;
  color: var(--ink2);
  font-size: 13.5px;
  border: 1px dashed var(--line);
  border-radius: 10px;
}

.toast-host {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  display: grid;
  gap: 10px;
  max-width: 360px;
}
.toast {
  padding: 13px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 10px;
  box-shadow: var(--shadow);
  font-size: 13.5px;
  line-height: 1.5;
  animation: toast-in .2s ease-out;
}
.toast--error { border-left-color: var(--danger); }
.toast--success { border-left-color: var(--success); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* --- yukleniyor ------------------------------------------------- */

.loading { padding: 30px; text-align: center; color: var(--ink2); font-size: 13.5px; }

.spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--line);
  border-top-color: var(--gold);
  border-radius: 50%;
  display: inline-block;
  animation: spin .7s linear infinite;
  vertical-align: -3px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- kilo grafigi ----------------------------------------------- */

.chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 150px;
  padding-top: 20px;
}
.chart__col { flex: 1; display: grid; gap: 6px; justify-items: center; align-content: end; height: 100%; }
.chart__val { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; color: var(--ink2); }
.chart__bar { width: 100%; max-width: 34px; background: var(--gold); border-radius: 5px 5px 0 0; min-height: 4px; }
.chart__label { font-family: 'JetBrains Mono', monospace; font-size: 9.5px; color: var(--ink2); }

/* --- su bardaklari ---------------------------------------------- */

.glasses { display: flex; gap: 7px; flex-wrap: wrap; }
.glass {
  width: 26px; height: 34px;
  border: 1.5px solid var(--line);
  border-radius: 4px 4px 8px 8px;
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.glass.is-full { background: var(--gold); border-color: var(--gold); }
.glass:hover { border-color: var(--gold); }

/* --- once / sonra ----------------------------------------------- */

.ba-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ba-slot { display: grid; gap: 6px; }
.ba-slot__frame {
  aspect-ratio: 3 / 4;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  place-items: center;
  position: relative;
}
.ba-slot__frame img { width: 100%; height: 100%; object-fit: cover; }
.ba-slot__placeholder { color: var(--ink2); font-size: 12px; text-align: center; padding: 12px; }
.ba-slot__label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink2);
  text-align: center;
}
.ba-slot__upload { position: absolute; inset: auto 6px 6px auto; }

/* --- yardimci --------------------------------------------------- */

/* minmax(min(X, 100%), 1fr): dar ekranda X sabit bir TABAN olur ve kap
   X'ten darsa hucre disari tasar. min(X, 100%) bunu engeller -- kap
   daraldikca taban da kucululur, sutun tek basina kalir ve tasma olmaz. */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; }

/* minmax(0, 1fr): "1fr" tek basina minimumu "auto" birakir, yani sutun icerigin
   min-content genisliginden asagi INMEZ ve genis bir icerik (tablo, uzun
   adres, kaydirilabilir serit) tum duzeni yana iter. */
.split { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }

/* Izgara ve esnek kutu cocuklari ontanimli olarak "min-width: auto" tasir:
   icerikleri kabi darsa KUCULMEZLER, kabi kendi genisliklerine iterler.
   Mobilde sayfanin yana kaymasinin en yaygin sebebi budur. */
.grid-2 > *, .grid-3 > *, .split > *, .kpi-grid > *,
.form-grid > *, .stack > *, .row-list > *, .row > * { min-width: 0; }

@media (max-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr); }
}

/* ===================================================================
   MOBIL
   Baslik cubugu dar ekranda tek satirda kalmali; ana menu acilir
   panele donusur. Aksi halde giris butonu ekrandan tasiyor.
   =================================================================== */

/* Cok dar ekranda uzun etiketli butonlar ("Antrenmanı Tamamlandı İşaretle")
   kutularina sigmiyor ve metin kirpiliyordu. Bu genislikte metin ikinci
   satira insin; yukseklik sabit degil, taban deger olur.
   Ikon butonlari kare kalmali, onlar disarida tutulur. */
@media (max-width: 400px) {
  .btn:not(.btn--icon) {
    white-space: normal;
    height: auto;
    min-height: 44px;
    padding-top: 8px;
    padding-bottom: 8px;
    line-height: 1.3;
    text-align: center;
  }
  .btn--sm:not(.btn--icon) { min-height: 36px; }
  .btn--lg:not(.btn--icon) { min-height: 50px; }
}

@media (max-width: 860px) {
  .site-header__inner { padding: 10px 14px; gap: 10px; }

  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 4px 16px 12px;
    background: var(--bg2);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open { display: flex; }

  .site-nav a {
    padding: 14px 2px;
    font-size: 15.5px;
    border-bottom: 1px solid var(--line);
  }
  .site-nav a:last-child { border-bottom: 0; }
}

@media (max-width: 720px) {
  /* Panel basliginda ad/rol metni yerine yalnizca avatar kalir. */
  .who { display: none; }

  .header-actions { gap: 6px; }

  .page { padding: 24px 14px 56px; }
  .card { padding: 16px; }
  .card--pad-lg { padding: 24px 20px; }
}

@media (max-width: 460px) {
  .brand__logo { width: 34px; height: 34px; }
  .brand__name { font-size: 18px; }
  .brand__sub { font-size: 8.5px; letter-spacing: .18em; }

  .btn { padding: 0 13px; }
  .btn--sm { padding: 0 10px; }

  /* Form satirlari dar ekranda alt alta gecsin. */
  .form-row > .field { width: 100% !important; flex: 1 1 100% !important; }
  .form-row > .btn { width: 100%; }

  .kpi-grid { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
  .ba-grid { gap: 8px; }
}

.flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.flex--between { justify-content: space-between; }
.ml-auto { margin-left: auto; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.scroll-x { overflow-x: auto; }

.divider { height: 1px; background: var(--line); border: 0; margin: 20px 0; }

/* ===================================================================
   OLCUM GRAFIGI (assets/js/measurements.js)

   Seri renkleri 8 yuvalik kategorik paletten, SABIT sirayla gelir ve
   sitenin gercek kart yuzeylerinde renk korlugu kontrolunden gecmistir:
     koyu  (#181A20): tum kontroller gecti (CVD dE 8.4, normal 19.3, >=3:1)
     acik  (#FFFFFF): CVD dE 9.1, normal 19.6 gecti; aqua/sari/pembe 3:1
                      altinda -> tablo gorunumu zorunlu (mevcut).
   Renkler yalnizca cizgi ve noktalarda; metinler her zaman metin rengindedir.
   =================================================================== */

:root,
[data-theme="dark"] {
  --mc-1: #3987e5;  /* Kilo      */
  --mc-2: #d95926;  /* Yag orani */
  --mc-3: #199e70;  /* Kas       */
  --mc-4: #c98500;  /* Bel       */
  --mc-5: #d55181;  /* Gogus     */
  --mc-6: #008300;  /* Kalca     */
  --mc-7: #9085e9;  /* Kol       */
  --mc-8: #e66767;  /* Bacak     */
  --mc-grid: #262932;
  --mc-base: #4A4E5A;
  --by-student: #2EC4B6;   /* ogrencinin girdigi olcum: turkuaz "*" */
}

[data-theme="light"] {
  --mc-1: #2a78d6;
  --mc-2: #eb6834;
  --mc-3: #1baf7a;
  --mc-4: #eda100;
  --mc-5: #e87ba4;
  --mc-6: #008300;
  --mc-7: #4a3aa7;
  --mc-8: #e34948;
  --mc-grid: #ECE8E0;
  --mc-base: #B9B2A4;
  --by-student: #0E8A8A;
}

.mchart { display: grid; gap: 12px; min-width: 0; }

/* Grid/flex cocuklarinin ontanimli "min-width: auto" degeri, icerigi genis
   olan bir cocugun (burada olcum tablosu) kabi kendi genisligine ITMESINE
   yol acar. O zaman .mchart__scroll icindeki overflow-x hic devreye girmez
   ve tum sayfa yana uzar -- mobilde sayfa saga kayar.
   min-width: 0 cocugun kucumesine izin verir; tasma artik tablonun kendi
   kaydirma kutusunda kalir. */
.mchart > * { min-width: 0; }

/* lejant: her olcu acilip kapatilabilir */
.mchart__legend { display: flex; flex-wrap: wrap; gap: 6px; }
.mchart__key {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color .15s ease, opacity .15s ease;
}
.mchart__key:hover { border-color: var(--ink2); }
.mchart__key:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.mchart__key.is-off { color: var(--ink2); opacity: .55; }
.mchart__key.is-off .mchart__key-line { background: var(--line) !important; }
.mchart__key-line { width: 14px; height: 3px; border-radius: 2px; flex: 0 0 auto; }
.mchart__key-unit { color: var(--ink2); font-size: 11.5px; }

/* cizim alani */
.mchart__plot { position: relative; border-radius: 10px; outline: none; }
.mchart__plot:focus-visible { box-shadow: 0 0 0 2px var(--gold); }
/* SVG cizildigi genislikte durur ve yalnizca KUCULEBILIR; hicbir zaman buyutulmez.
   (width:100% olsaydi eski genislikte kalan bir cizim yazilari da buyuterek
   birkac kat sismis gorunurdu.) */
.mchart__svg { display: block; max-width: 100%; height: auto; overflow: visible; font-family: inherit; }
.mchart__grid line { stroke: var(--mc-grid); stroke-width: 1; shape-rendering: crispEdges; }
.mchart__grid line.is-zero { stroke: var(--mc-base); }
.mchart__tick { fill: var(--ink2); font-size: 11px; font-variant-numeric: tabular-nums; }
.mchart__line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.mchart__dot { stroke: var(--card); stroke-width: 2; }   /* yuzey halkasi */
.mchart__dot--active { stroke-width: 2.5; }
.mchart__cross { stroke: var(--mc-base); stroke-width: 1; shape-rendering: crispEdges; }
.mchart__endlabel { fill: var(--ink2); font-size: 11.5px; }
.mchart__empty-msg { fill: var(--ink2); font-size: 13px; }
.mchart__hit { fill: transparent; pointer-events: all; cursor: crosshair; }

/* tooltip: once deger (guclu), sonra degisim ve olcu adi */
.mchart__tip {
  position: absolute;
  z-index: 3;
  min-width: 190px;
  max-width: 270px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg2);
  box-shadow: var(--shadow);
  font-size: 13px;
  pointer-events: none;
}
.mchart__tip-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  color: var(--ink2);
  font-size: 12px;
}
.mchart__tip-row {
  display: grid;
  grid-template-columns: 14px auto auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
}
.mchart__tip-key { width: 12px; height: 3px; border-radius: 2px; }
.mchart__tip-row strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.mchart__tip-delta { color: var(--ink2); font-variant-numeric: tabular-nums; }
.mchart__tip-name { color: var(--ink2); text-align: right; }
.mchart__tip-empty { color: var(--ink2); font-size: 12.5px; }

.mchart__hint { margin: 0; font-size: 12.5px; line-height: 1.6; color: var(--ink2); }

/* kimin girdigi: ogrenci turkuaz, antrenor altin "*" (+ her zaman metin etiketi) */
.by { display: inline-flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.by__star { font-weight: 700; font-size: 1.2em; line-height: 1; }
.by--student .by__star { color: var(--by-student); }
.by--trainer .by__star { color: var(--gold); }
.mchart__bykey { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 6px; font-size: 12.5px; color: var(--ink2); }

/* tablo: grafigin erisilebilir karsiligi */
.mchart__scroll { overflow-x: auto; max-width: 100%; overscroll-behavior-x: contain; }
.mchart__tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.mchart__tbl th,
.mchart__tbl td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}
.mchart__tbl th {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink2);
}
.mchart__tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.mchart__note { white-space: normal !important; min-width: 120px; color: var(--ink2); }
.mchart__actions { text-align: right; }
.mchart__actions .btn { margin-left: 4px; }

/* ===================================================================
   OLCUM FOTOGRAFLARI (on / arka / yan)

   Fotograflar yetkili uctan blob olarak gelir; yuklenene kadar kutunun
   yerini "is-loading" tutar, boylece liste zipliyormus gibi gorunmez.
   =================================================================== */

.btn--link-danger { color: var(--danger); }
.btn--link-danger:hover { color: var(--danger); text-decoration: underline; }

/* --- form icindeki uc kutu --- */

.mphoto-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.mphoto { width: 104px; text-align: center; }

.mphoto__face {
  width: 104px; height: 128px;
  display: grid; place-items: center;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: var(--bg2);
  color: var(--ink2);
}

.mphoto__face:hover { border-color: var(--gold); color: var(--ink); }
.mphoto.is-filled .mphoto__face { border-style: solid; }

.mphoto__plus { font-size: 26px; line-height: 1; font-weight: 300; }
.mphoto__img { width: 100%; height: 100%; object-fit: cover; display: block; }

.mphoto__label { margin-top: 6px; font-size: 12.5px; font-weight: 600; }

.mphoto__acts {
  display: flex; justify-content: center; gap: 10px;
  font-size: 12px;
}

.mphoto__acts .btn--link { font-size: 12px; }

/* --- tablodaki kucuk gorseller --- */

.mphoto-strip { display: flex; gap: 6px; }

.mphoto-thumb {
  position: relative;
  width: 34px; height: 42px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg2);
}

.mphoto-thumb:hover { border-color: var(--gold); }
.mphoto-thumb__img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Etiket, renk tek basina anlam tasimasin diye her kucuk gorselde durur. */
.mphoto-thumb__tag {
  position: absolute; left: 0; right: 0; bottom: 0;
  font-size: 9px; line-height: 12px;
  letter-spacing: .02em;
  color: #fff;
  background: rgba(0, 0, 0, .58);
}

/* --- yukleniyor / hatali --- */

.mphoto__img.is-loading,
.mphoto-thumb__img.is-loading,
.photo-view__img.is-loading {
  min-height: 40px;
  background: linear-gradient(90deg, var(--bg2), var(--line), var(--bg2));
  background-size: 200% 100%;
  animation: mphotoShimmer 1.2s linear infinite;
}

.mphoto__img.is-broken,
.mphoto-thumb__img.is-broken { background: var(--bg2); }

@keyframes mphotoShimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .mphoto__img.is-loading,
  .mphoto-thumb__img.is-loading,
  .photo-view__img.is-loading { animation: none; }
}

/* --- buyutulmus gorunum --- */

.photo-view {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, .78);
}

.photo-view__box {
  position: relative;
  max-width: min(720px, 100%);
  max-height: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.photo-view__img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 140px);
  border-radius: 8px;
}

.photo-view__cap {
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink2);
  text-align: center;
}

.photo-view__close {
  position: absolute; top: -14px; right: -14px;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  font-size: 20px; line-height: 1;
  cursor: pointer;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
}

.photo-view__close:hover { border-color: var(--gold); color: var(--gold); }

/* ===================================================================
   TIKLAYINCA BUYUYEN GORSELLER

   Kartlarda ve listelerde her zaman kucuk gorsel durur; buyugu ancak
   tiklanınca indirilir. Tiklanabilir oldugu bellisin diye ustune
   gelindiginde hafifce buyur ve bir buyutec isareti cikar.
   =================================================================== */

.ba-slot__zoom,
.consent-photo__zoom {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.ba-slot__zoom img,
.consent-photo__zoom img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s ease;
}

.consent-photo__zoom img { aspect-ratio: 3/4; }

.ba-slot__zoom:hover img,
.consent-photo__zoom:hover img { transform: scale(1.04); }

.ba-slot__zoom:focus-visible,
.consent-photo__zoom:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }

/* Buyutec isareti: sag ust kosede, yalnizca uzerine gelindiginde */
.ba-slot__frame--zoom::after {
  content: '⤢';
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 1;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: #fff;
  background: rgba(0, 0, 0, .55);
  border-radius: 6px;
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
}

.ba-slot__frame--zoom:hover::after { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .ba-slot__zoom img,
  .consent-photo__zoom img,
  .ba-slot__frame--zoom::after { transition: none; }

  .ba-slot__zoom:hover img,
  .consent-photo__zoom:hover img { transform: none; }
}
