/* ============================================================
   components.css — Dark Core Control Center
   Cards, badges, buttons, inputs, tables, pagination, etc.
   ============================================================ */

/* ── Section ── */
.section {
  margin-bottom: 20px;
}

.section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}

/* ── Card ── */
.card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color var(--t), box-shadow var(--t);
}

.card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
}

.card-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* ── Stat card ── */
.stat-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: border-color var(--t), box-shadow var(--t);
}

.stat-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
}

.stat-icon {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.stat-value {
  font-size: 30px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 400;
}

/* ── Grids ── */
.grid-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.grid-team {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

/* ── Badge (role) ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  border: 1px solid;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

/* Role-specific badge colours — border uses same colour at 20% opacity */
.badge-106 { color: var(--role-106); border-color: color-mix(in srgb, var(--role-106) 25%, transparent); }
.badge-105 { color: var(--role-105); border-color: color-mix(in srgb, var(--role-105) 25%, transparent); }
.badge-104 { color: var(--role-104); border-color: color-mix(in srgb, var(--role-104) 25%, transparent); }
.badge-103 { color: var(--role-103); border-color: color-mix(in srgb, var(--role-103) 25%, transparent); }
.badge-102 { color: var(--role-102); border-color: color-mix(in srgb, var(--role-102) 25%, transparent); }
.badge-101 { color: var(--role-101); border-color: color-mix(in srgb, var(--role-101) 25%, transparent); }
.badge-100 { color: var(--role-100); border-color: color-mix(in srgb, var(--role-100) 25%, transparent); }
.badge-099 { color: var(--role-099); border-color: color-mix(in srgb, var(--role-099) 25%, transparent); }

/* ── Button ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  border: 2px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  cursor: pointer;
  transition: background var(--t), border-color var(--t);
  white-space: nowrap;
  line-height: 1;
  text-decoration: none;
}

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

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

.btn-export-format.active {
  background: var(--surface-hover);
  border-color: var(--green);
  color: var(--text);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}

/* ── Input ── */
.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 13px;
  pointer-events: none;
}

.input {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface-alt);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  font-weight: 400;
  outline: none;
  transition: border-color var(--t);
}

.input:focus {
  border-color: var(--border-hover);
}

.input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.input-with-icon {
  padding-left: 36px;
}

/* ── Select ── */
.select {
  padding: 9px 32px 9px 12px;
  background: var(--surface-alt);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  transition: border-color var(--t);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236b6b6b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.select:hover, .select:focus {
  border-color: var(--border-hover);
}

.select option {
  background: var(--surface-alt);
  color: var(--text);
  padding: 10px;
}

/* ── Custom Select Dropdown ── */
.custom-select-wrapper {
  position: relative;
  user-select: none;
  font-family: inherit;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 14px;
  background: var(--surface-alt);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--t), background var(--t);
  white-space: nowrap;
}

.custom-select-trigger:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
}

.custom-select-options {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 100%;
  background: var(--surface);
  border: 2px solid var(--border-hover);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  z-index: 100;
  display: none;
  flex-direction: column;
  padding: 4px;
  gap: 2px;
}

.custom-select-options.open {
  display: flex;
  animation: dropdownFadeIn 140ms ease;
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.custom-select-option {
  padding: 8px 12px;
  border-radius: calc(var(--radius) - 2px);
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--t), color var(--t);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  line-height: 1.2;
}

.custom-select-option:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.custom-select-option.selected {
  background: var(--surface-alt);
  color: var(--text);
  font-weight: 600;
}

/* ── Filter bar ── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

/* ── Table ── */
.table-wrapper {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  background: var(--surface-alt);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
  white-space: nowrap;
}

.table tr:last-child td {
  border-bottom: none;
}

.table tbody tr {
  transition: background var(--t);
}

.table tbody tr:hover {
  background: var(--surface-alt);
}

/* ── Nick link ── */
.nick-link {
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
  transition: color var(--t);
}

.nick-link:hover {
  color: #c0c0c0;
  text-decoration: underline;
}

/* ── Avatar ── */
.avatar {
  border-radius: var(--radius);
  object-fit: cover;
  background: var(--surface-alt);
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-alt);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  font-family: 'Space Grotesk', sans-serif;
  flex-shrink: 0;
}

/* ── Pagination ── */
.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
  padding-top: 20px;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  border: 2px solid var(--border);
  background: var(--surface-alt);
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--t), background var(--t), border-color var(--t);
}

.page-btn:hover:not(:disabled):not(.active) {
  color: var(--text);
  border-color: var(--border-hover);
}

.page-btn.active {
  color: var(--text);
  border-color: var(--border-hover);
  background: var(--surface-hover);
}

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

/* ── Status dot ── */
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  flex-shrink: 0;
  margin-right: 5px;
  vertical-align: middle;
}

.dot-banned    { background: var(--red);    }
.dot-unbanned  { background: var(--green);  }
.dot-permanent { background: var(--yellow); }

/* ── Autocomplete ── */
.search-container {
  position: relative;
}

.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 2px solid var(--border-hover);
  border-radius: var(--radius);
  z-index: 60;
  overflow: hidden;
  max-height: 220px;
  overflow-y: auto;
}

.autocomplete-item {
  padding: 9px 14px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  transition: background var(--t), color var(--t);
  display: flex;
  align-items: center;
  gap: 8px;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.highlighted {
  background: var(--surface-alt);
  color: var(--text);
}

.autocomplete-item i {
  font-size: 11px;
  flex-shrink: 0;
}

/* ── Team card ── */
.team-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
}

.team-card:hover {
  border-color: var(--border-hover);
  background: var(--surface-alt);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.team-card-info {
  flex: 1;
  min-width: 0;
}

.team-card-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-card-server {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Profile header ── */
.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.profile-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.profile-nick {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.profile-status {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.4;
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 12px;
}

.profile-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-muted);
}

.profile-meta-item i {
  font-size: 11px;
  width: 12px;
  text-align: center;
}

.profile-actions {
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ── Roles list ── */
.roles-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.role-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface-alt);
  border: 2px solid var(--border);
  border-radius: var(--radius);
}

.role-server {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Playtime chart ── */
.playtime-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.playtime-item {
  display: grid;
  grid-template-columns: 150px 1fr 65px;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  line-height: 1.4;
  padding: 3px 0;
}

.playtime-server {
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
  padding-bottom: 2px;
}

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

.playtime-bar-fill {
  height: 100%;
  background: var(--border-hover);
  border-radius: 3px;
}

.playtime-value {
  color: var(--text-muted);
  text-align: right;
  white-space: nowrap;
  font-weight: 500;
  line-height: 1.4;
  padding-bottom: 2px;
}

/* ── Forum items ── */
.forum-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.forum-item {
  padding: 10px 14px;
  background: var(--surface-alt);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--t);
}

.forum-item:hover {
  border-color: var(--border-hover);
}

.forum-item-title {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.forum-item-meta {
  display: flex;
  gap: 12px;
  margin-top: 5px;
  flex-wrap: wrap;
}

.forum-item-meta span {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.forum-item-meta i {
  font-size: 10px;
}

/* ── Ban card ── */
.ban-card {
  background: var(--surface);
  border: 2px solid var(--red);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.ban-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--red);
  margin-bottom: 12px;
}

.ban-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.ban-detail-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 3px;
}

.ban-detail-value {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}

/* ── Confirmed badge ── */
.confirmed-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--green);
  font-weight: 500;
  vertical-align: middle;
  margin-left: 8px;
}

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 52px 20px;
  color: var(--text-muted);
  font-size: 13px;
}

.empty-state i {
  font-size: 28px;
  margin-bottom: 14px;
  display: block;
  opacity: 0.5;
}

.empty-state p {
  line-height: 1.5;
}

/* ── Player search ── */
.player-search-wrap {
  max-width: 560px;
  margin-bottom: 28px;
}

.player-search-wrap .input-wrapper {
  display: flex;
  gap: 8px;
}

/* ── Banlist row cards (alternative to table on mobile) ── */
.ban-row {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  transition: border-color var(--t), background var(--t);
}

.ban-row:hover {
  border-color: var(--border-hover);
  background: var(--surface-alt);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .grid-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-team {
    grid-template-columns: 1fr;
  }
  .profile-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .profile-actions {
    margin-left: 0;
    width: 100%;
  }
  .playtime-item {
    grid-template-columns: 110px 1fr 55px;
    gap: 8px;
  }
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .filter-bar .select,
  .filter-bar .input {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .grid-stats {
    grid-template-columns: 1fr;
  }
  .playtime-item {
    grid-template-columns: 85px 1fr 48px;
    gap: 6px;
  }
  .table td, .table th {
    padding: 9px 10px;
  }
}

/* ── Global Search Modal ── */
.search-modal-backdrop {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 150ms ease;
}

.search-modal {
  width: 100%;
  max-width: 600px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  margin: 0 16px;
}

.search-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 2px solid var(--border);
}

.search-modal-header input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 15px;
  outline: none;
  font-family: inherit;
}

.modal-esc-badge {
  font-size: 10px;
  color: var(--text-muted);
  background: var(--surface-alt);
  padding: 3px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.search-modal-results {
  max-height: 380px;
  overflow-y: auto;
  padding: 8px 0;
}

.search-hint {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.search-result-group-title {
  padding: 8px 18px 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  color: var(--text);
  cursor: pointer;
  transition: background var(--t);
  text-decoration: none;
}

.search-result-item:hover, .search-result-item.active {
  background: var(--surface-alt);
}

.search-result-item i {
  color: var(--text-muted);
  width: 16px;
  text-align: center;
}

/* ── Responsive Sessions & Status Tags Grid ── */
.player-sessions-tags-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: start;
}

/* ── Player 3-Column Cockpit Grid (Activity | Ban History | Tags & Notes) ── */
.player-three-cols-grid {
  display: grid;
  grid-template-columns: auto 1.25fr 1fr;
  gap: 16px;
  align-items: stretch;
}

@media (max-width: 1100px) {
  .player-three-cols-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .player-three-cols-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* ── Live Radar Two-Column Grid (Players | Radar Activity) ── */
.radar-two-cols-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 16px;
  align-items: start;
}

@media (max-width: 640px) {
  .radar-two-cols-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* ── Ban Analytics Cockpit Layout ── */
.ban-analytics-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 16px;
  align-items: start;
}

.ban-recidivists-scroll {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 580px;
  overflow-y: auto;
  padding-right: 6px;
}

.recidivist-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  gap: 10px;
  transition: border-color var(--t), background var(--t);
}

.recidivist-row:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
}

.analytics-subcard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--t), background var(--t);
}

.analytics-subcard:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
}

@media (max-width: 1024px) {
  .ban-analytics-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ── Banlist Viewport Cockpit (No outer page scrolling) ── */
.banlist-cockpit {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  gap: 10px;
}

.banlist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  flex-shrink: 0;
}

.banlist-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.banlist-breakdown-card {
  padding: 8px 12px !important;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.banlist-table-container {
  flex: 1;
  min-height: 0;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: auto;
  position: relative;
}

.banlist-table-container table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.banlist-table-container thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--surface-alt);
  border-bottom: 2px solid var(--border);
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  white-space: nowrap;
}

.banlist-table-container tbody td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
  white-space: nowrap;
}

.banlist-table-container tbody tr {
  transition: background var(--t);
}

.banlist-table-container tbody tr:hover {
  background: var(--surface-alt);
}

.banlist-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  flex-shrink: 0;
  padding-top: 4px;
}

@media (max-width: 992px) {
  .player-sessions-tags-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ── Chip Buttons (Rules & Filters) ── */
.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 500;
  border: 2px solid var(--border);
  background: var(--surface-alt);
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--t), border-color var(--t), color var(--t);
  outline: none;
  white-space: nowrap;
}

.chip-btn:hover {
  border-color: var(--border-hover);
  color: var(--text);
  background: var(--surface-hover);
}

.chip-btn.active {
  border-color: var(--yellow);
  background: var(--surface-hover);
  color: var(--yellow);
  font-weight: 600;
}

.btn-grid-action {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  text-decoration: none;
  transition: all 150ms ease;
}

.btn-grid-action:hover {
  border-color: var(--yellow);
  color: var(--yellow);
  background: var(--surface);
  transform: scale(1.05);
}

/* ── Floating Cookie Consent Banner ── */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  max-width: 480px;
  background: var(--surface);
  border: 2px solid var(--border-hover);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 999;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: slideUp 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 600px) {
  .cookie-banner {
    left: 12px;
    right: 12px;
    bottom: 12px;
    flex-direction: column;
    align-items: stretch;
  }
}

/* ── Language Selector Dropdown ── */
.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 140px;
  background: var(--surface);
  border: 2px solid var(--border-hover);
  border-radius: var(--radius);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 1000;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  animation: fadeIn 150ms ease;
}

.lang-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: calc(var(--radius) - 2px);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background var(--t), color var(--t);
}

.lang-dropdown-item:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.lang-dropdown-item.active {
  color: var(--yellow);
  background: var(--surface-alt);
}

/* ── Dashboard Analytics Enhancements ── */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  background: color-mix(in srgb, var(--green) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--green) 30%, transparent);
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  user-select: none;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulseSquare 1.8s ease-in-out infinite;
}

@keyframes pulseSquare {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.85); }
}

/* ── Dashboard Cockpit Layout (Balanced Zero-Scroll Viewport Design) ── */
.dashboard-cockpit {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-height: 0;
  height: 100%;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 0 !important;
  flex-shrink: 0;
}

.dashboard-quick-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
  padding: 8px 12px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.dashboard-quick-search {
  display: flex;
  gap: 8px;
  flex: 1;
  min-width: 240px;
}

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

.dashboard-main-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 12px;
  margin-bottom: 0;
  align-items: stretch;
  flex: 1.15;
  min-height: 0;
}

.dashboard-secondary-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 12px;
  margin-bottom: 0;
  align-items: stretch;
  flex: 1;
  min-height: 0;
}

.dashboard-card {
  padding: 14px 18px !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 0;
  height: 100%;
  box-sizing: border-box;
}

/* ── Experimental Lab Cockpit Layout (Dashboard-style Zero-Scroll) ── */
.lab-cockpit {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 0;
  height: 100%;
}

.lab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  flex-shrink: 0;
}

.lab-profile-header-card {
  padding: 10px 16px !important;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  flex-shrink: 0;
}

.lab-main-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 0;
}

/* Dashboard Row 1: Playtime (Big) & Calendar (280px) */
.lab-row-top {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 10px;
  flex: 1.25;
  min-height: 0;
  align-items: stretch;
}

/* Dashboard Row 2: Wipe Bans & Notes */
.lab-row-bottom {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 10px;
  flex: 0.95;
  min-height: 0;
  align-items: stretch;
}

/* Monitoring Cockpit 2-Column Split: Left (Chart + Servers Table) vs Right (Full-Height Live Feed) */
.lab-mon-cockpit-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 10px;
  flex: 1;
  min-height: 0;
  align-items: stretch;
}

.lab-mon-left-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  height: 100%;
}

.lab-mon-chart-card {
  flex: 0 0 210px;
  min-height: 200px;
  padding: 10px 14px !important;
}

.lab-mon-servers-card {
  flex: 1;
  min-height: 0;
  padding: 0 !important;
  overflow: hidden;
}

.lab-mon-right-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

@media (max-width: 1024px) {
  .lab-mon-cockpit-grid {
    grid-template-columns: 1fr;
    height: auto;
  }
  .lab-mon-chart-card {
    flex: none;
    height: 220px;
  }
}

.lab-card {
  padding: 12px 14px !important;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

@media (max-width: 1024px) {
  .lab-cockpit {
    height: auto;
    min-height: 0;
  }
  .lab-row-top,
  .lab-row-bottom,
  .lab-mon-row-top {
    grid-template-columns: 1fr;
  }
}

.dashboard-chart-wrap {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 140px;
  height: 100%;
}

.server-load-item {
  padding: 6px 10px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 4px;
  transition: border-color var(--t), background var(--t);
}

.server-load-item:last-child {
  margin-bottom: 0;
}

.server-load-item:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
}

.server-load-bar {
  height: 5px;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 4px;
}

.server-load-fill {
  height: 100%;
  border-radius: var(--radius);
  transition: width 0.4s ease;
}

.platform-bar {
  display: flex;
  height: 6px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-alt);
  margin: 8px 0 0 0;
}

.platform-bar-pc {
  background: #60a5fa;
  transition: width 0.3s ease;
}

.platform-bar-mobile {
  background: #c084fc;
  transition: width 0.3s ease;
}

/* Moderation 2-column layout inside card */
.dashboard-mod-cols {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 14px;
  flex: 1;
  min-height: 0;
}

.rule-bar-item {
  margin-bottom: 6px;
}

.rule-bar-item:last-child {
  margin-bottom: 0;
}

.rule-bar-header {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 2px;
}

.rule-progress {
  height: 4px;
  background: var(--surface-alt);
  border-radius: var(--radius);
  overflow: hidden;
}

.rule-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: var(--radius);
  transition: width 0.4s ease;
}

.incident-card {
  padding: 6px 8px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 4px;
  transition: border-color var(--t), background var(--t);
}

.incident-card:last-child {
  margin-bottom: 0;
}

.incident-card:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
}

/* Staff duty 2-column grid */
.staff-duty-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  flex: 1;
  min-height: 0;
}

.staff-duty-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  gap: 6px;
  min-width: 0;
  transition: border-color var(--t), background var(--t);
}

.staff-duty-item:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
}

@media (max-width: 1024px) {
  .dashboard-cockpit {
    height: auto;
  }

  .dashboard-main-grid,
  .dashboard-secondary-grid,
  .dashboard-mod-cols,
  .staff-duty-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-chart-wrap {
    min-height: 200px;
  }
}

@media (max-width: 640px) {
  .dashboard-chart-wrap {
    min-height: 170px;
  }
}

/* ── Custom Floating Tooltip ── */
.dcc-custom-tooltip {
  position: fixed;
  z-index: 100000;
  pointer-events: none;
  background: var(--surface);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  padding: 6px 10px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.55);
  font-size: 11px;
  color: var(--text);
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -100%) translateY(-4px);
  transition: opacity 0.1s ease, transform 0.1s ease;
}

.dcc-custom-tooltip.is-visible {
  opacity: 1;
  transform: translate(-50%, -100%) translateY(-8px);
}

.dcc-rule-tooltip {
  position: fixed;
  z-index: 100000;
  pointer-events: none;
  background: var(--surface);
  border: 1.5px solid var(--border-hover);
  border-radius: var(--radius);
  padding: 10px 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65);
  max-width: 320px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  line-height: 1.45;
  color: var(--text);
}

.dcc-rule-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.dcc-rule-tooltip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--border);
}

.dcc-rule-tooltip-title {
  font-weight: 700;
  font-size: 12px;
  color: var(--yellow);
  display: flex;
  align-items: center;
  gap: 5px;
}

.dcc-rule-tooltip-body {
  font-size: 11px;
  color: var(--text);
  margin-bottom: 6px;
}

.dcc-rule-tooltip-punishment {
  font-size: 10px;
  font-weight: 600;
  color: var(--red);
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  padding: 3px 6px;
  border-radius: 4px;
  display: inline-block;
}

.rule-hover-trigger {
  cursor: help;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px dashed var(--border-hover);
  transition: color var(--t), border-color var(--t);
}

.rule-hover-trigger:hover {
  color: var(--yellow) !important;
  border-bottom-color: var(--yellow);
}

/* ── Player Dossier Card & Export Modal ── */
.dossier-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.15s ease;
}

.dossier-modal-dialog {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  max-width: 820px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

.dossier-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--surface-alt);
  border-bottom: 2px solid var(--border);
  flex-shrink: 0;
}

.dossier-modal-body {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  justify-content: center;
  background: #060606;
}

.dossier-card {
  width: 760px;
  background: #0c0d12;
  border: 2px solid #222533;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  color: #e2e8f0;
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

.dossier-card * {
  box-sizing: border-box;
  line-height: inherit;
}

.dossier-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 22px;
  background: #12141c;
  border-bottom: 2px solid #222533;
  position: relative;
  line-height: 1.2;
}

.dossier-card-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #6366f1, #a855f7, #60a5fa);
}

.dossier-agency-label {
  font-family: monospace;
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: 0.12em;
  color: #71717a;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.dossier-doc-id {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.dossier-stamp {
  padding: 5px 12px;
  border-radius: 4px;
  font-family: monospace;
  font-weight: 800;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.dossier-card-content {
  padding: 22px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 22px;
  line-height: 1.4;
}

.dossier-identity-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-right: 20px;
  border-right: 1px dashed #222533;
}

.dossier-avatar-box {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius);
  background: #141722;
  border: 2px solid #282d3f;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.dossier-details-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dossier-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 10px;
  background: #131620;
  border: 1px solid #202434;
  border-radius: var(--radius);
  font-size: 11px;
  line-height: 1.2;
}

.dossier-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 22px;
  background: #10121a;
  border-top: 1px solid #1e2230;
  font-family: monospace;
  font-size: 10px;
  line-height: 1.2;
  color: #52525b;
}

@media print {
  body * {
    visibility: hidden;
  }
  #dossierPrintArea,
  #dossierPrintArea * {
    visibility: visible;
  }
  #dossierPrintArea {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  .dossier-modal-backdrop {
    position: static;
    background: transparent;
    padding: 0;
  }
  .dossier-modal-header,
  .dossier-modal-actions {
    display: none !important;
  }
}



/* ── Mobile & Responsive fix for Monitoring page ── */
@media (max-width: 1024px) {
  .lab-mon-left-col {
    height: auto !important;
    min-height: 0 !important;
    flex: none !important;
  }
  .lab-mon-chart-card {
    flex: none !important;
    height: 220px !important;
    min-height: 220px !important;
    max-height: 220px !important;
  }
  .lab-mon-chart-card canvas {
    max-height: 170px !important;
  }
  .lab-mon-servers-card {
    flex: none !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }
  .lab-mon-servers-card > div:last-child {
    overflow-y: visible !important;
    max-height: none !important;
  }
}
@media (max-width: 640px) {
  .lab-mon-chart-card {
    height: 190px !important;
    min-height: 190px !important;
    max-height: 190px !important;
  }
  .lab-mon-chart-card canvas {
    max-height: 140px !important;
  }
}

/* ── Search Modal Footer & Segmented Mode Switcher ── */
.search-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
  gap: 12px;
  flex-wrap: wrap;
}
.search-modal-footer-hints {
  display: flex;
  align-items: center;
  gap: 12px;
}
.search-footer-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.search-footer-hint kbd {
  font-family: inherit;
  font-size: 9.5px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 4px;
  color: var(--text);
}
.search-ui-mode-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.search-ui-mode-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.search-ui-mode-group {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2px;
  gap: 2px;
}
.search-ui-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: calc(var(--radius) - 2px);
  cursor: pointer;
  transition: all var(--t);
}
.search-ui-mode-btn:hover {
  color: var(--text);
}
.search-ui-mode-btn.active {
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
}
