:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --ink: #17202a;
  --muted: #6b7785;
  --line: #d9e0e7;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --sidebar: #18202b;
  --sidebar-ink: #d9e2ec;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button {
  align-items: center;
  background: white;
  border: 1px solid #b7c9d4;
  border-radius: 4px;
  color: #006f8f;
  cursor: pointer;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  justify-content: center;
  min-height: 30px;
  padding: 5px 14px;
}

button:hover {
  background: #f8fbfd;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  padding: 10px 12px;
}

textarea {
  resize: vertical;
}

.checkbox-row {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  width: fit-content;
}

.checkbox-row[hidden] {
  display: none;
}

.checkbox-row input {
  width: auto;
}

.language-picker {
  display: flex;
  gap: 8px;
  margin: 8px 0 18px;
}

.language-picker button {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  display: inline-flex;
  font-size: 22px;
  height: 42px;
  justify-content: center;
  padding: 0;
  width: 48px;
}

.language-picker button.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.16);
}

a {
  color: var(--accent-dark);
}

.marketing-home {
  background: #f5f5f7;
  color: #1d1d1f;
  min-height: 100vh;
  overflow: hidden;
}

.marketing-nav {
  align-items: center;
  backdrop-filter: saturate(180%) blur(18px);
  background: rgba(245, 245, 247, 0.78);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  display: grid;
  gap: 18px;
  grid-template-columns: auto 1fr auto;
  inset: 0 0 auto;
  padding: 12px clamp(18px, 4vw, 56px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.marketing-brand {
  align-items: center;
  color: #1d1d1f;
  display: inline-flex;
  font-size: 15px;
  font-weight: 800;
  gap: 10px;
  text-decoration: none;
}

.marketing-nav nav {
  display: flex;
  gap: 24px;
  justify-content: center;
}

.marketing-nav nav a {
  color: #424245;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.marketing-login,
.marketing-hero-actions a {
  align-items: center;
  background: #0071e3;
  border-radius: 999px;
  color: white;
  display: inline-flex;
  font-size: 14px;
  font-weight: 800;
  justify-content: center;
  min-height: 34px;
  padding: 7px 16px;
  text-decoration: none;
}

.marketing-hero {
  align-items: center;
  background: radial-gradient(circle at 50% 12%, #334155 0, #111827 42%, #05070b 100%);
  color: white;
  display: grid;
  justify-items: center;
  min-height: calc(100vh - 58px);
  padding: 74px 22px 40px;
  text-align: center;
}

.marketing-hero p,
.marketing-feature p {
  color: #a7f3d0;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0;
  margin: 0 0 12px;
}

.marketing-hero h1 {
  font-size: clamp(46px, 7vw, 94px);
  letter-spacing: 0;
  line-height: 1.02;
  margin: 0;
  max-width: 1120px;
}

.marketing-hero > span {
  color: #d8dee9;
  display: block;
  font-size: clamp(19px, 2vw, 28px);
  line-height: 1.32;
  margin-top: 24px;
  max-width: 780px;
}

.marketing-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 28px 0 38px;
}

.marketing-hero-actions a + a {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.marketing-device {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 28px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.5);
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  height: min(390px, 45vw);
  max-height: 390px;
  max-width: 980px;
  min-height: 280px;
  overflow: hidden;
  text-align: left;
  width: min(92vw, 980px);
}

.device-sidebar {
  background: rgba(10, 16, 28, 0.78);
  display: grid;
  gap: 12px;
  padding: 22px;
}

.device-sidebar span {
  background: #ffb45c;
  border-radius: 9px;
  height: 42px;
  width: 42px;
}

.device-sidebar strong {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #e5e7eb;
  font-size: 14px;
  padding: 10px 12px;
}

.device-main {
  background: #f8fafc;
  display: grid;
  gap: 18px;
  grid-template-rows: 44px 74px 1fr;
  padding: 24px;
}

.device-topline,
.device-cards i,
.device-court {
  background: white;
  border: 1px solid #dbe4ee;
  border-radius: 14px;
}

.device-cards {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, 1fr);
}

.device-court {
  background: linear-gradient(90deg, rgba(222, 180, 110, 0.45), rgba(245, 214, 166, 0.6));
  position: relative;
}

.device-court b {
  border: 3px solid white;
  border-radius: 999px;
  height: 44px;
  position: absolute;
  width: 44px;
}

.device-court b:nth-child(1) {
  left: 16%;
  top: 32%;
}

.device-court b:nth-child(2) {
  left: 48%;
  top: 48%;
}

.device-court b:nth-child(3) {
  right: 18%;
  top: 28%;
}

.marketing-feature {
  align-items: center;
  display: grid;
  gap: 36px;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  margin: 14px auto 0;
  min-height: 620px;
  padding: clamp(48px, 8vw, 110px) clamp(22px, 5vw, 88px);
}

.marketing-feature:nth-of-type(odd) {
  background: white;
}

.marketing-feature h2 {
  font-size: clamp(42px, 6vw, 76px);
  letter-spacing: 0;
  line-height: 1.04;
  margin: 0;
}

.marketing-feature span {
  color: #535357;
  display: block;
  font-size: clamp(19px, 2vw, 26px);
  line-height: 1.35;
  margin-top: 20px;
  max-width: 620px;
}

.feature-visual {
  align-items: center;
  background: radial-gradient(circle at 30% 20%, #d9f4ee, #eef2ff 42%, #e5e7eb 100%);
  border-radius: 30px;
  display: flex;
  justify-content: center;
  min-height: 420px;
  overflow: hidden;
  padding: 34px;
}

.feature-glass {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  box-shadow: 0 22px 70px rgba(15, 23, 42, 0.18);
  display: grid;
  gap: 18px;
  max-width: 430px;
  padding: 26px;
  width: 100%;
}

.feature-glass strong {
  font-size: 24px;
}

.feature-glass em {
  background: #edf2f7;
  border-radius: 14px;
  height: 62px;
}

.marketing-feature-analysis .feature-visual {
  background: radial-gradient(circle at 65% 20%, #c7d2fe, #eff6ff 45%, #e2e8f0 100%);
}

.marketing-feature-report .feature-visual {
  background: radial-gradient(circle at 30% 25%, #fde68a, #fff7ed 48%, #e5e7eb 100%);
}

.marketing-feature-attendance .feature-visual {
  background: radial-gradient(circle at 70% 15%, #fecdd3, #f8fafc 45%, #e0f2fe 100%);
}

@media (max-width: 800px) {
  .marketing-nav {
    grid-template-columns: 1fr auto;
  }

  .marketing-nav nav {
    display: none;
  }

  .marketing-device {
    grid-template-columns: 1fr;
    height: auto;
  }

  .device-sidebar {
    display: none;
  }

  .marketing-feature {
    grid-template-columns: 1fr;
    min-height: auto;
  }
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 280px;
  background: var(--sidebar);
  color: var(--sidebar-ink);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 18px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #f7b267;
  color: #111827;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small,
.context-form label,
.topbar p,
small,
.item span {
  color: var(--muted);
}

.context-form {
  margin-bottom: 18px;
}

.context-form label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}

.context-form select {
  background: #111827;
  border-color: #303a48;
  color: var(--sidebar-ink);
}

nav {
  display: grid;
  flex: 1;
  align-content: start;
  gap: 0;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-color: #526174 transparent;
}

nav a,
.nav-group summary {
  border-radius: 6px;
  color: var(--sidebar-ink);
  display: block;
  padding: 10px 12px;
  text-decoration: none;
}

nav a.active,
nav a:hover,
.nav-group summary:hover {
  background: #253142;
  color: #fff;
}

.nav-group {
  border-radius: 6px;
}

.nav-group > summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  user-select: none;
}

.nav-group > summary::-webkit-details-marker {
  display: none;
}

.nav-group > summary::before {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}

.nav-group[open] > summary::before {
  transform: rotate(45deg);
}

.nav-summary-link {
  color: inherit;
  display: inline;
  flex: 1;
  padding: 0;
}

.nav-summary-link:hover {
  background: transparent;
  color: inherit;
}

.nav-children {
  border-left: 1px solid #7aa2b8;
  display: grid;
  gap: 0;
  margin: 0 0 0 16px;
  padding-left: 12px;
}

.nav-children a {
  display: block;
  padding: 8px 10px;
}

.nav-group-nested > summary {
  padding: 8px 10px;
}

.nav-group-nested .nav-children {
  margin-left: 14px;
  padding-left: 10px;
}

.nav-group-nested .nav-children a {
  padding: 7px 10px;
}

.sidebar-footer {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.sidebar-support-button {
  align-items: center;
  background: #fff;
  border: 1px solid #b7c9d4;
  border-radius: 4px;
  color: #006f8f;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  justify-content: center;
  min-height: 30px;
  padding: 5px 14px;
  text-decoration: none;
  width: 100%;
}

.sidebar-support-button:hover {
  background: #f8fbfd;
  color: #006f8f;
}

.sidebar-footer button {
  width: 100%;
  background: #303a48;
}

.main {
  margin-left: 280px;
  padding: 28px;
}

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

.topbar h1 {
  margin: 0;
  font-size: 30px;
}

.topbar p {
  margin: 4px 0 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.club-switcher,
.team-switcher {
  align-items: center;
  display: flex;
  gap: 8px;
}

.club-switcher label,
.team-switcher label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.club-switcher select,
.team-switcher select {
  min-width: 190px;
  width: auto;
}

.user-menu {
  position: relative;
}

.user-menu summary {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  cursor: pointer;
  list-style: none;
  padding: 8px 14px;
  user-select: none;
}

.user-menu-impersonating summary {
  border-color: #fecaca;
  background: #fee2e2;
  color: #991b1b;
  font-weight: 700;
}

.user-menu summary::-webkit-details-marker {
  display: none;
}

.user-menu-panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
  display: grid;
  min-width: 180px;
  padding: 6px;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
}

.user-menu-panel a,
.user-menu-panel button {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--ink);
  cursor: pointer;
  display: block;
  padding: 10px 12px;
  text-align: left;
  text-decoration: none;
  width: 100%;
}

.user-menu-panel a:hover,
.user-menu-panel button:hover {
  background: var(--bg);
}

.user-menu-impersonating .user-menu-panel button {
  color: #991b1b;
  font-weight: 700;
}

.panel,
.metric-grid article,
.login-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.panel {
  padding: 18px;
}

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

.panel-heading h2 {
  margin: 0;
}

.edit-sticky-heading {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  margin: -18px -18px 18px;
  padding: 14px 18px;
  position: sticky;
  top: 0;
  z-index: 35;
}

.edit-sticky-heading .toolbar {
  flex-wrap: wrap;
}

.panel-actions,
.inline-filter {
  align-items: center;
  display: flex;
  gap: 10px;
}

.inline-filter label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.inline-filter select {
  min-width: 120px;
  width: auto;
}

.play-filter-form {
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(260px, 1fr) minmax(150px, auto) auto;
  margin: 0 0 14px;
  padding: 12px;
}

.play-filter-form .drill-overview-wide {
  grid-column: auto;
}

.play-filter-form label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.play-filter-mode {
  display: grid;
  gap: 6px;
}

.play-filter-mode select {
  min-height: 34px;
  min-width: 150px;
  padding-bottom: 4px;
  padding-top: 4px;
}

.panel h2 {
  margin: 0 0 14px;
  font-size: 19px;
}

.stacked-page {
  display: grid;
  gap: 18px;
}

.narrow-panel {
  max-width: 620px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
  gap: 18px;
  align-items: start;
}

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

.metric-grid article {
  padding: 18px;
}

.metric-grid strong {
  display: block;
  font-size: 34px;
}

.metric-grid span {
  color: var(--muted);
}

.item {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}

.item:first-of-type {
  border-top: 0;
}

.item p {
  line-height: 1.55;
}

.item-title-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
}

.status-pill {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 9px;
}

.status-under_arbete {
  background: #fef3c7;
  color: #92400e;
}

.status-under_granskning {
  background: #dbeafe;
  color: #1e40af;
}

.status-aktiv {
  background: #dcfce7;
  color: #166534;
}

.status-inaktiverad {
  background: #e5e7eb;
  color: #374151;
}

.status-utkast {
  background: #fef3c7;
  color: #92400e;
}

.status-klar {
  background: #dcfce7;
  color: #166534;
}

.status-olast {
  background: #fee2e2;
  color: #991b1b;
}

.tag-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-chip-list span {
  align-items: center;
  background: #f8fbfd;
  border: 1px solid #b7c9d4;
  border-radius: 999px;
  color: #0f172a;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
  min-height: 30px;
  padding: 5px 10px;
}

.tag-token-picker {
  position: relative;
}

.tag-token-field {
  background: white;
  border: 1px solid #b7c9d4;
  border-radius: 4px;
  min-height: 34px;
  padding: 4px;
}

.tag-token-field:focus-within {
  border-color: #2f80ed;
  box-shadow: 0 0 0 2px rgba(47, 128, 237, 0.16);
}

.tag-token-list {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tag-token {
  align-items: center;
  background: #f8fbfd;
  border: 1px solid #b7c9d4;
  border-radius: 3px;
  display: inline-flex;
  font-size: 13px;
  gap: 5px;
  min-height: 24px;
  padding: 2px 7px;
}

.tag-token button {
  background: transparent !important;
  border: 0;
  color: #006f8f;
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  min-height: 0;
  padding: 0;
}

.tag-token-list input {
  border: 0;
  flex: 1 1 140px;
  min-height: 24px;
  outline: 0;
  padding: 2px 4px;
}

.tag-suggestions {
  background: #f5fbfd;
  border: 1px solid #b7c9d4;
  border-top: 0;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
  left: 0;
  max-height: 230px;
  overflow: auto;
  position: absolute;
  right: 0;
  top: calc(100% - 1px);
  z-index: 25;
}

.tag-suggestions button {
  background: transparent !important;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  display: block;
  font-weight: 400;
  justify-content: flex-start;
  padding: 9px 12px;
  text-align: left;
  width: 100%;
}

.tag-suggestions button:hover,
.tag-suggestions button.active {
  background: #c8e8ef !important;
}

.match-table td {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.25;
}

.data-table th[data-sortable-column] {
  cursor: pointer;
  user-select: none;
}

.data-table th[data-sortable-column]::after {
  color: #94a3b8;
  content: " ↕";
  font-size: 11px;
}

.data-table th[data-sortable-column][aria-sort="ascending"]::after {
  content: " ↑";
}

.data-table th[data-sortable-column][aria-sort="descending"]::after {
  content: " ↓";
}

.table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
}

.data-table {
  border-collapse: collapse;
  min-width: 720px;
  width: 100%;
}

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

.data-table th {
  background: #eef2f6;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover {
  background: #f8fafc;
}

.compact-table th,
.compact-table td {
  padding: 6px 10px;
}

.tabs {
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 2px;
  margin-bottom: 12px;
}

.tabs a {
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  color: var(--ink);
  padding: 9px 12px;
  text-decoration: none;
}

.tabs a.active {
  background: white;
  border-top: 3px solid var(--accent);
  color: var(--accent-dark);
  font-weight: 800;
}

.color-swatch {
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-block;
  height: 18px;
  margin-right: 8px;
  vertical-align: middle;
  width: 18px;
}

.training-drill-card-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.training-group-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.training-group-summary > .group-chip {
  align-items: center;
  background: #f1f5f9;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  gap: 6px;
  padding: 4px 8px;
}

.training-group-summary .group-chip {
  position: relative;
}

.group-tooltip {
  background: #111827;
  border-radius: 6px;
  bottom: calc(100% + 8px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.22);
  color: white;
  display: none;
  font-size: 12px;
  left: 0;
  line-height: 1.45;
  min-width: 150px;
  padding: 8px 10px;
  position: absolute;
  white-space: nowrap;
  z-index: 30;
}

.group-tooltip::after {
  border-color: #111827 transparent transparent transparent;
  border-style: solid;
  border-width: 6px 6px 0 6px;
  content: "";
  left: 16px;
  position: absolute;
  top: 100%;
}

.group-chip:hover .group-tooltip,
.group-chip:focus-within .group-tooltip {
  display: block;
}

.training-group-summary i {
  border: 1px solid rgba(15, 23, 42, 0.2);
  border-radius: 999px;
  display: inline-block;
  height: 10px;
  width: 10px;
}

.groups-dialog {
  width: min(920px, calc(100vw - 32px));
}

.groups-dialog-title {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.groups-dialog-title h2,
.groups-dialog-title p {
  margin: 0;
}

.groups-dialog-title p {
  color: var(--muted);
  margin-top: 2px;
}

.groups-dialog-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
}

.segmented-control {
  align-items: center;
  display: flex;
  gap: 6px;
}

.segmented-control label {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  gap: 6px;
  padding: 6px 9px;
}

.group-count-control,
.group-color-control,
.group-player-heading {
  align-items: center;
  display: flex;
  gap: 8px;
}

.group-count-control select {
  min-width: 64px;
  width: 64px;
}

.group-color-control select {
  min-width: 145px;
  width: 145px;
}

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

.training-groups-grid[hidden] {
  display: none;
}

.training-group-box {
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 8px;
  padding: 12px;
}

.training-group-box[hidden] {
  display: none;
}

.training-group-box h3 {
  font-size: 15px;
  margin: 0;
}

.group-player-heading {
  justify-content: space-between;
}

.group-player-heading span {
  font-weight: 700;
}

.icon-text-button {
  align-items: center;
  background: #e5e7eb;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  display: inline-flex;
  font-size: 18px;
  height: 28px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 28px;
}

.group-add-player-panel {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.group-add-player-panel[hidden] {
  display: none;
}

.group-add-player-list {
  display: grid;
  gap: 6px;
  max-height: 180px;
  overflow: auto;
}

.player-assignment-view {
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
}

.player-assignment-view[hidden] {
  display: none;
}

.player-assignment-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 180px;
  padding: 8px 10px;
}

.player-assignment-row:last-child {
  border-bottom: 0;
}

.random-player-picker {
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.random-player-picker[hidden] {
  display: none;
}

.random-player-picker h3 {
  font-size: 15px;
  margin: 0;
}

.random-player-list {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: 220px;
  overflow: auto;
}

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

.list-header h2 {
  margin: 0;
}

.bulk-action-form select {
  min-width: 240px;
  width: auto;
}

.select-column {
  text-align: center;
  width: 34px;
}

.select-column input {
  height: 16px;
  margin: 0;
  width: 16px;
}

.hidden-form {
  display: none;
}

.button-link {
  align-items: center;
  background: white;
  border: 1px solid #b7c9d4;
  border-radius: 4px;
  color: #006f8f;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  justify-content: center;
  min-height: 30px;
  padding: 5px 14px;
  text-decoration: none;
}

.button-link:hover {
  background: #f8fbfd;
}

.button-reset {
  cursor: pointer;
  font: inherit;
}

.button-link.secondary {
  background: white;
  border: 1px solid #b7c9d4;
  color: #006f8f;
}

.table-action-cell {
  text-align: right;
}

.training-plan-link {
  min-width: 88px;
  padding: 6px 10px;
  text-align: center;
}

.training-plan-link.unplanned {
  background: #e5e7eb;
  color: #374151;
}

.training-plan-link.unplanned:hover {
  background: #d1d5db;
}

.training-plan-link.planned {
  background: #22c55e;
  color: white;
}

.training-plan-link.planned:hover {
  background: #16a34a;
}

.training-status-link {
  font-weight: 800;
  text-decoration: underline;
}

.training-status-link.status-ej_planerad {
  color: #374151;
}

.training-status-link.status-planerad {
  color: #16a34a;
}

.training-status-link.status-utkast {
  color: #b45309;
}

.training-status-link.status-installd {
  color: #991b1b;
}

.table-link-button {
  background: transparent;
  border: 0;
  color: var(--accent-dark);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 0;
  text-decoration: underline;
}

.app-dialog {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.24);
  max-width: min(560px, calc(100vw - 32px));
  padding: 20px;
  width: 520px;
}

.app-dialog::backdrop {
  background: rgba(15, 23, 42, 0.38);
}

.app-dialog h2 {
  margin-top: 0;
}

.dialog-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.dialog-delete-form {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 14px;
  text-align: right;
}

.danger-button {
  background: #dc2626;
  border-color: #dc2626;
  color: white;
}

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

.training-plan-page {
  max-width: 980px;
}

.training-plan-titlebar {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.training-plan-titlebar h2 {
  margin: 0;
}

.print-menu,
.action-menu {
  position: relative;
}

.print-menu summary,
.action-menu summary {
  background: white;
  border: 1px solid #b7c9d4;
  border-radius: 4px;
  color: #006f8f;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  list-style: none;
  min-height: 30px;
  padding: 5px 14px;
}

.print-menu summary::-webkit-details-marker,
.action-menu summary::-webkit-details-marker {
  display: none;
}

.print-menu-panel,
.action-menu-panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14);
  display: grid;
  gap: 6px;
  min-width: 130px;
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
}

.print-menu-panel button {
  background: #f1f5f9;
  color: var(--ink);
  text-align: left;
}

.action-menu-panel a,
.action-menu-panel button {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  padding: 9px 10px;
  text-decoration: none;
  text-align: left;
  width: 100%;
}

.action-menu-panel a:hover,
.action-menu-panel button:hover {
  background: #f1f5f9;
}

.action-menu-panel form {
  margin: 0;
}

.split-save-menu {
  align-items: stretch;
  display: inline-flex;
  position: relative;
}

.split-save-primary {
  align-items: center;
  background: white !important;
  border: 1px solid #b7c9d4;
  border-radius: 4px 0 0 4px;
  color: #006f8f;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  height: 30px;
  line-height: 1;
  padding: 5px 14px;
}

.split-save-primary:hover {
  background: #f8fbfd !important;
  color: #006f8f;
}

.split-save-dropdown {
  position: relative;
}

.split-save-dropdown summary {
  align-items: center;
  background: white !important;
  border: 1px solid #b7c9d4;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  display: inline-flex;
  height: 30px;
  justify-content: center;
  list-style: none;
  width: 32px;
}

.split-save-back {
  align-items: center;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  height: 30px;
  line-height: 1;
  padding: 5px 14px;
}

.split-save-dropdown summary:hover {
  background: #f8fbfd !important;
}

.split-save-dropdown summary::-webkit-details-marker {
  display: none;
}

.split-save-dropdown summary::before {
  border-right: 2px solid #007c89;
  border-bottom: 2px solid #007c89;
  content: "";
  display: block;
  height: 7px;
  margin-top: -3px;
  transform: rotate(45deg);
  width: 7px;
}

.split-save-dropdown[open] summary::before {
  margin-top: 3px;
  transform: rotate(225deg);
}

.split-save-panel {
  background: white !important;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.18);
  min-width: 260px;
  padding: 6px 0;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
}

.split-save-panel form {
  margin: 0;
}

.split-save-panel button {
  background: transparent !important;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  padding: 8px 18px;
  justify-content: flex-start;
  text-align: left;
  white-space: nowrap;
  width: 100%;
}

.split-save-panel button:hover {
  background: #c8e8ef !important;
  color: var(--ink);
}

.print-preview-dialog {
  width: min(920px, calc(100vw - 32px));
}

.print-preview {
  background: white;
  color: var(--ink);
  display: grid;
  gap: 18px;
  max-height: 70vh;
  overflow: auto;
  padding: 8px;
}

.print-preview-header {
  display: grid;
  gap: 12px;
}

.print-preview-header h2,
.print-preview-header p {
  margin: 0;
}

.print-preview-header dl {
  display: grid;
  gap: 8px 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
}

.print-preview-header dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.print-preview-header dd {
  margin: 0;
}

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

.print-drill {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  padding-top: 12px;
}

.print-drill h3,
.print-drill p {
  margin: 0;
}

.print-drill-text {
  display: grid;
  gap: 4px;
}

.print-groups {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.print-group {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
}

.print-group h4 {
  align-items: center;
  display: flex;
  gap: 8px;
  margin: 0 0 8px;
}

.print-group i {
  border: 1px solid rgba(15, 23, 42, 0.2);
  border-radius: 999px;
  display: inline-block;
  height: 12px;
  width: 12px;
}

.print-group ul {
  margin: 0;
  padding-left: 18px;
}

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

.print-frame-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  margin: 0;
  padding: 8px;
}

.print-frame-card .saved-frame {
  margin-top: 0;
}

.print-frame-card figcaption {
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
}

.print-canvas-image {
  display: block;
  height: auto;
  max-width: 100%;
}

.training-pass-card,
.training-drill-card,
.empty-training-drills {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.training-pass-card {
  padding: 18px 20px;
}

.training-pass-grid {
  display: grid;
  gap: 14px 18px;
  grid-template-columns: minmax(190px, 0.75fr) minmax(320px, 1.25fr);
}

.training-pass-field {
  display: grid;
  gap: 6px;
}

.training-description-field {
  min-width: 0;
}

.training-description-field textarea {
  min-height: 82px;
  resize: vertical;
}

.training-pass-field input[readonly] {
  background: #f1f5f9;
  color: var(--ink);
}

.training-plan-meta {
  display: grid;
  gap: 8px 18px;
  grid-template-columns: 1fr 1fr;
  margin: 0;
}

.training-plan-meta.compact {
  align-content: start;
  grid-template-columns: 1fr 1fr;
}

.training-plan-meta div {
  display: grid;
  gap: 2px;
}

.training-plan-meta dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.training-status-field label,
.training-description-field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.training-plan-meta dd {
  margin: 0;
}

.training-plan-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin: 14px 0 18px;
}

.training-plan-actions .button-link,
.training-plan-actions button {
  min-width: 138px;
  text-align: center;
}

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

.training-drill-card {
  align-items: center;
  cursor: grab;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 14px;
}

.training-drill-card.dragging {
  opacity: 0.55;
}

.training-drill-card.drag-over {
  outline: 2px solid var(--accent);
}

.training-drill-card:active {
  cursor: grabbing;
}

.training-drill-card-main {
  display: grid;
  gap: 6px;
}

.training-drill-card h3 {
  font-size: 16px;
  margin: 0;
}

.empty-training-drills {
  color: var(--muted);
  padding: 18px;
}

.choice-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  margin: 12px 0 18px;
}

.choice-actions .button-link,
.choice-actions button {
  text-align: center;
}

.compact-dialog {
  width: 420px;
}

.drill-bank-dialog {
  width: min(760px, calc(100vw - 32px));
}

.dual-list {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto minmax(240px, 1fr);
  gap: 14px;
  align-items: center;
}

.dual-list label {
  display: block;
  font-weight: 800;
  margin-bottom: 8px;
}

.dual-list select {
  min-height: 320px;
}

.dual-list-actions {
  display: grid;
  gap: 8px;
}

.profile-list {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
}

.profile-list div {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 4px;
  padding-bottom: 10px;
}

.profile-list dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.profile-list dd {
  margin: 0;
}

.item-list,
.user-list {
  display: grid;
}

.user-row {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 14px 0;
}

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

.user-row strong,
.user-row small {
  display: block;
}

.user-row small {
  color: var(--muted);
}

.muted {
  opacity: 0.58;
}

.stack {
  display: grid;
  gap: 10px;
}

.stack label {
  color: #374151;
  font-size: 13px;
  font-weight: 700;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(160px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.compact-inline {
  grid-template-columns: minmax(180px, 260px) auto;
  justify-content: start;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 20px 0;
}

.court-canvas,
.saved-frame canvas {
  width: 100%;
  border: 1px solid #c4a484;
  border-radius: 6px;
  background: #d7b37a;
  aspect-ratio: 76 / 42;
  touch-action: none;
}

.drill-create-panel {
  max-width: 1120px;
}

.drill-form {
  gap: 12px;
}

.drill-overview {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.drill-overview h3 {
  font-size: 16px;
  margin: 0 0 12px;
}

.youtube-embed {
  aspect-ratio: 16 / 9;
  background: #0f172a;
  border: 1px solid var(--line);
  border-radius: 8px;
  max-width: 720px;
  overflow: hidden;
  width: 100%;
}

.youtube-embed iframe {
  border: 0;
  display: block;
  height: 100%;
  width: 100%;
}

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

.drill-overview-grid > div {
  display: grid;
  gap: 7px;
}

.drill-overview-wide {
  grid-column: 1 / -1;
}

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

.drill-frame-editor {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 10px 0 0;
  padding: 14px;
}

.drill-frame-editor.dragging {
  opacity: 0.55;
}

.drill-frame-editor.drag-over {
  outline: 2px solid var(--accent);
}

.drill-frame-editor-header {
  align-items: center;
  cursor: grab;
  display: flex;
  font-size: 13px;
  font-weight: 700;
  justify-content: space-between;
  margin-bottom: 10px;
  touch-action: none;
  user-select: none;
}

.drill-frame-editor-header:active {
  cursor: grabbing;
}

.drag-handle {
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
}

.drill-frame-row {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(220px, 300px) minmax(260px, 1fr);
}

.drill-frame-description {
  display: grid;
  gap: 8px;
}

.drill-board {
  align-items: start;
  background: #63314d;
  border: 1px solid #63314d;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
  padding: 10px;
}

.drill-canvas-crop {
  max-height: 520px;
  overflow: hidden;
}

.drill-canvas-crop.is-half-court {
  aspect-ratio: 15 / 14;
}

.drill-canvas {
  aspect-ratio: 15 / 28;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  display: block;
  height: auto;
  max-height: 520px;
  object-fit: contain;
  width: 100%;
}

.form-toolbar {
  gap: 10px;
  justify-content: space-between;
}

.secondary-button {
  background: white;
  border: 1px solid #b7c9d4;
  color: #006f8f;
}

.saved-frame-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 12px;
}

.play-frame-list {
  grid-template-columns: 1fr;
}

.drill-frame-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.drill-frame-grid .saved-frame-card {
  grid-template-columns: 1fr;
}

.drill-frame-grid .saved-frame {
  justify-self: start;
  max-width: 260px;
  width: 100%;
}

.drill-frame-grid .saved-frame-card figcaption {
  margin-top: 0;
}

.playbook-cover-preview {
  margin: 12px 0 18px;
}

.playbook-cover-preview img {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: block;
  max-height: 260px;
  max-width: 100%;
  object-fit: contain;
}

.playbook-menu-table select,
.playbook-menu-table input {
  min-width: 90px;
}

.playbook-menu-table tr[draggable="true"] {
  cursor: move;
}

.playbook-menu-table tr.dragging {
  opacity: 0.55;
}

.playbook-menu-table tr.drag-over td {
  border-top: 2px solid var(--accent);
}

.playbook-structure-heading {
  align-items: center;
  display: flex;
  gap: 10px;
  position: relative;
}

.playbook-structure-heading h3 {
  margin-right: auto;
}

.playbook-structure-actions {
  display: flex;
  gap: 6px;
}

.playbook-add-menu {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
  display: grid;
  gap: 4px;
  padding: 6px;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
}

.playbook-add-menu[hidden] {
  display: none;
}

.playbook-add-menu button {
  background: white;
  color: var(--ink);
  text-align: left;
}

.playbook-text-editor {
  display: grid;
  gap: 8px;
}

.rich-text-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rich-text-toolbar button,
.rich-text-toolbar select {
  min-height: 30px;
}

.rich-text-toolbar .rich-image-button {
  align-items: center;
  display: inline-flex;
  min-height: 30px;
}

.rich-text-area {
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 120px;
  padding: 10px;
}

.rich-text-area:focus {
  border-color: var(--accent);
  outline: 2px solid rgba(0, 112, 144, 0.18);
}

.knowledge-rich-editor {
  border: 1px solid #aeb8c2;
  display: grid;
  gap: 0;
}

.knowledge-editor-label {
  align-items: center;
  display: flex;
  gap: 5px;
  margin-bottom: -6px;
}

.knowledge-editor-label span {
  font-size: 14px;
}

.knowledge-editor-label button {
  background: transparent;
  border: 0;
  color: #33424d;
  font-size: 13px;
  min-height: 22px;
  padding: 0 2px;
}

.knowledge-rich-toolbar {
  background: #f1f3f5;
  border-bottom: 1px solid #b8c1ca;
  gap: 0;
  padding: 0;
}

.rich-toolbar-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 42px;
  overflow: visible;
  padding: 4px 12px;
  width: 100%;
}

.rich-toolbar-row + .rich-toolbar-row {
  background: #f7f8f9;
  border-top: 1px solid #d7dde3;
}

.knowledge-rich-toolbar button,
.knowledge-rich-toolbar select,
.knowledge-rich-toolbar .rich-image-button {
  background: transparent;
  border: 0;
  border-radius: 2px;
  color: #33424d;
  font-size: 14px;
  font-weight: 700;
  height: 30px;
  justify-content: center;
  min-height: 30px;
  padding: 0 6px;
}

.knowledge-rich-toolbar button:hover,
.knowledge-rich-toolbar select:hover,
.knowledge-rich-toolbar .rich-image-button:hover {
  background: #dfe4e8;
}

.knowledge-rich-toolbar select {
  flex: 0 0 auto;
  font-weight: 500;
  min-width: 0;
  width: auto;
}

.knowledge-rich-toolbar [data-rich-font-family] {
  width: 92px;
}

.knowledge-rich-toolbar [data-rich-font-size] {
  width: 58px;
}

.knowledge-rich-toolbar [data-rich-format] {
  width: 82px;
}

.knowledge-rich-toolbar [data-rich-command="italic"] {
  background: #dfe4e8;
}

.knowledge-rich-area {
  border: 0;
  border-radius: 0;
  line-height: 1.55;
  min-height: 440px;
  overflow: auto;
}

.knowledge-rich-area:focus {
  border-color: transparent;
  outline: 0;
}

.rich-source-mode {
  font-family: Menlo, Consolas, monospace;
  white-space: pre-wrap;
}

.knowledge-rich-area h2,
.knowledge-rich-area h3,
.knowledge-rich-area h4 {
  margin: 14px 0 8px;
}

.knowledge-rich-area p {
  margin: 0 0 10px;
}

.knowledge-rich-area figure {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 12px 0;
  overflow: hidden;
}

.knowledge-rich-area img {
  display: block;
  height: auto;
  max-width: 100%;
}

.knowledge-rich-area figcaption {
  background: #f8fafc;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  padding: 7px 9px;
}

.playbook-text-section {
  margin: 14px 0;
}

.playbook-text-section h4 {
  margin: 0 0 8px;
}

.playbook-text-section ul,
.playbook-text-section ol {
  padding-left: 24px;
}

.playbook-add-menu button:hover {
  background: #f1f5f9;
}

.playbook-toc {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 16px 0;
  padding: 18px 22px;
}

.playbook-toc h3 {
  color: #31558a;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  margin: 0 0 8px;
}

.playbook-toc-row {
  align-items: baseline;
  display: grid;
  gap: 6px;
  grid-template-columns: auto 1fr auto;
  margin-top: 9px;
  padding-left: calc(var(--toc-depth, 0) * 18px);
}

.playbook-toc-row i {
  border-bottom: 2px dotted #222;
  transform: translateY(-3px);
}

.playbook-toc-row.level-1 {
  font-weight: 700;
}

.playbook-toc-row.level-2 {
  font-weight: 600;
}

.playbook-toc-play a {
  color: var(--ink);
  text-decoration: none;
}

.playbook-toc-row a {
  color: var(--ink);
  text-decoration: none;
}

.toc-page-number {
  min-width: 18px;
  text-align: right;
}

.playbook-export-shell {
  background: #eef2f6;
}

.playbook-export-actions {
  margin-bottom: 16px;
}

.playbook-export-document {
  background: white;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  margin: 0 auto;
  max-width: 820px;
  padding: 44px 52px;
}

.playbook-export-page {
  break-after: page;
  page-break-after: always;
}

.playbook-export-cover {
  align-content: center;
  display: grid;
  gap: 26px;
  min-height: 980px;
  text-align: center;
}

.playbook-export-cover img {
  display: block;
  margin: 0 auto;
  max-height: 420px;
  max-width: 100%;
  object-fit: contain;
}

.playbook-export-cover h1 {
  font-size: 40px;
  margin: 0 0 10px;
}

.playbook-export-cover p {
  font-size: 24px;
  margin: 0 0 8px;
}

.playbook-full {
  display: grid;
  gap: 22px;
  margin-top: 22px;
}

.playbook-menu-section {
  display: grid;
  gap: 14px;
}

.playbook-menu-section h2,
.playbook-menu-section h3,
.playbook-menu-section h4,
.playbook-menu-section h5,
.playbook-menu-section h6 {
  color: #17202a;
  margin: 0;
}

.playbook-menu-section.level-1 {
  border-top: 2px solid var(--line);
  padding-top: 18px;
}

.playbook-menu-section.level-2,
.playbook-menu-section.level-3,
.playbook-menu-section.level-4,
.playbook-menu-section.level-5,
.playbook-menu-section.level-6 {
  padding-left: 18px;
}

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

.playbook-play-section h4 {
  margin: 0;
}

.playbook-play-section p {
  margin: 0;
}

.playbook-play-frames {
  display: grid;
  gap: 12px;
}

@media print {
  @page {
    margin: 14mm 14mm 17mm;
    @bottom-center {
      content: counter(page);
    }
  }

  body {
    background: white;
  }

  .sidebar,
  .topbar,
  .playbook-export-actions {
    display: none !important;
  }

  .app-shell,
  main {
    display: block;
    margin: 0;
    padding: 0;
  }

  .playbook-export-shell {
    background: white;
    border: 0;
    padding: 0;
  }

  .playbook-export-document {
    box-shadow: none;
    max-width: none;
    padding: 0;
  }

  .playbook-toc,
  .playbook-play-section,
  .saved-frame-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .playbook-menu-section.level-1 {
    break-before: page;
    page-break-before: always;
  }
}

.saved-frame-card {
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(180px, 260px) minmax(220px, 1fr);
  margin: 0;
  padding: 10px;
}

.saved-frame-card figcaption {
  color: #374151;
  font-size: 14px;
  line-height: 1.45;
  margin-top: 8px;
}

.saved-frame {
  background: #63314d;
  border: 1px solid #63314d;
  border-radius: 8px;
  display: grid;
  margin-top: 10px;
  overflow: hidden;
  padding: 10px;
}

.saved-frame canvas {
  aspect-ratio: auto;
  background: transparent;
  border: 0;
  border-radius: 0;
  display: block;
  height: auto;
  max-height: 420px;
  object-fit: contain;
  width: 100%;
}

.toolbar {
  display: flex;
  justify-content: flex-end;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #18202b, #243447);
}

.login-card {
  width: min(440px, 100%);
  display: grid;
  gap: 12px;
  padding: 28px;
}

.login-card h1,
.login-card p {
  margin: 0;
}

.login-link {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  justify-self: start;
  text-decoration: none;
}

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

.alert {
  border-radius: 6px;
  padding: 10px 12px;
}

.alert-success {
  background: #dcfce7;
  color: #166534;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
}

.info-inline-button {
  align-items: center;
  background: #eef6ff;
  border: 1px solid #b7c9d4;
  border-radius: 50%;
  color: #006f8f;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  height: 20px;
  justify-content: center;
  margin-left: 6px;
  padding: 0;
  width: 20px;
}

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

.checkin-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.checkin-item summary {
  cursor: pointer;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  list-style: none;
  padding: 10px 12px;
}

.checkin-item summary::-webkit-details-marker {
  display: none;
}

.checkin-note {
  border-top: 1px solid var(--line);
  padding: 12px;
}

.support-standalone {
  background:
    radial-gradient(circle at 18% 12%, rgba(15, 118, 110, 0.12), transparent 28%),
    linear-gradient(135deg, #f8fbfd 0%, #eef5f4 100%);
  min-height: 100vh;
  padding: 36px;
}

.support-hero {
  align-items: center;
  background: #10202d;
  border-radius: 18px;
  color: white;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  margin: 0 auto 22px;
  max-width: 1180px;
  overflow: hidden;
  padding: 34px;
}

.support-brand {
  align-items: center;
  color: white;
  display: inline-flex;
  gap: 10px;
  font-weight: 800;
  margin-bottom: 28px;
  text-decoration: none;
}

.support-hero h1 {
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.02;
  margin: 0 0 18px;
  max-width: 760px;
}

.support-hero p {
  color: #d8e4eb;
  font-size: 18px;
  line-height: 1.55;
  margin: 0;
  max-width: 760px;
}

.support-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.support-hero-actions a {
  background: white;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 4px;
  color: #006f8f;
  font-size: 13px;
  font-weight: 800;
  min-height: 30px;
  padding: 7px 14px;
  text-decoration: none;
}

.support-hero-panel {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  display: grid;
  gap: 10px;
  padding: 14px;
}

.support-hero-panel div {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 10px;
  color: #17202a;
  display: grid;
  gap: 4px;
  padding: 16px;
}

.support-hero-panel strong {
  font-size: 18px;
}

.support-hero-panel span {
  color: var(--muted);
}

.support-section-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  margin: 0 auto 18px;
  max-width: 1180px;
}

.support-section-single {
  grid-template-columns: 1fr;
}

.support-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
  padding: 22px;
}

.support-section-heading {
  align-items: center;
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
}

.support-section-heading span {
  background: #d9f4ee;
  border-radius: 999px;
  color: #0f766e;
  font-size: 12px;
  font-weight: 900;
  padding: 5px 8px;
}

.support-section-heading h2 {
  margin: 0;
}

.support-muted {
  color: var(--muted);
  line-height: 1.5;
}

.support-ticket-form {
  margin-top: 14px;
}

.support-ticket-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.support-ticket-list article,
.support-ticket-row {
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 8px;
  padding: 12px;
}

.support-ticket-row {
  color: inherit;
  text-decoration: none;
}

.support-ticket-row:hover {
  background: #f8fbfd;
}

.support-ticket-list article div,
.support-ticket-row div {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.support-ticket-list span,
.support-ticket-list small,
.support-ticket-row span,
.support-ticket-row small {
  color: var(--muted);
  font-size: 13px;
}

.support-ticket-list p,
.support-ticket-row p {
  margin: 0;
}

.support-ticket-detail-shell {
  display: grid;
  gap: 18px;
  margin: 0 auto;
  max-width: 980px;
}

.support-ticket-detail-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.support-ticket-detail-header .support-brand {
  color: #17202a;
  margin-bottom: 0;
}

.support-ticket-title {
  align-items: start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.support-ticket-title h1 {
  font-size: 30px;
  line-height: 1.15;
  margin: 6px 0 0;
}

.support-ticket-title small {
  color: var(--muted);
  font-weight: 800;
}

.support-ticket-meta {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 18px 0;
}

.support-ticket-meta div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.support-ticket-meta dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.support-ticket-meta dd {
  margin: 4px 0 0;
}

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

.support-comment-list article {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}

.support-comment-list article div {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.support-comment-list small {
  color: var(--muted);
}

.support-comment-list p {
  line-height: 1.5;
  margin: 8px 0 0;
}

.support-knowledge-section {
  margin: 0 auto;
  max-width: 1180px;
}

.support-articles {
  display: grid;
  gap: 10px;
}

.support-article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.support-article summary {
  cursor: pointer;
  font-weight: 800;
  padding: 12px 14px;
}

.support-article ul {
  border-top: 1px solid var(--line);
  color: #334155;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px 18px 14px 32px;
}

.support-article-body {
  border-top: 1px solid var(--line);
  color: #334155;
  line-height: 1.55;
  padding: 12px 14px 14px;
}

.support-article-body h2,
.support-article-body h3,
.support-article-body h4 {
  color: #17202a;
  margin: 18px 0 8px;
}

.support-article-body h2 {
  font-size: 24px;
}

.support-article-body h3 {
  font-size: 20px;
}

.support-article-body h4 {
  font-size: 18px;
}

.support-article-body h4:first-child {
  margin-top: 0;
}

.support-article-body p {
  margin: 0 0 12px;
}

.support-article-body ul {
  border-top: 0;
  margin: 8px 0 0;
}

.support-article-body figure,
.support-article-image {
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 12px 0 20px;
  overflow: hidden;
}

.support-article-body img,
.support-article-image img {
  display: block;
  height: auto;
  width: 100%;
}

.support-article-body figcaption,
.support-article-image figcaption {
  background: #f8fafc;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 10px;
}

.support-admin-toolbar {
  margin-top: 14px;
}

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

.release-note-item {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.release-note-item summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  list-style: none;
  padding: 14px 16px;
}

.release-note-item summary::-webkit-details-marker {
  display: none;
}

.release-note-item summary span {
  font-size: 16px;
  font-weight: 900;
}

.release-note-item summary small {
  color: var(--muted);
  font-weight: 700;
}

.release-ticket-list {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  padding: 12px;
}

.release-ticket-list article {
  background: #f8fbfd;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.release-ticket-list article div {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.release-ticket-list strong {
  color: #006f8f;
}

.release-ticket-list span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.release-ticket-list h3 {
  font-size: 15px;
  margin: 8px 0 0;
}

.release-ticket-list p {
  color: #334155;
  line-height: 1.5;
  margin: 8px 0 0;
}

.attendance-select-form {
  margin: 0;
}

.attendance-select {
  min-width: 118px;
  padding: 4px 8px;
}

.attendance-summary {
  display: inline-flex;
  gap: 12px;
  white-space: nowrap;
}

.attendance-coming {
  color: #15803d;
  font-weight: 700;
}

.attendance-not-coming {
  color: #b91c1c;
  font-weight: 700;
}

.attendance-missing {
  color: #6b7280;
  font-weight: 700;
}

.checkbox-fieldset {
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 8px;
  margin: 4px 0 0;
  padding: 10px 12px;
}

.checkbox-fieldset legend {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  padding: 0 4px;
}

.checkbox-grid {
  display: grid;
  gap: 6px 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  max-height: 220px;
  overflow: auto;
}

@media (max-width: 900px) {
  .support-standalone {
    padding: 18px;
  }

  .support-hero,
  .support-section-grid {
    grid-template-columns: 1fr;
  }

  .support-hero {
    padding: 24px;
  }

  .support-ticket-list article div {
    align-items: start;
    display: grid;
  }

  .sidebar {
    position: static;
    width: auto;
  }

  .main {
    margin-left: 0;
    padding: 18px;
  }

  .split,
  .metric-grid {
    grid-template-columns: 1fr;
  }

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

  .drill-overview-grid,
  .drill-frame-row,
  .saved-frame-card {
    grid-template-columns: 1fr;
  }

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

  .topbar,
  .inline-form {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .topbar {
    display: grid;
  }

  .topbar-actions {
    align-items: stretch;
    display: grid;
  }

  .user-menu-panel {
    left: 0;
    right: auto;
  }

  .user-row {
    align-items: stretch;
    display: grid;
  }

  .club-switcher,
  .team-switcher {
    align-items: stretch;
    display: grid;
  }

  .club-switcher select,
  .team-switcher select {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .drill-frame-grid {
    grid-template-columns: 1fr;
  }
}
