/* Spor Salonu Yönetim — temel tasarım sistemi. Modül stilleri ayrı dosyalarda. */

:root {
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #eef2f7;
  --border: #e3e8ef;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --faint: #94a3b8;

  --primary: #2563eb;
  --primary-600: #1d4ed8;
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --success: #15803d;
  --success-50: #ecfdf3;
  --success-100: #d1fadf;
  --warning: #b45309;
  --warning-50: #fffbeb;
  --warning-100: #fef0c7;
  --danger: #dc2626;
  --danger-50: #fef2f2;
  --danger-100: #fee2e2;
  --info: #0369a1;
  --info-50: #f0f9ff;
  --info-100: #e0f2fe;
  --neutral-50: #f1f5f9;
  --neutral-100: #e2e8f0;

  --sidebar-bg: #0f172a;
  --sidebar-text: #cbd5e1;
  --sidebar-active: #1e293b;

  --radius: 10px;
  --radius-sm: 7px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-lg: 0 20px 45px -12px rgba(15, 23, 42, .28);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace;
  --sidebar-w: 248px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 650; }
p { margin: 0 0 .75em; }
img { max-width: 100%; }
.icon { flex: none; vertical-align: middle; }
.boot { padding: 40px; color: var(--muted); }
[hidden] { display: none !important; }

/* ------------------------------------------------------------ Layout */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: none; background: var(--sidebar-bg); color: var(--sidebar-text);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 40;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 20px 18px 16px; }
.brand-logo {
  width: 40px; height: 40px; border-radius: 11px; background: var(--primary); color: #fff;
  display: grid; place-items: center; flex: none;
}
.brand-name { color: #fff; font-weight: 650; font-size: 15px; line-height: 1.2; word-break: break-word; }
.brand-sub { font-size: 12px; color: #94a3b8; }
.nav { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px;
  color: var(--sidebar-text); font-weight: 500; font-size: 14px; text-decoration: none !important;
  border: 0; background: none; width: 100%; text-align: left; cursor: pointer; font-family: inherit;
}
.nav-item:hover { background: var(--sidebar-active); color: #fff; }
.nav-item.active { background: var(--primary); color: #fff; }
.sidebar-footer { padding: 10px; border-top: 1px solid #1e293b; display: flex; flex-direction: column; gap: 2px; }
.sidebar-user { padding: 6px 12px 8px; display: flex; flex-direction: column; min-width: 0; }
.sidebar-user strong { color: #fff; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user small { color: #94a3b8; font-size: 12px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: 60px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 16px; padding: 0 24px;
}
.topbar-title { font-weight: 650; font-size: 16px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-toggle { display: none; }
.content { padding: 24px; flex: 1; min-width: 0; }
.page-inner { max-width: 1440px; margin: 0 auto; }
.sidebar-scrim { display: none; }

.global-search { position: relative; width: 340px; max-width: 45vw; display: flex; align-items: center; }
.global-search > .icon { position: absolute; left: 10px; color: var(--faint); pointer-events: none; }
.global-search .input { padding-left: 32px; background: var(--surface-2); }
.global-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; z-index: 50; max-height: 420px; overflow-y: auto;
}
.global-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; color: var(--text); text-decoration: none !important; }
.global-item span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.global-item small { color: var(--muted); }
.global-item:hover, .global-item.active { background: var(--primary-50); }
.global-empty { padding: 12px; color: var(--muted); }

@media (max-width: 960px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .sidebar-scrim { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.4); z-index: 35; }
  .menu-toggle { display: inline-grid; }
  .content { padding: 16px; }
  .topbar { padding: 0 16px; }
  .global-search { width: 200px; }
}

/* ------------------------------------------------------------ Page header */
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-title { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.page-sub { color: var(--muted); margin-top: 4px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ------------------------------------------------------------ Grid & utilities */
.grid { display: grid; gap: 16px; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-2-1 { display: grid; gap: 16px; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.grid-1-2 { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.kpi-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); margin-bottom: 16px; }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3, .grid-2-1, .grid-1-2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) { .grid-2, .grid-4 { grid-template-columns: minmax(0, 1fr); } }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.spacer { flex: 1; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.strong { font-weight: 650; }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.ta-right { text-align: right; } .ta-center { text-align: center; }
.text-success { color: var(--success); } .text-danger { color: var(--danger); } .text-warning { color: var(--warning); } .text-info { color: var(--info); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }

/* ------------------------------------------------------------ Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); min-width: 0; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.card-title { font-size: 15px; font-weight: 650; }
.card-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.card-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.card-body { padding: 16px 18px; }
.card-body.flush, .card.flush .card-body { padding: 0; }
.card + .card { margin-top: 0; }

/* ------------------------------------------------------------ KPI tiles */
.kpi {
  display: flex; gap: 14px; align-items: center; padding: 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; min-width: 0;
}
a.kpi:hover { border-color: var(--primary); }
.kpi-icon { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.kpi-primary { background: var(--primary-50); color: var(--primary); }
.kpi-success { background: var(--success-50); color: var(--success); }
.kpi-warning { background: var(--warning-50); color: var(--warning); }
.kpi-danger { background: var(--danger-50); color: var(--danger); }
.kpi-info { background: var(--info-50); color: var(--info); }
.kpi-neutral { background: var(--neutral-50); color: var(--text-2); }
.kpi-body { min-width: 0; }
.kpi-label { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.kpi-value { font-size: 22px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; font-variant-numeric: tabular-nums; }
.kpi-sub { color: var(--muted); font-size: 12px; }

/* ------------------------------------------------------------ Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px;
  border-radius: var(--radius-sm); border: 1px solid transparent; font: inherit; font-weight: 550; font-size: 13.5px;
  cursor: pointer; white-space: nowrap; text-decoration: none !important; transition: background .12s, border-color .12s, box-shadow .12s;
}
.btn:focus-visible, .btn-icon:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-600); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-2); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #b91c1c; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover:not(:disabled) { background: #166534; }
.btn-warning { background: #d97706; color: #fff; }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-3); }
.btn-outline-danger { background: var(--surface); color: var(--danger); border-color: #fecaca; }
.btn-outline-danger:hover:not(:disabled) { background: var(--danger-50); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; gap: 5px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-icon {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 0; background: transparent;
  color: var(--text-2); cursor: pointer;
}
.btn-icon:hover { background: var(--surface-3); color: var(--text); }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; }
.btn-group .btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.btn-group .btn:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.btn-group .btn + .btn { margin-left: -1px; }
.btn-group .btn.active { background: var(--primary-50); color: var(--primary); border-color: var(--primary); z-index: 1; }

/* ------------------------------------------------------------ Forms */
.form { display: block; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: minmax(0, 1fr); } .span-2 { grid-column: auto !important; } }
.span-2 { grid-column: span 2; }
.span-1 { grid-column: span 1; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.label { font-weight: 550; font-size: 13px; color: var(--text-2); }
.req { color: var(--danger); margin-left: 3px; }
.form-help { color: var(--muted); font-size: 12px; }
.form-section {
  font-weight: 650; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted);
  padding-top: 8px; border-top: 1px solid var(--border); margin-top: 4px;
}
.form-section:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.input {
  width: 100%; height: 36px; padding: 0 11px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: inherit; font-size: 14px; transition: border-color .12s, box-shadow .12s;
}
textarea.input { height: auto; padding: 8px 11px; resize: vertical; min-height: 70px; line-height: 1.45; }
select.input { padding-right: 28px; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.input:disabled { background: var(--surface-3); color: var(--muted); }
.input-sm { height: 30px; font-size: 13px; padding: 0 8px; }
.input[type=color] { padding: 3px; width: 64px; }
.input-affix { position: relative; display: flex; align-items: center; }
.input-affix .input { padding-right: 30px; }
.input-affix .affix { position: absolute; right: 10px; color: var(--muted); pointer-events: none; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; user-select: none; }
.check input { width: 16px; height: 16px; accent-color: var(--primary); margin: 0; }
.search-box { position: relative; display: flex; align-items: center; min-width: 220px; flex: 1; }
.search-box > .icon { position: absolute; left: 10px; color: var(--faint); pointer-events: none; }
.search-box .input { padding-left: 32px; }

/* Filter toolbar above lists */
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .input { width: auto; min-width: 150px; }
.toolbar .search-box { max-width: 380px; }

/* Segmented control */
.segmented { display: inline-flex; background: var(--surface-3); border-radius: 9px; padding: 3px; gap: 2px; }
.segmented button { border: 0; background: transparent; padding: 5px 12px; border-radius: 7px; font: inherit; font-weight: 550; font-size: 13px; color: var(--text-2); cursor: pointer; }
.segmented button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ------------------------------------------------------------ Tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .03em;
  padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap;
}
.table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; }
.table tbody tr:hover td { background: #fafcff; }
.table tfoot td { font-weight: 650; background: var(--surface-2); border-top: 1px solid var(--border); }
.table .ta-right { text-align: right; }
.table .ta-center { text-align: center; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.card .table-wrap { border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.cell-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cell-user > span { display: flex; flex-direction: column; min-width: 0; }
.cell-user small { color: var(--muted); }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 4px; }
.pager-buttons { display: flex; gap: 6px; }

/* ------------------------------------------------------------ Badges, dots, avatars */
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
  white-space: nowrap; line-height: 1.6;
}
.badge-success { background: var(--success-100); color: #14532d; }
.badge-warning { background: var(--warning-100); color: #7c2d12; }
.badge-danger { background: var(--danger-100); color: #991b1b; }
.badge-info { background: var(--info-100); color: #0c4a6e; }
.badge-primary { background: var(--primary-100); color: #1e3a8a; }
.badge-neutral { background: var(--neutral-100); color: #334155; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; vertical-align: middle; }
.avatar { border-radius: 50%; object-fit: cover; flex: none; display: inline-block; background: var(--surface-3); }
.avatar-initials { display: inline-grid; place-items: center; font-weight: 650; letter-spacing: .02em; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: 12.5px; }
.chip .btn-icon { width: 20px; height: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ------------------------------------------------------------ Tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.tab {
  display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; border: 0; background: none; font: inherit; font-weight: 550;
  color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; flex: none;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-count { background: var(--surface-3); color: var(--text-2); border-radius: 999px; padding: 0 7px; font-size: 11.5px; }
.tab.active .tab-count { background: var(--primary-100); color: var(--primary); }

/* ------------------------------------------------------------ Alerts, empty, loading */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); border: 1px solid; font-size: 13.5px; }
.alert .icon { margin-top: 1px; }
.alert-danger { background: var(--danger-50); border-color: #fecaca; color: #7f1d1d; }
.alert-warning { background: var(--warning-50); border-color: #fde68a; color: #78350f; }
.alert-info { background: var(--info-50); border-color: #bae6fd; color: #0c4a6e; }
.alert-success { background: var(--success-50); border-color: #bbf7d0; color: #14532d; }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 36px 16px; color: var(--muted); text-align: center; }
.empty-state .icon { color: var(--faint); }
.empty-title { font-weight: 600; color: var(--text-2); }
.empty-state .btn { margin-top: 8px; }
.loading { display: flex; align-items: center; gap: 10px; padding: 28px; color: var(--muted); justify-content: center; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--border-strong); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------ Description list */
.dl { display: grid; grid-template-columns: minmax(120px, auto) 1fr; gap: 8px 16px; margin: 0; }
.dl dt { color: var(--muted); font-size: 13px; }
.dl dd { margin: 0; font-weight: 500; word-break: break-word; }

/* Simple list rows */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); min-width: 0; }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item small { color: var(--muted); display: block; }
a.list-item { color: inherit; text-decoration: none !important; }
a.list-item:hover { background: var(--surface-2); }

/* Progress bar */
.progress { height: 8px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.progress.success > span { background: var(--success); }
.progress.warning > span { background: #d97706; }
.progress.danger > span { background: var(--danger); }

/* ------------------------------------------------------------ Modal */
#modal-root { position: relative; z-index: 100; }
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: flex; align-items: flex-start; justify-content: center;
  padding: 5vh 16px; overflow-y: auto; opacity: 0; transition: opacity .15s;
}
.modal-backdrop.show { opacity: 1; }
.modal {
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%;
  display: flex; flex-direction: column; max-height: none; transform: translateY(8px); transition: transform .15s;
}
.modal-backdrop.show .modal { transform: none; }
.modal-sm { max-width: 420px; } .modal-md { max-width: 620px; } .modal-lg { max-width: 860px; } .modal-xl { max-width: 1140px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-title { font-size: 17px; font-weight: 650; }
.modal-body { padding: 18px 20px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); flex-wrap: wrap; }
.confirm-text { white-space: pre-line; margin: 0; }

/* ------------------------------------------------------------ Toasts */
#toast-root { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 200; max-width: min(420px, calc(100vw - 40px)); }
.toast {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); background: #0f172a; color: #fff;
  box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(10px); transition: opacity .2s, transform .2s; font-size: 13.5px;
}
.toast.show { opacity: 1; transform: none; }
.toast-success .icon { color: #4ade80; }
.toast-error { background: #7f1d1d; }
.toast-error .icon { color: #fecaca; }
.toast-warning .icon { color: #fbbf24; }
.toast-info .icon { color: #7dd3fc; }

/* ------------------------------------------------------------ Member picker */
.picker-toolbar { display: flex; gap: 8px; margin-bottom: 10px; }
.picker-toolbar .picker-status { width: 160px; flex: none; }
.picker-list { max-height: 50vh; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.picker-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--border); cursor: pointer; }
.picker-item:last-child { border-bottom: 0; }
.picker-item:hover { background: var(--surface-2); }
.picker-item.disabled { opacity: .55; cursor: default; }
.picker-item input { width: 16px; height: 16px; accent-color: var(--primary); }
.picker-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.picker-name small { color: var(--muted); }
.picker-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.picker-count { color: var(--muted); font-size: 13px; }

/* ------------------------------------------------------------ Auth screens */
.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(160deg, #0f172a 0%, #1e3a8a 100%); }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border-radius: 18px; padding: 28px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 14px; }
.auth-card h1 { font-size: 22px; }
.auth-card h2 { font-size: 19px; }
.auth-card .form { display: flex; flex-direction: column; gap: 12px; }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.auth-title { font-weight: 700; font-size: 17px; }
.recovery-code {
  font-family: var(--mono); font-size: 22px; font-weight: 700; letter-spacing: .08em; text-align: center; padding: 16px;
  background: var(--warning-50); border: 1px dashed #f59e0b; border-radius: var(--radius); user-select: all;
}

/* ------------------------------------------------------------ Print */
@media print {
  .sidebar, .topbar, .page-actions, .toolbar, .tabs, #toast-root { display: none !important; }
  .content { padding: 0; }
  body { background: #fff; }
  .card { box-shadow: none; }
}

/* Modül sarmalayıcıları ve tek elemanı kalan ızgaralar */
.mod-wrap { display: contents; }
.grid-single { grid-template-columns: minmax(0, 1fr) !important; }
.grid-n2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
@media (max-width: 720px) { .grid-n2 { grid-template-columns: minmax(0, 1fr) !important; } }

.brand-logo { background: linear-gradient(135deg, #4f46e5, #db2777); }

/* Rol bazlı gizleme: req-staff = Yönetici + Personel, req-admin = yalnızca Yönetici (asıl denetim sunucudadır). */
.role-trainer .req-staff, .role-trainer .req-admin, .role-staff .req-admin { display: none !important; }

/* ------------------------------------------------------------ Telefona kurulu uygulama (PWA): çentik ve alt çubuk boşlukları */
.sidebar { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
.topbar { height: calc(60px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top);
  padding-left: max(24px, env(safe-area-inset-left)); padding-right: max(24px, env(safe-area-inset-right)); }
.content { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
#toast-root { bottom: calc(20px + env(safe-area-inset-bottom)); }
.auth-screen { padding-top: calc(24px + env(safe-area-inset-top)); padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
@media (max-width: 960px) {
  .topbar { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .content { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
}
@media (display-mode: standalone) {
  body { overscroll-behavior-y: none; }
}
