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

.search-btn {
    height: 36px;
    width: 40px;
    display: grid;
    place-items: center;
    background: #0d0f16;
    color: var(--muted);
    border: 1px solid var(--line);
}

    .search-btn:hover {
        color: var(--fg);
        border-color: var(--accent);
    }

/* Main */
.main {
    flex: 1;
    padding: 24px 0;
}

.content {
    background: var(--bg-2);
    border: 1px solid var(--line);
    padding: var(--pad);
    box-shadow: var(--shadow);
}

/* Table */
.table-wrap {
    background: #0f121d;
    border: 1px solid var(--line);
    padding: var(--pad);
    overflow: auto;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

    .table thead th {
        text-align: left;
        font-weight: 700;
        font-size: .9rem;
        color: #d9d9e3;
        padding: 12px;
        border-bottom: 1px solid var(--line);
        background: linear-gradient(180deg, #13172a, #101526);
        position: sticky;
        top: 0;
    }

    .table tbody td {
        padding: 12px;
        border-bottom: 1px solid #1b1f2d;
        color: #e5e7eb;
    }

    .table tbody tr:hover td {
        background: #11162a;
    }

    

/* Bootstrap-like helpers used in views */
.table-striped tbody tr:nth-child(odd) td {
    background: rgba(255,255,255,.02);
}

.align-middle td,
.align-middle th {
    vertical-align: middle;
}
.table .cell-muted {
        color: var(--muted);
    }

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: .75rem;
    line-height: 1;
    border: 1px solid var(--line);
}

.badge--role {
    border-color: rgba(124,58,237,.45);
    color: var(--accent-2);
}

.badge--ok {
    border-color: rgba(34,197,94,.35);
    color: #86efac;
}

.badge--warn {
    border-color: rgba(245,158,11,.35);
    color: #facc15;
}

/* Actions */
.actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 12px;
    background: #0e1222;
    color: #eaeaea;
    border: 1px solid var(--line);
    text-decoration: none;
    cursor: pointer;
    line-height: 1;
    vertical-align: middle;
}

    .btn:hover {
        border-color: var(--accent);
    }

.btn--primary {
    background: linear-gradient(135deg, rgba(124,58,237,.18), rgba(167,139,250,.18));
    border-color: rgba(124,58,237,.45);
}




.btn--secondary {
    background: #0e1222;
    border-color: var(--line);
}

.btn--success {
    background: linear-gradient(135deg, rgba(34,197,94,.16), rgba(74,222,128,.12));
    border-color: rgba(34,197,94,.45);
}

.btn--warning {
    background: linear-gradient(135deg, rgba(234,179,8,.14), rgba(253,224,71,.10));
    border-color: rgba(234,179,8,.45);
}

.btn--danger {
    background: linear-gradient(135deg, rgba(220,38,38,.14), rgba(248,113,113,.08));
    border-color: rgba(220,38,38,.45);
}

.btn:disabled,
.btn[disabled] {
    opacity: .55;
    cursor: not-allowed;
}

/* Table inline actions: prevent <form> baseline from increasing row height */
.table td form {
    display: inline-flex;
    margin: 0;
    vertical-align: middle;
}

/* --- Player profile layout --- */
.profile-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 20px;
}

.profile-left {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.avatar {
    width: 200px;
    height: 200px;
    border: 1px solid var(--line);
    background: #0d0f16;
    object-fit: cover;
    box-shadow: var(--shadow);
}

.country-flag {
    display: inline-flex;
    align-items: flex-start;
}

.profile-right .header-line {
    display: flex;
    align-items: center;
    gap: 10px;
}

.player-name {
    margin: 0;
    font-size: 1.8rem;
    letter-spacing: .5px;
}

.profile-sep {
    border: none;
    border-top: 1px solid var(--line);
    margin: 16px 0;
}

/* Meta info boxes */
.meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 12px;
}

.meta-box {
    padding: 10px;
    background: #0f121d;
    border: 1px solid var(--line);
}

.meta-label {
    font-size: .8rem;
    color: var(--muted);
    margin-bottom: 6px;
}

.meta-value {
    font-weight: 600;
}


/* Skills */
.section-title {
    margin: 0 0 8px 0;
}

.skills-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

/* Header flag next to player name */
.header-flag {
    width: 24px;
    height: 18px;
    margin-right: 8px;
    border: 1px solid var(--line);
    background: #0d0f16;
}

/* Inline SVG icons for labels */
.icon {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    vertical-align: -2px;
    color: var(--muted); /* stroke=color via currentColor */
}

.actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.actions-left {
    justify-content: flex-start; /* wszystkie obok siebie, od lewej */
}

.actions-split {
    justify-content: space-between; /* jedna grupa po lewej, druga po prawej */
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 34px;
    padding: 0 12px;
    background: #0e1222;
    color: #eaeaea;
    border: 1px solid var(--line);
    text-decoration: none;
    cursor: pointer;
    font-size: .85rem; /* 👈 wymuszenie rozmiaru tekstu */
    line-height: 1.2; /* 👈 wspólna wysokość linii */
}


.small-team-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    vertical-align: middle;
}

.badge--core {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 10px;
    border: 1px solid currentColor;
    border-radius: 0px;
    font-weight: 600;
    line-height: 1;
    font-size: .85rem;
    background: transparent; /* jak Rifler */
}

    /* Kolorystyka wg widełek */
    .badge--core.core-0-20 {
        color: #dc3545;
    }
    /* czerwony */
    .badge--core.core-21-40 {
        color: #ffc107;
    }
    /* żółty */
    .badge--core.core-41-60 {
        color: #20c997;
    }
    /* jasny zielony (lekko mocniejszy dla outline) */
    .badge--core.core-61-80 {
        color: #28a745;
    }
    /* zielony */
    .badge--core.core-81-100 {
        color: #6f42c1;
    }
/* fiolet jak role */

/* pełna szerokość i czytelne odstępy w karcie */
.player-card {
    width: 100%;
    gap: .3rem !important;
}

    .player-card .tag-row {
        margin-top: 0px;
        margin-bottom: 0px; /* remove extra spacing under tag rows inside the card */
    }

    .player-card .meta-label {
        margin-top: 0px;
        margin-bottom: 0px; /* header line shouldn't add its own bottom margin here */
    }

/* rząd z „tagami” (obwódki) */
.tag-row {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .25rem .5rem;
    border: 1px solid var(--border-color, #3a3a3a);
    border-radius: 0px;
    font-size: .9rem;
    line-height: 1.2;
}

    .tag .icon {
        width: 16px;
        height: 16px;
    }

/* przyciski w jednej linii – lewy i prawy kraniec */
.actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: .5rem;
}

.player-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 12px; /* odstęp między kartami w poziomie i pionie */
    margin-bottom: 12px; /* przerwa od sekcji poniżej */
}

.tag-row--2 {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2 kolumny: wage|value oraz role|avg */
    gap: .5rem;
    align-items: center;
}

@media (max-width: 900px) {
    .tag-row--2 {
        grid-template-columns: 1fr;
    }
    /* na wąskich – pod sobą */
}

.player-header {
    font-size: 1.15rem; /* większy od reszty */
    font-weight: 500; /* subtelne pogrubienie, nie jak fw-bold */
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 0.8rem;
    border: 1px solid transparent;
    border-radius: 0px;
}

/* Active → zielony */
.status-active {
    color: #22c55e;
    border-color: rgba(34,197,94,.35);
    background: rgba(34,197,94,.1);
}

/* Benched → żółty */
.status-benched {
    color: #facc15;
    border-color: rgba(245,158,11,.35);
    background: rgba(245,158,11,.1);
}

/* Loaned → fioletowy (żeby odróżniał się od reszty) */
.status-loaned {
    color: #a78bfa;
    border-color: rgba(167,139,250,.35);
    background: rgba(167,139,250,.1);
}

.label-icon {
    width: 16px;
    height: 16px;
    margin-left: 6px;
    vertical-align: -2px;
}

.input-compact {
    width: 84px;
}

.field-compact .form-input {
    max-width: 120px;
}

/* jedna linia dla dynamic: 6 pól obok siebie, bez zawijania */
.inline-6 {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    align-items: flex-end;
    overflow-x: auto; /* jak miejsca braknie, pojawi się przewijanie */
    padding-bottom: 4px;
}

    .inline-6 .field-compact {
        min-width: 180px;
    }

/* Odstęp + separator 1px wyśrodkowany */
.pair-block + .pair-block {
    margin-top: 10px;
}

    .pair-block + .pair-block::before {
        content: "";
        display: block;
        width: 100%; /* długość linii; zmień np. na 40% jeśli chcesz krótszą */
        height: 1px;
        background: var(--line, #e5e7eb);
        margin: 10px auto; /* odstęp nad i pod linią + centrowanie */
        border-radius: 1px;
    }


.field.has-error .form-input {
    border-color: #dc3545;
}

.field .text-danger {
    font-size: .875rem;
}

/* --- Dynamic Skills chips (dark, 3x2) --- */
/* --- Dynamic Skills chips (dark, 3x2, skala 1..10) --- */
.dyn-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)); /* 3 na rząd => 2 rzędy dla 6 */
    gap: 10px 12px;
    margin-top: 6px;
}

.dyn-chip {
    position: relative;
    background: #181c24; /* ciemne tło chipa */
    border: 1px solid #2a2f3a; /* kwadratowa obwódka */
    border-radius: 0; /* brak zaokrąglania */
    padding: 4px 4px 4px 4px;
    color: #e5e7eb; /* tekst */
    min-height: 52px;
}

    .dyn-chip .content {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 6px;
        font-size: 12px;
    }

    .dyn-chip .icon {
        width: 14px;
        height: 14px;
        opacity: .9;
    }

    .dyn-chip .lbl {
        color: #9ca3af;
    }
    /* przygaszona etykieta */
    .dyn-chip .val {
        font-weight: 600;
    }

    /* cienka szara linia (track) z marginesami 10px po bokach */
    .dyn-chip .meter {
        position: absolute;
        left: 10px;
        right: 10px;
        bottom: 0;
        height: 8px; /* cienka */
        background: #3a3f4a; /* szary tor */
        border-radius: 0;
    }

    /* kolorowy pasek wypełnienia toru: szerokość z --p (%), 0..100 */
    .dyn-chip .bar {
        position: absolute;
        left: 0;
        bottom: 0;
        top: 0;
        width: calc(var(--p) * 1%);
        background: currentColor; /* bierze kolor z klasy band-* */
    }

    /* Kolory progów jak dla Core */
    .dyn-chip.band-low {
        color: #dc3545;
    }
    /* 1–2: czerwony */
    .dyn-chip.band-warn {
        color: #ffc107;
    }
    /* 3–4: żółty   */
    .dyn-chip.band-mid {
        color: #20c997;
    }
    /* 5–6: turkus  */
    .dyn-chip.band-good {
        color: #28a745;
    }
    /* 7–8: zielony */
    .dyn-chip.band-elite {
        color: #6f42c1;
    }
/* 9–10: fiolet */

/* Responsywka – na wąskich układach można zejść do 2 kolumn */
@media (max-width: 760px) {
    .dyn-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Alias used in Team player card */
.badge-core {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 10px;
    border: 1px solid currentColor;
    border-radius: 0px;
    font-weight: 600;
    line-height: 1;
    font-size: .85rem;
    background: transparent;
}
