/* Kick Fantasy — KICKFANTASY dashboard theme */
:root {
    --kick-bg: #0d1526;
    --kick-shell: #121c2e;
    --kick-card: #1a2740;
    --kick-card-hover: #223352;
    --kick-card-light: #f8fafc;
    --kick-blue: #2563eb;
    --kick-blue-light: #60a5fa;
    --kick-blue-dark: #1d4ed8;
    --kick-orange: #f97316;
    --kick-orange-light: #fbbf24;
    --kick-gold: #fbbf24;
    --kick-silver: #94a3b8;
    --kick-bronze: #d97706;
    --color-pitch: #1e3a5f;
    --color-accent: var(--kick-blue-light);
    --scrollbar-thumb: rgba(96, 165, 250, 0.35);
    --scrollbar-thumb-hover: rgba(96, 165, 250, 0.55);
    --scrollbar-track: rgba(255, 255, 255, 0.04);
    --glow-blue: 0 0 24px rgba(37, 99, 235, 0.4);
    --glow-gold: 0 0 16px rgba(251, 191, 36, 0.35);
    --widget-border: rgba(96, 165, 250, 0.12);
}

/* Scrollbars */
*,
html,
body {
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) transparent;
}

*::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

*::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 999px;
    border: 1px solid transparent;
    background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

*::-webkit-scrollbar-thumb:active {
    background: var(--kick-orange-light);
}

*::-webkit-scrollbar-corner {
    background: transparent;
}

*::-webkit-scrollbar-button,
*::-webkit-scrollbar-button:single-button,
*::-webkit-scrollbar-button:horizontal:decrement,
*::-webkit-scrollbar-button:horizontal:increment,
*::-webkit-scrollbar-button:vertical:decrement,
*::-webkit-scrollbar-button:vertical:increment {
    display: none;
    width: 0;
    height: 0;
}

.scrollbar-kick {
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.scrollbar-kick::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.scrollbar-kick::-webkit-scrollbar-track {
    margin: 0 4px;
    background: var(--scrollbar-track);
}

.scrollbar-kick::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.5), rgba(251, 191, 36, 0.5));
    border-radius: 999px;
}

.scrollbar-kick::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, var(--kick-blue-light), var(--kick-orange-light));
}

html {
    -webkit-tap-highlight-color: transparent;
    height: 100%;
    overflow: hidden;
}

body.bg-kick-shell {
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
}

#app-shell {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
}

#app {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
}

body.bg-kick-shell,
.bg-kick-shell {
    background-color: var(--kick-bg);
}

.app-shell {
    background: var(--kick-shell);
    background-image:
        radial-gradient(ellipse 120% 70% at 50% -15%, rgba(37, 99, 235, 0.22) 0%, transparent 55%),
        radial-gradient(ellipse 60% 50% at 100% 50%, rgba(37, 99, 235, 0.08) 0%, transparent 50%),
        linear-gradient(180deg, var(--kick-shell) 0%, var(--kick-bg) 100%);
}

/* Dashboard widgets */
.widget-card {
    background: var(--kick-card);
    border: 1px solid var(--widget-border);
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.widget-card-dark {
    background: linear-gradient(145deg, rgba(26, 39, 64, 0.95) 0%, rgba(18, 28, 46, 0.98) 100%);
    border: 1px solid var(--widget-border);
    border-radius: 1rem;
    padding: 0.75rem;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
}

.widget-card-title {
    margin-bottom: 0.75rem;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--kick-blue-light);
}

.widget-stat {
    background: var(--kick-card);
    border: 1px solid var(--widget-border);
    border-radius: 0.875rem;
    padding: 0.875rem;
    text-align: center;
}

.widget-stat-value {
    font-size: 1.35rem;
    font-weight: 900;
    color: white;
    line-height: 1.2;
}

.widget-stat-label {
    margin-top: 0.15rem;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgb(100 116 139);
}

.widget-tabs {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--widget-border);
    border-radius: 0.875rem;
}

.widget-tab {
    flex-shrink: 0;
    border-radius: 0.625rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.625rem;
    font-weight: 700;
    color: rgb(148 163 184);
    transition: all 0.15s;
}

.widget-tab-active {
    background: linear-gradient(135deg, var(--kick-blue) 0%, var(--kick-blue-dark) 100%) !important;
    color: white !important;
    box-shadow: var(--glow-blue);
}

.dash-grid {
    display: grid;
    gap: 0.75rem;
}

.dash-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.league-table {
    width: 100%;
    font-size: 0.7rem;
    border-collapse: separate;
    border-spacing: 0 0.25rem;
}

.league-table th {
    padding: 0.35rem 0.5rem;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgb(100 116 139);
    text-align: left;
}

.league-table td {
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    font-weight: 600;
    color: white;
}

.league-table tr td:first-child { border-radius: 0.5rem 0 0 0.5rem; }
.league-table tr td:last-child { border-radius: 0 0.5rem 0.5rem 0; text-align: right; color: var(--kick-blue-light); font-weight: 800; }

.league-table tr.league-row-me td {
    background: rgba(37, 99, 235, 0.15);
    border: 1px solid rgba(96, 165, 250, 0.25);
}

.live-strip {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.live-chip {
    flex-shrink: 0;
    min-width: 7rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(239, 68, 68, 0.25);
    background: rgba(239, 68, 68, 0.08);
    padding: 0.5rem 0.75rem;
    text-align: center;
}

.nav-active {
    color: var(--kick-blue-light) !important;
    filter: drop-shadow(0 0 8px rgba(96, 165, 250, 0.5));
}

.nav-active span {
    color: var(--kick-blue-light) !important;
}

.brand-title {
    font-size: 0.65rem;
    font-weight: 900;
    background: linear-gradient(90deg, #fff 0%, var(--kick-blue-light) 50%, var(--kick-blue-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.18em;
}

@media (min-width: 1024px) {
    .brand-title { font-size: 0.75rem; }
}

.brand-logo-sm {
    height: 2rem;
    width: 2rem;
    border-radius: 0.625rem;
    object-fit: cover;
    ring: 1px solid rgba(96, 165, 250, 0.3);
    box-shadow: var(--glow-blue);
}

/* Header */
.header-inner {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem 0.625rem;
}

@media (min-width: 1024px) {
    .header-inner { padding: 0.75rem 1.5rem; }
}

.header-icon-btn {
    display: flex;
    height: 2rem;
    width: 2rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    color: rgb(148 163 184);
    transition: color 0.15s, background 0.15s;
}

.header-icon-btn:hover { color: white; background: rgba(255,255,255,0.05); }

.notif-badge {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    height: 0.4rem;
    width: 0.4rem;
    border-radius: 999px;
    background: #ef4444;
}

.header-avatar {
    display: flex;
    height: 2rem;
    width: 2rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 0.625rem;
    font-weight: 900;
}

/* Desktop top navigation */
.top-nav {
    display: none;
    border-bottom: 1px solid var(--widget-border);
    background: rgba(18, 28, 46, 0.85);
    backdrop-filter: blur(12px);
}

@media (min-width: 1024px) {
    .top-nav { display: block; }
}

/* Bottom navigation (mobile) */
.bottom-nav {
    display: block;
    border-top: 1px solid var(--widget-border);
    background: rgba(13, 21, 38, 0.96) !important;
    backdrop-filter: blur(16px);
}

@media (min-width: 1024px) {
    .bottom-nav { display: none; }
}

.nav-suppressed #top-nav,
.nav-suppressed #bottom-nav {
    display: none !important;
}

.top-nav-inner {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0 1.5rem;
    overflow-x: auto;
}

.top-nav-link {
    flex-shrink: 0;
    padding: 0.875rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: rgb(148 163 184);
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}

.top-nav-link:hover { color: white; }

.top-nav-active {
    color: white !important;
    border-bottom-color: var(--kick-blue-light) !important;
}

.mobile-sub-nav-inner {
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    padding: 0.35rem 0.5rem;
}

.mobile-sub-btn {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 0.35rem 0.25rem;
    font-size: 0.5625rem;
    font-weight: 700;
    color: rgb(100 116 139);
    border: 0;
    background: transparent;
}

.mobile-sub-btn .nav-icon { height: 1.25rem; width: 1.25rem; }

.mobile-sub-active { color: var(--kick-blue-light) !important; }

.bottom-nav-inner {
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    padding: 0.4rem 0.25rem;
    width: 100%;
    max-width: none;
    margin: 0;
}

.bottom-nav-btn {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.25rem;
    font-size: 0.5625rem;
    font-weight: 700;
    color: rgb(100 116 139);
    border: 0;
    background: transparent;
}

.bottom-nav-btn .nav-icon { height: 1.35rem; width: 1.35rem; }

.bottom-nav-active {
    color: var(--kick-blue-light) !important;
    filter: drop-shadow(0 0 6px rgba(96, 165, 250, 0.45));
}

.bottom-nav-btn-center {
    position: relative;
}

.bottom-nav-btn-center .nav-icon {
    height: 1.5rem;
    width: 1.5rem;
}

.bottom-nav-btn-center span:last-child {
    font-weight: 800;
}

.live-dot-sm {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    background: #ef4444;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.75);
    animation: pulse-live 1.5s ease-in-out infinite;
}

.nav-icon { height: 1.5rem; width: 1.5rem; }

/* Dashboard page layouts */
.dash-page { width: 100%; max-width: none; }

html, body {
    width: 100%;
}

.dash-mobile { display: block; }
.dash-desktop { display: none; }

@media (min-width: 1024px) {
    .dash-mobile { display: none; }
    .dash-desktop { display: block; }
    .dash-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .community-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.dash-grid-top {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1.4fr 1fr;
    margin-bottom: 1rem;
}

.dash-grid-bottom {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr 1fr;
}

.dash-grid-market {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1.5fr 1fr;
}

.dash-grid-matches {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr 1fr;
}

.hub-matches-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.hub-matches-badge {
    font-size: 0.625rem;
    font-weight: 800;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    background: rgba(96, 165, 250, 0.15);
    color: var(--kick-blue-light);
}

.hub-matches-badge--live {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.hub-matches-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hub-matches-empty {
    padding: 1rem 0;
    text-align: center;
    font-size: 0.75rem;
    color: rgb(100 116 139);
}

.hub-match-row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
    padding: 0.625rem 0.75rem;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.hub-match-row:hover {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(96, 165, 250, 0.2);
}

.hub-match-row--live {
    border-color: rgba(239, 68, 68, 0.2);
    background: rgba(239, 68, 68, 0.06);
}

.hub-match-comp {
    font-size: 0.5625rem;
    font-weight: 600;
    color: rgb(100 116 139);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hub-match-teams {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.hub-match-code {
    min-width: 2.5rem;
    font-size: 0.75rem;
    font-weight: 800;
    color: white;
    text-align: center;
}

.hub-match-score {
    font-size: 0.875rem;
    font-weight: 900;
    color: white;
    letter-spacing: 0.05em;
}

.hub-match-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.625rem;
    color: rgb(100 116 139);
}

.hub-match-score-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.125rem;
}

.hub-match-penalties {
    font-size: 0.5625rem;
    font-weight: 800;
    color: rgb(251 191 36);
    letter-spacing: 0.03em;
}

.hub-match-date {
    font-weight: 600;
    color: rgb(148 163 184);
}

.player-eliminated-badge {
    position: absolute;
    bottom: -2px;
    left: 50%;
    z-index: 25;
    transform: translateX(-50%);
    border-radius: 9999px;
    background: rgb(239 68 68);
    padding: 1px 5px;
    font-size: 7px;
    font-weight: 800;
    line-height: 1.2;
    color: white;
    white-space: nowrap;
    box-shadow: 0 0 0 1px rgb(127 29 29 / 0.5);
}

.player-eliminated-badge--bench {
    bottom: auto;
    top: -4px;
}

.player-dot--eliminated .pos-gk,
.player-dot--eliminated .pos-def,
.player-dot--eliminated .pos-mid,
.player-dot--eliminated .pos-fwd {
    box-shadow: 0 0 0 2px rgb(239 68 68 / 0.85), 0 0 12px rgb(239 68 68 / 0.35);
}

.bench-card--eliminated {
    border-color: rgb(239 68 68 / 0.45) !important;
    background: rgb(239 68 68 / 0.08) !important;
}

.hub-match-card-score .hub-match-score {
    font-size: 1.25rem;
}

.hub-match-time {
    font-weight: 700;
    color: var(--kick-blue-light);
}

.hub-match-time--finished {
    color: rgb(52 211 153);
}

.hub-match-live {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.625rem;
    font-weight: 800;
    color: #f87171;
}

.hub-match-live-dot {
    height: 0.375rem;
    width: 0.375rem;
    border-radius: 9999px;
    background: #ef4444;
    animation: pulse-live 1.5s ease-in-out infinite;
}

.btn-hub-matches-more {
    margin-top: 0.75rem;
    width: 100%;
    border-radius: 0.75rem;
    border: 1px solid rgba(96, 165, 250, 0.25);
    background: transparent;
    padding: 0.5rem;
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--kick-blue-light);
    cursor: pointer;
    transition: background 0.15s;
}

.btn-hub-matches-more:hover {
    background: rgba(37, 99, 235, 0.1);
}

.player-intel-scroll {
    max-height: 22rem;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.player-intel-comp + .player-intel-comp {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.player-intel-comp-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.player-intel-list {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.player-intel-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    border-radius: 0.625rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.03);
    padding: 0.375rem 0.5rem;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.player-intel-row:hover {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(96, 165, 250, 0.2);
}

.player-intel-rank {
    width: 1.25rem;
    font-size: 0.625rem;
    font-weight: 800;
    color: var(--kick-blue-light);
    text-align: center;
}

.player-intel-photo {
    height: 1.75rem;
    width: 1.75rem;
    border-radius: 0.5rem;
    object-fit: cover;
    flex-shrink: 0;
}

.player-intel-photo--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--kick-card);
    font-size: 0.75rem;
}

.player-intel-pts {
    font-size: 0.75rem;
    font-weight: 900;
    color: var(--kick-blue-light);
    text-align: right;
}

.player-intel-pts-label {
    margin-left: 0.125rem;
    font-size: 0.5625rem;
    font-weight: 600;
    color: rgb(100 116 139);
}

.dash-brick { min-height: 0; }

.match-hub-compact .pitch-dark { padding: 0.5rem; }

.pitch-dark .pitch-rows {
    gap: 0.75rem;
}

.pitch-dark .pitch-row {
    gap: 0.5rem;
    padding-inline: 0.25rem;
}

@media (min-width: 768px) {
    .pitch-dark .pitch-rows {
        gap: 1.25rem;
        padding-block: 0.5rem;
    }

    .pitch-dark .pitch-row {
        gap: 1.25rem;
        padding-inline: 1.25rem;
        justify-content: space-evenly;
    }
}

@media (min-width: 1024px) {
    .pitch-dark .pitch-rows {
        gap: 1.75rem;
        padding-block: 0.75rem;
    }

    .pitch-dark .pitch-row {
        gap: 2rem;
        padding-inline: 2.5rem;
    }
}

.match-hub-compact .pitch-dark .pitch-row {
    gap: 0.5rem;
    padding-inline: 0.25rem;
    justify-content: center;
}

.match-hub-compact .pitch-dark .pitch-rows {
    gap: 0.75rem;
}

.live-score-pill {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.1rem;
}

.league-tab {
    font-size: 0.5625rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 0.375rem;
    color: rgb(100 116 139);
    background: rgba(255,255,255,0.04);
}

.league-tab-active {
    color: white;
    background: var(--kick-blue);
}

.widget-tabs {
    display: flex;
    gap: 0.35rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.widget-tabs::-webkit-scrollbar { display: none; }

.widget-tab {
    flex-shrink: 0;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.35rem 0.65rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255,255,255,0.06);
    color: rgb(148 163 184);
    background: rgba(255,255,255,0.04);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.widget-tab:hover {
    color: white;
    background: rgba(37, 99, 235, 0.15);
}

.widget-tab-active {
    color: white;
    background: var(--kick-blue);
    border-color: rgba(96, 165, 250, 0.35);
}

.widget-tab-badge {
    margin-left: 0.35rem;
    font-size: 0.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.1rem 0.35rem;
    border-radius: 0.25rem;
    vertical-align: middle;
}

.widget-tab-badge--private {
    color: rgb(251 191 36);
    background: rgba(251, 191, 36, 0.15);
}

.widget-tab-badge--public {
    color: rgb(52 211 153);
    background: rgba(52, 211, 153, 0.15);
}

.widget-tab-active .widget-tab-badge--private {
    color: rgb(254 243 199);
    background: rgba(0, 0, 0, 0.2);
}

.widget-tab-active .widget-tab-badge--public {
    color: rgb(209 250 229);
    background: rgba(0, 0, 0, 0.2);
}

.league-type-badge {
    font-size: 0.5625rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.15rem 0.45rem;
    border-radius: 0.375rem;
}

.league-type-badge--private {
    color: rgb(251 191 36);
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.25);
}

.league-type-badge--public {
    color: rgb(52 211 153);
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.25);
}

.league-panel-comp {
    font-size: 0.625rem;
    color: rgb(148 163 184);
}

.global-ranking-widget .widget-tab-panel,
.league-center-widget .widget-tab-panel {
    min-height: 12rem;
}

.league-table-full { font-size: 0.75rem; }

.market-row { cursor: pointer; transition: background 0.15s; }
.market-row:hover { background: rgba(37, 99, 235, 0.1) !important; }

.input-field-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 0.625rem;
}

.live-chip-btn {
    cursor: pointer;
    border: 0;
    transition: transform 0.1s;
}

.live-chip-btn:active { transform: scale(0.97); }

.market-page-card { padding: 1.25rem; }

@media (min-width: 1024px) {
    .market-page-card { padding: 1.5rem; }
}

.brand-logo-header {
    height: 1.75rem;
    width: auto;
    object-fit: contain;
}

.brand-logo-auth {
    width: 100%;
    max-width: 20rem;
    object-fit: contain;
    filter: drop-shadow(0 12px 32px rgba(37, 99, 235, 0.35));
}

.hero-banner {
    position: relative;
    overflow: hidden;
    border-radius: 1.25rem;
    background: var(--kick-card);
    border: 1px solid rgba(96, 165, 250, 0.15);
    box-shadow: var(--glow-blue), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.hero-banner--logo {
    background: #0a0f18;
    border-color: rgba(37, 99, 235, 0.25);
}

.hero-banner img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.hero-banner:not(.hero-banner--logo)::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(26, 35, 50, 0.85) 100%);
    pointer-events: none;
}

.hero-banner--logo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(26, 35, 50, 0.75) 100%);
    pointer-events: none;
}

.hero-banner-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1;
    padding: 0.75rem 1.25rem 1rem;
}

.safe-top { padding-top: env(safe-area-inset-top, 0px); }
.safe-bottom { padding-bottom: env(safe-area-inset-bottom, 0px); }

/* Cards */
.glass {
    background: var(--kick-card);
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.card-kick {
    background: var(--kick-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.25rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.pitch-gradient,
.pitch-dark {
    background:
        linear-gradient(180deg, rgba(37, 99, 235, 0.12) 0%, transparent 35%),
        radial-gradient(ellipse 80% 50% at 50% 100%, rgba(37, 99, 235, 0.15) 0%, transparent 70%),
        linear-gradient(180deg, #1e3a5f 0%, #152238 45%, #0d1526 100%);
    border-color: rgba(96, 165, 250, 0.3) !important;
    box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.4), var(--glow-blue);
}

.pitch-gradient .pointer-events-none,
.pitch-dark .pointer-events-none {
    opacity: 0.35;
}

.pitch-gradient .pointer-events-none *,
.pitch-dark .pointer-events-none * {
    border-color: rgba(148, 163, 184, 0.45) !important;
}

.nav-bar {
    background: rgba(18, 28, 46, 0.96) !important;
    border-color: rgba(96, 165, 250, 0.12) !important;
    backdrop-filter: blur(16px);
}

.card-kick-blue {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 50%, #1d4ed8 100%);
    border: 1px solid rgba(96, 165, 250, 0.35);
    box-shadow: var(--glow-blue), 0 8px 32px rgba(0, 0, 0, 0.35);
}

.card-kick-orange {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 50%, #c2410c 100%);
    border: 1px solid rgba(251, 191, 36, 0.3);
    box-shadow: var(--glow-gold), 0 8px 32px rgba(0, 0, 0, 0.35);
}

.card-section-title {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgb(148 163 184);
}

/* Player positions — blue glow accents */
.player-gk { --pos-color: var(--kick-gold); }
.player-def { --pos-color: var(--kick-blue-light); }
.player-mid { --pos-color: #34d399; }
.player-fwd { --pos-color: var(--kick-orange); }

.player-gk .rounded-full,
.player-def .rounded-full,
.player-mid .rounded-full,
.player-fwd .rounded-full {
    box-shadow: 0 0 12px color-mix(in srgb, var(--pos-color) 45%, transparent);
}

/* Leaderboard podium */
.leaderboard-podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 0 0.5rem;
    margin-bottom: 0.5rem;
}

.podium-star {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.podium-star svg {
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}

.podium-star--1 svg { width: 3rem; height: 3rem; }
.podium-star--2 svg,
.podium-star--3 svg { width: 2.25rem; height: 2.25rem; }

.podium-star--1 { order: 2; margin-bottom: 0.5rem; }
.podium-star--2 { order: 1; }
.podium-star--3 { order: 3; }

.leaderboard-row {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.15s;
}

.leaderboard-row--highlight {
    background: rgba(251, 191, 36, 0.08);
    border-color: rgba(251, 191, 36, 0.25);
    box-shadow: var(--glow-gold);
}

.rank-star {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
}

.rank-star svg {
    width: 100%;
    height: 100%;
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in { animation: fade-in 0.25s ease-out; }

@keyframes pulse-live {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.animate-pulse-live { animation: pulse-live 1.5s ease-in-out infinite; }

.input-field {
    width: 100%;
    border-radius: 0.875rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(44, 57, 75, 0.8);
    padding: 0.875rem 1rem;
    color: white;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.input-field:focus {
    border-color: rgba(96, 165, 250, 0.55);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

select.input-field,
select.input-field option {
    color: #f1f5f9;
    background-color: var(--kick-card);
}

.label-field {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgb(100 116 139);
}

.btn-primary {
    border-radius: 0.875rem;
    background: linear-gradient(135deg, var(--kick-blue-light) 0%, var(--kick-blue) 50%, var(--kick-blue-dark) 100%);
    padding: 0.875rem 1rem;
    font-weight: 700;
    color: white;
    box-shadow: var(--glow-blue), 0 8px 20px rgba(37, 99, 235, 0.35);
    transition: transform 0.1s, box-shadow 0.15s;
}
.btn-primary:active:not(:disabled) { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-draft-save {
    display: block;
    width: 100%;
    padding: 0.625rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(251, 191, 36, 0.25);
    background: rgba(251, 191, 36, 0.1);
    color: var(--kick-gold);
    font-size: 0.875rem;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}

.btn-draft-save:hover:not(:disabled) {
    background: rgba(251, 191, 36, 0.18);
}

.btn-draft-save:active:not(:disabled) {
    transform: scale(0.98);
}

.btn-draft-save:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn-accent {
    border-radius: 0.875rem;
    background: linear-gradient(135deg, var(--kick-orange-light) 0%, var(--kick-orange) 100%);
    padding: 0.875rem 1rem;
    font-weight: 700;
    color: #1a2332;
    box-shadow: var(--glow-gold), 0 8px 20px rgba(249, 115, 22, 0.3);
}

.avatar-kick {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.45), rgba(251, 191, 36, 0.35));
    color: var(--kick-gold);
    box-shadow: var(--glow-gold);
    border: 1px solid rgba(251, 191, 36, 0.25);
}

.panel-sheet {
    background: var(--kick-shell) !important;
    border-top: 1px solid rgba(96, 165, 250, 0.15);
}

.tab-active {
    background: linear-gradient(135deg, var(--kick-gold) 0%, var(--kick-orange) 100%) !important;
    color: #1a2332 !important;
    box-shadow: var(--glow-gold);
}

.pill-active {
    background: linear-gradient(135deg, var(--kick-gold) 0%, var(--kick-orange) 100%) !important;
    color: #1a2332 !important;
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.35);
}

@media (min-width: 1024px) {
    #app-shell {
        height: 100dvh;
        max-height: 100dvh;
    }

    #app { padding-bottom: 0; }

    .dash-desktop {
        width: 100%;
        max-width: none;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .dash-grid-top {
        grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
    }

    .top-nav-inner,
    .header-inner {
        max-width: none;
        width: 100%;
    }
}

/* Tailwind accent overrides — gold/blue gaming palette */
.text-amber-400 { color: var(--kick-gold) !important; }
.text-amber-300 { color: #fcd34d !important; }
.bg-amber-400 { background-color: var(--kick-gold) !important; }
.bg-amber-400.text-black,
.bg-amber-400.text-black:hover {
    background: linear-gradient(135deg, var(--kick-gold) 0%, var(--kick-orange) 100%) !important;
    color: #1a2332 !important;
    box-shadow: 0 0 14px rgba(251, 191, 36, 0.35);
}
.ring-amber-400\/50 { --tw-ring-color: rgba(251, 191, 36, 0.45) !important; }
.ring-amber-400\/30 { --tw-ring-color: rgba(251, 191, 36, 0.3) !important; }
.border-amber-400\/30 { border-color: rgba(251, 191, 36, 0.3) !important; }
.bg-amber-400\/10 { background-color: rgba(251, 191, 36, 0.1) !important; }
.bg-amber-400\/15 { background-color: rgba(251, 191, 36, 0.15) !important; }
.bg-amber-400\/20 { background-color: rgba(251, 191, 36, 0.2) !important; }
.open\:ring-amber-400\/20[open] { --tw-ring-color: rgba(251, 191, 36, 0.2); box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.2); }
.text-emerald-400 { color: var(--kick-blue-light) !important; }

/* PWA install banner — dashboard mobile uniquement */
.pwa-install-banner {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    border: 1px solid rgba(96, 165, 250, 0.25);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.18) 0%, rgba(26, 39, 64, 0.95) 55%, rgba(13, 21, 38, 0.98) 100%);
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.15);
}

.pwa-install-inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 2.25rem 0.875rem 0.875rem;
}

.pwa-install-icon {
    flex-shrink: 0;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.pwa-install-copy {
    flex: 1;
    min-width: 0;
}

.pwa-install-title {
    font-size: 0.875rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}

.pwa-install-hint {
    margin-top: 0.15rem;
    font-size: 0.6875rem;
    line-height: 1.35;
    color: #94a3b8;
}

.pwa-install-share {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 0.25rem;
    background: rgba(255, 255, 255, 0.12);
    font-size: 0.75rem;
    vertical-align: middle;
}

.pwa-install-btn {
    flex-shrink: 0;
    border-radius: 0.625rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.6875rem;
    font-weight: 800;
    color: #1a2332;
    background: linear-gradient(135deg, var(--kick-gold) 0%, var(--kick-orange) 100%);
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.3);
}

.pwa-install-dismiss {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    z-index: 1;
    display: flex;
    height: 1.5rem;
    width: 1.5rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 0.625rem;
    color: #64748b;
    background: rgba(255, 255, 255, 0.06);
}

.pwa-install-steps {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.625rem 0.875rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.pwa-install-steps.hidden {
    display: none;
}

/* iOS install coach — plein écran au tap « Installer » */
.pwa-ios-coach {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1rem 1rem calc(5.5rem + env(safe-area-inset-bottom, 0px));
}

.pwa-ios-coach-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 10, 22, 0.82);
    backdrop-filter: blur(4px);
}

.pwa-ios-coach-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 22rem;
    border-radius: 1.25rem;
    border: 1px solid rgba(96, 165, 250, 0.3);
    background: linear-gradient(160deg, #1a2740 0%, #0d1526 100%);
    padding: 1.25rem 1.25rem 1.5rem;
    text-align: center;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.pwa-ios-coach-close {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    display: flex;
    height: 1.75rem;
    width: 1.75rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 0.75rem;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.08);
}

.pwa-ios-coach-icon {
    margin: 0 auto 0.75rem;
    border-radius: 1rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.pwa-ios-coach-title {
    font-size: 1.125rem;
    font-weight: 800;
    color: #fff;
}

.pwa-ios-coach-lead {
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: #94a3b8;
}

.pwa-ios-coach-steps {
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.pwa-ios-coach-steps li {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    font-size: 0.8125rem;
    line-height: 1.35;
    color: #cbd5e1;
}

.pwa-ios-coach-step-num {
    flex-shrink: 0;
    display: flex;
    height: 1.5rem;
    width: 1.5rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    color: #1a2332;
    background: linear-gradient(135deg, var(--kick-gold) 0%, var(--kick-orange) 100%);
}

.pwa-ios-share-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 0.3rem;
    background: rgba(96, 165, 250, 0.25);
    font-size: 0.8rem;
    vertical-align: middle;
}

.pwa-ios-coach-note {
    margin-top: 0.85rem;
    font-size: 0.6875rem;
    line-height: 1.35;
    color: #64748b;
}

.pwa-ios-coach-arrow {
    position: fixed;
    left: 50%;
    bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    animation: pwa-ios-bounce 1.2s ease-in-out infinite;
    pointer-events: none;
}

.pwa-ios-coach-arrow-icon {
    display: flex;
    height: 2.75rem;
    width: 2.75rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    font-size: 1.35rem;
    color: #60a5fa;
    background: rgba(37, 99, 235, 0.35);
    border: 2px solid rgba(96, 165, 250, 0.5);
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.4);
}

.pwa-ios-coach-arrow-label {
    font-size: 0.6875rem;
    font-weight: 700;
    color: #93c5fd;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@keyframes pwa-ios-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-6px); }
}

@media (min-width: 1024px) {
    .pwa-install-banner { display: none; }
}
