/* Modern application theme on top of Bootstrap 5.3.8. */
:root {
    --app-primary: #F2C300;
    --app-primary-dark: #111111;
    --app-ink: #172033;
    --app-muted: #6b7280;
    --app-bg: #f4f7fb;
    --app-surface: #ffffff;
    --app-border: #e5eaf1;
    --app-shadow: 0 10px 30px rgba(23, 32, 51, .07);
    --app-radius: 1rem;
}

html { overflow-y: auto; }
body {
    margin: 0;
    background: var(--app-bg) !important;
    color: var(--app-ink);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    padding-top: 78px;
    line-height: 1.55;
}

.site-shell { min-height: 100vh; display: flex; flex-direction: column; }
.app-container { width: 100%; max-width: 1440px; padding-left: 1rem; padding-right: 1rem; flex: 1 0 auto; }
.dashboard-container { max-width: 1600px; }

/* Navigation */
.navbar.fixed-top {
    background: rgba(17, 25, 39, .96) !important;
    backdrop-filter: blur(14px);
    box-shadow: 0 6px 24px rgba(0,0,0,.12);
    border-bottom: 1px solid rgba(255,255,255,.08);
    min-height: 64px;
}
.navbar .container { max-width: 1440px; }
.navbar-brand { font-weight: 750; letter-spacing: -.02em; }
.navbar .nav-link {
    border-radius: .65rem;
    padding: .55rem .75rem !important;
    color: rgba(255,255,255,.78) !important;
    transition: background-color .18s ease, color .18s ease, transform .18s ease;
}
.navbar .nav-link:hover,
.navbar .nav-link:focus { color: #fff !important; background: rgba(255,255,255,.08); }
.navbar #currentpage { color: #fff !important; background: linear-gradient(135deg, var(--app-primary), var(--app-primary-dark)); }
.navbar .dropdown-menu {
    border: 1px solid rgba(0,0,0,.06);
    border-radius: .8rem;
    padding: .45rem;
    box-shadow: 0 16px 40px rgba(23,32,51,.14);
}
.navbar .dropdown-item { border-radius: .55rem; padding: .55rem .75rem; }
.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus { background: #FFF8CC; color: var(--app-primary-dark); }

header { text-align: center; margin: 1.5rem 0 1rem; }
header h1, header h2, header h3 { font-weight: 750; letter-spacing: -.025em; }



/* Cards, forms and buttons */
.card {
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    box-shadow: var(--app-shadow);
}
.form-control, .form-select, .input-group-text {
    border-color: #dbe2ea;
    border-radius: .65rem;
}
.form-control:focus, .form-select:focus {
    border-color: rgba(59,171,236,.65);
    box-shadow: 0 0 0 .2rem rgba(59,171,236,.14);
}
.input-group > .form-control { border-radius: 0 .65rem .65rem 0; }
.input-group > .input-group-text { border-radius: .65rem 0 0 .65rem; }
.btn {
    border-radius: .65rem;
    font-weight: 600;
    transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { border-color: var(--app-primary); background: linear-gradient(135deg, var(--app-primary), var(--app-primary-dark)); }
.btn-primary:hover, .btn-primary:focus { border-color: var(--app-primary-dark); }

/* Tables */
.app-table-wrap {
    width: 100%;
    margin: 0 0 1.25rem;
    border: 1px solid var(--app-border);
    border-radius: .85rem;
    background: var(--app-surface);
    box-shadow: 0 6px 18px rgba(23,32,51,.06);
}
.app-table-wrap > table {
    width: 100%;
    min-width: 0;
    margin-bottom: 0;
    vertical-align: middle;
    border-color: transparent;
}
.app-table-wrap > table thead th {
    background: #f5f7fa;
    color: #374151;
    font-size: .76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .045em;
    white-space: nowrap;
    border-bottom: 1px solid var(--app-border);
    padding: .75rem .85rem;
}
.app-table-wrap > table tbody td,
.app-table-wrap > table tbody th {
    padding: .7rem .85rem;
    border-color: #edf0f3;
}
.app-table-wrap > table tbody tr { transition: background-color .15s ease; }
.app-table-wrap > table.table-hover tbody tr:hover > * { background-color: #f5faff; }
.app-table-wrap > table.table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-accent-bg: #fafbfd; }
.app-table-wrap > table > :not(caption) > * > *:first-child { border-left: 0; }
.app-table-wrap > table > :not(caption) > * > *:last-child { border-right: 0; }
.app-table-wrap > table > thead > tr:first-child > th:first-child { border-top-left-radius: .85rem; }
.app-table-wrap > table > thead > tr:first-child > th:last-child { border-top-right-radius: .85rem; }
.app-table-wrap > table > tbody > tr:last-child > td:first-child,
.app-table-wrap > table > tbody > tr:last-child > th:first-child { border-bottom-left-radius: .85rem; }
.app-table-wrap > table > tbody > tr:last-child > td:last-child,
.app-table-wrap > table > tbody > tr:last-child > th:last-child { border-bottom-right-radius: .85rem; }
/* Tables that need horizontal scrolling on smaller screens. */
@media (max-width: 767.98px) {
    .app-table-wrap {
        box-shadow: none;
    }
    .app-table-wrap > table {
        min-width: 0;
    }
}

.alert { border-radius: .8rem; border-width: 1px; }
.modal-content { border: 0; border-radius: 1rem; box-shadow: 0 24px 70px rgba(23,32,51,.2); }
.modal-header { border-bottom-color: var(--app-border); }
.modal-footer { border-top-color: var(--app-border); }

/* Existing application-specific styles */
.table_button { padding-top: 2px; }
th.currentstand { background-color: var(--app-primary); }
a.currentstand:hover, a.currentstand:link, a.currentstand:visited { text-decoration: none; color: #fff; }
.font-tile { font-size: 190%; background: #111827; color: #fff; text-decoration: none; text-align: center; padding-top: 20%; padding-bottom: 20%; border-radius: .85rem; }
.linkindex { color: #000; display: block; width: 100%; }
.linkindex:visited { color: #000; }
.linkindex:hover { color: var(--app-primary); }
table.center { margin-left: auto; margin-right: auto; }
.btn-ok { text-decoration: none; }
.modal-header h1, .modal-header h2, .modal-header h3, .modal-header h4, .modal-header h5, .modal-header h6 { margin: 0; }
.text-nowrap { white-space: nowrap; }

/* Admin dashboard cards */
.dashboard-card {
    position: relative;
    margin: 0 0 1rem !important;
    padding: 1.15rem !important;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: .95rem;
    box-shadow: 0 7px 22px rgba(23,32,51,.055);
    overflow: hidden;
}
.dashboard-card > h1 {
    margin: 0 0 .85rem !important;
    color: var(--app-ink);
    font-size: 1.45rem;
    line-height: 1.25;
    font-weight: 750;
}
.dashboard-card > h1 small {
    font-size: inherit;
    color: inherit;
    font-weight: inherit;
}
.dashboard-card > h2 {
    margin: .15rem 0 .4rem;
    color: var(--app-primary);
    font-size: 1.65rem;
    line-height: 1.15;
}
.dashboard-card > h2 small {
    font-size: inherit;
}
.dashboard-card > table {
    width: 100%;
    margin: 0 !important;
}
.dashboard-card .table-responsive {
    overflow-x: auto;
}
.dashboard-card .row {
    margin-left: 0;
    margin-right: 0;
}
.dashboard-card.wedstrijden,
.dashboard-card.mvp,
.dashboard-card.spelers {
    cursor: pointer;
}
.dashboard-card a {
    color: var(--app-primary);
}
.dashboard-card a:hover {
    color: var(--app-primary-dark);
}

/* Footer */
.site-footer { flex-shrink: 0; padding: 1.5rem 0 1rem; color: var(--app-muted); }
.footer-inner { max-width: 1440px; margin: 0 auto; padding: 0 1rem; text-align: center; }
.footer-line { height: 1px; background: var(--app-border); margin-bottom: .85rem; }

@media (min-width: 768px) {
    .app-container { padding-left: 1.5rem; padding-right: 1.5rem; }
}
@media (min-width: 1200px) {
    .app-container { padding-left: 2rem; padding-right: 2rem; }
}
@media (max-width: 991.98px) {
    body { padding-top: 70px; }
    .navbar .navbar-collapse { padding: .75rem 0; }
    .navbar .nav-link { margin: .1rem 0; }
}
@media (max-width: 575.98px) {
    .app-container { padding-left: .75rem; padding-right: .75rem; }
    .table { font-size: .9rem; }
}

/* Refined page headers */
.page-header {
    text-align: center;
    margin: 1.75rem 0 2rem;
}
.page-header-inner {
    width: 100%;
}
.page-header h1 {
    margin: 0;
    color: var(--app-ink);
    font-size: clamp(1.9rem, 3vw, 2.45rem);
    font-weight: 800;
    letter-spacing: -.035em;
}
.page-header-rule {
    height: 1px;
    background: linear-gradient(90deg, transparent, #cbd5e1 12%, #cbd5e1 88%, transparent);
    margin-top: 1rem;
}

/* Unified selection tiles */
.team-selection-grid {
    margin-top: .25rem;
    row-gap: 1.5rem;
    column-gap: 1.5rem;
}
.team-selection-card {
    position: relative;
    min-height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 3.25rem 1.25rem 1.5rem;
    overflow: hidden;
    text-decoration: none;
    color: var(--app-primary);
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: .85rem;
    box-shadow: 0 6px 18px rgba(23,32,51,.045);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background-color .18s ease;
}
.team-selection-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, var(--app-primary), var(--app-primary-dark));
}
.team-selection-card:hover {
    color: var(--app-primary-dark);
    background: #fff;
    transform: translateY(-2px);
    border-color: rgba(59,171,236,.4);
    box-shadow: 0 12px 28px rgba(23,32,51,.09);
}
.team-selection-card-content {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.team-selection-card-content h1,
.team-selection-card-content h2 {
    margin: 0 !important;
    padding: 0 !important;
    font-size: clamp(1.45rem, 2.3vw, 1.9rem);
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}
.team-selection-card-content h1 small,
.team-selection-card-content h2 small {
    font-size: inherit;
    color: inherit;
    font-weight: inherit;
}
.team-selection-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: grid;
    place-items: center;
    margin-right: .9rem;
    border-radius: .75rem;
    color: var(--app-primary-dark);
    background: #FFF8CC;
    font-size: 1.15rem;
}
.team-selection-name {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.25;
}
.team-selection-arrow {
    margin-left: auto;
    color: #94a3b8;
}
/* Mijn Team */
.team-page {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
}
.team-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.team-stat {
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 1rem;
    box-shadow: 0 8px 24px rgba(23,32,51,.055);
}
.team-stat-formation {
    justify-content: flex-end;
}
.team-stat-label {
    color: var(--app-muted);
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
}
.team-stat-value {
    color: var(--app-ink);
    font-size: 1.35rem;
    font-weight: 800;
}
.team-edit-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-left: .45rem;
    border-radius: .65rem;
    color: var(--app-primary);
    background: #FFF8CC;
    text-decoration: none;
    font-size: 1rem;
    transition: background-color .15s ease, transform .15s ease;
}
.team-edit-link:hover {
    color: var(--app-primary-dark);
    background: #FFEF9A;
    transform: translateY(-1px);
}
.team-table-card {
    overflow: hidden;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 1rem;
    box-shadow: 0 10px 28px rgba(23,32,51,.07);
}
.team-table-card .table-responsive {
    margin: 0;
}
.team-table {
    min-width: 0 !important;
    margin: 0 !important;
    border: 0 !important;
}
.team-table th,
.team-table td {
    border-color: #edf0f3 !important;
}
.team-table > tbody > tr:not(.team-section-row):not(:last-child):hover > * {
    background: #FFFDF0;
}
.team-table .team-section-row > td {
    padding: 1rem .9rem .65rem;
    color: var(--app-ink);
    background: #fff;
    border-top: 1px solid var(--app-border);
    border-bottom: 0;
}
.team-table .team-section-row:first-child > td {
    border-top: 0;
}
.team-table .team-section-row h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -.015em;
}
.team-table > tbody > tr:not(.team-section-row) > th {
    padding: .7rem .85rem;
    background: #f7f9fb;
    color: #475569;
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.team-table > tbody > tr:not(.team-section-row) > td {
    padding: .78rem .85rem;
}
.team-action-cell,
.team-action-head {
    width: 44px !important;
    padding-left: .25rem !important;
    padding-right: .25rem !important;
}
.team-action-cell a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: .55rem;
    text-decoration: none;
}
.team-action-cell a:hover {
    background: #FFF8CC;
}
.team-table .fa {
    font-size: 1rem;
}
.team-table .team-section-row + tr th {
    border-top: 0 !important;
}
.team-table .team-section-row + tr > * {
    white-space: nowrap;
}
.team-table tr[onclick] {
    cursor: pointer;
}
.team-table tr[onclick]:hover > * {
    background: #f5faff !important;
}

/* Keep wide tables inside the viewport instead of letting legacy row/table
   markup push the entire application sideways. */
.app-container,
.team-page {
    min-width: 0;
}
body {
    overflow-x: hidden;
}

@media (max-width: 767.98px) {
    .page-header {
        margin: 1.25rem 0 1.25rem;
    }
    .team-summary {
        grid-template-columns: 1fr;
    }
    .team-stat,
    .team-stat-formation {
        justify-content: space-between;
    }
    .team-table-card {
        border-radius: .8rem;
    }
    .team-selection-card {
        min-height: 104px;
    }
}


/* Pagination - Bootstrap 5 application styling */
.app-pagination {
    display: flex;
    justify-content: center;
    margin: 1.25rem 0 2rem;
}
.app-pagination .pagination {
    gap: .4rem;
    flex-wrap: wrap;
}
.app-pagination .page-item .page-link {
    min-width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .45rem .75rem;
    border: 1px solid var(--app-border);
    border-radius: .7rem !important;
    background: var(--app-surface);
    color: var(--app-ink);
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 2px 7px rgba(23,32,51,.04);
    transition: color .15s ease, background-color .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.app-pagination .page-item .page-link:hover {
    color: var(--app-primary-dark);
    background: #FFF8CC;
    border-color: rgba(59,171,236,.45);
    transform: translateY(-1px);
    box-shadow: 0 5px 12px rgba(23,32,51,.08);
}
.app-pagination .page-item.active .page-link {
    color: #fff;
    background: linear-gradient(135deg, var(--app-primary), #DCAE00);
    border-color: var(--app-primary);
    box-shadow: 0 5px 14px rgba(59,171,236,.28);
}
.app-pagination .page-item.active .page-link:hover {
    color: #fff;
    background: linear-gradient(135deg, var(--app-primary), #DCAE00);
    transform: none;
}
@media (max-width: 575.98px) {
    .app-pagination .pagination { gap: .3rem; }
    .app-pagination .page-item .page-link {
        min-width: 2.25rem;
        height: 2.25rem;
        padding: .35rem .6rem;
    }
}


/* Consistent select dropdown indicator */
.form-select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-repeat: no-repeat !important;
    background-position: right .85rem center !important;
    background-size: .65rem .65rem !important;
    padding-right: 2.5rem !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.2 5.8 8 10.6l4.8-4.8' fill='none' stroke='%233babea' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8'/%3E%3C/svg%3E") !important;
}
.form-select:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.2 5.8 8 10.6l4.8-4.8' fill='none' stroke='%233babea' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8'/%3E%3C/svg%3E") !important;
}


/* Final component overrides (loaded after app-theme.php).
   Keep critical layout rules here too because this stylesheet is intentionally
   loaded after the main theme. */

/* Login/register switch */
.auth-tabs {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    border: 1px solid var(--app-border) !important;
    border-radius: .9rem !important;
    background: rgba(255,255,255,.78) !important;
}
.auth-tabs .linkindex {
    display: flex !important;
    flex: 1 1 50% !important;
    width: 50% !important;
    min-width: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: .85rem .5rem !important;
    text-align: center !important;
    text-decoration: none !important;
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
}
.auth-tabs .linkindex + .linkindex {
    border-left: 1px solid var(--app-border) !important;
}
@media (max-width: 575.98px) {
    .auth-tabs .linkindex {
        padding: .75rem .35rem !important;
        font-size: 1.05rem !important;
    }
}

/* Dashboard KPI tiles */
.dashboard-page .dashboard-kpi-grid {
    display: flex !important;
    flex-wrap: wrap !important;
}
.dashboard-page .dashboard-kpi-grid > [class*="col-"] {
    display: flex !important;
    min-width: 0 !important;
}
.dashboard-page .dashboard-kpi {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 150px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: .25rem !important;
    box-sizing: border-box !important;
    text-align: center !important;
}
.dashboard-page .dashboard-kpi-icon {
    display: grid !important;
    place-items: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}
.dashboard-page .dashboard-kpi-label,
.dashboard-page .dashboard-kpi-value,
.dashboard-page .dashboard-kpi-note {
    display: block !important;
    width: auto !important;
    max-width: 100% !important;
    text-align: center !important;
}
.dashboard-page .dashboard-content-grid {
    display: flex !important;
    flex-wrap: wrap !important;
}

/* Font Awesome 4.6 has no fa-user-check. Keep the active-user icon visible. */
.fa-user-check::before {
    content: "\f007";
}

.dashboard-clickable-row {
    cursor: pointer;
}
.dashboard-clickable-row:hover > td {
    background: #FFFDF0 !important;
}
.dashboard-clickable-row:focus-visible {
    outline: 2px solid var(--app-primary);
    outline-offset: -2px;
}


/* Shared login / registration layout.
   Both pages use the same shell so logo, tabs, form and footer spacing
   remain identical; only the form content itself differs. */
.auth-logo-row {
    margin-top: 75px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}
.auth-logo-column {
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
}
.auth-logo-column img {
    display: inline-block;
    max-width: 25%;
    height: auto;
}
.auth-form-column {
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
}
.auth-form-column .auth-tabs {
    margin-top: 0 !important;
    margin-bottom: 10px !important;
}
.auth-form-column .modal-header {
    margin: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}
.auth-form-column .modal-body {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}
@media (max-width: 991.98px) {
    .auth-logo-row {
        margin-top: 45px !important;
    }
    .auth-logo-column img {
        max-width: 32%;
    }
}
@media (max-width: 575.98px) {
    .auth-logo-row {
        margin-top: 30px !important;
    }
    .auth-logo-column img {
        max-width: 38%;
    }
    .auth-form-column {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}


/* Dashboard top layout: four compact tiles form a 2x2 square on the left,
   while upcoming matches occupy the larger right-hand area. */
.dashboard-top {
    align-items: stretch;
}
.dashboard-kpi-square {
    height: 100%;
}
.dashboard-kpi-square > .col-6 {
    min-height: 150px;
}
.dashboard-kpi-square .dashboard-kpi {
    min-height: 150px !important;
    height: 100%;
}
.dashboard-kpi-period {
    cursor: default;
}
.dashboard-kpi-periods {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    margin-top: .35rem;
}
.dashboard-kpi-periods a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    font-size: .82rem;
    line-height: 1.2;
}
.dashboard-kpi-periods strong {
    font-size: 1.1rem;
    margin-top: .15rem;
}
.dashboard-matches-panel {
    height: 100%;
}
@media (max-width: 991.98px) {
    .dashboard-kpi-square > .col-6,
    .dashboard-kpi-square .dashboard-kpi {
        min-height: 135px !important;
    }
}
@media (max-width: 575.98px) {
    .dashboard-kpi-square > .col-6,
    .dashboard-kpi-square .dashboard-kpi {
        min-height: 125px !important;
    }
    .dashboard-kpi-square .dashboard-kpi-label {
        font-size: .85rem;
    }
    .dashboard-kpi-periods {
        gap: .65rem;
    }
    .dashboard-kpi-periods a {
        font-size: .72rem;
    }
}


/* Mobile team page
   Keep the complete team table inside the viewport. The action columns get
   fixed room while the name/team/value columns use the remaining width. */
@media (max-width: 767.98px) {
    .team-page {
        width: 100%;
        max-width: none;
        padding-left: .35rem;
        padding-right: .35rem;
    }

    .team-summary {
        gap: .75rem;
        margin-bottom: .9rem;
    }

    .team-stat {
        min-height: 76px;
        padding: .85rem .9rem;
        border-radius: .85rem;
    }

    .team-stat-label {
        font-size: .72rem;
    }

    .team-stat-value {
        font-size: 1.2rem;
    }

    .team-edit-link {
        width: 32px;
        height: 32px;
        flex: 0 0 32px;
    }

    .team-table-card {
        width: 100%;
        overflow: hidden;
        border-radius: .8rem;
    }

    .team-table-card .table-responsive {
        width: 100%;
        overflow-x: hidden !important;
        overflow-y: visible;
    }

    .team-table {
        width: 100% !important;
        min-width: 0 !important;
        table-layout: fixed !important;
        font-size: .84rem;
    }

    .team-table > tbody > tr:not(.team-section-row) > th,
    .team-table > tbody > tr:not(.team-section-row) > td {
        box-sizing: border-box;
        overflow-wrap: normal;
        word-break: normal;
    }

    /* Name / team / value */
    .team-table > tbody > tr:not(.team-section-row) > th:nth-child(1),
    .team-table > tbody > tr:not(.team-section-row) > td:nth-child(1) {
        width: 31% !important;
    }
    .team-table > tbody > tr:not(.team-section-row) > th:nth-child(2),
    .team-table > tbody > tr:not(.team-section-row) > td:nth-child(2) {
        width: 26% !important;
    }
    .team-table > tbody > tr:not(.team-section-row) > th:nth-child(3),
    .team-table > tbody > tr:not(.team-section-row) > td:nth-child(3) {
        width: 21% !important;
    }

    /* Action buttons / points column */
    .team-table .team-action-head,
    .team-table .team-action-cell {
        width: 11% !important;
        min-width: 0 !important;
        padding-left: .05rem !important;
        padding-right: .05rem !important;
    }
    .team-table > tbody > tr:not(.team-section-row) > th:nth-child(4):last-child,
    .team-table > tbody > tr:not(.team-section-row) > td:nth-child(4):last-child {
        width: 22% !important;
    }

    .team-table > tbody > tr:not(.team-section-row) > th {
        padding: .6rem .25rem;
        font-size: .68rem;
        line-height: 1.15;
        white-space: normal !important;
    }

    .team-table > tbody > tr:not(.team-section-row) > td {
        padding: .7rem .25rem;
        line-height: 1.25;
        vertical-align: middle;
    }

    .team-table .team-section-row > td {
        padding: .78rem .5rem .58rem;
    }

    .team-table .team-section-row h3 {
        font-size: 1rem;
    }

    .team-action-cell a {
        width: 28px;
        height: 28px;
        max-width: 100%;
    }

    .team-table .team-action-cell .fa {
        font-size: .9rem;
    }

    /* Names may wrap on mobile: this keeps the name column compact
       and gives the team/value/actions more breathing room. */
    .team-table td:nth-child(1) {
        white-space: normal !important;
        overflow-wrap: break-word;
        line-height: 1.2;
    }

    /* Never split monetary values such as 2.250.000 over two lines. */
    .team-table td:nth-child(3) {
        white-space: nowrap !important;
    }
}

@media (max-width: 380px) {
    .team-page {
        padding-left: .2rem;
        padding-right: .2rem;
    }

    .team-table {
        font-size: .8rem;
    }

    .team-table > tbody > tr:not(.team-section-row) > th {
        font-size: .64rem;
    }

    .team-table > tbody > tr:not(.team-section-row) > td {
        padding-left: .15rem;
        padding-right: .15rem;
    }

    .team-action-cell a {
        width: 26px;
        height: 26px;
    }
}


/* Consistent tile spacing across all tile overview pages. */
.team-selection-grid {
    row-gap: 1.5rem !important;
    column-gap: 1.5rem !important;
}
@media (max-width: 767.98px) {
    .team-selection-grid {
        row-gap: 1rem !important;
        column-gap: 1rem !important;
    }
}


/* Tables use the shared background-layer treatment; no floating panel. */
.team-table-card {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}


/* All team-selection tile pages use identical Bootstrap gutters. */
.team-selection-grid {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 1.5rem;
    row-gap: 1.5rem !important;
    column-gap: 1.5rem !important;
}
@media (max-width: 767.98px) {
    .team-selection-grid {
        --bs-gutter-x: 1rem;
        --bs-gutter-y: 1rem;
        row-gap: 1rem !important;
        column-gap: 1rem !important;
    }
}

/* Final selection-card arrow fix:
   The HTML already contains .team-selection-arrow with a Font Awesome
   arrow icon. Do not generate a second arrow with ::after. */
.team-selection-card::after {
    content: none !important;
    display: none !important;
}

/* Standings navigation tabs — final hover/active-state fix. */
table.table-navigation {
    width: 100% !important;
    margin: 0 !important;
    border: 1px solid var(--app-border) !important;
    border-radius: .85rem !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    overflow: hidden;
    background: var(--app-surface) !important;
    box-shadow: 0 4px 14px rgba(23,32,51,.04) !important;
}

table.table-navigation > tbody > tr > th {
    padding: 0 !important;
    height: 50px;
    vertical-align: middle !important;
    background: #f8fafc !important;
    --bs-table-bg: #f8fafc !important;
    border-color: var(--app-border) !important;
}

table.table-navigation > tbody > tr > th > a.linkindex {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    min-height: 50px;
    padding: .65rem .75rem !important;
    box-sizing: border-box;
    color: var(--app-ink) !important;
    text-decoration: none !important;
    transition: background-color .16s ease, color .16s ease;
}

table.table-navigation > tbody > tr > th:not(.currentstand) > a.linkindex:hover,
table.table-navigation > tbody > tr > th:not(.currentstand) > a.linkindex:focus-visible {
    color: var(--app-primary-dark) !important;
    background: #FFF8CC !important;
}

table.table-navigation > tbody > tr > th.currentstand,
table.table-navigation > tbody > tr > th.currentstand:hover {
    background: var(--app-primary) !important;
    --bs-table-bg: var(--app-primary) !important;
    --bs-table-accent-bg: var(--app-primary) !important;
}

table.table-navigation > tbody > tr > th.currentstand > a.linkindex,
table.table-navigation > tbody > tr > th.currentstand > a.linkindex:hover,
table.table-navigation > tbody > tr > th.currentstand > a.linkindex:focus,
table.table-navigation > tbody > tr > th.currentstand > a.linkindex:active,
table.table-navigation > tbody > tr > th.currentstand > a.linkindex:visited {
    color: #fff !important;
    background: transparent !important;
    text-decoration: none !important;
}

table.table-navigation > tbody > tr > th:first-child {
    border-top-left-radius: .85rem;
    border-bottom-left-radius: .85rem;
}

table.table-navigation > tbody > tr > th:last-child {
    border-top-right-radius: .85rem;
    border-bottom-right-radius: .85rem;
}

/* FINAL BRAND OVERRIDE — loaded last */
:root{
    --app-primary:#f2c300!important;
    --app-primary-dark:#111111!important;
}
.navbar #currentpage{
    color:#111!important;
    background:#f2c300!important;
}
.navbar .nav-link:hover,
.navbar .nav-link:focus{
    color:#f2c300!important;
    background:rgba(242,195,0,.12)!important;
}
.team-page .team-stat-icon,
.team-page .team-budget-icon,
.team-page .team-position-icon{
    color:#111!important;
    background:#fff8cc!important;
}
.team-page .team-edit-link,
.team-page .team-action-edit,
.team-page .team-action-add{
    color:#111!important;
    background:#fff8cc!important;
}
.team-page .team-edit-link:hover,
.team-page .team-action-edit:hover,
.team-page .team-action-edit:focus,
.team-page .team-action-add:hover,
.team-page .team-action-add:focus{
    color:#111!important;
    background:#ffef9a!important;
}
.team-page table.team-position-table > thead > tr > th,
.admin-team-page .team-section-table thead th,
.app-data-table .app-table-header th{
    background:#f2c300!important;
    color:#111!important;
    border-color:#dcae00!important;
}
.team-page .team-player-row-clickable:hover > td{
    background:#fffdf0!important;
}
.team-selection-icon,
.team-selection-arrow,
.player-add-button{
    color:#111!important;
    background:#fff8cc!important;
}
.team-selection-card:hover{
    border-color:#f2c300!important;
}
.team-tab.is-active{
    color:#111!important;
    background:#f2c300!important;
}

/* FINAL CONSISTENCY PASS — black/yellow branding */
:root{
    --app-primary:#f2c300!important;
    --app-primary-dark:#111111!important;
    --app-yellow:#f2c300!important;
    --app-black:#111111!important;
}

/* All horizontal rules / separators */
hr{
    border:0!important;
    border-top:1px solid #f2c300!important;
    opacity:1!important;
}
.page-header-rule{
    background:#f2c300!important;
    height:1px!important;
}
.site-footer{
    border-top:1px solid #f2c300!important;
}

/* Navigation: yellow active state, black text on yellow */
.navbar #currentpage,
.navbar #currentpage:hover,
.navbar #currentpage:focus,
.navbar .nav-link.active{
    color:#111111!important;
    background:#f2c300!important;
}
.navbar .nav-link:hover,
.navbar .nav-link:focus{
    color:#f2c300!important;
    background:rgba(242,195,0,.12)!important;
}

/* Selection cards used by Spelers / team selectors */
.team-selection-card{
    color:#111111!important;
    border-color:#e5eaf1!important;
}
.team-selection-card::before{
    background:#f2c300!important;
}
.team-selection-card:hover,
.team-selection-card:focus{
    color:#111111!important;
    border-color:#f2c300!important;
    background:#fffdf0!important;
}
.team-selection-card-content h1,
.team-selection-card-content h2,
.team-selection-name{
    color:#111111!important;
}
.team-selection-icon{
    color:#111111!important;
    background:#fff8cc!important;
}
.team-selection-arrow{
    color:#111111!important;
}
.team-selection-card:hover .team-selection-arrow,
.team-selection-card:focus .team-selection-arrow{
    color:#f2c300!important;
}

/* Generic selection/tile icons and arrows */
.team-selection-grid i,
.team-selection-grid .fa,
.team-selection-grid .fas,
.team-selection-grid .far{
    color:inherit!important;
}

/* Primary controls */
.btn-primary{
    color:#111111!important;
    background:#f2c300!important;
    border-color:#f2c300!important;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active{
    color:#111111!important;
    background:#dcae00!important;
    border-color:#dcae00!important;
}

/* Links and standalone blue-looking action icons */
a:not(.navbar-brand):not(.nav-link){
    --bs-link-color:#111111;
    --bs-link-hover-color:#dcae00;
}
.text-primary,
.link-primary{
    color:#111111!important;
}
.bg-primary{
    background-color:#f2c300!important;
}
.border-primary{
    border-color:#f2c300!important;
}

/* Keep destructive actions explicitly red */
.team-page .team-action-delete,
.team-page .team-action-delete i,
.btn-danger,
.btn-danger i{
    color:#dc3545!important;
}

/* Footer separator: part of the yellow brand system */
.site-footer .footer-line{
    height:1px!important;
    width:100%!important;
    background:#f2c300!important;
    border:0!important;
    opacity:1!important;
}

/* Statistics overview / all selection cards */
.team-selection-grid .team-selection-card,
.team-selection-grid .team-selection-card:visited{
    color:#111111!important;
}
.team-selection-grid .team-selection-name{
    color:#111111!important;
}
.team-selection-grid .team-selection-icon,
.team-selection-grid .team-selection-icon i{
    color:#111111!important;
}
.team-selection-grid .team-selection-arrow,
.team-selection-grid .team-selection-arrow i{
    color:#111111!important;
}
.team-selection-grid .team-selection-card:hover .team-selection-arrow,
.team-selection-grid .team-selection-card:hover .team-selection-arrow i{
    color:#f2c300!important;
}
.team-selection-grid .team-selection-card::before{
    background:#f2c300!important;
}

/* Final VV Stedum navbar/footer corrections */
.navbar.fixed-top,
.navbar.bg-dark{
    background:#0b0b0b!important;
    border-bottom:3px solid #f2c300!important;
}
.navbar .nav-link{
    color:#fff!important;
    background:transparent!important;
}
.navbar .nav-link:hover,
.navbar .nav-link:focus{
    color:#f2c300!important;
    background:rgba(242,195,0,.10)!important;
}
.navbar #currentpage,
.navbar #currentpage:hover,
.navbar #currentpage:focus,
.navbar .nav-link.active,
.navbar .nav-link.active:hover,
.navbar .nav-link.active:focus{
    color:#111!important;
    background:#f2c300!important;
}
.nav-club-logo{
    border:0!important;
    border-radius:0!important;
    padding:0!important;
    background:transparent!important;
}
.site-footer{
    border-top:0!important;
}
.site-footer .footer-line{
    display:block!important;
    height:1px!important;
    background:#f2c300!important;
    border:0!important;
}
