:root {
  --accent: #5b4dff;
  --accent-deep: #3d32c9;
  --accent-bright: #7c6bff;
  --accent-soft: #ece9ff;
  --green: #2fbf8b;
  --green-soft: #e3f8f0;
  --ink: #0b0a1a;
  --muted: #6b6790;
  --line: #e4e1f4;
  --canvas: #f4f2ff;
  --paper: #fff;
  --sidebar: #0b0a1a;
  --sidebar-2: #14122c;
  --sidebar-text: #f5f4ff;
  --sidebar-dim: #9a96c7;
  --gold: #c8c2ff;
  --shadow: 0 12px 40px rgba(11, 10, 26, 0.08);
  --radius: 16px;
  --font: "Manrope", system-ui, sans-serif;
  --display: "Unbounded", "Manrope", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }

.app {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}

.sidebar {
  background:
    radial-gradient(1200px 400px at -20% -10%, rgba(91, 77, 255, 0.45), transparent 50%),
    linear-gradient(180deg, var(--sidebar-2), var(--sidebar));
  color: var(--sidebar-text);
  padding: 12px 10px 10px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.sidebar__nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

.sidebar__nav::-webkit-scrollbar { width: 8px; }
.sidebar__nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.28);
  border-radius: 8px;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 2px 8px 10px;
}

.brand__mark {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--accent-bright), var(--accent-deep));
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}

.brand__name {
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand__sub {
  color: var(--sidebar-dim);
  font-size: 12px;
  margin-top: 1px;
}

.nav-group {
  margin-top: 2px;
}

.nav-group__head {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 4px 1px 10px;
}

.nav-group__title {
  color: var(--sidebar-dim);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-group__toggle {
  width: 20px;
  height: 20px;
  border: 0;
  padding: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--sidebar-dim);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.nav-group__toggle:hover {
  color: var(--sidebar-text);
  background: rgba(255,255,255,.06);
}

.nav-group__toggle svg {
  width: 14px;
  height: 14px;
  transition: transform .15s ease;
}

.nav-group.is-collapsed .nav-group__items { display: none; }
.nav-group.is-collapsed .nav-group__toggle svg { transform: rotate(-90deg); }

.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 10px;
  color: var(--sidebar-dim);
  font-size: 13px;
  transition: background .15s ease, color .15s ease;
}

.nav-link svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.nav-link:hover {
  background: rgba(255,255,255,.05);
  color: var(--sidebar-text);
}

.nav-link.is-active {
  background: rgba(91, 77, 255, 0.35);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--accent-bright);
}

.sidebar__foot {
  margin-top: auto;
  padding: 8px 8px 2px;
  color: var(--sidebar-dim);
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar__user {
  color: var(--sidebar-text);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar__out {
  align-self: flex-start;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.sidebar__out:hover { color: var(--sidebar-text); }

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(400px, 100%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  background: var(--paper);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.login-card h1 {
  margin: 4px 0 6px;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 500;
}

.login-card__submit { justify-content: center; margin-top: 4px; }

.access-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.access-group {
  margin: 0;
  padding: 8px 12px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.access-group legend {
  padding: 0 4px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.access-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  font-size: 13px;
}

.modal__dialog:has(.access-form) { width: min(760px, 100%); }

@media (max-width: 720px) {
  .access-grid { grid-template-columns: 1fr; }
}

.workspace {
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 28px 0;
}

.topbar-filters {
  display: flex;
  align-items: stretch;
  gap: 10px;
  flex: 0 1 auto;
  min-width: 0;
}

.season-switch {
  min-width: 180px;
}

.menu-btn {
  display: none;
  border: 0;
  background: var(--paper);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  cursor: pointer;
}

.club-switch {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 280px;
  flex: 0 0 auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 6px 12px 8px;
}

.club-switch__kind {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.club-switch select {
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  width: 100%;
  cursor: pointer;
}

.search {
  position: relative;
  z-index: 20;
  flex: 1;
  max-width: 420px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  align-items: center;
}

.search input {
  border: 0;
  outline: 0;
  width: 100%;
  background: transparent;
  color: var(--ink);
}

.search__list {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: 380px;
  overflow: auto;
  padding: 6px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(11, 10, 26, 0.12);
}

.search__kind {
  padding: 8px 10px 2px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.search__hit {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
}

.search__hit strong {
  font-size: 14px;
  font-weight: 650;
}

.search__hit span {
  color: var(--muted);
  font-size: 12px;
}

.search__hit:hover,
.search__hit.is-on {
  background: var(--accent-soft);
}

.search__empty {
  padding: 12px 10px;
  color: var(--muted);
  font-size: 13px;
}

.live {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
}

.live__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c4b8bb;
}

.live__dot.is-on {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(31, 107, 74, 0.16);
}

.content {
  padding: 22px 28px 40px;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 20px;
}

.page-head__title {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.page-head__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.page-back {
  margin-top: 4px;
  flex-shrink: 0;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1, .h1 {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 600;
}

.btn[hidden] { display: none !important; }

.btn-primary {
  background: linear-gradient(180deg, var(--accent-bright), var(--accent));
  color: #fff;
  box-shadow: 0 8px 18px rgba(91, 77, 255, 0.28);
}

form[data-saving="1"] .modal__foot {
  pointer-events: none;
}

.btn.is-loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.btn.is-loading::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: btn-spin 0.7s linear infinite;
}

@keyframes btn-spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.btn-ghost {
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
}

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

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.stat, .panel, .card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat {
  padding: 18px;
}

.stat__label {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat__value {
  font-family: var(--display);
  font-size: 28px;
  margin-top: 8px;
}

.stat__hint {
  color: var(--muted);
  font-size: 13px;
  margin-top: 6px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 14px;
}

.grid-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.panel { padding: 4px 0 8px; overflow: hidden; }
.panel__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px 10px;
}

.panel__title {
  font-weight: 700;
}

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

.table th {
  text-align: left;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
}

.table td {
  padding: 13px 18px;
  border-bottom: 1px solid #f0ebe8;
  vertical-align: middle;
}

.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #faf7f5; }

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

.person__name {
  font-weight: 700;
}

.person__name:hover {
  text-decoration: underline;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  flex: 0 0 34px;
  overflow: hidden;
}

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

.avatar-square { border-radius: 10px; }
.avatar-lg { width: 48px; height: 48px; flex-basis: 48px; font-size: 16px; }
.avatar-hero {
  width: 104px;
  height: 104px;
  flex: 0 0 104px;
  border-radius: 28px;
  font-size: 34px;
  box-shadow: 0 14px 30px rgba(91, 77, 255, 0.18);
}
.avatar-arena {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: 18px;
  font-size: 20px;
}

.profile {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.profile__club,
.profile__arena {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.profile__club,
.profile__arena {
  display: flex;
  gap: 22px;
  align-items: center;
}

.profile__body { flex: 1; min-width: 0; }

.profile__kicker {
  margin: 0;
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile__club h2,
.profile__arena h3 {
  margin: 6px 0 0;
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.profile__club h2 { font-size: 30px; line-height: 1.15; }
.profile__arena h3 { font-size: 22px; line-height: 1.2; }

.profile__meta {
  margin: 8px 0 0;
  color: var(--muted);
}

.profile__text {
  margin: 14px 0 0;
  max-width: 52ch;
}

.profile__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  margin: 0;
  margin-left: auto;
}

.profile__facts div { min-width: 0; }
.profile__facts dt {
  color: var(--muted);
  font-size: 12px;
}
.profile__facts dd {
  margin: 2px 0 0;
  font-weight: 650;
}
.profile__facts a { color: var(--accent-deep); }

.profile__arena {
  background:
    linear-gradient(180deg, var(--accent-soft) 0%, #fff 46%);
}

.avatar.green { background: var(--green); }
.avatar.gold { background: #3d32c9; color: #fff; }

.photo-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.photo-field > input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.file-pick {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
  height: 36px;
  padding: 3px 10px 3px 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fcfbfa;
}

.file-pick:hover { border-color: #b7b0ff; background: #fff; }

.file-pick__btn {
  flex: 0 0 auto;
  border: 0;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  padding: 5px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.file-pick__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 13px;
}

.html-editor {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.html-editor__bar,
.html-editor__link {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 6px;
  background: #fafafa;
  border-bottom: 1px solid var(--line);
}

.html-editor__link { gap: 6px; }
.html-editor__link[hidden] { display: none; }

.html-editor__heading,
.html-editor__size,
.html-editor__link input {
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}

.html-editor__heading { width: 118px; padding: 0 8px; }
.html-editor__size { width: 78px; padding: 0 6px; }
.html-editor__swatch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  margin: 0;
  padding: 0 6px 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}
.html-editor__swatch input[type="color"] {
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  appearance: none;
}
.html-editor__swatch input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.html-editor__swatch input[type="color"]::-webkit-color-swatch {
  border: 1px solid rgba(17, 16, 28, 0.16);
  border-radius: 4px;
}
.html-editor__link input { flex: 1; min-width: 0; padding: 0 10px; }
.html-editor__image-size { width: 88px; padding: 0 6px; }
.html-editor__image-size[hidden] { display: none; }

.html-editor__btn {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.html-editor__btn.is-text { width: auto; padding: 0 8px; font-weight: 650; }
.html-editor__btn.is-strike { text-decoration: line-through; }
.html-editor__btn.is-icon { display: inline-flex; align-items: center; justify-content: center; }
.html-editor__btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.html-editor__btn:hover,
.html-editor__btn.is-on { background: var(--accent-soft); color: var(--accent-deep); }

.html-editor__area,
.html-editor__source {
  min-height: 96px;
  max-height: 180px;
  overflow: auto;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.45;
  outline: none;
}

.html-editor__source {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  border: 0;
  border-radius: 0;
  resize: vertical;
  background: #fff;
  color: var(--ink);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 13px;
}
.html-editor__source[hidden] { display: none; }

.html-editor__bar :disabled { opacity: 0.4; }

.html-editor.is-tall .html-editor__area,
.html-editor.is-tall .html-editor__source {
  min-height: 160px;
  max-height: 280px;
}

.field textarea.html-editor__source,
.content-form .field textarea.html-editor__source {
  width: 100%;
  max-width: 100%;
  border: 0;
  border-radius: 0;
  background: #fff;
}

.html-editor__area.is-empty::before {
  content: "Напишите текст";
  float: left;
  height: 0;
  color: var(--muted);
  pointer-events: none;
}

.html-editor__area p,
.html-editor__area h2,
.html-editor__area h3,
.html-editor__area ul,
.html-editor__area ol,
.html-editor__area blockquote { margin: 0 0 8px; }
.html-editor__area h2 { font-size: 18px; }
.html-editor__area h3 { font-size: 16px; }
.html-editor__area blockquote {
  margin-left: 0;
  padding-left: 10px;
  border-left: 2px solid #d9d4ff;
  color: var(--muted);
}
.html-editor__area a { color: var(--accent-deep); }
.html-editor__area pre {
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f6f5f8;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 13px;
  white-space: pre-wrap;
}
.html-editor__area img,
.html-editor__area video,
.html-editor__area iframe { max-width: 100%; }
.html-editor__area iframe { width: 100%; height: 180px; border: 0; border-radius: 8px; }

.field-hint {
  font-size: 12px;
  color: var(--muted);
}

.video-list { display: flex; flex-direction: column; gap: 8px; }
.video-row { display: flex; gap: 8px; align-items: center; }
.video-row input { flex: 1; min-width: 0; width: auto; }
.video-row__remove {
  width: 36px;
  height: 36px;
  flex: none;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 10px;
  color: var(--muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.video-row__remove:hover { color: var(--ink); border-color: #b7b0ff; }
.video-add { align-self: flex-start; padding: 8px 12px; }

.media-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.gallery-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.gallery-tile {
  position: relative;
  width: 96px;
  height: 72px;
  margin: 0;
}

.gallery-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  display: block;
}

.gallery-tile.is-removed img {
  opacity: 0.35;
  filter: grayscale(1);
}

.gallery-tile.is-removed::after {
  content: "убрать";
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 10px;
}

.gallery-tile__remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: rgba(11, 10, 26, 0.72);
  color: #fff;
  line-height: 1;
  cursor: pointer;
}

.gallery-drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 148px;
  padding: 22px 16px;
  border: 1.5px dashed #c9c4ee;
  border-radius: 16px;
  background: #fbfaff;
  color: var(--muted);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.gallery-drop.is-over {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.gallery-drop__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.gallery-drop__plus {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 24px;
  line-height: 34px;
}

.gallery-drop.is-over .gallery-drop__plus {
  background: #fff;
}

.gallery-drop__title {
  color: var(--ink);
  font-weight: 650;
}

.gallery-drop__meta {
  font-size: 13px;
}

.file-sections {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.file-section {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  font-weight: 650;
}

.file-section.is-active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.file-section__count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.file-section.is-active .file-section__count { color: #c8c2ff; }

.file-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.file-tools .btn { padding: 6px 12px; font-size: 13px; }

.file-drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 88px;
  margin: 0 18px 8px;
  padding: 16px;
  border: 1.5px dashed #c9c4ee;
  border-radius: 16px;
  background: #fbfaff;
  color: var(--muted);
  text-align: center;
  cursor: pointer;
}

.file-drop.is-over,
.file-drop.is-busy {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.file-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.file-drop__title {
  color: var(--ink);
  font-weight: 650;
}

.file-drop__meta { font-size: 12px; }

.file-empty {
  margin: 0;
  padding: 18px;
  color: var(--muted);
}

.file-error { margin: 0 18px 8px; }

.file-name {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 460px;
  min-width: 0;
  font-weight: 650;
}

.file-name__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-mark {
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 8px;
  overflow: hidden;
  background: #f4f2ff;
  color: var(--muted);
}

.file-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-mark svg {
  width: 18px;
  height: 18px;
}

.file-copy {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 5px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.file-copy:hover { border-color: #b7b0ff; }

.file-table .col-actions { width: 168px; }

.brand__mark-photo {
  padding: 0;
  overflow: hidden;
}

.brand__mark-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 600;
}

button.pill {
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
}

button.pill:hover { filter: brightness(0.97); }
button.pill:disabled { cursor: default; opacity: 0.7; }

.pill-ok { background: var(--green-soft); color: var(--green); }
.pill-wait { background: var(--accent-soft); color: var(--accent-deep); }
.pill-off { background: #ece9ff; color: var(--accent); }
.pill-muted { background: #eeeaea; color: var(--muted); }

.match-card {
  padding: 20px;
}

.match-card__league {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.match-card__teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 8px;
  font-family: var(--display);
  font-size: 20px;
}

.match-card__vs {
  color: var(--accent);
  font-size: 12px;
}

.match-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 88px;
}

.match-score__line {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.match-score__time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.match-card__side {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cal-panel { padding: 16px 18px 18px; overflow: hidden; }

.cal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.cal-legend {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.cal-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 3px 8px;
}

.cal-tag-home { background: var(--green-soft); color: var(--green); }
.cal-tag-away { background: var(--accent-soft); color: var(--accent-deep); }

.cal-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cal-month {
  font-family: var(--display);
  font-size: 16px;
  min-width: 160px;
  text-align: center;
  text-transform: capitalize;
}

.cal-weekdays,
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.cal-weekdays span {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  padding-bottom: 4px;
}

.cal-day {
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  background: #fcfbfa;
  display: flex;
  flex-direction: column;
}

.cal-add {
  margin-top: auto;
  height: 32px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.cal-add:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: #fff;
}

.cal-day.is-today {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.cal-day.is-mute { opacity: 0.42; }
.cal-day.has-match { background: #fff; }

.cal-day__num {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}

.cal-match {
  display: block;
  border-radius: 10px;
  padding: 6px;
  margin-bottom: 4px;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

a.cal-match:hover { box-shadow: inset 0 0 0 1px var(--accent); }

.cal-match.is-home { background: var(--green-soft); }
.cal-match.is-away { background: var(--accent-soft); }

.cal-logos {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cal-match__vs {
  color: var(--muted);
  font-size: 11px;
}

.cal-match__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
}

.team-mark {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex: 0 0 22px;
}

.team-mark-lg {
  width: 28px;
  height: 28px;
  font-size: 11px;
  border-radius: 9px;
  flex-basis: 28px;
}

.feed {
  list-style: none;
  margin: 0;
  padding: 0 18px 10px;
  max-height: 380px;
  overflow: auto;
}

.feed li {
  padding: 10px 0;
  border-bottom: 1px solid #f0ebe8;
  font-size: 13px;
}

.feed time {
  color: var(--muted);
  margin-right: 8px;
}

.feed a {
  color: inherit;
  text-decoration: none;
}

.feed a:hover { text-decoration: underline; }
.feed__empty { color: var(--muted); }

.form {
  padding: 8px 18px 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field span {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.field input, .field textarea, .field select {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 5px;
  background: #fcfbfa;
  outline: none;
}

.field input:focus, .field textarea:focus, .field select:focus {
  border-color: #b7b0ff;
  background: #fff;
}

.field input[readonly] {
  background: var(--canvas);
  color: var(--muted);
}

.field-wide { grid-column: 1 / -1; }

.team-combo { position: relative; }

.team-combo__list {
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: 220px;
  overflow: auto;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(11, 10, 26, 0.12);
}

.team-combo__list[hidden] { display: none; }

.team-combo__list button {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  color: var(--ink);
}

.team-combo__list button small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.team-combo__list button:hover,
.team-combo__list button.is-on { background: #f3f1ff; }

.team-combo__empty {
  padding: 8px 10px;
  color: var(--muted);
  font-size: 13px;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px 4px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 18px 10px;
  align-items: end;
}

.filters .field {
  min-width: 220px;
  flex: 0 1 260px;
}

.filters .field select {
  background: #fff;
  cursor: pointer;
}

.color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}

.empty {
  padding: 40px 18px;
  text-align: center;
  color: var(--muted);
}

.row-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.icon-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 10px;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
}

.icon-btn svg {
  width: 16px;
  height: 16px;
}

.icon-btn:hover {
  color: var(--ink);
  border-color: #b7b0ff;
}

.icon-btn-danger:hover {
  color: #c0392b;
  border-color: #f0c0c0;
  background: #fff5f5;
}

.table th.col-actions,
.table td.col-actions {
  width: 92px;
  text-align: right;
}

.table th.col-actions-wide,
.table td.col-actions-wide {
  width: 128px;
}

.crumb {
  color: inherit;
  text-decoration: none;
}

.crumb:hover {
  color: var(--ink);
}

.page-sub,
.muted-line {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.page-head-compact { margin-bottom: 12px; }
.page-head-compact h1 { font-size: 22px; }
.page-head-compact .eyebrow { margin-bottom: 2px; font-size: 11px; letter-spacing: 0.08em; }
.page-head-compact .btn { padding: 8px 12px; border-radius: 10px; font-size: 13px; }
.page-head .icon-btn { width: 36px; height: 36px; }

.list-compact .filters { padding: 8px 12px 4px; gap: 8px; }
.list-compact .filters .field { min-width: 140px; flex-basis: 180px; gap: 4px; }
.list-compact .filters .field span { font-size: 11px; letter-spacing: 0.02em; }
.list-compact .filters .field select { padding: 6px 10px; border-radius: 8px; font-size: 13px; }
.list-compact .filters .field-search { flex-basis: 320px; min-width: 240px; }
.list-compact .filters .search-line { display: flex; gap: 6px; align-items: center; }
.list-compact .filters .search-line input[type="search"] {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
}
.list-compact .filters .search-line .btn { padding: 6px 12px; border-radius: 8px; font-size: 13px; white-space: nowrap; }
.list-compact .table { font-size: 13px; }
.list-compact .table th,
.list-compact .table td { padding: 5px 10px; }
.list-compact .table th { font-size: 11px; letter-spacing: 0.03em; }
.list-compact .table strong { font-size: 13px; font-weight: 600; }
.list-compact .person { gap: 8px; }
.list-compact .avatar { width: 26px; height: 26px; flex-basis: 26px; font-size: 10px; }
.list-compact .muted-line,
.list-compact .media-meta { margin-top: 0; font-size: 11px; line-height: 1.2; }
.list-compact .pill { padding: 2px 7px; font-size: 11px; }
.list-compact .icon-btn { width: 28px; height: 28px; border-radius: 8px; }
.list-compact .icon-btn svg { width: 14px; height: 14px; }
.list-compact .row-actions { gap: 4px; }
.list-compact .pager { padding: 8px 12px 10px; }

.match-calendar { overflow-x: auto; }
.match-calendar .filters { padding: 10px 14px 6px; gap: 8px; }
.match-calendar .filters .field { min-width: 150px; flex-basis: 180px; gap: 4px; }
.match-calendar .filters .field span { font-size: 11px; letter-spacing: 0.02em; }
.match-calendar .filters .field select { padding: 6px 10px; border-radius: 8px; font-size: 13px; }
.match-calendar .table { font-size: 13px; }
.match-calendar .table th,
.match-calendar .table td { padding: 6px 8px; white-space: nowrap; }
.match-calendar .table th { font-size: 11px; letter-spacing: 0.03em; }
.match-calendar .table strong { font-size: 13px; font-weight: 600; }
.match-calendar .muted-line { margin-top: 1px; font-size: 11px; line-height: 1.2; }
.match-calendar .col-when span { color: var(--muted); margin-left: 4px; }
.match-calendar .col-score { text-align: center; font-variant-numeric: tabular-nums; }
.match-calendar .pill { padding: 2px 7px; font-size: 11px; }
.match-calendar .icon-btn { width: 28px; height: 28px; border-radius: 8px; }
.match-calendar .icon-btn svg { width: 14px; height: 14px; }
.match-calendar .row-actions { gap: 4px; }
.match-calendar .table th.col-actions,
.match-calendar .table td.col-actions { width: 184px; }

.lineup-form { display: flex; flex-direction: column; gap: 14px; }
.lineup-errors,
.sheet-errors {
  padding: 10px 14px;
  border: 1px solid #f0c0c0;
  border-radius: 12px;
  background: #fff5f5;
  color: #c0392b;
  font-size: 13px;
}
.lineup-errors p,
.sheet-errors p { margin: 0; }
.lineup-errors p + p,
.sheet-errors p + p { margin-top: 4px; }
.lineup-board { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.lineup-side { display: flex; flex-direction: column; min-width: 0; }
.lineup-side__head { gap: 8px; }
.lineup-side__body { display: flex; flex-direction: column; gap: 14px; padding: 0 18px 8px; }
.lineup-block { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.lineup-block__head { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.lineup-list { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.lineup-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) 36px 36px; gap: 8px; align-items: center; width: 100%; }
.lineup-row input[data-number],
.lineup-row select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  background: #fcfbfa;
  color: var(--ink);
  outline: none;
  font: inherit;
  font-size: 13px;
}
.lineup-row input[data-number]:focus,
.lineup-row select:focus {
  border-color: #b7b0ff;
  background: #fff;
}
.lineup-row .icon-btn { width: 36px; height: 36px; border-radius: 12px; }
.lineup-side .btn { padding: 8px 12px; border-radius: 12px; font-size: 13px; }
.lineup-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.lineup-copy-hint { margin: -6px 0 0; font-size: 12px; }
.lineup-foot { display: flex; justify-content: flex-end; gap: 8px; }
.match-stat { display: flex; flex-direction: column; gap: 14px; }
.stat-sheet__body { display: flex; flex-direction: column; gap: 8px; padding: 0 18px 16px; }
.match-stat__group { margin: 8px 0 0; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.match-stat__row { display: grid; grid-template-columns: minmax(0, 1fr) 120px 120px; gap: 8px; align-items: center; }
.match-stat__row span { font-size: 13px; }
.match-stat__head strong { font-size: 13px; font-weight: 700; text-align: center; }
.overview-sheet .match-stat__row strong { text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; }
.overview-list { display: flex; flex-direction: column; gap: 6px; }
.overview-player { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; font-size: 13px; }
.overview-player__num { font-weight: 700; color: var(--muted); }
.overview-player__pos { color: var(--muted); font-size: 12px; }
.match-stat__row input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  background: #fcfbfa;
  color: var(--ink);
  outline: none;
  font: inherit;
  font-size: 13px;
  text-align: center;
}
.match-stat__row input:focus { border-color: #b7b0ff; background: #fff; }
@media (max-width: 720px) {
  .match-stat__row { grid-template-columns: minmax(0, 1fr) 88px 88px; }
}
.btn:disabled { opacity: 0.45; cursor: default; }
@media (max-width: 900px) {
  .lineup-board { grid-template-columns: 1fr; }
}
.match-calendar .pager { padding: 8px 14px 10px; }
.match-calendar .pager__current,
.match-calendar .pager__link { min-width: 28px; height: 28px; border-radius: 8px; font-size: 12px; }

.match-events { grid-column: 1 / -1; }
.match-events .team-combo,
.match-events .team-combo input[type="search"] { width: 100%; }
.match-events__list { display: flex; flex-direction: column; gap: 4px; max-height: 168px; overflow: auto; }
.match-events__pick {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfbfa;
  font-size: 13px;
}
.match-events__pick span { flex: 1; min-width: 0; }
.match-events__pick strong { display: block; font-weight: 600; }
.match-events__pick small { display: block; color: var(--muted); font-size: 11px; line-height: 1.3; }
.match-events__pick .icon-btn { width: 28px; height: 28px; flex-shrink: 0; }

.modal__dialog:has(.match-form) { width: min(760px, 100%); }
.match-form { gap: 8px 10px; padding: 6px 16px 10px; }
.match-form .field { gap: 3px; }
.match-form .field span { font-size: 11px; letter-spacing: 0.02em; }
.match-form input,
.match-form select { padding: 6px 8px; border-radius: 8px; font-size: 13px; }

.player-stats .filters { padding: 10px 14px 6px; gap: 8px; }
.player-stats .filters .field { min-width: 150px; flex-basis: 170px; gap: 4px; }
.player-stats .filters .field span { font-size: 11px; letter-spacing: 0.02em; }
.player-stats .filters .field select { padding: 6px 10px; border-radius: 8px; font-size: 13px; }

.stats-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 2px 14px 10px;
  border-bottom: 1px solid var(--line);
}

.stats-summary div {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
  padding: 3px 8px;
  background: var(--canvas);
  border-radius: 8px;
}

.stats-summary span {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.stats-summary strong {
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.player-stats .table-stats { font-size: 13px; }
.player-stats .table-stats th,
.player-stats .table-stats td { padding: 6px 8px; }
.player-stats .table-stats th {
  font-size: 11px;
  letter-spacing: 0.03em;
}
.player-stats .table-stats th:nth-child(n+5):nth-child(-n+14),
.player-stats .table-stats td:nth-child(n+5):nth-child(-n+14) { text-align: center; }
.player-stats .table-stats th.col-actions-wide,
.player-stats .table-stats td.col-actions-wide { width: 72px; }
.player-stats .table-stats td { font-variant-numeric: tabular-nums; }
.player-stats .table-stats strong { font-size: 13px; font-weight: 600; }
.player-stats .muted-line { margin-top: 1px; font-size: 11px; line-height: 1.3; }
.player-stats .icon-btn { width: 28px; height: 28px; border-radius: 8px; }
.player-stats .icon-btn svg { width: 14px; height: 14px; }
.player-stats .row-actions { gap: 4px; }

.table-stats th,
.table-stats td {
  white-space: nowrap;
}

.table-stats th:nth-child(2),
.table-stats td:nth-child(2) {
  white-space: normal;
}

.table-stats thead th[title] {
  cursor: help;
}

.modal__dialog:has(.stat-form) { width: min(620px, 100%); }

.stat-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.stat-form .field {
  gap: 3px;
}

.stat-form .stat-label {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 6px;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

.stat-form .stat-label b {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.stat-form .stat-label small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.3;
}

.stat-form input,
.stat-form select {
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 13px;
}

.stat-form input[type="number"] {
  width: 100%;
}

@media (max-width: 640px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
}

.stats-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  margin: 0;
  padding: 8px 14px 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.stats-legend b {
  color: var(--ink);
  font-weight: 700;
}

.field-check {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.field-check input {
  width: 18px;
  height: 18px;
}

.field-error {
  color: #c0392b;
  font-size: 12px;
  min-height: 0;
}

.form-hint {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.panel > .field-error {
  margin: 8px 16px;
}

.input-validation-error {
  border-color: #e0a0a0 !important;
  background: #fff8f8;
}

.validation-summary-errors {
  color: #c0392b;
  font-size: 13px;
}

body.modal-open {
  overflow: hidden;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 40;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
}

.modal.is-open {
  display: flex;
}

.modal.is-full {
  padding: 0;
}

.modal.is-full .modal__dialog {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  border-radius: 0;
}

.modal__tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.modal.is-full [data-modal-full] .modal-full__expand,
.modal:not(.is-full) [data-modal-full] .modal-full__shrink {
  display: none;
}

.modal--confirm {
  z-index: 50;
}

.modal--confirm .modal__dialog {
  width: min(420px, 100%);
  max-height: none;
}

.confirm__text {
  margin: 0;
  color: var(--muted);
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  background: rgba(11, 10, 26, 0.48);
}

button.modal__backdrop {
  border: 0;
  padding: 0;
  cursor: pointer;
}

.modal__dialog {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: min(90vh, 880px);
  overflow: auto;
  background: var(--paper);
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(11, 10, 26, 0.22);
}

.modal__dialog:has(.standings-form) { width: min(980px, 100%); }
.modal__dialog:has(.banner-form) { width: min(860px, 100%); }

.partner-form .grid-form > .field,
.menu-form .grid-form > .field,
.banner-form .grid-form > .field,
.report-form .grid-form > .field,
.content-form .grid-form > .field,
.news-form .grid-form > .field { min-width: 0; }
.partner-form .field input:not([type="checkbox"]),
.partner-form .field textarea,
.partner-form .field select,
.menu-form .field input:not([type="checkbox"]),
.menu-form .field textarea,
.menu-form .field select,
.banner-form .field input:not([type="checkbox"]),
.banner-form .field textarea,
.banner-form .field select,
.report-form .field input:not([type="checkbox"]),
.report-form .field textarea,
.report-form .field select,
.content-form .field input:not([type="checkbox"]),
.content-form .field textarea,
.content-form .field select,
.news-form .field input:not([type="checkbox"]),
.news-form .field textarea,
.news-form .field select {
  width: 100%;
  max-width: 100%;
}
.menu-title.menu-child { padding-left: 16px; }
.menu-mark { color: var(--muted); margin-right: 4px; }
.menu-target {
  display: block;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.field[hidden] { display: none !important; }
.partner-form .photo-field,
.banner-form .photo-field,
.content-form .photo-field,
.content-form .html-editor,
.news-form .photo-field,
.news-form .html-editor { min-width: 0; }
.content-form .field .html-editor__heading,
.news-form .field .html-editor__heading { width: 118px; max-width: 118px; }
.content-form .field .html-editor__size,
.news-form .field .html-editor__size { width: 78px; max-width: 78px; }
.content-form .field .html-editor__swatch input[type="color"],
.news-form .field .html-editor__swatch input[type="color"] {
  width: 16px;
  max-width: 16px;
  height: 16px;
  padding: 0;
}
.content-form .field .html-editor__link input,
.news-form .field .html-editor__link input { width: auto; max-width: none; }
.content-form .field .html-editor__image-size,
.news-form .field .html-editor__image-size { width: 88px; max-width: 88px; }
.partner-form .field .photo-field > input[type="file"],
.banner-form .field .photo-field > input[type="file"],
.content-form .field .photo-field > input[type="file"],
.news-form .field .photo-field > input[type="file"] {
  position: absolute;
  width: 1px;
  max-width: 1px;
  height: 1px;
  min-width: 0;
  flex: none;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  background: transparent;
}

.standings-editor { display: flex; flex-direction: column; gap: 8px; }
.standings-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.standings-hint { margin: 0; font-size: 12px; color: var(--muted); }
.standings-scroll { overflow-x: auto; }
.standings-head,
.standings-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.6fr) repeat(6, 58px) 40px 32px;
  gap: 6px;
  align-items: center;
  min-width: 680px;
}
.standings-head { font-size: 11px; color: var(--muted); }
.standings-row input,
.standings-row select { width: 100%; min-width: 0; }
.standings-points { text-align: center; font-weight: 600; }

.modal__dialog:has(.team-combo__list:not([hidden])) {
  overflow: visible;
}

.modal__form {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.modal__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 18px 8px;
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 1;
}

.modal__body {
  padding: 8px 18px;
}

.modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px 18px;
  position: sticky;
  bottom: 0;
  background: var(--paper);
}

.modal__errors {
  color: #c0392b;
  font-size: 13px;
  padding: 0 18px;
}

.pager {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 18px 16px;
  flex-wrap: wrap;
}

.pager__current,
.pager__link {
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-size: 13px;
}

.pager__current {
  background: var(--ink);
  color: #fff;
}

.pager__link {
  border: 1px solid var(--line);
  color: var(--ink);
}

.pager__link:hover {
  border-color: #b7b0ff;
}

.pager__meta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.pager__size { display: inline-flex; margin: 0; }

.pager__size select {
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
}

.password-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.password-field input { flex: 1; min-width: 0; }

.password-field__toggle {
  flex: none;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.password-field__toggle:hover,
.password-field__toggle.is-on {
  color: var(--ink);
  border-color: #b7b0ff;
}

@media (max-width: 1100px) {
  .stats, .grid-2, .grid-form { grid-template-columns: 1fr; }
  .profile__club, .profile__arena { flex-wrap: wrap; align-items: flex-start; }
  .profile__facts { margin-left: 0; }
  .cal-head { flex-direction: column; }
}

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    z-index: 20;
    transform: translateX(-105%);
    width: 248px;
  }
  .sidebar.is-open { transform: none; }
  .menu-btn { display: inline-grid; place-items: center; }
  .content, .topbar { padding-left: 16px; padding-right: 16px; }
}
