/* Feuille de style principale de l'interface web. */
:root {
    --nba-blue: #1d428a;
    --nba-red: #d7263d;
    --bg: #fff6f7;
    --surface: #ffffff;
    --text: #2a1115;
    --muted: #6b7280;
    --border: #f2d6db;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

header {
    background: var(--nba-red);
    color: #fff;
    padding: 18px 24px;
    border-bottom: 4px solid var(--nba-blue);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    max-width: 960px;
    margin: 0 auto;
}

.brand-link {
    display: flex;
    align-items: center;
}

.logo {
    height: 120px;
    width: auto;
    object-fit: contain;
    background: var(--nba-red);
}

.main-nav,
.profile-nav {
    display: flex;
    align-items: center;
    gap: 14px;
}

.main-nav {
    margin-left: auto;
    margin-right: auto;
}

header a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 10px;
    border-radius: 8px;
}

header a:hover {
    text-decoration: none;
    background: rgba(255, 255, 255, 0.14);
}

.profile-login {
    background: #fff;
    color: var(--nba-red);
}

.profile-login:hover {
    background: #ffe9ec;
}

@media (max-width: 900px) {
    .header-container {
        flex-wrap: wrap;
        justify-content: center;
    }

    .logo {
        height: 92px;
    }

    .main-nav,
    .profile-nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    header {
        padding: 8px 10px !important;
    }

    .header-container {
        gap: 6px !important;
    }

    .logo {
        height: 58px !important;
    }

    .main-nav,
    .profile-nav {
        width: 100% !important;
        justify-content: center !important;
        gap: 6px !important;
    }

    .main-nav {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .main-nav a,
    .profile-nav a {
        display: block !important;
        width: 100% !important;
        text-align: center !important;
        font-size: 0.76rem !important;
        line-height: 1.2 !important;
        padding: 4px 6px !important;
        border-radius: 6px !important;
    }

    .profile-nav {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .profile-nav a {
        min-width: 0 !important;
    }
}

main {
    max-width: 960px;
    margin: 28px auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(215, 38, 61, 0.12);
}

h2,
h3 {
    margin-top: 0;
    color: var(--nba-red);
}

a {
    color: var(--nba-blue);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.site-footer {
    background: #fff;
    color: #5a3038;
    margin-top: 28px;
    border-top: 3px solid var(--nba-red);
}

.site-footer__content {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.site-footer__section h4 {
    margin: 0 0 10px;
    color: var(--nba-red);
    font-size: 1rem;
}

.site-footer__section p {
    margin: 0;
    color: #6a4750;
}

.site-footer__section ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.site-footer__section a {
    color: var(--nba-blue);
    text-decoration: none;
}

.site-footer__section a:hover {
    text-decoration: underline;
}

.site-footer__bottom {
    border-top: 1px solid var(--border);
    text-align: center;
    padding: 12px 16px;
}

.site-footer__bottom p {
    margin: 0;
}

@media (max-width: 900px) {
    .site-footer__content {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .site-footer {
        margin-top: 16px;
    }

    .site-footer__content {
        padding: 14px;
        gap: 12px;
    }

    .site-footer__section h4 {
        margin-bottom: 6px;
        font-size: 0.9rem;
    }

    .site-footer__section p,
    .site-footer__section a,
    .site-footer__bottom p {
        font-size: 0.82rem;
        line-height: 1.3;
    }

    .site-footer__section ul {
        gap: 4px;
    }

    .site-footer__bottom {
        padding: 8px 10px;
    }
}

@media (max-width: 600px) {
    .site-footer__content {
        grid-template-columns: 1fr;
        padding: 12px;
        gap: 10px;
    }

    .site-footer__section h4 {
        font-size: 0.85rem;
    }

    .site-footer__section p,
    .site-footer__section a,
    .site-footer__bottom p {
        font-size: 0.78rem;
    }
}

button,
.btn {
    display: inline-block;
    background: var(--nba-red);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 14px;
    font-weight: 600;
    cursor: pointer;
}

button:hover,
.btn:hover {
    filter: brightness(0.95);
    text-decoration: none;
}

input,
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cfd5df;
    border-radius: 8px;
    font: inherit;
    color: var(--text);
    background: #fff;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--nba-red);
    box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.16);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

th,
td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

th {
    background: #fff0f2;
    color: var(--nba-blue);
    font-weight: 700;
}

.container {
    max-width: 960px;
    margin: 0 auto;
}

.text-center {
    text-align: center;
}

.mt-24 {
    margin-top: 24px;
}

.muted {
    color: var(--muted);
}

.form-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
}

.form-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

.alert {
    border-radius: 8px;
    padding: 12px 14px;
    margin: 14px 0;
}

.alert-error {
    background: #ffe8ec;
    border: 1px solid #f3b6c0;
    color: #7a1f2d;
}

.alert-success {
    background: #e8f8ee;
    border: 1px solid #b9e9cb;
    color: #1f6b3d;
}

.alert-info {
    background: #eaf1ff;
    border: 1px solid #bfd1ff;
    color: #234a9a;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.profile-item {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    background: #fff;
}

.profile-item p {
    margin: 8px 0 0;
}

.filter-buttons {
    display: flex;
    gap: 8px;
    margin: 16px 0;
    flex-wrap: wrap;
}

.tab-buttons {
    display: flex;
    gap: 8px;
    margin: 16px 0 8px;
    flex-wrap: wrap;
}

.filter-buttons .btn {
    padding: 8px 12px;
    font-size: 0.9rem;
    background: #f0f0f0;
    color: var(--text);
    border: 1px solid var(--border);
}

.filter-buttons .btn:hover {
    background: #e0e0e0;
    filter: none;
}

.filter-buttons .btn-active {
    background: var(--nba-red);
    color: #fff;
    border-color: var(--nba-red);
}

.tab-buttons .btn {
    padding: 8px 12px;
    font-size: 0.95rem;
    background: #f0f0f0;
    color: var(--text);
    border: 1px solid var(--border);
}

.tab-buttons .btn:hover {
    background: #e0e0e0;
    filter: none;
}

.tab-buttons .btn-active {
    background: var(--nba-blue);
    color: #fff;
    border-color: var(--nba-blue);
}

.tab-buttons .tab-favorite-btn {
    margin-left: auto;
}

.filter-info {
    font-size: 0.95rem;
    color: var(--muted);
    margin: 8px 0 14px;
}

.season-select-form {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0;
    flex-wrap: wrap;
}

.season-select-form label {
    font-weight: 700;
    color: var(--nba-blue);
}

.season-select-form select {
    width: auto;
    min-width: 160px;
}

.standings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.standings-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    background: #fff;
    overflow: hidden;
}

.standings-card h3 {
    margin-bottom: 10px;
}

.team-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.team-logo {
    width: 26px;
    height: 26px;
    object-fit: contain;
    flex-shrink: 0;
}

.team-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
}

.team-meta strong,
.team-meta span {
    overflow-wrap: normal;
    word-break: normal;
}

.team-meta span {
    color: var(--muted);
    font-size: 0.82rem;
}

.score-cell {
    font-weight: 700;
    white-space: nowrap;
    text-align: center;
}

.vote-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.vote-actions form {
    margin: 0;
}

.vote-btn {
    width: 100%;
    padding: 6px 10px;
    font-size: 0.82rem;
    white-space: normal;
}

.week-card {
    margin-bottom: 14px;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.matches-table {
    width: 100%;
    min-width: 760px;
}

.matches-table td,
.matches-table th {
    vertical-align: middle;
}

.standings-table {
    width: 100%;
}

.drag-board {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 10px;
    align-items: stretch;
    margin-bottom: 14px;
}

.drop-slot {
    border: 2px dashed var(--border);
    border-radius: 10px;
    background: #fffafb;
    padding: 12px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
}

.drop-slot--over {
    border-color: var(--nba-red);
    background: #fff0f2;
}

.team-logo-wrap {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.team-logo-wrap .team-logo {
    width: 52px;
    height: 52px;
}

.team-logo-fallback {
    width: 52px;
    height: 52px;
    border-radius: 999px;
    background: #f3f4f6;
    color: var(--nba-blue);
    font-weight: 700;
    font-size: 0.9rem;
    display: grid;
    place-items: center;
}

.team-pool-sections {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.team-pool-section {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    background: #fff;
}

.team-pool-title {
    margin: 0 0 10px;
}

.team-pool {
    display: grid;
    gap: 8px;
}

.team-chip {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    padding: 8px 10px;
    cursor: grab;
}

.team-chip-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: inherit;
    text-decoration: none;
}

.team-chip-link:hover {
    text-decoration: none;
}

.team-inline-link {
    color: var(--nba-blue);
}

.team-inline-link:hover {
    text-decoration: underline;
}

.team-chip-logo,
.team-chip-fallback {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.team-chip-logo {
    object-fit: contain;
}

.team-chip-fallback {
    border-radius: 999px;
    background: #f3f4f6;
    color: var(--nba-blue);
    font-size: 0.75rem;
    font-weight: 700;
    display: grid;
    place-items: center;
}

.team-vs-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    align-items: center;
}

.team-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    text-align: center;
}

.team-vs-sep {
    color: var(--nba-blue);
    font-weight: 800;
}

.h2h-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.h2h-compare-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr 1fr;
    gap: 10px;
    align-items: center;
}

.h2h-compare-header {
    font-weight: 700;
    color: var(--nba-blue);
    text-align: center;
}

.h2h-compare-label {
    font-weight: 600;
}

.stat-pill {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 9px 10px;
    text-align: center;
    font-weight: 700;
    background: #fff;
}

.stat-pill--best {
    background: #e8f8ee;
    border-color: #b9e9cb;
    color: #1f6b3d;
}

.stat-pill--worst {
    background: #ffe8ec;
    border-color: #f3b6c0;
    color: #7a1f2d;
}

.predictions-h2h-table td,
.predictions-h2h-table th {
    white-space: nowrap;
}

.prediction-bar-wrap {
    display: grid;
    gap: 8px;
}

.prediction-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.prediction-bar {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: #edf2ff;
    overflow: hidden;
}

.prediction-bar-home {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--nba-red), #ff7e6f);
}

.match-row-focus {
    background: #fff8df;
    outline: 2px solid #ffd166;
    outline-offset: -2px;
}

.team-profile-hero {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}

.team-profile-hero__identity {
    display: flex;
    align-items: center;
    gap: 14px;
}

.team-profile-logo {
    width: 84px;
    height: 84px;
    object-fit: contain;
    flex: 0 0 auto;
}

.team-roster-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.team-roster-item {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    background: #fff;
    display: flex;
    justify-content: flex-start;
    gap: 10px;
}

.result-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.85rem;
    font-weight: 700;
}

.result-pill-win {
    background: #e8f8ee;
    color: #1f6b3d;
    border: 1px solid #b9e9cb;
}

.result-pill-loss {
    background: #ffe8ec;
    color: #7a1f2d;
    border: 1px solid #f3b6c0;
}

@media (max-width: 768px) {
    .table-wrap {
        overflow-x: visible;
    }

    .standings-table,
    .matches-table {
        width: 100%;
        min-width: 0;
    }

    .standings-table thead,
    .matches-table thead {
        display: none;
    }

    .standings-table tbody,
    .matches-table tbody {
        display: block;
    }

    .standings-table tr,
    .matches-table tr {
        display: block;
        background: #fff;
        border: 1px solid var(--border);
        border-radius: 10px;
        padding: 10px 12px;
        margin-bottom: 10px;
    }

    .standings-table td,
    .matches-table td {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
        border-bottom: 1px dashed var(--border);
        padding: 8px 0;
        text-align: right;
    }

    .standings-table td:last-child,
    .matches-table td:last-child {
        border-bottom: none;
    }

    .standings-table td::before,
    .matches-table td::before {
        content: attr(data-label);
        color: var(--nba-blue);
        font-weight: 700;
        font-size: 0.82rem;
        text-align: left;
        min-width: 74px;
        flex-shrink: 0;
    }

    .standings-table td[colspan],
    .matches-table td[colspan] {
        display: block;
        text-align: left;
        border-bottom: none;
        padding: 4px 0;
    }

    .standings-table td[colspan]::before,
    .matches-table td[colspan]::before {
        content: none;
    }

    .standings-table td[data-label="Équipe"] .team-cell,
    .matches-table td[data-label="Domicile"] .team-cell,
    .matches-table td[data-label="Extérieur"] .team-cell {
        width: 100%;
        justify-content: flex-end;
    }

    .standings-table td[data-label="Équipe"] .team-meta,
    .matches-table td[data-label="Domicile"] .team-meta,
    .matches-table td[data-label="Extérieur"] .team-meta {
        align-items: flex-end;
        text-align: right;
    }

    .matches-table td[data-label="Pari"] .vote-actions {
        width: 100%;
    }
}

.bet-pill {
    display: inline-block;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.82rem;
    font-weight: 700;
}

.bet-toggle-form {
    margin: 0;
}

.bet-toggle-btn {
    cursor: pointer;
    background: #eaf1ff;
}

.bet-toggle-btn:hover {
    filter: brightness(0.96);
}

.bet-won {
    background: #e8f8ee;
    color: #1f6b3d;
    border: 1px solid #b9e9cb;
}

.bet-lost {
    background: #ffe8ec;
    color: #7a1f2d;
    border: 1px solid #f3b6c0;
}

.bet-pending {
    background: #eaf1ff;
    color: #234a9a;
    border: 1px solid #bfd1ff;
}

/* ========== Team Carousel ========== */
.team-carousel-container {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
}

.carousel-viewport {
    flex: 1;
    overflow: hidden;
}

.carousel-arrow {
    background: var(--nba-red);
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.4rem;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: all 0.3s ease;
}

.carousel-arrow:hover {
    background: var(--nba-blue);
    transform: scale(1.1);
}

.carousel-arrow:active {
    transform: scale(0.95);
}

.carousel-track {
    display: flex;
    gap: 14px;
    width: 100%;
    align-items: stretch;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.carousel-item {
    flex: 0 0 calc((100% - 28px) / 3);
    display: flex;
    min-width: 0;
}

.carousel-card {
    background: linear-gradient(135deg, #fff 0%, #f9f9f9 100%);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 10px;
    width: 100%;
    min-height: 138px;
    overflow: hidden;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.carousel-card:hover {
    border-color: var(--nba-red);
    box-shadow: 0 8px 16px rgba(215, 38, 61, 0.15);
    transform: translateY(-4px);
}

.carousel-card.selected {
    background: linear-gradient(135deg, #fff0f2 0%, #ffe8ec 100%);
    border-color: var(--nba-red);
    box-shadow: 0 0 20px rgba(215, 38, 61, 0.4);
}

.carousel-logo {
    width: 28px;
    height: 28px;
    max-width: 28px;
    max-height: 28px;
    object-fit: contain;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
}

.carousel-card h4 {
    margin: 0;
    color: var(--nba-red);
    font-size: 0.88rem;
    line-height: 1.2;
}

.team-city {
    margin: 0;
    font-size: 0.75rem;
    color: var(--muted);
}

.select-team-form {
    width: 100%;
    margin: 8px 0 0;
}

.btn-select-team {
    width: 100%;
    padding: 8px 12px;
    font-size: 0.85rem;
    background: var(--nba-blue);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-select-team:hover {
    background: var(--nba-red);
    filter: none;
}

.btn-select-team.btn-selected {
    background: var(--nba-red);
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.2);
}

.carousel-info {
    text-align: center;
    margin-top: 16px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 8px;
    font-size: 0.9rem;
}

.carousel-info p {
    margin: 0;
}

.carousel-info strong {
    color: var(--nba-red);
}

.remove-fav-team-section {
    text-align: center;
}

@media (max-width: 900px) {
    .carousel-item {
        flex: 0 0 calc((100% - 14px) / 2);
    }

    .carousel-card {
        min-height: 128px;
    }

    .carousel-arrow {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }
}

@media (max-width: 600px) {
    .carousel-item {
        flex: 0 0 100%;
    }

    .carousel-arrow {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .carousel-card {
        padding: 8px;
        min-height: 118px;
    }

    .carousel-logo {
        width: 24px;
        height: 24px;
        max-width: 24px;
        max-height: 24px;
    }
}

@media (max-width: 700px) {
    .season-select-form {
        align-items: stretch;
    }

    .season-select-form select {
        width: 100%;
    }

    .drag-board,
    .team-vs-grid,
    .team-pool-sections,
    .h2h-stats-grid {
        grid-template-columns: 1fr;
    }

    .h2h-compare-grid {
        grid-template-columns: 1fr;
    }

    .h2h-compare-header {
        text-align: left;
    }

    .team-roster-list {
        grid-template-columns: 1fr;
    }

    .profile-grid {
        grid-template-columns: 1fr;
    }

    .standings-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== Profile Card Styles ========== */
.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.profile-card-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.profile-card {
    background: linear-gradient(135deg, #fff6f7 0%, #ffe8ec 100%);
    border: 2px solid var(--nba-red);
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(215, 38, 61, 0.12);
}

.profile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--nba-blue);
    padding-bottom: 12px;
}

.profile-card-header h3 {
    margin: 0;
    color: var(--nba-red);
    font-size: 1.4rem;
}

.profile-card-body {
    display: grid;
    gap: 16px;
    margin-bottom: 16px;
}

.profile-card-info {
    background: rgba(255, 255, 255, 0.8);
    padding: 12px 14px;
    border-radius: 8px;
    border-left: 4px solid var(--nba-blue);
}

.profile-card-info strong {
    display: block;
    color: var(--nba-blue);
    margin-bottom: 6px;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.profile-card-info p {
    margin: 0;
    color: var(--text);
}

.profile-card-footer {
    padding-top: 12px;
    border-top: 2px solid var(--nba-blue);
}

.fav-team-display {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.team-logo-small {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.inline-form {
    display: inline;
}

/* ========== Favorite Team Selection ========== */
.fav-team-section {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
}

.fav-team-section h3 {
    margin-top: 0;
}

.fav-team-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.delete-account-section {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
}

.delete-account-section h3 {
    margin-top: 0;
}

.delete-account-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-delete-account {
    align-self: flex-start;
}

.team-logo-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
}

.team-logo-preview-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.team-logo-preview-name {
    color: var(--text);
    font-weight: 600;
}

.fav-team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.team-selector {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    background: #fff;
    transition: all 0.3s ease;
}

.team-selector:hover {
    border-color: var(--nba-blue);
    background: #f0f4f8;
}

.team-selector input {
    display: none;
}

.team-selector.selected {
    border-color: var(--nba-red);
    background: #fff0f2;
    box-shadow: 0 0 12px rgba(215, 38, 61, 0.3);
}

.team-selector-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.team-selector .team-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.team-selector .team-name {
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    color: var(--text);
}

/* ========== Role Badge ========== */
.role-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.role-admin {
    background: #ffd700;
    color: #8b4513;
    border: 1px solid #daa520;
}

.role-user {
    background: #a0e7e5;
    color: #0d5c5c;
    border: 1px solid #7fd6d4;
}

/* ========== Admin User Card ========== */
.admin-users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.admin-user-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.admin-user-card:hover {
    box-shadow: 0 8px 24px rgba(215, 38, 61, 0.12);
    border-color: var(--nba-red);
}

.user-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.user-info {
    flex: 1;
}

.user-info h4 {
    margin: 0 0 4px;
    color: var(--nba-red);
    font-size: 1rem;
}

.user-email {
    margin: 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.user-meta {
    display: grid;
    gap: 12px;
    margin: 12px 0;
}

.meta-item {
    font-size: 0.9rem;
}

.meta-item strong {
    display: block;
    color: var(--nba-blue);
    margin-bottom: 4px;
    font-size: 0.8rem;
}

.meta-item p {
    margin: 0;
    color: var(--text);
}

.user-actions {
    display: flex;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

/* ========== Admin Detail View ========== */
.profile-admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.admin-detail-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.detail-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
}

.detail-card h3 {
    margin-top: 0;
    margin-bottom: 16px;
    color: var(--nba-red);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.detail-item {
    background: #f9f9f9;
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid var(--nba-blue);
}

.detail-item strong {
    display: block;
    color: var(--nba-blue);
    font-size: 0.85rem;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.detail-item p {
    margin: 0;
    color: var(--text);
    font-size: 0.95rem;
}

/* ========== Button Variants ========== */
.btn-secondary {
    background: var(--nba-blue);
}

.btn-secondary:hover {
    filter: brightness(0.95);
}

.btn-outline {
    background: transparent;
    color: var(--nba-red);
    border: 2px solid var(--nba-red);
}

.btn-outline:hover {
    background: #fff0f2;
    filter: none;
}

.btn-small {
    padding: 6px 10px;
    font-size: 0.85rem;
}

.btn-primary {
    background: var(--nba-red);
}

.mt-16 {
    margin-top: 16px;
}

@media (max-width: 700px) {
    .profile-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .admin-users-grid {
        grid-template-columns: 1fr;
    }

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

    .fav-team-grid {
        grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
    }
}

/* ========== Home Page ========== */
.home-hero {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.home-hero__content,
.home-hero__panel,
.home-section {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}

.home-kicker {
    margin: 0 0 6px;
    color: var(--nba-blue);
    font-weight: 700;
}

.home-hero h1 {
    margin: 0;
    color: var(--nba-red);
    font-size: 1.9rem;
    line-height: 1.2;
}

.home-subtitle {
    margin: 14px 0 18px;
    color: var(--muted);
}

.home-hero__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.home-hero__panel h3 {
    margin-top: 0;
}

.home-metrics {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.home-metric-card {
    border: 1px solid var(--border);
    border-left: 4px solid var(--nba-blue);
    border-radius: 10px;
    padding: 10px 12px;
    background: var(--surface);
}

.home-metric-card strong {
    display: block;
    color: var(--nba-red);
}

.home-metric-card p {
    margin: 4px 0 0;
    color: var(--muted);
}

.home-section {
    margin-bottom: 18px;
}

.home-section h2 {
    margin-bottom: 12px;
}

.home-grid {
    display: grid;
    gap: 12px;
}

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

.home-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    background: var(--surface);
}

.home-card h3 {
    margin-top: 0;
    margin-bottom: 8px;
    color: var(--nba-blue);
}

.home-card p {
    margin: 0;
    color: var(--muted);
}

.home-steps {
    display: grid;
    gap: 12px;
}

.home-step {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 12px;
    align-items: start;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    background: var(--surface);
}

.home-step span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: var(--nba-blue);
    color: #fff;
    font-weight: 700;
}

.home-step h3 {
    margin: 0 0 4px;
    color: var(--nba-blue);
}

.home-step p {
    margin: 0;
    color: var(--muted);
}

.home-section--highlight {
    border-left: 4px solid var(--nba-red);
}

.home-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.home-stack span {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--nba-blue);
    background: var(--surface);
    font-weight: 600;
    font-size: 0.9rem;
}

.home-cta {
    text-align: center;
}

.home-cta p {
    color: var(--muted);
    margin-bottom: 14px;
}

.home-cta .home-hero__actions {
    justify-content: center;
}

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

    .home-grid--3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .home-hero h1 {
        font-size: 1.5rem;
    }

    .home-hero__content,
    .home-hero__panel,
    .home-section {
        padding: 14px;
    }

    .home-step {
        grid-template-columns: 32px 1fr;
        gap: 10px;
    }

    .home-step span {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }
}

/* ========== Team Page ========== */
.team-hero {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 18px;
}

.team-kicker {
    margin: 0 0 6px;
    color: var(--nba-blue);
    font-weight: 700;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.team-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
}

.team-card h3 {
    margin-bottom: 6px;
    color: var(--nba-red);
}

.team-role {
    margin: 0 0 10px;
    color: var(--nba-blue);
    font-weight: 600;
}

.team-card ul {
    margin: 0;
    padding-left: 18px;
    color: var(--text);
}

.team-card li {
    margin-bottom: 8px;
}

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