::selection {
  background: var(--accent);
  color: #101010;
}

.brand-text .name {
  font-weight: 800;
  font-size: 14.5px;
  letter-spacing: 0.5px;
}

.brand-text .name span {
  color: var(--accent);
}

.content {
  padding: 26px 30px 60px;
}

.team-switch .label {
  font-size: 10.5px;
  letter-spacing: 1.6px;
  color: var(--text-low);
  font-weight: 700;
  margin-bottom: 10px;
}

.structure-switch {
  padding: 0 8px;
  margin-bottom: 18px;
}

.structure-switch .label {
  font-size: 10px;
  letter-spacing: 1.6px;
  color: var(--text-low);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.structure-switch .dropdown-btn {
  padding: 10px 12px;
  font-size: 12.5px;
}

.structure-switch-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--text-mid);
}

.team-pill.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.team-pill:hover:not(.active) {
  color: var(--text-hi);
  border-color: #3a4353;
}

.tab.active {
  color: var(--accent);
  border-color: var(--accent);
}

.panel.active {
  display: block;
}

.p-tag {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  flex-shrink: 0;
  background: var(--bg-3);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9.5px;
  font-weight: 800;
  color: var(--accent);
}

.dropdown-icon {
  font-size: 16px;
  min-width: 20px;
  text-align: center;
}

.section {
  margin-bottom: 32px;
}

.section h2 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text-hi);
  letter-spacing: 0.5px;
}

.stat-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.stat-card:hover {
  border-color: var(--accent);
  background: var(--bg-3);
}

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

.stat-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 8px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-mid);
  letter-spacing: 0.5px;
  font-weight: 600;
  text-transform: uppercase;
}

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

.session-item {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s;
}

.session-item:hover {
  border-color: var(--accent);
  background: var(--bg-3);
}

.session-info {
  display: flex;
  flex-direction: column;
}

.session-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-hi);
  margin-bottom: 4px;
}

.session-meta {
  font-size: 12px;
  color: var(--text-mid);
  display: flex;
  gap: 16px;
}

.session-status {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid var(--green-line);
}

.session-status.completed {
  background: var(--green-bg);
  color: var(--green);
  border-color: var(--green-line);
}

.session-status.pending {
  background: var(--bg-3);
  color: var(--text-mid);
  border-color: var(--line);
}

.schedule-day {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.2s;
}

.schedule-day:hover {
  border-color: var(--accent);
  background: var(--bg-3);
}

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

.stat-selector-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 20px;
}

.stat-selector-row .stat-selector {
  margin-bottom: 0;
}

.stat-selector {
  margin-bottom: 20px;
}

.stat-selector .label {
  font-size: 10.5px;
  letter-spacing: 1.6px;
  color: var(--text-low);
  font-weight: 700;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.dropdown {
  position: relative;
  width: 100%;
  max-width: 340px;
}

.dropdown-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--text-hi);
  font-size: 13.5px;
  font-weight: 700;
  padding: 12px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
}

.dropdown-btn:hover {
  border-color: var(--accent);
}

.dropdown-btn.open {
  border-color: var(--accent);
  background: var(--bg-3);
}

.dropdown-btn .placeholder {
  color: var(--text-low);
  font-weight: 600;
}

.dropdown-btn-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dropdown-chevron {
  width: 16px;
  height: 16px;
  color: var(--text-mid);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.dropdown-btn.open .dropdown-chevron {
  transform: rotate(180deg);
  color: var(--accent);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.18s ease;
  max-height: 280px;
  overflow-y: auto;
  padding: 6px;
}

.dropdown-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-mid);
  font-weight: 600;
  font-size: 13px;
  transition: all 0.12s;
}

.dropdown-option:hover {
  background: var(--bg-3);
  color: var(--text-hi);
}

.dropdown-option .p-tag {
  width: 24px;
  height: 24px;
  font-size: 9px;
}

.bar-track {
  height: 8px;
  background: var(--bg-3);
  border-radius: 6px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--accent), #c98c1f);
}

.bar-fill.blue { background: linear-gradient(90deg, var(--blue), #2b6fc7); }

.bar-fill.green { background: linear-gradient(90deg, var(--green), #1f9d68); }

.bar-fill.pink { background: linear-gradient(90deg, var(--pink), #c94c74); }

.bar-fill.red { background: linear-gradient(90deg, var(--red), #c2483f); }

.stat-empty-hint {
  color: var(--text-low);
  font-size: 12.5px;
  font-weight: 600;
  padding: 18px 4px;
}

.leaderboard {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow-x: auto;
  overflow-y: hidden;
}

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

table.leaderboard-table thead th {
  background: var(--bg-1);
  text-align: left;
  padding: 12px 16px;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--text-low);
  font-weight: 700;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line-soft);
}

table.leaderboard-table tbody td {
  padding: 12px 16px;
  border-top: 1px solid var(--line-soft);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-mid);
}

table.leaderboard-table tbody tr {
  cursor: pointer;
  transition: background 0.15s;
}

table.leaderboard-table tbody tr:hover {
  background: var(--bg-2);
}

table.leaderboard-table td.name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-hi);
  font-weight: 700;
}

table.leaderboard-table td.kd {
  color: var(--text-hi);
  font-weight: 800;
}

.dropdown-option .team-badge {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  color: var(--accent);
  flex-shrink: 0;
}

.dropdown-option .team-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dropdown-option .team-meta .t-name {
  font-size: 13px;
  font-weight: 700;
}

.dropdown-option .team-meta .t-record {
  font-size: 10.5px;
  color: var(--text-low);
  font-weight: 600;
}

.kiviat-card {
  display: flex;
  justify-content: center;
  background: var(--bg-1);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 26px;
}

.kiviat-wrap {
  width: 100%;
  max-width: 440px;
}

.kiviat-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.kiviat-label {
  font-size: 11.5px;
  font-weight: 700;
  fill: var(--text-mid);
}

.eval-btn {
  font-size: 12px;
  font-weight: 700;
  padding: 9px 14px;
  border-radius: 8px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--text-mid);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.eval-btn:hover {
  border-color: var(--text-mid);
  color: var(--text-hi);
}

.eval-btn-primary {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.eval-btn-primary:hover {
  background: var(--accent);
  color: var(--bg-0);
}

.eval-btn-danger {
  background: var(--red-bg);
  border-color: var(--red-line);
  color: var(--red);
}

.eval-btn-danger:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

.confirm-overlay.open {
  opacity: 1;
  visibility: visible;
}

.confirm-modal {
  width: min(380px, 90vw);
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  padding: 22px 22px 18px;
  transform: translateY(-12px) scale(0.98);
  transition: transform 0.18s ease;
}

.confirm-overlay.open .confirm-modal {
  transform: translateY(0) scale(1);
}

.confirm-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-hi);
  margin-bottom: 8px;
}

.confirm-message {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.5;
  margin-bottom: 20px;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.eval-save-feedback {
  font-size: 12px;
  font-weight: 700;
  color: var(--green);
  min-height: 18px;
  margin: 6px 0 12px;
  opacity: 0;
  transition: opacity 0.3s;
}

.eval-save-feedback.visible {
  opacity: 1;
}

.eval-comment-block {
  margin-top: 18px;
}

.eval-comment {
  width: 100%;
  background: var(--bg-1);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  color: var(--text-hi);
  font-size: 13px;
  font-family: inherit;
  padding: 12px 14px;
  resize: vertical;
  line-height: 1.5;
}

.eval-comment:focus {
  outline: none;
  border-color: var(--accent);
}

.kiviat-legend {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 14px;
  flex-wrap: wrap;
}

.kiviat-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-mid);
}

.kiviat-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.kiviat-legend-dot.current { background: var(--accent); }

.kiviat-legend-dot.compare { background: var(--blue); }

.search-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s;
}

.search-result:hover {
  background: var(--bg-3);
}

.search-result-badge {
  flex-shrink: 0;
}

.search-result-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}

.search-result-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-hi);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-sub {
  font-size: 10.5px;
  color: var(--text-low);
  font-weight: 600;
}

.search-result-action {
  flex-shrink: 0;
  font-size: 14px;
  text-decoration: none;
  padding: 4px 6px;
  border-radius: 6px;
}

.search-result-action:hover {
  background: var(--bg-1);
}

.search-empty {
  padding: 14px 10px;
  font-size: 12.5px;
  color: var(--text-low);
  font-weight: 600;
  text-align: center;
}

.dropdown-option.selected {
  background: var(--accent-grad) !important;
  color: #fff !important;
}

.dropdown-option.selected span {
  color: #fff !important;
}

.dropdown-option.selected .p-tag,
.dropdown-option.selected .team-badge {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #fff !important;
}

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

.card-head .label {
  font-size: 10.5px;
  letter-spacing: 1.4px;
  color: var(--text-low);
  font-weight: 700;
  text-transform: uppercase;
  margin: 0;
}

.warn-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}

.warn-form-row {
  width: 100%;
}

.warn-form-row .label {
  font-size: 10.5px;
  letter-spacing: 1.2px;
  color: var(--text-low);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.warn-input {
  width: 100%;
  background: var(--bg-1);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  color: var(--text-hi);
  font-size: 13px;
  font-family: inherit;
  padding: 10px 14px;
}

/* Native <select> popups render in their own layer, without the page's
   gradient behind them — the translucent "glass" --bg-1 turns near-white
   there, washing out --text-hi. Force a solid background on the options. */
.warn-input option {
  background-color: var(--bg-0);
  color: var(--text-hi);
}

.warn-input:focus {
  outline: none;
  border-color: var(--accent);
}

.login-error {
  font-size: 12px;
  color: var(--red);
  background: var(--red-bg);
  border: 1px solid var(--red-line);
  border-radius: 8px;
  padding: 8px 12px;
}

.warn-delete-btn {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-low);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}

.warn-delete-btn svg {
  width: 13px;
  height: 13px;
}

.warn-delete-btn:hover {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-bg);
}

.user-reset-password-btn {
  white-space: nowrap;
}

.reset-password-inline {
  display: flex;
  align-items: center;
  gap: 6px;
}

.reset-password-inline .reset-password-input {
  width: 160px;
}

@media print {
  .kiviat-label, .kiviat-value-label {
      fill: #111111 !important;
    }
}

@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}
