:root {
  --ink: #172334;
  --muted: #6d7480;
  --line: #dfe5ec;
  --panel: #ffffff;
  --bg: #f3f6fa;
  --brand: #173f63;
  --brand-2: #27648f;
  --accent: #26a269;
  --warn: #f2a93b;
  --danger: #d84a4a;
  --soft-blue: #eaf3fb;
  --soft-green: #e8f7ef;
  --shadow: 0 16px 40px rgba(21, 37, 57, 0.1);
  font-family: "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
}

button,
select,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.is-hidden {
  display: none !important;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  background: #101820;
  overflow: hidden;
}

.login-visual {
  position: relative;
  background:
    linear-gradient(90deg, rgba(8, 15, 24, 0.92), rgba(23, 63, 99, 0.38)),
    url("https://images.pexels.com/photos/200986/pexels-photo-200986.jpeg?auto=compress&cs=tinysrgb&w=1800");
  background-position: center;
  background-size: cover;
}

.pitch-lines {
  position: absolute;
  inset: 9% 12%;
  border: 2px solid rgba(255, 255, 255, 0.22);
  opacity: 0.55;
}

.pitch-lines::before,
.pitch-lines::after {
  content: "";
  position: absolute;
  inset-block: 0;
  width: 2px;
  right: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.pitch-lines::after {
  width: 150px;
  height: 150px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: transparent;
  inset: calc(50% - 75px) calc(50% - 75px) auto auto;
}

.ball-mark {
  position: absolute;
  left: 12%;
  bottom: 9%;
  width: 190px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 45% 45%, #ffffff 0 16%, transparent 17%),
    conic-gradient(from 15deg, #f8f8f8, #d9dde2, #ffffff, #c9cfd7, #f8f8f8);
  opacity: 0.2;
}

.login-card {
  align-self: center;
  margin-inline: 0 64px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 18px;
  padding: 34px;
  box-shadow: var(--shadow);
}
.club-logo {
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(13, 24, 36, 0.14));
}

.login-logo {
  width: 116px;
  height: 116px;
  margin-inline: auto;
  margin-bottom: 18px;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-brand div {
  display: grid;
  gap: 2px;
}

.topbar-logo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  padding: 3px;
}

.sidebar-logo {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
}

.club-badge {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0;
}

.club-badge.small {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
}

.avatar.image-avatar {
  padding: 0;
  overflow: hidden;
  background: #dbe7f2;
}

.avatar.image-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.eyebrow {
  margin: 18px 0 6px;
  color: var(--brand-2);
  font-weight: 700;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: 31px;
  margin-bottom: 22px;
}

.role-grid {
  display: grid;
  gap: 12px;
}

.role-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 2px 12px;
  align-items: center;
  text-align: right;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 14px;
}

.role-card:hover,
.nav-item:hover,
.mobile-nav button:hover {
  border-color: var(--brand-2);
  background: var(--soft-blue);
}

.role-icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--soft-blue);
  color: var(--brand);
  font-size: 24px;
}

.role-card small,
.muted {
  color: var(--muted);
}

.auth-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7fbff;
  padding: 14px;
}

.auth-panel p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.auth-button {
  width: 100%;
}

.magic-link-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.auth-divider {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.registration-entry {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px dashed #b9c8d7;
  border-radius: 12px;
  background: #fbfdff;
}

.registration-entry p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.registration-entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.registration-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(90deg, rgba(8, 15, 24, 0.9), rgba(23, 63, 99, 0.48)),
    url("https://images.pexels.com/photos/114296/pexels-photo-114296.jpeg?auto=compress&cs=tinysrgb&w=1800");
  background-position: center;
  background-size: cover;
}

.registration-card {
  width: min(960px, 100%);
  max-height: calc(100vh - 56px);
  overflow: auto;
  background: rgba(255, 255, 255, 0.97);
  border-radius: 18px;
  padding: 30px;
  box-shadow: var(--shadow);
}

.registration-form {
  display: grid;
  gap: 18px;
}

.children-section {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbff;
}

.children-list {
  display: grid;
  gap: 12px;
}

.child-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) minmax(180px, 1.2fr) minmax(100px, 0.7fr) minmax(150px, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.registration-pending {
  display: grid;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7fbff;
}

.auth-panel.is-disabled .auth-button,
.auth-panel.is-disabled .magic-link-form {
  display: none;
}

.product-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  grid-template-rows: 64px 1fr;
}

.topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: var(--brand);
  color: #fff;
}

.topbar span {
  display: block;
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
}

.topbar small {
  display: block;
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  line-height: 1.2;
}

.topbar-actions,
.header-tools,
.metric-row,
.tabs {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ghost-button,
.icon-button,
.primary-button,
.chip,
.mini-button {
  border: 0;
  border-radius: 8px;
  min-height: 38px;
  padding: 0 14px;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.icon-button {
  width: 42px;
  padding: 0;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 20px;
}

.primary-button {
  background: var(--brand);
  color: #fff;
  font-weight: 700;
}

.sidebar {
  padding: 18px 14px;
  border-left: 1px solid var(--line);
  background: #fff;
}

.club-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.club-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.side-nav {
  display: grid;
  gap: 6px;
  margin-top: 18px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  padding: 11px 12px;
  color: var(--ink);
  text-align: right;
}

.nav-item.is-active {
  background: var(--brand);
  color: #fff;
}

.nav-icon {
  width: 28px;
  text-align: center;
}

.workspace {
  min-width: 0;
  padding: 24px;
  overflow: auto;
}

.workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.workspace-header .eyebrow {
  margin-top: 0;
}

.workspace-header h2 {
  margin-bottom: 0;
  font-size: 30px;
}

select,
input,
textarea {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 12px;
}

textarea {
  min-height: 120px;
  padding: 12px;
  resize: vertical;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.panel {
  grid-column: span 4;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  box-shadow: 0 8px 20px rgba(25, 40, 62, 0.04);
}

.panel.wide {
  grid-column: span 8;
}

.panel.full {
  grid-column: 1 / -1;
}

.panel h3 {
  margin-bottom: 14px;
}

.panel-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-title-row h3,
.panel-title-row p {
  margin-bottom: 0;
}

.metric {
  display: grid;
  gap: 4px;
}

.metric strong {
  font-size: 30px;
}

.metric-row {
  justify-content: space-between;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.metric-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.event-list,
.person-list,
.task-list,
.activity-grid {
  display: grid;
  gap: 10px;
}

.event-card,
.person-row,
.task-row,
.activity-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #fff;
}

.event-card {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: 12px;
  text-align: right;
}

.event-card.is-clickable {
  width: 100%;
  border-color: var(--line);
  cursor: pointer;
}

.event-card.is-clickable:hover {
  border-color: var(--brand-2);
  box-shadow: 0 8px 24px rgba(23, 63, 99, 0.1);
}

.event-card-action {
  grid-column: 2 / -1;
  justify-self: start;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
}

.event-card .record-actions {
  grid-column: 1 / -1;
}

.time-pill {
  display: grid;
  place-items: center;
  min-height: 52px;
  border-radius: 8px;
  background: var(--soft-blue);
  color: var(--brand);
  font-weight: 800;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 700;
}

.status.green {
  background: var(--soft-green);
  color: #11613b;
}

.status.blue {
  background: var(--soft-blue);
  color: var(--brand);
}

.status.orange {
  background: #fff2d8;
  color: #8a570f;
}

.status.red {
  background: #ffe7e7;
  color: #9a2727;
}

.person-row,
.task-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--soft-blue);
  color: var(--brand);
  font-weight: 800;
}

.avatar.large {
  width: 72px;
  height: 72px;
  font-size: 30px;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--brand);
  font-weight: 800;
  padding: 0;
}

.player-hero {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 16px;
}

.player-hero h2 {
  margin-bottom: 4px;
}

.note-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-bottom: 14px;
}

.note-list {
  display: grid;
  gap: 10px;
}

.note-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 12px;
}

.note-card p {
  margin: 6px 0 0;
}

.task-check {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--soft-green);
  color: var(--accent);
}

.field-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.15) 49%, rgba(255,255,255,.35) 50%, rgba(255,255,255,.15) 51%),
    repeating-linear-gradient(90deg, #1e7647 0 90px, #247f4e 90px 180px);
}

.field-card::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 2px solid rgba(255,255,255,.68);
}

.drill-dot {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f2a93b;
  border: 2px solid #fff;
}

.drill-dot.blue {
  background: #57a5d8;
}

.drill-line {
  position: absolute;
  height: 2px;
  background: rgba(255,255,255,.75);
  transform-origin: right center;
}

.goal-list {
  display: grid;
  gap: 12px;
}

.goal-list label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.goal-list input {
  min-height: auto;
  width: 18px;
  height: 18px;
}

.session-timeline {
  display: grid;
  grid-template-columns: repeat(60, minmax(9px, 1fr));
  gap: 8px;
}

.session-block {
  grid-column: span var(--block);
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 12px;
}

.drill-library {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.drill-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 12px;
}

.drill-card h4 {
  margin: 10px 0 4px;
}

.drill-preview .field-card {
  min-height: 120px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row span {
  border-radius: 999px;
  background: #edf4fb;
  color: var(--brand);
  padding: 4px 9px;
  font-size: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

th {
  background: #edf4fb;
  color: #23364a;
}

tr:nth-child(even) td {
  background: #f7fbff;
}

.activity-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.activity-card {
  min-height: 190px;
  display: grid;
  align-content: space-between;
}

.activity-card header {
  padding: 12px;
  margin: -12px -12px 12px;
  background: #edf4fb;
  border-radius: 10px 10px 0 0;
  font-weight: 800;
}

.mobile-nav {
  display: none;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.quick-action {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 14px;
  text-align: right;
}

.quick-action strong {
  display: block;
  margin-bottom: 4px;
}

.attendance-grid {
  display: grid;
  gap: 10px;
}

.attendance-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 12px;
}

.segmented {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: #edf1f5;
}

.segmented button {
  border: 0;
  border-radius: 999px;
  min-height: 32px;
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
}

.segmented button.is-selected {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 2px 8px rgba(23, 63, 99, 0.14);
}

.event-workspace-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
  gap: 18px;
  align-items: start;
  background: linear-gradient(135deg, #ffffff 0%, #edf6fb 100%);
}

.event-workspace-hero .mini-button {
  margin-bottom: 14px;
}

.event-meta-grid {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  padding: 10px;
}

.participant-list {
  display: grid;
  gap: 10px;
}

.participant-row {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 12px;
}

.participant-row p {
  margin: 2px 0 0;
}

.evaluation-controls {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(110px, 150px)) minmax(220px, 1fr);
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.evaluation-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.evaluation-controls select,
.evaluation-controls input {
  width: 100%;
  min-height: 36px;
}

.summary-form {
  display: grid;
  gap: 14px;
}

.summary-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr minmax(360px, 440px);
}

.drawer-backdrop {
  border: 0;
  background: rgba(13, 24, 36, 0.35);
}

.drawer-panel {
  position: relative;
  overflow: auto;
  background: #fff;
  padding: 28px;
  box-shadow: -18px 0 40px rgba(13, 24, 36, 0.2);
}

.drawer-close {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #edf1f5;
  font-size: 24px;
  line-height: 1;
}

.drawer-section {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.drawer-section:first-child {
  border-top: 0;
}

.entity-form {
  display: grid;
  gap: 0;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.form-grid label {
  display: grid;
  gap: 7px;
}

.form-grid label span {
  color: var(--muted);
  font-weight: 700;
}

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

.form-actions {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  min-width: 260px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

@media (max-width: 900px) {
  .login-screen {
    grid-template-columns: 1fr;
  }

  .login-visual {
    position: fixed;
    inset: 0;
  }

  .login-card {
    position: relative;
    margin: 24px;
    align-self: end;
    max-height: calc(100vh - 48px);
    overflow: auto;
  }

  .registration-card {
    max-height: calc(100vh - 48px);
    overflow: auto;
  }

  .child-row {
    grid-template-columns: 1fr 1fr 120px 1fr auto;
  }

  .login-logo {
    width: 96px;
    height: 96px;
  }

  .topbar-logo {
    width: 38px;
    height: 38px;
  }

  .product-screen {
    grid-template-columns: 1fr;
    grid-template-rows: 58px 1fr 74px;
  }

  .topbar {
    padding: 0 14px;
    gap: 10px;
  }

  .topbar-brand {
    min-width: 0;
  }

  .topbar-brand div {
    min-width: 0;
  }

  .topbar-brand strong,
  .topbar-brand span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sidebar {
    display: none;
  }

  .workspace {
    padding: 16px 14px 90px;
  }

  .workspace-header {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .workspace-header h2 {
    font-size: 26px;
  }

  .header-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .header-tools select,
  .header-tools button,
  .panel-title-row button,
  .quick-action,
  .activity-card .primary-button,
  .activity-card .mini-button {
    width: 100%;
  }

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

  .panel,
  .panel.wide,
  .panel.full {
    grid-column: 1;
  }

  .event-card {
    grid-template-columns: 58px 1fr;
    align-items: start;
  }

  .event-card .status {
    grid-column: 2;
    justify-self: start;
  }

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

  .panel-title-row {
    align-items: stretch;
    flex-direction: column;
  }

  .session-timeline {
    grid-template-columns: 1fr;
  }

  .session-block {
    grid-column: 1;
    min-height: auto;
  }

  .drill-library {
    grid-template-columns: 1fr;
  }

  .event-workspace-hero {
    grid-template-columns: 1fr;
  }

  .participant-row {
    grid-template-columns: auto 1fr;
  }

  .participant-row .segmented,
  .participant-row .mini-button {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .evaluation-controls {
    grid-template-columns: 1fr;
  }

  .mobile-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 5;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(74px, 1fr);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    background: #fff;
    border-top: 1px solid var(--line);
  }

  .mobile-nav button {
    min-width: 0;
    border: 0;
    border-top: 3px solid transparent;
    border-radius: 0;
    background: #fff;
    padding: 8px 4px;
    color: var(--muted);
    flex-direction: column;
    justify-content: center;
    gap: 2px;
  }

  .mobile-nav button.is-active {
    border-top-color: var(--brand-2);
    background: #eef6fc;
    color: var(--brand);
    font-weight: 800;
  }

  .mobile-nav button.is-active:hover {
    background: #e6f1fa;
  }

  .mobile-nav span {
    display: block;
  }

  .mobile-nav .nav-icon {
    width: auto;
    font-size: 21px;
  }

  .mobile-nav .nav-item > span:not(.nav-icon) {
    max-width: 100%;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  table {
    border: 0;
    background: transparent;
  }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  tbody {
    display: grid;
    gap: 10px;
  }

  tr {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
  }

  tr:nth-child(even) td {
    background: transparent;
  }

  td {
    display: grid;
    grid-template-columns: minmax(96px, 38%) minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    white-space: normal;
    word-break: break-word;
  }

  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 700;
  }

  td .row-actions {
    justify-content: stretch;
  }

  td .row-actions .mini-button {
    flex: 1 1 96px;
  }

  .quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .player-hero {
    grid-template-columns: auto 1fr;
  }

  .player-hero .status {
    grid-column: 1 / -1;
    justify-self: start;
  }

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

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

  .drawer-backdrop {
    display: none;
  }

  .drawer-panel {
    margin-top: 54px;
    padding: 24px 18px;
    border-radius: 18px 18px 0 0;
  }
}

@media (max-width: 520px) {
  .login-card {
    margin: 14px;
    padding: 24px 18px;
    border-radius: 14px;
  }

  .registration-screen {
    padding: 14px;
  }

  .registration-card {
    padding: 22px 18px;
    border-radius: 14px;
  }

  .registration-entry-actions,
  .form-actions {
    display: grid;
  }

  .child-row {
    grid-template-columns: 1fr;
  }

  .login-logo {
    width: 84px;
    height: 84px;
  }

  h1 {
    font-size: 25px;
  }

  .role-card {
    grid-template-columns: 38px 1fr;
    padding: 12px;
  }

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

  .role-icon {
    width: 36px;
    height: 36px;
    font-size: 21px;
  }

  .topbar-logo {
    width: 34px;
    height: 34px;
  }

  .topbar-actions {
    gap: 6px;
  }

  .icon-button {
    width: 38px;
    min-height: 38px;
  }

  .workspace {
    padding: 14px 10px 88px;
  }

  .workspace-header h2 {
    font-size: 24px;
  }

  .panel {
    padding: 14px;
    border-radius: 9px;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }

  .event-card,
  .person-row,
  .task-row,
  .attendance-card {
    grid-template-columns: 1fr;
  }

  .time-pill,
  .avatar,
  .task-check {
    justify-self: start;
  }

  .event-card .status,
  .event-card-action,
  .event-card .record-actions {
    grid-column: 1;
  }

  .activity-card {
    min-height: 0;
  }

  .player-hero {
    grid-template-columns: 1fr;
  }

  .player-hero .avatar {
    order: -1;
  }

  td {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .drawer-panel {
    margin-top: 38px;
    max-height: calc(100vh - 38px);
  }

  .toast {
    right: 10px;
    bottom: 86px;
    left: 10px;
    min-width: 0;
  }
}
