:root {
  --bg: #1b1b20;
  --bg-soft: #2a2a31;
  --panel: #ffffff;
  --text: #16161a;
  --muted: #686876;
  --brand: #d84f4f;
  --brand-dark: #b63d3d;
  --field-top: #83c28d;
  --field-bottom: #6eaf79;
  --ok: #35a854;
  --warn: #f4be32;
  --bad: #ea4a4a;
  --line: #e8e8ef;
  --radius: 18px;
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
  --font-main: "Avenir Next", "Trebuchet MS", "Helvetica Neue", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-main);
  background:
    radial-gradient(circle at 18% 0, #2e2f39 0%, transparent 35%),
    radial-gradient(circle at 82% 100%, #2b2e37 0%, transparent 28%),
    var(--bg);
  color: #fff;
}

a {
  color: inherit;
}

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

.app-root {
  width: min(1280px, 100%);
  margin: 0 auto;
  min-height: 100vh;
}

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

.auth-card {
  width: min(420px, 100%);
  background: var(--panel);
  color: var(--text);
  border-radius: 22px;
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.auth-title {
  margin: 0 0 8px;
  font-size: 30px;
  letter-spacing: 0.02em;
}

.auth-subtitle {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.field-label {
  margin: 14px 0 6px;
  font-size: 13px;
  color: var(--muted);
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid #d9d9e5;
  background: #fbfbfd;
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
}

.textarea {
  min-height: 84px;
  resize: vertical;
}

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

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

.auth-footer {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: 0.16s ease;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-dark);
}

.btn-soft {
  background: #f4f5f8;
  color: var(--text);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid #ced2dc;
}

.auth-error {
  min-height: 18px;
  margin-top: 10px;
  color: var(--bad);
  font-size: 13px;
}

.workspace {
  padding: 12px;
  display: grid;
  gap: 12px;
  align-content: start;
  grid-auto-rows: max-content;
}

.topbar {
  background: var(--panel);
  color: var(--text);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  box-shadow: var(--shadow);
}

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

.topbar-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
  flex: 0 0 auto;
  display: block;
}

.topbar-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.15;
}

.topbar-title-suffix {
  display: inline;
}

.topbar-meta {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.user-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-actions {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.notifications-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  position: relative;
}

.notifications-icon {
  width: 20px;
  height: 20px;
}

.users-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-grid;
  place-items: center;
}

.users-icon {
  width: 20px;
  height: 20px;
}

.notifications-badge {
  position: absolute;
  top: 3px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  border: 1px solid #fff;
  font-size: 10px;
  line-height: 1;
  display: inline-grid;
  place-items: center;
  padding: 0 3px;
}

.notifications-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(360px, 92vw);
  max-height: 380px;
  overflow: auto;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #dde2ef;
  box-shadow: 0 14px 28px rgba(10, 14, 28, 0.22);
  z-index: 30;
  padding: 6px;
  display: grid;
  gap: 6px;
}

.notifications-empty {
  border: 1px dashed #d8dce8;
  border-radius: 10px;
  padding: 12px;
  font-size: 13px;
  color: #666b7b;
  background: #fbfcff;
}

.notification-item {
  width: 100%;
  border: 1px solid #e4e8f2;
  border-radius: 10px;
  background: #fff;
  padding: 8px;
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 4px;
}

.notification-item.unread {
  border-color: rgba(216, 79, 79, 0.45);
  background: rgba(216, 79, 79, 0.06);
}

.notification-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.notification-title {
  font-size: 12px;
  font-weight: 700;
  color: #1c2130;
}

.notification-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  flex: 0 0 auto;
}

.notification-text {
  font-size: 12px;
  color: #2d3344;
}

.notification-time {
  font-size: 11px;
  color: #697084;
}

.logout-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-grid;
  place-items: center;
}

.logout-icon {
  width: 20px;
  height: 20px;
}

.badge {
  border-radius: 0;
  background: transparent;
  color: #434351;
  padding: 0;
  font-size: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.layout {
  display: grid;
  gap: 12px;
}

.tabs-desktop {
  display: none;
}

.panel {
  background: var(--panel);
  color: var(--text);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.section-title h2 {
  font-size: 18px;
  margin: 0;
}

.lists-controls {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.lists-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lists-back-btn {
  width: 40px;
  height: 40px;
  font-size: 22px;
}

.icon-plain-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #63697a;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

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

.icon-plain-btn:hover {
  color: #212532;
}

.icon-plain-btn.active {
  color: var(--brand);
}

.lists-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 24;
  min-width: 240px;
  background: #fff;
  border: 1px solid #dfe3ef;
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 14px 26px rgba(15, 20, 36, 0.2);
  display: grid;
  gap: 8px;
}

.lists-sort-popover {
  min-width: 230px;
}

.lists-filter-popover {
  min-width: 330px;
}

.lists-popover-title {
  margin: 0;
  font-size: 12px;
  color: #656b7c;
}

.lists-option-btn {
  width: 100%;
  border: 1px solid #dde2ee;
  border-radius: 10px;
  background: #fff;
  color: #1f2330;
  text-align: left;
  padding: 8px 10px;
  font-size: 13px;
  cursor: pointer;
}

.lists-option-btn:hover {
  border-color: #c9cfdf;
}

.lists-option-btn.active {
  border-color: rgba(216, 79, 79, 0.7);
  color: #ba3f3f;
}

.lists-filter-label {
  margin: 0 0 4px;
  font-size: 12px;
  color: #656b7c;
}

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

.lists-filter-statuses label {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #e2e6f0;
  border-radius: 9px;
  padding: 6px 7px;
  font-size: 12px;
}

.lists-filter-single {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e2e6f0;
  border-radius: 10px;
  padding: 8px 9px;
  font-size: 13px;
}

.lists-filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.lists-filter-input {
  padding: 8px 10px;
}

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

.section-sub {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.club-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.club-pill {
  border-radius: 14px;
  border: 1px solid #e3e3ee;
  padding: 11px;
  text-align: left;
  cursor: pointer;
  background: #fcfcff;
}

.club-pill:hover {
  border-color: #c7cad8;
  transform: translateY(-1px);
}

.request-club-pill {
  position: relative;
  overflow: hidden;
}

.request-club-pill.state-empty {
  background: #fcfcff;
}

.request-club-pill.state-active {
  background: rgba(244, 190, 50, 0.18);
  border-color: rgba(244, 190, 50, 0.42);
}

.request-club-pill.state-urgent {
  background: rgba(234, 74, 74, 0.16);
  border-color: rgba(234, 74, 74, 0.4);
}

.club-pill strong {
  font-size: 14px;
}

.club-pill > span:last-child {
  color: var(--muted);
  font-size: 12px;
}

.club-pill-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.club-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex: 0 0 auto;
}

.request-club-fallback {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: #eef1f9;
  color: #3d4253;
  font-size: 13px;
  font-weight: 700;
  flex: 0 0 auto;
}

.request-club-fallback.large {
  width: 34px;
  height: 34px;
  font-size: 15px;
}

.club-page-title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  justify-content: flex-end;
  text-align: right;
}

.club-detail-head {
  align-items: center;
}

.club-back-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  font-size: 24px;
  line-height: 1;
  flex: 0 0 auto;
}

.club-logo-lg {
  width: 34px;
  height: 34px;
}

.pitch {
  position: relative;
  width: 100%;
  min-height: 460px;
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 18%),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0 42px, rgba(255, 255, 255, 0.1) 42px 84px),
    linear-gradient(180deg, var(--field-top), var(--field-bottom));
  border: 2px solid rgba(255, 255, 255, 0.25);
}

.pitch-requests {
  min-height: 620px;
}

.pitch::before,
.pitch::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.pitch::before {
  inset: 24px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 12px;
}

.pitch::after {
  left: 50%;
  top: 24px;
  bottom: 24px;
  width: 2px;
  transform: translateX(-1px);
  background: rgba(255, 255, 255, 0.45);
}

.center-circle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 90px;
  height: 90px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45);
  pointer-events: none;
}

.penalty-box {
  position: absolute;
  top: 50%;
  width: 13%;
  height: 44%;
  transform: translateY(-50%);
  border: 2px solid rgba(255, 255, 255, 0.3);
  pointer-events: none;
}

.penalty-box-left {
  left: 24px;
  border-left: 0;
}

.penalty-box-right {
  right: 24px;
  border-right: 0;
}

.position-node {
  position: absolute;
  left: var(--x, 50%);
  top: var(--y, 50%);
  width: clamp(118px, 18vw, 210px);
  max-width: calc(100% - 20px);
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.86);
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  color: #0f1b12;
  padding: 6px 8px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
}

.position-node.compact {
  width: 88px;
}

.list-position-node {
  position: absolute;
  left: var(--x, 50%);
  top: var(--y, 50%);
  transform: translate(-50%, -50%);
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.92);
  background: rgba(216, 79, 79, 0.9);
  color: #fff;
  display: inline-grid;
  place-items: center;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
  transition: transform 0.14s ease, background-color 0.14s ease;
}

.request-position-trigger {
  left: clamp(38px, var(--x, 50%), calc(100% - 38px));
  top: clamp(38px, var(--y, 50%), calc(100% - 38px));
  transform: translate(-50%, -50%);
  width: 68px;
  height: 68px;
  background: rgba(122, 130, 145, 0.88);
  color: #fff;
}

.request-position-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #fff;
  color: #1f2330;
  border: 2px solid rgba(53, 168, 84, 0.92);
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  line-height: 1;
  padding: 0 5px;
}

.request-position-trigger.state-empty {
  background: rgba(122, 130, 145, 0.88);
}

.request-position-trigger.state-empty .request-position-count {
  border-color: rgba(122, 130, 145, 0.88);
}

.request-position-trigger.state-active {
  background: rgba(244, 190, 50, 0.95);
  color: #3f2c00;
}

.request-position-trigger.state-active .request-position-count {
  border-color: rgba(244, 190, 50, 0.95);
}

.request-position-trigger.state-urgent {
  background: rgba(234, 74, 74, 0.92);
  color: #fff;
}

.request-position-trigger.state-urgent .request-position-count {
  border-color: rgba(234, 74, 74, 0.92);
}

.list-position-node:hover {
  transform: translate(-50%, -50%) scale(1.04);
  background: rgba(216, 79, 79, 0.98);
}

.list-position-node.request-position-trigger:hover {
  transform: translate(-50%, -50%) scale(1.04);
  filter: brightness(1.04);
}

.list-position-node:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.node-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.node-head strong {
  font-size: 11px;
  letter-spacing: 0.06em;
}

.node-count {
  font-size: 10px;
  color: #406649;
}

.chips {
  display: grid;
  gap: 3px;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  width: 100%;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1.2;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(74, 113, 81, 0.3);
  color: #1e2f22;
}

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

.chip.more {
  background: rgba(19, 40, 24, 0.11);
  justify-content: center;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.status-dot.ok {
  background: var(--ok);
}

.status-dot.warn {
  background: var(--warn);
}

.status-dot.bad {
  background: var(--bad);
}

.segment-toggle {
  display: inline-flex;
  background: #f2f3f8;
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
}

.segment-toggle button {
  border: 0;
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  background: transparent;
  color: #626270;
  font-size: 12px;
}

.segment-toggle button.active {
  background: var(--brand);
  color: #fff;
}

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

.player-card {
  border: 1px solid #e4e6ef;
  border-radius: 14px;
  background: #fff;
  padding: 10px;
  cursor: pointer;
}

.player-card:hover {
  border-color: #cad0de;
}

.player-card-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 10px;
  align-items: start;
}

.player-card-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.player-card-side {
  min-width: 132px;
  display: grid;
  justify-items: end;
  align-content: start;
  gap: 6px;
}

.player-name-stack {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.player-name-stack strong {
  font-size: 15px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-name-stack span {
  font-size: 12px;
  line-height: 1.2;
  color: #5f6372;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-meta {
  display: grid;
  gap: 3px;
  font-size: 12px;
  color: #4f5260;
}

.player-meta span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-added-field {
  margin-top: 8px;
  border: 1px solid #e4e6ef;
  border-radius: 10px;
  background: #fafbff;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.player-added-label {
  color: #6c7182;
}

.player-added-value {
  font-weight: 600;
  color: #1f2330;
}

.player-rating-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #d9deea;
  background: #fafbff;
  color: #4f5668;
  flex: 0 0 auto;
}

.player-rating-pill.compact {
  min-height: 26px;
  padding: 4px 9px;
}

.player-rating-pill.plain {
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #5d6272;
  gap: 6px;
}

.player-rating-label {
  font-size: 11px;
  line-height: 1;
}

.player-rating-pill.compact .player-rating-label {
  font-size: 10px;
}

.player-rating-value {
  font-size: 14px;
  line-height: 1;
  font-weight: 800;
  color: #151926;
}

.player-rating-pill.compact .player-rating-value {
  font-size: 13px;
}

.player-rating-pill.plain .player-rating-value {
  font-weight: 700;
}

.favorite-toggle {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid #d5d9e6;
  background: #f4f5f8;
  color: #7a8091;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.favorite-toggle svg {
  width: 18px;
  height: 18px;
}

.favorite-toggle .favorite-star-shape {
  fill: transparent;
}

.favorite-toggle:hover {
  color: #4e5363;
  border-color: #c2c8da;
}

.favorite-toggle.active {
  color: #d89f0e;
  border-color: rgba(216, 159, 14, 0.48);
  background: rgba(255, 222, 125, 0.22);
}

.favorite-toggle.active .favorite-star-shape {
  fill: currentColor;
}

.favorite-toggle.compact {
  width: 28px;
  height: 28px;
  border-radius: 9px;
}

.favorite-toggle.compact svg {
  width: 14px;
  height: 14px;
}

.player-card-side .favorite-toggle.compact {
  margin-bottom: 2px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 9px;
  text-align: center;
  font-size: 11px;
  line-height: 1;
}

.status-pill.ok {
  background: rgba(53, 168, 84, 0.16);
  color: #23753b;
}

.status-pill.warn {
  background: rgba(244, 190, 50, 0.23);
  color: #835d00;
}

.status-pill.bad {
  background: rgba(234, 74, 74, 0.18);
  color: #9d2626;
}

.tabs-mobile {
  position: sticky;
  bottom: 8px;
  z-index: 20;
  border-radius: 16px;
  padding: 6px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  background: #f4f5f9;
  border: 1px solid rgba(216, 79, 79, 0.58);
  box-shadow:
    0 10px 18px rgba(0, 0, 0, 0.2),
    0 2px 6px rgba(0, 0, 0, 0.16);
}

.tabs-mobile button,
.tabs-desktop button {
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #626272;
  font-size: 13px;
  padding: 10px 10px;
  cursor: pointer;
  text-align: left;
}

.tabs-mobile button {
  text-align: center;
  display: inline-grid;
  place-items: center;
}

.tab-icon {
  width: 20px;
  height: 20px;
}

.tabs-mobile button.active,
.tabs-desktop button.active {
  background: var(--brand);
  color: #fff;
}

.tabs-desktop {
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px;
  height: fit-content;
}

.tabs-desktop button {
  width: 100%;
  margin-bottom: 6px;
}

.tabs-desktop button:last-child {
  margin-bottom: 0;
}

.position-summary {
  margin-top: 10px;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
}

.position-summary button {
  border: 1px solid #dfe3ec;
  background: #fafafe;
  border-radius: 10px;
  padding: 8px;
  text-align: left;
  cursor: pointer;
}

.position-summary small {
  color: #6e7182;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 40;
}

.modal {
  width: min(720px, 100%);
  max-height: calc(100vh - 34px);
  overflow: auto;
  background: #fff;
  color: var(--text);
  border-radius: 18px;
  padding: 16px;
}

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

.modal-title {
  margin: 0;
}

.modal-close-icon {
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  font-size: 24px;
  line-height: 1;
}

.player-detail-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 10px;
}

.player-detail-actions-left,
.player-detail-actions-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.player-detail-actions-right {
  margin-left: auto;
}

.responsible-inline-select {
  width: 130px;
  padding: 6px 8px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.2;
}

.edit-icon-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-grid;
  place-items: center;
}

.edit-icon {
  width: 18px;
  height: 18px;
}

.tm-source-link {
  width: 32px;
  height: 32px;
  border: 1px solid #d5d9e6;
  border-radius: 10px;
  background: #f4f6fb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.tm-source-link:hover {
  border-color: #c2c8da;
  background: #eef2fa;
}

.tm-source-link img {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  display: block;
  object-fit: contain;
  object-position: center;
}

.player-detail-actions .edit-icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 10px;
}

.player-detail-actions .edit-icon-btn .edit-icon {
  width: 14px;
  height: 14px;
}

.player-segment-form {
  margin-top: 16px;
  align-items: center;
  gap: 6px;
}

.player-detail-compact-btn {
  border-radius: 10px;
  padding: 6px 10px;
  min-height: 30px;
  font-size: 12px;
  line-height: 1.2;
}

.player-segment-form .player-segment-select {
  width: 190px;
  padding: 6px 8px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.2;
}

.player-segment-form .player-segment-apply-btn {
  min-height: 30px;
}

.player-clubs-section {
  margin-top: 16px;
}

.player-clubs-section .field-label {
  margin-top: 0;
}

.request-league-block {
  border: 1px solid #e4e8f2;
  border-radius: 12px;
  background: #fafbff;
  padding: 8px 10px;
}

.request-league-block + .request-league-block {
  margin-top: 14px;
}

.request-league-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  text-align: left;
}

.request-league-toggle {
  width: 100%;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
}

.request-league-block.expanded .request-league-toggle {
  margin-bottom: 8px;
}

.request-league-arrow {
  font-size: 11px;
  line-height: 1;
  color: #6a7183;
  transition: transform 0.18s ease;
}

.request-league-toggle.expanded .request-league-arrow {
  transform: rotate(180deg);
}

.request-league-content {
  display: block;
}

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

.requests-list-archived {
  margin-top: 8px;
}

.requests-archive-head {
  margin-top: 14px;
  margin-bottom: 8px;
  font-size: 13px;
  color: #666d7d;
}

.requests-archive-empty {
  opacity: 0.55;
}

.request-card {
  border: 1px solid #e3e7f1;
  border-radius: 14px;
  background: #fff;
  padding: 12px;
  display: grid;
  gap: 8px;
  cursor: pointer;
}

.request-card:hover {
  border-color: #cad0de;
}

.request-card.archived {
  opacity: 0.3;
}

.request-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.request-card-meta {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: #62697a;
}

.request-card-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.request-close-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #444b5e;
}

.request-state-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  line-height: 1;
  text-align: center;
}

.request-state-pill.ok {
  background: rgba(53, 168, 84, 0.16);
  color: #23753b;
}

.request-state-pill.bad {
  background: rgba(234, 74, 74, 0.18);
  color: #9d2626;
}

.request-card-body p {
  margin: 0;
  font-size: 13px;
  color: #1e2230;
}

.request-detail-text {
  margin-top: 6px;
  border: 1px solid #e3e7f1;
  border-radius: 12px;
  background: #fafbff;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.request-card-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 12px;
  font-size: 12px;
  color: #4c5366;
}

.request-statuses {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.request-status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 10px;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.request-status-chip.ok {
  background: rgba(53, 168, 84, 0.16);
  color: #23753b;
}

.request-status-chip.warn {
  background: rgba(244, 190, 50, 0.23);
  color: #835d00;
}

.request-status-chip.bad {
  background: rgba(234, 74, 74, 0.18);
  color: #9d2626;
}

.request-status-chip.info {
  background: rgba(43, 111, 242, 0.14);
  color: #1f58bd;
}

.request-status-chip.accent {
  background: rgba(233, 125, 53, 0.18);
  color: #b25c1b;
}

.request-status-chip.ghost {
  background: rgba(64, 70, 86, 0.1);
  color: #4c5366;
}

.request-status-select {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}

.request-status-option {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e1e6f1;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
}

.request-close-row {
  margin-top: 12px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.request-closed-date {
  width: min(220px, 100%);
}

.users-form {
  margin-top: 8px;
}

.users-list {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.admin-clubs-section {
  margin-top: 18px;
}

.user-item {
  border: 1px solid #e3e6f0;
  border-radius: 12px;
  background: #fbfcff;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.user-item-main {
  min-width: 0;
}

.user-item-name {
  font-weight: 700;
  font-size: 14px;
}

.user-item-meta {
  margin-top: 2px;
  color: #62697a;
  font-size: 12px;
}

.user-item-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.club-item-actions {
  min-width: 240px;
}

.club-group-select {
  min-width: 180px;
}

.user-action-btn {
  padding: 6px 10px;
  font-size: 12px;
}

.user-action-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

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

.modal-grid.two {
  grid-template-columns: 1fr 1fr;
}

.player-info-panel {
  border: 1px solid #e4e8f2;
  border-radius: 12px;
  background: #fafbff;
  padding: 10px 12px;
  margin-top: 4px;
  margin-bottom: 10px;
}

.player-info-panel .field-label {
  margin: 0 0 4px;
}

.player-conclusions-form {
  margin-top: 0;
}

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

.clubs-checklist {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.clubs-checklist label {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #e1e4ee;
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 13px;
}

.clubs-groups {
  display: grid;
  gap: 8px;
}

.clubs-group-accordion {
  border: 1px solid #e4e8f2;
  border-radius: 12px;
  background: #fafbff;
  padding: 8px 10px;
}

.clubs-group-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
}

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

.clubs-group-title {
  font-size: 13px;
  font-weight: 700;
}

.clubs-group-arrow {
  font-size: 11px;
  line-height: 1;
  color: #6a7183;
  transition: transform 0.18s ease;
}

.clubs-group-accordion[open] .clubs-group-arrow {
  transform: rotate(180deg);
}

.clubs-group-accordion .clubs-checklist,
.clubs-group-accordion .clubs-group-empty {
  margin-top: 8px;
}

.comments {
  margin-top: 6px;
  border-top: 1px solid #ececf4;
  padding-top: 10px;
  display: grid;
  gap: 8px;
}

.player-comments-section {
  margin-top: 16px;
}

.comment-item {
  border-radius: 12px;
  background: #f7f8fc;
  border: 1px solid #eceff8;
  padding: 8px;
  font-size: 13px;
}

.comment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.comment-meta {
  color: #5f6474;
  font-size: 11px;
}

.comment-meta strong {
  color: #2b3141;
  font-weight: 700;
}

.comment-delete-btn {
  border: 1px solid #d9dce8;
  background: #ffffff;
  color: #5f6474;
  border-radius: 8px;
  padding: 2px 8px;
  font-size: 11px;
  line-height: 1.2;
  cursor: pointer;
}

.comment-delete-btn:hover {
  border-color: #c0c5d7;
  color: #1a1c26;
  background: #f2f4fb;
}

.voice-record-btn {
  width: 30px;
  height: 30px;
  border: 1px solid #d5d9e6;
  border-radius: 10px;
  background: #f4f6fb;
  color: #5e6577;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
  position: relative;
}

.voice-record-btn svg {
  width: 14px;
  height: 14px;
}

.voice-record-btn:hover {
  border-color: #c2c8da;
  background: #eef2fa;
  color: #37405a;
}

.voice-record-btn.is-recording {
  border-color: rgba(220, 58, 58, 0.55);
  background: rgba(220, 58, 58, 0.14);
  color: #b32222;
}

.voice-record-btn.is-recording::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 12px;
  border: 1px solid rgba(220, 58, 58, 0.35);
  animation: mic-pulse 1.25s ease-out infinite;
}

@keyframes mic-pulse {
  0% {
    opacity: 0.75;
    transform: scale(0.92);
  }
  70% {
    opacity: 0.15;
    transform: scale(1.08);
  }
  100% {
    opacity: 0;
    transform: scale(1.12);
  }
}

.voice-status {
  font-size: 12px;
  color: #61667a;
}

.empty {
  border: 1px dashed #d8dbe8;
  border-radius: 12px;
  padding: 16px;
  color: #676a7a;
  background: #fbfbff;
}

.text-link {
  color: #0159b5;
  text-decoration: none;
}

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

@media (min-width: 980px) {
  .workspace {
    padding: 18px;
    gap: 16px;
  }

  .layout {
    grid-template-columns: 220px 1fr;
    gap: 16px;
    align-items: start;
  }

  .tabs-desktop {
    display: block;
  }

  .tabs-mobile {
    display: none;
  }

  .panel {
    padding: 16px;
  }

  .pitch {
    min-height: 700px;
  }

  .pitch-lists {
    min-height: 620px;
  }

  .pitch-requests {
    min-height: 620px;
  }
}

@media (max-width: 640px) {
  .row.two,
  .modal-grid.two {
    grid-template-columns: 1fr;
  }

  .topbar {
    position: relative;
    flex-direction: column;
    align-items: flex-start;
    padding-right: 158px;
  }

  .topbar-title {
    padding-right: 8px;
  }

  .topbar-title-suffix {
    display: none;
  }

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

  .user-box {
    width: 100%;
  }

  .logout-btn {
    position: static;
  }

  .topbar-actions {
    position: absolute;
    top: 12px;
    right: 12px;
  }

  .notifications-popover {
    width: min(340px, calc(100vw - 24px));
  }

  .player-detail-actions {
    flex-wrap: wrap;
    width: 100%;
    justify-content: flex-start;
  }

  .player-detail-actions-left {
    width: 100%;
    justify-content: flex-start;
  }

  .player-detail-actions-right {
    width: 100%;
    justify-content: flex-start;
    gap: 6px;
    margin-top: 6px;
  }

  .player-detail-actions .status-pill,
  .player-detail-actions .favorite-toggle,
  .player-detail-actions .edit-icon-btn,
  .player-detail-actions .tm-source-link {
    flex: 0 0 auto;
  }

  .player-detail-actions .responsible-inline-select {
    width: 130px;
    max-width: 52vw;
    padding: 6px 8px;
    font-size: 12px;
  }

  .player-segment-form .player-segment-select {
    width: 190px;
    max-width: 52vw;
  }

  .segment-toggle {
    padding: 3px;
    gap: 3px;
  }

  .segment-toggle button {
    padding: 5px 10px;
    font-size: 11px;
  }

  .player-detail-actions .tm-source-link {
    width: 30px;
    height: 30px;
    border-radius: 9px;
  }

  .player-detail-actions .edit-icon-btn {
    width: 30px;
    height: 30px;
    border-radius: 9px;
  }

  .player-detail-actions .tm-source-link img {
    width: 18px;
    height: 18px;
    border-radius: 5px;
  }

  .player-detail-actions .edit-icon-btn .edit-icon {
    width: 14px;
    height: 14px;
  }

  .player-card-top {
    grid-template-columns: minmax(0, 1fr) 106px;
    gap: 8px;
  }

  .player-card-side {
    min-width: 106px;
    gap: 5px;
  }

  .player-card-side .status-pill {
    padding: 4px 8px;
    font-size: 10px;
  }

  .player-card-side .player-rating-pill.plain .player-rating-label {
    font-size: 9px;
  }

  .player-card-side .player-rating-pill.plain .player-rating-value {
    font-size: 12px;
  }

  .request-position-trigger {
    left: clamp(32px, var(--mx, 50%), calc(100% - 32px));
    top: clamp(32px, var(--my, 50%), calc(100% - 32px));
    width: 56px;
    height: 56px;
    font-size: 14px;
  }

  .pitch-requests {
    min-height: 820px;
  }

  .request-card-head,
  .request-close-row {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .user-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .user-item-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .section-title {
    flex-direction: column;
    align-items: flex-start;
  }

  .lists-controls {
    width: 100%;
    justify-content: flex-start;
  }

  .lists-popover {
    left: 0;
    right: auto;
    width: min(100%, 340px);
  }

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

  .club-detail-head {
    gap: 10px;
  }

  .club-back-btn {
    align-self: flex-start;
  }

  .club-page-title {
    margin-left: 0;
    justify-content: flex-start;
    text-align: left;
    width: 100%;
  }

  .position-node {
    left: var(--mx, var(--x, 50%));
    top: var(--my, var(--y, 50%));
    width: clamp(108px, 29vw, 152px);
    max-width: calc(100% - 16px);
  }

  .list-position-node {
    left: var(--mx, var(--x, 50%));
    top: var(--my, var(--y, 50%));
    width: 56px;
    height: 56px;
    font-size: 14px;
  }

  .position-node.compact {
    width: 78px;
  }

  .pitch::after {
    top: 50%;
    bottom: auto;
    left: 24px;
    right: 24px;
    width: auto;
    height: 2px;
    transform: translateY(-1px);
  }

  .penalty-box {
    left: 50%;
    top: auto;
    width: 50%;
    height: 13%;
    transform: translateX(-50%);
  }

  .penalty-box-left {
    top: 24px;
    border-left: 2px solid rgba(255, 255, 255, 0.45);
    border-top: 0;
  }

  .penalty-box-right {
    right: auto;
    bottom: 24px;
    border-right: 2px solid rgba(255, 255, 255, 0.45);
    border-bottom: 0;
  }

  .pitch {
    min-height: 1120px;
  }

  .pitch-lists {
    min-height: 820px;
  }
}
