:root {
    --app-bg: #f5f7f4;
    --app-surface: #ffffff;
    --app-ink: #17211b;
    --app-muted: #68736c;
    --app-line: #e3e9e4;
    --app-green-950: #10271a;
    --app-green-900: #15351f;
    --app-green-700: #08783a;
    --app-green-600: #0b9147;
    --app-green-100: #e5f8e9;
    --app-red-700: #bd2d2d;
    --app-red-100: #fdeaea;
    --app-amber-700: #986514;
    --app-amber-100: #fff5d9;
    --app-blue-700: #2269ad;
    --app-blue-100: #eaf3ff;
    --position-pt: #11a85a;
    --position-df: #2b82e5;
    --position-md: #efa51e;
    --position-dl: #e44747;
    --shadow-soft: 0 8px 28px rgba(24, 52, 33, .075);
    --shadow-card: 0 2px 10px rgba(24, 52, 33, .06);
}

* {
    box-sizing: border-box;
}

body.app-page,
body.recommendations-page,
body:not(.recommendations-page) {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    background:
        radial-gradient(circle at 95% 0, rgba(117, 214, 135, .12), transparent 30rem),
        linear-gradient(180deg, #ffffff 0, var(--app-bg) 21rem) !important;
    color: var(--app-ink);
    font-family: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

body.login-page {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 80% 10%, rgba(98, 206, 101, .2), transparent 28rem),
        linear-gradient(145deg, #10271a 0, #15351f 48%, #f5f7f4 48.2%, #ffffff 100%);
    color: var(--app-ink);
    font-family: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.login-shell {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 1.25rem;
}

.login-panel {
    width: min(100%, 420px);
    padding: clamp(1.35rem, 4vw, 2rem);
    border: 1px solid rgba(227, 233, 228, .95);
    border-radius: 12px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 24px 70px rgba(9, 24, 14, .22);
}

.login-brand {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    margin-bottom: 1.5rem;
    color: var(--app-green-950);
    line-height: 1;
}

.login-brand strong,
.login-brand small {
    display: block;
}

.login-brand strong {
    font-size: 1rem;
}

.login-brand small {
    margin-top: .2rem;
    color: var(--app-green-700);
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.login-panel h1 {
    margin-bottom: 1.25rem;
    font-size: 1.65rem;
    font-weight: 800;
}

.login-form {
    display: grid;
    gap: 1rem;
}

.login-form .form-control {
    min-height: 46px;
    border-color: var(--app-line);
    border-radius: 8px;
}

.login-form .btn {
    min-height: 46px;
    border-radius: 999px;
}

body:not(.recommendations-page) .stat-card,
body:not(.recommendations-page) .card.border-0 {
    overflow: hidden;
    border: 1px solid var(--app-line) !important;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, .96);
    box-shadow: var(--shadow-card) !important;
}

body:not(.recommendations-page) .table-light,
body:not(.recommendations-page) thead {
    --bs-table-bg: #f6f9f6;
}

body:not(.recommendations-page) .table > :not(caption) > * > * {
    border-bottom-color: #e7ece8;
}

body:not(.recommendations-page) .btn-success {
    border-color: var(--app-green-600);
    background: var(--app-green-600);
}

body:not(.recommendations-page) .player-name {
    color: var(--app-ink) !important;
}

.app-navbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    min-height: 66px;
    padding: 0;
    background: rgba(16, 39, 26, .97);
    border-bottom: 3px solid #62ce65;
    box-shadow: 0 6px 18px rgba(9, 24, 14, .16);
    backdrop-filter: blur(12px);
}

.app-navbar__inner {
    max-width: 1720px;
    min-height: 66px;
    padding-inline: clamp(1rem, 3vw, 2.5rem);
}

.app-brand {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    margin: 0;
    padding: .55rem 0;
    color: #fff;
    line-height: 1;
}

.app-brand:hover,
.app-brand:focus {
    color: #fff;
}

.app-brand__mark {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 11px;
    background: linear-gradient(145deg, #77e178, #36aa50);
    color: var(--app-green-950);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28);
    font-size: .82rem;
    font-weight: 900;
    letter-spacing: -.04em;
}

.app-brand strong,
.app-brand small {
    display: block;
}

.app-brand strong {
    font-size: .98rem;
    letter-spacing: .01em;
}

.app-brand small {
    margin-top: .2rem;
    color: #9ed7aa;
    font-size: .69rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.app-nav {
    gap: .2rem;
}

.app-nav .nav-link {
    position: relative;
    padding: 1.42rem .82rem 1.3rem;
    color: #c8d5cb;
    border-radius: 0;
    font-size: .88rem;
    font-weight: 700;
}

.app-nav .nav-link:hover,
.app-nav .nav-link:focus {
    color: #fff;
}

.app-nav .nav-link.active {
    color: #fff;
}

.app-nav .nav-link.active::after {
    position: absolute;
    right: .82rem;
    bottom: 0;
    left: .82rem;
    height: 3px;
    content: "";
    border-radius: 999px 999px 0 0;
    background: #6bd56c;
}

.app-navbar__actions {
    display: flex;
    align-items: center;
    gap: .55rem;
}

.app-navbar__actions form {
    margin: 0;
}

.app-navbar__actions form[hidden] {
    display: none !important;
}

.app-navbar__actions .btn {
    border-radius: 999px;
    font-weight: 800;
}

.sync-progress {
    position: fixed;
    top: clamp(5rem, 10vh, 7rem);
    right: clamp(.8rem, 2vw, 1.4rem);
    z-index: 1200;
    width: min(480px, calc(100vw - 1.6rem));
    padding: 1.1rem;
    border: 1px solid rgba(98, 206, 101, .28);
    border-radius: 14px;
    background: rgba(16, 39, 26, .97);
    color: #f6fff7;
    box-shadow: 0 24px 70px rgba(9, 24, 14, .42);
    transition: border-color .2s ease, background .2s ease;
}

.sync-progress--complete {
    border-color: rgba(107, 213, 108, .7);
    background: rgba(18, 67, 34, .98);
}

.sync-progress--error {
    border-color: rgba(255, 139, 128, .75);
    background: rgba(76, 24, 22, .98);
}

.sync-progress__top,
.sync-progress__meta {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.sync-progress__top strong,
.sync-progress__top span,
.sync-progress__meta span {
    display: block;
}

.sync-progress__top strong {
    display: flex;
    align-items: center;
    gap: .55rem;
    font-size: .94rem;
    line-height: 1.15;
}

.sync-progress__spinner {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    border: 2px solid rgba(255, 255, 255, .28);
    border-top-color: #75df79;
    border-radius: 50%;
    animation: sync-spin .8s linear infinite;
}

.sync-progress--complete .sync-progress__spinner,
.sync-progress--error .sync-progress__spinner {
    animation: none;
}

.sync-progress--complete .sync-progress__spinner {
    border-color: #75df79;
    background: #75df79;
}

.sync-progress--error .sync-progress__spinner {
    border-color: #ff8b80;
    background: #ff8b80;
}

.sync-progress__top span[data-sync-current] {
    margin-top: .28rem;
    color: #b8dbc0;
    font-size: .84rem;
}

.sync-progress__top span[data-sync-percent] {
    color: #8ee68f;
    font-size: 1.15rem;
    font-weight: 900;
    line-height: 1;
}

.sync-progress__actions {
    display: grid;
    justify-items: end;
    gap: .45rem;
    flex: 0 0 auto;
}

.sync-progress__cancel {
    min-height: 28px;
    padding: .25rem .65rem;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    font-size: .72rem;
    font-weight: 800;
}

.sync-progress__cancel:hover,
.sync-progress__cancel:focus {
    background: rgba(255, 255, 255, .18);
}

.sync-progress__bar {
    height: 9px;
    margin: .95rem 0 .75rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, .13);
}

.sync-progress__bar span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #62ce65, #b7f36a);
    transition: width .22s ease;
}

.sync-progress__steps {
    display: grid;
    gap: .32rem;
    margin: .8rem 0 0;
    padding: .72rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, .055);
    list-style: none;
}

.sync-progress__steps[hidden] {
    display: none;
}

.sync-step {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: #789382;
    font-size: .76rem;
    font-weight: 700;
}

.sync-step > span {
    display: inline-grid;
    width: 20px;
    height: 20px;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
}

.sync-step--active {
    color: #fff;
}

.sync-step--active > span {
    background: #2d8145;
    animation: sync-pulse 1s ease-in-out infinite;
}

.sync-step--complete {
    color: #aee1b7;
}

.sync-step--complete > span {
    background: #236d3a;
    color: #fff;
}

@keyframes sync-spin {
    to { transform: rotate(360deg); }
}

@keyframes sync-pulse {
    50% { transform: scale(1.12); }
}

.sync-progress__meta {
    color: #dbeee0;
    font-size: .78rem;
}

.sync-progress__meta span:last-child {
    color: #95b99e;
    text-align: right;
}

.app-page main.container-fluid {
    position: relative;
    z-index: 1;
    display: block;
    width: min(100%, 1720px);
    margin: 0 auto;
    padding: clamp(1.2rem, 2.5vw, 2.4rem) clamp(.85rem, 2.7vw, 2.4rem) 3rem !important;
}

.app-page h1,
.app-page h2,
.app-page h3,
.app-page .fs-3 {
    letter-spacing: -.025em;
}

.app-table th {
    color: #5f6b63 !important;
    font-size: .72rem !important;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.app-table td {
    color: #2e3932;
}

.sortable-heading {
    display: inline-flex;
    align-items: center;
    gap: .28rem;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    padding: 0;
    text-align: inherit;
    text-transform: inherit;
    white-space: nowrap;
}

.sortable-heading::after {
    content: "↕";
    color: #99a49d;
    font-size: .72em;
}

th[aria-sort="ascending"] .sortable-heading::after {
    content: "↑";
    color: var(--app-green-700);
}

th[aria-sort="descending"] .sortable-heading::after {
    content: "↓";
    color: var(--app-green-700);
}

.value-cell .sortable-heading {
    margin-left: auto;
}

.lineup-builder {
    margin: 0 0 1.4rem;
    padding: clamp(1rem, 2vw, 1.35rem);
    border: 1px solid var(--app-line);
    border-radius: 16px;
    background: rgba(255, 255, 255, .96);
    box-shadow: var(--shadow-card);
}

.lineup-builder__header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .85rem;
}

/* Rival intelligence */
.rivals-shell {
    display: grid;
    gap: 1.5rem;
}

.rivals-header {
    align-items: end;
}

.rival-refresh-message {
    margin: 0;
    border: 0;
    border-radius: 14px;
}

.rival-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .8rem;
}

.rival-summary article {
    display: grid;
    gap: .25rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--app-line);
    border-radius: 14px;
    background: rgba(255, 255, 255, .94);
    box-shadow: var(--shadow-card);
}

.rival-summary span,
.rival-profile-card span,
.rival-threat-card span {
    color: #718078;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.rival-summary strong {
    color: #193323;
    font-size: 1.02rem;
}

.rivals-section {
    display: grid;
    gap: 1rem;
}

.rival-profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .9rem;
}

.rival-profile-card {
    position: relative;
    overflow: hidden;
    padding: 1.15rem;
    border: 1px solid var(--app-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-card);
}

.rival-profile-card::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #bfd0c3;
    content: "";
}

.rival-profile-card--self::before {
    background: var(--app-green-500);
}

.rival-profile-card > header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: .8rem;
}

.rival-profile-card h3 {
    margin: .1rem 0 0;
    color: #172d1e;
    font-size: 1.3rem;
    font-weight: 900;
}

.rival-style,
.rival-signal {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: .35rem .55rem;
    border-radius: 999px;
}

.rival-style--calm { background: #e8f5ed; color: #17613a !important; }
.rival-style--balanced { background: #eef2ff; color: #4255a5 !important; }
.rival-style--aggressive { background: #fff0e4; color: #a34b12 !important; }
.rival-style--unknown { background: #f0f2f1; color: #68736c !important; }

.rival-profile-card__sentence {
    min-height: 3rem;
    margin: .9rem 0;
    color: #405047;
    font-size: .94rem;
    line-height: 1.55;
}

.rival-profile-card__metrics,
.rival-threat-card__numbers {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .55rem;
}

.rival-profile-card__metrics > div,
.rival-threat-card__numbers > div {
    display: grid;
    align-content: start;
    gap: .16rem;
    min-width: 0;
    padding: .65rem;
    border-radius: 11px;
    background: #f6f8f6;
}

.rival-profile-card__metrics strong,
.rival-threat-card__numbers strong {
    overflow: hidden;
    color: #1d3224;
    font-size: 1.03rem;
    text-overflow: ellipsis;
}

.rival-profile-card__metrics small,
.rival-threat-card small {
    color: #77827b;
    font-size: .73rem;
}

.rival-cash--high { color: #0c7540 !important; }
.rival-cash--medium { color: #8a6704 !important; }
.rival-cash--low { color: #b13c35 !important; }

.rival-squad-line {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: .75rem;
    padding: .72rem 0;
    border-top: 1px solid #e5ebe6;
    border-bottom: 1px solid #e5ebe6;
}

.rival-squad-line strong {
    color: #3f5146;
    font-size: .8rem;
    text-align: right;
}

.rival-profile-card footer {
    padding-top: .65rem;
    color: #7e8982;
    font-size: .76rem;
}

.rival-threat-list {
    display: grid;
    gap: .7rem;
}

.rival-threat-card {
    display: grid;
    grid-template-columns: minmax(190px, .75fr) minmax(360px, 1.35fr) minmax(240px, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: .9rem 1rem;
    border: 1px solid var(--app-line);
    border-radius: 15px;
    background: #fff;
    box-shadow: var(--shadow-card);
}

.rival-threat-card__player {
    display: flex;
    align-items: center;
    gap: .65rem;
}

.rival-threat-card__player div {
    display: grid;
}

.rival-threat-card__player a {
    color: #183622;
    font-size: 1rem;
    font-weight: 900;
    text-decoration: none;
}

.rival-threat-card__numbers {
    gap: .35rem;
}

.rival-threat-card__numbers > div {
    padding: .48rem .55rem;
}

.rival-threat-card > p {
    margin: 0;
    color: #56625b;
    font-size: .82rem;
    line-height: 1.45;
}

.rival-signal {
    justify-self: end;
    white-space: nowrap;
}

.rival-signal--buy { background: #dff4e7; color: #12633a !important; }
.rival-signal--risk { background: #fde8e6; color: #9c322d !important; }

.rival-method-note {
    padding: 1rem 1.15rem;
    border: 1px solid #d8e2da;
    border-radius: 14px;
    background: #f4f8f5;
}

.rival-method-note strong { color: #25452f; }
.rival-method-note p { margin: .25rem 0 0; color: #5f6f65; font-size: .82rem; }

.competition-advice {
    display: grid;
    grid-template-columns: minmax(155px, .45fr) minmax(0, 1.55fr) auto;
    align-items: center;
    gap: .75rem;
    margin-top: .75rem;
    padding: .75rem .8rem;
    border: 1px solid #dfe8e1;
    border-radius: 12px;
    background: #f5f8f6;
}

.competition-advice > div { display: grid; }
.competition-advice span { color: #68776e; font-size: .68rem; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.competition-advice strong { color: #1c4028; font-size: 1.08rem; }
.competition-advice p { margin: 0; color: #57665d; font-size: .78rem; line-height: 1.45; }
.competition-advice a { color: #27693b; font-size: .76rem; font-weight: 800; white-space: nowrap; text-decoration: none; }
.competition-advice--go { border-color: #bfe0c9; background: #f0faf3; }
.competition-advice--risk { border-color: #efc7c3; background: #fff5f4; }
.competition-advice--risk strong { color: #9c332e; }

@media (max-width: 1100px) {
    .rival-threat-card {
        grid-template-columns: 1fr 1.5fr;
    }

    .rival-signal { justify-self: start; }
}

@media (max-width: 760px) {
    .rival-summary,
    .rival-profile-grid,
    .rival-threat-card {
        grid-template-columns: 1fr;
    }

    .rival-profile-card__metrics,
    .rival-threat-card__numbers {
        grid-template-columns: repeat(3, minmax(110px, 1fr));
        overflow-x: auto;
    }

    .rival-squad-line {
        align-items: start;
        flex-direction: column;
    }

    .rival-squad-line strong { text-align: left; }

    .competition-advice { grid-template-columns: 1fr; }
}

.lineup-builder__header h2 {
    margin: 0;
    font-size: clamp(1.15rem, 2vw, 1.55rem);
    font-weight: 900;
}

.formation-switch {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    justify-content: flex-end;
}

.formation-switch__button {
    min-height: 32px;
    padding: .42rem .64rem;
    border: 1px solid #d9e4dc;
    border-radius: 999px;
    background: #fff;
    color: #5a665e;
    font-size: .72rem;
    font-weight: 900;
}

.formation-switch__button.active {
    border-color: var(--app-green-600);
    background: var(--app-green-100);
    color: var(--app-green-700);
}

.lineup-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow: hidden;
    margin-bottom: .9rem;
    border: 1px solid #e2e9e3;
    border-radius: 12px;
    background: #f8faf8;
}

.lineup-summary > div {
    min-width: 0;
    padding: .62rem .72rem;
}

.lineup-summary > div + div {
    border-left: 1px solid #e2e9e3;
}

.lineup-summary span,
.lineup-pool__header span {
    display: block;
    overflow: hidden;
    color: #6f7b73;
    font-size: .58rem;
    font-weight: 900;
    letter-spacing: .055em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.lineup-summary strong,
.lineup-pool__header strong {
    display: block;
    margin-top: .16rem;
    overflow: hidden;
    color: var(--app-ink);
    font-size: .92rem;
    font-variant-numeric: tabular-nums;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lineup-workspace {
    display: grid;
    grid-template-columns: minmax(420px, 1fr) minmax(320px, 440px);
    gap: 1rem;
    align-items: stretch;
}

.lineup-pitch {
    position: relative;
    display: grid;
    grid-template-rows: repeat(4, minmax(74px, 1fr));
    gap: .55rem;
    min-height: 530px;
    overflow: hidden;
    padding: 1rem;
    border: 1px solid #cfe2d2;
    border-radius: 16px;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, .14) 0 2px, transparent 2px calc(50% - 1px), rgba(255, 255, 255, .22) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
        repeating-linear-gradient(0deg, #19733d 0 58px, #166a38 58px 116px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
}

.lineup-pitch::before,
.lineup-pitch::after {
    position: absolute;
    right: 12%;
    left: 12%;
    z-index: 0;
    height: 28%;
    border: 2px solid rgba(255, 255, 255, .34);
    content: "";
    pointer-events: none;
}

.lineup-pitch::before {
    top: -2px;
    border-top: 0;
    border-radius: 0 0 70px 70px;
}

.lineup-pitch::after {
    bottom: -2px;
    border-bottom: 0;
    border-radius: 70px 70px 0 0;
}

.lineup-pitch__grass {
    position: absolute;
    inset: 50% 0 auto;
    z-index: 0;
    border-top: 2px solid rgba(255, 255, 255, .36);
    pointer-events: none;
}

.lineup-line {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(var(--lineup-slots, 1), minmax(0, 1fr));
    gap: clamp(.35rem, 1.5vw, .7rem);
    align-items: center;
}

.lineup-slot {
    display: grid;
    min-width: 0;
    min-height: 68px;
    padding: .5rem .46rem;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 12px;
    background: rgba(255, 255, 255, .9);
    color: var(--app-ink);
    box-shadow: 0 8px 20px rgba(7, 42, 21, .13);
    text-align: center;
}

button.lineup-slot {
    cursor: pointer;
}

.lineup-slot strong,
.lineup-slot span,
.lineup-slot small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lineup-slot strong {
    font-size: .72rem;
    font-weight: 900;
}

.lineup-slot span {
    color: #607166;
    font-size: .58rem;
    font-weight: 800;
}

.lineup-slot small {
    color: var(--app-green-700);
    font-size: .58rem;
    font-variant-numeric: tabular-nums;
    font-weight: 900;
}

.lineup-slot--empty {
    place-items: center;
    border-style: dashed;
    background: rgba(255, 255, 255, .24);
    color: rgba(255, 255, 255, .86);
    box-shadow: none;
}

.lineup-slot--empty span {
    color: inherit;
    font-size: .7rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.lineup-pool {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 530px;
    overflow: hidden;
    border: 1px solid #e1e9e3;
    border-radius: 14px;
    background: #fff;
}

.lineup-pool__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .7rem;
    padding: .75rem .85rem;
    border-bottom: 1px solid #e7eee8;
    background: #f8faf8;
}

.lineup-pool__header strong {
    margin: 0;
    font-size: .68rem;
    text-align: right;
}

.lineup-pool__list {
    display: grid;
    align-content: start;
    gap: .4rem;
    max-height: 478px;
    overflow: auto;
    padding: .7rem;
}

.lineup-player-option {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) minmax(72px, auto);
    align-items: center;
    gap: .55rem;
    width: 100%;
    min-height: 58px;
    padding: .48rem .55rem;
    border: 1px solid #e0e7e2;
    border-radius: 11px;
    background: #fff;
    color: var(--app-ink);
    text-align: left;
}

.lineup-player-option:hover,
.lineup-player-option:focus-visible {
    border-color: #b7d7be;
    background: #f7fbf8;
}

.lineup-player-option.is-selected {
    border-color: var(--app-green-600);
    background: var(--app-green-100);
}

.lineup-player-option.is-position-full:not(.is-selected) {
    opacity: .62;
}

.lineup-player-option .position-badge {
    display: inline-grid;
    min-width: 34px;
    height: 28px;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    font-size: .64rem;
    font-weight: 900;
    text-transform: uppercase;
}

.lineup-player-option__identity,
.lineup-player-option__metrics {
    min-width: 0;
}

.lineup-player-option__identity strong,
.lineup-player-option__identity small,
.lineup-player-option__metrics span,
.lineup-player-option__metrics small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lineup-player-option__identity strong {
    font-size: .76rem;
    font-weight: 900;
}

.lineup-player-option__identity small,
.lineup-player-option__metrics small {
    color: #748078;
    font-size: .58rem;
    font-weight: 800;
}

.lineup-player-option__metrics {
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.lineup-player-option__metrics span {
    color: var(--app-green-700);
    font-size: .72rem;
    font-weight: 900;
}

.app-navbar__toggler {
    border-color: rgba(255, 255, 255, .25);
}

.app-navbar__toggler .navbar-toggler-icon {
    filter: invert(1);
}

.dashboard-shell {
    width: min(100%, 1720px);
    margin: 0 auto;
    padding: clamp(1.2rem, 2.5vw, 2.4rem) clamp(.85rem, 2.7vw, 2.4rem) 3rem;
}

.dashboard-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
}

.dashboard-eyebrow,
.section-heading__eyebrow,
.decision-column__eyebrow {
    margin: 0 0 .28rem;
    color: var(--app-green-700);
    font-size: .7rem;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.dashboard-header h1 {
    margin: 0;
    font-size: clamp(1.65rem, 2.8vw, 2.45rem);
    font-weight: 850;
    letter-spacing: -.04em;
}

.dashboard-intro {
    max-width: 740px;
    margin: .42rem 0 0;
    color: var(--app-muted);
    font-size: .95rem;
}

.position-filter {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .28rem;
    overflow-x: auto;
    border: 1px solid var(--app-line);
    border-radius: 13px;
    background: rgba(255, 255, 255, .86);
    box-shadow: 0 2px 10px rgba(24, 52, 33, .04);
    scrollbar-width: none;
}

.owner-filter {
    margin-left: auto;
}

.position-filter::-webkit-scrollbar {
    display: none;
}

.position-filter__button {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .45rem .72rem;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #566159;
    font-size: .76rem;
    font-weight: 850;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}

.position-filter__button:hover {
    background: #edf3ee;
    color: var(--app-ink);
}

.position-filter__button.active {
    background: var(--app-green-900);
    color: #fff;
    box-shadow: 0 4px 10px rgba(16, 55, 29, .18);
}

.position-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.summary-grid {
    display: grid;
    grid-template-columns: minmax(300px, 1.7fr) repeat(3, minmax(175px, 1fr));
    gap: .8rem;
    margin-bottom: 1rem;
}

.summary-card {
    position: relative;
    min-height: 142px;
    padding: 1.05rem 1.1rem;
    overflow: hidden;
    border: 1px solid var(--app-line);
    border-radius: 15px;
    background: rgba(255, 255, 255, .94);
    box-shadow: var(--shadow-card);
}

.summary-card:not(.summary-card--mood) {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-top: 3.1rem;
}

.summary-card__topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.summary-card__label {
    display: block;
    color: #6f7972;
    font-size: .7rem;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.summary-card__value {
    display: block;
    margin-top: .26rem;
    color: var(--app-ink);
    font-size: clamp(1.25rem, 2vw, 1.65rem);
    font-weight: 900;
    letter-spacing: -.035em;
    line-height: 1.15;
}

.summary-card p {
    margin: .38rem 0 0;
    color: var(--app-muted);
    font-size: .75rem;
    line-height: 1.42;
}

.summary-card__meta {
    display: inline-block;
    margin-top: .5rem;
    color: #546158;
    font-size: .68rem;
    font-weight: 750;
}

.summary-card__icon {
    position: absolute;
    top: .85rem;
    right: .9rem;
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 10px;
    font-size: .84rem;
    font-weight: 900;
}

.summary-card__icon--cash {
    background: var(--app-green-100);
    color: var(--app-green-700);
}

.summary-card__icon--efficiency {
    background: var(--app-blue-100);
    color: var(--app-blue-700);
}

.summary-card__icon--budget {
    background: var(--app-amber-100);
    color: var(--app-amber-700);
    font-size: .7rem;
}

.summary-card--mood {
    border-color: transparent;
    color: #fff;
    background: linear-gradient(135deg, #173b23, #0f2818);
    box-shadow: 0 10px 30px rgba(16, 45, 25, .17);
}

.summary-card--mood::after {
    position: absolute;
    top: -55px;
    right: -35px;
    width: 180px;
    height: 180px;
    content: "";
    border: 28px solid rgba(255, 255, 255, .045);
    border-radius: 50%;
}

.summary-card--mood .summary-card__label,
.summary-card--mood p,
.summary-card--mood .summary-card__meta {
    color: #c7daca;
}

.summary-card--mood .summary-card__value {
    color: #fff;
}

.summary-card--mood.mood-up {
    background: linear-gradient(135deg, #106a35, #123d25);
}

.summary-card--mood.mood-down {
    background: linear-gradient(135deg, #8f2929, #451e20);
}

.summary-card--mood.mood-flat {
    background: linear-gradient(135deg, #7a5a18, #40351b);
}

.summary-card--mood.mood-unknown {
    background: linear-gradient(135deg, #4e5a52, #28312b);
}

.simulation-panel {
    display: grid;
    grid-template-columns: minmax(260px, .85fr) minmax(0, 1.4fr);
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid #dfe8e1;
    border-radius: 15px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.simulation-panel h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 900;
}

.simulation-panel p:last-child {
    margin: .28rem 0 0;
    color: var(--app-muted);
    font-size: .72rem;
}

.simulation-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .55rem;
}

.simulation-metrics > div {
    min-width: 0;
    padding: .7rem .75rem;
    border: 1px solid #e6ece7;
    border-radius: 11px;
    background: #f8faf8;
}

.simulation-metrics span {
    display: block;
    color: #758078;
    font-size: .6rem;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.simulation-metrics strong {
    display: block;
    margin-top: .2rem;
    overflow: hidden;
    color: var(--app-ink);
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.simulation-panel.is-negative [data-sim-cash] {
    color: var(--app-red-700);
}

.simulation-summary {
    grid-column: 1 / -1;
    padding-top: .85rem;
    border-top: 1px solid #e3e9e4;
}

.simulation-summary__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .55rem;
    color: #566159;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.simulation-summary__header strong {
    font-size: .9rem;
    letter-spacing: 0;
}

.simulation-summary__list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: .5rem;
}

.simulation-move {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .15rem .5rem;
    padding: .58rem .62rem;
    border: 1px solid #e4ebe5;
    border-left: 4px solid #8a958e;
    border-radius: 10px;
    background: #f9fbf9;
}

.simulation-move--buy {
    border-left-color: var(--app-green-600);
}

.simulation-move--sell {
    border-left-color: var(--app-red-700);
}

.simulation-move span {
    color: #6c7770;
    font-size: .56rem;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.simulation-move strong,
.simulation-move small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.simulation-move strong {
    color: var(--app-ink);
    font-size: .78rem;
    font-weight: 900;
}

.simulation-move small {
    color: var(--app-muted);
    font-size: .64rem;
}

.simulation-move button {
    grid-row: 1 / span 3;
    grid-column: 2;
    align-self: center;
    min-height: 28px;
    border: 1px solid #d8e2da;
    border-radius: 999px;
    background: #fff;
    color: #566159;
    font-size: .6rem;
    font-weight: 900;
}

.prompt-panel {
    display: grid;
    grid-template-columns: minmax(260px, .85fr) minmax(0, 1.4fr);
    gap: .85rem 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid #dfe8e1;
    border-radius: 15px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.prompt-panel h2 {
    margin: 0;
    color: var(--app-ink);
    font-size: 1.05rem;
    font-weight: 900;
}

.prompt-panel p:last-child {
    margin: .28rem 0 0;
    color: var(--app-muted);
    font-size: .72rem;
}

.prompt-panel__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .5rem;
    min-width: 0;
}

.prompt-panel__actions span {
    min-width: 76px;
    color: var(--app-green-700);
    font-size: .68rem;
    font-weight: 900;
}

.prompt-panel__output {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 190px;
    padding: .85rem;
    border: 1px solid #dbe5dd;
    border-radius: 12px;
    background: #f8faf8;
    color: var(--app-ink);
    font: 500 .78rem/1.55 "Space Grotesk", system-ui, sans-serif;
    resize: vertical;
}

.prompt-panel__output:focus {
    border-color: var(--app-green-600);
    box-shadow: 0 0 0 3px rgba(29, 122, 65, .12);
    outline: none;
}

.mood-pulse {
    position: relative;
    z-index: 1;
    width: 10px;
    height: 10px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #82e58a;
    box-shadow: 0 0 0 6px rgba(130, 229, 138, .14);
}

.mood-down .mood-pulse {
    background: #ff8c8c;
    box-shadow: 0 0 0 6px rgba(255, 140, 140, .15);
}

.mood-flat .mood-pulse {
    background: #ffd16f;
    box-shadow: 0 0 0 6px rgba(255, 209, 111, .14);
}

.benchmark-panel {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid var(--app-line);
    border-radius: 15px;
    background: rgba(255, 255, 255, .86);
    box-shadow: var(--shadow-card);
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .8rem;
}

.section-heading h2,
.decision-column__header h2 {
    margin: 0;
    color: var(--app-ink);
    font-size: 1.02rem;
    font-weight: 900;
    letter-spacing: -.02em;
}

.section-heading > p {
    max-width: 470px;
    margin: 0;
    color: var(--app-muted);
    font-size: .72rem;
    text-align: right;
}

.benchmark-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .6rem;
}

.benchmark-card {
    min-width: 0;
    padding: .72rem;
    border: 1px solid #e5ebe6;
    border-radius: 12px;
    background: #fbfcfb;
}

.benchmark-card__header {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: #4f5b53;
    font-size: .72rem;
    font-weight: 800;
}

.position-badge,
.player-avatar__position {
    display: inline-grid;
    place-items: center;
    color: #fff;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
}

.position-badge {
    min-width: 28px;
    height: 23px;
    padding: 0 .35rem;
    border-radius: 7px;
    font-size: .63rem;
}

.position-goalkeeper { background-color: var(--position-pt) !important; }
.position-defender { background-color: var(--position-df) !important; }
.position-midfielder { background-color: var(--position-md) !important; color: #2a210f !important; }
.position-striker { background-color: var(--position-dl) !important; }
.position-unknown { background-color: #879089 !important; }

.benchmark-card > strong {
    display: block;
    margin-top: .5rem;
    font-size: 1rem;
    font-weight: 900;
}

.benchmark-card dl {
    display: grid;
    gap: .25rem;
    margin: .55rem 0 0;
}

.benchmark-card dl > div {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: .35rem;
    color: var(--app-muted);
    font-size: .64rem;
}

.benchmark-card dt {
    font-weight: 700;
}

.benchmark-card dd {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: #3d4840;
    font-weight: 800;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.decision-board {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 1rem;
}

.decision-column {
    min-width: 0;
    padding: .9rem;
    border: 1px solid var(--app-line);
    border-radius: 16px;
    background: rgba(249, 251, 249, .82);
}

.decision-column--market {
    border-top: 4px solid #2f9e57;
}

.decision-column--squad {
    border-top: 4px solid #345f9b;
}

.decision-column__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.decision-column__count {
    display: inline-flex;
    align-items: baseline;
    gap: .25rem;
    padding: .34rem .58rem;
    border: 1px solid var(--app-line);
    border-radius: 999px;
    background: #fff;
    color: var(--app-muted);
    font-size: .65rem;
    white-space: nowrap;
}

.decision-column__count strong {
    color: var(--app-ink);
    font-size: .78rem;
}

.decision-column__help {
    margin: .38rem 0 .75rem;
    color: var(--app-muted);
    font-size: .69rem;
    line-height: 1.4;
}

.recommendation-list {
    display: grid;
    gap: .65rem;
}

.position-section {
    display: grid;
    gap: .62rem;
}

.position-section[hidden] {
    display: none !important;
}

.position-section__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    margin: .12rem 0 -.14rem;
    padding: .48rem .58rem;
    border-radius: 10px;
    background: #edf3ee;
    color: #344139;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.position-section__heading span:last-child {
    color: #6b766f;
    font-size: .62rem;
}

.player-card {
    min-width: 0;
    padding: .72rem;
    border: 1px solid #dfe6e0;
    border-radius: 13px;
    background: var(--app-surface);
    box-shadow: var(--shadow-card);
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.player-card:hover {
    border-color: #cbd7cd;
    box-shadow: var(--shadow-soft);
    transform: translateY(-1px);
}

.player-card[hidden],
.filtered-empty[hidden] {
    display: none !important;
}

.player-card.is-recommendation-out-of-scope .comparison-note {
    border-left-color: #99a39c;
    background: #f3f5f3;
    color: #59645d;
}

.player-card.is-simulated {
    border-color: #acdcb8;
    box-shadow: 0 8px 22px rgba(35, 125, 63, .1);
}

.player-card__header {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: .62rem;
}

.player-avatar {
    position: relative;
    display: block;
    width: 48px;
    height: 48px;
}

.player-avatar img {
    display: block;
    width: 48px;
    height: 48px;
    object-fit: cover;
    border: 2px solid #edf1ee;
    border-radius: 50%;
    background: #edf1ee;
}

.player-avatar__position {
    position: absolute;
    right: -4px;
    bottom: -2px;
    min-width: 23px;
    height: 19px;
    padding: 0 .2rem;
    border: 2px solid #fff;
    border-radius: 7px;
    font-size: .51rem;
}

.player-identity {
    min-width: 0;
}

.player-identity > a {
    display: block;
    overflow: hidden;
    color: #111a14;
    font-size: .9rem;
    font-weight: 900;
    letter-spacing: -.015em;
    line-height: 1.2;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-identity > a:hover {
    color: var(--app-green-700);
}

.player-identity > span {
    display: block;
    margin-top: .16rem;
    overflow: hidden;
    color: var(--app-muted);
    font-size: .64rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.signal-pill {
    display: inline-flex;
    min-height: 25px;
    align-items: center;
    justify-content: center;
    padding: .3rem .55rem;
    border-radius: 999px;
    font-size: .61rem;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.player-card__badges {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: .28rem;
}

.status-mini {
    display: inline-flex;
    min-height: 25px;
    align-items: center;
    justify-content: center;
    padding: .3rem .5rem;
    border-radius: 999px;
    font-size: .58rem;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.status-mini.status-starter {
    background: var(--app-green-100);
    color: var(--app-green-700);
}

.status-mini.status-not-starter {
    background: var(--app-red-100);
    color: var(--app-red-700);
}

.status-mini.text-bg-secondary,
.status-mini.text-secondary {
    background: #edf0ee;
    color: #68726b;
}

.signal-buy {
    background: var(--app-green-100);
    color: var(--app-green-700);
}

.signal-sell,
.signal-risk {
    background: var(--app-red-100);
    color: var(--app-red-700);
}

.signal-wait {
    background: var(--app-amber-100);
    color: var(--app-amber-700);
}

.signal-info {
    background: var(--app-blue-100);
    color: var(--app-blue-700);
}

.signal-neutral {
    background: #edf0ee;
    color: #657068;
}

.player-card__snapshot,
.efficiency-row {
    display: grid;
    margin-top: .65rem;
    border: 1px solid #edf0ed;
    border-radius: 10px;
    background: #f8faf8;
}

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

.player-card__snapshot--market {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.player-card__snapshot > div,
.efficiency-row > div {
    min-width: 0;
    padding: .48rem .5rem;
}

.player-card__snapshot > div + div,
.efficiency-row > div + div {
    border-left: 1px solid #e5eae6;
}

.player-card__snapshot span,
.efficiency-row span,
.price-decision span {
    display: block;
    overflow: hidden;
    color: #758078;
    font-size: .55rem;
    font-weight: 800;
    letter-spacing: .035em;
    line-height: 1.2;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.player-card__snapshot strong,
.efficiency-row strong,
.price-decision strong {
    display: block;
    margin-top: .16rem;
    overflow: hidden;
    color: #1b251e;
    font-size: .73rem;
    font-variant-numeric: tabular-nums;
    font-weight: 900;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-card__snapshot small {
    display: block;
    margin-top: .08rem;
    overflow: hidden;
    color: #8a938d;
    font-size: .52rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-card__signals {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
    gap: .45rem;
    margin-top: .48rem;
}

.trend-chip,
.form-chip {
    min-width: 0;
    padding: .43rem .5rem;
    border-radius: 9px;
    background: #f2f4f2;
    color: #68726b;
}

.trend-chip {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: .35rem;
}

.trend-chip__direction,
.form-chip > span {
    font-size: .55rem;
    font-weight: 900;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.trend-chip strong {
    justify-self: end;
    font-size: .67rem;
    font-variant-numeric: tabular-nums;
    font-weight: 900;
}

.trend-chip__values {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .35rem;
    margin-top: .12rem;
}

.trend-chip__values span {
    min-width: 0;
    overflow: hidden;
    font-size: .54rem;
    font-variant-numeric: tabular-nums;
    font-weight: 900;
    opacity: .8;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trend-chip__values small {
    display: block;
    margin-bottom: .04rem;
    font-size: .48rem;
    font-weight: 900;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.trend-chip.text-success,
.form-chip.text-success {
    background: var(--app-green-100);
    color: var(--app-green-700) !important;
}

.trend-chip.text-danger,
.form-chip.text-danger {
    background: var(--app-red-100);
    color: var(--app-red-700) !important;
}

.trend-chip.text-warning,
.form-chip.text-warning {
    background: var(--app-amber-100);
    color: var(--app-amber-700) !important;
}

.trend-chip.text-secondary,
.form-chip.text-secondary {
    color: #68726b !important;
}

.form-chip {
    display: flex;
    min-width: 0;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
}

.form-chip strong {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: .2rem;
    margin-top: .13rem;
    max-width: 100%;
    overflow: hidden;
    font-size: .64rem;
    font-variant-numeric: tabular-nums;
    font-weight: 900;
    white-space: normal;
}

.form-chip.racha-sequence {
    background: #f3f5f3;
    color: #5c6760 !important;
}

.form-chip.racha-sequence strong {
    overflow-x: auto;
    scrollbar-width: none;
}

.form-chip.racha-sequence strong::-webkit-scrollbar {
    display: none;
}

.form-pill,
.form-point {
    display: inline-flex;
    min-width: 25px;
    height: 24px;
    align-items: center;
    justify-content: center;
    padding: 0 .42rem;
    border-radius: 7px;
    color: #fff;
    font-size: .68rem;
    font-variant-numeric: tabular-nums;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.form-pill {
    gap: .2rem;
    height: auto;
    min-height: 26px;
    padding: .22rem .32rem;
    background: #edf0ee;
}

.form-point--elite { background: #1677d2; }
.form-point--good { background: #16a65a; }
.form-point--ok { background: #f0b429; color: #2f260d; }
.form-point--bad { background: #de3f3f; }
.form-point--empty { background: #879089; }

.fit-score {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: .18rem .55rem;
    margin-top: .52rem;
    padding: .55rem .62rem;
    border: 1px solid #dbe5dd;
    border-left: 5px solid #8b9690;
    border-radius: 10px;
    background: #f8faf8;
}

.fit-score > div {
    grid-row: 1 / span 2;
    min-width: 54px;
    text-align: center;
}

.fit-score span,
.fit-legend__eyebrow {
    display: block;
    color: #68736c;
    font-size: .54rem;
    font-weight: 900;
    letter-spacing: .045em;
    line-height: 1.15;
    text-transform: uppercase;
}

.fit-score strong {
    display: block;
    color: var(--app-ink);
    font-size: 1.12rem;
    font-variant-numeric: tabular-nums;
    font-weight: 900;
    line-height: 1;
}

.fit-score p {
    margin: 0;
    color: var(--app-ink);
    font-size: .76rem;
    font-weight: 900;
    line-height: 1.15;
}

.fit-score small {
    min-width: 0;
    overflow: hidden;
    color: #69746d;
    font-size: .61rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fit-score--elite {
    border-left-color: #1677d2;
    background: #edf6ff;
}

.fit-score--elite strong,
.fit-score--elite p {
    color: #115a9f;
}

.fit-score--buy {
    border-left-color: var(--app-green-600);
    background: #edf8ef;
}

.fit-score--buy strong,
.fit-score--buy p {
    color: var(--app-green-700);
}

.fit-score--watch {
    border-left-color: #f0b429;
    background: #fff8e6;
}

.fit-score--watch strong,
.fit-score--watch p {
    color: #7a5a18;
}

.fit-score--avoid {
    border-left-color: var(--app-red-700);
    background: #fff1f1;
}

.fit-score--avoid strong,
.fit-score--avoid p {
    color: var(--app-red-700);
}

.fit-score--neutral {
    border-left-color: #9aa39d;
}

.fit-legend {
    display: grid;
    grid-template-columns: minmax(240px, .9fr) minmax(0, 1.4fr);
    gap: .85rem;
    margin-top: .85rem;
    padding: .85rem;
    border: 1px solid #dfe8e1;
    border-radius: 13px;
    background: #fff;
}

.fit-legend strong {
    display: block;
    margin-top: .14rem;
    color: var(--app-ink);
    font-size: .92rem;
    font-weight: 900;
}

.fit-legend p {
    margin: .22rem 0 0;
    color: var(--app-muted);
    font-size: .68rem;
    line-height: 1.35;
}

.fit-legend ul {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .5rem;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.fit-legend li {
    display: flex;
    align-items: center;
    gap: .4rem;
    min-width: 0;
    color: #566159;
    font-size: .66rem;
    font-weight: 850;
}

.fit-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 25px;
    padding: .18rem .34rem;
    border-radius: 999px;
    font-size: .62rem;
    font-weight: 900;
}

.fit-chip.fit-score--elite {
    background: #d8ecff;
    color: #115a9f;
}

.fit-chip.fit-score--buy {
    background: var(--app-green-100);
    color: var(--app-green-700);
}

.fit-chip.fit-score--watch {
    background: var(--app-amber-100);
    color: var(--app-amber-700);
}

.fit-chip.fit-score--avoid {
    background: var(--app-red-100);
    color: var(--app-red-700);
}

.efficiency-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: .48rem;
}

.efficiency-row__target {
    background: #eaf6ec;
    border-radius: 0 9px 9px 0;
}

.efficiency-row__target strong {
    color: var(--app-green-700);
}

.price-decision {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .45rem;
    margin-top: .48rem;
}

.price-decision > div {
    padding: .52rem .6rem;
    border: 1px solid #e6ebe7;
    border-radius: 9px;
    background: #f8faf8;
}

.price-decision > div:last-child {
    border-color: #cfe8d4;
    background: #eaf6ec;
}

.price-decision > div:last-child strong {
    color: var(--app-green-700);
}

.comparison-note,
.recommendation-reason {
    margin: .48rem 0 0;
    border-radius: 8px;
    font-size: .61rem;
    line-height: 1.4;
}

.comparison-note {
    padding: .42rem .5rem;
    border-left: 3px solid #aeb7b0;
    background: #f3f5f3;
    color: #566159;
    font-weight: 720;
}

.comparison-positive {
    border-left-color: var(--app-green-600);
    background: #edf8ef;
    color: #1d6936;
}

.comparison-negative {
    border-left-color: var(--app-red-700);
    background: #fff1f1;
    color: #8e3030;
}

.comparison-neutral {
    border-left-color: #99a39c;
}

.recommendation-reason {
    color: #5d6860;
}

.player-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-top: .55rem;
    padding-top: .48rem;
    border-top: 1px solid #edf0ed;
    color: #7c867f;
    font-size: .58rem;
    font-weight: 750;
}

.player-card__footer a {
    color: var(--app-green-700);
    font-size: .61rem;
    font-weight: 900;
    text-decoration: none;
}

.player-card__footer a:hover {
    text-decoration: underline;
}

.player-card__actions {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
}

.simulation-offer {
    display: inline-grid;
    grid-template-columns: auto minmax(92px, 112px);
    align-items: center;
    gap: .32rem;
    min-height: 28px;
    margin: 0;
    padding: .22rem .38rem;
    border: 1px solid #dbe5dd;
    border-radius: 999px;
    background: #f8faf8;
    color: #6f7a73;
    font-size: .58rem;
    font-weight: 900;
    text-transform: uppercase;
}

.simulation-offer input {
    width: 100%;
    min-width: 0;
    border: 0;
    background: transparent;
    color: var(--app-ink);
    font-size: .68rem;
    font-variant-numeric: tabular-nums;
    font-weight: 900;
    line-height: 1;
    text-align: right;
}

.simulation-offer input:focus {
    outline: none;
}

.simulation-button {
    min-height: 28px;
    padding: .34rem .58rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: .61rem;
    font-weight: 900;
    line-height: 1;
}

.simulation-button--buy {
    background: var(--app-green-100);
    color: var(--app-green-700);
}

.simulation-button--sell {
    background: var(--app-red-100);
    color: var(--app-red-700);
}

.simulation-button--undo {
    border-color: #d4ded6;
    background: #fff;
    color: #566159;
}

.filtered-empty {
    padding: 2.3rem 1rem;
    border: 1px dashed #ccd6ce;
    border-radius: 13px;
    color: var(--app-muted);
    text-align: center;
}

.filtered-empty > span {
    display: block;
    margin-bottom: .25rem;
    font-size: 1.5rem;
}

.filtered-empty strong {
    color: var(--app-ink);
    font-size: .82rem;
}

.filtered-empty p {
    margin: .25rem 0 0;
    font-size: .68rem;
}

@media (max-width: 1199.98px) {
    .lineup-workspace {
        grid-template-columns: 1fr;
    }

    .lineup-pitch,
    .lineup-pool {
        min-height: 460px;
    }

    .lineup-pool__list {
        max-height: 420px;
    }

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

    .summary-card--mood {
        grid-column: 1 / -1;
    }

    .player-card__snapshot,
    .efficiency-row,
    .price-decision {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .player-card__snapshot > div:nth-child(n+3),
    .efficiency-row > div:nth-child(3) {
        border-top: 1px solid #e5eae6;
    }

    .player-card__snapshot > div:nth-child(odd) {
        border-left: 0;
    }

    .player-card__snapshot > div:nth-child(4),
    .efficiency-row > div:nth-child(4) {
        border-top: 1px solid #e5eae6;
    }

    .efficiency-row__target {
        border-radius: 0 0 9px 0;
    }
}

@media (max-width: 991.98px) {
    .app-navbar {
        position: relative;
    }

    .lineup-builder__header {
        align-items: stretch;
        flex-direction: column;
    }

    .formation-switch {
        justify-content: flex-start;
    }

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

    .lineup-summary > div {
        border-left: 0 !important;
    }

    .lineup-summary > div:nth-child(n+3) {
        border-top: 1px solid #e2e9e3;
    }

    .lineup-summary > div:nth-child(even) {
        border-left: 1px solid #e2e9e3 !important;
    }

    .app-navbar__inner {
        padding-block: .3rem;
    }

    .app-nav {
        margin-top: .65rem;
        padding-top: .5rem;
        border-top: 1px solid rgba(255, 255, 255, .12);
    }

    .app-nav .nav-link {
        padding: .65rem .15rem;
    }

    .app-nav .nav-link.active::after {
        top: .55rem;
        right: auto;
        bottom: .55rem;
        left: -.65rem;
        width: 3px;
        height: auto;
        border-radius: 999px;
    }

    .app-navbar__actions {
        align-items: stretch;
        flex-direction: column;
        margin-top: .5rem;
    }

    .app-navbar__actions .btn {
        width: 100%;
    }

    .dashboard-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .position-filter {
        width: 100%;
    }

    .position-filter__button {
        flex: 1 0 auto;
    }

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

    .decision-board {
        grid-template-columns: minmax(0, 1fr);
    }

    .simulation-panel,
    .simulation-metrics,
    .prompt-panel {
        grid-template-columns: minmax(0, 1fr);
    }

    .prompt-panel__actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .fit-legend {
        grid-template-columns: minmax(0, 1fr);
    }

    .fit-legend ul {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .lineup-builder {
        padding: .8rem;
    }

    .lineup-summary {
        grid-template-columns: 1fr;
    }

    .lineup-summary > div,
    .lineup-summary > div:nth-child(even) {
        border-left: 0 !important;
    }

    .lineup-summary > div + div {
        border-top: 1px solid #e2e9e3;
    }

    .lineup-pitch {
        min-height: 430px;
        padding: .72rem;
    }

    .lineup-line {
        gap: .28rem;
    }

    .lineup-slot {
        min-height: 62px;
        padding: .4rem .3rem;
    }

    .lineup-slot strong {
        font-size: .62rem;
    }

    .lineup-player-option {
        grid-template-columns: 34px minmax(0, 1fr);
    }

    .lineup-player-option__metrics {
        grid-column: 2;
        text-align: left;
    }

    .dashboard-shell {
        padding-inline: .65rem;
    }

    .dashboard-header {
        margin-bottom: .85rem;
    }

    .dashboard-intro {
        font-size: .84rem;
    }

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

    .summary-card {
        min-height: 126px;
        padding: .85rem;
    }

    .summary-card--mood {
        grid-column: 1 / -1;
        min-height: 142px;
    }

    .summary-card:last-child {
        grid-column: 1 / -1;
    }

    .summary-card:not(.summary-card--mood) {
        padding-top: 2.65rem;
    }

    .summary-card__value {
        font-size: 1.04rem;
    }

    .summary-card p {
        font-size: .65rem;
    }

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

    .section-heading > p {
        text-align: left;
    }

    .benchmark-panel,
    .decision-column {
        padding: .65rem;
        border-radius: 13px;
    }

    .benchmark-grid {
        display: flex;
        margin-inline: -.1rem;
        padding-bottom: .25rem;
        overflow-x: auto;
        scroll-snap-type: x proximity;
    }

    .benchmark-card {
        min-width: 230px;
        scroll-snap-align: start;
    }

    .player-card {
        padding: .62rem;
    }

    .player-card__header {
        grid-template-columns: 43px minmax(0, 1fr) auto;
        gap: .5rem;
    }

    .player-avatar,
    .player-avatar img {
        width: 43px;
        height: 43px;
    }

    .signal-pill {
        max-width: 104px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .player-card__signals {
        grid-template-columns: minmax(0, 1fr);
    }

    .comparison-note,
    .recommendation-reason {
        font-size: .59rem;
    }

    .fit-score {
        grid-template-columns: minmax(0, 1fr);
    }

    .fit-score > div {
        grid-row: auto;
        text-align: left;
    }

    .fit-score small {
        white-space: normal;
    }

    .fit-legend ul {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
