/* Üyeler, Gruplar, Antrenörler (A) */

/* ------------------------------------------------------------ Liste */
.mbr-status-bar { margin-bottom: 12px; overflow-x: auto; }
.mbr-segments button { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.mbr-seg-count { background: var(--surface); color: var(--muted); border-radius: 999px; padding: 0 7px; font-size: 11.5px; font-weight: 600; }
.mbr-segments button.active .mbr-seg-count { background: var(--primary-100); color: var(--primary); }
.mbr-check-pill {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; font-weight: 500; user-select: none; white-space: nowrap;
}
.mbr-check-pill input { width: 15px; height: 15px; accent-color: var(--primary); margin: 0; }
.mbr-check-pill:has(input:checked) { border-color: var(--primary); background: var(--primary-50); color: var(--primary); }
.mbr-list-card { overflow: hidden; }
.mbr-loading { opacity: .55; pointer-events: none; transition: opacity .15s; }
.mbr-cell-stack { display: flex; flex-direction: column; line-height: 1.35; }
.mbr-cell-stack small { font-size: 12px; }
.mbr-groups-cell { max-width: 220px; }
.mbr-groups-cell span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
tr.mbr-row-archived td { color: var(--muted); }
tr.mbr-row-archived .avatar { filter: grayscale(1); opacity: .7; }

/* ------------------------------------------------------------ Form */
.mbr-form { display: flex; flex-direction: column; gap: 16px; max-width: 980px; }
.mbr-card-title { display: flex; align-items: center; gap: 9px; color: var(--text-2); }
.mbr-form-personal { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 720px) { .mbr-form-personal { grid-template-columns: minmax(0, 1fr); } }
.mbr-photo-box { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.mbr-photo-preview {
  width: 140px; height: 140px; border-radius: 50%; border: 2px dashed var(--border-strong); background: var(--surface-2);
  padding: 0; cursor: pointer; display: grid; place-items: center; overflow: hidden; color: var(--muted);
}
.mbr-photo-preview:hover { border-color: var(--primary); color: var(--primary); }
.mbr-photo-preview .avatar { border-radius: 50%; }
.mbr-photo-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 550; }
.mbr-photo-buttons { display: flex; flex-direction: column; gap: 6px; align-items: stretch; width: 100%; }
.mbr-minor-alert { margin: 0; }
.mbr-guardian-toggle { padding: 2px 4px; }
.mbr-form-sub { margin-bottom: 8px; }
.mbr-form-actions {
  position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 16px; background: rgba(255, 255, 255, .94); backdrop-filter: blur(6px); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.mbr-form-actions [data-dirty-note] { margin-right: auto; color: var(--warning); }

/* Seçilebilir grup / antrenör çipleri */
.mbr-chip-select { display: flex; flex-wrap: wrap; gap: 8px; }
.mbr-chip-opt {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 8px; border: 1px solid var(--border-strong);
  border-radius: 999px; background: var(--surface); font: inherit; font-size: 13px; cursor: pointer; color: var(--text);
}
.mbr-chip-opt small { color: var(--muted); font-size: 11.5px; }
.mbr-chip-opt:hover { border-color: var(--primary); }
.mbr-chip-check {
  width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--border-strong); display: grid; place-items: center; color: transparent;
}
.mbr-chip-opt.is-on { background: var(--primary-50); border-color: var(--primary); }
.mbr-chip-opt.is-on .mbr-chip-check { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Renk seçici */
.mbr-swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mbr-swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border-strong); cursor: pointer; padding: 0; }
.mbr-swatch.is-on { box-shadow: 0 0 0 2px var(--text); }
.mbr-color-input { width: 44px !important; height: 30px; padding: 2px !important; }

/* ------------------------------------------------------------ Detay */
.mbr-back { margin-bottom: 8px; }
.mbr-hero { padding: 20px; display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; margin-bottom: 16px; }
.mbr-hero.is-archived { background: var(--surface-2); }
.mbr-hero-main { display: flex; gap: 20px; min-width: 0; flex: 1 1 480px; }
.mbr-hero-photo { position: relative; border: 0; background: none; padding: 0; cursor: pointer; flex: none; border-radius: 50%; height: 104px; }
.mbr-hero-photo .avatar { box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--border); }
.mbr-hero-photo-edit {
  position: absolute; right: 2px; bottom: 2px; width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: #fff;
  display: grid; place-items: center; box-shadow: 0 0 0 3px var(--surface);
}
.mbr-hero-info { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.mbr-hero-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mbr-hero-title h1 { font-size: 22px; letter-spacing: -.01em; }
.mbr-hero-meta, .mbr-hero-contacts { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); font-size: 13px; }
.mbr-hero-contacts span { display: inline-flex; align-items: center; gap: 5px; color: var(--text-2); }
.mbr-hero-guardian { color: var(--warning) !important; font-weight: 550; }
.mbr-hero-ms { margin-top: 4px; display: flex; flex-direction: column; gap: 3px; }
.mbr-hero-actions { display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; justify-content: flex-end; flex: 1 1 260px; }
.mbr-hero-alert { flex-basis: 100%; }
@media (max-width: 640px) { .mbr-hero-main { flex-direction: column; } .mbr-hero-actions { justify-content: flex-start; } }
.mbr-tabs .tabs { margin-bottom: 16px; }
.mbr-tab-pane { min-height: 120px; }
.mbr-general .card { align-self: start; }
.mbr-pre { white-space: pre-line; }
.mbr-health { display: flex; gap: 7px; color: var(--danger); align-items: flex-start; }
.mbr-health .mbr-pre { color: var(--text); }
.mbr-swatch-bar { width: 4px; align-self: stretch; border-radius: 4px; flex: none; }
.mbr-empty-mini { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 10px 0; }
.mbr-empty-mini .icon { color: var(--faint); }
.mbr-danger-confirm .alert { margin: 0; }
.mbr-relations { display: none; }

/* Ders satırları */
.mbr-lessons .list-item { padding: 8px 0; }
.mbr-date-chip {
  width: 44px; flex: none; text-align: center; border: 1px solid var(--border); border-radius: 9px; padding: 3px 0; line-height: 1.15; background: var(--surface-2);
}
.mbr-date-chip strong { display: block; font-size: 16px; }
.mbr-date-chip span { font-size: 11px; color: var(--muted); text-transform: uppercase; }
.mbr-lesson.is-cancelled strong { text-decoration: line-through; color: var(--muted); }

/* ------------------------------------------------------------ Fotoğraf seçici */
.pp { display: flex; flex-direction: column; gap: 12px; }
.pp-top { display: flex; justify-content: center; }
.pp-modes button { display: inline-flex; align-items: center; gap: 6px; }
.pp-modes button:disabled { opacity: .45; cursor: not-allowed; }
.pp-stage { display: flex; justify-content: center; }
.pp-pane { width: 100%; max-width: 380px; }
.pp-camera { position: relative; aspect-ratio: 4 / 3; background: #0f172a; border-radius: var(--radius); overflow: hidden; }
.pp-video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: block; }
.pp-guide {
  position: absolute; top: 50%; left: 50%; width: 62%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  box-shadow: 0 0 0 999px rgba(15, 23, 42, .35); border: 2px dashed rgba(255, 255, 255, .75); pointer-events: none;
}
.pp-msg {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px;
  text-align: center; padding: 20px; color: #fff; background: rgba(15, 23, 42, .82); font-size: 13.5px;
}
.pp-drop {
  aspect-ratio: 4 / 3; border: 2px dashed var(--border-strong); border-radius: var(--radius); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 20px; cursor: pointer; color: var(--muted); background: var(--surface-2);
}
.pp-drop strong { color: var(--text); }
.pp-drop:hover, .pp-drop.is-over { border-color: var(--primary); background: var(--primary-50); color: var(--primary); }
.pp-crop { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.pp-canvas-wrap { width: 100%; max-width: 360px; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; position: relative; background: var(--surface-3); }
.pp-canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.pp-canvas.is-dragging { cursor: grabbing; }
.pp-canvas-wrap::after { content: ''; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 999px rgba(255, 255, 255, .45); pointer-events: none; }
.pp-zoom { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 360px; color: var(--muted); }
.pp-zoom input { flex: 1; accent-color: var(--primary); }
.pp-controls { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; min-height: 36px; }
.pp-device { width: auto; max-width: 220px; }

/* ------------------------------------------------------------ Gruplar */
.grp-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grp-card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); overflow: hidden; color: var(--text); text-decoration: none !important; min-width: 0;
}
.grp-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.grp-card.is-passive { opacity: .7; }
.grp-card-band { height: 5px; }
.grp-card-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.grp-card-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.grp-card-name { font-weight: 650; font-size: 15.5px; line-height: 1.3; }
.grp-card-meta { color: var(--muted); font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 2px 12px; }
.grp-card-meta span { display: inline-flex; align-items: center; gap: 4px; }
.grp-cap { display: flex; flex-direction: column; gap: 5px; }
.grp-cap-text { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.grp-cap-text strong { color: var(--text); font-variant-numeric: tabular-nums; }
.grp-card-foot { border-top: 1px solid var(--border); padding: 10px 16px; display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); background: var(--surface-2); }
.grp-card-foot .icon { color: var(--muted); }
.grp-trainers { display: flex; flex-wrap: wrap; gap: 6px; }
.grp-hero { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; padding: 18px 20px; margin-bottom: 16px; }
.grp-hero-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.grp-hero-title h1 { font-size: 22px; }
.grp-hero-color { width: 14px; height: 14px; border-radius: 4px; flex: none; }
.grp-hero-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); margin-top: 6px; font-size: 13px; }
.grp-hero-meta span { display: inline-flex; align-items: center; gap: 5px; }
.grp-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 16px; }
.grp-stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; }
.grp-stat-label { color: var(--muted); font-size: 12px; }
.grp-stat-value { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.grp-role { font-size: 11.5px; }

/* ------------------------------------------------------------ Antrenörler */
.trn-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.trn-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 20px 16px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  color: var(--text); text-decoration: none !important; position: relative; min-width: 0;
}
.trn-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.trn-card.is-passive { opacity: .65; }
.trn-card .avatar { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--trn-color, var(--border)); }
.trn-card-name { font-weight: 650; font-size: 15px; margin-top: 4px; }
.trn-card-sub { color: var(--muted); font-size: 12.5px; }
.trn-card-stats { display: flex; justify-content: center; gap: 0; width: 100%; border-top: 1px solid var(--border); margin-top: 6px; padding-top: 10px; }
.trn-card-stats div { flex: 1; display: flex; flex-direction: column; }
.trn-card-stats div + div { border-left: 1px solid var(--border); }
.trn-card-stats strong { font-size: 17px; font-variant-numeric: tabular-nums; }
.trn-card-stats span { font-size: 11.5px; color: var(--muted); }
.trn-card .badge { position: absolute; top: 10px; right: 10px; }
.mbr-minor-opt { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; margin-bottom: 14px; background: var(--warning-50); border: 1px solid #fde68a; border-radius: var(--radius); }

/* Aile & kardeşler */
.fam-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.fam-head .grow { flex: 1; min-width: 220px; }
.fam-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.fam-member { display: flex; gap: 12px; align-items: center; padding: 14px; color: inherit; text-decoration: none !important; }
.fam-member:hover { border-color: var(--primary); }
.fam-member.is-me { border-color: var(--primary); background: var(--primary-50); }
.fam-member .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fam-member small { color: var(--muted); }
.fam-dues { max-height: 320px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.fam-due { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--border); cursor: pointer; }
.fam-due:last-child { border-bottom: 0; }
.fam-due .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fam-due small { color: var(--muted); }
.fam-due input { width: 16px; height: 16px; accent-color: var(--primary); }

/* ------------------------------------------------------------ İçe aktarma */
.mim .mt-4 { margin-top: 6px; }
.mim-pick { align-items: center; gap: 12px; }
.mim-opt { align-self: flex-start; }
.mim-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 12px; }
.mim-cols { gap: 10px; margin-bottom: 12px; }
.mim-cols .label { display: block; margin-bottom: 4px; }
.mim-msg { min-width: 220px; }
.mim-row-error td { background: var(--danger-50); }
.mim-row-duplicate td { opacity: .65; }
@media (max-width: 720px) { .mim-kpis { grid-template-columns: 1fr; } }
