/* Shared NTDB layout: original Verdana, white pages, grey framing and NT colours. */
:root { --text: #333; --muted: #555; --line: #d5d5d5; --grey: #e1e1e1; --panel: #f6f6f6; --selected: #d7e3bc; --accent: #53752f; }
* { box-sizing: border-box; font-size: inherit; }
body { margin: 8px; background: #fff; color: var(--text); font: 12px/1.4 Verdana, Arial, Helvetica, sans-serif; }
main { width: 90%; margin: 0 auto 24px; }
a { color: #3f5133; text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; color: #24331a; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1 { margin: 0; font-size: 16px; color: var(--text); }
h2 { margin: 12px 0 6px; font-size: 14px; }
h3, h4 { margin: 10px 0 6px; padding: 0; font-size: 13px; }
h3 a, h4 a { font-size: inherit; }
p { margin: 7px 0; }
.site-header, .site-footer { background: var(--grey); padding: 6px 10px; }
.site-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.site-header a { display: inline-block; padding: 4px 1px; }
.site-header .header-logout { display: inline; margin: 0; }
.site-header .header-logout button { color: #3f5133; background: transparent; border: 0; padding: 4px 1px; min-height: 0; line-height: inherit; }
.site-header .header-logout button:hover, .site-header .header-logout button:focus-visible { color: #24331a; text-decoration: underline; }
nav { line-height: 1.5; }
.site-footer { padding: 8px; text-align: center; color: var(--muted); font-size: 11px; }
.title-bar { border: 1px solid var(--line); padding: 8px 10px; }
.page-content { padding: 10px; border: 1px solid var(--line); border-top: 0; min-width: 0; overflow-wrap: anywhere; }
.language-switch { margin-left: auto; white-space: nowrap; }
.language-switch [aria-current=true] { font-weight: bold; text-decoration: underline; }
.header-login { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0; }
.header-login label { margin: 0; }
.header-login input { width: 95px; }
label { display: inline-block; margin: 3px 8px 3px 0; }
input, select, button, textarea { font: inherit; color: var(--text); max-width: 100%; border: 1px solid #999; border-radius: 0; padding: 3px 4px; background: #fff; }
input:not([type=hidden]) { min-height: 24px; }
select, button { min-height: 28px; }
button, .button-link { cursor: pointer; background: #e9e9e9; border: 1px solid #999; padding: 5px 8px; color: var(--text); }
.button-link { display: inline-block; min-height: 28px; }
button:hover, .button-link:hover { background: #dedede; }
input[type=number] { width: 68px; }
input[type=checkbox], input[type=radio] { min-height: 0; }
textarea { display: block; width: min(100%, 800px); resize: vertical; }
label:has(> textarea) { display: block; }
fieldset { min-width: 0; margin: 8px 0; padding: 8px; border: 1px solid var(--line); }
legend { font-weight: bold; }
summary { cursor: pointer; font-weight: bold; padding: 5px 0; }
table { border-collapse: collapse; table-layout: auto; width: 100%; margin: 8px 0; color: var(--text); }
th, td { border: 1px solid var(--line); padding: 3px 5px; text-align: left; vertical-align: top; overflow-wrap: anywhere; min-width: 0; }
th { background: #ebeee4; font-weight: bold; white-space: nowrap; overflow-wrap: normal; }
tbody tr:not([class]):nth-child(even) { background: var(--panel); }
table a { text-decoration: underline; }
.scroll { max-width: 100%; min-width: 0; overflow-x: auto; }
.scroll td { white-space: normal; }
.notice, .error, .archive-explanation, .ranking-explanation { padding: 7px 9px; border: 1px solid var(--line); background: var(--panel); }
.notice { background: #e9efdb; border-color: #bfcbb0; }
.error { color: #900; border-color: #d9aaaa; background: #fff5f5; }
.access-message { max-width: 640px; }
.access-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.pre { white-space: pre-wrap; }
.muted, .submission-hint, .export-date-note { color: var(--muted); }
.submission-panel { max-width: 620px; margin: 16px auto 24px; }
.submission-panel h2, .submission-hint, .public-links { text-align: center; }
.public-links { margin: 16px 0 4px; }
.player-form { margin-top: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px 16px; }
.form-grid label { display: grid; grid-template-columns: 90px minmax(0,1fr); align-items: center; gap: 6px; margin: 0; text-align: right; }
.form-grid input, .form-grid select { width: 100%; min-width: 0; }
.submit-row { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.paste-box { max-width: 620px; margin: 8px auto 16px; padding: 8px 10px; border: 1px solid var(--line); }
.paste-box textarea { width: 100%; min-height: 150px; }
.paste-box form { margin-top: 10px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(280px,1fr) minmax(0,2fr); gap: 20px; }
.dashboard-grid section { min-width: 0; }
.scouting-team { width: 100%; max-width: 420px; }
.scouting-team th, .scouting-team td { padding: 4px 7px; vertical-align: middle; }
.scouting-team th:last-child { width: 100px; }
.scouting-club { display: block; color: var(--muted); font-size: 11px; }
.account-editor { max-width: 720px; }
.import-token-panel { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 6px; }
.token-create-row { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; margin: 8px 0; }
.token-create-row label { margin: 0; display: flex; flex-direction: column; gap: 3px; }
.import-token-copy { margin-top: 6px; }
.import-token-list form { margin: 0; }
.token-delete summary { font-weight: normal; }
.token-delete p { margin: 4px 0; }
.import-token-help > summary { display: flex; align-items: center; gap: 7px; width: fit-content; list-style: none; padding: 4px 0; }
.import-token-help > summary::-webkit-details-marker { display: none; }
.import-token-help h2 { margin: 0; }
.help-icon { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border: 1px solid var(--accent); border-radius: 50%; color: var(--accent); font-size: 12px; }
.import-help-content { max-width: 800px; padding: 8px 10px; margin: 6px 0; border: 1px solid var(--line); background: var(--panel); }
.import-help-content pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 8px 0; padding: 8px; border: 1px solid var(--line); background: #fff; }
.section-tabs { padding: 8px 0; border-bottom: 1px solid var(--line); }
.section-tabs a { display: inline-block; padding: 5px 3px; }
.requirements-table { max-width: 660px; }
.requirements-table th, .requirements-table td { vertical-align: middle; padding: 3px 4px; }
.requirements-table th:first-child { width: 62px; }
.requirements-table th:last-child { width: 88px; }
.requirements-table form { margin: 0; }
.requirements-table input { width: 100%; min-width: 0; padding: 2px 4px; }
.requirements-table button { min-height: 24px; padding: 3px 6px; }
.requirements-formulas { max-width: 660px; }
.requirements-table.stacked-table tr:not(.table-column-headings) { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0; margin-bottom: 6px; }
.requirements-table.stacked-table tr > :first-child { padding: 4px 7px; }
.requirements-table.stacked-table tr > :first-child::before { display: inline; content: 'Alter '; }
.requirements-table.stacked-table td:last-child { align-content: end; }
.player-navigation { margin-bottom: 14px; }
.player-navigation h2 { margin: 0 0 8px; }
.player-nav-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; }
.player-nav-grid a, .ranking-modes a { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 6px 8px; border: 1px solid #aaa; background: var(--panel); color: var(--text); }
.player-nav-label, .ranking-modes strong { font-size: 13px; font-weight: bold; }
.player-nav-description, .ranking-modes span { color: var(--muted); font-size: 11px; }
.player-nav-grid a:hover, .ranking-modes a:hover { background: #ebeee4; text-decoration: none; }
.player-count { margin: 12px 0; }
.age-tabs, .position-tabs, .ranking-jumps { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 12px; }
.age-tabs a, .position-tabs a, .ranking-jumps a { display: inline-block; min-height: 28px; padding: 5px 8px; border: 1px solid #aaa; background: var(--panel); color: var(--text); }
.position-tabs a { font-weight: bold; }
.player-nav-grid a[aria-current=page], .ranking-modes a[aria-current=page], .age-tabs a[aria-current=page], .position-tabs a[aria-current=page] { background: var(--selected); border-color: var(--accent); font-weight: bold; }
.ranking-modes { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
.ranking-presets { max-width: 760px; margin-bottom: 10px; }
.ranking-presets h2 { margin: 0 0 6px; }
.ranking-presets p { margin: 4px 0 8px; }
.ranking-preset-row { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.ranking-preset-row > strong { width: 52px; }
.ranking-preset-row > a { display: inline-block; padding: 5px 9px; border: 1px solid #aaa; background: var(--panel); text-align: center; min-width: 44px; }
.ranking-preset-row > a[aria-current=page] { background: var(--selected); border-color: var(--accent); font-weight: bold; }
.ranking-preset-bestof { padding-top: 8px; }
.ranking-options { margin: 10px 0; }
.toplist-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; padding: 10px; border: 1px solid var(--line); background: var(--panel); }
.toplist-filters label { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.ranking-group { margin-top: 18px; scroll-margin-top: 12px; }
.ranking-formula { overflow-wrap: anywhere; }
.ranking-year { margin: 14px 0; scroll-margin-top: 12px; }
.ranking-year h3 { padding: 6px 8px; background: var(--grey); }
.ranking-year h3 span { font-size: 12px; font-weight: normal; }
.top-ten-divider td { border-top: 2px solid var(--accent); background: #ebeee4; font-weight: bold; }
.ranking-export { margin: 12px 0; }
.forum-export { padding: 10px; border: 1px solid var(--accent); background: var(--panel); }
.forum-export h2, .forum-export h3 { margin: 0 0 8px; }
.forum-export textarea { width: 100%; min-height: 125px; max-height: 400px; font-family: monospace; }
.forum-export-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0; }
.copy-forum { font-weight: bold; background: var(--selected); border-color: var(--accent); }
.weights-table input { width: 68px; }
.player-search { margin: 12px 0; padding: 8px 10px; border: 1px solid var(--line); }
.player-search h2 { margin: 0 0 10px; }
.search-table { width: 100%; max-width: 680px; margin: 0; table-layout: auto; border-collapse: separate; border-spacing: 2px; }
.search-table td { border: 0; padding: 1px 3px; vertical-align: middle; }
.search-table tbody tr:not([class]):nth-child(even) { background: transparent; }
.search-table label { margin: 0; }
.search-table input { width: 96px; padding: 3px; }
.search-table select { padding: 3px; }
.search-table .search-comparison input { width: 34px; }
.search-comparison select { width: 48px; }
.search-table .search-spacer { min-width: 20px; }
.search-table .search-swatch { min-width: 30px; }
.search-options { margin: 8px 0 0 5px; }
.player-list th, .player-list td { padding: 3px 2px; }
.player-list th { font-size: 11px; }
.score-column { width: 4%; }
.name-column { width: 25%; }
.basic-column { width: 3%; }
.skill-column { width: 2.5%; }
.meta-column, .action-column { width: 6%; }
.status-column { width: 7%; }
.info-column { width: 4%; }
.stacked-table, .stacked-table tbody { display: block; width: 100%; }
.stacked-table colgroup { display: none; }
.stacked-table .table-column-headings { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
.stacked-table tr:not(.table-column-headings) { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin-bottom: 10px; border: 1px solid var(--line); }
.stacked-table.wide-table tr:not(.table-column-headings) { grid-template-columns: repeat(4,minmax(0,1fr)); }
.stacked-table td, .stacked-table th { display: block; padding: 5px 7px; }
.stacked-table [data-label]::before { content: attr(data-label); display: block; font-weight: bold; margin-bottom: 2px; }
.stacked-table:not(.wide-table) tr > :first-child, .stacked-table .player-name-cell, .stacked-table .table-full-row { grid-column: 1 / -1; }
.stacked-table .player-name-cell { order: -1; font-weight: bold; }
.player-editor { max-width: 960px; margin: 0 auto; }
.player-edit-header { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); border: 1px solid var(--line); }
.player-edit-title { align-self: center; text-align: center; padding: 12px; }
.player-edit-title h2 { font-size: 24px; color: #777; }
.player-edit-forum { padding: 8px; border-left: 1px solid var(--line); min-width: 0; }
.player-edit-forum label { margin: 0; }
.player-edit-forum textarea { width: 100%; min-height: 130px; }
.player-edit-body { display: grid; grid-template-columns: minmax(0,2fr) minmax(0,1fr); gap: 18px; padding: 16px 10px 8px; }
.player-edit-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px 16px; }
.player-edit-fields label { display: grid; grid-template-columns: 78px minmax(0,1fr); align-items: center; gap: 5px; text-align: right; margin: 0; min-width: 0; }
.player-edit-fields label:nth-child(even) { text-align: left; direction: rtl; }
.player-edit-fields label:nth-child(even) > * { direction: ltr; }
.player-edit-fields input, .player-edit-fields select { width: 100%; min-width: 0; }
.player-edit-notes { min-width: 0; }
.player-edit-notes label { margin: 0; height: 100%; }
.player-edit-notes textarea { width: 100%; min-height: 260px; height: calc(100% - 24px); }
.player-edit-save { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin: 10px 0; }
.player-edit-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; border-top: 1px solid var(--line); padding: 8px; }
@media (max-width: 900px) {
  .player-edit-body { grid-template-columns: 1fr; }
  .player-edit-notes textarea { height: 120px; min-height: 120px; }
}
@media (max-width: 700px) {
  .stacked-table.wide-table tr:not(.table-column-headings) { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .search-table, .search-table tbody { display: block; width: 100%; }
  .search-table tr { display: grid; grid-template-columns: 100px minmax(0,1fr); gap: 4px; margin-bottom: 6px; }
  .search-table td { display: block; padding: 2px; }
  .search-table td:empty:not(.search-swatch), .search-table .search-spacer { display: none; }
  .search-table .search-swatch { width: 30px; min-height: 20px; justify-self: end; }
  .search-table input { width: 100%; }
  .search-table .search-comparison { display: flex; gap: 4px; }
  .search-table .search-comparison input { width: 44px; }
  .player-edit-header, .player-edit-fields { grid-template-columns: 1fr; }
  .player-edit-forum { border-left: 0; border-top: 1px solid var(--line); }
  .player-edit-fields label, .player-edit-fields label:nth-child(even) { grid-template-columns: 85px minmax(0,1fr); text-align: right; direction: ltr; }
}
@media (max-width: 900px) {
  .dashboard-grid { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 680px) {
  body { margin: 6px; }
  main { width: 100%; }
  .page-content { padding: 8px; }
  .form-grid, .ranking-modes { grid-template-columns: 1fr; }
  .form-grid label { grid-template-columns: 90px minmax(0,1fr); }
  .player-nav-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 340px) { .player-nav-grid { grid-template-columns: 1fr; } }

.maintenance-tools { padding: 7px; border: 1px solid var(--line); background: #f1f3ee; font-weight: bold; }
.waiting-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 10px; margin: 0 0 12px; border: 1px solid #748265; background: #edf1e7; }
.waiting-actions strong, .waiting-actions span { display: block; }
.waiting-actions span { margin-top: 3px; }
.waiting-check-link { display: inline-block; padding: 8px 12px; border: 1px solid #38482e; background: #47593a; color: #fff; font-weight: bold; text-decoration: none; }
.waiting-check-link:hover, .waiting-check-link:focus-visible { background: #304125; color: #fff; text-decoration: underline; }
.maintenance-table.positions-preview th:nth-child(1) { width: 9%; }
.maintenance-table.positions-preview th:nth-child(2) { width: 17%; }
.maintenance-table.positions-preview th:nth-child(3) { width: 29%; }
.maintenance-table.positions-preview th:nth-child(4) { width: 12%; }
.maintenance-table.positions-preview th:nth-child(5) { width: 33%; }
.proposal-skills { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 3px 10px; margin: 0; }
.proposal-skills > div { display: flex; justify-content: space-between; gap: 4px; min-width: 0; }
.proposal-skills dt { min-width: 0; }
.proposal-skills dd { margin: 0; font-weight: bold; font-variant-numeric: tabular-nums; }
.positions-preview.stacked-table .proposal-skills-cell { grid-column: 1 / -1; }
.maintenance-panel { max-width: 1000px; margin: auto; }
.admission-check { margin-bottom: 16px; padding: 12px; border: 1px solid #748265; background: #edf1e7; }
.admission-check h2 { margin: 0 0 8px; }
.maintenance-panel form { margin-bottom: 12px; }
.maintenance-panel input[type="checkbox"] { width: auto; min-width: 0; }
.maintenance-table { width: 100%; table-layout: fixed; }
.maintenance-table th:first-child { width: 12%; }
.maintenance-table th:nth-child(2) { width: 28%; }
.maintenance-table th:nth-child(3) { width: 18%; }
.maintenance-table td, .maintenance-table th { white-space: normal; overflow-wrap: anywhere; padding: 5px; vertical-align: top; }
.maintenance-panel details { border-top: 1px solid var(--line); padding-top: 8px; }
.maintenance-code { font-family: monospace; letter-spacing: 1px; }
.cleanup-checks { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 12px 0 16px; }
.cleanup-checks section { min-width: 0; padding: 10px; border: 1px solid var(--line); background: #f7f8f5; }
.cleanup-checks h2 { margin: 0 0 10px; font-size: 13px; }
.cleanup-checks label { display: block; margin: 5px 0; }
.cleanup-checks input[type="date"] { display: block; margin-top: 4px; }
.cleanup-checks .cleanup-check { margin-bottom: 10px; }
.cleanup-hint, .cleanup-progress small { color: #555; }
.cleanup-progress small { display: block; margin-top: 3px; }
.cleanup-checks details p { margin: 7px 0; }
.cleanup-checks code { overflow-wrap: anywhere; }
@media (max-width: 760px) { .cleanup-checks { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .maintenance-table, .maintenance-table tbody { display: block; }
  .maintenance-table thead { display: none; }
  .maintenance-table tr { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,2fr); border-bottom: 1px solid var(--line); }
  .maintenance-table td { display: block; min-width: 0; }
}

/* Player import and status indicators, November 2026. */
.update-date { display: inline-block; padding: 2px 5px; border-radius: 3px; font-weight: bold; }
.update-recent { color: #14532d; background: #dcfce7; }
.update-aging { color: #493500; background: #ffe047; border: 1px solid #b58b00; }
.update-old { color: #b91c1c; background: #fff1f2; }
table.player-list td.best-position { background: #c8efba; color: #183515; font-weight: bold; box-shadow: inset 0 0 0 1px #70a95c; }
.table-sort { background: transparent; color: inherit; border: 0; padding: 0; font: inherit; font-weight: bold; cursor: pointer; }
.table-sort:hover, .table-sort:focus-visible { text-decoration: underline; }
.import-progress progress { width: 100%; height: 24px; }
.help-icon { display: inline-block; border: 1px solid currentColor; border-radius: 50%; width: 1.2em; text-align: center; }
#sokker-team-link { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }

/* Flexible player grid and compact rankings, revision 20261106-ui2. */
.player-data-panel { margin: 14px 0; border: 1px solid #dce3d6; border-radius: 12px; background: #fff; box-shadow: 0 2px 8px #23331a06; }
.player-data-panel [hidden] { display: none !important; }
.data-grid-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; padding: 14px; border-bottom: 1px solid #e4e9df; background: #f8faf6; border-radius: 12px 12px 0 0; }
.data-grid-toolbar label { margin: 0; }
.grid-quick-search { display: flex; flex-direction: column; gap: 5px; flex: 1 1 210px; color: #59634f; font-size: 11px; }
.grid-quick-search input { width: 100%; min-height: 34px; border: 1px solid #ccd6c3; border-radius: 7px; padding: 7px 10px; font-size: 12px; background: white; }
.grid-views { display: flex; gap: 2px; padding: 3px; background: #eaf0e4; border-radius: 8px; }
.grid-views button { border: 0; border-radius: 5px; background: transparent; padding: 6px 10px; min-height: 29px; white-space: nowrap; color: #56634a; }
.grid-views button[aria-pressed=true] { color: #30491f; background: white; box-shadow: 0 1px 4px #23331a19; font-weight: bold; }
.grid-page-size { display: flex; flex-direction: column; gap: 4px; color: #59634f; font-size: 11px; }
.grid-page-size select { min-height: 33px; border-color: #ccd6c3; border-radius: 6px; }
.grid-columns { position: relative; margin-bottom: 1px; }
.grid-columns summary { padding: 7px 10px; border: 1px solid #ccd6c3; border-radius: 6px; background: #fff; font-weight: normal; }
.grid-column-options { position: absolute; right: 0; top: 38px; z-index: 12; min-width: 230px; max-height: 340px; overflow-y: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; padding: 14px; background: #fff; border: 1px solid #ccd6c3; border-radius: 8px; box-shadow: 0 8px 28px #23331a25; }
.grid-column-options label { display: flex; align-items: center; gap: 5px; color: #333; }
.data-grid-scroll { max-height: 65vh; max-height: min(65vh, 680px); max-width: 100%; overflow: auto; overscroll-behavior: contain; scrollbar-color: #b8c6ad #f2f5ee; }
table.data-grid { width: max-content; min-width: 100%; margin: 0; table-layout: auto; border-collapse: separate; border-spacing: 0; font-size: 12px; }
table.data-grid th, table.data-grid td { border: 0; border-bottom: 1px solid #e7ebE2; padding: 8px 10px; text-align: right; white-space: nowrap; overflow-wrap: normal; vertical-align: middle; min-width: 54px; }
table.data-grid th { position: sticky; top: 0; z-index: 3; height: 38px; background: #edf2e7; color: #4e5e41; font-size: 11px; letter-spacing: .02em; }
table.data-grid td { font-variant-numeric: tabular-nums; background: var(--grid-row, #fff); }
table.data-grid tbody tr:nth-child(even) { --grid-row: #f8faf6; }
table.data-grid tr.NT1 { --grid-row: #f0f5e8; }
table.data-grid tr.NT2 { --grid-row: #eff4f8; }
table.data-grid tr.NT3 { --grid-row: #f5f8ee; }
table.data-grid tr.NT4 { --grid-row: #f4f6f7; }
table.data-grid tbody tr:hover { --grid-row: #eaf1e4; }
table.data-grid [data-column=name] { position: sticky; left: 0; min-width: 195px; max-width: 270px; text-align: left; z-index: 2; border-right: 1px solid #dfe6d8; }
table.data-grid th[data-column=name] { z-index: 5; background: #edf2e7; }
table.data-grid td[data-column=name] a { display: block; overflow: hidden; text-overflow: ellipsis; color: #314b24; font-weight: bold; text-decoration: none; }
.player-club { display: block; overflow: hidden; text-overflow: ellipsis; font-size: 10px; color: #74806a; margin-top: 2px; }
table.data-grid [data-column=experience] { min-width: 95px; }
table.data-grid [data-column=lastupdate] { min-width: 112px; }
table.data-grid [data-column=train], table.data-grid [data-column=status], table.data-grid [data-column=info], table.data-grid [data-column=actions] { text-align: left; }
table.data-grid [data-column=info] { max-width: 240px; white-space: normal; }
table.data-grid .table-sort { display: inline-flex; justify-content: flex-end; align-items: center; gap: 4px; width: 100%; border: 0 !important; border-radius: 0; background: transparent !important; color: inherit; min-height: 0; padding: 0 !important; font: inherit; font-weight: bold; white-space: nowrap; overflow-wrap: normal; box-shadow: none; }
table.data-grid th[data-column=name] .table-sort { justify-content: flex-start; }
table.data-grid .table-sort::after { content: '↕'; font-size: 10px; opacity: .35; }
table.data-grid [aria-sort=ascending] .table-sort::after { content: '↑'; opacity: 1; }
table.data-grid [aria-sort=descending] .table-sort::after { content: '↓'; opacity: 1; }
table.data-grid td.best-position { background: #d8efc9; color: #305423; font-weight: bold; box-shadow: inset 0 -2px #a8cb91; }
.grid-row-actions a { margin-right: 10px; text-decoration: none; font-size: 11px; }
.grid-row-actions .grid-delete { color: #936b65; }
.data-grid-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; color: #65715b; font-size: 11px; border-top: 1px solid #e4e9df; }
.grid-pagination { display: flex; align-items: center; gap: 12px; }
.grid-pagination button { min-width: 30px; min-height: 28px; padding: 3px 8px; border: 1px solid #d8e1d0; border-radius: 5px; background: #f8faf6; }
.grid-pagination button:disabled { opacity: .3; cursor: default; }
.advanced-player-search { margin: 12px 0; }
.advanced-player-search > summary { display: inline-block; padding: 6px 0; color: #69755f; font-size: 11px; }
.advanced-player-search > summary::before { content: '+ '; }
.advanced-player-search[open] > summary::before { content: '− '; }
.advanced-player-search .player-search { margin: 5px 0 12px; border-radius: 8px; background: #fafbf8; }
/* Rankings keep narrow rank/age/score columns and remain tables on small screens. */
.ranking-group { margin-top: 14px; }
.ranking-group > h2 { font-size: 14px; margin-bottom: 2px; }
.ranking-formula { font-size: 11px; color: #7a8371; margin: 2px 0 6px; }
.ranking-year { margin: 10px 0; }
.ranking-year h3 { background: transparent; padding: 5px 0; margin: 5px 0 2px; color: #516444; font-size: 12px; }
table.ranking-table { width: 100%; min-width: 470px; table-layout: auto; border-collapse: collapse; font-size: 12px; margin: 3px 0 8px; }
table.ranking-table th, table.ranking-table td { border: 0; border-bottom: 1px solid #e5eadd; padding: 4px 9px; height: 28px; line-height: 1.3; white-space: nowrap; overflow-wrap: normal; vertical-align: middle; }
table.ranking-table th { font-size: 10px; font-weight: normal; text-transform: uppercase; color: #7a866f; background: #f6f8f2; }
table.ranking-table th:first-child, table.ranking-table td:first-child { width: 44px; color: #839077; text-align: right; }
table.ranking-table th:nth-child(3), table.ranking-table td:nth-child(3) { width: 56px; text-align: right; }
table.ranking-table th:nth-child(4), table.ranking-table td:nth-child(4) { width: 95px; text-align: right; font-variant-numeric: tabular-nums; }
table.ranking-table td:nth-child(4) { color: #405831; font-weight: bold; }
table.ranking-table td:nth-child(2) { min-width: 180px; }
table.ranking-table tbody tr:hover { background: #f0f5e9; }
table.ranking-table a { text-decoration: none; }
table.ranking-table a:hover { text-decoration: underline; }
table.ranking-table .ranking-edit { display: inline-flex; align-items: center; justify-content: center; width: 25px; height: 22px; margin-left: 7px; color: #89977c; opacity: .45; font-size: 14px; vertical-align: middle; }
table.ranking-table tr:hover .ranking-edit, table.ranking-table .ranking-edit:focus-visible { opacity: 1; color: #3e5d2b; }
table.ranking-table .rank-after-ten td { border-top: 1px solid #a7b998; }
.ranking-jumps { gap: 4px; margin: 6px 0; }
.ranking-jumps a { padding: 3px 7px; min-height: 0; font-size: 11px; }
.ranking-explanation { padding: 6px 9px; font-size: 11px; margin: 8px 0; }
/* Staff can start a CSV upload directly from the home page. */
.csv-import-card { max-width: 900px; margin: 6px auto 24px; padding: 22px; border: 1px solid #cbdcba; border-radius: 14px; background: linear-gradient(130deg, #f2f7eb, #fbfcf9); }
.csv-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.import-eyebrow { font-size: 9px; font-weight: bold; letter-spacing: .14em; color: #80926b; }
.csv-card-heading h2 { margin: 4px 0 7px; font-size: 22px; color: #334d25; }
.csv-card-heading p { margin: 0; color: #718064; font-size: 12px; }
.csv-format-badge { display: grid; place-items: center; flex-shrink: 0; width: 52px; height: 62px; border: 1px solid #c9d9b8; border-radius: 9px; background: #fff9; color: #6a8550; font-weight: bold; letter-spacing: .1em; }
.csv-import-steps { list-style: none; counter-reset: csv-step; display: flex; flex-wrap: wrap; gap: 10px 24px; padding: 0; margin: 18px 0; color: #6d7b60; font-size: 11px; }
.csv-import-steps li { counter-increment: csv-step; display: flex; align-items: center; gap: 6px; }
.csv-import-steps li::before { content: counter(csv-step); display: inline-grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; background: #e1ebd5; color: #62764f; font-size: 10px; }
.csv-file-picker { position: relative; display: flex; align-items: center; flex-direction: column; gap: 8px; width: 100%; padding: 21px 14px; margin: 0; border: 1px dashed #a5bd90; border-radius: 9px; background: #fff; cursor: pointer; text-align: center; }
.csv-file-picker:focus-within, .csv-file-picker.is-dragging { border-color: #567e37; outline: 2px solid #8da975; outline-offset: 2px; background: #f1f7eb; }
.csv-file-picker.has-file { background: #f8fcf3; border-style: solid; }
.csv-upload-icon { display: grid; place-items: center; width: 28px; height: 28px; background: #edf4e6; border-radius: 7px; color: #648447; font-size: 22px; }
.csv-filename { color: #476234; font-size: 12px; overflow-wrap: anywhere; }
.csv-file-hint { color: #98a38d; font-size: 10px; }
.csv-file-picker input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.csv-submit-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 16px 0 8px; }
.csv-country-confirm { display: flex; align-items: flex-start; gap: 7px; margin: 0; font-size: 11px; color: #68785b; }
.csv-country-confirm input { flex-shrink: 0; }
.csv-preview-button { flex-shrink: 0; padding: 10px 14px; background: #4e7235; border: 1px solid #4e7235; border-radius: 7px; color: #fff; font-weight: bold; font-size: 11px; }
.csv-preview-button:hover { color: #fff; background: #3e5d2b; }
.csv-preview-button span { margin-left: 10px; }
.csv-save-hint { text-align: right; color: #8a977e; font-size: 10px; margin: 0; }
@media (max-width: 700px) {
  main { width: 100%; }
  .data-grid-toolbar { gap: 9px; padding: 10px; }
  .grid-quick-search { flex-basis: 100%; }
  .grid-views { flex: 1 1 auto; }
  .grid-views button { padding: 6px 7px; font-size: 11px; }
  .grid-column-options { right: -10px; }
  table.data-grid [data-column=name] { min-width: 155px; max-width: 185px; }
  table.data-grid th, table.data-grid td { padding: 7px 8px; }
  .data-grid-scroll { max-height: 70vh; }
  .csv-import-card { padding: 16px; margin: 4px auto 18px; }
  .csv-card-heading h2 { font-size: 19px; }
  .csv-submit-row { flex-direction: column; align-items: stretch; gap: 12px; }
  .csv-preview-button { width: 100%; }
  .csv-save-hint { text-align: left; }
}

.ranking-presets { margin: 0; max-width: none; border-bottom: 1px solid #e3e9dc; }
.ranking-presets > summary, .ranking-options > summary, .forum-export > summary { padding: 8px 0; font-size: 11px; color: #647657; }
.ranking-presets nav { padding: 4px 0 10px; }
.ranking-options { margin: 0; }
.forum-export { padding: 0 11px; margin: 8px 0; border: 1px solid #dde5d5; border-radius: 7px; background: #fafcf7; }
.forum-export[open] { padding-bottom: 10px; }
.ranking-year h3 { border-bottom: 1px solid #ccd9c1; }

.dashboard-details { margin: 18px 0 4px; border-top: 1px solid #e3e9dc; padding-top: 5px; }
.dashboard-details > summary { padding: 8px 0; color: #647657; font-size: 11px; }

/* Clear per-player import preview and results, revision 20261107-import-ui2. */
.import-progress { margin: 8px auto 28px; padding: 24px; border: 1px solid #d9e3d1; border-radius: 16px; background: #fff; box-shadow: 0 6px 24px #263d1b09; }
.import-progress [hidden] { display: none !important; }
.import-overview-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.import-progress h2 { font-size: 22px; color: #2b4221; margin: 4px 0 0; letter-spacing: -.025em; }
.import-total-badge { padding: 7px 12px; border: 1px solid #dae5d1; border-radius: 30px; color: #597346; background: #f3f7ee; white-space: nowrap; }
.import-phase-notice { margin: 0 0 18px; padding: 12px 14px; border: 1px solid #d7e4cc; border-radius: 8px; background: #f3f8ee; color: #435d33; line-height: 1.65; }
.import-summary { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 10px; margin: 14px 0 10px; }
.import-metric { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 14px; border: 1px solid #e0e6db; border-radius: 10px; background: #f8faf6; color: #59644f; }
.import-metric-count { font-size: 28px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; color: #36552a; }
.import-metric-created { background: #f0f8eb; border-color: #cfe4c1; }
.import-metric-updated { background: #f0f6fb; border-color: #d2e2ed; }
.import-metric-updated .import-metric-count { color: #335f7e; }
.import-metric-rejected { background: #fff8eb; border-color: #ecdcb5; }
.import-metric-rejected .import-metric-count { color: #8a631c; }
.import-metric-errors .import-metric-count { color: #a03f38; }
.import-counter-help { color: #68725f; font-size: 11px; line-height: 1.6; }
#import-status { margin: 18px 0 6px; color: #59634f; font-size: 11px; }
.import-progress progress { display: block; width: 100%; height: 10px; accent-color: #5e833f; border: 0; border-radius: 8px; overflow: hidden; background: #ecf0e8; }
.import-progress progress::-webkit-progress-bar { background: #ecf0e8; }
.import-progress progress::-webkit-progress-value { background: #5e833f; border-radius: 8px; }
#import-batch { margin: 16px 0 24px; }
#import-batch button { padding: 10px 18px; border: 1px solid #47672f; border-radius: 7px; background: #53752f; color: white; font-weight: bold; }
#import-batch button:hover { background: #426024; }
#import-batch button:disabled { background: #e8ede3; color: #637354; border-color: #c7d2bd; cursor: default; }
.import-results-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 24px; padding-top: 18px; border-top: 1px solid #e7ece2; }
.import-results-heading h3 { font-size: 15px; margin: 0; }
#import-report-download { font-size: 11px; text-decoration: underline; }
.import-results-filter { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: 16px 0 12px; padding: 12px; background: #f7f9f4; border: 1px solid #e4eadf; border-radius: 9px; }
.import-results-filter label { display: flex; flex-direction: column; gap: 5px; margin: 0; color: #5d6852; font-size: 11px; }
.import-results-filter label:first-of-type { flex: 1 1 220px; }
.import-results-filter input, .import-results-filter select { width: 100%; min-height: 36px; padding: 7px 10px; border: 1px solid #ccd7c2; border-radius: 6px; background: #fff; font-size: 12px; }
.import-results-filter button { min-height: 36px; padding: 7px 12px; border: 1px solid #c9d4bf; border-radius: 6px; background: #fff; }
.import-result-meta { margin: 10px 0; color: #717b66; font-size: 11px; }
.import-results-table { margin: 0; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: 12px; }
.import-results-table th { padding: 10px 12px; border: 0; border-bottom: 1px solid #d9e2d1; background: #f1f5ec; color: #5d6a52; font-size: 10px; letter-spacing: .05em; text-transform: uppercase; }
.import-results-table th:first-child { width: 32%; border-radius: 7px 0 0 0; }
.import-results-table th:nth-child(2) { width: 21%; }
.import-results-table th:last-child { border-radius: 0 7px 0 0; }
.import-results-table td { padding: 13px 12px; border: 0; border-bottom: 1px solid #e7ece2; vertical-align: middle; line-height: 1.55; background: #fff; }
.import-results-table tbody tr:hover td { background: #fafcf8; }
.import-player-cell strong { display: block; color: #34442b; margin-bottom: 3px; }
.import-player-cell > span { display: block; color: #7b8374; font-size: 10px; }
.import-state { display: inline-block; padding: 4px 8px; border: 1px solid #d4dfcc; border-radius: 20px; font-size: 10px; font-weight: 700; color: #46642f; background: #f0f6e9; }
.import-state-created { color: #2e6532; background: #eaf6e6; border-color: #cde4c5; }
.import-state-updated, .import-state-ready_updated { color: #38617d; background: #edf5fb; border-color: #d0e2ee; }
.import-state-rejected { color: #89621b; background: #fff5dd; border-color: #efdfb7; }
.import-state-skipped { color: #68715f; background: #f2f3f0; border-color: #dedfd9; }
.import-state-errors { color: #9d433b; background: #fff0ee; border-color: #eccdca; }
.import-reason-cell { color: #5c6853; font-size: 11px; }
.import-reason-detail { margin-top: 3px; }
.import-reason-detail summary { display: list-item; width: fit-content; font-size: 10px; font-weight: normal; color: #617a4c; padding: 3px 0; }
.import-reason-detail p { margin: 5px 0 0; padding: 9px 11px; border-left: 2px solid #c9d8ba; background: #f6f9f2; color: #5b6652; font-size: 11px; }
.import-empty { padding: 28px !important; text-align: center; color: #68725f; }
.import-result-pages { display: flex; gap: 8px; justify-content: flex-end; margin: 14px 0 0; }
.import-result-pages .button-link { padding: 7px 12px; border: 1px solid #cdd8c3; border-radius: 6px; background: #f8faf5; font-size: 11px; }
@media (max-width: 800px) {
  .import-progress { padding: 18px; }
  .import-summary { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .import-metric { padding: 12px; }
}
@media (max-width: 560px) {
  .import-progress { padding: 14px; border-radius: 10px; }
  .import-progress h2 { font-size: 19px; }
  .import-total-badge { font-size: 10px; padding: 5px 8px; }
  .import-summary { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
  .import-metric { padding: 11px; font-size: 10px; }
  .import-metric-count { font-size: 25px; }
  .import-results-filter { padding: 10px; gap: 8px; }
  .import-results-filter label { flex: 1 1 100%; }
  .import-results-filter button { width: 100%; }
  .import-results-table, .import-results-table tbody { display: block; }
  .import-results-table thead { display: none; }
  .import-results-table tr { display: grid; grid-template-columns: minmax(0,1fr); padding: 12px 0; border-bottom: 1px solid #e2e9db; }
  .import-results-table td { display: block; padding: 4px 0; border: 0; background: transparent; }
  .import-results-table tbody tr:hover td { background: transparent; }
  .import-results-table .import-reason-cell { padding-top: 6px; }
}
