/* =============================================================================
   SPOR AKADEMİ YÖNETİM SİSTEMİ — Tasarım Sistemi
   Signature: "Skor Tabelası" (Scoreboard) — istatistik kartları stadyum
   skor panosu gibi tasarlanmıştır: tabular mono rakamlar + üst renk şeridi.
   ============================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500;700&display=swap');

:root,
[data-theme="light"] {
  --sidebar-width: 264px;
  --bg: #F5F7FA;
  --bg-soft: #ECEFF4;
  --surface: #FFFFFF;
  --surface-2: #FFFFFF;
  --border: #E1E6ED;
  --text: #17202E;
  --text-muted: #5B6577;
  --text-faint: #8A93A6;

  --navy: #0E1A2B;
  --navy-soft: #16233A;

  --accent: #FF5A36;       /* Kortu/pist turuncu-kırmızısı */
  --accent-dark: #E1451F;
  --success: #12B886;      /* Çim yeşili */
  --warning: #F5A623;      /* Amber */
  --danger:  #E5484D;
  --info:    #3E8BFF;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 4px 14px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.12);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0B1420;
  --bg-soft: #0E1A2B;
  --surface: #131F32;
  --surface-2: #16233A;
  --border: #223049;
  --text: #E8ECF1;
  --text-muted: #A8B3C7;
  --text-faint: #6E7A8F;

  --navy: #0B1420;
  --navy-soft: #101B2C;

  --accent: #FF6B48;
  --accent-dark: #FF5A36;
  --success: #2ED89E;
  --warning: #FFC94D;
  --danger:  #FF6B6E;
  --info:    #5EA0FF;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.45);

  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  overflow-x: hidden;
  width: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s ease, color .25s ease;
  max-width: 100vw;
}

h1, h2, h3, h4, .display {
  font-family: 'Oswald', 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: .2px;
  color: var(--text);
  margin: 0;
}

.mono-num {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: .5px;
}

a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }

/* Erişilebilirlik: klavye odak halkası */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* -----------------------------------------------------------------------
   APP SHELL
   ----------------------------------------------------------------------- */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
  width: var(--sidebar-width, 264px);
  flex-shrink: 0;
  background: var(--navy);
  color: #C9D2E3;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  z-index: 100;
  transition: transform .3s ease, width .28s cubic-bezier(.4,0,.2,1);
  border-right: 1px solid rgba(255,255,255,.06);
  overflow: hidden;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 16px 18px 22px;
  flex-shrink: 0;
}

.sidebar-brand .mark {
  width: 38px; height: 38px;
  flex-shrink: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 18px;
  box-shadow: 0 6px 16px rgba(255, 90, 54, .35);
}

.sidebar-brand .name {
  font-family: 'Oswald', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  line-height: 1.15;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.sidebar-brand .name small {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: #7C8AA3;
  letter-spacing: .4px;
  text-transform: uppercase;
}

.sidebar-collapse-btn {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: #8493AD;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, transform .28s ease;
}
.sidebar-collapse-btn:hover { background: rgba(255,255,255,.1); color: #fff; }

/* Tek kaydırılabilir kapsayıcı: tüm bölümler (Genel/Operasyon/Sistem) burada,
   böylece kısa bir bölüm altında boş alan oluşmaz (önceki hata buydu). */
.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
}

.sidebar-section {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #5C6A85;
  padding: 18px 22px 6px;
  font-weight: 600;
  white-space: nowrap;
}

.sidebar-nav { list-style: none; margin: 0; padding: 4px 12px; }

.sidebar-nav li + li { margin-top: 2px; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: #B7C2D6;
  font-size: 14px;
  font-weight: 500;
  position: relative;
  white-space: nowrap;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

.sidebar-link i { font-size: 17px; width: 20px; flex-shrink: 0; text-align: center; color: #8493AD; transition: color .18s ease; }
.sidebar-link .link-text { overflow: hidden; text-overflow: ellipsis; }

.sidebar-link:hover {
  background: rgba(255,255,255,.05);
  color: #fff;
  transform: translateX(2px);
}
.sidebar-link:hover i { color: var(--accent); }

.sidebar-link.active {
  background: linear-gradient(90deg, rgba(255,90,54,.18), rgba(255,90,54,0));
  color: #fff;
}
.sidebar-link.active i { color: var(--accent); }
.sidebar-link.active::before {
  content: '';
  position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px;
  background: var(--accent); border-radius: 4px;
}

.sidebar-footer {
  padding: 16px 22px 22px;
  font-size: 12px;
  color: #5C6A85;
  border-top: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}

/* --- Daraltılmış (icon-only) durum: yalnızca masaüstünde --- */
html.sidebar-collapsed .sidebar-brand .name,
html.sidebar-collapsed .sidebar-section,
html.sidebar-collapsed .sidebar-footer,
html.sidebar-collapsed .link-text {
  display: none;
}
html.sidebar-collapsed .sidebar-brand { justify-content: center; padding: 22px 10px 18px; }
html.sidebar-collapsed .sidebar-collapse-btn { transform: rotate(180deg); }
html.sidebar-collapsed .sidebar-link { justify-content: center; }
html.sidebar-collapsed .sidebar-nav { padding: 4px 10px; }

/* --- Main --- */
.main {
  margin-left: var(--sidebar-width, 264px);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  transition: margin-left .28s cubic-bezier(.4,0,.2,1);
}

.topbar {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  flex-wrap: wrap;
}

.topbar-title { min-width: 0; }
.topbar-title h1 { font-size: 20px; }
.topbar-title p {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.topbar-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.icon-btn {
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: all .18s ease;
}
.icon-btn:hover { background: var(--bg-soft); color: var(--accent); border-color: var(--accent); }

.menu-toggle { display: none; }

.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  cursor: pointer;
}
.user-chip .avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--info), #6C5CE7);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; font-family: 'Oswald', sans-serif;
}
.user-chip .role { font-size: 11px; color: var(--text-muted); }
.user-chip .fname { font-size: 13px; font-weight: 600; }

.content {
  padding: 26px 28px 60px;
  animation: pageIn .45s ease both;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* -----------------------------------------------------------------------
   SCOREBOARD STAT CARDS  (signature element)
   ----------------------------------------------------------------------- */
.scoreboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.score-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 18px 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease;
  animation: cardIn .5s ease both;
}
.score-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.score-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--bar, var(--accent));
}

.score-card .label {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-faint);
  font-weight: 600;
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 10px;
}
.score-card .label i { color: var(--bar, var(--accent)); font-size: 14px; }

.score-card .value {
  font-size: 30px;
  font-weight: 700;
  color: var(--text);
  display: flex; align-items: baseline; gap: 6px;
}
.score-card .value .unit { font-size: 13px; color: var(--text-muted); font-weight: 500; }

.score-card .delta {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
}
.delta.up { color: var(--success); }
.delta.down { color: var(--danger); }
.delta.flat { color: var(--text-faint); }

@keyframes cardIn {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.score-card:nth-child(1){ animation-delay: .02s; }
.score-card:nth-child(2){ animation-delay: .08s; }
.score-card:nth-child(3){ animation-delay: .14s; }
.score-card:nth-child(4){ animation-delay: .20s; }
.score-card:nth-child(5){ animation-delay: .26s; }
.score-card:nth-child(6){ animation-delay: .32s; }
.score-card:nth-child(7){ animation-delay: .38s; }

/* -----------------------------------------------------------------------
   PANELS / CARDS / TABLES
   ----------------------------------------------------------------------- */
.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
.grid-2b { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.panel-head h3 { font-size: 15px; }
.panel-head .sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.panel-body {
  padding: 18px 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.panel-body.tight { padding: 0; }
.panel-body table { min-width: 100%; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px;
}
.pill.green { background: rgba(18,184,134,.12); color: var(--success); }
.pill.amber { background: rgba(245,166,35,.14); color: var(--warning); }
.pill.red   { background: rgba(229,72,77,.12); color: var(--danger); }
.pill.blue  { background: rgba(62,139,255,.12); color: var(--info); }

table.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .6px;
  color: var(--text-faint); font-weight: 600; padding: 12px 20px; border-bottom: 1px solid var(--border);
}
.data-table td { padding: 12px 20px; border-bottom: 1px solid var(--border); color: var(--text); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr { transition: background-color .15s ease; }
.data-table tbody tr:hover { background: var(--bg-soft); }

.empty-state {
  text-align: center; padding: 40px 20px; color: var(--text-faint);
}
.empty-state i { font-size: 32px; margin-bottom: 10px; display: block; color: var(--border); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  display: flex; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border);
}
.timeline li:last-child { border-bottom: none; }
.timeline .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 6px; flex-shrink: 0;
}
.timeline .t-title { font-size: 13.5px; font-weight: 600; }
.timeline .t-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(255,90,54,.28); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-block { width: 100%; }

/* -----------------------------------------------------------------------
   LOGIN
   ----------------------------------------------------------------------- */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: var(--bg);
}
.auth-visual {
  position: relative;
  background: radial-gradient(1200px 700px at 20% 10%, #1B2C4A 0%, var(--navy) 55%, #070D16 100%);
  color: #fff;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 56px;
  overflow: hidden;
}
.auth-visual::after {
  content: '';
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 1px, transparent 1px 64px);
  pointer-events: none;
}
.auth-visual .mark {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 12px;
}
.auth-visual .mark .box {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  display: flex; align-items: center; justify-content: center;
  font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 19px;
  box-shadow: 0 10px 24px rgba(255,90,54,.35);
}
.auth-visual h2 {
  position: relative; z-index: 1;
  font-size: 40px; line-height: 1.15; max-width: 480px; color: #fff;
  margin-top: 40px;
}
.auth-visual .accent-word { color: var(--accent); }
.auth-visual p.lead {
  position: relative; z-index: 1;
  color: #A9B6CC; font-size: 15px; max-width: 420px; margin-top: 14px;
}
.auth-visual .score-strip {
  position: relative; z-index: 1;
  display: flex; gap: 28px; margin-top: auto;
}
.auth-visual .score-strip .s-num {
  font-family: 'JetBrains Mono', monospace; font-size: 26px; font-weight: 700; color: #fff;
}
.auth-visual .score-strip .s-label {
  font-size: 11px; color: #7C8AA3; text-transform: uppercase; letter-spacing: .6px; margin-top: 2px;
}

.auth-form-side { display: flex; align-items: center; justify-content: center; padding: 40px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card h1 { font-size: 26px; margin-bottom: 6px; }
.auth-card p.sub { color: var(--text-muted); font-size: 14px; margin-bottom: 28px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255,90,54,.15);
}
.field .input-wrap { position: relative; }
.field .input-wrap i {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-faint); cursor: pointer; font-size: 15px;
}

.alert {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 8px;
}
.alert.error { background: rgba(229,72,77,.1); color: var(--danger); border: 1px solid rgba(229,72,77,.25); }

.demo-hint {
  margin-top: 22px; padding: 12px 14px;
  background: var(--bg-soft); border: 1px dashed var(--border); border-radius: var(--radius-sm);
  font-size: 12.5px; color: var(--text-muted); line-height: 1.6;
}
.demo-hint b { color: var(--text); }

/* -----------------------------------------------------------------------
   RESPONSIVE
   ----------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .grid-2, .grid-2b { grid-template-columns: 1fr; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
}

@media (max-width: 880px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); width: min(264px, 82vw) !important; }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0 !important; }
  .menu-toggle { display: flex; }
  .topbar-title h1 { font-size: 17px; }
  .content { padding: 18px 16px 50px; }
  .sidebar-collapse-btn { display: none; }
  /* Daraltma özelliği yalnızca masaüstü içindir; mobilde her zaman tam menü görünür */
  html.sidebar-collapsed .sidebar-brand .name,
  html.sidebar-collapsed .sidebar-section,
  html.sidebar-collapsed .sidebar-footer,
  html.sidebar-collapsed .link-text {
    display: block;
  }
  html.sidebar-collapsed .sidebar-link .link-text { display: inline; }
  html.sidebar-collapsed .sidebar-brand { justify-content: flex-start; padding: 22px 16px 18px 22px; }
  html.sidebar-collapsed .sidebar-link { justify-content: flex-start; }
}

@media (max-width: 560px) {
  .scoreboard-grid { grid-template-columns: repeat(2, 1fr); }
  .score-card .value { font-size: 22px; }
  .topbar { padding: 10px 14px; }
  .topbar-title p { display: none; }
  .user-chip .fname, .user-chip .role { display: none; }
  .data-table th, .data-table td { padding: 10px 12px; font-size: 12.5px; }
  .panel-head, .panel-body { padding-left: 14px; padding-right: 14px; }
  .form-actions { flex-wrap: wrap; }
  .schedule-row { grid-template-columns: 1fr 1fr; }
}

.overlay-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 90; display: none;
}
.overlay-backdrop.show { display: block; }

/* =============================================================================
   FAZ 2 EKLERİ — Formlar, Tablolar, Rozetler, Profil, Yazdırma
   ============================================================================= */

/* --- Sayfa üst aksiyon çubuğu --- */
.page-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  flex-wrap: wrap; margin-bottom: 18px;
}
.filter-bar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center; flex: 1;
}
.filter-bar input[type="text"],
.filter-bar input[type="date"],
.filter-bar input[type="month"],
.filter-bar input[type="time"],
.filter-bar input[type="datetime-local"],
.filter-bar select {
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  min-width: 160px;
  box-sizing: border-box;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.filter-bar input[type="date"],
.filter-bar input[type="month"] { min-width: 150px; }
.filter-bar input:focus,
.filter-bar select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,90,54,.12);
}
.filter-bar input[type="text"] { min-width: 220px; }
.filter-bar .btn { height: 40px; box-sizing: border-box; }
.search-wrap { position: relative; flex: 1; min-width: 220px; max-width: 340px; }
.search-wrap i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-faint); font-size: 14px; }
.search-wrap input { width: 100%; padding-left: 34px; }

/* --- Kart Grid (öğrenci/veli/grup listesi) --- */
.entity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.entity-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 18px; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease;
  display: flex; flex-direction: column; gap: 12px;
}
.entity-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.entity-card-head { display: flex; align-items: center; gap: 12px; }
.entity-card-head .name { font-weight: 600; font-size: 15px; }
.entity-card-head .meta { font-size: 12.5px; color: var(--text-muted); }
.entity-card-foot { display: flex; gap: 8px; margin-top: auto; }
.entity-card-foot .btn { flex: 1; padding: 8px 10px; font-size: 13px; }

.avatar-photo {
  width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  border: 2px solid var(--border); background: var(--bg-soft);
}
.avatar-fallback {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--info), #6C5CE7); color: #fff;
  font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 16px;
}
.avatar-photo.lg, .avatar-fallback.lg { width: 84px; height: 84px; font-size: 26px; }

.badge-branch {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
}

/* --- Formlar --- */
.form-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 20px;
}
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }

.field small.error { color: var(--danger); display: block; margin-top: 4px; font-size: 12px; }
.field textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 14px; font-family: inherit; resize: vertical; min-height: 90px;
}
.field select {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 14px;
}
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }

.form-actions { display: flex; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }

/* Fotoğraf yükleme */
.photo-upload { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.photo-upload .preview {
  width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 2px dashed var(--border); background: var(--bg-soft);
}
.photo-upload label.btn { cursor: pointer; }
.photo-upload input[type="file"] { display: none; }

/* Antrenman programı satırları */
.schedule-row {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr auto; gap: 10px; align-items: center; margin-bottom: 10px;
}
.schedule-row select, .schedule-row input[type="time"] {
  padding: 9px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.remove-row-btn {
  width: 34px; height: 34px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: transparent; color: var(--danger); cursor: pointer;
}

/* --- Sekmeler (profil sayfaları) --- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; flex-wrap: wrap; }
.tab-btn {
  padding: 10px 16px; font-size: 13.5px; font-weight: 600; color: var(--text-muted);
  border: none; background: transparent; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* --- Profil başlık kartı --- */
.profile-hero {
  display: flex; align-items: center; gap: 20px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 22px; margin-bottom: 20px; box-shadow: var(--shadow-sm);
}
.profile-hero .info h2 { font-size: 20px; }
.profile-hero .info .meta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; font-size: 13px; color: var(--text-muted); }
.profile-hero .info .meta-row span { display: flex; align-items: center; gap: 6px; }
.profile-hero .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* --- Sayfalama --- */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 22px; }
.pagination a, .pagination span {
  min-width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); border: 1px solid var(--border); color: var(--text); font-size: 13.5px; font-weight: 600;
}
.pagination a:hover { background: var(--bg-soft); }
.pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); }

/* --- Öğrenci/üye seçim listesi (checkbox) --- */
.checklist { max-height: 340px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.checklist-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 13.5px;
}
.checklist-item:last-child { border-bottom: none; }
.checklist-item input { width: 16px; height: 16px; accent-color: var(--accent); }

.inline-form { display: inline; }

/* --- Yazdırma / PDF görünümü --- */
@media print {
  body { background: #fff !important; }
  .no-print { display: none !important; }
}
.print-page {
  max-width: 800px; margin: 0 auto; padding: 40px; background: #fff; color: #17202E; font-family: 'Inter', sans-serif;
}
.print-page h1 { font-family: 'Oswald', sans-serif; }
.print-header {
  display: flex; justify-content: space-between; align-items: center; border-bottom: 3px solid #FF5A36; padding-bottom: 16px; margin-bottom: 24px;
}
.print-header .brand { font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 18px; }
.print-section { margin-bottom: 22px; }
.print-section h3 {
  font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: #8A93A6; margin-bottom: 10px;
  border-bottom: 1px solid #E1E6ED; padding-bottom: 6px;
}
.print-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 20px; font-size: 13.5px; }
.print-grid div b { display: block; font-size: 11px; color: #8A93A6; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.print-toolbar { display: flex; justify-content: flex-end; gap: 10px; max-width: 800px; margin: 20px auto 0; }

/* =============================================================================
   FAZ 3 EKLERİ — Yoklama, Aidat, Malzeme
   ============================================================================= */

/* --- WhatsApp gönder butonu --- */
.wa-send-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: var(--radius-sm);
  background: rgba(37,211,102,.12); color: #1DA851; border: 1px solid rgba(37,211,102,.3);
  font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: background-color .18s ease, transform .18s ease, box-shadow .18s ease;
  white-space: nowrap;
}
.wa-send-btn:hover { background: rgba(37,211,102,.2); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,211,102,.25); }
.wa-send-btn:active { transform: translateY(0) scale(.97); }
.wa-send-btn.wa-sent { opacity: .85; }
.wa-send-btn.wa-sent i { color: var(--success); }

.wa-reminder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

.wa-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  animation: waCardIn .45s cubic-bezier(.22,1,.36,1) both;
}
.wa-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(37,211,102,.35);
}
@keyframes waCardIn {
  from { opacity: 0; transform: translateY(12px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .wa-card { animation: none; }
}

.wa-card-main { display: flex; align-items: center; gap: 12px; min-width: 140; flex: 1; }
.wa-card-info { min-width: 0; }
.wa-card .who { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-card .what { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-card-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; margin-left: auto; }

@media (max-width: 560px) {
  .wa-reminder-grid { grid-template-columns: 1fr; }
  .wa-card { flex-direction: column; align-items: stretch; }
  .wa-card-main { width: 100%; }
  .wa-card-actions { width: 100%; justify-content: space-between; margin-left: 0; }
  .wa-send-btn { flex: 1; justify-content: center; }
}

/* --- Yoklama roster tablosu: durum seçim pilleri --- */
.roster-table { width: 100%; border-collapse: collapse; }
.roster-table td, .roster-table th { padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.roster-table th { text-align: left; font-size: 11px; text-transform: uppercase; color: var(--text-faint); letter-spacing: .5px; }
.status-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.status-pill-option { position: relative; }
.status-pill-option input { position: absolute; opacity: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.status-pill-option span {
  display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600; border: 1px solid var(--border); color: var(--text-muted); user-select: none;
}
.status-pill-option input:checked + span { color: #fff; border-color: transparent; }
.status-pill-option[data-status="katildi"] input:checked + span { background: var(--success); }
.status-pill-option[data-status="gelmedi"] input:checked + span { background: var(--danger); }
.status-pill-option[data-status="izinli"] input:checked + span { background: var(--info); }
.status-pill-option[data-status="gec_geldi"] input:checked + span { background: var(--warning); }

/* --- Aidat / Malzeme özet kutuları (mini scoreboard) --- */
.mini-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.mini-stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 14px 16px; box-shadow: var(--shadow-sm);
}
.mini-stat .label { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-faint); font-weight: 600; margin-bottom: 6px; }
.mini-stat .value { font-size: 22px; font-weight: 700; font-family: 'JetBrains Mono', monospace; }

/* --- Makbuz --- */
.receipt-box { max-width: 480px; margin: 0 auto; }
.receipt-box .amount { font-size: 34px; font-weight: 700; font-family: 'JetBrains Mono', monospace; text-align: center; margin: 18px 0; color: var(--success); }
@media print { .print-page.receipt-box { box-shadow: none; } }

.toggle-pill-btn {
  border: none; cursor: pointer; font: inherit;
}

