/* FizyoPark Desk — kendi stil dosyası.
 *
 * Ana panelin styles.css'i bilinçli olarak paylaşılmıyor (161 KB ve sık değişiyor);
 * ileride oradaki bir değişiklik bu ekranların düzenini bozmasın diye. Yalnızca
 * marka renkleri ödünç alındı — resepsiyondan okunabilirlik için tipografi büyük tutuldu.
 */

:root {
  --ground: #0b1020;
  --surface: #141b30;
  --surface-2: #1b2440;
  --line: #26304d;
  --line-strong: #3a466b;

  --ink: #e7ecfb;
  --ink-2: #b9c3dd;
  --muted: #8d99b8;

  --brand: #3db84a;
  --brand-ink: #0b1020;
  --accent: #ff9500;
  --danger: #ef8873;

  --radius: 8px;
  --tap: 40px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

/* ─── Ortak öğeler ────────────────────────────────────────────────────────── */

.btn {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  padding: 0 16px;
  min-height: var(--tap);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
}
.btn:hover { background: var(--line); }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.btn:disabled { opacity: .6; cursor: default; }

.btn--primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; }
.btn--primary:hover { background: #46cc54; }

.btn--ghost { background: transparent; }
.btn--sm { min-height: 32px; padding: 0 10px; font-size: 14px; }
.btn--block { width: 100%; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: 13px; color: var(--muted); }

.field__input {
  width: 100%;
  min-height: var(--tap);
  padding: 0 12px;
  background: var(--ground);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  font: inherit;
}
.field__input:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: var(--brand); }
.field__input--search { max-width: 280px; }
.field__hint { font-size: 12px; color: var(--muted); }
.field__hint--ok { color: var(--brand); }
.field__hint--warn { color: var(--accent); }
.field__opt { color: var(--muted); font-weight: 400; }

/* ─── Üye ekleme formu ────────────────────────────────────────────────────── */

.form-card {
  max-width: 520px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row .field { flex: 1; min-width: 160px; }

.form-actions { display: flex; gap: 10px; margin-top: 4px; }

.switch--block {
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.switch__text--wide { min-width: 0; color: var(--ink-2); }

.chip-no {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

/* ─── Giriş ekranı ────────────────────────────────────────────────────────── */

.login {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(900px 520px at 18% -8%, rgba(61, 184, 74, .14), transparent 58%),
    radial-gradient(760px 480px at 108% 22%, rgba(255, 149, 0, .10), transparent 52%),
    var(--ground);
}

.login__card {
  width: 100%;
  max-width: 360px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login__title { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -.01em; }
.login__subtitle { margin: -12px 0 4px; color: var(--muted); font-size: 14px; }

.login__error {
  margin: 0;
  padding: 10px 12px;
  background: rgba(239, 136, 115, .12);
  border: 1px solid rgba(239, 136, 115, .4);
  border-radius: var(--radius);
  color: var(--danger);
  font-size: 14px;
}

/* ─── Uygulama kabuğu ─────────────────────────────────────────────────────── */

.app { min-height: 100%; display: flex; flex-direction: column; }

.topbar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.topbar__brand { display: flex; align-items: baseline; gap: 8px; }
.topbar__name { font-size: 18px; font-weight: 600; }
.topbar__sub { font-size: 13px; color: var(--muted); }

.tabs { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }

.tab {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  padding: 0 14px;
  min-height: 36px;
  border-radius: var(--radius);
  cursor: pointer;
}
.tab:hover { background: var(--surface-2); color: var(--ink); }
.tab:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.tab--active {
  background: var(--surface-2);
  border-color: var(--line-strong);
  color: var(--ink);
  font-weight: 600;
}

/* Yönetici sekmesi — desk hesabında hiç görünmez. */
.tab--admin { color: var(--accent); }
.tab--admin.tab--active { color: var(--accent); }

.topbar__right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.topbar__user { font-size: 14px; color: var(--muted); }

.content { flex: 1; padding: 18px; }

.screen { display: flex; flex-direction: column; gap: 14px; }

.screen__head {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.screen__title { margin: 0; font-size: 20px; font-weight: 600; }

.screen__body { min-height: 120px; }

.daynav { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.daynav__label { font-size: 15px; color: var(--ink-2); min-width: 220px; text-align: center; }

.empty {
  margin: 0;
  padding: 32px 0;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}
.empty--error { color: var(--danger); }

/* ─── Tablolar (6. adımda kullanılacak) ───────────────────────────────────── */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

table { border-collapse: collapse; width: 100%; }

th, td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

thead th {
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  background: var(--surface-2);
  white-space: nowrap;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr.is-clickable { cursor: pointer; }
tbody tr.is-clickable:hover { background: var(--surface-2); }

.cell-time { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.cell-muted { color: var(--muted); }
.cell-right { text-align: right; }
.cell-hint { font-size: 13px; white-space: nowrap; }

.cell-index {
  width: 1%;
  text-align: right;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cell-remaining { color: var(--brand); font-variant-numeric: tabular-nums; }

.subhead {
  margin: 18px 0 8px;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.subhead:first-child { margin-top: 0; }

.subhead__count {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 11px;
  letter-spacing: 0;
}

/* ─── Günlük / Haftalık seçici ────────────────────────────────────────────── */

.segmented {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.segmented__btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 14px;
  padding: 0 14px;
  min-height: 30px;
  border-radius: 5px;
  cursor: pointer;
}
.segmented__btn:hover { color: var(--ink); }
.segmented__btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.segmented__btn--active {
  background: var(--brand);
  color: var(--brand-ink);
  font-weight: 600;
}

.count { margin: 10px 2px 0; font-size: 13px; color: var(--muted); }
.count strong { color: var(--ink); }

/* Katılım durumu */
.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.badge--ok { background: rgba(61, 184, 74, .16); color: var(--brand); }
.badge--miss { background: rgba(239, 136, 115, .14); color: var(--danger); }
.badge--soon { background: rgba(255, 149, 0, .14); color: var(--accent); }

.row-upcoming td { background: rgba(255, 149, 0, .04); }

/* ─── Görünürlük anahtarı (yalnızca yönetici ekranı) ──────────────────────── */

.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.switch input { width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer; margin: 0; }
.switch input:disabled { cursor: default; opacity: .5; }
.switch__text { font-size: 13px; color: var(--muted); min-width: 68px; }
.switch input:checked ~ .switch__text { color: var(--brand); font-weight: 600; }

/* ─── Paket kartı satırları ───────────────────────────────────────────────── */

.kv {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.kv:last-child { border-bottom: none; }
.kv__k { flex: 0 0 120px; color: var(--muted); font-size: 14px; }
.kv__v { flex: 1; }
.kv__strong { font-size: 18px; color: var(--brand); }

/* ─── Paket kartı ─────────────────────────────────────────────────────────── */

.modal { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(4, 7, 16, .7); }

.modal__card {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: min(86vh, 760px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  overflow: hidden;
}

.modal__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.modal__title { margin: 0; font-size: 17px; font-weight: 600; flex: 1; }
.modal__body { padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }

.modal__foot {
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.confirm-text { margin: 0; font-size: 15px; line-height: 1.55; }

.btn--danger { color: var(--danger); border-color: rgba(239, 136, 115, .45); }
.btn--danger:hover { background: rgba(239, 136, 115, .12); }
.btn--primary.btn--danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #2a0f0a;
  font-weight: 600;
}
.btn--primary.btn--danger:hover { background: #f39683; }

/* Uzun randevu listeleri kartı taşırmasın. */
.table-wrap--scroll { max-height: 300px; overflow-y: auto; }
.table-wrap--scroll thead th { position: sticky; top: 0; z-index: 1; }
.empty--tight { padding: 14px 0; font-size: 14px; }

/* ─── Bildirim ────────────────────────────────────────────────────────────── */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 15px;
  max-width: min(90vw, 460px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
}
.toast--error { border-color: var(--danger); color: var(--danger); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
