:root {
  --bg: #0b0d10;
  --panel: #12161c;
  --card: #171d25;
  --text: #e9edf3;
  --muted: #a7b0bd;
  --accent: #37c971;
  --border: rgba(255, 255, 255, .08);
  --danger: #ff5c6c
}

* {
  box-sizing: border-box
}

body {
  margin: 0;
  font-family: 'DM Sans', system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: var(--bg);
  color: var(--text)
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, #0b0d10 0%, #0d1117 50%, #0b0d10 100%)
}

.topNotifWrap {
  position: relative;
  display: inline-flex;
  align-items: center
}

.topNotifBtn {
  position: relative;
  min-width: 38px;
  padding-left: 10px;
  padding-right: 10px
}

.topNotifBadge {
  position: absolute;
  right: -6px;
  top: -6px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ff5c6c;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, .25)
}

.topNotifPanel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 290px;
  max-width: 360px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
  padding: 10px;
  display: none;
  z-index: 80
}

.topNotifPanel.open {
  display: block
}

.topNotifTitle {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px
}

.topNotifBody {
  display: grid;
  gap: 8px
}

.topNotifItemBtn {
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700
}

.topNotifItemBtn:hover {
  border-color: rgba(55, 201, 113, .35);
  background: rgba(55, 201, 113, .08)
}

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

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  object-fit: cover;
  background: var(--card)
}

.brand .title {
  font-weight: 600;
  letter-spacing: .3px
}

.layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 67px)
}

.nav {
  padding: 12px;
  border-right: 1px solid var(--border);
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: 8px
}

.navSection {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, .02);
  overflow: visible;
  transition: border-color .16s ease, background .16s ease
}

.navSection>summary {
  padding: 10px 12px;
  cursor: pointer;
  user-select: none;
  font-weight: 700;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 12px 12px 0 0
}
.navSection:not([open])>summary {
  border-radius: 12px
}

.navSection>summary::-webkit-details-marker {
  display: none
}

.navSection>summary::after {
  content: "▾";
  font-size: 12px;
  color: var(--muted);
  transition: transform .16s ease
}

.navSection:not([open])>summary::after {
  transform: rotate(-90deg)
}

.navSection>summary:hover {
  background: rgba(255, 255, 255, .03)
}

.navSection[open]>summary {
  border-bottom: 1px solid var(--border)
}

.navSection[open] {
  border-color: rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .015)
}

.navSection:has(.navBtn.active) {
  border-color: rgba(55, 201, 113, .2);
  background: rgba(55, 201, 113, .02)
}

.navSection:has(.navBtn.active) > summary {
  color: var(--accent)
}

.navGroupBody {
  display: grid;
  gap: 8px;
  padding: 8px
}

.navBtn {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  transition: background .15s ease, border-color .15s ease, transform .15s ease
}

.navBtn:hover:not(.active) {
  background: rgba(255, 255, 255, .04);
  border-color: rgba(255, 255, 255, .14)
}

.navBtn.active {
  border-color: rgba(55, 201, 113, .35);
  background: rgba(55, 201, 113, .08)
}

.content {
  padding: 14px;
  background:
    radial-gradient(ellipse 60% 50% at 80% 5%, rgba(55, 201, 113, .03) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 10% 90%, rgba(96, 165, 250, .02) 0%, transparent 70%)
}

.h1 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.3px;
  margin: 0 0 12px
}

.box {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel)
}

.h2 {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.2px;
  margin: 0 0 10px
}

.btn {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(55, 201, 113, .45);
  background: var(--accent);
  color: #06100a;
  font-weight: 800;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .1s ease, box-shadow .15s ease
}

.btn:hover {
  box-shadow: 0 2px 12px rgba(55, 201, 113, .2)
}

.btn:active {
  transform: scale(.97)
}

.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  font-weight: 700
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, .04);
  border-color: rgba(255, 255, 255, .18)
}

.btn.danger {
  background: transparent;
  border: 1px solid rgba(255, 92, 108, .45);
  color: var(--danger)
}

.btn.danger:hover {
  background: rgba(255, 92, 108, .08);
  box-shadow: 0 2px 12px rgba(255, 92, 108, .15)
}

.btn.is-active-filter {
  border-color: rgba(255, 188, 71, .45);
  background: rgba(255, 188, 71, .14);
  color: #ffd89a;
}

.view-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .03);
}

.view-tab {
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
  transition: background .14s ease, border-color .14s ease, color .14s ease, box-shadow .14s ease;
}

.view-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, .04);
}

.view-tab.active {
  color: var(--text);
  background: var(--card);
  border-color: rgba(255, 255, 255, .08);
  box-shadow: inset 0 -2px 0 rgba(55, 201, 113, .65);
}

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

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

.row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  background: var(--card);
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease
}

.row:hover {
  border-left-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .25)
}

.name {
  font-weight: 700
}

.meta {
  color: var(--muted);
  font-size: .92rem;
  margin-top: 4px
}

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

.empty {
  color: var(--muted);
  padding: 12px
}

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

.field {
  margin-bottom: 12px
}

.field label {
  display: block;
  color: var(--muted);
  font-size: .85rem;
  margin: 0 0 6px 2px
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-size: .95rem
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(55, 201, 113, .5)
}

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

.search-input,
.ui-control {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-size: .95rem
}

.search-input::placeholder {
  color: var(--muted)
}

.search-input:focus,
.ui-control:focus {
  outline: none;
  border-color: rgba(55, 201, 113, .5)
}

.ui-control option {
  background: var(--panel);
  color: var(--text)
}

/* ==== ROLES MULTI-SELECT ==== */
.roles-ms-wrap {
  position: relative;
}
.roles-ms-trigger {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  align-items: center;
}
.roles-ms-trigger:focus {
  outline: none;
  border-color: rgba(55, 201, 113, .5);
}
.role-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(55, 201, 113, .15);
  color: var(--accent);
  font-size: .85rem;
  font-weight: 600;
  white-space: nowrap;
}
.role-tag-x {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 1rem;
  padding: 0 2px;
  line-height: 1;
}
.role-tag-x:hover {
  color: var(--danger);
}
.roles-ms-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  max-height: 260px;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-top: 4px;
  padding: 6px 0;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.roles-ms-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: .9rem;
  color: var(--text);
  transition: background .1s;
}
.roles-ms-opt:hover {
  background: rgba(55, 201, 113, .08);
}
.roles-ms-opt input[type="checkbox"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}

/* ==== MATCHING PANEL (slide-in from right) ==== */
.matching-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(480px, 94vw);
  height: 100vh;
  z-index: 9999;
  background: var(--bg);
  border-left: 1px solid var(--border);
  box-shadow: -8px 0 32px rgba(0,0,0,.5);
  display: flex;
  flex-direction: column;
  animation: slideInRight .2s ease-out;
}
@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.matching-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  flex-shrink: 0;
}
.matching-panel-header .h2 {
  font-size: 1rem;
}
.matching-panel-header .js-close {
  font-size: 1.5rem;
  line-height: 1;
  padding: 4px 10px;
}
.matching-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

/* Loading state */
.mp-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 20px;
}
.mp-loading-text {
  color: var(--muted);
  font-size: .9rem;
  text-align: center;
}
.mp-progress-bar {
  width: 100%;
  max-width: 300px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.mp-progress-fill {
  width: 30%;
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  animation: mpProgress 12s ease-in-out forwards;
}
@keyframes mpProgress {
  0%   { width: 5%; }
  20%  { width: 25%; }
  50%  { width: 55%; }
  80%  { width: 80%; }
  100% { width: 95%; }
}
.mp-loading-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mp-step {
  color: var(--border);
  font-size: .8rem;
  padding-left: 20px;
  position: relative;
  transition: color .3s;
}
.mp-step::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--border);
  transition: all .3s;
}
.mp-step.active {
  color: var(--accent);
}
.mp-step.active::before {
  border-color: var(--accent);
  background: var(--accent);
}

/* Request summary pills */
.mp-request-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

/* Squad comparison banner */
.mp-squad-banner {
  padding: 12px 14px;
  background: rgba(55,201,113,.05);
  border: 1px solid rgba(55,201,113,.12);
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: .85rem;
  color: var(--muted);
  line-height: 1.6;
}
.mp-squad-title {
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 4px;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* Results count */
.mp-results-count {
  font-size: .8rem;
  color: var(--muted);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* Match cards — vertical stacked layout */
.mp-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 10px;
}
.mp-card-score {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  min-width: 44px;
  text-align: center;
  padding-top: 2px;
  flex-shrink: 0;
}
.mp-card-body {
  flex: 1;
  min-width: 0;
}
.mp-card-name {
  font-weight: 600;
  color: var(--text);
  font-size: .95rem;
  margin-bottom: 2px;
}
.mp-card-source {
  font-weight: 400;
  color: var(--muted);
  font-size: .8rem;
}
.mp-card-meta {
  font-size: .82rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.mp-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  margin-bottom: 4px;
}
.mp-card-narrative {
  font-size: .8rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 6px;
  line-height: 1.4;
}
.mp-card .btn.js-offer {
  flex-shrink: 0;
  align-self: center;
  font-size: .78rem;
  padding: 6px 12px;
  white-space: nowrap;
}

/* Badge system for matching panel */
.mp-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: .78rem;
  font-weight: 600;
  background: rgba(255,255,255,.06);
  color: var(--muted);
  white-space: nowrap;
}
.mp-badge-bs {
  background: rgba(55,201,113,.12);
  color: var(--accent);
}
.mp-badge-ss {
  background: rgba(55,201,113,.07);
  color: var(--accent);
}
.mp-badge-offered {
  background: rgba(255,92,108,.1);
  color: var(--danger);
}
.mp-badge-expiring {
  background: rgba(55,201,113,.15);
  color: var(--accent);
  font-weight: 700;
}

/* Source badges (Direct / Connected / Young) */
.mp-source-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 4px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
  vertical-align: middle;
  margin-left: 6px;
}
.mp-source-direct {
  background: rgba(55,201,113,.12);
  color: var(--accent);
}
.mp-source-connected {
  background: rgba(100,149,237,.15);
  color: #6495ed;
}
.mp-source-young {
  background: rgba(255,193,7,.12);
  color: #ffc107;
}

/* Player TM link */
.mp-player-link {
  color: var(--accent);
  text-decoration: none;
  font-size: .82rem;
}
.mp-player-link:hover {
  text-decoration: underline;
}

/* Expandable details */
.mp-card-toggle {
  margin-top: 8px;
  font-size: .78rem;
  color: var(--accent);
  cursor: pointer;
  user-select: none;
}
.mp-card-toggle:hover {
  text-decoration: underline;
}
.mp-card-details {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.mp-detail-row {
  font-size: .82rem;
  color: var(--text);
  padding: 3px 0;
  line-height: 1.4;
}
.mp-detail-label {
  color: var(--muted);
  font-weight: 600;
  margin-right: 4px;
}

/* ==== FILTER BAR (Club Requests) ==== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
}
.filter-bar select,
.filter-bar input {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-size: .85rem;
  min-width: 140px;
}
.filter-bar select:focus,
.filter-bar input:focus {
  outline: none;
  border-color: rgba(55, 201, 113, .5);
}
.filter-bar .filter-clear {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: none;
  color: var(--muted);
  font-size: .8rem;
  cursor: pointer;
}
.filter-bar .filter-clear:hover {
  color: var(--text);
  border-color: var(--text);
}

/* ==== MODAL (used by Direct Players) ==== */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
}

.modal.open {
  display: flex;
  animation: modalFadeIn .2s ease;
}

.modal .modal-body {
  width: min(900px, 96vw);
  max-height: 90vh;
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  animation: modalSlideUp .2s ease;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ==== DASHBOARD ==== */
.dashboardRoot {
  display: grid;
  gap: 12px;
}

.dashboardTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
}

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

.dashboardScope {
  font-weight: 800;
  letter-spacing: 0.2px;
}

.dashboardUpdated {
  color: var(--muted);
  font-size: 12px;
}

.dashboardCards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dashboardCard {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--panel), var(--card));
  padding: 12px;
  display: grid;
  gap: 7px;
  transition: border-color .15s ease, transform .15s ease;
}

.dashboardCard:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, .14);
}

.dashboardCard:nth-child(4n+1) { border-top: 2px solid rgba(55, 201, 113, .5); }
.dashboardCard:nth-child(4n+2) { border-top: 2px solid rgba(96, 165, 250, .5); }
.dashboardCard:nth-child(4n+3) { border-top: 2px solid rgba(255, 188, 71, .5); }
.dashboardCard:nth-child(4n+4) { border-top: 2px solid rgba(192, 132, 252, .5); }

.dashboardCardTitle {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  font-weight: 700;
}

.dashboardCardValue {
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
}

.dashboardCardMeta {
  color: var(--muted);
  font-size: 13px;
}

.dashboardActionBtn {
  margin-top: 4px;
  width: fit-content;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(55, 201, 113, .08);
  color: var(--text);
  font-weight: 700;
  padding: 8px 10px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}

.dashboardActionBtn:hover {
  border-color: rgba(55, 201, 113, .35);
  background: rgba(55, 201, 113, .14);
}

.dashboardQuick {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.sa-uncovered-box {
  border: 1px solid rgba(255, 188, 71, .45);
  border-radius: 12px;
  background: rgba(255, 188, 71, .08);
  padding: 10px;
  margin-bottom: 10px;
}

.sa-uncovered-title {
  font-size: 13px;
  font-weight: 800;
  color: #ffd89a;
  margin-bottom: 8px;
}

.sa-uncovered-area {
  margin-bottom: 8px;
}

.sa-uncovered-area:last-child {
  margin-bottom: 0;
}

.sa-uncovered-area-title {
  font-size: 12px;
  color: #f4d8aa;
  margin-bottom: 5px;
}

.sa-uncovered-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sa-uncovered-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 188, 71, .45);
  color: #ffe7c2;
  background: rgba(255, 188, 71, .12);
  font-size: 12px;
  font-weight: 700;
}

.sa-country-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
}

.sa-country-main {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.sa-country-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.sa-country-title {
  line-height: 1.15;
}

.sa-country-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sa-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .02);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.sa-pill-ok {
  border-color: rgba(55, 201, 113, .4);
  color: #9ee8bc;
}

.sa-pill-alert {
  border-color: rgba(255, 188, 71, .55);
  color: #ffd89a;
  background: rgba(255, 188, 71, .12);
}

.sa-country-card.sa-uncovered {
  border-color: rgba(255, 188, 71, .45);
  box-shadow: inset 0 0 0 1px rgba(255, 188, 71, .08);
}

.sa-country-expanded {
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

.sa-sub-header {
  margin: 0 0 6px;
}

.sa-sub-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sa-scout-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .02);
}

.sa-chip-name {
  cursor: pointer;
}

.sa-chip-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sa-country-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  min-width: 132px;
}

.sa-country-actions .btn {
  width: 100%;
}


@media (max-width: 920px) {
  .layout {
    grid-template-columns: 1fr
  }

  .nav {
    flex-direction: column;
    overflow: visible;
    border-right: none;
    border-bottom: 1px solid var(--border)
  }

  .navBtn {
    white-space: nowrap
  }

  .grid {
    grid-template-columns: 1fr
  }

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

  .dashboardTopRight {
    width: 100%;
    justify-content: space-between;
  }

  .dashboardCards {
    grid-template-columns: 1fr;
  }

  .sa-country-card {
    grid-template-columns: 1fr;
    gap: 10px;
  }

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

  .sa-country-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    min-width: 0;
  }

  .sa-country-actions .btn {
    width: auto;
  }

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

/* ====== PRINT — Scout Report ====== */
#sr-print-frame { display: none; }

@media print {
  body > *          { display: none !important; }
  #sr-print-frame   { display: block !important; }

  #sr-print-frame {
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 11pt;
    color: #111;
    background: #fff;
    padding: 24mm 20mm;
    width: 100%;
    box-sizing: border-box;
  }

  .srp-header {
    border-bottom: 2px solid #111;
    padding-bottom: 10px;
    margin-bottom: 16px;
  }
  .srp-title {
    font-size: 9pt;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #555;
    margin-bottom: 4px;
  }
  .srp-name {
    font-size: 20pt;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 4px;
  }
  .srp-meta {
    font-size: 10pt;
    color: #444;
  }
  .srp-section {
    margin-bottom: 14px;
    break-inside: avoid;
  }
  .srp-section-title {
    font-size: 8pt;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #777;
    border-bottom: 1px solid #ccc;
    padding-bottom: 3px;
    margin-bottom: 8px;
  }
  .srp-row {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    margin-bottom: 4px;
  }
  .srp-field {
    display: flex;
    flex-direction: column;
    min-width: 120px;
  }
  .srp-field-label {
    font-size: 7.5pt;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #888;
  }
  .srp-field-value {
    font-size: 10.5pt;
    font-weight: 600;
    color: #111;
  }
  .srp-note {
    font-size: 10.5pt;
    color: #222;
    white-space: pre-wrap;
    line-height: 1.5;
  }
  .srp-footer {
    margin-top: 20px;
    border-top: 1px solid #ccc;
    padding-top: 8px;
    font-size: 8pt;
    color: #999;
    display: flex;
    justify-content: space-between;
  }
}

/* ── Player Stats shared component (scout reports + scouting targets) ── */
.sr-stats-block{border:1px solid var(--border);border-radius:10px;background:var(--card);padding:10px;margin-bottom:10px;}
.sr-stats-block .label{font-size:12px;color:var(--muted);margin-bottom:8px;font-weight:700;}
.sr-stats-row{display:flex;gap:16px;flex-wrap:wrap;align-items:center;}
.sr-stat-item{display:flex;flex-direction:column;align-items:center;min-width:48px;}
.sr-stat-item .sv{font-size:20px;font-weight:800;line-height:1;}
.sr-stat-item .sk{font-size:11px;color:var(--muted);margin-top:2px;text-align:center;}
.sr-rating-badge{display:inline-flex;align-items:center;gap:4px;padding:3px 10px;border-radius:999px;font-weight:800;font-size:14px;white-space:nowrap;}
.sr-rating-badge.green{background:rgba(55,201,113,.18);border:1px solid rgba(55,201,113,.45);color:#aff1bf;}
.sr-rating-badge.yellow{background:rgba(227,179,65,.18);border:1px solid rgba(227,179,65,.45);color:#f5d98c;}
.sr-rating-badge.red{background:rgba(248,81,73,.18);border:1px solid rgba(248,81,73,.45);color:#ffb3b0;}
.sr-stats-skeleton{height:60px;border-radius:8px;background:var(--border);animation:sr-shimmer 1.2s ease-in-out infinite;}
@keyframes sr-shimmer{0%,100%{opacity:.5;}50%{opacity:1;}}
.sr-stats-comp-row{display:flex;align-items:center;gap:10px;margin-bottom:5px;flex-wrap:wrap;}
.sr-stats-comp-row:last-of-type{margin-bottom:0;}
.sr-stats-expanded{display:none;margin-top:10px;padding-top:10px;border-top:1px solid var(--border);}
.sr-stats-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;}
@media(max-width:600px){.sr-stats-grid{grid-template-columns:1fr 1fr;}}
.sr-stats-cat{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin-bottom:6px;}
.sr-stats-det-row{display:flex;gap:10px;flex-wrap:wrap;}

/* ── Status text colors (used inline across modules) ── */
.clr-ok { color: var(--accent); }
.clr-warn { color: #f2cc60; }
.clr-err { color: var(--danger); }
.clr-info { color: #79c0ff; }

/* ── TM / external links ── */
.tm-link, .tm-link:visited { color: var(--accent); font-weight: 700; text-decoration: none; white-space: nowrap; display: inline-block; }
.tm-link:hover { text-decoration: underline; }
.tm-link.candidate, .tm-link.candidate:visited { color: #f2cc60; }

/* ── Status badges (proposals, permissions) ── */
.badge-ok { display:inline-block; padding:2px 8px; border-radius:999px; border:1px solid rgba(55,201,113,.4); background:rgba(55,201,113,.12); color:var(--accent); font-weight:700; font-size:.82em; }
.badge-err { display:inline-block; padding:2px 8px; border-radius:999px; border:1px solid rgba(255,92,108,.4); background:rgba(255,92,108,.12); color:var(--danger); font-weight:700; font-size:.82em; }
.badge-warn { display:inline-block; padding:2px 8px; border-radius:999px; border:1px solid rgba(255,160,50,.4); background:rgba(255,160,50,.12); color:#ffb347; font-weight:700; font-size:.82em; }
.badge-muted { display:inline-block; padding:2px 8px; border-radius:999px; border:1px solid rgba(150,150,150,.3); background:rgba(150,150,150,.08); color:var(--muted); font-weight:700; font-size:.82em; }
.badge-type-agent { display:inline-block; padding:3px 8px; border-radius:999px; border:1px solid rgba(170,90,255,.35); background:rgba(170,90,255,.18); color:rgb(215,185,255); font-weight:600; letter-spacing:.6px; font-size:.82em; }
.badge-type-direct { display:inline-block; padding:3px 8px; border-radius:999px; border:1px solid rgba(80,170,255,.35); background:rgba(80,170,255,.18); color:rgb(185,225,255); font-weight:600; letter-spacing:.6px; font-size:.82em; }
.badge-scope { display:inline-block; padding:3px 8px; border-radius:999px; border:1px solid rgba(255,255,255,.18); background:rgba(255,255,255,.06); color:var(--text); font-weight:700; letter-spacing:.4px; font-size:.82em; }
.tab-count-badge { display:inline-block; margin-left:5px; background:#ffb347; color:#000; border-radius:999px; padding:0 6px; font-size:.75em; font-weight:700; }

/* ── Hover Tooltips ─────────────────────────────────── */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.75em;
  font-weight: 400;
  white-space: normal;
  max-width: 220px;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s ease;
  z-index: 1000;
  line-height: 1.4;
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
}
[data-tooltip]:hover::after { opacity: 1; }
.navBtn[data-tooltip]::after {
  bottom: auto;
  top: 50%;
  left: calc(100% + 10px);
  transform: translateY(-50%);
  text-align: left;
  max-width: 240px;
}

/* ====== Accessibility ====== */
.navBtn:focus-visible,
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
