/* =====================================================================
   DZ Club Manager - Clean professional theme
   Calm cool neutrals, one accent (the club colour), flat surfaces with
   hairline borders, Readex Pro, line icons, phone-first shell.
   Loaded after the base stylesheets: it only overrides.
   ===================================================================== */

:root {
  --ink: #17212b;
  --ink-2: #3f4b56;
  --muted: #5b6670;
  --paper: #f4f6f5;
  --surface: #ffffff;
  --line: #e2e7e4;
  --line-strong: #cfd6d2;
  --ochre: #b7791f;
  --ochre-soft: #fbf3e4;
  --brick: #b4402c;
  --brick-soft: #fbece8;
  --sea: #1f6f99;
  --sea-soft: #e8f2f8;
  --leaf: #13804f;
  --leaf-soft: #e6f4ec;

  --bg-app: var(--paper);
  --bg-surface: var(--surface);
  --bg-surface-subtle: #f7f9f8;
  --bg-hover: #eef2f0;
  --bg-active: #e5ebe8;
  --border-subtle: #edf1ef;
  --border-light: var(--line);
  --border-medium: var(--line-strong);
  --text-primary: var(--ink);
  --text-secondary: var(--ink-2);
  --text-muted: var(--muted);

  --success: var(--leaf);
  --success-light: var(--leaf-soft);
  --success-text: #0d6a40;
  --warning: var(--ochre);
  --warning-light: var(--ochre-soft);
  --warning-text: #8a5a12;
  --danger: var(--brick);
  --danger-light: var(--brick-soft);
  --danger-text: #92321f;
  --info: var(--sea);
  --info-light: var(--sea-soft);
  --info-text: #185a7d;

  --shadow-xs: none;
  --shadow-sm: 0 1px 2px rgba(23, 33, 43, 0.04);
  --shadow-md: 0 4px 14px rgba(23, 33, 43, 0.06);
  --shadow-lg: 0 12px 32px rgba(23, 33, 43, 0.10);
  --shadow-xl: 0 24px 60px rgba(23, 33, 43, 0.18);
  --shadow-card: none;
  --shadow-card-hover: none;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 14px;

  --sidebar-width: 15.5rem;
  --header-height: 3.75rem;

  --font-arabic: 'Readex Pro', 'Segoe UI', Tahoma, system-ui, sans-serif;
  --font-num: 'Readex Pro', 'Segoe UI', Tahoma, system-ui, sans-serif;
}

/* Text size: 16px by default, the user can choose larger (menu → حجم الخط) */
html { font-size: 16px; }
html[data-text="lg"] { font-size: 18px; }
html[data-text="xl"] { font-size: 20px; }
html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-arabic);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body { font-size: 1rem; font-variant-numeric: tabular-nums; }

:focus-visible { outline: 2px solid var(--club-primary); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

.animate-fade-in { animation: none !important; }

/* ---------- Sidebar ---------- */
.sidebar {
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: none;
}
.sidebar-header {
  height: auto;
  min-height: var(--header-height);
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.club-brand-container { gap: 10px; }
.club-avatar-logo {
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  object-fit: contain;
  padding: 3px;
  box-shadow: none;
}
.club-name { font-size: 0.95rem; font-weight: 600; color: var(--ink); }
.club-season-badge { font-size: 0.8rem; color: var(--muted); background: none; padding: 0; border: 0; font-weight: 500; }
.sidebar-toggle-btn { border-color: transparent; color: var(--muted); }

.sidebar-nav { padding: 12px 10px; gap: 2px; }
.nav-section-title {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  padding: 16px 12px 6px;
  margin: 0;
}
.nav-item {
  height: 40px;
  padding: 0 12px;
  gap: 12px;
  border-radius: 8px;
  color: var(--ink-2);
  font-weight: 500;
  font-size: 0.93rem;
}
.nav-item svg { width: 19px; height: 19px; flex-shrink: 0; stroke-width: 1.8; opacity: 0.9; }
.nav-item:hover { background: var(--bg-hover); color: var(--ink); }
.nav-item.active {
  background: rgba(var(--club-primary-rgb), 0.09);
  color: var(--club-primary);
  font-weight: 600;
}
.nav-item.active::before { width: 3px; right: -10px; border-radius: 3px 0 0 3px; }

.sidebar-footer { border-top: 1px solid var(--line); padding: 12px 16px; }
.platform-badge { background: none; border: 0; padding: 0; box-shadow: none; }
.platform-logo-small { width: 26px; height: 26px; font-size: 0.8rem; border-radius: 7px; }
.platform-text { font-size: 0.8rem; color: var(--ink-2); }

/* ---------- Top bar ---------- */
.top-header {
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
  padding: 0 24px;
  box-shadow: none;
}
.header-left { gap: 12px; min-width: 0; flex: 1 1 auto; }
.header-titles { min-width: 0; display: flex; flex-direction: column; }
.view-page-title { font-size: 1.12rem; font-weight: 600; color: var(--ink); line-height: 1.3; display: block; }
.view-page-subtitle { font-size: 0.8rem; color: var(--muted); line-height: 1.3; }
.view-page-subtitle:empty { display: none; }
.header-right { gap: 10px; flex-shrink: 0; }

.icon-btn {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
}
.icon-btn svg { width: 20px; height: 20px; }
.mobile-menu-btn { display: none; }

.header-alerts { display: flex; gap: 8px; align-items: center; }
.header-chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.8rem; font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  white-space: nowrap;
}
.chip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.chip-dot.is-warning { background: var(--ochre); }
.chip-dot.is-danger { background: var(--brick); }

.user-menu-wrap { position: relative; }
.user-profile-menu {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 8px 4px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.user-profile-menu:hover, .user-profile-menu[aria-expanded="true"] { background: var(--bg-hover); border-color: var(--line); }
.user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(var(--club-primary-rgb), 0.12);
  color: var(--club-primary);
  font-weight: 700;
  font-size: 0.9rem;
}
.user-name { font-size: 0.88rem; font-weight: 600; color: var(--ink); }
.user-role-label { font-size: 0.8rem; color: var(--muted); font-weight: 500; }
.user-chevron { width: 16px; height: 16px; color: var(--muted); }

.user-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 260px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 200;
}
html[dir="ltr"] .user-menu-panel { left: auto; right: 0; }
.user-menu-panel[hidden] { display: none; }
.user-menu-club { padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.user-menu-club:empty { display: none; }
.user-menu-club-name { font-weight: 600; font-size: 0.92rem; }
.user-menu-club-sub { font-size: 0.8rem; color: var(--muted); margin-top: 2px; }
.user-menu-club-sub.is-warning { color: var(--ochre); font-weight: 600; }
.user-menu-row { padding: 4px 4px 8px; }
.user-menu-row:empty { display: none; }
.user-menu-row .lang-switch-btn { width: 100%; }
.user-menu-item {
  display: block; width: 100%;
  text-align: start;
  padding: 9px 10px;
  border: 0; border-radius: 8px;
  background: none;
  font: inherit; font-size: 0.9rem;
  color: var(--ink-2);
  cursor: pointer;
}
.user-menu-item:hover { background: var(--bg-hover); color: var(--ink); }
.user-menu-item.is-danger { color: var(--brick); }

/* ---------- Content ---------- */
.content-body { padding: 24px; max-width: 1280px; }

/* ---------- Buttons ---------- */
.btn {
  font-weight: 500;
  font-size: 0.88rem;
  border-radius: 8px;
  padding: 0.55rem 1rem;
  box-shadow: none !important;
  transform: none !important;
  gap: 0.45rem;
}
.btn svg { width: 17px; height: 17px; flex-shrink: 0; }
.btn-primary { background: var(--club-primary); color: var(--club-text-on-primary); border-color: var(--club-primary); }
.btn-primary:hover { filter: brightness(0.94); }
.btn-secondary { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn-secondary:hover { background: var(--bg-hover); border-color: var(--line-strong); }
.btn-danger { background: var(--surface); border-color: #e7c3bb; color: var(--brick); }
.btn-danger:hover { background: var(--brick-soft); color: var(--brick); }
.btn-sm { font-size: 0.82rem; padding: 0.38rem 0.75rem; border-radius: 7px; }
.btn-lg { font-size: 0.95rem; padding: 0.75rem 1.3rem; border-radius: 10px; }
.btn-icon, .btn-icon-only { padding: 0 !important; width: 34px; height: 34px; }
.btn-sm.btn-icon { width: 32px; height: 32px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* ---------- Cards ---------- */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: none;
  background: var(--surface);
}
.card:hover { transform: none; box-shadow: none; }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-title { font-size: 1rem; font-weight: 600; }
.card-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 12px 20px; }

/* ---------- Badges ---------- */
.badge {
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 3px 8px;
  border: 0 !important;
}
.badge-success { background: var(--leaf-soft); color: var(--success-text); }
.badge-warning { background: var(--ochre-soft); color: var(--warning-text); }
.badge-danger { background: var(--brick-soft); color: var(--danger-text); }
.badge-info { background: var(--sea-soft); color: var(--info-text); }
.badge-club { background: rgba(var(--club-primary-rgb), 0.1); color: var(--club-primary); }
.badge-category { background: var(--bg-surface-subtle); color: var(--ink-2); font-family: inherit; }

/* ---------- Tables ---------- */
.table-container { border-color: var(--line); border-radius: var(--radius-lg); }
.data-table th {
  background: var(--bg-surface-subtle);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  border-bottom: 1px solid var(--line);
  padding: 10px 16px;
}
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--border-subtle); font-size: 0.9rem; vertical-align: middle; }
.data-table tbody tr:hover { background: #fafbfa; }

/* ---------- Forms ---------- */
.form-label { font-size: 0.84rem; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.form-input, .form-select, .form-textarea {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  font-size: 0.92rem;
  padding: 0.55rem 0.75rem;
  box-shadow: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--club-primary);
  box-shadow: 0 0 0 3px rgba(var(--club-primary-rgb), 0.14);
  outline: none;
}

/* ---------- Modals ---------- */
.modal-overlay { background: rgba(23, 33, 43, 0.45); backdrop-filter: none; }
.modal-dialog { border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow-xl); }
.modal-header { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-title { font-size: 1.05rem; font-weight: 600; }
.modal-body { padding: 20px; }
.modal-footer { padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface); }

/* ---------- Quick actions / stat tiles from the original dashboard ---------- */
.quick-action-bar { box-shadow: none; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.action-chip { border-radius: 8px; box-shadow: none; border: 1px solid var(--line); background: var(--surface); font-weight: 600; }
.stat-card { box-shadow: none; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.stat-card::before, .stat-card::after { display: none; }
.stat-value { font-family: inherit; font-weight: 600; }

/* Original player cards (competitive club): calmer */
.player-card { box-shadow: none !important; border: 1px solid var(--line) !important; border-radius: var(--radius-lg) !important; transform: none !important; }
.player-card-banner { background: var(--bg-surface-subtle) !important; color: var(--ink) !important; border-bottom: 1px solid var(--line); }
.player-card-number { color: var(--ink-2) !important; }
.player-card.is-selected { border-color: var(--club-primary) !important; box-shadow: 0 0 0 2px rgba(var(--club-primary-rgb), 0.18) !important; }

/* ---------- Academy player list ---------- */
.roster { display: flex; flex-direction: column; }
.roster-row {
  display: grid;
  grid-template-columns: auto 44px minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 0.8fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-subtle);
}
.roster-row:last-child { border-bottom: 0; }
.roster-row:hover { background: #fafbfa; }
.roster-head { font-size: 0.8rem; color: var(--muted); font-weight: 600; background: var(--bg-surface-subtle); border-bottom: 1px solid var(--line); }
.roster-head:hover { background: var(--bg-surface-subtle); }
.roster-photo {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(var(--club-primary-rgb), 0.1);
  color: var(--club-primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem; overflow: hidden;
}
.roster-photo img { width: 100%; height: 100%; object-fit: cover; }
.roster-name { font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.roster-sub { font-size: 0.8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.roster-actions { display: flex; gap: 6px; justify-content: flex-end; }
.roster-check { width: 17px; height: 17px; accent-color: var(--club-primary); }
.status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; font-weight: 600; white-space: nowrap; }
.status-pill::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-pill.is-active { color: var(--leaf); }
.status-pill.is-expiring { color: var(--ochre); }
.status-pill.is-expired { color: var(--brick); }
.status-pill.is-none { color: var(--muted); }
.rate-bar { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--ink-2); }
.rate-bar span.track { flex: 1; height: 6px; background: var(--bg-active); border-radius: 3px; overflow: hidden; min-width: 40px; max-width: 90px; }
.rate-bar span.fill { display: block; height: 100%; background: var(--club-primary); border-radius: 3px; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: space-between; margin-bottom: 16px; }
.toolbar-group { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: none; font: inherit; font-size: 0.85rem; padding: 7px 12px; cursor: pointer; color: var(--ink-2); border-inline-start: 1px solid var(--line); }
.seg button:first-child { border-inline-start: 0; }
.seg button.is-on { background: rgba(var(--club-primary-rgb), 0.1); color: var(--club-primary); font-weight: 600; }

/* ---------- Phone ---------- */
.bottom-nav { display: none; }
.drawer-overlay { display: none; }

@media (max-width: 1024px) {
  .top-header { padding: 0 12px; }
  .mobile-menu-btn { display: inline-flex; }
  .user-details, .user-chevron { display: none; }
  .view-page-subtitle { display: none; }
  .content-body { padding: 16px 16px calc(84px + env(safe-area-inset-bottom)); }

  .drawer-overlay { display: block; position: fixed; inset: 0; background: rgba(23, 33, 43, 0.4); opacity: 0; pointer-events: none; transition: opacity 0.2s; z-index: 990; }
  .drawer-overlay.active { opacity: 1; pointer-events: auto; }
  .sidebar { z-index: 1000; }

  .bottom-nav {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    height: calc(64px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--surface);
    border-top: 1px solid var(--line);
    z-index: 900;
  }
  .bnav-item {
    border: 0; background: none; font: inherit;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    color: var(--muted);
    font-size: 0.8rem; font-weight: 600;
    cursor: pointer;
  }
  .bnav-item svg { width: 22px; height: 22px; }
  .bnav-item.active { color: var(--club-primary); }

  .roster-row { grid-template-columns: auto 40px minmax(0, 1fr) auto; gap: 10px; padding: 12px; }
  .roster-row .hide-sm { display: none; }
  .roster-head { display: none; }
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-dialog { max-height: 92vh; border-radius: 16px 16px 0 0; }
}

@media print {
  .bottom-nav, .drawer-overlay, .header-alerts { display: none !important; }
}

/* ---------- Summary numbers (same look on every page) ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  text-align: start;
  font: inherit;
  color: inherit;
}
button.kpi { cursor: pointer; }
button.kpi:hover { border-color: var(--line-strong); background: #fcfdfc; }
.kpi-label { font-size: 0.82rem; color: var(--muted); font-weight: 500; }
.kpi-value { font-size: 1.65rem; font-weight: 600; line-height: 1.25; margin-top: 4px; color: var(--ink); }
.kpi-note { font-size: 0.8rem; color: var(--muted); margin-top: 2px; }
.kpi.is-alert .kpi-value { color: var(--brick); }
.kpi.is-warn .kpi-value { color: var(--ochre); }
.kpi.is-on { border-color: var(--club-primary); box-shadow: inset 0 0 0 1px var(--club-primary); }

.page-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-intro h2 { margin: 0; font-size: 1.35rem; font-weight: 600; }
.page-intro p { margin: 2px 0 0; color: var(--muted); font-size: 0.88rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border-subtle); }
.list-row:last-child { border-bottom: 0; }
.list-empty { padding: 28px 20px; text-align: center; color: var(--muted); font-size: 0.9rem; }
.tabs-line { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs-line button { border: 0; background: none; font: inherit; font-size: 0.92rem; font-weight: 600; color: var(--muted); padding: 10px 14px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs-line button.is-on { color: var(--club-primary); border-bottom-color: var(--club-primary); }
.summary-line { display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.86rem; color: var(--ink-2); }
.summary-line b { font-weight: 700; }
details.more-options summary { cursor: pointer; color: var(--club-primary); font-weight: 600; font-size: 0.86rem; list-style: none; }
details.more-options summary::-webkit-details-marker { display: none; }

@media (max-width: 1024px) {
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 12px 14px; }
  .kpi-value { font-size: 1.35rem; }
  .grid-2 { grid-template-columns: 1fr; }
  .page-intro h2 { font-size: 1.15rem; }
}

/* Attendance status selector: each state keeps its own meaning colour */
.att-seg button { min-width: 64px; }
.att-seg button.is-on[data-status="P"] { background: var(--leaf-soft); color: var(--leaf); }
.att-seg button.is-on[data-status="L"] { background: var(--ochre-soft); color: var(--ochre); }
.att-seg button.is-on[data-status="E"] { background: var(--sea-soft); color: var(--sea); }
.att-seg button.is-on[data-status="A"] { background: var(--brick-soft); color: var(--brick); }
@media (max-width: 1024px) {
  .att-seg button { min-width: 0; padding: 7px 9px; font-size: 0.8rem; }
}
.att-seg .lbl-short { display: none; }
.att-legend { display: none; font-size: 0.8rem; color: var(--text-muted); margin-top: 6px; }
.att-legend span { font-weight: 700; color: var(--ink); margin-inline-start: 8px; }
.att-legend span:first-child { margin-inline-start: 0; }
@media (max-width: 640px) {
  .att-seg button { min-width: 40px; padding: 8px 0; font-size: 0.95rem; font-weight: 700; }
  .att-seg .lbl-long { display: none; }
  .att-seg .lbl-short { display: inline; }
  .att-legend { display: block; }
}
@media (max-width: 1024px) { .hide-sm { display: none !important; } }

/* ---------- Competitive club home: calmer hero and tiles ---------- */
.hero-match-card { box-shadow: none !important; border: 1px solid var(--line) !important; background: var(--surface) !important; }
.hero-match-card::before, .hero-match-card::after { display: none !important; }
.hero-notice-card { box-shadow: none !important; }
.quick-action-bar { flex-wrap: wrap; overflow: visible; padding: 10px 14px; gap: 8px; }
.action-chip { font-size: 0.84rem; padding: 7px 12px; }
.action-chip svg { width: 16px; height: 16px; }
.stat-icon-wrapper { width: 40px; height: 40px; border-radius: 10px; background: var(--bg-surface-subtle) !important; color: var(--ink-2) !important; }
.stat-icon-wrapper svg { width: 20px; height: 20px; }
.stat-label { color: var(--muted); font-weight: 500; }
.stat-subtext { color: var(--muted) !important; }
.stats-grid { gap: 12px; }

/* ---------- Readex Pro tuning ---------- */
th, .data-table th { font-weight: 500; }
.nav-item, .nav-link { font-weight: 400; }
.nav-item.active, .nav-link.active { font-weight: 500; }
strong, b { font-weight: 600; }

/* ---------- Text size control ---------- */
.auth-tools { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-bottom: 0.9rem; }
.text-size-wrap { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; width: 100%; }
.auth-tools .text-size-wrap { width: auto; }
.text-size-label { font-size: 0.9rem; color: var(--ink-2); }
.text-size-ctl { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; background: var(--surface); }
.text-size-ctl button { border: 0; background: none; color: var(--ink); padding: 0.3rem 0.65rem; line-height: 1.1; min-width: 2.2rem; min-height: 2.2rem; cursor: pointer; font-family: inherit; font-weight: 600; }
.text-size-ctl button + button { border-inline-start: 1px solid var(--line-strong); }
.text-size-ctl button.is-on { background: var(--leaf-soft); color: var(--leaf); }
.user-menu-row + .user-menu-row { margin-top: 6px; }

/* ---------- Swimming school ---------- */
.swim-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: 14px; }
.swim-group { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; }
.swim-group-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.swim-group-name { font-weight: 600; font-size: 1.02rem; line-height: 1.4; }
.swim-group-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag-soft { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 99px; background: var(--bg-surface-subtle); border: 1px solid var(--line); color: var(--ink-2); font-size: 0.82rem; }
.status-pill.is-level { background: var(--sea-soft); color: var(--sea); }
.swim-count { text-align: center; line-height: 1.1; flex-shrink: 0; }
.swim-count strong { font-size: 1.6rem; font-weight: 600; }
.swim-count span { color: var(--muted); font-size: 0.9rem; margin-inline-start: 2px; }
.swim-count small { display: block; color: var(--muted); font-size: 0.8rem; }
.swim-meta { margin: 0; display: grid; gap: 6px; }
.swim-meta div { display: grid; grid-template-columns: 7rem 1fr; gap: 8px; font-size: 0.92rem; }
.swim-meta dt { color: var(--muted); }
.swim-meta dd { margin: 0; }
.muted-text { color: var(--muted); }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.form-grid-2 .form-group { margin: 0; }
@media (max-width: 640px) { .form-grid-2 { grid-template-columns: 1fr; } }
.day-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.day-pick { position: relative; cursor: pointer; }
.day-pick input { position: absolute; opacity: 0; pointer-events: none; }
.day-pick span { display: inline-block; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 8px; font-size: 0.9rem; background: var(--surface); }
.day-pick input:checked + span { background: var(--sea-soft); border-color: var(--sea); color: var(--sea); font-weight: 600; }
.day-pick input:focus-visible + span { outline: 2px solid var(--sea); outline-offset: 2px; }
.swim-photo-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.swim-level-chip { display: inline-block; padding: 2px 9px; border-radius: 99px; background: var(--sea-soft); color: var(--sea); font-size: 0.82rem; font-weight: 500; white-space: nowrap; }
.med-flag { font-size: 0.8rem; font-weight: 500; }
.med-flag.is-expired { color: var(--brick); }
.med-flag.is-expiring { color: var(--ochre); }
.med-flag.is-none { color: var(--muted); }
.swim-progress-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.swim-level { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin-bottom: 10px; }
.swim-level.is-done { border-color: #b7dcc7; background: #f6fbf8; }
.swim-level-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.swim-level-head strong { font-weight: 600; }
.swim-level-head button { margin-inline-start: auto; }
.swim-skill { display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer; font-size: 0.95rem; }
.swim-skill input { width: 1.15rem; height: 1.15rem; accent-color: var(--leaf); flex-shrink: 0; }
.swim-skill small { color: var(--muted); margin-inline-start: auto; font-size: 0.8rem; }
@media (max-width: 640px) {
  .roster-row:not(.roster-head) { grid-template-columns: auto 40px minmax(0, 1fr); }
  .roster-row:not(.roster-head) .roster-actions { grid-column: 1 / -1; justify-content: flex-start; padding-inline-start: 34px; }
  .roster-row:not(.roster-head) .roster-actions .btn { flex: 1; }
}

/* ---------- Academy print center ---------- */
.print-docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr)); gap: 14px; align-items: start; }
.print-doc { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.print-doc h3 { margin: 0; font-size: 1.05rem; font-weight: 600; }
.print-doc > p { margin: -6px 0 0; font-size: 0.9rem; }
.print-doc > .btn { align-self: flex-start; }
.col-picks { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 640px) { .print-docs { grid-template-columns: 1fr; } }
