* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #0f172a;
  color: #e2e8f0;
  line-height: 1.6;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

/* Navigation – sidebar handled by includes/nav.php */

/* Page Header */
.page-header {
  margin-bottom: 2rem;
}

.page-header h2 {
  font-size: 2rem;
  color: #f1f5f9;
  margin-bottom: 0.5rem;
}

.page-header p {
  color: #94a3b8;
  font-size: 1.1rem;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
  width: 100%;
}

.stat-card {
  background: linear-gradient(145deg, #1e3a8a 0%, #1e40af 55%, #1d4ed8 100%);
  padding: 1.15rem 1.35rem;
  min-height: 5.5rem;
  border-radius: 12px;
  border: 1px solid rgba(147, 197, 253, 0.18);
  text-align: center;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.stat-value {
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.4rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  color: #bfdbfe;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.3;
  max-width: 12rem;
}

/* Content Grid */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

/* Cards */
.card {
  background: #1e293b;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  border: 1px solid #334155;
}

.card h3 {
  color: #f1f5f9;
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
  border-bottom: 2px solid #334155;
  padding-bottom: 0.75rem;
}

/* Tables */
.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: #334155;
}

th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: #f1f5f9;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

td {
  padding: 1rem;
  border-bottom: 1px solid #334155;
  color: #cbd5e1;
}

tr:hover {
  background: #334155;
}

/* List table — compact Actions column (main tables only) */
.data-table:not(.event-child-table) col.col-actions {
  width: 1%;
}

.data-table:not(.event-child-table) th.col-actions,
.data-table:not(.event-child-table) td.col-actions {
  width: 1%;
  min-width: 6.75rem;
  white-space: nowrap;
  text-align: right;
  padding-right: 0.85rem;
}

.data-table td.col-actions .action-buttons {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 4px;
  justify-content: flex-end;
  align-items: center;
}

.action-buttons .btn-icon,
.action-buttons .btn-small.btn-icon {
  min-width: 32px;
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  flex-shrink: 0;
}

/* Nested event day table */
.event-child-table {
  margin: 0;
  font-size: 0.9rem;
  table-layout: fixed;
  width: 100%;
}

.event-child-table th {
  font-size: 0.78rem;
}

.event-child-table th,
.event-child-table td {
  padding: 0.55rem 0.75rem;
  vertical-align: middle;
}

/* Session column absorbs remaining width — prevents a gap before Actions */
.event-child-table col.col-type { width: 11%; }
.event-child-table col.col-duration { width: 9%; }
.event-child-table col.col-date { width: 12%; }
.event-child-table col.col-actions { width: 4.75rem; }

.event-child-table th.col-actions,
.event-child-table td.col-actions {
  white-space: nowrap;
  text-align: right;
  padding-left: 0.35rem;
  padding-right: 0.65rem;
}

.event-child-table td.col-actions .action-buttons {
  justify-content: flex-end;
}

/* Filter bar (sessions, personal training, library) */
.gk-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 1rem;
}

.gk-filter-bar input[type="search"],
.gk-filter-bar input[type="text"],
.gk-filter-bar input[type="date"],
.gk-filter-bar input[type="month"],
.gk-filter-bar select {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 7px 10px;
  color: #e2e8f0;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
  min-height: 34px;
  line-height: 1.25;
}

.gk-filter-bar input:focus,
.gk-filter-bar select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.gk-filter-bar input.active,
.gk-filter-bar select.active {
  border-color: #3b82f6;
}

.gk-filter-bar input[type="search"] {
  min-width: 200px;
  flex: 1 1 220px;
  max-width: 360px;
}

.gk-filter-bar select {
  min-width: 130px;
}

.gk-filter-bar input[type="date"],
.gk-filter-bar input[type="month"] {
  min-width: 130px;
  color-scheme: dark;
}

.gk-filter-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.gk-filter-count {
  margin-left: auto;
  color: #94a3b8;
  font-size: 13px;
  white-space: nowrap;
}

.gk-filter-clear {
  background: transparent;
  border: 0;
  color: #3b82f6;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 4px;
}

.gk-filter-clear:hover {
  text-decoration: underline;
}

/* Mobile filter bar: search full-width, dropdowns in 2×2 grid (matches button groups) */
@media (max-width: 720px) {
  .gk-filter-bar:has(input[type="search"]) {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    align-items: stretch;
    flex-direction: unset;
    flex-wrap: unset;
  }

  .gk-filter-bar:has(input[type="search"]) input[type="search"] {
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
    min-width: 0;
    flex: none;
    min-height: 44px;
    font-size: 16px;
  }

  .gk-filter-bar:has(input[type="search"]) select,
  .gk-filter-bar:has(input[type="search"]) input[type="date"],
  .gk-filter-bar:has(input[type="search"]) input[type="month"] {
    width: 100%;
    max-width: none;
    min-width: 0;
    flex: none;
    min-height: 44px;
    font-size: 16px;
  }

  .gk-filter-bar:has(input[type="search"]) .gk-filter-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .gk-filter-bar:has(input[type="search"]) .gk-filter-actions .btn {
    flex: 1 1 calc(50% - 0.25rem);
    min-height: 44px;
  }

  .gk-filter-bar:has(input[type="search"]) select:only-of-type {
    grid-column: 1 / -1;
  }

  .gk-filter-bar .gk-filter-count,
  .gk-filter-bar .gk-filter-clear {
    grid-column: 1 / -1;
    margin-left: 0;
    text-align: left;
    font-size: 0.85rem;
  }

  .gk-filter-bar .lib-view-toggle {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

/* List table cards: filter/head + table + pagination */
.sessions-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-top: 1px solid #334155;
  background: #1e293b;
}

.sessions-pagination-summary {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
}

.sessions-pagination-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.sessions-pagination-pages {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.card.list-table-card:has(> .sessions-pagination),
.card.sessions-list-card:has(> .sessions-pagination) {
  overflow: visible;
}

.sessions-page-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #334155;
  border-radius: 6px;
  background: #0f172a;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.sessions-page-btn:hover {
  border-color: #3b82f6;
  color: #f1f5f9;
}

.sessions-page-btn.is-active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

.sessions-page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 32px;
  padding: 0 2px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  user-select: none;
}

.sessions-no-matches {
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
  padding: 1.25rem;
}

.sessions-no-matches .gk-filter-clear {
  display: inline-block;
  margin-left: 8px;
}

/* Evaluate buttons — transparent until session is evaluated */
.gkp-eval-btn {
  background: transparent;
  border: 1px solid #475569;
  color: #94a3b8;
}

.gkp-eval-btn:hover {
  background: rgba(59, 130, 246, 0.08);
  border-color: #3b82f6;
  color: #e2e8f0;
}

.gkp-eval-btn--done {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
}

.gkp-eval-btn--done:hover {
  background: #059669;
  border-color: #059669;
  color: #fff;
}

.gkp-eval-text-btn {
  background: transparent;
  border: 1px solid #475569;
  color: #cbd5e1;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0.45rem 0.85rem;
}

.gkp-eval-text-btn:hover {
  background: rgba(59, 130, 246, 0.08);
  border-color: #3b82f6;
  color: #f1f5f9;
}

.gkp-eval-text-btn--done {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
}

.gkp-eval-text-btn--done:hover {
  background: #059669;
  border-color: #059669;
  color: #fff;
}

@media (min-width: 641px) {
  .card.sessions-list-card {
    --list-card-x: 1.25rem;
    padding: 0;
    overflow: hidden;
  }

  .card.list-table-card:has(.table-container) {
    --list-card-x: 1.25rem;
    padding: 0;
    overflow: hidden;
  }

  .card.sessions-list-card > .gk-filter-bar.sessions-filter-bar {
    margin: 0;
    padding: var(--list-card-x) var(--list-card-x) 0;
    border-bottom: none;
  }

  .card.list-table-card > .gk-filter-bar {
    margin: 0;
    padding: var(--list-card-x) var(--list-card-x) 0.75rem;
    border-bottom: 1px solid #334155;
  }

  .card.list-table-card > .gk-filter-bar + .table-container,
  .card.list-table-card > .gk-filter-bar + .info-banner {
    margin-top: 0;
    padding: 1rem var(--list-card-x) 0;
  }

  .card.sessions-list-card > .gk-filter-bar.sessions-filter-bar + .table-container {
    margin-top: 1.25rem;
    padding: 0 var(--list-card-x);
  }

  .card.list-table-card > .table-container {
    padding: 0 var(--list-card-x);
  }

  .card.list-table-card > .crit-card-head,
  .card.list-table-card > .prep-card-head {
    padding: var(--list-card-x) var(--list-card-x) 0.85rem;
    margin-bottom: 0;
    border-bottom: 1px solid #334155;
  }

  .card.list-table-card > .crit-card-head + .table-container,
  .card.list-table-card > .prep-card-head + .table-container {
    margin-top: 0.85rem;
  }

  .card.list-table-card > .gkp-pt-card-head,
  .card.list-table-card > .list-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: var(--list-card-x) var(--list-card-x) 0;
    margin-bottom: 0;
  }

  .card.list-table-card > .list-card-head--stacked {
    align-items: flex-start;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid #334155;
  }

  .card.list-table-card > .list-card-head:not(.list-card-head--stacked):not(.gkp-pt-card-head) {
    padding-bottom: 0.85rem;
    border-bottom: 1px solid #334155;
  }

  .card.list-table-card > .list-card-head h3,
  .card.list-table-card > .gkp-pt-card-head h3 {
    margin: 0;
    border-bottom: none;
    padding-bottom: 0;
  }

  .card.list-table-card > .gkp-pt-card-sub,
  .card.list-table-card > .list-card-sub {
    padding: 0.35rem var(--list-card-x) 0.85rem;
    margin: 0;
    border-bottom: 1px solid #334155;
    color: #94a3b8;
    font-size: 0.9rem;
  }

  .card.list-table-card > .list-card-sub a,
  .card.list-table-card > .gkp-pt-card-sub a {
    color: #3b82f6;
    font-weight: 600;
    text-decoration: none;
  }

  .card.list-table-card > .list-card-sub a:hover,
  .card.list-table-card > .gkp-pt-card-sub a:hover {
    color: #60a5fa;
    text-decoration: underline;
  }

  .card.list-table-card .list-card-sub--inline {
    margin: 0.15rem 0 0;
    padding: 0;
    border-bottom: none;
    font-size: 0.88rem;
    max-width: 52rem;
  }

  .card.list-table-card > .gkp-pt-card-sub + .table-container,
  .card.list-table-card > .list-card-head + .table-container,
  .card.list-table-card > .list-card-head--stacked + .table-container {
    margin-top: 0;
  }

  .card.list-table-card > .list-card-empty,
  .card.list-table-card > .gkp-pt-empty {
    margin: 0;
    padding: 1rem var(--list-card-x) var(--list-card-x);
    color: #94a3b8;
  }

  .card.list-table-card .data-table:not(.event-child-table) > thead > tr > th,
  .card.list-table-card .data-table:not(.event-child-table) > tbody > tr > td:not(.session-expand-cell):not(.goal-edit-cell) {
    padding: 0.65rem 0.85rem;
    vertical-align: middle;
    font-size: 0.88rem;
  }

  .card.list-table-card .data-table:not(.event-child-table) > thead > tr > th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .card.sessions-list-card > .sessions-pagination,
  .card.list-table-card > .sessions-pagination {
    margin: 0;
    padding: 0.85rem var(--list-card-x);
    border-top: 1px solid #334155;
  }

  .card.sessions-list-card > .sessions-no-matches {
    margin: 0;
    padding: 1rem var(--list-card-x) var(--list-card-x);
    border-top: 1px solid #334155;
  }

  .card.sessions-list-card .data-table thead th,
  .card.list-table-card .data-table:not(.event-child-table) thead th,
  .card.list-table-card .crit-table thead th,
  .card.list-table-card .prep-table thead th {
    padding: 0.75rem 0.85rem;
  }

  .card.list-table-card .data-table:not(.event-child-table) thead th:first-child,
  .card.sessions-list-card .data-table thead th:first-child {
    border-top-left-radius: 8px;
  }

  .card.list-table-card .data-table:not(.event-child-table) thead th:last-child,
  .card.sessions-list-card .data-table thead th:last-child {
    border-top-right-radius: 8px;
  }

  .page-header-row.list-page-toolbar {
    margin-bottom: 1.25rem;
  }

  .page-header-row.list-page-toolbar > .gk-filter-bar {
    margin-bottom: 0;
  }
}

/* Sessions List */
.sessions-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 10px;
}

/* Custom scrollbar styling */
.sessions-list::-webkit-scrollbar {
  width: 8px;
}

.sessions-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.sessions-list::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.sessions-list::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Firefox scrollbar */
.sessions-list {
  scrollbar-width: thin;
  scrollbar-color: #888 #f1f1f1;
}

/* Session action buttons */
.session-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.session-actions .btn {
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
}

.session-actions .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.session-item {
  background: #0f172a;
  padding: 1.25rem;
  border-radius: 8px;
  border-left: 4px solid #3b82f6;
}

.session-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.session-header strong {
  color: #f1f5f9;
  font-size: 1.05rem;
}

.session-date {
  color: #94a3b8;
  font-size: 0.9rem;
}

.session-ratings {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 0.75rem;
}

.rating {
  background: #334155;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #3b82f6;
  font-weight: 600;
}

.session-notes {
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #334155;
}

/* Profile Info */
.profile-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  background: #1e293b;
  padding: 2rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  border: 1px solid #334155;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.info-label {
  color: #94a3b8;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-value {
  color: #f1f5f9;
  font-size: 1.1rem;
  font-weight: 600;
}

/* Goals */
.goal-form {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.goal-form .form-group {
  flex: 1;
  min-width: 200px;
}

.goals-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.goal-item {
  background: #0f172a;
  padding: 1.25rem;
  border-radius: 8px;
  border-left: 4px solid #10b981;
}

.goal-description {
  color: #f1f5f9;
  margin-bottom: 0.75rem;
  font-size: 1.05rem;
}

.goal-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.goal-status {
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-not-started {
  background: #475569;
  color: #cbd5e1;
}

.status-planned {
  background: #475569;
  color: #cbd5e1;
}

.status-in-progress {
  background: #1e40af;
  color: #bfdbfe;
}

.status-completed {
  background: #065f46;
  color: #6ee7b7;
}

.goal-date {
  color: #94a3b8;
  font-size: 0.9rem;
}

/* Forms */
.form-card {
  max-width: 800px;
  margin: 0 auto;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

label {
  color: #cbd5e1;
  font-weight: 500;
  font-size: 0.95rem;
}

input,
select,
textarea {
  background: #0f172a;
  border: 2px solid #334155;
  color: #f1f5f9;
  padding: 0.75rem;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #3b82f6;
}

small {
  color: #94a3b8;
  font-size: 0.85rem;
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid #334155;
}

.event-child-table td.col-actions .action-buttons {
  justify-content: flex-end;
}

.event-sessions-panel {
  padding: 0.25rem 0;
}

.scope-badge-event {
  background: #4c1d95;
  color: #e9d5ff;
}

.pe-day-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: #312e81;
  color: #c7d2fe;
  margin-left: 0.35rem;
}

.event-child-table .session-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.15rem;
}

.card.list-table-card #gkProfilePersonalTable tr.session-row,
.card.list-table-card #personalTrainingTable tr.session-row,
.card.sessions-list-card #personalTrainingTable tr.session-row {
  cursor: pointer;
}

.card.list-table-card #gkProfilePersonalTable tr.event-row,
.card.list-table-card #personalTrainingTable tr.event-row,
.card.sessions-list-card #personalTrainingTable tr.event-row {
  cursor: pointer;
}

.card.list-table-card #gkProfilePersonalTable tr.event-row:hover,
.card.list-table-card #gkProfilePersonalTable tr.session-row:hover,
.card.list-table-card #personalTrainingTable tr.event-row:hover,
.card.list-table-card #personalTrainingTable tr.session-row:hover,
.card.sessions-list-card #personalTrainingTable tr.event-row:hover,
.card.sessions-list-card #personalTrainingTable tr.session-row:hover {
  background: rgba(59, 130, 246, 0.06);
}

.card.list-table-card #gkProfilePersonalTable .event-expand-row,
.card.list-table-card #gkProfilePersonalTable .session-expand-row,
.card.list-table-card #personalTrainingTable .event-expand-row,
.card.list-table-card #personalTrainingTable .session-expand-row,
.card.sessions-list-card #personalTrainingTable .event-expand-row,
.card.sessions-list-card #personalTrainingTable .session-expand-row {
  display: none;
}

.card.list-table-card #gkProfilePersonalTable .event-expand-row.is-open:not(.is-page-hidden),
.card.list-table-card #gkProfilePersonalTable .session-expand-row.is-open:not(.is-page-hidden),
.card.list-table-card #personalTrainingTable .event-expand-row.is-open:not(.is-page-hidden),
.card.list-table-card #personalTrainingTable .session-expand-row.is-open:not(.is-page-hidden),
.card.sessions-list-card #personalTrainingTable .event-expand-row.is-open:not(.is-page-hidden),
.card.sessions-list-card #personalTrainingTable .session-expand-row.is-open:not(.is-page-hidden) {
  display: table-row;
}

.card.list-table-card #gkProfilePersonalTable .session-expand-cell,
.card.list-table-card #personalTrainingTable .session-expand-cell,
.card.sessions-list-card #personalTrainingTable .session-expand-cell {
  background: #0f172a;
  border-top: 1px solid #334155;
  padding: 1rem 1.25rem;
}

.card.list-table-card #gkProfilePersonalTable tr.list-row.is-page-hidden,
.card.list-table-card #gkProfilePersonalTable tr.session-expand-row.is-page-hidden,
.card.list-table-card #gkProfilePersonalTable tr.event-expand-row.is-page-hidden,
.card.list-table-card #personalTrainingTable tr.list-row.is-page-hidden,
.card.list-table-card #personalTrainingTable tr.session-expand-row.is-page-hidden,
.card.list-table-card #personalTrainingTable tr.event-expand-row.is-page-hidden,
.card.sessions-list-card #personalTrainingTable tr.list-row.is-page-hidden,
.card.sessions-list-card #personalTrainingTable tr.session-expand-row.is-page-hidden,
.card.sessions-list-card #personalTrainingTable tr.event-expand-row.is-page-hidden {
  display: none !important;
}

.card.list-table-card #gkProfilePersonalTable .pt-drills-panel,
.card.list-table-card #personalTrainingTable .pt-drills-panel {
  margin: 0;
}

.card.list-table-card #gkProfilePersonalTable .pt-drills-list,
.card.list-table-card #personalTrainingTable .pt-drills-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
}

.card.list-table-card #gkProfilePersonalTable .pt-drills-list .pt-drill-row,
.card.list-table-card #personalTrainingTable .pt-drills-list .pt-drill-row {
  margin: 0;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
}

.card.list-table-card #gkProfilePersonalTable .pt-drills-list .pt-drill-row:hover,
.card.list-table-card #personalTrainingTable .pt-drills-list .pt-drill-row:hover {
  background: rgba(59, 130, 246, 0.08);
}

.pt-drill-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
}

.pt-drill-dur {
  color: #93c5fd;
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
}

.card.list-table-card .pt-drill-preview-btn,
.card.sessions-list-card .pt-drill-preview-btn {
  background: none;
  border: none;
  padding: 0;
  color: #f1f5f9;
  font-weight: 600;
  font-size: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: color 0.15s, text-decoration-color 0.15s;
}

.card.list-table-card .pt-drill-preview-btn:hover,
.card.sessions-list-card .pt-drill-preview-btn:hover {
  color: #93c5fd;
  text-decoration-color: #93c5fd;
}

/* Drill preview overlay (shared by sessions, library, personal training, profile) */
.pt-drill-preview-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2100;
  background: rgba(15, 23, 42, 0.88);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.pt-drill-preview-overlay.open {
  display: flex;
}

.pt-drill-preview-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 1.25rem 1.5rem 1.5rem;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow: auto;
  position: relative;
  box-sizing: border-box;
}

.pt-drill-preview-close {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.pt-drill-preview-close:hover {
  color: #f1f5f9;
}

.pt-drill-preview-card h4,
.pt-drill-preview-heading {
  margin: 0 2rem 0.75rem 0;
  color: #f1f5f9;
  font-size: 1.05rem;
}

.pt-drill-preview-editable {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 0.15rem 0.35rem;
  margin: -0.15rem -0.35rem;
  color: inherit;
  font: inherit;
  cursor: text;
  line-height: 1.35;
}

.pt-drill-preview-editable:hover {
  background: rgba(59, 130, 246, 0.12);
  outline: 1px dashed rgba(59, 130, 246, 0.35);
}

.pt-drill-preview-editable.is-placeholder {
  color: #64748b;
  font-style: italic;
  font-weight: 400;
}

.pt-drill-preview-notes-block {
  margin: 0 0 1rem;
}

.pt-drill-preview-notes-block .pt-drill-preview-editable {
  color: #cbd5e1;
  font-size: 0.88rem;
  font-weight: 400;
  white-space: pre-wrap;
}

.is-editing .pt-drill-preview-editable {
  display: none;
}

.pt-drill-preview-edit-input,
.pt-drill-preview-edit-textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  background: #0f172a;
  border: 1px solid #3b82f6;
  border-radius: 6px;
  color: #f1f5f9;
  font-family: inherit;
  font-size: inherit;
  padding: 0.35rem 0.5rem;
}

.pt-drill-preview-edit-textarea {
  min-height: 4.5rem;
  resize: vertical;
  line-height: 1.45;
}

.pt-drill-preview-edit-input:focus,
.pt-drill-preview-edit-textarea:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.35);
}

.pt-drill-preview-img {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  object-position: center;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #0b1220;
}

.pt-drill-preview-placeholder {
  width: 100%;
  height: 220px;
  border-radius: 8px;
  border: 1px solid #334155;
  background-color: #4a7c59;
  background-image: url('half_pitch.png');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

.pt-drill-preview-meta {
  margin: 0.35rem 0 0.75rem;
  color: #94a3b8;
  font-size: 0.85rem;
}

.pt-drill-preview-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.pt-drill-preview-loading {
  color: #94a3b8;
  font-size: 0.9rem;
  padding: 2rem 0;
  text-align: center;
}

.pt-drill-preview-overlay--profile .pt-drill-preview-actions {
  display: none;
}

.pt-drill-preview-overlay--profile .pt-drill-preview-editable {
  cursor: default;
  pointer-events: none;
}

.pt-drill-preview-overlay--profile .pt-drill-preview-editable:hover {
  background: transparent;
  outline: none;
}

.event-child-table .session-expand-row {
  display: none;
}

.event-child-table .session-expand-row.is-open {
  display: table-row;
}

.card.list-table-card > .gkp-pt-cards-mobile,
.card.list-table-card > .pt-sessions-cards-mobile {
  padding: 0 var(--list-card-x, 1.25rem);
}

.card.list-table-card > .gkp-pt-cards-mobile + .sessions-pagination,
.card.list-table-card > .pt-sessions-cards-mobile + .sessions-pagination {
  margin-top: 0;
}

@media (max-width: 720px) {
  .card.list-table-card > .table-container {
    display: none;
  }
  .card.list-table-card > .gkp-pt-cards-mobile,
  .card.list-table-card > .pt-sessions-cards-mobile {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    list-style: none;
    margin: 0;
    padding: 0 var(--list-card-x, 1.25rem);
  }
}

/* Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
  border: none;
  font-size: 1rem;
  transition: all 0.2s;
}

.btn-primary {
  background: #3b82f6;
  color: white;
}

.btn-primary:hover {
  background: #2563eb;
}

.btn-secondary {
  background: #475569;
  color: white;
}

.btn-secondary:hover {
  background: #334155;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.btn-danger {
  background: #dc2626;
  color: #fff;
}

.btn-danger:hover {
  background: #b91c1c;
}

.btn-info {
  background: #0891b2;
  color: #fff;
  border: 1px solid #0891b2;
}

.btn-info:hover {
  background: #0e7490;
  border-color: #0e7490;
}

.btn-success {
  background: #16a34a;
  color: #fff;
  border: 1px solid #16a34a;
}

.btn-success:hover {
  background: #15803d;
  border-color: #15803d;
}

.btn-warning {
  background: #eab308;
  color: #1e293b;
  border: 1px solid #eab308;
}

.btn-warning:hover {
  background: #ca8a04;
  border-color: #ca8a04;
}

.table-link {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
}

.table-link:hover {
  text-decoration: underline;
}

/* Overall Rating Badge */
.overall-rating {
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  color: white;
  font-weight: 700;
  display: inline-block;
}

/* Filter bar (reports and similar) */
.filter-bar {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.filter-bar label {
  color: #cbd5e1;
  font-weight: 600;
  margin-right: 0.75rem;
}

.filter-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.filter-form select {
  flex: 1;
  min-width: 160px;
}

.filter-form .form-actions {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  justify-content: flex-start;
  gap: 0.75rem;
  align-self: flex-end;
}

.filter-meta {
  margin-top: 1rem;
  color: #94a3b8;
  font-size: 0.95rem;
}

.filter-meta strong {
  color: #f1f5f9;
}

/* Info / empty states */
.info-banner {
  background: #0f172a;
  border: 1px solid #334155;
  border-left: 4px solid #3b82f6;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  color: #cbd5e1;
}

.info-banner a {
  color: #3b82f6;
  font-weight: 600;
}

.info-banner a.btn-primary {
  color: #fff;
}

.info-banner a.btn-primary:hover {
  color: #fff;
}

.empty-state {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: #94a3b8;
}

.empty-state p {
  margin-bottom: 0.75rem;
}

.empty-state-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.25rem;
}

.page-header-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.page-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Optional short labels inside buttons (shown in mobile 2×2 grids) */
.btn-has-short .btn-text-short {
  display: none !important;
}

.btn-has-short .btn-text-full {
  display: inline;
}

/* Optional utility: add to any button row for mobile 2×2 grid (see @640px rules) */
.btn-grid-mobile {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.quick-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.btn-hero-draw {
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1.15rem;
  text-align: center;
  background: #3b82f6;
  color: #fff;
  border-radius: 6px;
}

.btn-hero-draw:hover {
  background: #2563eb;
  color: #fff;
}

.quick-actions-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.quick-actions-secondary .btn {
  flex: 1;
  min-width: 140px;
  text-align: center;
}

/* GK Modal (shared) */
.gk-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
}
.gk-modal-overlay.open {
  display: flex;
}
.gk-modal-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 1.75rem;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
  position: relative;
  color: #e2e8f0;
  color-scheme: dark;
}
.gk-modal-card.gk-modal-wide {
  max-width: 720px;
}
.gk-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  z-index: 1;
}
.gk-modal-close:hover {
  color: #f1f5f9;
}
.gk-modal-body h3 {
  color: #f1f5f9;
  margin: 0 2rem 0.35rem 0;
}
.gk-modal-body .modal-session-context {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: #94a3b8;
}
.gk-modal-body .modal-session-name-top {
  margin-bottom: 1rem;
}
.gk-modal-body .modal-session-name-top input[type="text"] {
  font-size: 1.05rem;
  font-weight: 600;
}
.gk-modal-body {
  color: #e2e8f0;
}
.gk-modal-body label {
  margin-bottom: 0.25rem;
  color: #cbd5e1;
}
.gk-modal-body p,
.gk-modal-body small {
  color: #94a3b8;
}
.gk-modal-body strong {
  color: #f1f5f9;
}
.gk-modal-body em {
  color: #cbd5e1;
  font-style: italic;
}
.gk-modal-body .form-hint {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: #94a3b8;
}
.gk-modal-body input,
.gk-modal-body select,
.gk-modal-body textarea {
  background: #0f172a;
  border: 2px solid #334155;
  color: #f1f5f9;
  padding: 0.75rem;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.gk-modal-body input:focus,
.gk-modal-body select:focus,
.gk-modal-body textarea:focus {
  outline: none;
  border-color: #3b82f6;
}
.gk-modal-body select {
  min-height: 2.75rem;
  cursor: pointer;
}
.gk-modal-body select:not(.gk-select-expanded) {
  line-height: 1.25;
}
.gk-modal-body input::placeholder,
.gk-modal-body textarea::placeholder {
  color: #64748b;
}
.gk-modal-body select option {
  background: #0f172a;
  color: #f1f5f9;
}
.gk-modal-body select.gk-select-expanded {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 100%;
  min-height: 0;
  max-height: calc(2.35rem * 5 + 0.5rem);
  border-color: #475569;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  cursor: default;
}
.gk-modal-body select.gk-select-expanded option {
  padding: 0.35rem 0.5rem;
}
.gk-modal-body select[data-gk-native-select="1"] {
  appearance: auto;
  -webkit-appearance: menulist;
  cursor: pointer;
}
.gk-modal-body .gk-goal-modal-form .form-grid {
  margin-top: 0;
}
.gk-modal-body .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.25rem;
  min-width: 0;
}
.gk-modal-body .form-group {
  min-width: 0;
}
.gk-modal-body .form-group.full {
  grid-column: 1 / -1;
}
.gk-modal-body input,
.gk-modal-body select,
.gk-modal-body textarea {
  width: 100%;
  max-width: 100%;
}
.gk-modal-body .form-actions,
.gk-modal-body .modal-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
  justify-content: flex-end;
}
.gk-modal-body .session-details .detail-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  color: #e2e8f0;
}
.gk-modal-body .session-details .detail-row label {
  font-weight: 600;
  min-width: 110px;
  color: #94a3b8;
}
.gk-modal-body .description-text,
.gk-modal-body .equipment-text {
  flex: 1;
  background: #0f172a;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 1px solid #334155;
}
.gk-modal-body .info-banner {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  color: #94a3b8;
  font-size: 0.9rem;
}
.gk-modal-body .info-banner.quick-session-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  background: linear-gradient(180deg, #0f172a 0%, #0b1220 100%);
  border: 1px solid #1e293b;
  border-left: 4px solid #3b82f6;
  color: #cbd5e1;
  line-height: 1.4;
}
.gk-modal-body .quick-session-banner-text {
  flex: 1 1 220px;
  font-size: 0.88rem;
}
.gk-modal-body .quick-session-banner-text strong {
  color: #f1f5f9;
  margin-right: 4px;
}
.gk-modal-body .quick-session-btn {
  white-space: nowrap;
  flex: 0 0 auto;
}

/* Page-local modal aliases (goalkeepers.php, microcycle_planner.php, etc.) */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
}
.modal-overlay.open { display: flex; }
.modal-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 1.75rem;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
  color: #e2e8f0;
}
.modal-card h3 {
  color: #f1f5f9;
  margin-bottom: 1rem;
}
.modal-card label {
  margin-bottom: 0.25rem;
  color: #cbd5e1;
}
.modal-card .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.25rem;
  min-width: 0;
}
.modal-card .form-group { min-width: 0; }
.modal-card .form-group.full { grid-column: 1 / -1; }
.modal-card input,
.modal-card select,
.modal-card textarea {
  width: 100%;
  max-width: 100%;
}
.modal-card small {
  display: block;
  margin-top: 0.35rem;
  color: #94a3b8;
}
.modal-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* Session preview (view modal + log-training banner) */
.gk-modal-body .session-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0b3d20;
  border-radius: 10px;
  overflow: hidden;
  margin: 0 0 1rem;
  border: 1px solid #334155;
}
.gk-modal-body .session-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}
.gk-modal-body .session-preview-pitch {
  background-image: url("half_pitch.png");
  background-size: cover;
  background-position: center;
}
.gk-modal-body .session-preview-pitch::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0) 55%, rgba(15, 23, 42, 0.75) 100%);
  pointer-events: none;
}
.gk-modal-body .session-preview-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-align: center;
  z-index: 1;
}
.gk-modal-body .session-preview-fallback-icon {
  font-size: 2.5rem;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}
.gk-modal-body .session-preview-fallback-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.7);
  border-radius: 999px;
  padding: 3px 10px;
}

/* Use-drill banner (log training modal) */
.gk-modal-body .use-drill-banner {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem;
  margin: 0 0 1rem;
  background: #1e293b;
  border: 1px solid #334155;
  border-left: 4px solid #3b82f6;
  border-radius: 10px;
}
.gk-modal-body .use-drill-thumb {
  position: relative;
  width: 88px;
  height: 66px;
  flex: 0 0 88px;
  background: #0b3d20;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gk-modal-body .use-drill-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gk-modal-body .use-drill-thumb-pitch {
  background-image: url("half_pitch.png");
  background-size: cover;
  background-position: center;
}
.gk-modal-body .use-drill-thumb-icon {
  position: absolute;
  font-size: 1.5rem;
  color: #fff;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6));
}
.gk-modal-body .use-drill-meta {
  flex: 1 1 auto;
  min-width: 0;
}
.gk-modal-body .use-drill-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  font-weight: 700;
}
.gk-modal-body .use-drill-title {
  color: #f1f5f9;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.25;
  margin: 2px 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gk-modal-body .use-drill-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.gk-modal-body .use-drill-duration {
  font-size: 0.72rem;
  color: #94a3b8;
  background: #0f172a;
  border: 1px solid #334155;
  padding: 1px 8px;
  border-radius: 999px;
}
.gk-modal-body .use-drill-open {
  flex: 0 0 auto;
  text-decoration: none;
  white-space: nowrap;
}
.gk-modal-body .use-drill-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 0 0 auto;
  align-items: stretch;
}
.gk-modal-body .use-drill-opponent {
  margin-top: 6px;
  color: #fde68a;
  font-size: 0.85rem;
}
.gk-modal-body .use-drill-opponent strong {
  color: #f1f5f9;
  font-weight: 700;
}

/* Coaching cues (log training + session details) */
.gk-modal-body details.coaching-cues {
  margin-top: 8px;
  background: #0f172a;
  border-left: 3px solid #3b82f6;
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 13px;
  color: #94a3b8;
}
.gk-modal-body details.coaching-cues > summary {
  cursor: pointer;
  color: #3b82f6;
  font-weight: 600;
  font-size: 13px;
  list-style: none;
  user-select: none;
}
.gk-modal-body details.coaching-cues > summary::-webkit-details-marker {
  display: none;
}
.gk-modal-body details.coaching-cues > summary::before {
  content: "▸ ";
  display: inline-block;
  margin-right: 2px;
}
.gk-modal-body details.coaching-cues[open] > summary::before {
  content: "▾ ";
}
.gk-modal-body details.coaching-cues > summary:hover {
  text-decoration: underline;
}
.gk-modal-body .coaching-cues-body {
  margin-top: 8px;
  color: #cbd5e1;
  line-height: 1.45;
}

.gk-modal-body .session-details .detail-row span {
  color: #e2e8f0;
}
.gk-modal-body .description-text,
.gk-modal-body .equipment-text {
  color: #e2e8f0;
}
.gk-modal-body .equipment-item {
  color: #e2e8f0;
  margin-bottom: 0.35rem;
}
.gk-modal-body .equipment-item strong {
  color: #f1f5f9;
}
.gk-modal-body .pdf-link {
  color: #f87171;
  text-decoration: none;
  font-weight: 600;
}
.gk-modal-body .pdf-link:hover {
  text-decoration: underline;
}

/* Session type badges (modals + lists) */
.session-type-badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: inline-block;
  border: 1px solid transparent;
}
.session-type-gk-technical        { background: #1e3a8a; color: #93c5fd; }
.session-type-gk-tactical         { background: #3b0764; color: #d8b4fe; }
.session-type-activation          { background: #064e3b; color: #6ee7b7; }
.session-type-recovery            { background: #1c1917; color: #d4d4d4; }
.session-type-opponent-prep       { background: #451a03; color: #fed7aa; }
.session-type-post-match-analysis { background: #450a0a; color: #fca5a5; }
.session-type-technical           { background: #1e3a8a; color: #93c5fd; }
.session-type-tactical            { background: #3b0764; color: #d8b4fe; }
.session-type-physical            { background: #064e3b; color: #6ee7b7; }
.session-type-mental              { background: #451a03; color: #fed7aa; }
.session-type-game-simulation     { background: #450a0a; color: #fca5a5; }

.day-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 10px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #bfdbfe;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.opponent-pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 10px;
  background: #334155;
  color: #fde68a;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  max-width: 14ch;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.library-card-zone {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #0f172a;
  border: 1px solid #334155;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 600;
}

/* Create-session drills builder (modal) */
.gk-modal-body .drills-builder {
  background: linear-gradient(180deg, #0f172a 0%, #0b1220 100%);
  border: 1px solid #1e293b;
  border-radius: 10px;
  padding: 1rem 1.1rem 1.1rem;
  margin: 0.5rem 0 1rem;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02) inset;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.gk-modal-body .drills-builder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}
.gk-modal-body .drills-builder-titlewrap {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.gk-modal-body .drills-builder-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.25);
}
.gk-modal-body .drills-builder-title {
  margin: 0;
  font-size: 1rem;
  color: #f1f5f9;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.gk-modal-body .drills-builder-required {
  color: #f87171;
  font-weight: 700;
}
.gk-modal-body .drills-builder-count {
  font-size: 0.72rem;
  color: #cbd5e1;
  font-weight: 600;
  background: #1e293b;
  border: 1px solid #334155;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.gk-modal-body .drills-builder-hint {
  color: #94a3b8;
  font-size: 0.83rem;
  line-height: 1.45;
  margin: 0 0 0.85rem;
}
.gk-modal-body .drills-builder-hint strong {
  color: #cbd5e1;
  font-weight: 600;
}
.gk-modal-body .drills-builder-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.6rem;
  margin-bottom: 0.85rem;
  min-width: 0;
}
.gk-modal-body .drills-builder-action-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 0.45rem 0.65rem;
  align-items: center;
  min-width: 0;
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  transition: border-color 0.15s, background 0.15s;
  box-sizing: border-box;
}
.gk-modal-body .drills-builder-action-card:hover {
  border-color: #334155;
  background: #131b2c;
}
.gk-modal-body .drills-builder-action-icon {
  grid-column: 1;
  grid-row: 1;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #0f172a;
  color: #93c5fd;
  border: 1px solid #1e3a8a;
}
.gk-modal-body .drills-builder-action-card:has(.drills-builder-action-select) .drills-builder-action-icon {
  grid-row: 1 / span 2;
  align-self: start;
}
.gk-modal-body .drills-builder-action-body {
  grid-column: 2;
  grid-row: 1;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.gk-modal-body .drills-builder-action-title {
  color: #e2e8f0;
  font-weight: 600;
  font-size: 0.86rem;
}
.gk-modal-body .drills-builder-action-sub {
  color: #94a3b8;
  font-size: 0.74rem;
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gk-modal-body .drills-builder-action-btn {
  grid-column: 3;
  grid-row: 1;
  flex: 0 0 auto;
  min-width: 60px;
}
.gk-modal-body .drills-builder-action-select {
  grid-column: 2 / -1;
  grid-row: 2;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  font-size: 0.82rem;
  background: #0f172a;
  color: #e2e8f0;
  border: 1px solid #334155;
  border-radius: 6px;
}
.gk-modal-body .drills-builder-action-select:hover {
  border-color: #3b82f6;
}
.gk-modal-body .drills-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
  max-width: 100%;
}
.gk-modal-body .drills-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  color: #64748b;
  padding: 1.1rem 0.6rem;
  background: rgba(30, 41, 59, 0.35);
  border: 1px dashed #334155;
  border-radius: 8px;
  text-align: center;
}
.gk-modal-body .drills-empty-icon {
  color: #475569;
  margin-bottom: 0.15rem;
}
.gk-modal-body .drills-empty-title {
  font-weight: 600;
  font-size: 0.86rem;
  color: #94a3b8;
}
.gk-modal-body .drills-empty-sub {
  font-size: 0.76rem;
}
.gk-modal-body .drill-row {
  display: grid;
  grid-template-columns: 22px 30px minmax(0, 1fr) 28px;
  gap: 0.45rem 0.55rem;
  align-items: start;
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 8px;
  padding: 0.7rem 0.8rem;
  transition: border-color 0.15s, background 0.15s;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.gk-modal-body .drill-row:hover {
  border-color: #334155;
}
.gk-modal-body .drill-row:focus-within {
  border-color: #3b82f6;
  background: #131b2c;
}
.gk-modal-body .drill-row-drag {
  grid-column: 1;
  grid-row: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  cursor: grab;
  font-size: 1rem;
  line-height: 1;
  margin-top: 4px;
  user-select: none;
}
.gk-modal-body .drill-row-drag:active {
  cursor: grabbing;
}
.gk-modal-body .drill-row-pos {
  grid-column: 2;
  grid-row: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: linear-gradient(135deg, #1e293b 0%, #1e3a8a 100%);
  color: #e2e8f0;
  font-size: 0.76rem;
  font-weight: 700;
  margin-top: 2px;
  border: 1px solid #334155;
}
.gk-modal-body .drill-row-fields {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}
.gk-modal-body .drill-row-title {
  width: 100%;
  box-sizing: border-box;
  max-width: 100%;
  font-weight: 600;
  font-size: 0.92rem;
  background: #0b1220;
  color: #f1f5f9;
  border: 1px solid #1f2937;
  border-radius: 6px;
  padding: 0.4rem 0.55rem;
}
.gk-modal-body .drill-row-title:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}
.gk-modal-body .drill-row-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(72px, 110px);
  gap: 0.4rem;
  min-width: 0;
}
.gk-modal-body .drill-row-notes {
  width: 100%;
  box-sizing: border-box;
  max-width: 100%;
  font-size: 0.82rem;
  background: #0b1220;
  color: #cbd5e1;
  border: 1px solid #1f2937;
  border-radius: 6px;
  padding: 0.4rem 0.55rem;
}
.gk-modal-body .drill-row-notes:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}
.gk-modal-body .drill-row-dur-wrap {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}
.gk-modal-body .drill-row-dur {
  width: 100%;
  box-sizing: border-box;
  max-width: 100%;
  font-size: 0.82rem;
  background: #0b1220;
  color: #cbd5e1;
  border: 1px solid #1f2937;
  border-radius: 6px;
  padding: 0.4rem 2.1rem 0.4rem 0.55rem;
  text-align: right;
}
.gk-modal-body .drill-row-dur:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}
.gk-modal-body .drill-row-dur-unit {
  position: absolute;
  right: 0.55rem;
  pointer-events: none;
  color: #64748b;
  font-size: 0.75rem;
}
.gk-modal-body .drill-row-source {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  color: #93c5fd;
  align-self: flex-start;
  max-width: 100%;
  padding: 2px 8px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 999px;
  overflow: hidden;
}
.gk-modal-body .drill-row-source [data-drill-source-label] {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gk-modal-body .drill-row-del {
  grid-column: 4;
  grid-row: 1;
  background: transparent;
  color: #94a3b8;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.gk-modal-body .drill-row-del:hover {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
}
.gk-modal-body .drill-row-del:focus-visible {
  outline: 2px solid #f87171;
  outline-offset: 1px;
}

@media (max-width: 640px) {
  .gk-modal-body .drills-builder-actions {
    grid-template-columns: minmax(0, 1fr);
  }
  .gk-modal-body .drill-row {
    grid-template-columns: 20px 26px minmax(0, 1fr) 26px;
    gap: 0.4rem 0.45rem;
    padding: 0.6rem;
  }
  .gk-modal-body .drill-row-meta {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .gk-modal-body .use-drill-banner {
    flex-wrap: wrap;
  }
  .gk-modal-body .use-drill-open {
    width: 100%;
    text-align: center;
  }
  .gk-modal-body .use-drill-actions {
    width: 100%;
  }
}

/* Page-local modals (goalkeepers, microcycle planner) */
.modal-card {
  color: #e2e8f0;
  color-scheme: dark;
}
.modal-card label {
  color: #cbd5e1;
}
.modal-card small {
  color: #94a3b8;
}

/* Evaluation modal */
.gk-modal-body .session-info {
  background: #0f172a;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #334155;
  margin-bottom: 1rem;
}
.gk-modal-body .info-row {
  margin-bottom: 0.5rem;
  color: #e2e8f0;
}
.gk-modal-body .rating-scale {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  flex-wrap: wrap;
}
.gk-modal-body .rating-options {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.gk-modal-body .rating-option input {
  display: none;
}
.gk-modal-body .rating-number {
  width: 28px;
  height: 28px;
  border: 2px solid #475569;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #cbd5e1;
  background: #1e293b;
  cursor: pointer;
}
.gk-modal-body .rating-option input:checked + .rating-number {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
}
.gk-modal-body .gk-session-rating-auto {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4rem;
  padding: 0.5rem 1rem;
  border: 2px solid #334155;
  border-radius: 8px;
  background: #0f172a;
  color: #f1f5f9;
  font-size: 1.25rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  user-select: none;
}
.gk-modal-body .gk-session-rating-auto.is-empty {
  color: #64748b;
  font-weight: 600;
}
.gk-modal-body .gk-session-rating-auto-hint {
  font-size: 0.85rem;
  color: #94a3b8;
  margin: 0.25rem 0 0.5rem;
}
.gk-modal-body .goalkeeper-evaluation-card {
  background: #0f172a;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #334155;
  margin-bottom: 1rem;
}
.gk-modal-body .evaluation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}
.gk-modal-body .eval-criterion-hint {
  margin: 0.15rem 0 0.35rem;
  color: #94a3b8;
  font-size: 0.78rem;
  line-height: 1.35;
}
.gk-modal-body .card {
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.gk-modal-body .card-header h3 {
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.selected-focus-container,
.selected-equipment-container,
.selected-goalkeepers-container {
  min-height: 40px;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 8px;
  background-color: #0f172a;
}
.selected-focus-container .no-selection,
.selected-equipment-container .no-selection,
.selected-goalkeepers-container .no-selection {
  color: #64748b;
  font-style: italic;
}
.focus-tag {
  display: inline-block;
  background-color: #1e40af;
  color: #93c5fd;
  padding: 4px 8px;
  margin: 2px;
  border-radius: 12px;
  font-size: 12px;
}
.focus-tag .remove-tag,
.equipment-tag .remove-equipment,
.goalkeeper-tag .remove-goalkeeper {
  margin-left: 6px;
  cursor: pointer;
  font-weight: bold;
}
.equipment-tag {
  display: inline-block;
  background-color: #166534;
  color: #86efac;
  padding: 4px 8px;
  margin: 2px;
  border-radius: 12px;
  font-size: 12px;
}
.goalkeeper-tag {
  display: inline-block;
  background-color: #164e63;
  color: #67e8f9;
  padding: 4px 8px;
  margin: 2px;
  border-radius: 12px;
  font-size: 12px;
}
.equipment-quantity {
  background-color: rgba(255, 255, 255, 0.15);
  padding: 2px 6px;
  border-radius: 8px;
  margin-left: 4px;
  font-size: 10px;
}
.quantity-input {
  width: 50px;
  padding: 2px 4px;
  border: none;
  border-radius: 3px;
  background-color: rgba(255, 255, 255, 0.9);
  color: #333;
  font-size: 11px;
  text-align: center;
}
#calculated_age {
  color: #3b82f6;
  font-weight: 600;
  margin-top: 0.35rem;
}
@media (max-width: 768px) {
  .gk-modal-body .form-grid {
    grid-template-columns: 1fr;
  }
}

/* Alerts */
.alert {
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.alert-error {
  background: #7f1d1d;
  color: #fecaca;
  border: 1px solid #991b1b;
}

/* Draggable "New Session" FAB (shared across pages) */
.fab-new-drill {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1050;
  background: #3b82f6;
  color: #fff;
  padding: 0.65rem 1.1rem;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.45);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.92rem;
  line-height: 1.2;
  transition: background 0.2s, box-shadow 0.2s, opacity 0.15s;
  touch-action: none;
  user-select: none;
  cursor: grab;
  white-space: nowrap;
  max-width: calc(100vw - 16px);
}
.fab-new-drill:hover {
  background: #2563eb;
  color: #fff;
}
.fab-new-drill.is-dragging {
  cursor: grabbing;
  opacity: 0.9;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.55);
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
    width: 100%;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  /* Page adjustments for mobile */
  .page-header h2 {
    font-size: 1.8rem;
  }

  .page-header p {
    font-size: 1rem;
  }

  .card {
    padding: 1.5rem;
  }

  .form-card {
    max-width: 100%;
  }

  /* Table responsive */
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 600px;
  }

  th, td {
    padding: 0.75rem 0.5rem;
    font-size: 0.9rem;
  }

  /* Button adjustments */
  .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }

  .filter-form {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-form select,
  .filter-form input[type="date"],
  .filter-form input[type="text"],
  .filter-form input[type="search"],
  .filter-form input[type="month"] {
    width: 100%;
    margin-left: 0 !important;
  }

  .filter-bar label {
    display: block;
    margin-bottom: 0.25rem;
  }

  .page-header-row {
    flex-direction: column;
    align-items: stretch;
  }

  .goal-meta,
  .session-ratings {
    flex-direction: column;
    gap: 0.5rem;
  }

  .profile-info {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 10px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
    width: 100%;
  }

  .stat-card {
    padding: 0.9rem 0.65rem;
  }

  .stat-value {
    font-size: 1.5rem;
  }

  .stat-label {
    font-size: 0.65rem;
  }

  .page-header h2 {
    font-size: 1.5rem;
  }

  .page-header p {
    font-size: 0.9rem;
  }

  .card {
    padding: 1rem;
  }

  /* Smaller table on very small screens */
  table {
    min-width: 500px;
  }

  th, td {
    padding: 0.5rem 0.25rem;
    font-size: 0.8rem;
  }

  /* Form adjustments */
  input, select, textarea {
    padding: 0.6rem;
    font-size: 0.9rem;
  }

  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }
}

/* Shared rating-scale UI — used by session evaluation modal and matchday evaluation page */
.rating-scale {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0;
  flex-wrap: wrap;
}
.rating-scale.small {
  gap: 0.4rem;
}
.rating-scale .scale-label {
  font-size: 0.75rem;
  color: #94a3b8;
  min-width: 50px;
}
.rating-options {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.rating-option {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.rating-option input {
  display: none;
}
.rating-number {
  width: 32px;
  height: 32px;
  border: 2px solid #334155;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: #94a3b8;
  background: #0f172a;
  transition: all 0.15s ease;
}
.rating-option:hover .rating-number {
  border-color: #3b82f6;
  color: #e2e8f0;
}
.rating-option input:checked + .rating-number {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
}

/* =====================================================================
   Shared drill-row preview (used by sessions.php expand row AND
   library.php Sessions tab). Single source of truth — render both pages
   from this one block via includes/components/session-drill-row.php.
   ===================================================================== */
.gk-drill-count {
  /* Subdued counter badge that follows a "Drills" heading. */
  color: #64748b;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
}
.gk-drill-row-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.gk-drill-row-item {
  margin: 0;
  padding: 0;
  position: relative;
}
.gk-drill-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  text-decoration: none;
  color: inherit;
  transition: color 0.15s ease;
}
.gk-drill-row-item + .gk-drill-row-item .gk-drill-row {
  border-top: 1px solid #334155;
}
.gk-drill-row:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}
.gk-drill-row-pos {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.gk-drill-main {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}
/* The thumb is a hover-revealed preview that floats out of the row's flow
   so the list itself stays as a tidy single column. It anchors to the
   .gk-drill-row-item (position: relative above) and pops just below the row. */
.gk-drill-row-thumb {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  z-index: 5;
  width: 503px;
  height: 204px;
  max-width: calc(100% - 8px);
  border-radius: 8px;
  object-fit: cover;
  background: #4a7c59;
  display: block;
  border: 1px solid #334155;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transform: scale(0.96);
  transform-origin: top left;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
/* Empty placeholder (drills with no saved canvas image) is suppressed -
   nothing useful to preview, so don't pop a blank 503x204 box on hover. */
.gk-drill-row-thumb.is-empty { display: none; }
.gk-drill-row:hover .gk-drill-row-thumb,
.gk-drill-row:focus-within .gk-drill-row-thumb {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}
.gk-drill-row-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}
.gk-drill-row-title {
  color: #e2e8f0;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gk-drill-row:hover .gk-drill-row-title { color: #93c5fd; }
.gk-drill-row-desc {
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.35;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gk-drill-row-meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.55rem;
  color: #94a3b8;
  font-size: 11px;
  margin-top: 2px;
}
.gk-drill-row-dur { font-weight: 600; color: #93c5fd; }
.gk-drill-row-equip {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.gk-drill-row-cta {
  font-size: 11px;
  color: #60a5fa;
  font-weight: 700;
  padding-left: 0.25rem;
  white-space: nowrap;
}
.gk-drill-row:hover .gk-drill-row-cta { text-decoration: underline; }

/* ===== Responsive (round 2): mobile tightening ===========================
   Tightens the shared drill-row partial for narrow viewports. The whole row
   is wrapped in an <a> tag, so the inline "Open →" CTA is redundant on
   touch devices — drop it to give the title room to wrap naturally. */
@media (max-width: 720px) {
  .gk-drill-row {
    grid-template-columns: 28px 1fr;
    padding: 0.4rem 0.55rem;
    gap: 0.5rem;
  }
  .gk-drill-row-cta { display: none; }
  /* Hover doesn't exist on touch; the thumb is a desktop-only affordance.
     display:none avoids reserved-space layout jumps on tap. */
  .gk-drill-row-thumb { display: none; }
  .gk-drill-row-title {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.3;
  }
  .gk-drill-row-meta { flex-wrap: wrap; }
}

.scope-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  margin-left: 0.35rem;
  vertical-align: middle;
}
.scope-badge-team {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.35);
}
.scope-badge-personal {
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

[hidden] {
  display: none !important;
}

.create-session-form--personal .scope-gk-create,
.create-session-form--personal .scope-team-only,
.create-session-form--personal .scope-team-duration,
.create-session-form--personal .scope-team-extras {
  display: none !important;
}

/* Shared toast — used by save/submit flows site-wide */
.gk-toast-container {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 10000;
  pointer-events: none;
  max-width: calc(100vw - 2.5rem);
}
.gk-toast {
  background: #1e293b;
  border: 1px solid #334155;
  border-left: 3px solid #3b82f6;
  color: #e2e8f0;
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  font-size: 13px;
  line-height: 1.4;
  min-width: 220px;
  max-width: 360px;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.gk-toast.show { opacity: 1; transform: translateY(0); }
.gk-toast.hide { opacity: 0; transform: translateY(10px); }
.gk-toast-success { border-left-color: #10b981; }
.gk-toast-error { border-left-color: #ef4444; }
.gk-toast-info { border-left-color: #3b82f6; }
@media (max-width: 480px) {
  .gk-toast-container { left: 1rem; right: 1rem; bottom: 1rem; }
  .gk-toast { min-width: 0; max-width: none; }
}

/* Goalkeeper club vs other categories */
.gk-category-tabs-wrap {
  margin-bottom: 1.5rem;
  padding-bottom: 0;
  border-bottom: 1px solid #334155;
}
.gk-category-tabs {
  display: inline-flex;
  align-items: stretch;
  gap: 0.35rem;
  max-width: 100%;
  margin-bottom: -1px;
}
.gk-category-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  background: transparent;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.gk-category-tab-label {
  display: inline-block;
}
.gk-category-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.85);
  border: 1px solid #475569;
  color: #cbd5e1;
  font-size: 0.68rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.gk-category-tab:hover {
  color: #e2e8f0;
  background: rgba(30, 41, 59, 0.65);
  border-color: #334155;
}
.gk-category-tab:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
  z-index: 1;
}
.gk-category-tab.is-active {
  color: #f8fafc;
  background: #1e293b;
  border-color: #334155;
  box-shadow: inset 0 2px 0 #3b82f6, inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.gk-category-tab.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: #1e293b;
  z-index: 2;
}
.gk-category-tab.is-active .gk-category-tab-count {
  background: #2563eb;
  border-color: #3b82f6;
  color: #fff;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.35);
}
@media (max-width: 520px) {
  .gk-category-tabs {
    display: flex;
    width: 100%;
  }
  .gk-category-tab {
    flex: 1;
    padding: 0.65rem 0.75rem;
    font-size: 0.8125rem;
  }
}
.gk-badge-other {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: #422006;
  border: 1px solid #92400e;
  color: #fcd34d;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  vertical-align: middle;
  margin-left: 0.35rem;
}
.gk-profile-category-badge {
  font-size: 0.78rem;
  margin-left: 0;
}
.goalkeeper-tag.has-other {
  border-color: #92400e;
}
.include-others-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  color: #e2e8f0;
  cursor: pointer;
  margin-bottom: 0.35rem;
}
.include-others-toggle--inline {
  margin-bottom: 0;
  flex: 0 0 auto;
  font-size: 0.88rem;
  line-height: 1.3;
}
.gk-select-label-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  margin-bottom: 0.25rem;
}
.gk-select-label-row > label[for="goalkeeper_select"] {
  margin-bottom: 0;
}
.gk-select-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem 1.25rem;
}
.gk-select-field {
  flex: 1 1 14rem;
  min-width: 0;
}
.gk-select-field select {
  width: 100%;
}
.gk-select-field .form-hint {
  margin-top: 0.25rem;
  margin-bottom: 0.35rem;
}
.include-others-toggle input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: #3b82f6;
}

/* ===== Phone-first utilities (max-width: 640px) ========================== */
@media (max-width: 640px) {
  body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  .container {
    padding: 12px;
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }

  .page-header h2 {
    font-size: 1.45rem;
  }

  .page-header p {
    font-size: 0.95rem;
  }

  .page-header-row {
    flex-direction: column;
    align-items: stretch;
  }

  :is(.gkp-toolbar-row, .sessions-toolbar-row) {
    gap: 0.5rem;
  }

  .card {
    padding: 1rem;
    overflow-x: hidden;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
    width: 100%;
  }

  .stat-card {
    padding: 0.85rem 0.6rem;
  }

  .stat-value {
    font-size: 1.45rem;
  }

  .stat-label {
    font-size: 0.62rem;
  }

  .content-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .goalkeepers-grid {
    grid-template-columns: 1fr !important;
  }

  .form-grid {
    grid-template-columns: 1fr !important;
  }

  /* Mobile 2×2 button grids (see .btn-grid-mobile rules below) */

  .btn-primary,
  .btn-secondary,
  .btn-success,
  .btn-info,
  .btn-warning,
  .btn-danger {
    min-height: 44px;
  }

  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-left: -0.25rem;
    margin-right: -0.25rem;
    padding-bottom: 0.25rem;
  }

  .gk-modal-overlay,
  .modal-overlay {
    padding: 0.5rem;
    padding-top: max(0.5rem, env(safe-area-inset-top));
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
    align-items: flex-start;
  }

  .gk-modal-card,
  .modal-card {
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - 1rem);
    padding: 1.25rem;
    margin-top: auto;
    margin-bottom: auto;
  }

  .gk-modal-card.gk-modal-wide {
    max-width: none;
  }

  .gk-modal-body .form-grid,
  .modal-card .form-grid {
    grid-template-columns: 1fr !important;
  }

  .gk-select-row {
    flex-direction: column;
    align-items: stretch;
  }

  .include-others-toggle--inline {
    margin-bottom: 0;
  }

  .fab-new-drill {
    bottom: max(1rem, env(safe-area-inset-bottom));
    right: max(1rem, env(safe-area-inset-right));
    max-width: calc(100vw - 2rem);
  }

  .gk-toast-container {
    left: 1rem;
    right: 1rem;
    bottom: max(1rem, env(safe-area-inset-bottom));
    max-width: none;
  }

  .gk-toast {
    min-width: 0;
    max-width: none;
  }

  .settings-tabs,
  .gk-category-tabs-wrap,
  .gk-category-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
  }

  .settings-toggle-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .settings-toggle-actions .btn,
  .settings-permissions-save {
    width: 100%;
  }

  .settings-perm-roles {
    justify-content: flex-start;
  }

  .profile-info {
    grid-template-columns: 1fr;
  }

  .filter-form {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-form select,
  .filter-form .btn,
  .filter-form input {
    width: 100%;
  }

  .pt-drill-preview-overlay {
    padding: 0.5rem;
    align-items: flex-start;
  }

  .pt-drill-preview-card {
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - 1rem);
    padding: 1rem 1.15rem 1.25rem;
  }

  .pt-drill-preview-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    align-items: stretch;
  }

  .pt-drill-preview-actions .btn {
    width: 100% !important;
    min-height: 44px;
    text-align: center;
    font-size: 0.82rem;
  }

  .library-tabs,
  .settings-page .settings-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .card.sessions-list-card {
    padding: 1rem;
  }

  .card.list-table-card:has(.table-container) {
    padding: 1rem;
  }

  .card.list-table-card > .gk-filter-bar {
    padding: 0;
    margin: 0 0 1rem;
    border-bottom: none;
  }

  .card.list-table-card > .gk-filter-bar + .table-container,
  .card.list-table-card > .gk-filter-bar + .info-banner {
    padding: 0;
    margin-top: 0;
  }

  .card.sessions-list-card > .gk-filter-bar.sessions-filter-bar {
    padding: 0;
    margin: 0 0 1rem;
    border-bottom: none;
  }

  .card.sessions-list-card > .gk-filter-bar.sessions-filter-bar + .table-container {
    margin-top: 0;
    padding: 0;
  }

  .card.list-table-card > .table-container {
    padding: 0;
  }

  .card.list-table-card > .crit-card-head + .table-container,
  .card.list-table-card > .prep-card-head + .table-container,
  .card.list-table-card > .gkp-pt-card-sub + .table-container {
    margin-top: 0;
  }

  .card.list-table-card > .crit-card-head,
  .card.list-table-card > .prep-card-head {
    padding: 0;
    margin-bottom: 0.85rem;
    border-bottom: none;
  }

  .card.list-table-card > .gkp-pt-card-head {
    padding: 0;
    margin-bottom: 0.35rem;
  }

  .card.list-table-card > .gkp-pt-card-sub {
    padding: 0;
    margin: 0 0 1rem;
    border-bottom: none;
  }

  .card.sessions-list-card > .sessions-pagination,
  .card.list-table-card > .sessions-pagination {
    padding: 0.85rem 0;
    margin: 0 -0.25rem;
  }

  .gk-filter-bar:not(:has(input[type="search"])) {
    flex-direction: column;
    align-items: stretch;
  }

  .gk-filter-bar input[type="search"],
  .gk-filter-bar input[type="text"],
  .gk-filter-bar input[type="date"],
  .gk-filter-bar input[type="month"],
  .gk-filter-bar select {
    width: 100%;
    max-width: none;
    min-width: 0;
    flex: none;
  }

  .login-card {
    max-width: none;
    padding: 1.5rem;
  }

  .login-card .btn-primary {
    width: 100%;
    min-height: 44px;
  }

  /* Filter bars, labels, and touch-friendly controls */
  .filter-bar {
    padding: 1rem 0.85rem;
    margin-bottom: 1.25rem;
  }

  .filter-bar label {
    display: block;
    margin: 0 0 0.35rem;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
  }

  .filter-form > div {
    width: 100%;
  }

  .filter-form select,
  .filter-form input[type="date"],
  .filter-form input[type="text"],
  .filter-form input[type="search"],
  .filter-form input[type="month"] {
    font-size: 16px;
    min-height: 44px;
    padding: 0.5rem 0.75rem;
  }

  .filter-bar .btn {
    min-height: 44px;
  }

  .filter-meta {
    font-size: 0.85rem;
    line-height: 1.5;
  }

  /* ── Mobile 2×2 button grids (replaces full-width stacks) ── */
  .btn-has-short .btn-text-full {
    display: none !important;
  }

  .btn-has-short .btn-text-short {
    display: inline !important;
  }

  :is(
    .btn-grid-mobile,
    .page-header-actions,
    .page-header-row > div:has(> .btn, > a.btn, > button.btn),
    .matchday-page .page-header .ph-actions,
    .action-pair,
    .library-card-actions,
    .library-card-actions-row,
    .form-actions,
    .modal-actions,
    .gk-modal-body .form-actions,
    .gk-modal-body .modal-actions,
    .empty-state-actions,
    .quick-actions-secondary,
    .pt-create-actions,
    .dev-head-actions,
    .settings-toggle-actions,
    .crit-modal-actions,
    .prep-modal-actions,
    .dev-crit-modal-actions
  ) {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    width: 100%;
    align-items: stretch;
    flex-direction: unset;
    flex-wrap: unset;
  }

  .filter-form .form-actions {
    flex: 1 1 100%;
    min-width: 100%;
  }

  :is(
    .btn-grid-mobile,
    .page-header-actions,
    .page-header-row > div:has(> .btn, > a.btn, > button.btn),
    .matchday-page .page-header .ph-actions,
    .action-pair,
    .library-card-actions,
    .library-card-actions-row,
    .form-actions,
    .modal-actions,
    .gk-modal-body .form-actions,
    .gk-modal-body .modal-actions,
    .empty-state-actions,
    .quick-actions-secondary,
    .pt-create-actions,
    .dev-head-actions,
    .settings-toggle-actions,
    .crit-modal-actions,
    .prep-modal-actions,
    .dev-crit-modal-actions,
    .filter-form .form-actions
  ) :is(.btn, a.btn, button.btn) {
    width: 100% !important;
    min-height: 44px;
    max-width: none;
    text-align: center;
    font-size: 0.82rem;
    padding: 0.55rem 0.45rem;
    margin-left: 0 !important;
    margin-right: 0 !important;
    flex: unset !important;
    justify-content: center;
  }

  .modal-actions .btn-danger {
    grid-column: 1 / -1;
  }

  /* Primary action top-left when it is last in markup (e.g. sessions toolbar) */
  :is(
    .pt-create-actions,
    .page-header-actions,
    .page-header-row > div:has(.btn),
    .filter-form .form-actions
  ) .btn-primary {
    order: -1;
  }

  :is(
    .btn-grid-mobile,
    .page-header-actions,
    .page-header-row > div:has(> .btn, > a.btn, > button.btn),
    .form-actions,
    .modal-actions,
    .empty-state-actions,
    .quick-actions-secondary,
    .pt-create-actions,
    .dev-head-actions,
    .filter-form .form-actions,
    .matchday-page .page-header .ph-actions
  ) :is(.btn, a.btn):only-child {
    grid-column: 1 / -1;
  }

  /* Standalone header buttons (e.g. microcycle “New week”) */
  .page-header-row > .page-header-actions:only-child,
  .page-header-row > .btn.btn-primary:only-of-type {
    width: 100%;
  }

  .page-header-row > .btn.btn-primary:only-of-type {
    min-height: 44px;
    text-align: center;
  }

  .gk-category-tab {
    min-height: 44px;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
  }

  .card h3 {
    font-size: 1.05rem;
    line-height: 1.3;
  }

  .btn-sm {
    min-height: 40px;
    padding: 0.5rem 0.85rem;
    font-size: 0.88rem;
  }

  .form-group label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
  }

  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="date"],
  input[type="search"],
  input[type="month"],
  select,
  textarea {
    font-size: 16px;
  }
}

/* ===== Mobile list cards (table → cards at ≤720px) ======================== */
.mobile-list-cards {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-direction: column;
  gap: 0.65rem;
}

.mobile-list-card-item {
  background: #1e293b;
  border: 1px solid #334155;
  border-left: 3px solid #3b82f6;
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
}

.mobile-list-card-item.is-page-hidden {
  display: none !important;
}

.mobile-list-card-head {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin-bottom: 0.5rem;
}

.mobile-list-card-head:last-child {
  margin-bottom: 0;
}

.mobile-list-rank {
  flex: 0 0 auto;
  min-width: 1.75rem;
  height: 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #0f172a;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 700;
}

.mobile-list-title-block {
  flex: 1 1 auto;
  min-width: 0;
}

.mobile-list-title {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.25;
  word-break: break-word;
  text-decoration: none;
}

a.mobile-list-title:hover {
  color: #93c5fd;
  text-decoration: underline;
}

.mobile-list-sub {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.3;
}

.mobile-list-card-item .overall-rating,
.mobile-list-card-item .rating-chip {
  flex: 0 0 auto;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  color: #fff;
  white-space: nowrap;
}

.mobile-list-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 0.65rem;
}

.mobile-list-stats.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mobile-list-stat {
  min-width: 0;
}

.mobile-list-stat-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 0.12rem;
  line-height: 1.2;
}

.mobile-list-stat-value {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: #e2e8f0;
  line-height: 1.2;
}

.mobile-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.mobile-list-actions .btn {
  min-height: 40px;
  flex: 1 1 auto;
}

.mobile-list-note {
  margin-top: 0.45rem;
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.35;
  word-break: break-word;
}

.mobile-list-badge {
  display: inline-block;
  margin-top: 0.4rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.3;
  background: rgba(148, 163, 184, 0.12);
}

.has-mobile-list-cards > .mobile-list-cards + .sessions-pagination,
.card.has-mobile-list-cards > .sessions-pagination {
  margin-top: 0;
}

/* Desktop: never show parallel mobile card lists or their pagination */
@media (min-width: 721px) {
  .has-mobile-list-cards > .mobile-list-cards {
    display: none !important;
  }

  .card.has-mobile-list-cards > .sessions-pagination {
    display: none !important;
  }
}

@media (max-width: 720px) {
  .has-mobile-list-cards > .table-container,
  .has-mobile-list-cards > .archive-table-wrap,
  .has-mobile-list-cards > div[style*="overflow-x"] {
    display: none !important;
  }

  .has-mobile-list-cards > .mobile-list-cards {
    display: flex;
    flex-direction: column;
    padding: 0 var(--list-card-x, 1.25rem);
  }

  .card.has-mobile-list-cards > h3 + .mobile-list-cards,
  .card.has-mobile-list-cards.list-table-card > h3 + .mobile-list-cards {
    margin-top: 0.5rem;
  }

  .mobile-list-stats.cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 400px) {
  .mobile-list-title {
    font-size: 0.88rem;
  }

  .mobile-list-stat-value {
    font-size: 0.82rem;
  }

  .mobile-list-stat-label {
    font-size: 0.58rem;
  }
}

/* ── Utility: drag-handle indicator ── */
.ed-drag-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    touch-action: none;
    color: #94a3b8;
    padding: 0 4px;
    border-radius: 4px;
    line-height: 1;
    user-select: none;
    transition: color 0.12s, background 0.12s;
}
.ed-drag-handle::before {
    content: '⣿';
    font-size: 13px;
    opacity: 0.65;
    letter-spacing: -1px;
}
.ed-drag-handle:hover  { color: #cbd5e1; background: rgba(148,163,184,0.1); }
.ed-drag-handle:active { cursor: grabbing; color: #93c5fd; }

/* ── Utility: center-align text/content ── */
.ed-text-center {
    text-align: center;
    justify-content: center;
}