:root {
  color-scheme: light;
  --font-sans: "Google Sans Flex", "Google Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --navy: #07111f;
  --navy-soft: #10243d;
  --blue: #2563eb;
  --blue-deep: #1d4ed8;
  --blue-soft: #dbeafe;
  --lime: #a3e635;
  --page: #eef3f9;
  --card: #fff;
  --line: #d7e0ea;
  --line-soft: #e9eef4;
  --ink: #0f172a;
  --muted: #64748b;
  --subtle: #8796a8;
  --green: #15803d;
  --green-soft: #dcfce7;
  --shadow: 0 10px 28px rgba(15, 23, 42, .065);
  font-family: var(--font-sans);
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--page); color: var(--ink); font-family: var(--font-sans); }
body { margin: 0; min-height: 100vh; background: linear-gradient(135deg,#f7f9fc 0%,#e9f1fa 100%); line-height: 1.45; font-family: var(--font-sans); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
option { color: var(--ink); background: #fff; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.site-header { position: sticky; top: 0; z-index: 20; color: #f7faff; background: rgba(8, 20, 38, .97); border-bottom: 1px solid rgba(255,255,255,.09); box-shadow: 0 5px 18px rgba(5,14,27,.14); backdrop-filter: blur(16px); }
.header-inner { width: min(1500px, calc(100% - 48px)); min-height: 72px; margin: auto; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; color: white; font: 800 15px/1.05 var(--font-sans); letter-spacing: -.035em; }
.brand > span:last-child { display: grid; gap: 3px; }
.brand-light { color: #aab9cb; font-size: 11px; font-weight: 600; letter-spacing: .035em; }
.brand-mark { display: grid; width: 37px; height: 37px; place-items: center; border: 1px solid rgba(228,255,184,.62); border-radius: 11px; color: #132413; background: linear-gradient(145deg,#d7f7a5,#9bcf4e); box-shadow: 0 4px 13px rgba(169,223,94,.18); font: 900 18px/1 var(--font-sans); }
.primary-nav { display: flex; align-items: center; gap: 5px; flex: 1; }
.nav-link { padding: 10px 13px; border: 0; border-radius: 9px; color: #b8c6d6; background: transparent; font-size: 12px; font-weight: 700; white-space: nowrap; transition: color .15s, background .15s; }
.nav-link:hover { color: white; background: rgba(255,255,255,.08); }
.nav-link.active { color: #16233a; background: var(--lime); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.user-chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid rgba(255,255,255,.13); border-radius: 999px; color: #d4deea; font-size: 11px; font-weight: 650; white-space: nowrap; }
.user-dot, .live-dot, .security-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: #91d65d; box-shadow: 0 0 0 3px rgba(145,214,93,.14); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 9px 13px; border: 1px solid transparent; border-radius: 9px; font-size: 12px; font-weight: 750; transition: background .16s, border-color .16s, transform .16s, box-shadow .16s; }
.btn:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid rgba(50,110,218,.35); outline-offset: 2px; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { cursor: wait; opacity: .55; transform: none; }
.btn-header { min-height: 34px; padding: 7px 10px; border-color: rgba(255,255,255,.16); color: #e5edf6; background: rgba(255,255,255,.04); font-size: 11px; }
.btn-header:hover { border-color: rgba(255,255,255,.4); background: rgba(255,255,255,.1); }
.btn-primary { color: white; background: var(--blue); box-shadow: 0 5px 12px rgba(40,99,207,.16); }
.btn-primary:hover { background: var(--blue-deep); }
.btn-outline { color: #33485f; border-color: var(--line); background: white; }
.btn-outline:hover { border-color: #b9c8d8; background: #f8fafc; }
.mobile-menu { display: none; width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.18); border-radius: 9px; color: white; background: transparent; }
.main-shell { width: min(1500px, calc(100% - 48px)); margin: 0 auto; padding: 27px 0 44px; }
.welcome-band { display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 156px; padding: 27px 31px; border: 1px solid #203a5b; border-radius: 18px; color: white; background: radial-gradient(550px 220px at 80% 0%, rgba(55,100,149,.3), transparent 70%), linear-gradient(120deg,#10223a,#0b182b 72%); box-shadow: 0 14px 32px rgba(14,37,67,.11); }
.eyebrow { color: #54739a; font-size: 9px; font-weight: 850; letter-spacing: .145em; text-transform: uppercase; }
.eyebrow-light { color: #b9df7b; }
.welcome-band h1 { margin: 7px 0 5px; color: white; font: 800 clamp(25px,3vw,34px)/1.12 var(--font-sans); letter-spacing: -.045em; }
.welcome-band p { margin: 0; max-width: 730px; color: #b8c7d8; font-size: 13px; }
.scan-badge { display: flex; align-items: center; gap: 11px; min-width: 205px; padding: 12px 14px; border: 1px solid rgba(255,255,255,.12); border-radius: 11px; background: rgba(255,255,255,.05); }
.scan-badge > span:last-child { display: grid; gap: 3px; }
.scan-badge strong { color: #eef4fa; font-size: 11px; }
.scan-badge small { max-width: 190px; color: #a7b7ca; font-size: 10px; line-height: 1.35; }
.overview-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; margin: 15px 0 19px; }
.overview-card { display: flex; align-items: center; gap: 13px; min-width: 0; min-height: 83px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 13px; background: var(--card); box-shadow: var(--shadow); }
.overview-icon { flex: 0 0 auto; display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; font-size: 17px; font-weight: 800; }
.icon-players { color: #3267c0; background: #eaf1ff; }.icon-alliance { color: #9c6a13; background: #fff4df; }.icon-states { color: #7659b5; background: #f0ebff; }.icon-private { color: #117553; background: #e6f5ee; }
.metric-label { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .015em; }
.metric-value { margin-top: 2px; color: var(--ink); font: 800 20px/1.15 var(--font-sans); font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.metric-value.small-value { font-size: 16px; }.metric-help { margin-top: 1px; color: var(--subtle); font-size: 9px; }
.directory-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--card); box-shadow: var(--shadow); }
.filter-bar { padding: 18px 19px 16px; border-bottom: 1px solid var(--line-soft); }
.filter-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 15px; }
.filter-heading h2 { margin: 3px 0 0; color: var(--ink); font: 800 19px/1.2 var(--font-sans); letter-spacing: -.035em; }
.btn-refresh { min-height: 34px; padding: 7px 10px; }
.btn-refresh > span:first-child { font-size: 16px; line-height: .8; }
.filters { display: grid; grid-template-columns: minmax(145px,.9fr) minmax(120px,.72fr) minmax(150px,.95fr) minmax(190px,1.35fr); align-items: end; gap: 10px; }
.filters.filter-three { grid-template-columns: minmax(165px,.9fr) minmax(135px,.72fr) minmax(240px,1.35fr); }
.filter-field { display: grid; min-width: 0; gap: 5px; }
.filter-field label, .field-label { color: #5d6f84; font-size: 10px; font-weight: 750; }
.select, .input, .search-wrap { width: 100%; min-width: 0; height: 38px; border: 1px solid #cfd9e4; border-radius: 8px; color: #24384e; background: white; outline: none; font-size: 11px; }
.select, .input { padding: 0 10px; }
.select { color-scheme: light; cursor: pointer; }
.input:focus, .select:focus, .search-wrap:focus-within { border-color: #74a0e4; box-shadow: 0 0 0 3px rgba(47,103,200,.11); }
.input-small { max-width: 140px; }
.search-wrap { display: flex; align-items: center; gap: 8px; padding: 0 10px; color: #8596a8; }
.search-wrap span { font-size: 19px; line-height: 1; transform: rotate(-15deg); }
.search-wrap input { width: 100%; min-width: 0; height: 34px; padding: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 11px; }
.search-wrap input::placeholder, .input::placeholder { color: #95a2b2; }
.table-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 54px; padding: 9px 19px; border-bottom: 1px solid var(--line-soft); }
.result-summary { color: var(--muted); font-size: 10px; }
.result-summary strong { color: var(--ink); font-weight: 800; }
.btn-export { min-height: 32px; padding: 6px 9px; font-size: 10px; white-space: nowrap; }
.results-area { min-height: 160px; }
.table-scroll { width: 100%; overflow: hidden; }
.data-table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.data-table th { padding: 10px 8px; border-bottom: 1px solid var(--line); color: #687b92; background: #f8fafc; font-size: 9px; font-weight: 800; letter-spacing: .045em; text-align: left; text-transform: uppercase; }
.data-table td { padding: 10px 8px; border-bottom: 1px solid #e9eef3; color: #253950; font-size: 11px; line-height: 1.35; vertical-align: middle; }
.data-table tbody tr.summary-row { transition: background .13s; }
.data-table tbody tr.summary-row:hover td { background: #f8fbff; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table th.num { text-align: right; }
.sort-button { display: inline-flex; align-items: center; justify-content: flex-end; gap: 3px; width: 100%; padding: 0; border: 0; color: inherit; background: transparent; font: inherit; letter-spacing: inherit; text-align: inherit; text-transform: inherit; }
.sort-button span { color: #8ea3b8; font-size: 12px; }
.data-table th:not(.num) .sort-button { justify-content: flex-start; }
.alliance-table th:nth-child(1) { width: 4.4%; }.alliance-table th:nth-child(2) { width: 18%; }.alliance-table th:nth-child(3) { width: 7%; }.alliance-table th:nth-child(4),.alliance-table th:nth-child(5),.alliance-table th:nth-child(6),.alliance-table th:nth-child(7),.alliance-table th:nth-child(8),.alliance-table th:nth-child(9) { width: 10.1%; }.alliance-table th:nth-child(10) { width: 4%; }
.state-table th:nth-child(1) { width: 4%; }.state-table th:nth-child(2) { width: 17%; }.state-table th:nth-child(3) { width: 8%; }.state-table th:nth-child(4),.state-table th:nth-child(5),.state-table th:nth-child(6),.state-table th:nth-child(7),.state-table th:nth-child(8),.state-table th:nth-child(9) { width: 9.7%; }.state-table th:nth-child(10) { width: 8%; }.state-table th:nth-child(11) { width: 4%; }
.player-table th:nth-child(1) { width: 4.5%; }.player-table th:nth-child(2) { width: 18%; }.player-table th:nth-child(3) { width: 7%; }.player-table th:nth-child(4) { width: 15%; }.player-table th:nth-child(5),.player-table th:nth-child(6),.player-table th:nth-child(7),.player-table th:nth-child(8) { width: 11%; }.player-table th:nth-child(9) { width: 4%; }
.rank-number { display: inline-grid; min-width: 22px; height: 22px; place-items: center; border-radius: 7px; color: #60748c; background: #f0f4f8; font-size: 10px; font-weight: 800; }
.entity-cell { display: flex; align-items: center; gap: 9px; min-width: 0; }
.entity-copy { display: grid; min-width: 0; gap: 2px; }
.entity-copy strong { overflow: hidden; color: #1e3047; font-size: 11px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.entity-copy small { overflow: hidden; color: #8392a4; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.dot-separator { color: #9eacbb; }
.cell-secondary { color: #91a0b0; font-size: 9px; }
.row-action { text-align: center !important; }
.icon-button { display: inline-grid; width: 25px; height: 25px; place-items: center; border: 1px solid #d4dfeb; border-radius: 7px; color: #41618a; background: white; font-size: 17px; line-height: 1; }
.icon-button:hover { border-color: #96b4df; color: #204fa9; background: #f2f7ff; }
.expanded-row td { padding: 0 16px 14px !important; border-bottom: 1px solid var(--line-soft) !important; background: #f8fafc; }
.detail-card { padding: 15px; border: 1px solid #dfe7f0; border-radius: 11px; background: white; }
.detail-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-bottom: 12px; }
.detail-card-head h3, .state-detail-heading h3 { margin: 3px 0 2px; color: var(--ink); font: 800 14px/1.2 var(--font-sans); }
.detail-card-head p, .state-detail-heading p { margin: 0; color: var(--muted); font-size: 10px; }
.tag-pill { display: inline-flex; align-items: center; min-height: 23px; padding: 4px 8px; border: 1px solid #dce7f4; border-radius: 999px; color: #3d5d84; background: #f2f6fb; font-size: 9px; font-weight: 800; }
.detail-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; }
.detail-metric { display: grid; min-width: 0; gap: 4px; padding: 8px 9px; border: 1px solid #edf1f5; border-radius: 8px; background: #fbfcfd; }
.detail-metric span { overflow: hidden; color: #78899c; font-size: 8px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.detail-metric strong { overflow: hidden; color: #233a56; font-size: 12px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.detail-metric small { color: #99a6b4; font-size: 8px; }
.state-detail { padding: 12px 0 3px; }
.state-detail-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin: 0 1px 11px; }
.state-alliance-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.state-alliance-card { min-width: 0; padding: 10px; border: 1px solid #dfe7ef; border-radius: 9px; background: white; }
.state-alliance-title { display: flex; align-items: center; gap: 8px; min-width: 0; margin-bottom: 9px; }
.state-rank { flex: 0 0 auto; display: grid; width: 23px; height: 23px; place-items: center; border-radius: 7px; color: #325fa4; background: #eaf1fc; font-size: 9px; font-weight: 850; }
.member-count { flex: 0 0 auto; margin-left: auto; color: #8695a7; font-size: 8px; white-space: nowrap; }
.state-alliance-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
.profile-uid { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding-top: 9px; border-top: 1px solid #edf1f5; color: #8191a4; font-size: 9px; }
.profile-uid code { color: #50657c; font-family: inherit; font-size: 9px; overflow-wrap: anywhere; }
.empty-state, .loading-state { display: grid; justify-items: center; align-content: center; min-height: 220px; padding: 28px; color: var(--muted); text-align: center; }
.empty-state h3 { margin: 10px 0 3px; color: var(--ink); font: 750 15px var(--font-sans); }
.empty-state p { max-width: 430px; margin: 0; font-size: 11px; }
.empty-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; color: #4971a6; background: #edf3fb; font-size: 22px; font-weight: 800; }
.loading-state { display: flex; gap: 10px; font-size: 11px; }
.spinner { width: 17px; height: 17px; border: 2px solid #dce6f2; border-top-color: var(--blue); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.panel-foot { display: flex; justify-content: space-between; gap: 14px; padding: 11px 19px; border-top: 1px solid var(--line-soft); color: #8796a8; background: #fafbfd; font-size: 9px; }
.site-footer { display: flex; justify-content: space-between; gap: 12px; padding: 16px 2px 0; color: #8795a6; font-size: 9px; }

/* Sign-in */
.login-screen { display: grid; min-height: 100vh; place-items: center; padding: 28px; background: radial-gradient(700px 400px at 50% 0%,#1b3452,transparent 70%),linear-gradient(140deg,#081426,#0d1c31); }
.login-card { width: min(100%,420px); padding: 29px; border: 1px solid rgba(255,255,255,.12); border-radius: 17px; color: white; background: linear-gradient(145deg,rgba(22,42,67,.97),rgba(13,27,45,.98)); box-shadow: 0 25px 70px rgba(0,0,0,.3); }
.brand-login { margin-bottom: 30px; }
.login-card .eyebrow { color: #b9df7b; }
.login-card h1 { margin: 8px 0 5px; font: 800 26px var(--font-sans); letter-spacing: -.04em; }
.login-card .intro { margin: 0 0 22px; color: #b9c7d8; font-size: 12px; line-height: 1.55; }
.login-form { display: grid; gap: 8px; }
.login-form .field-label { color: #d5e0ec; }
.login-form .input { height: 43px; border-color: #405571; color: white; background: #0c1a2b; }
.login-form .input::placeholder { color: #71849c; }
.login-form .input:focus { border-color: #83aee8; box-shadow: 0 0 0 3px rgba(70,131,216,.18); }
.btn-wide { width: 100%; min-height: 43px; margin-top: 6px; }
.form-message { min-height: 20px; margin-top: 8px; color: #aec0d4; font-size: 11px; }
.form-message.error-message { color: #ffb7b7; }
.login-foot { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 15px; border-top: 1px solid rgba(255,255,255,.1); color: #93a5ba; font-size: 9px; }
.security-dot { width: 6px; height: 6px; background: #8ed15a; box-shadow: none; }

/* Separate administrator console */
.admin-main { width: min(1330px,calc(100% - 48px)); margin: auto; padding: 28px 0 50px; }
.admin-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; margin-bottom: 19px; }
.admin-heading h1 { margin: 4px 0 4px; color: var(--ink); font: 800 clamp(26px,3vw,34px)/1.1 var(--font-sans); letter-spacing: -.045em; }
.admin-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.admin-main .overview-grid { margin-top: 16px; }
.admin-layout { display: grid; grid-template-columns: 225px minmax(0,1fr); gap: 17px; align-items: start; }
.admin-sidebar { position: sticky; top: 91px; display: grid; gap: 4px; padding: 10px; border: 1px solid var(--line); border-radius: 13px; background: white; box-shadow: var(--shadow); }
.admin-sidebar-title { padding: 8px 10px 11px; border-bottom: 1px solid var(--line-soft); color: #8493a5; font-size: 9px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.admin-tab { display: flex; align-items: center; gap: 9px; padding: 11px 10px; border: 0; border-radius: 8px; color: #53677e; background: transparent; font-size: 11px; font-weight: 750; text-align: left; }
.admin-tab span { width: 19px; color: #8293a6; text-align: center; font-size: 14px; }
.admin-tab:hover { background: #f5f8fc; color: #2f527f; }
.admin-tab.active { color: #244f96; background: #eaf1ff; }
.admin-tab.active span { color: #3064bd; }
.admin-content { min-width: 0; }
.admin-card { padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: white; box-shadow: var(--shadow); }
.admin-card + .admin-card { margin-top: 14px; }
.admin-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 15px; }
.admin-card-head h2 { margin: 0; color: var(--ink); font: 800 16px var(--font-sans); letter-spacing: -.025em; }
.admin-card-head p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.admin-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 14px; }
.admin-subcard { min-width: 0; padding: 15px; border: 1px solid var(--line-soft); border-radius: 11px; background: #fbfcfe; }
.admin-subcard h3 { margin: 0; color: #263a52; font: 750 13px var(--font-sans); }
.admin-subcard > p { margin: 4px 0 13px; color: var(--muted); font-size: 10px; }
.admin-search { display: flex; gap: 7px; }
.admin-search .input { flex: 1; }
.admin-results, .admin-access-list { display: grid; gap: 7px; max-height: 400px; margin-top: 11px; overflow: auto; }
.admin-result, .admin-access-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-width: 0; padding: 10px; border: 1px solid #e5ebf2; border-radius: 9px; background: white; }
.admin-player-info { display: grid; min-width: 0; gap: 3px; }
.admin-player-info strong { overflow: hidden; color: #24384f; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.admin-player-info span { overflow: hidden; color: #7b8b9e; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.admin-player-info code { color: #8191a3; font-family: inherit; font-size: 8px; overflow-wrap: anywhere; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-height: 21px; padding: 4px 7px; border-radius: 999px; font-size: 8px; font-weight: 800; white-space: nowrap; }
.badge-approved { color: #14724f; background: #e7f6ee; }
.btn-danger { color: #a53b43; border-color: #f0d3d5; background: #fff8f8; }
.btn-danger:hover { border-color: #e5aeb3; background: #fff0f1; }
.admin-status { min-height: 18px; margin-top: 9px; color: var(--muted); font-size: 10px; }
.admin-status.error-message { color: #b33c42; }
.access-empty { padding: 17px 8px; color: #8796a8; font-size: 10px; text-align: center; }
.upload-drop { display: grid; justify-items: center; gap: 7px; padding: 24px 18px; border: 1px dashed #b5c5d7; border-radius: 11px; background: #f8fafd; text-align: center; }
.upload-icon { display: grid; width: 37px; height: 37px; place-items: center; border-radius: 11px; color: #2d60ad; background: #eaf1ff; font-size: 18px; }
.upload-drop strong { color: #2a3f58; font-size: 11px; }
.upload-drop small { color: #8392a4; font-size: 9px; }
.upload-actions { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.upload-actions input[type=file] { max-width: 100%; color: #607187; font-size: 9px; }
.upload-actions input::file-selector-button { margin-right: 8px; padding: 7px 9px; border: 1px solid #d6e0eb; border-radius: 7px; color: #435970; background: white; font: inherit; cursor: pointer; }
.progress-track { height: 7px; margin-top: 12px; overflow: hidden; border-radius: 999px; background: #e8eef5; }
.progress-track > span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#3a7ce0,#84bd57); transition: width .16s; }
.admin-footnote { margin: 11px 1px 0; color: #8594a6; font-size: 9px; line-height: 1.5; }
.scan-summary { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px; border: 1px solid #e5ebf2; border-radius: 9px; background: #fbfcfe; }
.scan-summary .overview-icon { width: 32px; height: 32px; }
.scan-summary > div { display: grid; gap: 2px; }
.scan-summary strong { color: #324960; font-size: 10px; }
.scan-summary span { color: #8191a3; font-size: 9px; }
.admin-gate { margin-top: 11vh; }
.admin-link-back { color: #bcd0e7; font-size: 10px; font-weight: 700; }

@media (max-width: 1180px) {
  .data-table thead { display: none; }
  .data-table, .data-table tbody { display: block; width: 100%; }
  .data-table tbody { padding: 9px; }
  .data-table tbody tr.summary-row { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); overflow: hidden; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 10px; background: white; }
  .data-table tbody tr.summary-row:last-child { margin-bottom: 0; }
  .data-table tbody tr.summary-row td { display: flex; align-items: flex-start; flex-direction: column; min-width: 0; padding: 8px; border: 0; text-align: left; white-space: normal; }
  .data-table tbody tr.summary-row td::before { margin-bottom: 4px; color: #8594a6; content: attr(data-label); font-size: 8px; font-weight: 800; letter-spacing: .035em; text-transform: uppercase; }
  .data-table tbody tr.summary-row td:first-child { grid-column: span 1; }
  .data-table tbody tr.summary-row td:nth-child(2) { grid-column: span 2; }
  .data-table tbody tr.summary-row td.row-action { grid-column: span 1; align-items: flex-end; }
  .data-table tbody tr.summary-row td.row-action::before { content: "Details"; }
  .data-table tbody tr.summary-row td.num { text-align: left; }
  .data-table tbody tr.summary-row td.num::before { text-align: left; }
  .data-table tbody tr.expanded-row { display: block; margin: -7px 0 10px; border: 0; }
  .data-table tbody tr.expanded-row td { display: block; padding: 0 0 2px !important; border: 0 !important; background: transparent; }
  .panel-foot { align-items: flex-start; flex-direction: column; gap: 4px; }
}
@media (max-width: 860px) {
  .header-inner { width: min(100% - 28px,1500px); min-height: 64px; gap: 12px; }
  .header-actions { margin-left: auto; }
  .primary-nav { display: none; position: absolute; top: 64px; right: 14px; left: 14px; flex-direction: column; align-items: stretch; padding: 7px; border: 1px solid rgba(255,255,255,.12); border-radius: 11px; background: #10223a; box-shadow: 0 14px 30px rgba(0,0,0,.25); }
  .primary-nav.nav-open { display: flex; }
  .nav-link { text-align: left; }
  .mobile-menu { display: inline-grid; place-items: center; }
  .main-shell { width: min(100% - 28px,1500px); padding-top: 17px; }
  .welcome-band { align-items: flex-start; flex-direction: column; padding: 22px; }
  .scan-badge { min-width: 0; }
  .overview-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .filters.filter-three { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .search-field { grid-column: span 2; }
  .admin-main { width: min(100% - 28px,1330px); padding-top: 19px; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .admin-sidebar-title { grid-column: span 2; }
}
@media (max-width: 600px) {
  .header-inner { width: calc(100% - 22px); }
  .brand { gap: 7px; font-size: 12px; }
  .brand-mark { width: 32px; height: 32px; font-size: 16px; }
  .brand-light { font-size: 9px; }
  .user-chip { display: none; }
  .header-actions { gap: 5px; }
  .btn-header { min-height: 31px; padding: 6px 8px; font-size: 9px; }
  .main-shell { width: calc(100% - 20px); padding-top: 11px; }
  .welcome-band { min-height: 0; gap: 16px; padding: 19px 17px; border-radius: 13px; }
  .welcome-band p { font-size: 11px; }
  .overview-grid { gap: 7px; margin: 9px 0 11px; }
  .overview-card { min-height: 70px; gap: 8px; padding: 10px; border-radius: 10px; }
  .overview-icon { width: 31px; height: 31px; border-radius: 9px; font-size: 14px; }
  .metric-label { font-size: 8px; }
  .metric-value { font-size: 16px; }
  .metric-value.small-value { font-size: 13px; }
  .directory-panel { border-radius: 11px; }
  .filter-bar { padding: 13px 12px; }
  .filter-heading { margin-bottom: 12px; }
  .filter-heading h2 { font-size: 16px; }
  .refresh-text { display: none; }
  .filters { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .filters.filter-three { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .search-field { grid-column: span 2; }
  .filter-field label { font-size: 9px; }
  .select, .input, .search-wrap { height: 36px; font-size: 10px; }
  .table-toolbar { align-items: flex-start; padding: 9px 12px; }
  .result-summary { line-height: 1.5; }
  .btn-export { min-height: 29px; padding: 5px 7px; font-size: 9px; }
  .data-table tbody { padding: 7px; }
  .data-table tbody tr.summary-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .data-table tbody tr.summary-row td { padding: 7px; }
  .data-table tbody tr.summary-row td:nth-child(2) { grid-column: span 1; }
  .data-table tbody tr.summary-row td:nth-child(3) { grid-column: span 1; }
  .data-table tbody tr.summary-row td:nth-child(4) { grid-column: span 2; }
  .data-table tbody tr.summary-row td.row-action { grid-column: span 2; flex-direction: row; align-items: center; justify-content: space-between; border-top: 1px solid #edf1f5; }
  .data-table tbody tr.summary-row td.row-action::before { margin: 0; }
  .entity-copy strong { font-size: 10px; }
  .state-alliance-list { grid-template-columns: 1fr; }
  .detail-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .state-alliance-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .detail-card { padding: 11px; }
  .detail-card-head { padding-bottom: 9px; }
  .panel-foot { padding: 9px 12px; font-size: 8px; }
  .site-footer { font-size: 8px; }
  .admin-heading { align-items: flex-start; flex-direction: column; }
  .admin-sidebar { grid-template-columns: 1fr 1fr; }
  .admin-grid { grid-template-columns: 1fr; }
  .admin-card { padding: 13px; }
  .admin-subcard { padding: 12px; }
  .admin-main { width: calc(100% - 20px); }
  .login-screen { padding: 15px; }
  .login-card { padding: 23px; }
}

/* Compact directory presentation, aligned with the migration platform. */
body, button, input, select, textarea, option { font-family: var(--font-sans); }
.site-header { background: #07111f; box-shadow: 0 2px 12px rgba(7,17,31,.12); backdrop-filter: none; }
.header-inner { width: min(1440px,calc(100% - 44px)); min-height: 68px; gap: 22px; }
.brand-mark { width: 40px; height: 40px; border-radius: 10px; }
.nav-link { font-size: 13px; }
.nav-link.active { color: #efffd5; background: rgba(163,230,53,.14); box-shadow: inset 0 0 0 1px rgba(163,230,53,.22); }
.header-actions .btn:hover, .btn:hover { transform: none; }
.main-shell { width: min(1440px,calc(100% - 44px)); padding: 22px 0 44px; }
.welcome-band { min-height: 0; padding: 8px 2px 18px; border: 0; border-radius: 0; color: var(--ink); background: transparent; box-shadow: none; }
.eyebrow-light { color: #4d7c0f; }
.welcome-band h1 { margin: 5px 0 4px; color: var(--ink); font-size: clamp(26px,3vw,32px); letter-spacing: -.04em; }
.welcome-band p { color: var(--muted); font-size: 13px; }
.scan-badge { min-width: 210px; border-color: var(--line); color: var(--ink); background: #fff; }
.scan-badge strong { color: #26384e; }
.scan-badge small { color: var(--muted); }
.overview-grid { gap: 11px; margin: 0 0 15px; }
.overview-card { min-height: 72px; padding: 13px 15px; border-radius: 12px; box-shadow: none; }
.overview-icon { width: 34px; height: 34px; border-radius: 10px; }
.metric-label { font-size: 10px; }
.metric-value { font-size: 19px; }
.metric-value.small-value { font-size: 15px; }
.metric-help { font-size: 9px; }
.directory-panel { border-radius: 12px; box-shadow: 0 5px 18px rgba(15,23,42,.035); }
.filter-bar { padding: 15px 17px 14px; }
.filter-heading { margin-bottom: 12px; }
.filter-heading h2 { font-size: 17px; }
.filters { gap: 9px; }
.filter-field { gap: 4px; }
.filter-field label { color: #64748b; font-size: 10px; }
.select, .input, .search-wrap { height: 39px; border-color: #cbd5e1; border-radius: 9px; font-size: 11px; }
.table-toolbar { min-height: 49px; padding: 8px 17px; background: #fbfcfe; }
.result-summary { font-size: 10.5px; }
.data-table th { padding: 10px 8px; color: #607187; background: #f6f9fd; font-size: 9px; }
.data-table td { padding: 10px 8px; font-size: 11px; }
.data-table tbody tr.summary-row:hover td { background: #f7faff; }
.panel-foot { background: #fbfcfe; }
.site-footer { padding-top: 13px; }
.login-screen { background: radial-gradient(700px 400px at 50% 0%,#1b3452,transparent 70%),linear-gradient(140deg,#07111f,#10243d); }
.login-card { border-radius: 16px; box-shadow: 0 18px 48px rgba(0,0,0,.24); }
.admin-main { width: min(1440px,calc(100% - 44px)); }
.admin-card, .admin-sidebar { box-shadow: none; }
.admin-main .overview-grid { margin: 0 0 17px; }
.btn { transition: background .14s,border-color .14s,color .14s,box-shadow .14s; }

@media (max-width: 1180px) {
  .table-scroll { overflow: hidden; }
  .data-table tbody tr.summary-row { border-color: #d7e0ea; }
}
@media (max-width: 860px) {
  .header-inner { width: min(100% - 28px,1440px); min-height: 64px; }
  .main-shell { width: min(100% - 28px,1440px); padding-top: 16px; }
  .welcome-band { flex-direction: row; align-items: center; }
  .overview-grid { margin-top: 0; }
  .admin-main { width: min(100% - 28px,1440px); }
}
@media (max-width: 600px) {
  .header-inner { width: calc(100% - 22px); }
  .main-shell { width: calc(100% - 20px); padding-top: 12px; }
  .welcome-band { align-items: flex-start; flex-direction: column; gap: 12px; padding: 5px 1px 13px; }
  .welcome-band p { font-size: 11px; }
  .scan-badge { min-width: 0; padding: 9px 11px; }
  .overview-grid { gap: 7px; margin-bottom: 10px; }
  .overview-card { min-height: 64px; padding: 9px; }
  .overview-icon { width: 29px; height: 29px; }
  .metric-label { font-size: 8px; }
  .metric-value { font-size: 16px; }
  .metric-value.small-value { font-size: 13px; }
  .metric-help { font-size: 8px; }
  .filter-bar { padding: 12px; }
  .table-toolbar { padding: 8px 11px; }
  .admin-main { width: calc(100% - 20px); }
}

/* Player tier labels and count chips. */
.entity-cell { align-items: flex-start; gap: 0; }
.entity-cell > .entity-copy { width: 100%; }
.tier-pill, .tier-count { display: inline-flex; align-items: center; justify-content: center; gap: 4px; width: max-content; border: 1px solid transparent; border-radius: 999px; font-size: 8px; font-weight: 800; line-height: 1.2; white-space: nowrap; }
.tier-pill { min-height: 19px; margin-top: 3px; padding: 3px 7px; }
.tier-counts { display: flex; align-items: center; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.tier-count { min-height: 17px; padding: 2px 5px; font-size: 7.5px; }
.tier-count strong { font-size: 8px; }
.tier-elite { color: #815700; border-color: #f1d794; background: #fff4d6; }
.tier-advanced { color: #6843a9; border-color: #d8c8f3; background: #f2eafe; }
.tier-medium { color: #2859a6; border-color: #c8dcfa; background: #e8f1ff; }
.tier-regular { color: #5b6675; border-color: #d9dfe6; background: #edf0f4; }
.tier-unrated { color: #68756f; border-color: #d7dfda; background: #f1f4f1; }
.state-alliance-card .tier-counts { margin: -2px 0 9px; }
.state-alliance-title .entity-copy { flex: 1; }
.tier-settings-form { display: grid; gap: 15px; }
.tier-settings-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }
.tier-setting { display: grid; gap: 7px; color: #53677e; font-size: 11px; font-weight: 750; }
.tier-setting-input { position: relative; display: block; }
.tier-setting-input .input { padding-right: 37px; }
.tier-setting-input b { position: absolute; top: 50%; right: 12px; color: #8291a3; font-size: 11px; transform: translateY(-50%); }
.tier-band-preview { padding: 11px 12px; border: 1px solid #dce7f4; border-radius: 9px; color: #425971; background: #f6f9fd; font-size: 11px; font-weight: 700; line-height: 1.6; }
.tier-band-preview.invalid { color: #a43c42; border-color: #f0d3d5; background: #fff7f7; }
.tier-settings-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.tier-settings-actions .admin-status { margin: 0; }

@media (max-width: 860px) {
  .admin-sidebar { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .admin-sidebar-title { grid-column: span 3; }
}
@media (max-width: 600px) {
  .tier-settings-grid { grid-template-columns: 1fr; gap: 10px; }
  .admin-sidebar { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 3px; }
  .admin-sidebar-title { grid-column: span 3; }
  .admin-tab { flex-direction: column; justify-content: center; gap: 3px; padding: 8px 4px; font-size: 9px; text-align: center; }
  .admin-tab span { width: auto; }
}
