/**
 * Project: War Masters
 * Bestand: dashboard.css
 * Versie: 1.7.4
 */

.dashboard-header {
    padding-bottom: 20px;
}

.dashboard-updated {
    font-size: 12px !important;
}

.dashboard-container {
    margin-top: 0;
}

.dashboard-tabs {
    display: flex;
    gap: 9px;
    margin: 0 0 28px;
    padding: 8px;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(12, 31, 52, 0.88);
    box-shadow: var(--shadow);
}

.dashboard-tab {
    flex: 1 0 auto;
    min-width: 130px;
    padding: 12px 18px;
    border-radius: 12px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
    text-align: center;
    text-decoration: none;
    transition:
        background 0.15s ease,
        color 0.15s ease,
        transform 0.15s ease;
}

.dashboard-tab:hover {
    background: rgba(38, 167, 255, 0.1);
    color: var(--text);
}

.dashboard-tab.active {
    background: linear-gradient(
        145deg,
        rgba(38, 167, 255, 0.95),
        rgba(8, 116, 191, 0.95)
    );
    color: #fff;
    box-shadow: 0 8px 22px rgba(0, 108, 184, 0.28);
}

.dashboard-context-badge {
    display: inline-flex;
    align-items: center;
    padding: 7px 11px;
    border: 1px solid rgba(38, 167, 255, 0.35);
    border-radius: 10px;
    background: rgba(38, 167, 255, 0.1);
    color: #bfe7ff;
    font-size: 12px;
    font-weight: 800;
}

.dashboard-filters {
    margin-top: 16px;
}

.dashboard-actions {
    flex-wrap: nowrap;
}

.action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 31px;
    padding: 0 8px;
    border: 1px solid rgba(38, 167, 255, 0.35);
    border-radius: 8px;
    background: rgba(38, 167, 255, 0.12);
    color: #bfe7ff;
    font: inherit;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
}

.action-button:hover:not(:disabled) {
    background: rgba(38, 167, 255, 0.28);
    color: #fff;
}

.action-cr {
    border-color: rgba(255, 207, 64, 0.45);
    background: rgba(255, 207, 64, 0.13);
    color: var(--gold);
}

.action-copy {
    min-width: 40px;
    border-color: rgba(55, 210, 125, 0.42);
    background: rgba(55, 210, 125, 0.13);
    color: #73eba7;
}

.action-copy.is-disabled,
.action-copy:disabled {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    cursor: default;
    opacity: 0.65;
}

.copy-toast {
    position: fixed;
    z-index: 1000;
    right: 20px;
    bottom: 20px;
    max-width: min(360px, calc(100vw - 40px));
    padding: 12px 16px;
    border: 1px solid rgba(55, 210, 125, 0.45);
    border-radius: 12px;
    background: rgba(10, 39, 28, 0.96);
    color: #8ff2b8;
    font-size: 13px;
    font-weight: 800;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(14px);
    transition:
        opacity 0.18s ease,
        transform 0.18s ease;
}

.copy-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.history-selector {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 280px));
    gap: 12px;
    margin-bottom: 18px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(19, 42, 70, 0.82);
    box-shadow: var(--shadow);
}

.history-selector select {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 11px;
    outline: none;
    background: rgba(7, 20, 38, 0.88);
    color: var(--text);
    font: inherit;
}

.history-clan-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.history-clan-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 190px;
    padding: 17px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(19, 42, 70, 0.88);
    box-shadow: var(--shadow);
}

.history-clan-card h3 {
    margin: 8px 0 3px;
    font-size: 17px;
}

.history-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 34px;
    padding: 0 9px;
    border-radius: 10px;
    background: var(--gold);
    color: #162236;
    font-size: 15px;
    font-weight: 900;
}

.history-clan-card dl {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 18px 0 0;
}

.history-clan-card dt {
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}

.history-clan-card dd {
    margin: 3px 0 0;
    font-size: 14px;
    font-weight: 900;
}

.positive {
    color: #73eba7;
}

.negative {
    color: #ff8f8f;
}

.history-filters {
    grid-template-columns: minmax(220px, 2fr) 1fr auto;
}

.dashboard-clan-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.dashboard-clan-card {
    min-height: 230px;
}

.clan-filter-link {
    position: relative;
    z-index: 2;
    display: inline-flex;
    margin-top: 18px;
    padding: 8px 10px;
    border-radius: 9px;
    background: rgba(38, 167, 255, 0.13);
    color: #bfe7ff;
    font-size: 11px;
    font-weight: 900;
    text-decoration: none;
}

.ranking-table tr[hidden] {
    display: none;
}

@media (max-width: 1080px) {
    .history-clan-grid,
    .dashboard-clan-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .dashboard-tabs {
        justify-content: flex-start;
    }

    .dashboard-tab {
        flex: 0 0 auto;
    }

    .history-selector {
        grid-template-columns: 1fr 1fr;
    }

    .history-clan-grid,
    .dashboard-clan-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .history-filters {
        grid-template-columns: 1fr 1fr;
    }

    .history-filters .ranking-search {
        grid-column: 1 / -1;
    }
}

@media (max-width: 520px) {
    .history-selector,
    .history-clan-grid,
    .dashboard-clan-grid,
    .history-filters {
        grid-template-columns: 1fr;
    }

    .history-filters .ranking-search {
        grid-column: auto;
    }

    .dashboard-actions {
        gap: 4px;
    }

    .action-button {
        min-width: 31px;
        padding: 0 6px;
    }
}


/**
 * Banlijstmarkeringen
 * Versie: 1.4.4
 */

.public-ban-alert {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    margin: 0 0 24px;
    padding: 18px;
    border: 1px solid rgba(255, 98, 109, 0.48);
    border-radius: 18px;
    background:
        linear-gradient(
            135deg,
            rgba(109, 20, 31, 0.78),
            rgba(54, 17, 29, 0.9)
        );
    box-shadow: var(--shadow);
}

.public-ban-alert-icon {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 13px;
    background: #ff626d;
    color: #21070a;
    font-size: 24px;
    font-weight: 1000;
}

.public-ban-alert h2 {
    margin: 0 0 5px;
    color: #fff;
    font-size: 18px;
}

.public-ban-alert p {
    margin: 0;
    color: #ffc5c9;
    font-size: 13px;
}

.public-ban-warning-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.public-ban-warning-player {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.18);
    color: #ffe3e5;
    font-size: 12px;
}

.public-ban-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 7px;
    padding: 3px 6px;
    border-radius: 6px;
    background: #ff626d;
    color: #21070a;
    font-size: 9px;
    font-weight: 1000;
    line-height: 1;
    vertical-align: middle;
}

.ranking-table tr.is-banned-player > td {
    background: rgba(255, 72, 87, 0.09);
}

.ranking-table tr.is-banned-player > td:first-child {
    box-shadow: inset 4px 0 0 #ff626d;
}

.ranking-table tr.is-banned-player:hover > td {
    background: rgba(255, 72, 87, 0.15);
}

.ranking-table tr.is-banned-player .player-name,
.ranking-table tr.is-banned-player .player-tag {
    color: #ffadb3;
}

@media (max-width: 620px) {
    .public-ban-alert {
        grid-template-columns: 1fr;
    }
}
/**
 * Dashboarduitbreidingen
 * Versie: 1.4.4
 *
 * Favoriete clan, openbare banreden en oude leden.
 */

/*
 * Favoriete clan
 */

.favorite-clan-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: -10px 0 24px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 207, 64, 0.3);
    border-radius: 15px;
    background:
        linear-gradient(
            135deg,
            rgba(255, 207, 64, 0.1),
            rgba(19, 42, 70, 0.78)
        );
    box-shadow: var(--shadow);
}

.favorite-clan-panel label {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    font-size: 13px;
    font-weight: 900;
}

.favorite-clan-panel select {
    min-width: 230px;
    min-height: 40px;
    padding: 8px 11px;
    border: 1px solid rgba(255, 207, 64, 0.36);
    border-radius: 10px;
    outline: none;
    background: rgba(7, 20, 38, 0.9);
    color: var(--text);
    font: inherit;
}

.favorite-clan-panel p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
}

.dashboard-clan-card {
    position: relative;
}

.dashboard-clan-card.is-favorite-clan {
    border-color: rgba(255, 207, 64, 0.72);
    box-shadow:
        0 0 0 2px rgba(255, 207, 64, 0.08),
        var(--shadow);
}

.dashboard-clan-card.is-favorite-clan::before {
    content: "★ Mijn clan";
    position: absolute;
    top: 11px;
    right: 11px;
    padding: 5px 8px;
    border-radius: 8px;
    background: rgba(255, 207, 64, 0.16);
    color: var(--gold);
    font-size: 9px;
    font-weight: 1000;
    letter-spacing: 0.03em;
}

/*
 * Banwaarschuwing
 */

.public-ban-warning-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
    margin-top: 14px;
}

.public-ban-warning-player {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    padding: 11px 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 11px;
    background: rgba(0, 0, 0, 0.2);
    color: #ffe3e5;
    font-size: 12px;
}

.public-ban-warning-details {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.public-ban-warning-details strong {
    color: #ffffff;
    font-size: 14px;
}

.public-ban-warning-details > span {
    color: #ffc5c9;
}

.public-ban-warning-reason {
    margin-top: 3px;
    color: #ffffff !important;
    overflow-wrap: anywhere;
}

.ban-warning-cr-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 207, 64, 0.48);
    border-radius: 9px;
    background: rgba(255, 207, 64, 0.14);
    color: var(--gold);
    font-size: 10px;
    font-weight: 1000;
    text-decoration: none;
}

.ban-warning-cr-button:hover {
    background: rgba(255, 207, 64, 0.24);
    color: #ffffff;
}

/*
 * Huidige, vertrokken en overgestapte leden
 */

.member-aware-filters {
    grid-template-columns:
        minmax(210px, 1.7fr)
        minmax(170px, 1fr)
        minmax(170px, 1fr)
        minmax(230px, 1.25fr)
        auto;
}

.member-history-toggle {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: rgba(19, 42, 70, 0.82);
    color: var(--text);
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.member-history-toggle input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--gold);
}

.membership-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    padding: 3px 6px;
    border-radius: 6px;
    font-size: 8px;
    font-weight: 1000;
    line-height: 1;
    vertical-align: middle;
}

.membership-departed {
    background: rgba(255, 143, 143, 0.16);
    color: #ffaaaa;
}

.membership-transferred {
    background: rgba(255, 207, 64, 0.15);
    color: var(--gold);
}

.current-clan-note {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
}

.ranking-table tr.is-former-player > td {
    background: rgba(255, 255, 255, 0.025);
}

.ranking-table tr.is-former-player:not(.is-banned-player) {
    opacity: 0.86;
}

.ranking-table tr.is-former-player:hover > td {
    background: rgba(255, 255, 255, 0.055);
}

@media (max-width: 1120px) {
    .member-aware-filters {
        grid-template-columns:
            minmax(210px, 2fr)
            1fr
            1fr;
    }

    .member-history-toggle {
        grid-column: 1 / 3;
    }
}

@media (max-width: 760px) {
    .favorite-clan-panel {
        align-items: stretch;
        flex-direction: column;
        gap: 9px;
    }

    .favorite-clan-panel label {
        align-items: stretch;
        flex-direction: column;
        gap: 7px;
    }

    .favorite-clan-panel select {
        width: 100%;
        min-width: 0;
    }

    .member-aware-filters {
        grid-template-columns: 1fr 1fr;
    }

    .member-aware-filters .ranking-search,
    .member-history-toggle {
        grid-column: 1 / -1;
    }
}

@media (max-width: 620px) {
    .public-ban-warning-player {
        align-items: stretch;
        flex-direction: column;
    }

    .ban-warning-cr-button {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .member-aware-filters {
        grid-template-columns: 1fr;
    }

    .member-aware-filters .ranking-search,
    .member-history-toggle {
        grid-column: auto;
    }
}


/**
 * Compacte spelerslijsten
 * Versie: 1.4.4
 *
 * Snelkoppelingen staan onder de spelersnaam.
 * Op mobiel blijft de tabelvorm behouden zonder breed
 * horizontaal te hoeven scrollen.
 */

.player-cell {
    min-width: 220px;
}

.player-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 7px;
}

.player-inline-actions .action-button {
    min-width: 30px;
    height: 27px;
    padding: 0 6px;
    border-radius: 7px;
    font-size: 9px;
}

.player-inline-actions .action-copy {
    min-width: 36px;
}

.player-mobile-clan {
    display: none;
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.25;
}

.compact-decks-cell {
    min-width: 96px;
}

.compact-data-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    white-space: nowrap;
}

.compact-data-line + .compact-data-line {
    margin-top: 4px;
}

.compact-data-label {
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}

.compact-data-line strong {
    color: var(--text);
    font-size: 12px;
}

.compact-data-line.today-complete strong {
    color: #73eba7;
}

@media (max-width: 760px) {
    .ranking-panel {
        overflow-x: visible;
    }

    .ranking-table {
        width: 100%;
        min-width: 0 !important;
        table-layout: fixed;
    }

    .ranking-table th,
    .ranking-table td {
        padding: 8px 5px;
        vertical-align: top;
    }

    .ranking-table th {
        font-size: 9px;
    }

    .ranking-table .sort-button {
        padding: 0;
        font-size: 9px;
        white-space: normal;
        text-align: left;
    }

    .ranking-table .desktop-clan-cell {
        display: none;
    }

    .ranking-table .position {
        width: 34px;
    }

    .ranking-table .position-badge {
        min-width: 25px;
        height: 25px;
        padding: 0 5px;
        border-radius: 8px;
        font-size: 10px;
    }

    .player-cell {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .player-name {
        font-size: 12px;
        line-height: 1.2;
    }

    .player-tag {
        margin-top: 2px;
        font-size: 9px;
    }

    .player-mobile-clan {
        display: block;
    }

    .public-ban-badge,
    .membership-badge {
        margin-left: 3px;
        padding: 2px 4px;
        font-size: 7px;
    }

    .player-inline-actions {
        gap: 3px;
        margin-top: 6px;
    }

    .player-inline-actions .action-button {
        min-width: 27px;
        height: 24px;
        padding: 0 5px;
        font-size: 8px;
    }

    .player-inline-actions .action-copy {
        min-width: 32px;
    }

    .ranking-table .score,
    .ranking-table .decks {
        font-size: 11px;
    }

    .compact-decks-cell {
        min-width: 0;
    }

    .compact-data-line {
        display: block;
        white-space: normal;
    }

    .compact-data-line + .compact-data-line {
        margin-top: 5px;
    }

    .compact-data-label {
        display: block;
        margin-bottom: 1px;
        font-size: 7px;
    }

    .compact-data-line strong {
        font-size: 10px;
    }

    .deadline-badge {
        max-width: 78px;
        padding: 5px 6px;
        font-size: 8px;
        line-height: 1.15;
        white-space: normal;
        text-align: center;
    }

    #weekTable th:nth-child(1),
    #weekTable td:nth-child(1) {
        width: 34px;
    }

    #weekTable th:nth-child(2),
    #weekTable td:nth-child(2) {
        width: auto;
    }

    #weekTable th:nth-child(4),
    #weekTable td:nth-child(4) {
        width: 64px;
    }

    #weekTable th:nth-child(5),
    #weekTable td:nth-child(5) {
        width: 72px;
    }

    #dayTable th:nth-child(1),
    #dayTable td:nth-child(1) {
        width: 34px;
    }

    #dayTable th:nth-child(2),
    #dayTable td:nth-child(2) {
        width: auto;
    }

    #dayTable th:nth-child(4),
    #dayTable td:nth-child(4) {
        width: 60px;
    }

    #dayTable th:nth-child(5),
    #dayTable td:nth-child(5) {
        width: 48px;
    }

    #dayTable th:nth-child(6),
    #dayTable td:nth-child(6) {
        width: 82px;
    }

    #historyTable th:nth-child(1),
    #historyTable td:nth-child(1) {
        width: 34px;
    }

    #historyTable th:nth-child(2),
    #historyTable td:nth-child(2) {
        width: auto;
    }

    #historyTable th:nth-child(4),
    #historyTable td:nth-child(4) {
        width: 66px;
    }

    #historyTable th:nth-child(5),
    #historyTable td:nth-child(5) {
        width: 48px;
    }
}

@media (max-width: 430px) {
    .ranking-table th,
    .ranking-table td {
        padding-right: 4px;
        padding-left: 4px;
    }

    .player-name {
        font-size: 11px;
    }

    .player-inline-actions .action-button {
        min-width: 25px;
        padding: 0 4px;
    }

    #dayTable th:nth-child(6),
    #dayTable td:nth-child(6) {
        width: 72px;
    }
}


/**
 * Automatische modus en recruitment-weeklog
 * Versie: 1.6.0 stap 3
 */

.dashboard-mode-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: -12px 0 20px;
    padding: 11px 14px;
    border: 1px solid rgba(38, 167, 255, 0.18);
    border-radius: 13px;
    background: rgba(38, 167, 255, 0.055);
}

.dashboard-mode-panel > div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dashboard-mode-panel strong {
    color: var(--text);
    font-size: 11px;
}

.dashboard-mode-panel span,
.dashboard-mode-panel p {
    color: var(--muted);
    font-size: 11px;
}

.dashboard-mode-panel p {
    margin: 0;
    text-align: right;
}

.recruitment-section {
    border-color: rgba(38, 167, 255, 0.22);
}

.recruitment-heading {
    align-items: flex-start;
}

.recruitment-week-selector {
    display: flex;
    justify-content: flex-end;
    margin: -4px 0 14px;
}

.recruitment-week-selector label {
    display: flex;
    align-items: center;
    gap: 9px;
}

.recruitment-week-selector label > span {
    color: var(--muted);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.recruitment-week-selector select {
    min-width: 235px;
    height: 36px;
    padding: 0 34px 0 11px;
    border: 1px solid rgba(38, 167, 255, 0.25);
    border-radius: 10px;
    background: var(--panel-strong);
    color: var(--text);
    font: inherit;
    font-size: 11px;
    font-weight: 800;
}

.recruitment-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.recruitment-filters {
    grid-template-columns: minmax(220px, 2fr) 1fr 1fr auto;
}

.recruitment-empty-state {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 24px;
    border: 1px dashed var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.018);
    text-align: center;
}

.recruitment-empty-state strong {
    color: var(--text);
}

.recruitment-empty-state span {
    color: var(--muted);
    font-size: 12px;
}

.recruitment-table-panel {
    overflow-x: auto;
}

.recruitment-table {
    min-width: 1040px;
}

.recruitment-table th:nth-child(1),
.recruitment-table td:nth-child(1) {
    width: 54px;
}

.recruitment-table th:nth-child(2),
.recruitment-table td:nth-child(2) {
    width: 310px;
}

.recruitment-table th:nth-child(3),
.recruitment-table td:nth-child(3) {
    width: 175px;
}

.recruitment-table th:nth-child(4),
.recruitment-table td:nth-child(4) {
    width: 125px;
}

.recruitment-table th:nth-child(5),
.recruitment-table td:nth-child(5) {
    width: 125px;
}

.recruitment-table th:nth-child(6),
.recruitment-table td:nth-child(6) {
    width: 135px;
}

.recruitment-table th:nth-child(7),
.recruitment-table td:nth-child(7) {
    width: 66px;
}

.recruitment-table tbody tr {
    height: 62px;
}

.recruitment-table .player-cell {
    position: relative;
    padding-right: 138px;
}

.recruitment-table .player-name,
.recruitment-table .player-tag {
    display: block;
    margin: 0;
}

.recruitment-table .player-name {
    line-height: 1.08;
}

.recruitment-table .player-tag {
    margin-top: 2px;
    line-height: 1.05;
}

.recruitment-table .player-inline-actions {
    position: absolute;
    top: 50%;
    right: 12px;
    margin: 0;
    transform: translateY(-50%);
}

.recruitment-mobile-meta {
    display: none;
    margin-top: 3px;
    color: var(--muted);
    font-size: 9px;
}

.recruitment-joined-column strong,
.recruitment-joined-column span,
.recruitment-entry-type,
.recruitment-left-time {
    display: block;
}

.recruitment-joined-column strong {
    color: var(--text);
    font-size: 10px;
}

.recruitment-joined-column span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 9px;
}

.recruitment-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 62px;
    padding: 5px 7px;
    border-radius: 8px;
    font-size: 8px;
    font-weight: 900;
    line-height: 1.1;
    text-align: center;
}

.recruitment-status-watching {
    background: rgba(38, 167, 255, 0.14);
    color: #a9dcff;
}

.recruitment-status-retained {
    background: rgba(55, 210, 125, 0.13);
    color: #88edb3;
}

.recruitment-status-transferred {
    background: rgba(255, 207, 64, 0.13);
    color: #ffe28b;
}

.recruitment-status-departed {
    background: rgba(255, 98, 109, 0.13);
    color: #ffadb3;
}

.recruitment-entry-type,
.recruitment-left-time {
    margin-top: 3px;
    color: var(--muted);
    font-size: 8px;
}

.recruitment-history-summary {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.recruitment-history-summary strong {
    color: var(--text);
    font-size: 10px;
}

.recruitment-history-summary span {
    color: var(--muted);
    font-size: 8px;
}

.recruitment-no-history {
    display: inline-block;
    max-width: 120px;
    color: #f3d98f;
    font-size: 9px;
    font-weight: 800;
    line-height: 1.2;
}

.recruitment-details-button {
    min-width: 48px;
    height: 28px;
    padding: 0 7px;
}

.recruitment-dialog {
    width: min(760px, calc(100vw - 28px));
    max-height: min(86vh, 820px);
    padding: 0;
    border: 1px solid rgba(38, 167, 255, 0.3);
    border-radius: 16px;
    background: #0b1d31;
    color: var(--text);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.recruitment-dialog::backdrop {
    background: rgba(1, 8, 17, 0.78);
    backdrop-filter: blur(3px);
}

.recruitment-dialog[open] {
    animation: recruitment-dialog-in 120ms ease-out;
}

@keyframes recruitment-dialog-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.99);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.recruitment-dialog-shell {
    max-height: min(86vh, 820px);
    overflow-y: auto;
    padding: 18px;
}

.recruitment-dialog-heading,
.recruitment-dialog-player {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.recruitment-dialog-heading {
    position: sticky;
    top: -18px;
    z-index: 2;
    margin: -18px -18px 14px;
    padding: 13px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(11, 29, 49, 0.98);
}

.recruitment-dialog-heading h2 {
    margin: 0;
    font-size: 14px;
}

.recruitment-dialog-close {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.recruitment-dialog-player {
    padding-bottom: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.recruitment-dialog-player > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.recruitment-dialog-player > div strong {
    font-size: 16px;
}

.recruitment-dialog-player > div span {
    color: var(--muted);
    font-size: 10px;
}

.recruitment-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin: 14px 0;
}

.recruitment-detail-grid > div {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    padding: 10px 11px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.025);
}

.recruitment-detail-grid span,
.recruitment-event-list span,
.recruitment-history-list span {
    color: var(--muted);
    font-size: 9px;
}

.recruitment-detail-grid strong,
.recruitment-event-list strong,
.recruitment-history-list strong {
    color: var(--text);
    font-size: 11px;
}

.recruitment-detail-section {
    margin-top: 15px;
}

.recruitment-detail-section h3 {
    margin: 0 0 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.recruitment-event-list,
.recruitment-history-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.recruitment-event-list article {
    display: grid;
    grid-template-columns: minmax(170px, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.02);
}

.recruitment-history-list article {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 84px 64px;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.02);
}

.recruitment-history-list article > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.recruitment-history-list article > div:first-child span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recruitment-detail-empty {
    margin: 0;
    padding: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.5;
}

@media (max-width: 900px) {
    .recruitment-filters {
        grid-template-columns: 1fr 1fr;
    }

    .recruitment-filters .ranking-search {
        grid-column: 1 / -1;
    }

    .recruitment-filters .ranking-count {
        align-self: end;
    }
}

@media (max-width: 760px) {
    .dashboard-mode-panel {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .dashboard-mode-panel p {
        text-align: left;
    }

    .recruitment-heading {
        gap: 10px;
    }

    .recruitment-week-selector {
        justify-content: stretch;
        margin-top: 0;
    }

    .recruitment-week-selector label {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
        gap: 5px;
    }

    .recruitment-week-selector select {
        width: 100%;
        min-width: 0;
    }

    .recruitment-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .recruitment-table-panel {
        overflow-x: visible;
    }

    .recruitment-table {
        width: 100%;
        min-width: 0;
        table-layout: fixed;
    }

    .recruitment-table tbody tr {
        height: 64px;
    }

    .recruitment-table .recruitment-clan-column,
    .recruitment-table .recruitment-joined-column {
        display: none;
    }

    .recruitment-table th:nth-child(1),
    .recruitment-table td:nth-child(1) {
        width: 39px;
    }

    .recruitment-table th:nth-child(2),
    .recruitment-table td:nth-child(2) {
        width: auto;
    }

    .recruitment-table th:nth-child(5),
    .recruitment-table td:nth-child(5) {
        width: 77px;
    }

    .recruitment-table th:nth-child(6),
    .recruitment-table td:nth-child(6) {
        width: 72px;
    }

    .recruitment-table th:nth-child(7),
    .recruitment-table td:nth-child(7) {
        width: 52px;
    }

    .recruitment-table .player-cell {
        padding-right: 5px;
    }

    .recruitment-table .player-inline-actions {
        position: static;
        margin-top: 4px;
        transform: none;
    }

    .recruitment-table .player-inline-actions .action-button {
        width: 24px;
        min-width: 24px;
        height: 23px;
        padding: 0;
        font-size: 7px;
    }

    .recruitment-mobile-meta {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .recruitment-status-badge {
        min-width: 0;
        max-width: 70px;
        padding: 4px 5px;
        font-size: 7px;
        white-space: normal;
    }

    .recruitment-entry-type,
    .recruitment-left-time {
        font-size: 6px;
    }

    .recruitment-history-summary strong {
        font-size: 8px;
    }

    .recruitment-history-summary span {
        font-size: 6px;
    }

    .recruitment-no-history {
        max-width: 66px;
        font-size: 7px;
    }

    .recruitment-details-button {
        min-width: 42px;
        height: 26px;
        padding: 0 4px;
        font-size: 7px;
    }

    .recruitment-dialog {
        width: calc(100vw - 16px);
        max-height: calc(100dvh - 16px);
        border-radius: 13px;
    }

    .recruitment-dialog-shell {
        max-height: calc(100dvh - 16px);
        padding: 13px;
    }

    .recruitment-dialog-heading {
        top: -13px;
        margin: -13px -13px 12px;
        padding: 11px 13px;
    }

    .recruitment-detail-grid {
        grid-template-columns: 1fr;
    }

    .recruitment-event-list article {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .recruitment-history-list article {
        grid-template-columns: minmax(0, 1fr) 65px 48px;
        gap: 6px;
    }
}

@media (max-width: 520px) {
    .recruitment-filters {
        grid-template-columns: 1fr;
    }

    .recruitment-filters .ranking-search {
        grid-column: auto;
    }

    .recruitment-summary-grid .summary-card {
        min-height: 72px;
    }

    .recruitment-table th:nth-child(5),
    .recruitment-table td:nth-child(5) {
        width: 70px;
    }

    .recruitment-table th:nth-child(6),
    .recruitment-table td:nth-child(6) {
        width: 64px;
    }

    .recruitment-table th:nth-child(7),
    .recruitment-table td:nth-child(7) {
        width: 48px;
    }

    .recruitment-history-summary span:last-child {
        display: none;
    }
}

/**
 * War-overzicht: strakke desktoprijen
 * Versie: 1.5.0 stap 4.1
 *
 * Houdt de tabelcellen echte table-cells. Daardoor blijven
 * alle scheidingslijnen en kolommen exact op één hoogte.
 * De naam en spelerstag staan links onder elkaar; de
 * snelknoppen blijven rechts in dezelfde spelerscel.
 */
@media (min-width: 761px) {
    #weekTable tbody tr:not([data-detail-row]) {
        height: 62px;
    }

    #weekTable tbody td {
        box-sizing: border-box;
        padding-top: 7px;
        padding-bottom: 7px;
        vertical-align: middle !important;
    }

    #weekTable .player-cell {
        position: relative;
        display: table-cell !important;
        min-width: 330px;
        padding-right: 205px;
        overflow: visible;
        vertical-align: middle !important;
    }

    #weekTable .player-name,
    #weekTable .player-tag {
        position: relative;
        top: -2px;
        display: block;
        max-width: calc(100% - 4px);
        margin-right: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    #weekTable .player-name {
        margin-top: 0;
        margin-bottom: 0;
        font-size: 14px;
        line-height: 1.05;
    }

    #weekTable .player-tag {
        margin-top: 2px;
        font-size: 10px;
        line-height: 1;
    }

    #weekTable .player-inline-actions {
        position: absolute;
        top: 50%;
        right: 16px;
        display: flex;
        flex-wrap: nowrap;
        gap: 4px;
        margin: 0;
        transform: translateY(-50%);
    }

    #weekTable .player-inline-actions .action-button {
        flex: 0 0 auto;
    }

    #weekTable .desktop-clan-cell,
    #weekTable .score,
    #weekTable .compact-decks-cell {
        vertical-align: middle !important;
    }
}



/**
 * Geïntegreerde War-pagina
 * Versie: 1.6.1
 */

.war-section-heading {
    align-items: flex-start;
}

.war-heading-context {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.war-current-day-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border: 1px solid rgba(61, 220, 151, 0.34);
    border-radius: 999px;
    background: rgba(61, 220, 151, 0.1);
    color: #82efb5;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.war-day-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid rgba(38, 167, 255, 0.18);
    border-radius: 13px;
    background: rgba(38, 167, 255, 0.055);
}

.war-day-tabs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.war-day-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 66px;
    min-height: 34px;
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-decoration: none;
}

.war-day-tab:hover {
    border-color: rgba(38, 167, 255, 0.42);
    background: rgba(38, 167, 255, 0.1);
    color: var(--text);
}

.war-day-tab.active {
    border-color: rgba(38, 167, 255, 0.7);
    background: rgba(38, 167, 255, 0.2);
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(38, 167, 255, 0.12);
}

.war-day-selector-info {
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    gap: 2px;
    text-align: right;
}

.war-day-selector-info strong {
    color: var(--text);
    font-size: 13px;
}

.war-day-selector-info span {
    color: var(--muted);
    font-size: 10px;
}

.war-empty-state {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px;
    border: 1px dashed rgba(38, 167, 255, 0.3);
    border-radius: 13px;
    background: rgba(38, 167, 255, 0.045);
}

.war-empty-state strong {
    color: var(--text);
    font-size: 14px;
}

.war-empty-state span {
    max-width: 700px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.55;
}

.war-summary-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.summary-card .war-summary-detail {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    line-height: 1.25;
    text-transform: none;
}

.summary-card .war-summary-detail span {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    text-transform: none;
}

.war-position-summary-card strong {
    white-space: nowrap;
}

.deadline-summary-card strong {
    white-space: nowrap;
}

.war-race-overview {
    margin: 0 0 18px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(14, 34, 57, 0.9);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.war-race-view[hidden] {
    display: none !important;
}

.war-race-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 13px 16px 11px;
    border-bottom: 1px solid var(--border);
}

.war-race-heading > div:first-child {
    min-width: 0;
}

.war-race-heading strong {
    display: block;
    color: var(--text);
    font-size: 14px;
}

.war-race-heading span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.4;
}

.war-race-heading-position {
    display: flex;
    flex: 0 0 auto;
    align-items: baseline;
    gap: 6px;
    padding: 7px 10px;
    border: 1px solid rgba(38, 167, 255, 0.26);
    border-radius: 10px;
    background: rgba(38, 167, 255, 0.07);
}

.war-race-heading-position span {
    margin: 0;
    font-size: 9px;
}

.war-race-heading-position strong {
    display: inline;
    font-size: 14px;
}

.war-race-table-wrap {
    overflow-x: auto;
}

.war-race-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

.war-race-summary-table {
    min-width: 520px;
}

.war-race-table th,
.war-race-table td {
    padding: 9px 11px;
    border-bottom: 1px solid rgba(125, 161, 196, 0.12);
    text-align: left;
    vertical-align: middle;
}

.war-race-table th {
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
}

.war-race-table td {
    color: var(--text);
    font-size: 11px;
}

.war-race-table tbody tr:last-child td {
    border-bottom: 0;
}

.war-race-table td strong {
    font-size: 11px;
}

.war-race-table td small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 8px;
    white-space: nowrap;
}

.war-race-table tr.is-selected-race-clan td {
    background: rgba(38, 167, 255, 0.08);
}

.war-race-table tr.is-selected-race-clan td:first-child {
    box-shadow: inset 3px 0 0 rgba(38, 167, 255, 0.8);
}

.war-race-rank {
    width: 34px;
    color: var(--muted) !important;
    font-weight: 900;
    text-align: center !important;
}

.war-race-own-label {
    display: inline-flex !important;
    margin: 0 0 0 6px !important;
    padding: 2px 5px;
    border-radius: 999px;
    background: rgba(38, 167, 255, 0.12);
    color: var(--blue) !important;
    font-size: 7px !important;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    vertical-align: 1px;
}

.war-race-position-badge,
.war-race-potential {
    display: inline-flex;
    min-width: 30px;
    min-height: 24px;
    align-items: center;
    justify-content: center;
    padding: 3px 7px;
    border: 1px solid rgba(125, 161, 196, 0.25);
    border-radius: 999px;
    background: rgba(125, 161, 196, 0.08);
    color: var(--text);
    font-size: 10px;
    font-weight: 900;
}

.war-race-potential.is-up {
    border-color: rgba(58, 209, 143, 0.35);
    background: rgba(58, 209, 143, 0.1);
    color: #83e7b8;
}

.war-race-potential.is-down {
    border-color: rgba(255, 98, 109, 0.35);
    background: rgba(255, 98, 109, 0.08);
    color: #ff9aa2;
}

.war-race-potential.is-same {
    border-color: rgba(38, 167, 255, 0.3);
    background: rgba(38, 167, 255, 0.08);
    color: #8bd3ff;
}

.war-table {
    min-width: 1040px;
}

.war-table .week-score-cell strong {
    display: block;
}

.score-subline {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    white-space: nowrap;
}

.day-score-cell {
    min-width: 76px;
}

.games-cell {
    min-width: 70px;
    text-align: center;
}

.games-cell strong,
.games-cell span {
    display: block;
}

.games-cell span {
    margin-top: 2px;
    color: #ffb65c;
    font-size: 9px;
    font-weight: 800;
    white-space: nowrap;
}

.games-cell.games-complete strong,
.games-cell.games-complete span {
    color: #73eba7;
}

.deadline-column-heading {
    width: 70px;
    text-align: center;
}

.deadline-column-heading abbr {
    border: 0;
    text-decoration: none;
    cursor: help;
}

.week-deadline-cell {
    width: 70px;
    text-align: center;
    vertical-align: middle !important;
}

.deadline-compact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    min-height: 28px;
    padding: 4px 7px;
    white-space: nowrap;
}

@media (min-width: 761px) {
    #weekTable .player-cell {
        min-width: 300px;
        padding-right: 196px;
    }

    #weekTable .player-inline-actions {
        right: 12px;
    }

    #weekTable .week-score-cell,
    #weekTable .day-score-cell,
    #weekTable .games-cell,
    #weekTable .week-deadline-cell {
        vertical-align: middle !important;
    }
}

@media (max-width: 1120px) {
    .war-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .war-race-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 9px;
    }

    .war-race-heading-position {
        width: 100%;
        justify-content: flex-start;
    }

    .war-race-table {
        min-width: 660px;
    }

    .war-race-summary-table {
        min-width: 460px;
    }

    .war-race-table th,
    .war-race-table td {
        padding: 8px 9px;
    }

    .war-section-heading,
    .war-day-selector {
        align-items: stretch;
        flex-direction: column;
    }

    .war-heading-context {
        justify-content: flex-start;
    }

    .war-day-selector {
        gap: 10px;
    }

    .war-day-tabs {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        width: 100%;
    }

    .war-day-tab {
        min-width: 0;
        padding-right: 5px;
        padding-left: 5px;
    }

    .war-day-selector-info {
        align-items: flex-start;
        text-align: left;
    }

    .war-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .war-table {
        min-width: 0 !important;
    }

    #weekTable th:nth-child(1),
    #weekTable td:nth-child(1) {
        width: 32px;
    }

    #weekTable th:nth-child(2),
    #weekTable td:nth-child(2) {
        width: auto;
    }

    #weekTable th:nth-child(4),
    #weekTable td:nth-child(4) {
        width: 54px;
    }

    #weekTable th:nth-child(5),
    #weekTable td:nth-child(5) {
        width: 52px;
    }

    #weekTable th:nth-child(6),
    #weekTable td:nth-child(6) {
        width: 48px;
    }

    #weekTable th:nth-child(7),
    #weekTable td:nth-child(7) {
        width: 52px;
    }

    .score-subline,
    .games-cell span {
        font-size: 7px;
    }

    .deadline-compact {
        min-width: 38px;
        min-height: 24px;
        padding: 3px 4px;
        font-size: 8px;
    }
}

@media (max-width: 520px) {
    .war-summary-grid {
        grid-template-columns: 1fr 1fr;
    }

    .war-filters {
        grid-template-columns: 1fr;
    }

    .war-filters .ranking-search,
    .war-filters .member-history-toggle {
        grid-column: auto;
    }
}


/**
 * Nieuwe leden: compact instroomlog
 * Versie: 1.6.2
 */
.recruitment-week-tabs {
    display: flex;
    gap: 7px;
    margin: -4px 0 15px;
    padding-bottom: 3px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.recruitment-week-tab {
    flex: 0 0 auto;
    padding: 8px 11px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--muted);
    font-size: 9px;
    font-weight: 850;
    text-decoration: none;
    white-space: nowrap;
}

.recruitment-week-tab:hover {
    border-color: rgba(38, 167, 255, 0.38);
    color: var(--text);
}

.recruitment-week-tab.active {
    border-color: rgba(38, 167, 255, 0.55);
    background: rgba(38, 167, 255, 0.13);
    color: #b9e5ff;
}

.recruitment-table {
    min-width: 980px;
}

.recruitment-table th:nth-child(1),
.recruitment-table td:nth-child(1) {
    width: 50px;
}

.recruitment-table th:nth-child(2),
.recruitment-table td:nth-child(2) {
    width: 305px;
}

.recruitment-table th:nth-child(3),
.recruitment-table td:nth-child(3) {
    width: 180px;
}

.recruitment-table th:nth-child(4),
.recruitment-table td:nth-child(4) {
    width: 125px;
}

.recruitment-table th:nth-child(5),
.recruitment-table td:nth-child(5) {
    width: 150px;
}

.recruitment-table th:nth-child(6),
.recruitment-table td:nth-child(6) {
    width: 110px;
}

.recruitment-table th:nth-child(7),
.recruitment-table td:nth-child(7) {
    width: 62px;
}

.recruitment-table tbody tr {
    height: 58px;
}

.recruitment-table tbody td {
    padding-top: 6px;
    padding-bottom: 6px;
    vertical-align: middle;
}

.recruitment-status-column,
.recruitment-duration-column {
    line-height: 1.15;
}

.recruitment-status-explanation,
.recruitment-duration-column strong,
.recruitment-duration-column span {
    display: block;
}

.recruitment-status-explanation {
    max-width: 145px;
    margin-top: 3px;
    color: var(--muted);
    font-size: 7px;
}

.recruitment-duration-column strong {
    color: var(--text);
    font-size: 10px;
}

.recruitment-duration-column span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 8px;
}

.recruitment-dialog {
    width: min(680px, calc(100vw - 28px));
}

.recruitment-detail-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 760px) {
    .recruitment-week-tabs {
        margin-top: 0;
    }

    .recruitment-week-tab {
        padding: 7px 9px;
        font-size: 8px;
    }

    .recruitment-table {
        width: 100%;
        min-width: 0;
        table-layout: fixed;
    }

    .recruitment-table tbody tr {
        height: 60px;
    }

    .recruitment-table .recruitment-clan-column,
    .recruitment-table .recruitment-joined-column {
        display: none;
    }

    .recruitment-table th:nth-child(1),
    .recruitment-table td:nth-child(1) {
        width: 36px;
    }

    .recruitment-table th:nth-child(2),
    .recruitment-table td:nth-child(2) {
        width: auto;
    }

    .recruitment-table th:nth-child(5),
    .recruitment-table td:nth-child(5) {
        width: 76px;
    }

    .recruitment-table th:nth-child(6),
    .recruitment-table td:nth-child(6) {
        width: 58px;
    }

    .recruitment-table th:nth-child(7),
    .recruitment-table td:nth-child(7) {
        width: 46px;
    }

    .recruitment-status-explanation {
        display: none;
    }

    .recruitment-duration-column strong {
        font-size: 8px;
    }

    .recruitment-duration-column span {
        font-size: 6px;
    }

    .recruitment-details-button {
        min-width: 39px;
        height: 25px;
        padding: 0 4px;
        font-size: 7px;
    }

    .recruitment-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .recruitment-table th:nth-child(5),
    .recruitment-table td:nth-child(5) {
        width: 68px;
    }

    .recruitment-table th:nth-child(6),
    .recruitment-table td:nth-child(6) {
        width: 52px;
    }

    .recruitment-table th:nth-child(7),
    .recruitment-table td:nth-child(7) {
        width: 43px;
    }

    .recruitment-status-badge {
        max-width: 64px;
    }
}


/**
 * Nieuwe leden: recente clan- en warhistorie
 * Versie: 1.6.5
 */
.recruitment-table {
    min-width: 1080px;
}

.recruitment-table th:nth-child(1),
.recruitment-table td:nth-child(1) {
    width: 50px;
}

.recruitment-table th:nth-child(2),
.recruitment-table td:nth-child(2) {
    width: 285px;
}

.recruitment-table th:nth-child(3),
.recruitment-table td:nth-child(3) {
    width: 190px;
}

.recruitment-table th:nth-child(4),
.recruitment-table td:nth-child(4) {
    width: 120px;
}

.recruitment-table th:nth-child(5),
.recruitment-table td:nth-child(5) {
    width: 145px;
}

.recruitment-table th:nth-child(6),
.recruitment-table td:nth-child(6) {
    width: 100px;
}

.recruitment-table th:nth-child(7),
.recruitment-table td:nth-child(7) {
    width: 100px;
}

.recruitment-table th:nth-child(8),
.recruitment-table td:nth-child(8) {
    width: 60px;
}

.recruitment-history-column {
    line-height: 1.15;
}

.recruitment-war2-link,
.recruitment-war2-detail-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(38, 167, 255, 0.3);
    border-radius: 8px;
    background: rgba(38, 167, 255, 0.09);
    color: #a9dcff;
    font-size: 8px;
    font-weight: 900;
    line-height: 1.15;
    text-decoration: none;
}

.recruitment-war2-link {
    min-height: 28px;
    padding: 5px 7px;
    text-align: center;
}

.recruitment-war2-detail-link {
    margin-top: 9px;
    padding: 8px 10px;
}

.recruitment-war2-link:hover,
.recruitment-war2-detail-link:hover {
    border-color: rgba(38, 167, 255, 0.58);
    background: rgba(38, 167, 255, 0.16);
    color: #d4efff;
}

.recruitment-history-summary span {
    display: block;
    max-width: 95px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recruitment-clan-column .current-clan-note {
    max-width: 180px;
    line-height: 1.25;
    white-space: normal;
}

@media (max-width: 760px) {
    .recruitment-table {
        width: 100%;
        min-width: 0;
        table-layout: fixed;
    }

    .recruitment-table .recruitment-clan-column,
    .recruitment-table .recruitment-joined-column,
    .recruitment-table .recruitment-duration-column {
        display: none;
    }

    .recruitment-table th:nth-child(1),
    .recruitment-table td:nth-child(1) {
        width: 36px;
    }

    .recruitment-table th:nth-child(2),
    .recruitment-table td:nth-child(2) {
        width: auto;
    }

    .recruitment-table th:nth-child(5),
    .recruitment-table td:nth-child(5) {
        width: 70px;
    }

    .recruitment-table th:nth-child(7),
    .recruitment-table td:nth-child(7) {
        width: 62px;
    }

    .recruitment-table th:nth-child(8),
    .recruitment-table td:nth-child(8) {
        width: 43px;
    }

    .recruitment-history-summary strong {
        font-size: 8px;
    }

    .recruitment-history-summary span {
        max-width: 58px;
        font-size: 6px;
    }

    .recruitment-war2-link {
        min-height: 25px;
        padding: 4px;
        font-size: 7px;
    }
}

@media (max-width: 520px) {
    .recruitment-table th:nth-child(5),
    .recruitment-table td:nth-child(5) {
        width: 64px;
    }

    .recruitment-table th:nth-child(7),
    .recruitment-table td:nth-child(7) {
        width: 56px;
    }

    .recruitment-table th:nth-child(8),
    .recruitment-table td:nth-child(8) {
        width: 41px;
    }

    .recruitment-history-summary span {
        display: none;
    }
}

/**
 * Warpagina-correcties
 * Versie: 1.6.7
 *
 * Dynamische samenvatting, compactere mobiele rangkolom en
 * extra ruimte tussen Games-sortering en de 10:00-kolom.
 */

.war-games-summary {
    white-space: nowrap;
}

@media (max-width: 760px) {
    #weekTable th,
    #weekTable td {
        padding-right: 4px;
        padding-left: 4px;
    }

    #weekTable th:nth-child(1),
    #weekTable td:nth-child(1) {
        width: 27px;
        padding-right: 2px;
        padding-left: 2px;
    }

    #weekTable .position-badge {
        min-width: 21px;
        width: 21px;
        height: 21px;
        padding: 0 3px;
        border-radius: 7px;
        font-size: 9px;
    }

    #weekTable th:nth-child(4),
    #weekTable td:nth-child(4),
    #weekTable th:nth-child(5),
    #weekTable td:nth-child(5),
    #weekTable th:nth-child(6),
    #weekTable td:nth-child(6) {
        transform: translateX(-1px);
    }

    #weekTable .sort-button {
        gap: 2px;
    }

    #weekTable .sort-button::after {
        flex: 0 0 auto;
        font-size: 9px;
    }

    #weekTable th:nth-child(6) .sort-button {
        font-size: 8px;
    }

    #weekTable .games-cell strong {
        font-size: 11px;
    }

    #weekTable .games-cell span {
        font-size: 6px;
    }

    #weekTable .deadline-column-heading {
        padding-right: 1px;
        padding-left: 2px;
    }

    #weekTable .deadline-column-heading abbr {
        display: block;
        text-align: right;
        white-space: nowrap;
    }
}

/**
 * v1.6.7 — Nieuwe leden: mobiele actuele clanstatus.
 */
.recruitment-mobile-situation {
    display: none;
}

@media (max-width: 760px) {
    .recruitment-mobile-situation {
        display: block;
        max-width: 100%;
        margin-top: 2px;
        overflow: hidden;
        color: #a8b7cb;
        font-size: 7px;
        font-weight: 700;
        line-height: 1.2;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .recruitment-table tr.is-banned-player .recruitment-mobile-situation {
        color: #ffadb3;
    }

    .recruitment-table .public-ban-badge {
        margin-left: 4px;
        padding: 2px 4px;
        font-size: 7px;
    }
}

/* v1.6.8 — War terugkijken via seizoen, warweek en wardag. */
.history-selector.war-period-selector {
    grid-template-columns: repeat(3, minmax(150px, 240px));
}

.war-period-info {
    margin: -4px 0 16px;
}

@media (max-width: 760px) {
    .history-selector.war-period-selector {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        padding: 12px;
    }

    .history-selector.war-period-selector .ranking-control span {
        font-size: 10px;
    }

    .history-selector.war-period-selector select {
        min-height: 40px;
        padding: 8px 7px;
        font-size: 12px;
    }
}

@media (max-width: 520px) {
    .history-selector.war-period-selector {
        grid-template-columns: 1fr;
    }

    .war-period-info {
        align-items: flex-start;
        text-align: left;
    }
}


/**
 * War Masters v1.7.1
 * Compactere mobiele War-weergave en onderaan geplaatste statusinfo.
 */

.dashboard-bottom-status {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 26px 0 0;
    padding: 10px 12px;
    border-top: 1px solid rgba(125, 161, 196, 0.16);
    color: var(--muted);
    font-size: 9px;
    line-height: 1.35;
}

.dashboard-bottom-status strong {
    color: var(--text);
    font-weight: 800;
}

.score-subline .score-games,
.score-subline .score-average {
    display: inline;
}

.score-subline .score-games::after {
    content: " · ";
}

.war-race-mobile-stats {
    display: none;
}

@media (max-width: 760px) {
    .dashboard-header {
        padding-bottom: 12px;
    }

    .dashboard-tabs {
        margin-bottom: 14px;
    }

    .war-section-heading {
        margin-bottom: 8px;
    }

    .war-race-heading {
        padding: 9px 10px 8px;
    }

    .war-race-heading > div:first-child > span {
        display: none;
    }

    /* Alle Masters-clans: drie zeer compacte kolommen, zonder horizontaal schuiven. */
    .war-race-summary-table {
        width: 100%;
        min-width: 0;
        table-layout: fixed;
    }

    .war-race-summary-table th,
    .war-race-summary-table td {
        padding: 6px 6px;
    }

    .war-race-summary-table th {
        font-size: 7px;
        white-space: normal;
        line-height: 1.1;
    }

    .war-race-summary-table td {
        font-size: 9px;
    }

    .war-race-summary-table th:first-child,
    .war-race-summary-table td:first-child {
        width: 58%;
    }

    .war-race-summary-table th:nth-child(2),
    .war-race-summary-table td:nth-child(2),
    .war-race-summary-table th:nth-child(3),
    .war-race-summary-table td:nth-child(3) {
        width: 21%;
        text-align: center;
    }

    .war-race-summary-table td:first-child strong {
        display: block;
        overflow: hidden;
        font-size: 9px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .war-race-summary-table td small {
        display: none;
    }

    .war-race-summary-table .war-race-position-badge,
    .war-race-summary-table .war-race-potential {
        min-width: 25px;
        min-height: 20px;
        padding: 2px 5px;
        font-size: 8px;
    }

    /* Eén clan: elke tegenstander wordt een compacte tweeregelige rij. */
    .war-race-table:not(.war-race-summary-table) {
        width: 100%;
        min-width: 0;
        table-layout: auto;
    }

    .war-race-table:not(.war-race-summary-table) thead {
        display: none;
    }

    .war-race-table:not(.war-race-summary-table) tbody tr {
        display: grid;
        grid-template-columns: 28px minmax(0, 1fr);
        border-bottom: 1px solid rgba(125, 161, 196, 0.12);
    }

    .war-race-table:not(.war-race-summary-table) tbody tr:last-child {
        border-bottom: 0;
    }

    .war-race-table:not(.war-race-summary-table) td {
        display: none;
        border-bottom: 0;
    }

    .war-race-table:not(.war-race-summary-table) td.war-race-rank,
    .war-race-table:not(.war-race-summary-table) td:nth-child(2) {
        display: block;
        padding: 8px 5px;
    }

    .war-race-table:not(.war-race-summary-table) td.war-race-rank {
        width: auto;
        padding-top: 10px;
        font-size: 10px;
    }

    .war-race-table:not(.war-race-summary-table) td:nth-child(2) > strong {
        font-size: 10px;
    }

    .war-race-table:not(.war-race-summary-table) tr.is-selected-race-clan td {
        background: rgba(38, 167, 255, 0.08);
    }

    .war-race-table:not(.war-race-summary-table) tr.is-selected-race-clan td.war-race-rank {
        box-shadow: inset 3px 0 0 rgba(38, 167, 255, 0.8);
    }

    .war-race-mobile-stats {
        display: flex;
        flex-wrap: wrap;
        gap: 3px 8px;
        margin-top: 4px;
        color: var(--muted);
        font-size: 7px;
        line-height: 1.3;
    }

    .war-race-mobile-stats span {
        margin: 0;
        white-space: nowrap;
    }

    .war-race-mobile-stats strong {
        display: inline !important;
        color: var(--text);
        font-size: 8px !important;
    }

    .war-race-mobile-potential {
        font-weight: 900;
    }

    .war-race-mobile-potential.is-up {
        color: #83e7b8;
    }

    .war-race-mobile-potential.is-down {
        color: #ff9aa2;
    }

    .war-race-mobile-potential.is-same {
        color: #8bd3ff;
    }

    /* Week- en daggemiddelde onder de gamesregel, zodat niets de volgende kolom inloopt. */
    .score-subline {
        white-space: normal;
        line-height: 1.15;
    }

    .score-subline .score-games,
    .score-subline .score-average {
        display: block;
    }

    .score-subline .score-games::after {
        content: "";
    }

    .score-subline .score-average {
        margin-top: 1px;
    }

    .dashboard-bottom-status {
        margin-top: 18px;
        padding: 9px 4px 0;
        font-size: 8px;
    }
}


/**
 * War-bediening en inklapbare dagstand
 * Versie: 1.7.2
 */
.war-filters {
    margin: 0 0 14px;
}

.war-period-selector {
    margin-top: 0;
}

.war-race-toggle {
    display: flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 16px;
    border: 0;
    border-radius: 0;
    background: rgba(19, 42, 70, 0.84);
    color: var(--text);
    font: inherit;
    font-size: 13px;
    font-weight: 900;
    text-align: left;
    cursor: pointer;
}

.war-race-toggle:hover {
    background: rgba(38, 167, 255, 0.1);
}

.war-race-toggle-arrow {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: #bfe7ff;
    font-size: 21px;
    line-height: 1;
    transform: rotate(-90deg);
    transition: transform 0.16s ease;
}

.war-race-overview.is-expanded .war-race-toggle-arrow {
    transform: rotate(0deg);
}

.war-race-content[hidden] {
    display: none !important;
}

.war-race-content {
    border-top: 1px solid var(--border);
}

@media (max-width: 760px) {
    .war-race-toggle {
        min-height: 44px;
        padding: 10px 12px;
        font-size: 12px;
    }

    .war-race-toggle-arrow {
        width: 24px;
        height: 24px;
        font-size: 18px;
    }
}

/**
 * War-bediening verfijning
 * Versie: 1.7.3
 * Compacte periodebalk, informatieve Dagstand-kop en geen spelercounter.
 */
.war-period-collapse {
    margin: 0 0 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(14, 34, 57, 0.9);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.war-period-toggle {
    display: flex;
    width: 100%;
    min-height: 52px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 11px 16px;
    border: 0;
    background: rgba(19, 42, 70, 0.84);
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.war-period-toggle:hover {
    background: rgba(38, 167, 255, 0.1);
}

.war-period-toggle-text {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.war-period-toggle-text strong {
    color: var(--text);
    font-size: 13px;
    font-weight: 900;
}

.war-period-toggle-text > span {
    color: #bfe7ff;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.3;
}

.war-period-toggle-arrow {
    display: inline-flex;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    color: #bfe7ff;
    font-size: 21px;
    line-height: 1;
    transform: rotate(-90deg);
    transition: transform 0.16s ease;
}

.war-period-collapse.is-expanded .war-period-toggle-arrow {
    transform: rotate(0deg);
}

.war-period-content[hidden] {
    display: none !important;
}

.war-period-content {
    padding: 12px 14px 10px;
    border-top: 1px solid var(--border);
}

.war-period-collapse .history-selector.war-period-selector {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.war-period-collapse .war-period-info {
    margin: 10px 0 0;
}

.war-race-toggle > [data-war-race-toggle-label] {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .war-period-toggle {
        min-height: 46px;
        padding: 9px 12px;
    }

    .war-period-toggle-text strong {
        font-size: 12px;
    }

    .war-period-toggle-text > span {
        font-size: 9px;
    }

    .war-period-toggle-arrow {
        width: 24px;
        height: 24px;
        font-size: 18px;
    }

    .war-period-content {
        padding: 10px;
    }

    .war-race-toggle > [data-war-race-toggle-label] {
        font-size: 11px;
    }
}


@media (min-width: 1121px) {
    .war-filters {
        grid-template-columns:
            minmax(210px, 1.7fr)
            minmax(150px, 1fr)
            minmax(150px, 1fr)
            minmax(230px, 1.25fr);
    }
}


/**
 * v1.7.4 - dagstandlinks en spelersinfo
 */
.war-race-clan-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 25px;
    min-height: 20px;
    margin-left: 5px;
    padding: 2px 5px;
    border: 1px solid rgba(38, 167, 255, 0.28);
    border-radius: 6px;
    background: rgba(38, 167, 255, 0.08);
    color: #9edcff;
    font-size: 7px;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    vertical-align: 1px;
}

.war-race-clan-link:hover {
    background: rgba(38, 167, 255, 0.2);
    color: #fff;
}

.action-info {
    border-color: rgba(181, 140, 255, 0.4);
    background: rgba(181, 140, 255, 0.12);
    color: #d2b8ff;
}

.action-info:hover {
    background: rgba(181, 140, 255, 0.24) !important;
    color: #fff !important;
}

@media (max-width: 760px) {
    .war-race-clan-link {
        min-width: 22px;
        min-height: 18px;
        margin-left: 3px;
        padding: 2px 4px;
        font-size: 6px;
    }

    .war-race-mobile-stats span:nth-child(2) {
        flex-basis: 100%;
    }
}


/**
 * v1.7.5 - spelersnaam opent Info in het War-overzicht
 */
.player-name-info {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: inherit;
    text-align: left;
    cursor: pointer;
}

.player-name-info:hover,
.player-name-info:focus-visible {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.player-name-info:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
    border-radius: 3px;
}
