/* ── ZCL Dashboard – Supplement CSS (Tailwind handles the rest) ──────────────── */

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Body content — Lato */
body {
    font-family: 'Lato', sans-serif;
}

/* Headings & subheadings — Montserrat Bold, tracking 100 (0.01em) */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    letter-spacing: 0.01em;
}

/* ── Top nav ──────────────────────────────────────────────────────────────────── */
.top-nav .nav-item {
    padding: 0.35rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.65rem;
    font-weight: 600;
    color: #94A3B8;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s, background-color 0.15s;
}

@media (min-width: 640px) {
    .top-nav .nav-item {
        padding: 0.4rem 0.65rem;
        font-size: 0.75rem;
    }
}

.top-nav .nav-item:hover {
    color: #1E293B;
    background-color: #F8FAFC;
}

.top-nav .nav-item.active {
    background-color: #EFF6FF;
    color: #2563EB;
    font-weight: 700;
}

.site-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    letter-spacing: 0.01em;
}

/* ── Homepage sections ──────────────────────────────────────────────────────── */
.section-heading {
    font-size: 2.2em;
    font-weight: 200;
    color: #1E293B;
    margin-bottom: 1rem;
}

@media (min-width: 1024px) {
    .section-heading {
        font-size: 2em;
        font-weight: 200;
        margin-bottom: 1.25rem;
    }
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 0.75rem;
    padding: 1.25rem;
}

.stat-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1E293B;
    line-height: 1.2;
}

.franchise-tile-logo-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 130px;
    margin-bottom: 12px;
}

.franchise-tile-logo {
    max-width: 100%;
    max-height: 120px;
    object-fit: contain;
    transition: transform 0.25s ease;
}

.franchise-tile:hover .franchise-tile-logo {
    transform: scale(1.08);
}

.franchise-tile {
    background: #fff;
    border: 1px solid #E2E8F0;
    border-top-width: 4px;
    border-radius: 0.75rem;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: box-shadow 0.2s, transform 0.2s;
    cursor: pointer;
}

.franchise-tile:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.franchise-tile-empty {
    border-top-color: #E2E8F0;
    opacity: 0.7;
}

.franchise-tile-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    margin: 0 auto 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F1F5F9;
    color: #94A3B8;
    font-size: 1.1rem;
}

.franchise-tile-name {
    font-size: 0.95rem;
    color: #1E293B;
}

.franchise-tile-sub {
    font-size: 0.75rem;
    color: #94A3B8;
    margin-top: 0.25rem;
}

.sport-tile {
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 0.75rem;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: box-shadow 0.2s, transform 0.2s;
    cursor: pointer;
}

.sport-tile:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.sport-tile-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    margin: 0 auto 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.sport-tile-name {
    font-size: 0.8rem;
    color: #666666;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 2px;
}

.about-card {
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.about-card-title {
    font-size: 1rem;
    color: #1E293B;
    margin-bottom: 0.75rem;
}

.about-card-text {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.6;
}

.about-organizer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.about-organizer-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #475569;
    padding: 0.35rem 0;
}

.winner-placeholder {
    background: #fff;
    border: 1px dashed #CBD5E1;
    border-radius: 0.75rem;
    padding: 1.5rem 1rem;
    text-align: center;
}

.winner-placeholder-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    margin: 0 auto 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FFFBEB;
    color: #D97706;
    font-size: 1rem;
}

.winner-placeholder-title {
    font-size: 0.9rem;
    color: #1E293B;
}

.winner-placeholder-sub {
    font-size: 0.75rem;
    color: #94A3B8;
    margin-top: 0.25rem;
}

.gallery-placeholder {
    aspect-ratio: 4/3;
    background: #F1F5F9;
    border: 1px dashed #CBD5E1;
    border-radius: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #94A3B8;
    font-size: 0.75rem;
}

.gallery-placeholder i {
    font-size: 1.5rem;
    opacity: 0.5;
}

/* ── Status pill online state ─────────────────────────────────────────────────── */
.status-pill.text-online {
    color: #16A34A;
}

.status-pill.text-online .dot {
    background-color: #16A34A;
    animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: .5;
        transform: scale(1.4);
    }
}

/* ── Tab pane visibility ─────────────────────────────────────────────────────── */
.tab-pane {
    display: none;
    animation: fadeUp 0.25s ease;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Modals ──────────────────────────────────────────────────────────────────── */
.modal {
    display: none;
}

.modal.visible {
    display: flex;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(-12px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.animate-modal {
    animation: modalIn 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Admin-only elements ─────────────────────────────────────────────────────── */
.admin-only {
    display: none;
}

.is-admin .admin-only {
    display: flex;
}

/* ── Global spinner ──────────────────────────────────────────────────────────── */
#global-spinner.hidden {
    display: none !important;
}

/* ── Toast notifications ─────────────────────────────────────────────────────── */
.toast {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    background: #1E293B;
    color: #F8FAFC;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #2563EB;
    animation: slideInRight 0.25s ease forwards;
}

.toast-success {
    border-left-color: #16A34A;
}

.toast-error {
    border-left-color: #DC2626;
}

.toast-info {
    border-left-color: #0EA5E9;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ── Rank badges ─────────────────────────────────────────────────────────────── */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 800;
}

.rank-1 {
    background: #FDE047;
    color: #78350F;
}

.rank-2 {
    background: #CBD5E1;
    color: #0F172A;
}

.rank-3 {
    background: #FDBA74;
    color: #431407;
}

.rank-other {
    background: #F1F5F9;
    color: #64748B;
}

/* ── Fixture card winner highlight ──────────────────────────────────────────── */
.duel-winner {
    background-color: #F0FDF4;
    border-color: #86EFAC !important;
}

/* ── Player checkbox items ───────────────────────────────────────────────────── */
.player-cb-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.4rem;
    border-radius: 0.375rem;
    font-size: 0.8rem;
    cursor: pointer;
}

.player-cb-item:hover {
    background: #F8FAFC;
}

.player-cb-item input[type="checkbox"] {
    accent-color: #2563EB;
}

/* ── Empty state ─────────────────────────────────────────────────────────────── */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 4rem 2rem;
    text-align: center;
    color: #94A3B8;
}

.empty-state i {
    font-size: 2.5rem;
    opacity: 0.35;
}

.empty-state h3 {
    font-size: 1rem;
    color: #64748B;
}

.empty-state p {
    font-size: 0.85rem;
}

/* ── Franchise detail page ─────────────────────────────────────────────────── */
.franchise-detail-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 4rem 2rem;
    color: #94A3B8;
    font-size: 0.85rem;
}

.loading-spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid #E2E8F0;
    border-top-color: #2563EB;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

.franchise-detail-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.franchise-detail-shield {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.franchise-detail-name {
    font-size: 1.75rem;
    color: #1E293B;
    line-height: 1.2;
}

@media (min-width: 640px) {
    .franchise-detail-name {
        font-size: 2rem;
    }
}

.franchise-detail-section {
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}

.franchise-detail-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1rem;
}

.franchise-detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.franchise-detail-meta-item label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.franchise-detail-meta-item span {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1E293B;
}

.franchise-detail-color-swatch {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 0.35rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

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

.squad-member {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}

.squad-avatar {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #E2E8F0;
    background: #F1F5F9;
}

.squad-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94A3B8;
    font-size: 1rem;
}

.squad-member-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #1E293B;
    line-height: 1.3;
    word-break: break-word;
}

.sport-roster-block {
    padding: 1rem 0;
    border-bottom: 1px solid #F1F5F9;
}

.sport-roster-block:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sport-roster-block:first-child {
    padding-top: 0;
}

.sport-roster-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1E293B;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sport-roster-title i {
    color: #2563EB;
    font-size: 0.85rem;
}

.sport-roster-players {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
}

.sport-roster-player {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sport-roster-player .squad-avatar,
.sport-roster-player .squad-avatar-fallback {
    width: 2rem;
    height: 2rem;
    font-size: 0.7rem;
}

.sport-roster-player-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    text-transform: capitalize;
}

.franchise-card {
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s;
}

.franchise-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

/* ── Sport detail page ─────────────────────────────────────────────────────── */
.sport-detail-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.sport-detail-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.sport-detail-name {
    font-size: 1.75rem;
    color: #1E293B;
    line-height: 1.2;
}

@media (min-width: 640px) {
    .sport-detail-name {
        font-size: 2rem;
    }
}

.sport-detail-search {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 0.75rem;
    padding: 0.65rem 1rem;
    margin-bottom: 1.25rem;
}

.sport-detail-search i {
    color: #94A3B8;
    font-size: 0.85rem;
}

.sport-detail-search input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.9rem;
    color: #1E293B;
    background: transparent;
}

.sport-detail-search input::placeholder {
    color: #94A3B8;
}

.sport-franchise-block {
    padding: 1rem 0;
    border-bottom: 1px solid #F1F5F9;
}

.sport-franchise-block:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sport-franchise-block:first-child {
    padding-top: 0;
}

.sport-franchise-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.sport-franchise-color {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.sport-franchise-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1E293B;
}

.sport-fixture-category {
    margin-bottom: 1.25rem;
}

.sport-fixture-category:last-child {
    margin-bottom: 0;
}

.sport-fixture-category-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 0.75rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px dashed #E2E8F0;
}

.sport-fixture-card {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 0.625rem;
    padding: 0.85rem 1rem;
    margin-bottom: 0.5rem;
}

.sport-fixture-card:last-child {
    margin-bottom: 0;
}

.sport-fixture-match {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.sport-fixture-team {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1E293B;
}

.sport-fixture-team.winner {
    color: #16A34A;
}

.sport-fixture-vs {
    font-size: 0.7rem;
    font-weight: 800;
    color: #94A3B8;
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 999px;
    padding: 0.15rem 0.5rem;
}

.sport-fixture-result {
    font-size: 0.75rem;
    color: #64748B;
    margin-top: 0.35rem;
}

.sport-fixture-points {
    font-size: 0.7rem;
    font-weight: 700;
    color: #2563EB;
    background: #EFF6FF;
    border-radius: 999px;
    padding: 0.15rem 0.5rem;
}

.fixture-date-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #334155;
    background: #F1F5F9;
    border: 1px solid #CBD5E1;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
}
.fixture-date-pill i {
    color: #2563EB;
}

.expandable-card {
    transition: all 0.2s ease-in-out;
}
.expandable-card:hover {
    border-color: #CBD5E1;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}
.roster-chevron {
    display: inline-block;
    transition: transform 0.2s ease;
}
.rotate-180 {
    transform: rotate(180deg);
}