/* =========================================================
   xxx Tenis – tasarim sistemi
   Kort yesili + toprak kort turuncusu + optik top sarisi
   ========================================================= */
:root {
  --court: #17603d;
  --court-600: #124f32;
  --court-800: #0b3622;
  --court-050: #e9f4ee;
  --clay: #c9562c;
  --clay-050: #fbede7;
  --ball: #d4f23c;
  --ball-600: #b8d61f;
  --ink: #12201a;
  --ink-2: #3c4b44;
  --muted: #6c7b73;
  --line: #e3e9e5;
  --bg: #f3f6f2;
  --card: #ffffff;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(16, 40, 28, .06), 0 1px 3px rgba(16, 40, 28, .05);
  --shadow: 0 6px 24px rgba(16, 40, 28, .08);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --bs-primary: var(--court);
  --bs-primary-rgb: 23, 96, 61;
  --bs-link-color: var(--court);
  --bs-link-hover-color: var(--court-600);
  --bs-link-color-rgb: 23, 96, 61;
  --bs-body-font-family: var(--font);
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--bg);
  --bs-border-color: var(--line);
}

html { font-size: 15px; }
@media (min-width: 768px) { html { font-size: 15.5px; } }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  margin-bottom: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body > .page-wrap { flex: 1 0 auto; }

h1, h2, h3, h4, h5, .display-font { font-weight: 800; letter-spacing: -.02em; }

a { text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Butonlar ---------- */
.btn { border-radius: 999px; font-weight: 600; padding: .5rem 1.1rem; }
.btn-sm { padding: .3rem .8rem; }
.btn-primary {
  --bs-btn-bg: var(--court); --bs-btn-border-color: var(--court);
  --bs-btn-hover-bg: var(--court-600); --bs-btn-hover-border-color: var(--court-600);
  --bs-btn-active-bg: var(--court-800); --bs-btn-active-border-color: var(--court-800);
  --bs-btn-disabled-bg: var(--court); --bs-btn-disabled-border-color: var(--court);
}
.btn-outline-primary {
  --bs-btn-color: var(--court); --bs-btn-border-color: var(--court);
  --bs-btn-hover-bg: var(--court); --bs-btn-hover-border-color: var(--court);
  --bs-btn-active-bg: var(--court-600); --bs-btn-active-border-color: var(--court-600);
}
.btn-ball {
  background: var(--ball); color: var(--court-800); border: 0;
  box-shadow: 0 4px 14px rgba(212, 242, 60, .35);
}
.btn-ball:hover { background: var(--ball-600); color: var(--court-800); }
.btn-clay { background: var(--clay); color: #fff; border: 0; }
.btn-clay:hover { background: #b14a24; color: #fff; }
.btn-soft { background: var(--court-050); color: var(--court); border: 0; }
.btn-soft:hover { background: #d8ebe0; color: var(--court-600); }
.btn-ghost { background: transparent; color: var(--ink-2); border: 0; }
.btn-ghost:hover { background: var(--bg); color: var(--ink); }

.form-control, .form-select {
  border-radius: var(--radius-sm);
  border-color: var(--line);
  padding: .6rem .85rem;
}
.form-control:focus, .form-select:focus, .form-check-input:focus {
  border-color: var(--court);
  box-shadow: 0 0 0 .2rem rgba(23, 96, 61, .15);
}
.form-check-input:checked { background-color: var(--court); border-color: var(--court); }
.form-label { font-weight: 600; font-size: .9rem; color: var(--ink-2); }

/* ---------- Ust menu ---------- */
.tn-nav {
  background: var(--court-800);
  background-image:
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(180deg, var(--court-800), var(--court-600));
  background-size: 48px 100%, 100% 100%;
  border-bottom: 3px solid var(--ball);
  position: sticky; top: 0; z-index: 1030;
}
.tn-nav .navbar-brand { color: #fff; font-weight: 800; font-size: 1.25rem; display: flex; align-items: center; gap: .5rem; }
.tn-nav .navbar-brand:hover { text-decoration: none; }
.tn-nav .brand-ball {
  width: 30px; height: 30px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #f0ff8a, var(--ball) 55%, var(--ball-600));
  position: relative; box-shadow: 0 0 0 2px rgba(255,255,255,.15);
  overflow: hidden; flex-shrink: 0;
}
.tn-nav .brand-ball::before, .tn-nav .brand-ball::after {
  content: ""; position: absolute; width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.85);
}
.tn-nav .brand-ball::before { left: -18px; top: 0; }
.tn-nav .brand-ball::after { right: -18px; top: 0; }
.tn-nav .nav-link {
  color: rgba(255,255,255,.82); font-weight: 600; border-radius: 999px;
  padding: .45rem .9rem !important; display: flex; align-items: center; gap: .4rem; position: relative;
}
.tn-nav .nav-link:hover { color: #fff; background: rgba(255,255,255,.08); text-decoration: none; }
.tn-nav .nav-link.active { color: var(--court-800); background: var(--ball); }
.tn-nav .nav-link .bi { font-size: 1.1rem; }
.tn-nav .navbar-toggler { border-color: rgba(255,255,255,.3); }
.tn-nav .navbar-toggler-icon { filter: invert(1); }
.tn-nav .form-select-sm {
  background-color: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.2);
  border-radius: 999px; padding: .3rem 2rem .3rem .8rem;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}
.tn-nav .form-select-sm option { color: var(--ink); }
.nav-badge {
  position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--clay); color: #fff; font-size: .68rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--court-800);
}
.nav-badge:empty, .nav-badge[data-count="0"] { display: none; }
.tn-nav .dropdown-menu { border-radius: var(--radius-sm); border: 1px solid var(--line); box-shadow: var(--shadow); padding: .4rem; }
.tn-nav .dropdown-item { border-radius: 8px; padding: .5rem .75rem; font-weight: 500; display: flex; gap: .55rem; align-items: center; }
.tn-nav .dropdown-item:active { background: var(--court); }

@media (max-width: 991.98px) {
  .tn-nav .navbar-collapse { padding: .75rem 0; }
  .nav-badge { position: static; margin-left: auto; border: 0; }
}

/* ---------- Avatar ---------- */
.avatar {
  border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--court-050);
  display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
  color: var(--court); font-weight: 800; letter-spacing: -.02em;
}
.avatar-xs { width: 28px; height: 28px; font-size: .7rem; }
.avatar-sm { width: 40px; height: 40px; font-size: .9rem; }
.avatar-md { width: 56px; height: 56px; font-size: 1.1rem; }
.avatar-lg { width: 96px; height: 96px; font-size: 2rem; }
.avatar-xl { width: 152px; height: 152px; font-size: 3rem; }
.avatar-ring { box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--ball); }

/* ---------- Kartlar ---------- */
.tn-card {
  background: var(--card); border-radius: var(--radius); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.tn-card-body { padding: 1.25rem; }
.tn-card-title { font-size: 1rem; font-weight: 800; margin-bottom: .9rem; display: flex; align-items: center; gap: .5rem; }
.tn-card-title .bi { color: var(--court); }
.section-title { font-size: 1.6rem; font-weight: 800; }
.section-sub { color: var(--muted); }

.page-head { padding: 1.5rem 0 1rem; }
.page-head h1 { font-size: 1.8rem; margin: 0; }
.page-head p { color: var(--muted); margin: .25rem 0 0; }

/* ---------- Etiketler ---------- */
.chip {
  display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .65rem; border-radius: 999px;
  background: var(--bg); color: var(--ink-2); font-size: .8rem; font-weight: 600; border: 1px solid var(--line);
}
.chip-court { background: var(--court-050); color: var(--court); border-color: transparent; }
.chip-clay { background: var(--clay-050); color: var(--clay); border-color: transparent; }
.chip-ball { background: #f4fcd0; color: #5b6b00; border-color: transparent; }
.chip .btn-close { font-size: .55rem; margin-left: .15rem; }

.skill-meter { display: inline-flex; gap: 3px; vertical-align: middle; }
.skill-meter span { width: 7px; height: 14px; border-radius: 3px; background: var(--line); }
.skill-meter span.on { background: var(--court); }
.skill-meter span.on:nth-child(n+5) { background: var(--clay); }

/* ---------- Oyuncu kartlari ---------- */
.player-card { overflow: hidden; height: 100%; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.player-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.player-card .cover {
  height: 64px;
  background:
    linear-gradient(90deg, transparent 49.5%, rgba(255,255,255,.55) 49.5%, rgba(255,255,255,.55) 50.5%, transparent 50.5%),
    linear-gradient(180deg, transparent 30%, rgba(255,255,255,.55) 30%, rgba(255,255,255,.55) 32%, transparent 32%),
    linear-gradient(135deg, var(--court), var(--court-600));
}
.player-card.clay .cover {
  background:
    linear-gradient(90deg, transparent 49.5%, rgba(255,255,255,.55) 49.5%, rgba(255,255,255,.55) 50.5%, transparent 50.5%),
    linear-gradient(180deg, transparent 30%, rgba(255,255,255,.55) 30%, rgba(255,255,255,.55) 32%, transparent 32%),
    linear-gradient(135deg, #d4683d, var(--clay));
}
.player-card .avatar { margin-top: -36px; border: 4px solid #fff; }
.player-card .name { font-weight: 800; font-size: 1.05rem; color: var(--ink); }
.player-card .bio { color: var(--muted); font-size: .85rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.player-card .actions { margin-top: auto; }

/* ---------- Ana sayfa (karsilama) ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff; border-radius: 0 0 36px 36px;
  background: linear-gradient(160deg, var(--court-800) 0%, var(--court) 60%, #1f7a4d 100%);
  padding: 5rem 0 6rem;
}
.hero::before {
  /* kort cizgileri */
  content: ""; position: absolute; inset: 8% -10%; border: 3px solid rgba(255,255,255,.12);
  transform: perspective(900px) rotateX(55deg); transform-origin: center 60%;
  background:
    linear-gradient(90deg, transparent calc(50% - 1.5px), rgba(255,255,255,.12) calc(50% - 1.5px), rgba(255,255,255,.12) calc(50% + 1.5px), transparent calc(50% + 1.5px)),
    linear-gradient(180deg, transparent 22%, rgba(255,255,255,.12) 22%, rgba(255,255,255,.12) calc(22% + 3px), transparent calc(22% + 3px), transparent 78%, rgba(255,255,255,.12) 78%, rgba(255,255,255,.12) calc(78% + 3px), transparent calc(78% + 3px));
  pointer-events: none;
}
.hero .ball {
  position: absolute; right: 8%; top: 18%; width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #f3ff9b, var(--ball) 55%, var(--ball-600));
  box-shadow: 0 30px 60px rgba(0,0,0,.25); overflow: hidden; animation: bounce 3.2s ease-in-out infinite;
}
.hero .ball::before, .hero .ball::after {
  content: ""; position: absolute; width: 140px; height: 140px; border-radius: 50%; border: 6px solid rgba(255,255,255,.9);
}
.hero .ball::before { left: -92px; }
.hero .ball::after { right: -92px; }
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-26px); } }
@media (prefers-reduced-motion: reduce) { .hero .ball { animation: none; } }
@media (max-width: 767.98px) { .hero .ball { width: 80px; height: 80px; right: 6%; top: 6%; } .hero .ball::before, .hero .ball::after { width: 80px; height: 80px; border-width: 4px; } .hero .ball::before { left: -52px; } .hero .ball::after { right: -52px; } }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 800; line-height: 1.05; max-width: 720px; position: relative; }
.hero h1 em { font-style: normal; color: var(--ball); }
.hero p.lead { color: rgba(255,255,255,.85); max-width: 600px; position: relative; }
.hero .stats { position: relative; }
.hero .stat strong { display: block; font-size: 1.6rem; color: var(--ball); }
.hero .stat span { color: rgba(255,255,255,.75); font-size: .85rem; }
.feature-card { padding: 1.5rem; height: 100%; }
.feature-icon {
  width: 52px; height: 52px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--court-050); color: var(--court); font-size: 1.5rem; margin-bottom: 1rem;
}
.feature-card:nth-child(even) .feature-icon { background: var(--clay-050); color: var(--clay); }
.cta-band {
  border-radius: var(--radius); padding: 2.5rem; color: var(--court-800);
  background: linear-gradient(120deg, var(--ball), #e9ff8f);
}

/* ---------- Akis ---------- */
.composer textarea { border: 0; resize: none; background: var(--bg); border-radius: var(--radius-sm); padding: .8rem 1rem; }
.composer textarea:focus { background: #fff; box-shadow: 0 0 0 .2rem rgba(23,96,61,.15); }
.composer .preview { display: flex; gap: .5rem; flex-wrap: wrap; }
.composer .preview img { width: 76px; height: 76px; object-fit: cover; border-radius: 10px; }
.scope-tabs { display: flex; gap: .35rem; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: .3rem; }
.scope-tabs a { flex: 1; text-align: center; padding: .45rem .75rem; border-radius: 999px; color: var(--ink-2); font-weight: 600; font-size: .9rem; }
.scope-tabs a:hover { text-decoration: none; background: var(--bg); }
.scope-tabs a.active { background: var(--court); color: #fff; }

.post-card { margin-bottom: 1rem; }
.post-head { display: flex; gap: .75rem; align-items: center; padding: 1rem 1.25rem .5rem; }
.post-head .meta { font-size: .8rem; color: var(--muted); display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; }
.post-head .author { font-weight: 700; color: var(--ink); }
.post-body { padding: .25rem 1.25rem .75rem; white-space: pre-wrap; word-wrap: break-word; }
.post-photos { display: grid; gap: 3px; grid-template-columns: repeat(2, 1fr); }
.post-photos.count-1 { grid-template-columns: 1fr; }
.post-photos a { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg); }
.post-photos.count-1 a { aspect-ratio: auto; max-height: 560px; }
.post-photos img { width: 100%; height: 100%; object-fit: cover; }
.post-photos.count-3 a:first-child { grid-row: span 2; aspect-ratio: auto; }
.post-stats { display: flex; justify-content: space-between; padding: .6rem 1.25rem; font-size: .85rem; color: var(--muted); }
.post-actions { display: flex; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 1rem; }
.post-actions > * { flex: 1; }
.post-actions .btn { width: 100%; border-radius: 10px; color: var(--ink-2); font-weight: 600; padding: .5rem; }
.post-actions .btn:hover { background: var(--bg); }
.post-actions .btn.liked { color: var(--clay); }
.post-actions .btn.liked .bi-heart::before { content: "\f415"; }
.comments { padding: .75rem 1.25rem 1rem; }
.comment { display: flex; gap: .6rem; margin-bottom: .6rem; }
.comment-bubble { background: var(--bg); border-radius: 16px; padding: .5rem .85rem; max-width: 100%; }
.comment-bubble .author { font-weight: 700; font-size: .85rem; color: var(--ink); }
.comment-bubble .text { font-size: .92rem; white-space: pre-wrap; word-wrap: break-word; }
.comment-meta { font-size: .75rem; color: var(--muted); padding-left: .85rem; }
.comment-form input { border-radius: 999px; background: var(--bg); border: 0; }

/* ---------- Profil ---------- */
.profile-cover {
  height: 230px; border-radius: 0 0 var(--radius) var(--radius); position: relative; overflow: hidden;
  background:
    linear-gradient(90deg, transparent calc(50% - 2px), rgba(255,255,255,.6) calc(50% - 2px), rgba(255,255,255,.6) calc(50% + 2px), transparent calc(50% + 2px)),
    linear-gradient(180deg, transparent 18%, rgba(255,255,255,.6) 18%, rgba(255,255,255,.6) calc(18% + 3px), transparent calc(18% + 3px), transparent 82%, rgba(255,255,255,.6) 82%, rgba(255,255,255,.6) calc(82% + 3px), transparent calc(82% + 3px)),
    linear-gradient(90deg, transparent 12%, rgba(255,255,255,.6) 12%, rgba(255,255,255,.6) calc(12% + 3px), transparent calc(12% + 3px), transparent 88%, rgba(255,255,255,.6) 88%, rgba(255,255,255,.6) calc(88% + 3px), transparent calc(88% + 3px)),
    linear-gradient(135deg, var(--court) 0%, var(--court-600) 100%);
}
.profile-cover.clay { background-color: var(--clay); }
.profile-header { margin-top: -76px; position: relative; }
.profile-header .name { font-size: 1.9rem; font-weight: 800; }
.profile-tabs .nav-link { color: var(--ink-2); font-weight: 700; border: 0; border-bottom: 3px solid transparent; border-radius: 0; padding: .8rem 1rem; }
.profile-tabs .nav-link.active { color: var(--court); border-bottom-color: var(--court); background: none; }
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { display: flex; gap: .75rem; padding: .55rem 0; border-bottom: 1px dashed var(--line); align-items: flex-start; }
.info-list li:last-child { border-bottom: 0; }
.info-list .bi { color: var(--court); font-size: 1.05rem; margin-top: .1rem; }
.info-list .label { color: var(--muted); font-size: .8rem; display: block; }
.locked-note { color: var(--muted); font-size: .85rem; display: flex; gap: .4rem; align-items: center; }

.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.photo-grid a, .photo-grid .ph { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: 10px; background: var(--bg); }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.photo-grid a:hover img { transform: scale(1.04); }
.photo-grid .badge-profile { position: absolute; left: 6px; top: 6px; background: var(--ball); color: var(--court-800); font-size: .7rem; font-weight: 700; border-radius: 999px; padding: .1rem .5rem; }
@media (min-width: 768px) { .photo-grid.lg { grid-template-columns: repeat(4, 1fr); } }

.photo-manage .ph-actions { position: absolute; inset: auto 0 0 0; padding: .4rem; display: flex; gap: .3rem; justify-content: flex-end; background: linear-gradient(transparent, rgba(0,0,0,.55)); }
.photo-manage .ph-actions .btn { padding: .2rem .5rem; font-size: .8rem; }

.dropzone {
  border: 2px dashed #b9cfc2; border-radius: var(--radius); padding: 2rem; text-align: center; color: var(--muted);
  background: var(--court-050); cursor: pointer; transition: background .15s, border-color .15s;
}
.dropzone:hover, .dropzone.drag { background: #dcefe4; border-color: var(--court); }
.dropzone .bi { font-size: 2rem; color: var(--court); }

/* ---------- Profil duzenleme ---------- */
.edit-nav { position: sticky; top: 90px; }
.edit-nav a { display: flex; gap: .6rem; align-items: center; padding: .6rem .9rem; border-radius: 12px; color: var(--ink-2); font-weight: 600; }
.edit-nav a:hover { background: var(--card); text-decoration: none; }
.edit-nav a.active { background: var(--card); color: var(--court); box-shadow: var(--shadow-sm); }
.progress-court { height: 10px; border-radius: 999px; background: var(--court-050); }
.progress-court .progress-bar { background: linear-gradient(90deg, var(--court), #2fa36a); border-radius: 999px; }
.slot-grid { display: grid; grid-template-columns: auto repeat(3, 1fr); gap: .4rem; align-items: center; }
.slot-grid .slot input { display: none; }
.slot-grid .slot label {
  display: block; text-align: center; padding: .55rem .25rem; border-radius: 10px; border: 1px solid var(--line);
  cursor: pointer; font-weight: 600; font-size: .85rem; color: var(--ink-2); background: #fff; user-select: none;
}
.slot-grid .slot input:checked + label { background: var(--court); color: #fff; border-color: var(--court); }
.slot-grid .slot input:focus-visible + label { outline: 2px solid var(--ball-600); }
.option-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .5rem; }
.option-cards input { display: none; }
.option-cards label { border: 1px solid var(--line); border-radius: 12px; padding: .65rem .75rem; cursor: pointer; background: #fff; font-weight: 600; font-size: .88rem; display: flex; gap: .45rem; align-items: center; }
.option-cards input:checked + label { border-color: var(--court); background: var(--court-050); color: var(--court); box-shadow: inset 0 0 0 1px var(--court); }
.city-chips { display: flex; flex-wrap: wrap; gap: .4rem; min-height: 2rem; }

/* ---------- Gizlilik ---------- */
.privacy-row { display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding: 1rem 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.privacy-row:last-child { border-bottom: 0; }
.privacy-row .ico { width: 42px; height: 42px; border-radius: 12px; background: var(--court-050); color: var(--court); display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.privacy-row .txt { flex: 1 1 260px; }
.privacy-row .txt strong { display: block; }
.privacy-row .txt small { color: var(--muted); }
.privacy-row .form-select { width: auto; min-width: 190px; }

/* ---------- Mesajlar ---------- */
.chat-shell { display: grid; grid-template-columns: 320px 1fr; height: calc(100vh - 170px); min-height: 480px; overflow: hidden; }
.chat-list { border-right: 1px solid var(--line); overflow-y: auto; }
.chat-list a { display: flex; gap: .7rem; padding: .8rem 1rem; color: var(--ink); align-items: center; border-bottom: 1px solid var(--line); }
.chat-list a:hover { background: var(--bg); text-decoration: none; }
.chat-list a.active { background: var(--court-050); }
.chat-list .preview { color: var(--muted); font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-list .unread { background: var(--clay); color: #fff; border-radius: 999px; font-size: .7rem; padding: .1rem .45rem; font-weight: 700; }
.chat-main { display: flex; flex-direction: column; min-width: 0; }
.chat-head { padding: .8rem 1.1rem; border-bottom: 1px solid var(--line); display: flex; gap: .7rem; align-items: center; }
.chat-messages { flex: 1; overflow-y: auto; padding: 1.25rem; background: var(--bg); display: flex; flex-direction: column; gap: .35rem; }
.bubble { max-width: 72%; padding: .55rem .9rem; border-radius: 18px; white-space: pre-wrap; word-wrap: break-word; box-shadow: var(--shadow-sm); }
.bubble.theirs { background: #fff; align-self: flex-start; border-bottom-left-radius: 6px; }
.bubble.mine { background: var(--court); color: #fff; align-self: flex-end; border-bottom-right-radius: 6px; }
.bubble time { display: block; font-size: .68rem; opacity: .7; margin-top: .15rem; text-align: right; }
.chat-form { padding: .75rem; border-top: 1px solid var(--line); display: flex; gap: .5rem; }
.chat-form textarea { resize: none; border-radius: 22px; }
.chat-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); text-align: center; padding: 2rem; }
.chat-empty .bi { font-size: 3rem; color: var(--court); opacity: .5; }
@media (max-width: 767.98px) {
  .chat-shell { grid-template-columns: 1fr; height: auto; }
  .chat-shell.has-chat .chat-list { display: none; }
  .chat-shell:not(.has-chat) .chat-main { display: none; }
  .chat-messages { height: 60vh; }
}

/* ---------- Seyahat ---------- */
.trip { display: flex; gap: 1rem; align-items: center; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.trip:last-child { border-bottom: 0; }
.trip-date { width: 58px; text-align: center; border-radius: 12px; background: var(--clay-050); color: var(--clay); padding: .35rem 0; flex-shrink: 0; line-height: 1.1; }
.trip-date strong { display: block; font-size: 1.35rem; }
.trip-date small { font-size: .7rem; text-transform: uppercase; font-weight: 700; }

/* ---------- Bos durum ---------- */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty-state .bi { font-size: 3rem; color: var(--court); opacity: .45; display: block; margin-bottom: .75rem; }

/* ---------- Flash mesajlari ---------- */
.flash-stack { position: fixed; right: 1rem; bottom: 1rem; z-index: 1080; display: flex; flex-direction: column; gap: .5rem; max-width: min(420px, calc(100vw - 2rem)); }
.flash { border-radius: 14px; padding: .8rem 1rem; display: flex; gap: .6rem; align-items: flex-start; box-shadow: var(--shadow); animation: flashIn .25s ease-out; background: #fff; border-left: 5px solid var(--court); }
.flash.error { border-left-color: var(--clay); }
.flash .bi { font-size: 1.2rem; color: var(--court); }
.flash.error .bi { color: var(--clay); }
@keyframes flashIn { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Alt bilgi ---------- */
.tn-footer { background: var(--court-800); color: rgba(255,255,255,.7); padding: 2rem 0; margin-top: 3rem; font-size: .9rem; }
.tn-footer a { color: var(--ball); }

/* ---------- Yonetim paneli duzeni + menu (.tn-sidebar) ---------- */
.app-layout { display: flex; min-height: calc(100vh - 70px); }
.app-main { flex: 1; min-width: 0; padding: .5rem 1.5rem 2rem; }
.tn-sidebar {
  width: 236px; flex-shrink: 0; padding: 1.25rem .75rem;
  background: var(--court-800);
  background-image: linear-gradient(180deg, var(--court-800), var(--court-600));
  color: rgba(255,255,255,.82);
}
.tn-sidebar-label {
  display: flex; align-items: center; gap: .45rem; padding: 0 .75rem .75rem;
  font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.55);
}
.tn-sidebar-label .bi { color: var(--ball); font-size: .9rem; }
.tn-sidebar .nav { gap: .2rem; }
.tn-sidebar .nav-link {
  display: flex; align-items: center; gap: .6rem; padding: .55rem .85rem; border-radius: 999px;
  color: rgba(255,255,255,.82); font-weight: 600; font-size: .92rem; min-height: 40px;
}
.tn-sidebar .nav-link .bi { font-size: 1.05rem; flex-shrink: 0; opacity: .9; }
.tn-sidebar .nav-link:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.tn-sidebar .nav-link.active { background: var(--ball); color: var(--court-800); }
.tn-sidebar .nav-link.active .bi { opacity: 1; }
.tn-sidebar .tn-sidebar-sep { border-top: 1px solid rgba(255,255,255,.12); margin: .6rem .5rem; list-style: none; }
@media (max-width: 767.98px) {
  .app-layout { flex-direction: column; }
  .tn-sidebar { width: 100%; padding: .6rem .75rem; }
  .tn-sidebar-label, .tn-sidebar .tn-sidebar-sep { display: none; }
  .tn-sidebar .nav { flex-direction: row !important; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: .3rem; }
  .tn-sidebar .nav::-webkit-scrollbar { display: none; }
  .tn-sidebar .nav-item { flex-shrink: 0; }
  .tn-sidebar .nav-link { padding: .4rem .8rem; font-size: .85rem; white-space: nowrap; min-height: 36px; }
  .app-main { padding: .25rem 1rem 1.5rem; }
}

/* ---------- Yonetim sayfasi sablonu (DESIGN.md §15) ---------- */
.page-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.page-head .page-meta { color: var(--muted); font-size: .9rem; margin-top: .3rem; display: flex; flex-wrap: wrap; gap: .4rem .75rem; align-items: center; }
.page-head h1 { overflow-wrap: anywhere; }
.tn-toolbar .form-label { margin-bottom: .3rem; }

.stat-tile {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 1rem 1.1rem 1rem 1.3rem; height: 100%; display: flex; flex-direction: column; gap: .15rem; position: relative; overflow: hidden;
}
.stat-tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--court); }
.stat-tile .v { font-size: 1.6rem; font-weight: 800; color: var(--ink); line-height: 1.1; letter-spacing: -.02em; overflow-wrap: anywhere; }
.stat-tile .l { font-size: .8rem; color: var(--muted); font-weight: 600; }
.stat-tile .trend { font-size: .78rem; font-weight: 700; color: var(--court); }
.stat-tile .trend.down { color: var(--clay); }
.stat-tile.is-clay::before { background: var(--clay); }
.stat-tile.is-ball::before { background: var(--ball-600); }
a.stat-tile { color: inherit; transition: transform .15s, box-shadow .15s; }
a.stat-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; color: inherit; }
.modal .page-head { padding-top: 0; }
.modal .page-head h1 { font-size: 1.4rem; }

.status-badge {
  display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .65rem; border-radius: 999px;
  font-size: .76rem; font-weight: 700; line-height: 1.35; white-space: nowrap; vertical-align: middle;
  background: #eef1ef; color: var(--ink-2); border: 1px solid transparent;
}
.status-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.status-badge.no-dot::before { display: none; }
.status-badge.is-success { background: var(--court-050); color: var(--court); }
.status-badge.is-warning { background: #fff4d1; color: #7a5a00; }
.status-badge.is-danger { background: var(--clay-050); color: #a8401b; }
.status-badge.is-neutral { background: #eef1ef; color: var(--ink-2); }
.status-badge.is-info { background: #e6f0fb; color: #1d5694; }
a.status-badge:hover { text-decoration: none; filter: brightness(.97); }

/* Tablolar: her zaman bir .tn-card icinde (DESIGN.md §14) */
.tn-table { --bs-table-bg: transparent; --bs-table-striped-bg: transparent; --bs-table-hover-bg: var(--court-050); --bs-table-border-color: var(--line); margin-bottom: 0; font-size: .92rem; }
.tn-table > thead > tr > th {
  background: var(--bg); color: var(--ink-2); font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  border-bottom: 1px solid var(--line); padding: .7rem .85rem; white-space: nowrap; vertical-align: middle;
}
.tn-table > thead > tr > th:first-child { border-top-left-radius: var(--radius-sm); border-bottom-left-radius: var(--radius-sm); }
.tn-table > thead > tr > th:last-child { border-top-right-radius: var(--radius-sm); border-bottom-right-radius: var(--radius-sm); }
.tn-table > thead > tr > th { border-bottom: 0; }
.tn-table > tbody > tr > td, .tn-table > tbody > tr > th { padding: .7rem .85rem; border-color: var(--line); vertical-align: middle; }
.tn-table > tbody > tr:last-child > * { border-bottom: 0; }
.tn-table.table-hover > tbody > tr:hover > * { --bs-table-bg-state: var(--court-050); }
.tn-table code, .kv-list code, .page-meta code, .kv-rows code { color: var(--court-600); background: var(--court-050); padding: .1rem .35rem; border-radius: 6px; font-size: .82em; }
.change-cell { max-width: 420px; white-space: normal; word-break: break-word; }
.tn-table .actions-cell { white-space: nowrap; text-align: end; }

/* Bootstrap'in eski gri varsayilanlari bu tasarimda kullanilmaz */
main .table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-bg-type: transparent; }
main .bg-light, .modal .bg-light { background-color: var(--bg) !important; }
main .alert { border-radius: var(--radius-sm); }

/* Anahtar-deger listesi (_KeyValueCard) */
.kv-list { display: grid; grid-template-columns: minmax(110px, 38%) minmax(0, 1fr); margin: 0; }
.kv-list > dt, .kv-list > dd { padding: .5rem 0; border-bottom: 1px dashed var(--line); margin: 0; min-width: 0; }
.kv-list > dt { color: var(--muted); font-weight: 600; font-size: .85rem; padding-right: .75rem; }
.kv-list > dd { color: var(--ink); overflow-wrap: anywhere; }
.kv-list > dt:last-of-type, .kv-list > dd:last-of-type { border-bottom: 0; }
@media (max-width: 575.98px) {
  .kv-list { grid-template-columns: minmax(0, 1fr); }
  .kv-list > dt { border-bottom: 0; padding-bottom: 0; }
}
.kv-rows { list-style: none; padding: 0; margin: 0; }
.kv-rows > li { display: flex; justify-content: space-between; gap: .75rem; padding: .5rem 0; border-bottom: 1px dashed var(--line); overflow-wrap: anywhere; }
.kv-rows > li:last-child { border-bottom: 0; }
.kv-rows > li > :first-child { color: var(--muted); font-size: .88rem; }

/* Ic kutular ve kod bloklari (bg-light yerine) */
.tn-inset { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.tn-subcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.tn-pre { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .75rem .9rem; font-size: .8rem; color: var(--ink-2); white-space: pre-wrap; word-break: break-word; max-height: 360px; overflow: auto; margin: 0; }
.tn-section-sub { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 .6rem; }

/* Sayfa ici sekmeler (nav-pills) */
main .nav-pills .nav-link { border-radius: 999px; color: var(--ink-2); font-weight: 600; }
main .nav-pills .nav-link:hover { background: var(--card); text-decoration: none; }
main .nav-pills .nav-link.active { background: var(--court); color: #fff; }

/* Bootstrap buton varyantlarini temaya esitle */
.btn-outline-secondary { --bs-btn-color: var(--ink-2); --bs-btn-border-color: var(--line); --bs-btn-bg: var(--card); --bs-btn-hover-bg: var(--bg); --bs-btn-hover-color: var(--ink); --bs-btn-hover-border-color: #cfd8d3; --bs-btn-active-bg: var(--line); --bs-btn-active-color: var(--ink); --bs-btn-active-border-color: #cfd8d3; }
.btn-outline-danger { --bs-btn-color: var(--clay); --bs-btn-border-color: rgba(201,86,44,.45); --bs-btn-hover-bg: var(--clay); --bs-btn-hover-border-color: var(--clay); --bs-btn-hover-color: #fff; --bs-btn-active-bg: #b14a24; --bs-btn-active-border-color: #b14a24; }
.btn-icon { width: 34px; height: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }

/* Modal ve liste: kart diliyle ayni */
.modal-content { border-radius: var(--radius); border: 1px solid var(--line); }
.list-group-item { border-color: var(--line); }

/* ---------- DataTables 3 (ortak katman) temasi ---------- */
div.dt-container { width: 100%; }
div.dt-container .dt-layout-row { gap: .75rem; margin: .5rem 0; }
div.dt-container div.dt-search label, div.dt-container div.dt-length label, div.dt-container div.dt-info { color: var(--muted); font-size: .85rem; font-weight: 600; }
div.dt-container div.dt-search input {
  border-radius: 999px; border: 1px solid var(--line); background-color: var(--card); padding: .4rem .9rem; margin-left: .4rem;
  min-width: 200px; font-size: .9rem; color: var(--ink);
}
div.dt-container div.dt-length select {
  border-radius: 999px; border: 1px solid var(--line); background-color: var(--card); padding: .3rem 2rem .3rem .75rem;
  margin-right: .4rem; font-size: .88rem; color: var(--ink); width: auto; display: inline-block;
}
div.dt-container div.dt-search input:focus, div.dt-container div.dt-length select:focus { border-color: var(--court); box-shadow: 0 0 0 .2rem rgba(23,96,61,.15); outline: 0; }
div.dt-container div.dt-paging ul.pagination { gap: .25rem; margin: 0; flex-wrap: wrap; }
div.dt-container div.dt-paging .page-link {
  border-radius: 999px !important; border: 1px solid var(--line); color: var(--ink-2); background: var(--card); margin-left: 0;
  min-width: 36px; height: 36px; padding: 0 .7rem; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: .85rem;
}
div.dt-container div.dt-paging .page-link:hover { background: var(--court-050); color: var(--court); border-color: var(--court-050); }
div.dt-container div.dt-paging .page-link:focus { box-shadow: 0 0 0 .2rem rgba(23,96,61,.15); }
div.dt-container div.dt-paging .page-item.active .page-link { background: var(--court); border-color: var(--court); color: #fff; }
div.dt-container div.dt-paging .page-item.disabled .page-link { color: var(--muted); opacity: .55; background: var(--card); }
table.dataTable > tbody > tr > td, table.dataTable > thead > tr > th { vertical-align: middle; }
table.dataTable td.change-cell { white-space: normal; }
table.dataTable.tn-table > thead > tr > th.dt-orderable-asc:hover, table.dataTable.tn-table > thead > tr > th.dt-orderable-desc:hover { outline: 0; color: var(--court); }
table.dataTable.tn-table > thead > tr > th.dt-ordering-asc, table.dataTable.tn-table > thead > tr > th.dt-ordering-desc { color: var(--court); }
:root { --dt-order-arrow_color: var(--muted); --dt-order-arrow_color-current: var(--court); --dt_background-selected: 23, 96, 61; --dtr-control-triangle_color: var(--court); }
table.dataTable > tbody > tr.child ul.dtr-details > li { border-bottom-color: var(--line); }
table.dataTable > tbody > tr.child span.dtr-title { color: var(--muted); font-weight: 700; font-size: .82rem; }
div.dt-container td.dt-empty { color: var(--muted); padding: 2rem 1rem; }
@media (max-width: 575.98px) {
  div.dt-container div.dt-search input { min-width: 0; width: 100%; margin-left: 0; margin-top: .3rem; }
  div.dt-container div.dt-search label { display: block; }
  div.dt-container .dt-layout-row:not(.dt-layout-table) { flex-direction: column; align-items: stretch !important; }
  div.dt-container .dt-layout-cell { justify-content: flex-start !important; }
}

/* ---------- Giris / kayit (yetkilendirme sayfalari) ---------- */
.auth-wrap { display: flex; justify-content: center; padding: 1.5rem 0 2rem; }
.auth-card { width: 100%; max-width: 460px; overflow: hidden; }
.auth-card .auth-cover {
  height: 84px;
  background:
    linear-gradient(90deg, transparent calc(50% - 1.5px), rgba(255,255,255,.55) calc(50% - 1.5px), rgba(255,255,255,.55) calc(50% + 1.5px), transparent calc(50% + 1.5px)),
    linear-gradient(180deg, transparent 30%, rgba(255,255,255,.55) 30%, rgba(255,255,255,.55) calc(30% + 2px), transparent calc(30% + 2px)),
    linear-gradient(135deg, var(--court), var(--court-800));
  border-bottom: 3px solid var(--ball);
}
.auth-card .auth-body { padding: 1.75rem; }
.auth-card .auth-icon {
  width: 56px; height: 56px; border-radius: 16px; margin-top: -3.4rem; margin-bottom: .9rem; position: relative;
  background: var(--card); color: var(--court); box-shadow: var(--shadow); display: inline-flex; align-items: center; justify-content: center; font-size: 1.6rem;
}
.auth-card h1 { font-size: 1.5rem; margin-bottom: .25rem; }
.auth-card .auth-sub { color: var(--muted); margin-bottom: 1.25rem; }
.auth-card .auth-foot { border-top: 1px solid var(--line); margin-top: 1.25rem; padding-top: 1rem; color: var(--muted); font-size: .9rem; text-align: center; }
@media (max-width: 575.98px) { .auth-card .auth-body { padding: 1.25rem; } }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; background: rgba(5, 15, 10, .92); z-index: 2000; display: none; align-items: center; justify-content: center; padding: 2rem; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }
.lightbox button { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; width: 46px; height: 46px; border-radius: 50%; font-size: 1.3rem; }
.lightbox .lb-close { top: 1rem; right: 1rem; }
.lightbox .lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }

.text-court { color: var(--court) !important; }
.text-clay { color: var(--clay) !important; }
.bg-court { background: var(--court) !important; }
.fw-800 { font-weight: 800 !important; }
.min-w-0 { min-width: 0; }

/* ---------- Kulupler ---------- */
.club-card { display: flex; flex-direction: column; height: 100%; overflow: hidden; color: inherit; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.club-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: inherit; }
.club-cover { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--court) 0%, var(--court-800) 100%); overflow: hidden; }
.club-cover img { width: 100%; height: 100%; object-fit: cover; }
.club-cover-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, .55); font-size: 2.6rem; }
.club-status, .club-status-inline { font-size: .72rem; font-weight: 700; border-radius: 999px; padding: .15rem .6rem; }
.club-status { position: absolute; left: 10px; top: 10px; }
.club-status-inline { vertical-align: middle; margin-left: .35rem; }
.status-pending { background: #fff3cd; color: #7a5a00; }
.status-rejected { background: #f8d7da; color: #842029; }
.status-suspended { background: #e2e3e5; color: #41464b; }
.status-following { background: var(--ball); color: var(--court-800); }
.club-name { font-weight: 800; font-size: 1.05rem; color: var(--ink); line-height: 1.25; overflow-wrap: anywhere; }
.club-hero { overflow: hidden; }
.club-hero-cover { position: relative; aspect-ratio: 21 / 7; min-height: 160px; background: linear-gradient(135deg, var(--court) 0%, var(--court-800) 100%); }
.club-hero-cover img { width: 100%; height: 100%; object-fit: cover; }
.club-hero h1 { overflow-wrap: anywhere; }
.club-stat { background: var(--bg); border-radius: 12px; padding: .75rem; text-align: center; height: 100%; }
.club-stat .v { display: block; font-size: 1.4rem; font-weight: 800; color: var(--court); }
.club-stat .l { display: block; font-size: .78rem; color: var(--muted); }
.club-contact li, .club-managers li { padding: .45rem 0; border-bottom: 1px solid rgba(0, 0, 0, .06); overflow-wrap: anywhere; }
.club-contact li:last-child, .club-managers li:last-child { border-bottom: 0; }
.club-contact li { display: flex; gap: .6rem; align-items: baseline; }
.club-contact .bi { color: var(--court); }
.club-announcements li { padding: .9rem 0; border-bottom: 1px solid rgba(0, 0, 0, .06); }
.club-announcements li:last-child { border-bottom: 0; padding-bottom: 0; }
.club-composer { background: var(--bg); border-radius: 12px; padding: .9rem; }
@media (max-width: 575.98px) { .club-hero-cover { aspect-ratio: 16 / 9; } }
.weather-icon { font-size: 2.8rem; color: var(--court); line-height: 1; }
.weather-temp { font-size: 2.2rem; font-weight: 800; line-height: 1; }
.weather-play { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; font-size: .85rem; border-radius: 999px; padding: .2rem .7rem; background: var(--court-050); color: var(--court); }
.weather-play .bi { font-size: .55rem; }
.play-windy .weather-play, .play-hot .weather-play, .play-cold .weather-play { background: #fff3cd; color: #7a5a00; }
.play-wet .weather-play, .play-storm .weather-play { background: #f8d7da; color: #842029; }
.weather-hours { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .25rem; text-align: center; }
.weather-hours .wh { background: var(--bg); border-radius: 10px; padding: .35rem .1rem; }

/* ---------- Bildirimler ---------- */
.notif-list li { padding: .9rem 1.1rem; border-bottom: 1px solid rgba(0, 0, 0, .06); }
.notif-list li:last-child { border-bottom: 0; }
.notif-list li.unread { background: var(--court-050); }
.notif-icon { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 12px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--bg); color: var(--court); font-size: 1.25rem; }
.notif-icon img { width: 100%; height: 100%; object-fit: cover; }
.notif-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.notif-dot { flex: 0 0 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--clay); margin-top: .4rem; }
