.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(180deg, #f6f8fb 0%, #eef2f6 100%);
}

.login-brand-kicker {
  color: #6b7280;
  font-size: 12px;
  letter-spacing: 0.03em;
  text-transform: none;
}

.login-shell {
  width: min(440px, 100%);
  border: 1px solid #dde4ee;
  border-radius: 12px;
  padding: 16px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.login-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  align-items: center;
  justify-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.login-head-copy {
  min-width: 0;
  width: 100%;
}

.login-title {
  margin: 0;
  text-align: center;
  font-size: 21px;
  font-weight: 600;
  color: #1f2937;
}

.login-subtitle {
  margin: 10px 0 0;
  text-align: left;
  color: var(--text-muted);
  font-size: 12.5px;
}

.login-form {
  margin-top: 12px;
  display: grid;
  gap: 9px;
}

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

.login-label-text {
  font-size: 12px;
  color: #4b5563;
  font-weight: 600;
}

.login-form input {
  min-height: 34px;
  border-radius: 8px;
}

.login-submit {
  margin-top: 6px;
  min-height: 34px;
}

.home-main {
  display: grid;
  gap: 12px;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.home-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.home-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.home-club-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-panel-2);
  padding: 8px 10px;
}

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

.home-player-stats-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 0;
  margin: 8px 0 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.home-player-stats-inline span {
  background: transparent;
  border: 0;
  border-left: 1px solid #d8e0ea;
  padding: 0 14px;
  font-size: 12px;
  color: #5f6b7a;
}

.home-player-stats-inline span:first-child {
  border-left: 0;
  padding-left: 0;
}

.home-player-stats-inline strong {
  color: #1f2937;
}

.home-player-list {
  margin-top: 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
  gap: 0;
  background: transparent;
}

.home-player-list .home-player-row {
  border: 0;
  border-bottom: 1px solid #e4e9ef;
  border-radius: 0;
  background: transparent;
  padding: 8px 0;
}

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

.home-player-list .home-player-row:hover {
  background: #f8fafc;
}

.home-player-head {
  display: grid;
  grid-template-columns: 34px minmax(220px, 2.1fr) minmax(90px, 0.8fr) minmax(100px, 0.8fr) minmax(130px, 1fr) 70px;
  gap: 8px 12px;
  padding: 6px 0 8px;
  font-size: 11px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.home-player-fields {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(220px, 2.1fr) minmax(90px, 0.8fr) minmax(120px, 0.9fr) minmax(100px, 0.8fr) minmax(130px, 1fr);
  gap: 8px 12px;
  width: 100%;
}

.home-photo-field {
  display: flex;
  align-items: center;
}

.home-player-search-under {
  margin-bottom: 10px;
}

.home-player-list .select-actions {
  justify-content: flex-end;
}

.home-player-list .select-actions .pmuted {
  color: #4b5563;
  font-weight: 600;
}

.home-player-list .avail-tag {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  color: #5f6b7a;
}

.home-player-list .avail-tag.is-ok {
  color: #1f6b43;
}

.home-player-list .avail-tag.is-bad {
  color: #9a2f2f;
}

.home-player-search input,
.home-player-search select {
  background: #ffffff;
  border-color: #d2dae4;
}

.home-player-search .btn {
  min-height: auto;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #374151;
}

.home-player-search .btn:hover {
  background: transparent;
  color: #111827;
  text-decoration: underline;
}

.home-table-wrap {
  border: 1px solid #e4e9ef;
  background: #ffffff;
  border-radius: 6px;
  overflow: auto;
}

.home-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  table-layout: fixed;
}

.home-table col.col-photo { width: 56px; }
.home-table col.col-player { width: auto; }
.home-table col.col-ci { width: 120px; }
.home-table col.col-age { width: 80px; }
.home-table col.col-cred { width: 170px; }

.home-table th:first-child,
.home-table td:first-child {
  text-align: center;
}

.home-table th,
.home-table td {
  border-bottom: 1px solid #e4e9ef;
  padding: 8px 10px;
  text-align: left;
  vertical-align: middle;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-table thead th {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5b6471;
  background: #f8fafc;
}

.home-table tbody tr {
  background: #ffffff;
  cursor: pointer;
  height: 48px;
}

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

.home-table tbody tr:focus-visible {
  outline: 2px solid #c9d4e3;
  outline-offset: -2px;
}

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

.home-table .home-player-thumb {
  width: 30px;
  height: 30px;
  margin: 0 auto;
  border-radius: 8px;
  object-fit: cover;
}

.home-thumb-wrap {
  width: 30px;
  height: 30px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.home-player-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13px;
  color: #1f2937;
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1.2;
}

.home-cell-ci,
.home-cell-age,
.home-cell-status {
  white-space: nowrap;
  font-size: 12.5px;
}

.home-cell-age {
  text-align: right;
}

.home-cell-status {
  text-align: left;
}

.home-cell-status .avail-tag {
  max-width: 100%;
}

.request-credentials-head,
.request-select-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.selected-counter {
  font-size: 12px;
  color: var(--text-muted);
}

.player-view-grid {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 12px 14px;
  align-items: start;
}

.player-view-ci,
.player-view-tutor {
  grid-column: 1 / -1;
}

.player-view-img,
.photo-placeholder {
  min-height: 240px;
  height: 100%;
  border-radius: 8px;
}

.photo-placeholder {
  border: 1px dashed #c3cfdd;
  background: #f8fafc;
  display: grid;
  place-items: center;
  color: var(--text-muted);
}

.photo-box {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.admin-actions .btn,
.admin-actions .btn2 {
  width: 100%;
}

.admin-request-filters {
  margin: 10px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--bg-panel-2);
}

.admin-request-filters-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
}

.admin-filter-field {
  display: grid;
  gap: 6px;
}

.admin-filter-field span {
  font-size: 12px;
  color: var(--text-soft);
  font-weight: 600;
}

.admin-filter-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.admin-user-row,
.admin-request-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.admin-user-title,
.admin-user-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

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

.request-field-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 8px;
  display: grid;
  gap: 6px;
}

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

.request-form-grid {
  max-width: 780px;
  display: grid;
  gap: 10px;
}

.request-json {
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  font-size: 12px;
  overflow: auto;
}

.request-deactivate-form .modal-card {
  width: min(460px, calc(100% - 24px));
}

.player-detail-page {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.player-detail-head {
  margin-bottom: 10px;
}

.player-detail-main {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.player-detail-photo {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 8px;
}

.player-detail-photo .player-view-img,
.player-detail-photo .photo-placeholder {
  width: 100%;
  min-height: 220px;
  border-radius: 6px;
}

.player-detail-block .h2 {
  margin-bottom: 8px;
}

.player-detail-block .dash-table {
  min-width: 0;
}

.player-detail-block .dash-table th {
  width: 220px;
  white-space: nowrap;
  color: var(--text-soft);
  background: #f8fafc;
}

.player-detail-block .dash-table td {
  color: var(--text-main);
  font-weight: 600;
}

.player-doc-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 1200px) {
  .admin-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .home-player-head {
    display: none;
  }

  .home-player-stats-inline {
    gap: 8px;
    border-bottom: 0;
    padding-bottom: 0;
  }

  .home-player-stats-inline span {
    border: 0;
    padding: 0;
    width: 50%;
  }

  .home-header {
    flex-direction: column;
    align-items: flex-start;
  }

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

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

  .player-detail-photo {
    max-width: 340px;
  }
}

@media (max-width: 640px) {
  .home-main {
    gap: 10px;
  }

  .home-players {
    min-width: 0;
  }

  .home-player-stats-inline {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 10px;
    margin: 6px 0 8px;
  }

  .home-player-stats-inline span {
    width: auto;
    border-left: 0;
    padding: 0;
    font-size: 12px;
  }

  .home-player-search-under {
    margin-bottom: 8px;
  }

  .home-player-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    align-items: center;
  }

  .home-player-search input {
    grid-column: 1 / -1;
    min-height: 30px;
    padding: 5px 8px;
    font-size: 12.5px;
  }

  .home-player-search .select-toggle-wrap {
    min-width: 0;
    width: 100%;
  }

  .home-player-search select {
    min-height: 30px;
    padding: 5px 26px 5px 8px;
    font-size: 12px;
  }

  .home-player-search .btn {
    width: auto;
    min-width: 86px;
    min-height: 30px;
    border: 1px solid var(--line-strong);
    border-radius: 7px;
    background: #f8fafc;
    text-decoration: none;
    font-size: 12px;
    padding: 0 10px;
  }

  .home-table-wrap {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: scroll;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    overscroll-behavior-x: contain;
    border-radius: 8px;
  }

  .home-table {
    width: 760px;
    min-width: 760px;
    table-layout: fixed;
  }

  .home-table col.col-photo { width: 56px; }
  .home-table col.col-player { width: 320px; }
  .home-table col.col-ci { width: 150px; }
  .home-table col.col-age { width: 90px; }
  .home-table col.col-cred { width: 144px; }

  .home-table th,
  .home-table td {
    padding: 6px 7px;
    font-size: 12px;
    height: 40px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .home-table thead th {
    font-size: 10.5px;
  }

  .home-table .home-player-thumb {
    width: 26px;
    height: 26px;
  }

  .home-thumb-wrap {
    width: 26px;
    height: 26px;
  }

  .home-table .home-player-name {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .home-table .home-cell-ci,
  .home-table .home-cell-age,
  .home-table .home-cell-status {
    white-space: nowrap;
    font-size: 11.5px;
  }

  .home-table .home-cell-age {
    text-align: right;
  }

  .home-table .home-cell-status .avail-tag {
    font-size: 10.5px;
    padding: 1px 6px;
  }

  .admin-actions,
  .admin-filter-actions,
  .view-actions-full,
  .bulk-actions {
    grid-template-columns: 1fr;
  }

  .player-detail-photo {
    max-width: 100%;
  }

  .player-detail-block .dash-table th {
    width: 44%;
    white-space: normal;
  }

  .player-doc-actions .btn2 {
    width: 100%;
  }

  .login-shell {
    width: min(420px, 100%);
    padding: 12px;
    border-radius: 10px;
  }

  .login-head {
    grid-template-columns: 1fr;
    gap: 4px;
    padding-bottom: 8px;
  }

  .login-title {
    font-size: 19px;
  }
}
