/* ==========================================================================
   Base layout
   ========================================================================== */

body {
  margin: 0;
  font-family: var(--font-family-base);
  background: var(--color-bg-app);
  color: var(--color-text-strong);
}

.content {
  padding: 12px 10px 26px;
}

.page-wrap {
  max-width: 980px;
  margin: 0 auto;
}

.muted {
  color: var(--color-text-muted);
}

.empty {
  padding: 16px 12px;
  color: var(--color-text-muted);
  font-size: var(--font-size-md);
}

/* ==========================================================================
   Avatar
   ========================================================================== */
.app-avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--avatar-size);
  height: var(--avatar-size);
  flex: 0 0 var(--avatar-size);
  overflow: hidden;
  background: #fff;
  border: 2px solid transparent;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
  box-sizing: border-box;
  border-radius: var(--avatar-radius);
}

.app-avatar--circle,
.app-avatar--rounded,
.app-avatar--square {
  border-radius: var(--avatar-radius);
}

.app-avatar__img,
.app-avatar__fallback,
.app-avatar__slot {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  border-radius: inherit;
}

.app-avatar__img {
  display: block;
  object-fit: cover;
}

.app-avatar__fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  font-size: calc(var(--avatar-size) * 0.32);
  font-weight: 800;
  letter-spacing: 0.01em;
  user-select: none;
}

.app-avatar__fallback--male {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
}

.app-avatar__fallback--female {
  background: rgba(236, 72, 153, 0.12);
  color: #db2777;
}

.app-avatar__fallback--neutral {
  background: rgba(107, 114, 128, 0.12);
  color: #6b7280;
}

.app-avatar__slot {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.025);
  color: rgba(15, 23, 42, 0.45);
  font-size: var(--avatar-slot-font-size);
  font-weight: 500;
  line-height: 1;
}

.app-avatar__badge {
  position: absolute;
  left: var(--avatar-badge-inset);
  right: var(--avatar-badge-inset);
  bottom: var(--avatar-badge-inset);
  height: var(--avatar-badge-height);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-radius:
    0
    0
    calc(var(--avatar-radius) - var(--avatar-badge-inset))
    calc(var(--avatar-radius) - var(--avatar-badge-inset));
  background: linear-gradient(
    to top,
    rgba(17, 24, 39, 0.55),
    rgba(17, 24, 39, 0.45)
  );
  color: #fff;
  font-size: var(--avatar-badge-font-size);
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.app-avatar--frame-neutral {
  border: 2px solid rgba(148, 163, 184, 0.35);
}

.app-avatar--frame-male {
  border: 2px solid rgba(59, 130, 246, 0.4);
}

.app-avatar--frame-female {
  border: 2px solid rgba(236, 72, 153, 0.4);
}

.app-avatar--frame-trainer {
  border: 2px solid rgba(16, 185, 129, 0.45);
}

.app-avatar--frame-captain {
  border: 2px solid rgba(37, 99, 235, 0.45);
}

.app-avatar--frame-admin {
  border: 2px solid rgba(239, 68, 68, 0.45);
}

.app-avatar--frame-premium {
  border: 2px solid rgba(245, 158, 11, 0.55);
}

.app-avatar--slot {
  border: 2px dashed rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.025);
  box-shadow: none;
}

.app-avatar__slot {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(15, 23, 42, 0.45);
  font-size: var(--avatar-slot-font-size);
  font-weight: 500;
  line-height: 1;
  border: 0;
  background: transparent;
}



 .request-card {
  width: 100%;
  margin: 0;
  min-height: 132px;
}

.request-card__top {
  display: flex;
  justify-content: flex-start;
}

.request-card__meta {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-right: 52px;
}



.request-card__middle {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 6px;
  min-height: 58px;
}

.request-card__avatars-group {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  min-width: 0;
  white-space: nowrap;
}




.request-card__names-col {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 2px;
  margin-left: 6px;
  padding-top: 2px;
}

.request-card__name {
  min-width: 0;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.request-card__name--organizer {
  font-size: 11px;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.2;
}

.request-card__name--player {
  color: var(--color-text-soft);
  font-size: 10px;
  line-height: 1.15;
  font-weight: 500;
}


.request-card__attendees {
  min-width: 0;
  height: 24px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: var(--color-text-soft);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.request-card__attendees span {
  min-width: 0;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.request-card__attendees--bottom {
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
}

.request-card__attendees--bottom span {
  max-width: none;
}

.request-card__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
  padding-top: 8px;
}

.request-card__actions-left,
.request-card__actions-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.request-card__actions-right {
  justify-content: flex-end;
  margin-left: auto;
}

.day-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 0 0 6px;
  align-items: start;
}

@media (max-width: 768px) {
  .request-card__meta {
    padding-right: 46px;
    gap: 6px;
  }

  .request-card__middle {
    gap: 6px;
  }

  .day-items {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

@media (max-width: 576px) {
  .request-card {
    padding: 12px;
    gap: 10px;
    min-height: 0;
  }

  .request-card__meta {
    padding-right: 44px;
    gap: 6px;
  }

  .request-card__middle {
    gap: 4px;
    min-height: 0;
  }

  .request-card__stacked {
    margin-left: -8px;
  }

  .request-card__names-col {
    margin-left: 4px;
    padding-top: 1px;
  }


    .request-card__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: nowrap;
    padding-top: 8px;
  }

  .request-card__actions-left,
  .request-card__actions-right {
    width: auto;
    flex: 0 0 auto;
    gap: 8px;
    flex-wrap: nowrap;
  }

  .request-card__actions-left {
    min-width: 0;
    flex: 1 1 auto;
  }

  .request-card__actions-right {
    margin-left: auto;
  }

  .request-card__attendees--bottom {
    height: 34px;
    padding: 0 10px;
  }

  .request-card__attendees--bottom span {
    max-width: 88px;
  }
}


/* ==========================================================================
   Planned match card v6
   ========================================================================== */

.planned-match-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 132px;
  margin: 0;
  padding: 12px 14px;
  gap: 10px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 24px;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 6px 16px rgba(15, 23, 42, 0.06);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}


.match-mode-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 30px;
  min-width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.match-mode-badge i {
  font-size: 12px;
  line-height: 1;
}

.match-mode-badge--rated {
  background: var(--pill-rated-bg);
  border: 1px solid var(--pill-rated-border);
  color: var(--pill-rated-color);
}

.match-mode-badge--training {
  background: var(--pill-training-bg);
  border: 1px solid var(--pill-training-border);
  color: var(--pill-training-color);
}

.planned-match-card.is-clickable {
  cursor: pointer;
}

.planned-match-card.is-clickable:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow:
    0 4px 10px rgba(15, 23, 42, 0.06),
    0 12px 24px rgba(15, 23, 42, 0.08);
}

.planned-match-card.is-locked {
  opacity: 0.94;
}

.planned-match-card__top {
  display: flex;
  justify-content: flex-start;
}

.planned-match-card__meta {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  padding-right: 96px;
}

.match-pill {
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid transparent;

  display: inline-flex;
  align-items: center;
  gap: 6px;

  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;

  white-space: nowrap;
}


.match-pill span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.match-pill--time {
  background: rgba(111, 66, 193, 0.08);
  border-color: rgba(111, 66, 193, 0.15);
  color: var(--color-text-strong);
}

.match-pill--rated {
  background: var(--pill-rated-bg);
  border-color: var(--pill-rated-border);
  color: var(--pill-rated-color);
}

.match-pill--training {
  background: var(--pill-training-bg);
  border-color: var(--pill-training-border);
  color: var(--pill-training-color);
}

.match-pill--single {
  background: var(--pill-single-bg);
  border-color: var(--pill-single-border);
  color: var(--pill-single-color);
}

.match-pill--double {
  background: var(--pill-double-bg);
  border-color: var(--pill-double-border);
  color: var(--pill-double-color);
}

.match-pill--court-booked {
  background: rgba(25, 135, 84, 0.1);
  border-color: rgba(25, 135, 84, 0.22);
  color: #198754;
  max-width: 126px;
}

.match-pill--court-booked span,
.match-pill--court-open span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.match-pill--court-open {
  background: rgba(255, 193, 7, 0.12);
  border-color: rgba(255, 193, 7, 0.24);
  color: #9a6700;
}


.planned-match-card__avatar {
  border-radius: 18px !important;
  border: 2px solid transparent;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
  background: #fff;
  
}




.planned-match-card__middle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  margin-top: 4px;
  min-height: 84px;
  flex: 1 1 auto;
}

.planned-match-card__side {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.planned-match-card__side-stack {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.planned-match-card__team {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.planned-match-card__names {
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
  text-align: center;
}

.planned-match-card__name-row {
  width: 100%;
  min-width: 0;
}

.planned-match-card__name {
  display: block;
  max-width: 140px;
  margin: 0 auto;
  color: var(--color-text-soft);
  font-size: 10px;
  line-height: 1.25;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.planned-match-card__center {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10px;
}

.planned-match-card__result {
  width: 38px;
  height: 38px;
  border-radius: 50%;

  background: rgba(15, 23, 42, 0.03);
  border: 1px solid rgba(15, 23, 42, 0.06);

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 10px;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.5);
}

.planned-match-card__result--score {
  width: auto;
  min-width: 58px;
  padding: 0 12px;
  background: rgba(13, 110, 253, 0.06);
  border-color: rgba(13, 110, 253, 0.14);
  color: var(--color-text-strong);
  font-size: 14px;
  letter-spacing: 0;
}

@media (max-width: 768px) {
  .planned-match-card {
    min-height: 176px;
    padding: 14px;
    gap: 12px;
  }

  .planned-match-card__meta {
    gap: 6px;
  }

  .match-pill {
    height: 28px;
    padding: 0 10px;
    font-size: 12px;
  }

.match-pill--court-booked,
.match-pill--court-open {
  max-width: 150px;
}

  .planned-match-card__middle {
    grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
    gap: 8px;
    min-height: 72px;
  }

    .planned-match-card__side-stack {
    gap: 6px;
  }
    .planned-match-card__name {
    max-width: 108px;
    font-size: 10px;
  }


  .planned-match-card__result {
    min-width: 38px;
    min-height: 38px;
    padding: 0 8px;
    font-size: 10px;
  }

  .planned-match-card__result--score {
    min-width: 50px;
    font-size: 13px;
  }



  .planned-match-card__rating-delta-row {
    gap: 12px;
  }

  .planned-match-card__rating-delta {
    min-width: 40px;
    font-size: 11px;
  }
}

/* ==========================================================================
   Shared cards / pills
   ========================================================================== */

.section-card {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  box-shadow: 0 1px 0 var(--color-border-soft);
  overflow: hidden;
}

.section-head {
  background: var(--color-bg-body);
  border-bottom: 1px solid var(--border-color);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1px;
  flex-wrap: wrap;
}

.section-head.profile-head {
  padding: 10px;
  padding-left: 20px;
}

.section-body {
  padding: 14px;
  margin: 0 auto;
}

.tag-request {
  background: var(--color-request);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--pill-radius);
  padding: 2px 10px;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-soft);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--font-size-sm);

  height: 28px;
  white-space: nowrap;
}

.req-meta-compact,
.match-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.req-meta-compact .pill,
.req-meta-compact .badge-matchtype,
.req-meta-compact .badge-rated {
  height: 32px;
  display: inline-flex;
  align-items: center;
}

/* ==========================================================================
   Request cards / match cards
   ========================================================================== */


.day-group {
  margin: 6px 0 10px;
}

.day-group__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 2px 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.day-group__title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.day-group__weekday {
  color: var(--color-text-strong);
  font-size: 15px;
  line-height: 1.2;
  font-weight: var(--font-weight-extrabold);
}

.day-group__date {
  color: var(--color-text-soft);
  font-size: 13px;
  line-height: 1.2;
  font-weight: var(--font-weight-semibold);
}

.day-group__count {
  min-width: 28px;
  height: 28px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: var(--color-text-soft);
  font-size: 12px;
  font-weight: var(--font-weight-bold);
}

.request-item {
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-height: 128px;
  padding: 14px 16px;
  margin: 10px 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-md);
  transition: var(--transition-card);
  backdrop-filter: blur(4px);
}

.request-item:hover {
  border-color: rgba(0, 0, 0, 0.3);
  background: rgba(0, 0, 0, 0.01);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.06);
}

.request-item:active {
  transform: scale(0.995);
}

.request-item.is-locked {
  cursor: default;
  opacity: 0.88;
  background: var(--color-surface-soft);
  border-color: rgba(0, 0, 0, 0.06);
  filter: grayscale(0.15);
}

.request-item.is-locked:hover {
  box-shadow: none !important;
  transform: none !important;
  background: var(--color-surface-soft);
  border-color: rgba(0, 0, 0, 0.06);
}

.request-item {
  gap: 14px;
  padding: 16px 18px;

  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 18px;

  box-shadow: 
    0 1px 2px rgba(0,0,0,0.04),
    0 6px 18px rgba(0,0,0,0.06);

  transition: all 0.18s ease;
}

.request-item:hover {
  transform: translateY(-2px);
  box-shadow:
    0 4px 10px rgba(0,0,0,0.06),
    0 12px 28px rgba(0,0,0,0.08);
}

.req-avatar {

  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-muted);
  object-fit: cover;
  background: var(--color-surface);
  box-shadow:
    0 2px 6px rgba(0,0,0,0.08);
}

.req-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.req-actions,
.match-actions {
  padding-left: 10px;
  border-left: 1px solid rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
  margin-left: auto;
}

.req-actions {
  flex-wrap: nowrap;
}

.req-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.req-title,
.match-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.req-title {
  margin-bottom: 6px;
  font-weight: var(--font-weight-medium);
    font-size: var(--font-size-xl);
}

.req-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

  line-height: 1.05;
  font-weight: var(--font-weight-extrabold);
}

.req-rating {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  background: var(--color-danger-soft);
  color: var(--color-danger-text);
  border: 1px solid rgba(220, 53, 69, 0.25);
}

.req-note {
  margin-top: 5px;
  padding: 5px 8px;
  font-size: var(--font-size-sm);
  background: var(--color-bg-body);
  border: 1px solid #eee;
  border-radius: var(--radius-md);
}

.req-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 6px 10px;
  border-radius: 10px;

  background: rgba(111, 66, 193, 0.08);
  border: 1px solid rgba(111, 66, 193, 0.18);

  font-weight: 600;
  font-size: 13px;
  color: var(--color-text-strong);
}


.rating-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.rating-value {
  color: var(--color-text-strong);
  font-size: 0.9rem;
  font-weight: var(--font-weight-semibold);
}

.rating-lk {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.06);
  color: var(--color-text-soft);
  font-size: 10px;
  font-weight: var(--font-weight-semibold);
  white-space: nowrap;
}

.rating-lk--solo {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.rating-lk--modal {
  font-size: var(--font-size-md);
}

.rating-missing {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(107, 114, 128, 0.08);
  border: 1px solid rgba(107, 114, 128, 0.14);
  color: #6b7280;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.rating-missing i {
  font-size: 13px;
  opacity: 0.8;
}

.rating-wrap--modal .rating-missing {
  height: 32px;
}

.match-item {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 10px 0;
  padding: 14px 16px;
  background: var(--color-surface);
  border: 1px solid #e3e6ea;
  border-radius: var(--card-radius);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.match-main {
  min-width: 0;
  flex: 1 1 auto;
}

.match-title {
  gap: 10px;
  font-weight: var(--font-weight-bold);
}

/* ==========================================================================
   Segments / tabs
   ========================================================================== */

.mr-segment {
  width: 100%;
  padding: 2px;
  background: var(--segment-bg);
  border-radius: 0 0 16px 16px;
}

.mr-segment--card {
  padding: 1px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-color);
  border-radius: 16px;
}

.mr-segment-inner {
  display: flex;
  gap: 6px;
  width: 100%;

}

.mr-tab-content {
  touch-action: pan-y;
}

.mr-seg-btn {
  max-width: 200px;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;

  border: 0px solid var(--segment-btn-border);
  border-radius: 14px;

  background: var(--segment-btn-bg);
  color: var(--segment-text);
  font-weight: var(--font-weight-medium);

  transition:
    background 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.mr-seg-btn:hover {
  background: var(--segment-bg);
  color: var(--segment-count-text);

  
}

.mr-seg-btn i {
  font-size: 1.05rem;
  opacity: 0.9;
}

.mr-segment--card .mr-seg-btn {
  justify-content: center;
}

.mr-label {
  flex: 1;
  min-width: 0;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mr-count {
  flex: 0 0 auto;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  background: var(--segment-count-bg);
  color: var(--segment-count-text);
  font-size: 0.75rem;
  font-weight: var(--font-weight-bold);

  transition:
    background 0.18s ease,
    color 0.18s ease;
}

.mr-seg-btn.active {
  background: var(--segment-btn-bg-active);
  color: var(--segment-text-active);
  box-shadow: var(--segment-shadow-active);
  font-weight: var(--font-weight-bold);
  border: 1px solid var(--segment-btn-border);
}

.mr-seg-btn.active .mr-count {
  background: var(--segment-count-bg-active);
  color: var(--segment-count-text-active);
}

/* ==========================================================================
   Auth
   ========================================================================== */

.auth-page-card {
  max-width: 570px;
  margin: 0 auto;
}

.auth-page-body {
  padding-top: var(--space-5);
  padding-bottom: var(--space-6);
}

.auth-form-wrap {
  max-width: 360px;
  margin: 0 auto;
}

.auth-submit .ui-btn,
.auth-submit .action-btn,
.auth-submit button {
  width: 100%;
  justify-content: center;
}

/* ==========================================================================
   Members
   ========================================================================== */

.member-card {
  min-height: 82px;
  padding: 10px 14px;
  gap: 12px;
  cursor: default;
}

.member-card:hover {
  border-color: var(--color-border-strong);
  background: rgba(0, 0, 0, 0.01);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.05);
}

.member-card:active {
  transform: none;
}


.member-card__main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.member-card__top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.member-card__name {
  min-width: 0;
  color: var(--color-text-title);
  font-size: var(--font-size-lg);
  line-height: 1.2;
  font-weight: var(--font-weight-bold);
}

.member-card__email {
  min-width: 0;
  color: #6b7280;
  font-size: var(--font-size-md);
  line-height: 1.2;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.member-card__bottom {
  display: contents;
}

.member-card__bottom-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.member-card__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.member-card__roles {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.member-card__roles--top {
  display: flex;
}

.member-card__roles--bottom {
  display: none;
}

.member-role-outline {
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  background: transparent;
  border: 1.5px solid;
  line-height: 1;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-extrabold);
}

.member-role-outline--admin {
  border-color: var(--color-role-admin);
  color: var(--color-role-admin);
}

.member-role-outline--captain {
  border-color: var(--color-role-captain);
  color: var(--color-role-captain);
}

.member-role-outline--trainer {
  border-color: var(--color-role-trainer);
  color: var(--color-role-trainer);
}

.member-card__activation {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.member-card__status {
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  background: var(--color-warning-soft);
  border: 1px solid rgba(255, 193, 7, 0.35);
  color: #b26a00;
  line-height: 1;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
}

.member-card__hint-wrap {
  display: inline-flex;
  align-items: center;
}

.bi-arrow-repeat {
  animation: member-spin 0.8s linear infinite;
}

@keyframes member-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================================================
   Add member modal
   ========================================================================== */

.add-member-modal__content {
  padding-top: 10px;
}

.add-member-modal__tabs {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  margin-bottom: 18px;
  border-radius: var(--radius-pill);
  background: var(--color-surface-muted);
}

.add-member-modal__tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: #6b7280;
  font-size: 14px;
  font-weight: var(--font-weight-bold);
  transition: all 0.18s ease;
}

.add-member-modal__tab:hover {
  background: rgba(255, 255, 255, 0.75);
  color: var(--color-text-heading);
}

.add-member-modal__tab.is-active {
  background: var(--color-surface);
  color: var(--color-text-title);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
}

.add-member-sections,
.add-member-import {
  display: flex;
  flex-direction: column;
}

.add-member-sections {
  gap: 18px;
}

.add-member-import {
  gap: 14px;
}

.add-member-section {
  padding: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--card-radius);
  background: #fbfcfe;
}

.add-member-section__title,
.add-member-form__roles-title {
  color: #667085;
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-extrabold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.add-member-section__title {
  margin-bottom: 14px;
}

.add-member-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.add-member-form__grid,
.add-member-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.add-member-form__field,
.add-member-form-grid__col {
  min-width: 0;
}

.add-member-form-grid__col--full {
  grid-column: 1 / -1;
}

.add-member-form__roles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding-top: 4px;
}

.add-member-form__roles-title {
  width: 100%;
  color: #6b7280;
}

.role-check,
.add-member-role-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: var(--radius-pill);
  background: var(--color-surface-subtle);
  cursor: pointer;
  color: #334155;
}

.role-check {
  font-weight: var(--font-weight-semibold);
}

.role-check input,
.add-member-role-pill input {
  margin: 0;
}

.add-member-role-multi {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.add-member-role-pill {
  min-height: 42px;
  font-weight: var(--font-weight-bold);
  transition: all 0.18s ease;
}

.add-member-role-pill:hover {
  border-color: rgba(15, 23, 42, 0.22);
  background: var(--color-surface);
}

.add-member-role-pill.is-active {
  background: rgba(29, 39, 64, 0.08);
  border-color: rgba(29, 39, 64, 0.24);
  color: var(--color-text-title);
}

.add-member-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  width: 100%;
}

.add-member-import__hint {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--color-surface-subtle);
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: #475569;
  font-size: 14px;
  line-height: 1.45;
}

.add-member-import__note,
.tm-form-error {
  font-size: var(--font-size-md);
  line-height: 1.45;
}

.add-member-import__note {
  color: #6b7280;
}

.tm-form-error {
  margin-top: 6px;
  padding-left: 2px;
  color: var(--color-danger);
  font-size: var(--font-size-sm);
  line-height: 1.35;
}

/* ==========================================================================
   Club settings / overview
   ========================================================================== */

.club-overview {
  padding: 16px 18px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-md);
}

.club-overview__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.club-overview__title {
  color: var(--color-text-strong);
  font-size: var(--font-size-3xl);
  line-height: 1.15;
  font-weight: var(--font-weight-extrabold);
}

.club-overview__address {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: var(--font-size-sm);
  line-height: 1.4;
}

.club-overview__meta {
  margin-top: 4px;
}

.club-overview__note {
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--color-bg-body);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  line-height: 1.45;
}

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

.club-stat-box {
  padding: 16px 14px;
  text-align: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-md);
}

.club-stat-box__value {
  color: var(--color-text-strong);
  font-size: var(--font-size-4xl);
  line-height: 1.1;
  font-weight: var(--font-weight-extrabold);
}

.club-stat-box__label {
  margin-top: 4px;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.club-subsection {
  overflow: visible;
}

.club-subsection__title {
  color: var(--color-text-strong);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-extrabold);
}

.club-court-item {
  min-height: 112px;
}

.club-court-item__main {
  flex: 1 1 auto;
}

.club-court-item__title {
  margin-bottom: 8px;
}

.club-court-item__name {
  font-size: var(--font-size-xl);
  line-height: 1.15;
  font-weight: var(--font-weight-extrabold);
}

.club-court-item__status {
  height: 28px;
  padding: 4px 10px;
  background: var(--color-bg-body);
  color: var(--color-text-muted);
}

.club-courts-footer {
  display: flex;
  justify-content: right;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--color-border-soft);
}

/* ==========================================================================
   App header
   ========================================================================== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-surface);
  border-bottom: 1px solid var(--border-color);
}

.app-topbar {
  min-height: 44px;
  display: flex;
  align-items: center;
  background: var(--color-surface);
  border-bottom: 1px solid var(--border-color);
}

.app-topbar .nav-link {
  color: var(--color-text);
  border-radius: 12px;
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-lg);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  transition: var(--transition-main);
}

.app-topbar .nav-link:hover,
.app-topbar .nav-link.active,
.offcanvas .nav-link.active {
  background: var(--primary-medium);
  color: var(--color-primary);
}




.offcanvas .nav-link {
  border-radius: 12px;
}

.offcanvas .nav-link.active {
  padding-left: 10px;
  font-weight: var(--font-weight-semibold);
}

.app-logo {
  text-decoration: none;
}

.icon-btn {
  background: transparent;
  border: none;
  padding: 4px 6px;
  border-radius: 8px;
  color: var(--color-text-secondary);
}

.icon-btn:hover {
  background: rgba(0,0,0,0.05);
}

.logo-icon,
.logo-accent {
  color: var(--color-primary);
}

.logo-icon {
  font-size: var(--font-size-xl);
}

.logo-text {
  font-weight: var(--font-weight-semibold);
}

/* ==========================================================================
   Generic modal shell
   ========================================================================== */

.modal-dialog {
  margin-top: 80px;
}

.modal-content {
  background: var(--color-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
  overflow: hidden;
  animation: modal-pop 0.16s ease-out;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: var(--color-bg-body);
  border-bottom: 1px solid var(--border-color);
}

.modal-title {
  margin: 0;
  color: var(--color-text-heading);
  font-weight: var(--font-weight-extrabold);
  letter-spacing: -0.2px;
}

.modal-body {
  padding: 14px 18px 22px;
}

.modal-footer {
  margin-top: 8px;
  padding: 22px 18px;
  background: var(--color-surface);
  border-top: none;
}

@keyframes modal-pop {
  from {
    transform: scale(0.97);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-top {
  overflow-y: auto;
}

.modal-top .modal-dialog {
  margin-top: 32px;
  margin-bottom: 32px;
}

.modal-top .modal-body {
  max-height: calc(100vh - 190px);
  overflow-y: auto;
}

.modal-center .modal-dialog {
  display: flex;
  align-items: center;
  min-height: 100vh;
  margin: 0 auto;
  padding: 16px;
}

#requestDetailsModal .modal-dialog {
  max-width: 640px;
}

/* ==========================================================================
   Modal internals
   ========================================================================== */

.tm-close {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-pill);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.08s ease, color 0.15s ease;
}

.tm-close:hover {
  background: rgba(0, 0, 0, 0.08);
  color: var(--color-text-strong);
}

.tm-close:active {
  transform: scale(0.96);
}

.tm-close:focus,
.tm-close:focus-visible {
  outline: none;
  box-shadow: none;
}

.tm-close i {
  font-size: 22px;
  line-height: 1;
}

.tm-modal img:not(.app-avatar__img) {
  width: auto;
  max-width: none;
  height: auto;
}

.tm-modal {
  min-height: 480px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: height 0.15s ease;
}

.tm-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tm-meta {
  flex: 1;
  min-width: 0;
}

.tm-meta-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
  color: rgba(0, 0, 0, 0.65);
}

.tm-meta-line i {
  color: var(--color-text-faint);
}

.tm-player-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.tm-meta-pill {
  min-height: 28px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-pill);
  background: rgba(111, 66, 193, 0.06);
  border: 1px solid rgba(111, 66, 193, 0.14);
  color: var(--color-text-strong);
  font-size: 12px;
  font-weight: var(--font-weight-bold);
  line-height: 1;
  white-space: nowrap;
}

.tm-meta-pill i {
  font-size: 12px;
  opacity: 0.75;
}

@media (max-width: 576px) {
  .tm-player-meta {
    width: 100%;
    gap: 5px;
  }

  .tm-meta-pill {
    min-height: 26px;
    padding: 0 8px;
    font-size: 11px;
  }
  .mr-segment-inner {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .mr-seg-btn {
    max-width: none;
    width: 100%;
    justify-content: center;
    padding: 10px 8px;
    gap: 6px;
    border-radius: 12px;
  }

  .mr-seg-btn i {
    font-size: 15px;
  }

  .mr-count {
    padding: 2px 6px;
    font-size: 11px;
  }

}

.tm-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.tm-card {
  padding: 14px;
  background: var(--color-bg-body);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
}

.tm-card--skill {
  padding: 0;
  overflow: hidden;
}

.tm-card-body {
  padding: 16px;
}

.tm-section-title {
  margin-bottom: 10px;
  font-weight: var(--font-weight-extrabold);
}

.tm-window-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tm-window-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px;
  gap: 12px;
  align-items: end;
}

.tm-window-col {
  min-width: 0;
}

.tm-window-action {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.tm-window-action-spacer {
  width: 38px;
  height: 38px;
}

.tm-expand-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: none;
  border: none;
  color: var(--color-text);
  font-weight: var(--font-weight-semibold);
}

.tm-expand-btn:hover {
  background: var(--color-bg-app);
  border-radius: var(--radius-sm);
}

.tm-expand-content {
  margin-top: 15px;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.tm-note {
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.tm-note-label {
  font-weight: var(--font-weight-extrabold);
}

.tm-note-text {
  color: rgba(0, 0, 0, 0.7);
}

.tm-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  background: var(--color-bg-body);
  border-top: 1px solid rgba(15, 23, 42, 0.06);

}

.tm-list-item {
  display: flex;
  align-items: stretch;
  padding: 14px 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.tm-list-item + .tm-list-item {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}




.tm-player {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
}

.tm-player-content {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tm-player-top {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.tm-player-name {
  min-width: 0;
  padding-top: 0;
  color: var(--color-text-strong);
  font-size: 18px;
  line-height: 1.2;
  font-weight: var(--font-weight-extrabold);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tm-list-item.is-highlight .tm-player-name {
  color: var(--color-organizer);
  
}
.tm-right-inline {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.rating-wrap--modal {
  flex-shrink: 0;
  font-size: 14px;
}

.rating-wrap--modal .rating-value {
  font-size: var(--font-size-lg);
}

.rating-wrap--modal .rating-lk {
  font-size: var(--font-size-md);
}


.tm-player-bottom {
  margin-top: 2px;
}

.tm-player-meta-text {
  color: var(--color-text-soft);
  font-size: var(--font-size-sm);
  line-height: 1.3;
}

.tm-footer {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tm-footer-left,
.tm-footer-right {
  display: flex;
  gap: 10px;
}

.tm-divider {
  height: 1px;
  margin: 14px 0;
  background: var(--border-color);
  opacity: 0.8;
}

.tm-radio-icon {
  font-size: 1.1rem;
  color: var(--color-text-soft);
  transition: color 0.15s ease;
}


/* Weitere Optionen only */
.tm-expand-content--options .tm-grid {
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.tm-expand-content--options .tm-grid > * {
  min-width: 0;
}

.tm-expand-content--options .tm-grid .tm-field {
  width: 100%;
}

.tm-expand-content--options .tm-grid .tm-field-card {
  width: 100%;
}

/* textarea block wider */
.tm-expand-content--options .mt-4 {
  width: 100%;
}

.tm-expand-content--options .mt-4 .tm-field,
.tm-expand-content--options .mt-4 .tm-field-card,
.tm-expand-content--options .mt-4 .tm-field-card--textarea {
  width: 100%;
}

/* more top padding inside textarea wrapper */
.tm-expand-content--options .tm-field-card--textarea {
  padding-top: 14px;
}

/* slightly more breathing room inside textarea */
.tm-expand-content--options .tm-field-card-textarea {
  width: 100%;
  padding-top: 2px;
}

.tm-radio-card.is-active .tm-radio-icon {
  color: var(--color-text-strong);
}

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

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

.tm-field--full {
  grid-column: 1 / -1;
}

.tm-label {
  color: rgba(0, 0, 0, 0.65);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
}

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

.tm-help {
  color: var(--color-text-soft);
  font-size: var(--font-size-sm);
}

/* ==========================================================================
   Rating / slider / field controls
   ========================================================================== */

.tm-rating {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tm-rating-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.tm-rating-val {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: #1f2a37;
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-extrabold);
}

.tm-rating-hint {
  color: var(--color-text-faint);
  font-size: var(--font-size-sm);
}

.tm-rating.is-disabled {
  opacity: 0.45;
}

.tm-rating.is-disabled .tm-range {
  pointer-events: none;
}

.tm-rating.is-disabled .tm-slider-range {
  background: #cfd4da;
}

.tm-slider {
  --tm-thumb: 18px;
  --rail-pad: 22px;
  position: relative;
  height: 36px;
  display: flex;
  align-items: center;
}

.tm-field-card {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: var(--field-height);
  padding: 0 var(--field-padding-x);
  background: var(--color-surface);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--field-radius);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tm-field-card:focus-within {
  border-color: rgba(13, 110, 253, 0.45);
  box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.12);
}

.tm-field-card-icon {
  flex: 0 0 auto;
  color: var(--color-text-soft);
  font-size: 14px;
}

.tm-field-card-control {
  width: 100%;
  min-height: calc(var(--field-height) - 2px);
  padding: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: rgba(0, 0, 0, 0.8);
  font-size: 14px;
  line-height: 1.2;
  font-weight: var(--font-weight-bold);
}

.tm-field-card-control[type="time"] {
  min-width: 0;
}

.tm-field-card select.tm-field-card-control {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.tm-field-card-chevron {
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--color-text-faint);
}

.tm-field-card-control::-webkit-calendar-picker-indicator {
  opacity: 0.6;
}

.tm-field-card .flatpickr-input {
  width: 100%;
  min-height: calc(var(--field-height) - 2px);
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  outline: 0 !important;
  color: rgba(0, 0, 0, 0.8);
  font-size: var(--font-size-xl);
  line-height: 1.2;
  font-weight: var(--font-weight-bold);
}

.tm-field-card .flatpickr-input::-webkit-calendar-picker-indicator {
  display: none;
}

.tm-field-card--textarea {
  min-height: calc(var(--field-height) - 4px);
  resize: vertical;
  color: rgba(0, 0, 0, 0.8);
  font-size: 16px;
  line-height: 1.35;
  font-weight: var(--font-weight-medium);
}

.tm-field-card-icon--top {
  margin-top: 6px;
}

.tm-field-card-textarea-wrap {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.tm-field-card-textarea {
  min-height: 52px;
  resize: vertical;
  color: rgba(0, 0, 0, 0.8);
  font-size: 16px;
  line-height: 1.35;
  font-weight: var(--font-weight-medium);
}

.tm-field-card-textarea::placeholder {
  color: var(--color-text-faint);
}

.tm-field-card-counter {
  margin-top: auto;
  padding-top: 4px;
  text-align: right;
  color: var(--color-text-faint);
  font-size: 11px;
  font-weight: var(--font-weight-bold);
}

.tm-inline-check {
  gap: 12px;
  min-height: 38px;
}

.tm-check-input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  position: relative;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin: 0;
  background: var(--color-surface);
  border: 2px solid rgba(0, 0, 0, 0.22);
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.tm-check-input:hover {
  border-color: rgba(13, 110, 253, 0.45);
}

.tm-check-input:checked {
  background: var(--primary-blue);
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.12);
}

.tm-check-input:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid var(--color-surface);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.tm-check-input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.14);
}

.tm-slider-track,
.tm-slider-range {
  position: absolute;
  height: 8px;
  border-radius: var(--radius-pill);
}

.tm-slider-track {
  left: 0;
  right: 0;
  background: var(--primary-soft);
}

.tm-slider-range {
  background: var(--btn-primary);
  opacity: 0.25;
}

.tm-slider.is-lk .tm-slider-track,
.tm-slider.is-lk .tm-slider-range {
  transform: scaleX(-1);
}

.tm-range {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  height: 36px;
  margin: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  pointer-events: none;
}

.tm-range--min {
  z-index: 2;
}

.tm-range--max {
  z-index: 3;
}

.tm-range::-webkit-slider-runnable-track,
.tm-range::-moz-range-track {
  height: 8px;
  background: transparent;
  border: none;
}

.tm-range::-webkit-slider-thumb {
  pointer-events: all;
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -5px;
  border: 2px solid var(--color-surface);
  border-radius: 50%;
  background: var(--primary-blue);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}

.tm-range::-moz-range-thumb {
  pointer-events: all;
  width: 18px;
  height: 18px;
  border: 2px solid var(--color-surface);
  border-radius: 50%;
  background: var(--btn-primary);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}

.tm-range--max::-webkit-slider-thumb,
.tm-range--max::-moz-range-thumb {
  background: var(--btn-primary);
}

.tm-rating.is-locked .tm-range {
  opacity: 0.7;
}

.tm-rating-marker {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  background: var(--color-surface);
  border: 1px solid var(--primary-dark);
  border-radius: var(--radius-pill);
  color: var(--btn-primary);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.tm-rating-marker:hover {
  background: var(--primary-soft);
}

.tm-rating-marker-label,
.tm-slider-value {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 6px;
  background: var(--color-surface);
  border-radius: var(--radius-pill);
  color: #1f2a37;
  font-weight: var(--font-weight-extrabold);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

.tm-rating-marker-label {
  top: -22px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  line-height: 1;
  white-space: normal;
  font-size: var(--font-size-sm);
}

.tm-slider-value {
  top: -18px;
  z-index: 5;
  border: 1px solid rgba(0, 0, 0, 0.12);
  white-space: nowrap;
  font-size: 11px;
}

.tm-slider-value {
  left: calc(var(--rail-pad) + (var(--pct) * (100% - (2 * var(--rail-pad))) / 100));
}

.tm-slider-value--min {
  transform: translateX(-85%);
}

.tm-slider-value--max {
  transform: translateX(-25%);
}

.tm-radio-group {
  display: flex;
  gap: 0;
  margin-top: 4px;
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radio-card-radius);
}

.tm-radio-card {
  flex: 1;
  min-width: 0;
  position: relative;
  min-height: var(--radio-card-height);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 var(--field-padding-x);
  background: var(--color-surface);
  cursor: pointer;
  user-select: none;
  border-radius: var(--radio-card-radius);
  transition: background-color 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}


.tm-radio-card:hover, .tm-radio-card.is-active {

  background: var(--color-primary-soft);

}

.tm-radio-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tm-radio-control {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
  border: 1.5px solid rgba(0, 0, 0, 0.18);
  border-radius: var(--radius-pill);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.tm-radio-dot {
  width: 8px;
  height: 8px;
  background: var(--btn-primary);
  border-radius: var(--radius-pill);
  transform: scale(0);
  transition: transform 0.14s ease;
}

.tm-radio-main {
  flex: 1 1 auto;
  min-width: 0;
}

.tm-radio-title {
  color: var(--color-text-heading);
  font-size: 14px;
  line-height: 1.15;
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.01em;
}

.tm-radio-sub {
  margin-top: 2px;
  color: rgba(31, 41, 55, 0.56);
  font-size: var(--font-size-sm);
  line-height: 1.25;
}

.tm-radio-icon {
  flex: 0 0 auto;
  color: var(--btn-primary);
  font-size: var(--font-size-lg);
  transition: color 0.16s ease;
}

.tm-radio-card.is-active {
  box-shadow: inset 0 0 0 1px var(--primary-dark);
}

.tm-radio-card.is-active .tm-radio-control {
  border-color: var(--primary-dark);
  box-shadow: 0 0 0 1px var(--primary-soft);
}

.tm-radio-card.is-active .tm-radio-dot {
  transform: scale(1);
}

.tm-radio-card.is-active .tm-radio-title {
  color: var(--color-text-strong);
}

.tm-radio-card.is-active .tm-radio-sub {
  color: rgba(17, 24, 39, 0.62);
}

.tm-seg {
  display: inline-flex;
  padding: 3px;
  background: var(--primary-medium);
  border: 1px solid #e3e5e8;
  border-radius: var(--radius-pill);
}

.tm-seg-btn {
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  background: transparent;
  border: none;
  border-radius: var(--radius-pill);
  color: #495057;
  font-weight: var(--font-weight-bold);
  transition: all 0.15s ease;
}

.tm-seg-btn:hover {
  color: #212529;
}

.tm-seg-btn.is-active {
  background: var(--color-surface);
  color: #212529;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

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

.tm-seg--skill .tm-seg-btn {
  height: 32px;
  padding: 0 12px;
  font-weight: var(--font-weight-extrabold);
}

.tm-skill-body {
  margin-top: 10px;
}

/* ==========================================================================
   Confirm modal / shared modal helpers
   ========================================================================== */

.tm-confirm-text {
  color: #3c4752;
  font-size: 16px;
  line-height: 1.45;
}

.ui-under-confirm {
  filter: blur(3px);
  transition: filter 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}

.confirm-modal-dialog {
  max-width: 500px !important;
  margin: 16px auto;
  padding: 0 12px;
}

.confirm-modal-content {
  border: 1px solid #bfc8d2 !important;
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.12),
    0 3px 8px rgba(0, 0, 0, 0.06),
    inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.confirm-box {
  padding: 18px 20px;
  background: var(--color-surface);
  border: 1px solid #dfe5ec;
  border-radius: 14px;
}

.confirm-actions {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.tm-modal .booking-info {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.tm-modal .booking-info__item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tm-modal .booking-info__item i {
  flex: 0 0 auto;
  color: var(--color-text-faint);
  font-size: var(--font-size-lg);
}

.tm-modal .booking-info__value {
  color: rgba(0, 0, 0, 0.82);
  font-size: 14px;
  line-height: 1.2;
  font-weight: var(--font-weight-bold);
}

.proposal-modal-dialog {
  max-width: var(--modal-width-sm);
}

.proposal-modal .tm-card {
  padding: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: none;
}

.proposal-modal .tm-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.tm-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.tm-stack > * {
  width: 100%;
}

.proposal-modal .tm-grid > * {
  min-width: 0;
}

.proposal-modal .tm-footer {
  justify-content: flex-end;
  gap: var(--space-2);
}

.edit-court-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.ui-btn {
  min-width: 0;
  height: var(--control-height-md);
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  color: var(--ui-btn-text);
  background: var(--ui-btn-bg);
  border: 1px solid var(--ui-btn-border);
  border-radius: var(--radius-pill);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: var(--transition-btn);
}

.ui-btn:hover {

  text-decoration: none;
}

.ui-btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.ui-btn:focus,
.ui-btn:focus-visible {
  outline: none;
  box-shadow: none;
}

.ui-btn:disabled,
.ui-btn.is-disabled {
  opacity: 0.55;
  pointer-events: none;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.ui-btn--primary {
  background: var(--ui-btn-color);
  border-color: var(--ui-btn-color);
  color: var(--ui-btn-text-on-color);
}

.ui-btn--primary:hover {
  background: var(--ui-btn-color-hover);
  border-color: var(--ui-btn-color-hover);
  color: var(--ui-btn-text-on-color);
}

.ui-btn--secondary {
  background: var(--color-surface);
  border-color: var(--ui-btn-border-strong);
  color: var(--ui-btn-text);
}

.ui-btn--secondary:hover {
  background: var(--ui-btn-secondary-bg-hover);
  border-color: var(--ui-btn-secondary-border-hover);
  color: var(--ui-btn-text);
}

.ui-btn--danger {
  background: var(--color-surface);
  border-color: var(--ui-btn-danger-border);
  color: var(--ui-btn-danger);
}

.ui-btn--danger:hover {
  background: var(--ui-btn-danger-soft);
  border-color: var(--ui-btn-danger-border-hover);
  color: var(--ui-btn-danger);
}

.ui-btn--success {
  background: var(--color-surface);
  border-color: var(--ui-btn-success-border);
  color: var(--ui-btn-success);
}

.ui-btn--success:hover {
  background: var(--ui-btn-success-soft);
  border-color: var(--ui-btn-success-border-hover);
  color: var(--ui-btn-success);
}

.ui-btn--lock {
  background: var(--ui-btn-lock-bg);
  border-color: var(--ui-btn-lock-border);
  color: var(--ui-btn-lock-text);
  cursor: default;
}

.ui-btn--lock:hover {
  background: var(--ui-btn-lock-bg);
  border-color: var(--ui-btn-lock-border);
  color: var(--ui-btn-lock-text);
  box-shadow: none;
  transform: none;
}

.ui-btn--ghost {
  background: transparent;
  border: 1px solid var(--color-border-soft);
  color: #6b7280;
}

.ui-btn--ghost:hover {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.15);
}

.ui-btn--sm {
  height: var(--control-height-sm, 36px);
  padding: 0 10px;
  font-size: var(--font-size-sm, 13px);
}

.ui-btn--lg {
  height: var(--control-height-lg, 44px);
  padding: 0 14px;
}

.ui-btn--icon {
  min-width: 44px;
  padding: 0 14px;
  gap: 6px;
}

.ui-btn--icon.ui-btn--sm {
  min-width: 36px;
  padding: 0 10px;
}

.ui-btn--icon.ui-btn--lg {
  min-width: 44px;
  padding: 0 14px;
}

.ui-btn--block {
  width: 100%;
}

.ui-btn i,
.ui-btn svg {
  flex: 0 0 auto;
  line-height: 1;
}

/* ==========================================================================
   Pill buttons
   ========================================================================== */

.ui-pill-btn {
  height: 36px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: all 0.18s ease;
}

.ui-pill-btn i {
  font-size: 14px;
}

/* SUCCESS */
.ui-pill-btn--success {
  background: rgba(25, 135, 84, 0.1);
  border-color: rgba(25, 135, 84, 0.25);
  color: #198754;
}

.ui-pill-btn--success:hover {
  background: rgba(25, 135, 84, 0.18);
}

/* EDIT */
.ui-pill-btn--edit {
  background: rgba(15, 23, 42, 0.05);     
  border-color: rgba(15, 23, 42, 0.12); 
  color: var(--color-text-strong);      
}

.ui-pill-btn--edit:hover {
  background: rgba(15, 23, 42, 0.08);
  border-color: rgba(15, 23, 42, 0.18);
}

/* DANGER */
.ui-pill-btn--danger {
  background: rgba(220, 53, 69, 0.08);
  border-color: rgba(220, 53, 69, 0.22);
  color: #dc3545;
}

.ui-pill-btn--danger:hover {
  background: rgba(220, 53, 69, 0.15);
}

/* ==========================================================================
   Profile page
   ========================================================================== */

.profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.profile-left {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-avatar {
  width: 74px;
  height: 74px;
  flex: 0 0 auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border-muted);
  border-radius: var(--radius-2xl);
  object-fit: cover;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.profile-title {
  min-width: 0;
}

.name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-name {
  max-width: 520px;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--color-text);
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-black);
  letter-spacing: 0.4px;
}

.subrow {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.subrow .sub {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.profile-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.quick-stats {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.qcard {
  padding: 12px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--color-border-muted);
  border-radius: 16px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.05);
}

.qtop,
.stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.qval {
  color: var(--color-text-strong);
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-black);
  letter-spacing: 0.2px;
}

.qlab,
.stat-title {
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
}

.qlab {
  margin-top: 2px;
  letter-spacing: 0.2px;
}

.trend,
.stat-pill {
  padding: 5px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-soft);
  white-space: nowrap;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-black);
}

.trend {
  background: rgba(124, 58, 237, 0.1);
  color: #5b21b6;
}

.trend.down {
  background: rgba(0, 0, 0, 0.06);
  color: var(--color-text-muted);
}

.section-divider {
  height: 1px;
  margin: 18px 0;
  background: rgba(0, 0, 0, 0.08);
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
}

.stat-card {
  padding: 18px;
  background: var(--color-surface);
  border: 1px solid #e6e8ec;
  border-radius: 18px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.stat-title {
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.stat-value {
  margin-top: 10px;
  color: var(--color-text-strong);
  font-size: 28px;
  font-weight: var(--font-weight-black);
  letter-spacing: 0.2px;
}

.stat-sub {
  margin-top: 6px;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.stat-pill {
  background: rgba(25, 135, 84, 0.1);
  color: var(--color-success);
}

.stat-pill.blue {
  background: rgba(59, 130, 246, 0.1);
  color: #1d4ed8;
}

.stat-pill.neutral {
  background: rgba(124, 58, 237, 0.1);
  color: #5b21b6;
}

/* ==========================================================================
   Calendar
   ========================================================================== */

.scheduler {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.scheduler__topbar {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 2px 0;
  padding-bottom: 2px;
}

.scheduler__topbar-row--main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.scheduler__topbar-row--legend {
  width: 100%;
}

.scheduler__date-nav {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
}

.scheduler__date-nav-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.scheduler__date-field {
  width: 220px;
  min-width: 220px;
}

.scheduler__controls {
  display: flex;
  gap: 6px;
  margin-left: auto;
  flex: 0 0 auto;
}

.scheduler__legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  line-height: 1;
}

.legend-label {
  white-space: nowrap;
}

.legend-color {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.legend-item--player {
  background: var(--calendar-player-bg);
  border-color: var(--calendar-player-border);
}

.legend-item--player .legend-color {
  background: var(--calendar-player-border);
}

.legend-item--team {
  background: var(--calendar-team-bg);
  border-color: var(--calendar-team-border);
}

.legend-item--team .legend-color {
  background: var(--calendar-team-border);
}

.legend-item--coach {
  background: var(--calendar-coach-bg);
  border-color: var(--calendar-coach-border);
}

.legend-item--coach .legend-color {
  background: var(--calendar-coach-border);
}

.legend-item--tournament {
  background: var(--calendar-tournament-bg);
  border-color: var(--calendar-tournament-border);
}

.legend-item--tournament .legend-color {
  background: var(--calendar-tournament-border);
}

.legend-item--closed {
  background: var(--calendar-closed-bg);
  border-color: var(--calendar-closed-border);
}

.legend-item--closed .legend-color {
  background: var(--calendar-closed-border);
}

.legend-item--request {
  background: var(--calendar-request-bg);
  border-color: var(--calendar-request-border);
}

.legend-item--request .legend-color {
  background: var(--calendar-request-border);
}

.scheduler__grid-wrapper {
  width: 100%;
  max-height: 80vh;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.scheduler__date-field .tm-field,
.scheduler__date-field .tm-field-card,
.scheduler__date-field .flatpickr-input {
  margin: 0;
}

.scheduler__date-field .tm-field {
  gap: 0;
}

.scheduler__date-field .tm-label {
  display: none;
}

.scheduler__date-field .tm-field-card {
  height: var(--field-height-compact);
  min-height: var(--field-height-compact);
  padding-top: 0;
  padding-bottom: 0;
}

.scheduler__date-field .flatpickr-input,
.scheduler__date-field input {
  height: var(--field-height-compact);
  min-height: var(--field-height-compact);
}
.calendar-board {
  --time-col-width: 72px;
  --slot-h: 40px;
  --cols: var(--calendar-cols);
  --rows: var(--calendar-rows);

  position: relative;
  display: grid;
  width: 100%;
  min-width: calc(var(--time-col-width) + (var(--calendar-cols) * var(--court-min-width)));
  grid-template-columns: var(--time-col-width) minmax(0, 1fr);
  grid-template-rows: 48px auto;
}

.calendar-corner {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 11;
  grid-column: 1;
  grid-row: 1;
  background: var(--calendar-header-bg);
  border-right: 1px solid var(--calendar-grid-line);
  border-bottom: 1px solid var(--calendar-grid-line);
}

.calendar-header {
  position: sticky;
  top: 0;
  z-index: 10;
  grid-column: 2;
  grid-row: 1;
  display: grid;
  grid-template-columns: repeat(var(--calendar-cols), minmax(var(--court-min-width), 1fr));
  background: var(--calendar-header-bg);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.04);
}

.calendar-header-cell {
  position: relative;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--calendar-header-bg);
  border-right: 1px solid var(--calendar-grid-line);
  border-bottom: 1px solid var(--calendar-grid-line);
  font-weight: var(--font-weight-semibold);
}

.calendar-time-col {
  position: sticky;
  left: 0;
  z-index: 9;
  grid-column: 1;
  grid-row: 2;
  background: var(--calendar-header-bg);
}

.calendar-time-cell {
  height: var(--slot-h);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  background: var(--calendar-header-bg);
  border-right: 1px solid var(--calendar-grid-line);
  border-bottom: 1px solid var(--calendar-grid-line);
  color: var(--color-text);
  font-size: var(--font-size-xs);
}

.calendar-time-cell.is-disabled {
  background: var(--calendar-past-bg);
  color: var(--color-text-muted);
}

.calendar-canvas {
  position: relative;
  grid-column: 2;
  grid-row: 2;
  min-height: calc(var(--calendar-rows) * var(--slot-h));
  background-color: var(--calendar-body-bg);
  background-image:
    linear-gradient(to bottom, var(--calendar-grid-line) 1px, transparent 1px),
    linear-gradient(to right, var(--calendar-grid-line) 1px, transparent 1px);
  background-size:
    100% var(--slot-h),
    calc(100% / var(--calendar-cols)) 100%;
  background-repeat: repeat, repeat;
}

.calendar-slot-layer,
.calendar-click-layer,
.events-layer {
  position: absolute;
  inset: 0;
}

.calendar-slot-layer {
  z-index: 1;
}

.calendar-click-layer {
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(var(--calendar-cols), minmax(var(--court-min-width), 1fr));
  grid-template-rows: repeat(var(--calendar-rows), var(--slot-h));
}

.events-layer {
  z-index: 3;
  pointer-events: none;
}

.calendar-slot-row {
  position: absolute;
  left: 0;
  right: 0;
  height: var(--slot-h);
}

.calendar-slot-row.is-disabled {
  background: repeating-linear-gradient(
    -45deg,
    rgba(0, 0, 0, 0.035) 0,
    rgba(0, 0, 0, 0.035) 8px,
    rgba(0, 0, 0, 0.015) 8px,
    rgba(0, 0, 0, 0.015) 16px
  );
  pointer-events: none;
}

.calendar-click-cell {
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.calendar-click-cell:hover {
  background: var(--primary-soft);
}

.calendar-click-cell:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.35);
}

.calendar-click-cell.is-disabled,
.calendar-click-cell:disabled {
  background: transparent;
  cursor: not-allowed;
  pointer-events: none;
}

.event {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 6px 8px;
  border: 1px solid;
  border-radius: 10px;
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.04),
    0 2px 6px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  pointer-events: auto;
  font-size: var(--font-size-xs);
  transition: transform 0.08s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.event:hover {
  transform: translateY(-1px);
  box-shadow:
    0 2px 0 rgba(0, 0, 0, 0.05),
    0 4px 12px rgba(0, 0, 0, 0.08);
}

.event__type,
.event__desc,
.event__players,
.event__time {
  text-align: center;
}

.event__type {
  line-height: 1.1;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
}

.event__desc,
.event__players,
.event__time {
  font-size: var(--font-size-xs);
  opacity: 0.9;
}

.event__desc,
.event__players {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event__time {
  opacity: 0.7;
}

.event--player {
  background: var(--calendar-player-bg);
  border-color: var(--calendar-player-border);
}

.event--team {
  background: var(--calendar-team-bg);
  border-color: var(--calendar-team-border);
}

.event--coach {
  background: var(--calendar-coach-bg);
  border-color: var(--calendar-coach-border);
}

.event--tournament {
  background: var(--calendar-tournament-bg);
  border-color: var(--calendar-tournament-border);
}

.event--closed {
  background: var(--calendar-closed-bg);
  border-color: var(--calendar-closed-border);
}

.event--request {
  background: var(--calendar-request-bg);
  border-color: var(--calendar-request-border);
}

.event--request .event__type {
  font-size: var(--font-size-sm);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (min-width: 769px) {
  .scheduler__topbar-row--main {
    flex-wrap: nowrap;
  }

  .scheduler__controls {
    margin-left: auto;
  }
}

@media (min-width: 992px) {
  .tm-modal {
    gap: 18px;
  }

  .tm-card {
    padding: 16px;
  }

  .tm-section-title {
    margin-bottom: 12px;
  }
}

@media (max-width: 768px) {
  .modal-top .modal-dialog {
    margin-top: 12px;
    margin-right: 10px;
    margin-bottom: 12px;
    margin-left: 10px;
  }

  .modal-top .modal-body {
    max-height: calc(100vh - 140px);
  }

  .modal-center .modal-dialog {
    padding: 12px;
  }

  .tm-window-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .tm-window-action {
    justify-content: flex-end;
  }

  .tm-window-action-spacer {
    display: none;
  }

  .tm-modal .booking-info,
  .tm-grid,
  .proposal-modal .tm-grid,
  .add-member-form-grid,
  .club-stats-grid {
    grid-template-columns: 1fr;
  }

  .add-member-modal__tabs {
    width: 100%;
    display: flex;
  }

  .add-member-modal__tab {
    flex: 1 1 0;
    justify-content: center;
  }

  .add-member-modal__footer {
    flex-direction: column-reverse;
  }

  .add-member-modal__footer > * {
    width: 100%;
  }

  .confirm-modal-dialog {
    max-width: 500px !important;
    margin: 32px auto;
    padding: 0;
  }

  .scheduler__topbar-row--main {
    align-items: flex-start;
    gap: 4px;
  }

  .scheduler__date-nav {
    width: 100%;
    flex: 1 1 100%;
  }

  .scheduler__date-nav-inner {
    width: 100%;
    gap: 6px;
    flex-wrap: nowrap;
  }

  .scheduler__date-field {
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
  }

  .scheduler__controls {
    width: auto;
    margin-top: 10px;
    margin-left: 0;
  }

  .legend-item,
  .scheduler__grid {
    font-size: var(--font-size-sm);
  }

  .scheduler__legend-wrapper {
    position: sticky;
    bottom: 0;
    z-index: 20;
    display: flex;
    justify-content: center;
    padding: 6px 0 8px;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.92));
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(6px);
  }

  .calendar-board {
    --time-col-width: 48px;
  }

  .calendar-time-cell {
    padding-right: 6px;
    font-size: 11px;
  }
}

@media (max-width: 640px) {
  .scheduler__legend {
    justify-content: center;
  }
}

@media (max-width: 576px) {
  .section-body {
    padding-left: 8px;
    padding-right: 12px;
  }

  .auth-form-wrap {
    max-width: 100%;
  }

  .request-item,
  .match-item {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
  }

  .req-avatar {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
  }

  .req-title {
    font-size: 1rem;
  }

  .req-meta-compact {
    gap: 6px;
  }

  .req-main {
    flex: 1 1 calc(100% - 80px);
  }

  .req-actions,
  .match-actions {
    width: 100%;
    flex: 0 0 100%;
    justify-content: flex-end;
    margin-top: 10px;
    margin-left: 0;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
  }

  .member-card {
    min-height: unset;
    padding: 10px 12px;
  }


  .member-card__name {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .member-card__roles--top {
    display: none;
  }

  .member-card__bottom {
    width: 100%;
    flex: 0 0 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
  }

  .member-card__roles--bottom {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
  }

  .member-card__actions {
    flex: 0 0 auto;
    justify-content: flex-end;
  }

  .club-overview {
    padding: 14px;
  }

  .club-overview__title {
    font-size: 20px;
  }

  .club-stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .proposal-modal-dialog {
    max-width: calc(100vw - 24px);
  }

  .tm-skill-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .tm-seg--skill {
    align-self: center;
  }

  .tm-right-inline {
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
  }

  .modal-dialog {
    margin: 10px;
  }

  .modal-header {
    padding: 10px 14px 8px;
  }

  .modal-body {
    padding: 12px 14px 14px;
  }

  .modal-footer {
    padding: 0 14px 14px;
    flex-wrap: wrap;
  }

  .modal-title {
    font-size: 20px;
  }

.tm-list-item {
  padding: 12px 0;
}

.tm-player {
  padding: 0 12px;
  gap: 10px;
}

.tm-player-name {
  font-size: 16px;
}

.tm-player-top {
  gap: 10px;
}

.tm-right-inline {
  gap: 8px;
}
}

@media (max-width: 480px) {
  .scheduler__date-nav-inner {
    gap: 5px;
  }

  .scheduler__date-field {
    width: 170px;
    min-width: 170px;
    flex: 0 1 170px;
  }

  .calendar-board {
    --time-col-width: 44px;
  }

  .calendar-time-cell {
    padding-right: 6px;
    font-size: 11px;
  }
}

.app-modal-dialog {
  max-width: none;
  margin: 24px auto;
}

.app-modal-sm {
  width: min(calc(100vw - 32px), var(--modal-width-sm));
}

.app-modal-md {
  width: min(calc(100vw - 32px), var(--modal-width-md));
}

.app-modal-lg {
  width: min(calc(100vw - 32px), var(--modal-width-lg));
}

.app-modal-xl {
  width: min(calc(100vw - 32px), var(--modal-width-xl));
}



.role-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.role-card {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 12px 14px;
  border: 1px solid var(--color-border-soft);
  border-radius: 16px;
  background: var(--color-surface);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.role-card:hover {
  border-color: rgba(111, 66, 193, .35);
  background: rgba(111, 66, 193, .04);
}

.role-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.role-card-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1px solid rgba(15, 23, 42, 0.16);
  background: var(--color-surface);
  color: transparent;
  font-size: 14px;
}

.role-card-content {
  min-width: 0;
}

.role-card-title,
.role-card-meta {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-card-title {
  color: var(--color-text-title);
  font-weight: var(--font-weight-extrabold);
  line-height: 1.2;
}

.role-card-meta {
  margin-top: 2px;
  color: var(--color-text-soft);
  font-size: var(--font-size-sm);
  line-height: 1.2;
}

.role-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(111, 66, 193, .08);
  color: var(--color-primary);
  font-size: 17px;
}

.role-card:has(input:checked) {
  border-color: var(--color-primary);
  background: rgba(111, 66, 193, .07);
  box-shadow: 0 8px 20px rgba(111, 66, 193, .12);
}

.role-card:has(input:checked) .role-card-check {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #fff;
}

.page-wrap--wide {
  max-width: 1120px;
}

@media (max-width: 576px) {
  .role-card-grid {
    grid-template-columns: 1fr;
  }

  .role-card {
    min-height: 58px;
    padding: 10px 12px;
  }
}

.tm-form-hint {
  margin-top: 4px;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  line-height: 1.4;
}

.tm-required {
  color: var(--color-danger);
  font-weight: var(--font-weight-bold);
}

.auth-page-card {
  max-width: 570px;
  margin: 0 auto;
}