: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);
  text-align: center;
}
.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;
}

.message-button {
  position: relative;
}

.message-button.has-new-messages,
.nav-item.has-new-messages,
.nav-item.has-pending-registrations {
  background: #fff4c7;
  color: #12385a;
  animation: messagePulse 1.15s ease-in-out infinite;
}

.message-button.has-new-messages::after,
.nav-item.has-new-messages::after,
.nav-item.has-pending-registrations::after {
  content: attr(data-count);
  position: absolute;
  top: -6px;
  left: -6px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 19px;
}

.nav-item.has-new-messages,
.nav-item.has-pending-registrations {
  position: relative;
  border-color: #f2d174;
  font-weight: 800;
}

.nav-item.has-new-messages::after,
.nav-item.has-pending-registrations::after {
  top: 4px;
  left: 4px;
}

.event-card.is-new-message {
  border-color: #f2d174;
  background: #fffaf0;
  animation: messagePulse 1.25s ease-in-out infinite;
}

@keyframes messagePulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(242, 169, 59, 0.45);
  }
  50% {
    box-shadow: 0 0 0 9px rgba(242, 169, 59, 0);
  }
}

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

.avatar.image-avatar img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
}

.player-photo {
  border-radius: 10px;
  background: #fff;
  padding: 4px;
}

.player-photo img {
  object-fit: contain !important;
  object-position: center center !important;
}

.jersey-badge {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  position: relative;
  color: #12385a;
  font-weight: 900;
}

.jersey-icon {
  position: absolute;
  inset: 8px 9px 5px;
  background: linear-gradient(180deg, #ffe978 0%, #ffd042 64%, #f5b82e 100%);
  border: 2px solid #d79f12;
  border-radius: 8px 8px 12px 12px;
  box-shadow: inset 0 -7px 0 rgba(153, 99, 0, 0.14), 0 8px 16px rgba(18, 56, 90, 0.12);
  clip-path: polygon(20% 0, 35% 0, 42% 12%, 58% 12%, 65% 0, 80% 0, 100% 18%, 86% 34%, 78% 28%, 78% 100%, 22% 100%, 22% 28%, 14% 34%, 0 18%);
}

.jersey-badge strong {
  position: relative;
  z-index: 1;
  font-size: 19px;
}

.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;
}

.login-title {
  display: grid;
  gap: 4px;
  line-height: 1.16;
}

.login-title span {
  display: block;
}

.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;
  text-align: center;
}

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

.auth-button {
  width: 100%;
}

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

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

.registration-toggle {
  justify-self: center;
}

.registration-entry-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding-top: 2px;
}

.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 {
  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: minmax(0, 1fr);
  gap: 10px;
  text-align: right;
  border-width: 2px;
  border-color: color-mix(in srgb, var(--team-color, var(--line)) 72%, var(--line));
  background:
    linear-gradient(90deg, var(--team-color, transparent) 0 7px, transparent 7px),
    linear-gradient(135deg, color-mix(in srgb, var(--team-color, #fff) 18%, #fff), #fff 62%);
  overflow: hidden;
}

.event-card.is-clickable {
  width: 100%;
  cursor: pointer;
}

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

.event-card.is-reminder-due {
  border-color: #f2a93b;
  animation: messagePulse 1.25s ease-in-out infinite;
}

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

.event-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.event-card-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px;
}

.event-card-when {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.event-card-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.event-card-main strong {
  display: block;
  color: #08111f;
  font-size: 15px;
  line-height: 1.28;
  white-space: normal;
  overflow-wrap: anywhere;
}

.event-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

.time-pill {
  display: grid;
  place-items: center;
  min-height: 38px;
  min-width: 76px;
  border-radius: 8px;
  background: var(--team-color, var(--brand));
  color: #fff;
  border: 1px solid color-mix(in srgb, var(--team-color, var(--line)) 84%, #fff);
  font-weight: 800;
  font-size: 13px;
  direction: ltr;
}

.date-pill {
  display: grid;
  place-items: center;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  background: #eef5fb;
  color: var(--brand);
  border: 1px solid var(--line);
  font-weight: 900;
  font-size: 12px;
  white-space: nowrap;
}

.team-color-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--team-color, var(--brand)) 18%, #fff);
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--team-color, var(--line)) 58%, var(--line));
  font-weight: 800;
  line-height: 1.2;
  vertical-align: middle;
}

.team-color-badge span {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--team-color, var(--brand));
}

.meeting-badge {
  --team-color: #7c3aed;
}

[hidden] {
  display: none !important;
}

.is-optional-for-meeting > span::after {
  content: " · אופציונלי בפגישה אישית";
  color: var(--muted);
  font-weight: 500;
}

.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;
}

.registration-request-list {
  display: grid;
  gap: 8px;
}

.registration-request-card {
  display: grid;
  grid-template-columns: 190px minmax(360px, 1fr) minmax(260px, 0.8fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 12px 14px;
  box-shadow: 0 5px 14px rgba(23, 63, 99, 0.035);
}

.registration-request-card header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.registration-request-card h4 {
  margin: 2px 0 0;
  font-size: 17px;
  line-height: 1.2;
}

.eyebrow {
  color: var(--brand-2);
  font-size: 11px;
  font-weight: 800;
}

.registration-request-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.registration-request-grid div,
.registration-request-children {
  min-width: 0;
}

.registration-request-grid span,
.registration-request-children > span {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.registration-request-grid strong {
  display: block;
  overflow-wrap: anywhere;
  white-space: normal;
  font-size: 14px;
}

.registration-request-children ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.registration-request-children li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

.registration-request-children li span {
  color: var(--muted);
  font-size: 12px;
}

.registration-request-card .row-actions {
  justify-content: flex-start;
  gap: 6px;
  flex-wrap: nowrap;
}

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

.avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 60px;
  border-radius: 10px;
  background: var(--soft-blue);
  color: var(--brand);
  font-weight: 800;
  border: 1px solid var(--line);
  overflow: hidden;
}

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

.avatar.medium {
  width: 88px;
  height: 110px;
  font-size: 22px;
}

.avatar.small {
  width: 44px;
  height: 56px;
  font-size: 14px;
}

.photo-preview {
  display: grid;
  place-items: center;
  width: min(220px, 100%);
  aspect-ratio: 4 / 5;
  margin-top: 8px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.photo-upload-field {
  display: grid;
  gap: 7px;
}

.photo-upload-field > span {
  color: var(--muted);
  font-weight: 700;
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  transform-origin: center center;
  display: block;
}

.photo-preview.is-empty {
  padding: 12px;
  background: #f8fbfe;
}

.photo-adjustments {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fbfe;
}

.photo-control-row {
  display: grid;
  gap: 4px;
}

.photo-control-row span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
}

.photo-adjustments input[type="range"] {
  width: 100%;
  accent-color: var(--brand);
}

.photo-adjustments.is-hidden {
  display: none;
}

.photo-toggle-button {
  justify-self: start;
  margin-top: 4px;
}

.photo-toggle-button.is-hidden {
  display: none;
}

.photo-reset-button {
  justify-self: start;
}

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

.player-cell {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  text-align: right;
}

.player-cell-name {
  line-height: 1.25;
}

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

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

.player-card-body {
  display: grid;
  gap: 4px;
}

.player-card-body strong {
  font-size: 18px;
}

.player-card.is-compact {
  padding: 10px;
}

.table-filters {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) repeat(3, minmax(150px, 1fr)) auto auto;
  gap: 10px;
  align-items: end;
  margin: 14px 0 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fbfe;
}

.table-filters label {
  display: grid;
  gap: 5px;
}

.table-filters label span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.table-filters input,
.table-filters select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
}

.filter-count {
  align-self: center;
  color: var(--brand);
  font-weight: 900;
  white-space: nowrap;
}

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

.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,
.video-preview {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  min-height: 132px;
  overflow: hidden;
  border-radius: 8px;
  background: #0b1724;
  border: 1px solid var(--line);
}

.drill-preview img,
.video-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: opacity 0.18s ease;
}

.drill-preview .field-card {
  min-height: 132px;
  height: 100%;
}

.video-preview iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.video-preview.has-hover-preview:hover iframe {
  opacity: 1;
}

.video-preview.has-hover-preview:hover img {
  opacity: 0;
}

.play-badge {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.92);
  color: var(--brand);
  font-weight: 900;
  box-shadow: var(--shadow);
}

.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;
}

.ltr-value,
input[type="tel"] {
  direction: ltr;
  unicode-bidi: plaintext;
}

.ltr-value {
  display: inline-block;
  text-align: left;
}

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;
}

.activity-registrants-list {
  display: grid;
  gap: 14px;
}

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

.activity-registrants-card h4 {
  margin: 0 0 4px;
  color: #08111f;
  font-size: 16px;
}

.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.is-active {
  border-color: var(--brand);
  background: #eaf3fb;
}

.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,
.form-grid .photo-upload-field {
  display: grid;
  gap: 7px;
}

.form-grid label span,
.form-grid .photo-upload-field > span {
  color: var(--muted);
  font-weight: 700;
}

.form-grid input,
.form-grid select,
.form-grid .photo-upload-field input[type="file"] {
  width: 100%;
}

.checkbox-list-field {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  margin: 0;
}

.checkbox-list-field legend {
  padding: 0 6px;
  color: var(--muted);
  font-weight: 800;
}

.checkbox-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

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

.checkbox-list input {
  width: auto;
}

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

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  width: min(460px, calc(100vw - 32px));
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  padding: 15px 18px;
  box-shadow: var(--shadow);
  text-align: right;
  line-height: 1.45;
  white-space: pre-wrap;
}

.toast-error {
  border: 1px solid rgba(216, 74, 74, 0.28);
  background: #fff1f1;
  color: #802121;
  box-shadow: 0 18px 44px rgba(123, 30, 30, 0.14);
}

@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;
  }

  .registration-request-card {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .registration-request-card header,
  .registration-request-children li {
    align-items: flex-start;
    flex-direction: column;
  }

  .registration-request-grid {
    grid-template-columns: 1fr;
  }

  .registration-request-card .row-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .registration-request-card .row-actions .mini-button {
    width: 100%;
  }

  .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));
  }

  .table-filters {
    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-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;
  }

  .table-filters {
    grid-template-columns: 1fr;
  }

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

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

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

  .player-card .jersey-badge {
    justify-self: start;
  }

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

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

  .player-hero .avatar {
    order: -1;
    justify-self: start;
  }

  .player-hero .avatar.large {
    width: min(150px, 46vw);
    height: 188px;
  }

  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;
  }
}
