/* Topcorner custom overrides */

/* =============================================
   DESIGN TOKENS — TopCorner brand
   ============================================= */
:root {
    --navy-900: #0f1730;   /* utility bar, footer */
    --navy-800: #15224a;   /* main header dark stop */
    --navy-700: #1c2d63;   /* main header light stop / subbar */
    --navy-600: #2a3d7d;
    --grey-50:  #f4f5f7;
    --grey-100: #eceef2;
    --grey-200: #dee1e8;
    --grey-300: #c4c8d2;
    --grey-500: #6b7184;
    --grey-700: #3a3f4f;
    --ink:      #1a1d28;
    --red:      #e54b3c;   /* primary accent */
    --red-soft: #fdecea;
    --green:    #1f9d55;
    --green-soft:#e6f5ed;
}

/* =============================================
   GLOBAL / BODY
   ============================================= */
body {
    background-color: #161D35;
    color: #3f3c57;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.playing-bet {
    flex: 1;
}

/* =============================================
   LOGO MARK — pure CSS corner-bracket + dot
   Scales with font-size on .logo
   ============================================= */
.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    line-height: 1;
    color: #fff;
}
.logo-icon {
    width: 1.4em;
    height: 1.4em;
    position: relative;
    flex: 0 0 auto;
}
.logo-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 70%;
    height: 70%;
    border: 0.18em solid currentColor;
    border-right: none;
    border-bottom: none;
}
.logo-icon::after {
    content: '';
    position: absolute;
    top: 22%;
    left: 22%;
    width: 26%;
    height: 26%;
    border-radius: 50%;
    background: var(--red);
}
.logo-text {
    font-family: 'Archivo', sans-serif;
    font-weight: 900;
    letter-spacing: -0.025em;
}

/* The bracket motif as a tiny inline glyph (e.g. next to "Your prediction") */
.corner-glyph {
    width: 1em;
    height: 1em;
    position: relative;
    display: inline-block;
    flex: 0 0 auto;
}
.corner-glyph::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 70%;
    height: 70%;
    border: 1.5px solid currentColor;
    border-right: none;
    border-bottom: none;
}
.corner-glyph::after {
    content: '';
    position: absolute;
    top: 22%;
    left: 22%;
    width: 28%;
    height: 28%;
    border-radius: 50%;
    background: var(--red);
}

/* =============================================
   SITE HEADER — utility bar, main header, subbar
   ============================================= */
.header {
    position: relative;
    background: transparent;
    width: 100%;
    z-index: 5;
}

/* utility bar */
.util {
    background: var(--navy-900);
    color: rgba(255, 255, 255, 0.78);
    padding: 12px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
}
.util a {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.12s;
}
.util a:hover {
    color: #fff;
}
.util-left {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}
.util-greet {
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.util-name {
    color: #fff;
    font-weight: 600;
}
.util-right {
    display: inline-flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* main header — brand zone + nav */
.main-header {
    background: linear-gradient(180deg, var(--navy-800) 0%, var(--navy-700) 100%);
    color: #fff;
    padding: 0 32px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    min-height: 80px;
    gap: 32px;
    font-family: 'Inter', system-ui, sans-serif;
}
.main-header .brand {
    display: inline-flex;
    align-items: center;
    padding-right: 32px;
    border-right: 1px solid rgba(255, 255, 255, 0.14);
    height: 44px;
    text-decoration: none;
    color: #fff;
    flex: 0 0 auto;
}
.main-header .brand:hover {
    color: #fff;
}
.main-header .brand .logo {
    font-size: 30px;
}
.main-header .brand .logo-text {
    font-size: 30px;
}

/* nav */
.site-nav {
    display: flex;
    gap: 2px;
    align-items: center;
    flex: 1;
    justify-content: flex-end;
}
/* Bootstrap's .collapse hides the nav on desktop; force it visible above the breakpoint */
@media (min-width: 768px) {
    .site-nav.collapse:not(.show) {
        display: flex;
    }
}
.site-nav .nav-link,
.site-nav .dropdown-toggle {
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 12px 18px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
    background: transparent;
    border: none;
}
.site-nav .nav-link:hover,
.site-nav .dropdown-toggle:hover,
.site-nav .dropdown-toggle:focus {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}
.site-nav .nav-link.active,
.site-nav .dropdown-toggle.active,
.site-nav .nav-link[aria-current="page"] {
    color: #fff;
    background: transparent;
    box-shadow: inset 0 -3px 0 var(--red);
    border-radius: 0;
}
/* Bootstrap appends a CSS arrow on .dropdown-toggle; keep it but tone it down */
.site-nav .dropdown-toggle::after {
    margin-left: 4px;
    border-top-color: currentColor;
    opacity: 0.7;
}

/* dropdowns — dark on dark */
.main-header .dropdown-menu {
    background: var(--navy-800);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    margin-top: 6px;
    padding: 6px;
    min-width: 180px;
    box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.4);
}
.main-header .dropdown-item {
    color: rgba(255, 255, 255, 0.85);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 4px;
}
.main-header .dropdown-item:hover,
.main-header .dropdown-item:focus {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

/* mobile hamburger */
.nav-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    margin-left: auto;
    font-size: 16px;
    line-height: 1;
}
.nav-toggle:hover,
.nav-toggle:focus {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

/* subbar — page title; lives on the page surface so it reads as the start of content,
   not a continuation of the navy header */
.subbar {
    background: var(--grey-50);
    color: var(--ink);
    padding: 22px 32px 18px;
    text-align: center;
    font-family: 'Archivo', sans-serif;
    font-weight: 800;
    font-size: 22px;
    letter-spacing: -0.01em;
    border-bottom: 1px solid var(--grey-200);
    margin: 0;
}
h1.subbar:empty {
    display: none;
}

/* hide the old breadcrumb if any template still emits it */
.prd-breadcrumb {
    display: none;
}

/* responsive — collapse nav to hamburger below 768px */
@media (max-width: 767.98px) {
    .util {
        padding: 8px 16px;
        flex-wrap: wrap;
        gap: 6px 14px;
        font-size: 11px;
    }
    .util-right {
        gap: 14px;
    }
    .main-header {
        padding: 12px 16px;
        min-height: 0;
        flex-wrap: wrap;
        gap: 12px;
    }
    .main-header .brand {
        padding-right: 0;
        border-right: none;
        height: auto;
    }
    .nav-toggle {
        display: inline-flex;
        align-items: center;
    }
    .site-nav {
        flex: 0 0 100%;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 4px;
        padding: 8px 0 4px;
    }
    .site-nav .dropdown {
        display: flex;
        flex-direction: column;
    }
    .site-nav .nav-link,
    .site-nav .dropdown-toggle {
        padding: 12px 14px;
        justify-content: flex-start;
    }
    .site-nav .nav-link.active,
    .site-nav .dropdown-toggle.active,
    .site-nav .nav-link[aria-current="page"] {
        box-shadow: inset 3px 0 0 var(--red);
        border-radius: 0;
    }
    .main-header .dropdown-menu {
        position: static;
        background: rgba(255, 255, 255, 0.04);
        border: none;
        margin: 4px 0 4px 14px;
        padding: 4px;
        box-shadow: none;
    }
    .subbar {
        padding: 16px 16px 14px;
        font-size: 18px;
    }
}

/* =============================================
   CONTENT AREA — light background, flows from subbar
   ============================================= */
.playing-bet {
    background: var(--grey-50);
    padding: 24px 0 40px;
}
.playing-bet.placing-bet-page {
    padding: 24px 0 40px;
}

/* Text colors in light content area */
.playing-bet h1, .playing-bet h2, .playing-bet h3,
.playing-bet h4, .playing-bet h5, .playing-bet h6 {
    color: #161D35;
}
/*
.playing-bet p {
    color: #555;
}
*/
.playing-bet a {
    color: #305B9F;
}
.playing-bet a:hover {
    color: #1d3a6e;
}
.playing-bet a.btn-tc-primary {
    color: #fff;
}

/* =============================================
   TABLES — light theme
   ============================================= */
.tc-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.tc-table thead th {
    background: #f8f9fa;
    color: #161D35;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 12px;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
}
.tc-table tbody td {
    padding: 10px 12px;
    font-size: 0.9rem;
    color: #3f3c57;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}
.tc-table tbody tr:last-child td {
    border-bottom: none;
}
.tc-table tbody tr:hover {
    background: #f8f9fb;
}
.tc-table a {
    color: #305B9F;
}
.tc-table a:hover {
    color: #1d3a6e;
    text-decoration: none;
}

/* =============================================
   POSITION BADGES — leaderboard
   ============================================= */
.position-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    color: #888;
}
.position-badge.top-1 { background: #ffd700; color: #1a1a2e; }
.position-badge.top-2 { background: #c0c0c0; color: #1a1a2e; }
.position-badge.top-3 { background: #cd7f32; color: #fff; }

/* =============================================
   MATCH CARDS — prediction form + fixture list
   ============================================= */
.match-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 20px;
    margin-bottom: 10px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.match-card:hover {
    border-color: #c5cad3;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
a.match-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}
.match-card .match-datetime {
    font-size: 0.75rem;
    color: #8b8fa3;
    margin-bottom: 6px;
}
.match-card .match-datetime i {
    margin-right: 4px;
}
.match-card .match-teams {
    display: flex;
    align-items: center;
    gap: 12px;
}
.match-card .team-name {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 500;
    color: #161D35;
}
.match-card .team-name.away {
    text-align: right;
}
.match-card .score-inputs {
    display: flex;
    align-items: center;
    gap: 6px;
}
.match-card .score-inputs input {
    width: 48px;
    height: 40px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    background: #f0f2f5;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #161D35;
}
.match-card .score-inputs input:focus {
    border-color: #305B9F;
    outline: none;
    box-shadow: 0 0 0 2px rgba(48, 91, 159, 0.15);
    background: #fff;
}
.match-card .score-inputs input::-webkit-inner-spin-button,
.match-card .score-inputs input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.match-card .score-inputs input[type="number"] {
    -moz-appearance: textfield;
}
.match-card .score-dash {
    color: #9ca3af;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Match card - result display (fixture list) */
.match-card .match-result {
    display: flex;
    align-items: center;
    gap: 12px;
}
.match-card .match-score {
    font-size: 1.2rem;
    font-weight: 700;
    color: #161D35;
    min-width: 50px;
    text-align: center;
}
.match-card .match-prediction {
    font-size: 0.85rem;
    color: #8b8fa3;
}

/* =============================================
   FIXTURES PAGE — round bar, day labels, fixture rows
   ============================================= */

/* breadcrumb line above the rounds */
.fx-breadcrumb {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    color: var(--grey-500);
    margin-bottom: 18px;
}
.fx-breadcrumb b {
    color: var(--ink);
    font-weight: 600;
}

/* round bar — header for a stage / matchday */
.round-bar {
    background: linear-gradient(90deg, var(--navy-800), var(--navy-600));
    color: #fff;
    padding: 14px 22px;
    border-radius: 10px 10px 0 0;
    font-family: 'Archivo', sans-serif;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}
.round-bar:first-child {
    margin-top: 0;
}
.round-bar .meta {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.08em;
    opacity: 0.72;
    text-transform: uppercase;
}

/* day label between fixture cards within a round */
.day-label {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--grey-500);
    padding: 22px 4px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.day-label svg {
    width: 12px;
    height: 12px;
    flex: 0 0 auto;
}

/* fixture list — white card, one per day */
.fixture-list {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 0 var(--grey-200), 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}
/* when this list is the last block of a round (no save bar) keep its bottom radius;
   when followed by a save bar, the save bar carries the bottom radius */
.fixture-list + .fx-save-bar {
    border-radius: 0 0 10px 10px;
    margin-top: -1px;
}

/* fixture row */
.fixture-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 18px 22px;
    border-top: 1px solid var(--grey-100);
    gap: 18px;
    font-family: 'Inter', system-ui, sans-serif;
    transition: background 0.12s;
    color: var(--ink);
    text-decoration: none;
}
.fixture-row:first-child {
    border-top: none;
}
.fixture-row:hover {
    background: var(--grey-50);
    color: var(--ink);
    text-decoration: none;
}
.fixture-row .home,
.fixture-row .away {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.fixture-row .away {
}
.fixture-row .flag {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--navy-700), var(--navy-600));
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Archivo', sans-serif;
    font-weight: 800;
    font-size: 10px;
    letter-spacing: 0.04em;
    overflow: hidden;
}
.fixture-row .flag img,
.ticket .side .flag-lg img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}
.fixture-row .name {
    font-family: 'Archivo', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fixture-row .center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 90px;
}
.fixture-row .actual {
    font-family: 'Archivo', sans-serif;
    font-weight: 800;
    font-size: 18px;
    color: var(--ink);
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.fixture-row .actual .vs {
    color: var(--grey-300);
    margin: 0 8px;
    font-weight: 600;
}
.fixture-row .actual.unplayed {
    color: var(--grey-300);
}
.fixture-row .kick {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--grey-500);
    font-weight: 600;
}

/* prediction row tucked under each fixture — mirrors the fixture row's
   1fr / auto / 1fr grid so the label / score / status align under the
   home / score / away columns above */
.pred-row {
    grid-column: 1 / -1;
    margin-top: 12px;
    padding-top: 14px;
    border-top: 1px dashed var(--grey-200);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 18px;
}
.pred-row > .label {
    justify-self: start;
}
.pred-row > .score-input,
.pred-row > .pred-readout {
    justify-self: center;
}
.pred-row > .pred-status {
    justify-self: end;
}
.pred-row .label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--grey-500);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.pred-row .label .corner-glyph {
    width: 12px;
    height: 12px;
}

/* read-only prediction display (used on FixtureList for other users) */
.pred-readout {
    font-family: 'Archivo', sans-serif;
    font-weight: 800;
    font-size: 16px;
    color: var(--ink);
    letter-spacing: 0.02em;
}
.pred-readout .dash {
    color: var(--grey-300);
    margin: 0 6px;
    font-weight: 600;
}
.pred-readout.empty {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    font-size: 11px;
    color: var(--grey-300);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* score input (editable) */
.score-input {
    display: inline-flex;
    align-items: center;
    gap: 0;
    background: var(--grey-50);
    border: 1.5px solid var(--grey-200);
    border-radius: 8px;
    padding: 4px;
}
.score-input input {
    width: 44px;
    height: 38px;
    border: none;
    background: transparent;
    font-family: 'Archivo', sans-serif;
    font-weight: 900;
    font-size: 22px;
    text-align: center;
    color: var(--ink);
    outline: none;
    border-radius: 6px;
    padding: 0;
    -moz-appearance: textfield;
}
.score-input input::-webkit-inner-spin-button,
.score-input input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.score-input input:focus {
    background: #fff;
    box-shadow: inset 0 0 0 2px var(--red);
}
.score-input .dash {
    font-family: 'Archivo', sans-serif;
    font-weight: 800;
    color: var(--grey-300);
    font-size: 18px;
    padding: 0 4px;
}

/* status pills */
.pred-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.1em;
    padding: 6px 10px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}
.pred-status.locked {
    color: var(--grey-500);
    background: var(--grey-100);
}
.pred-status.saved {
    color: var(--green);
    background: var(--green-soft);
}
.pred-status.live {
    color: var(--red);
    background: var(--red-soft);
}
.pred-status .pts {
    color: inherit;
    opacity: 0.85;
}

/* save bar (sticks under a fixture-list, attaches the bottom radius) */
.fx-save-bar {
    background: var(--navy-800);
    color: #fff;
    padding: 16px 22px;
    border-radius: 0 0 10px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: -1px;
}
.fx-save-bar .progress {
    background: transparent;
    height: auto;
    overflow: visible;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.08em;
    opacity: 0.85;
    display: block;
}
.fx-save-bar .save-btn {
    background: var(--red);
    color: #fff;
    border: none;
    padding: 12px 22px;
    font-family: 'Archivo', sans-serif;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.12s, transform 0.12s;
}
.fx-save-bar .save-btn:hover {
    background: #cf3f32;
    color: #fff;
}
.fx-save-bar .save-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.fx-save-bar .actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.fx-save-bar .ghost-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 10px 16px;
    border-radius: 6px;
    font-family: 'Archivo', sans-serif;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.12s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.fx-save-bar .ghost-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

/* =============================================
   FIXTURE DETAIL — focused-prediction "ticket" card
   ============================================= */
.fx-detail-card {
    max-width: 720px;
    margin: 0 auto 24px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 1px 0 var(--grey-200), 0 24px 48px -24px rgba(15, 23, 48, 0.18);
    overflow: hidden;
    color: var(--ink);
    font-family: 'Inter', system-ui, sans-serif;
}
.fx-detail-head {
    background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-700) 100%);
    color: #fff;
    padding: 24px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.fx-detail-head .crumbs {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    opacity: 0.7;
    margin-bottom: 6px;
}
.fx-detail-head h2 {
    font-family: 'Archivo', sans-serif;
    font-weight: 900;
    font-size: 26px;
    letter-spacing: -0.02em;
    margin: 0;
    color: #fff;
}
.fx-detail-head .timer {
    text-align: right;
    flex: 0 0 auto;
}
.fx-detail-head .timer .num {
    font-family: 'Archivo', sans-serif;
    font-weight: 900;
    font-size: 28px;
    letter-spacing: -0.02em;
    color: var(--red);
    line-height: 1;
}
.fx-detail-head .timer .num.muted {
    color: rgba(255, 255, 255, 0.85);
}
.fx-detail-head .timer .lbl {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-top: 4px;
    opacity: 0.7;
}

/* the centerpiece ticket */
.ticket {
    margin: 32px 28px;
    border: 2px solid var(--ink);
    border-radius: 12px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    background: #fff;
    overflow: hidden;
    position: relative;
}
.ticket .side {
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    min-width: 0;
}
.ticket .side.away {
    border-left: 2px dashed var(--grey-200);
}
.ticket .side .flag-lg {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--navy-700), var(--navy-600));
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Archivo', sans-serif;
    font-weight: 900;
    font-size: 18px;
    letter-spacing: 0.04em;
    overflow: hidden;
}
.ticket .side .country {
    font-family: 'Archivo', sans-serif;
    font-weight: 900;
    font-size: 22px;
    letter-spacing: -0.01em;
    color: var(--ink);
    line-height: 1.15;
    overflow-wrap: anywhere;
}
.ticket .side .pos {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--grey-500);
    font-weight: 600;
}
.ticket .center-col {
    background: var(--ink);
    color: #fff;
    padding: 28px 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    min-width: 200px;
}
.ticket .center-col::before,
.ticket .center-col::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--grey-50);
    border: 2px solid var(--ink);
    border-radius: 50%;
    left: 50%;
    transform: translateX(-50%);
}
.ticket .center-col::before { top: -10px; }
.ticket .center-col::after  { bottom: -10px; }
.ticket .center-col .label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.65;
}
.ticket .big-score {
    display: flex;
    gap: 6px;
    align-items: center;
}
.ticket .big-score .input,
.ticket .big-score .static {
    width: 64px;
    height: 72px;
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    font-family: 'Archivo', sans-serif;
    font-weight: 900;
    font-size: 44px;
    color: #fff;
    text-align: center;
    outline: none;
    -moz-appearance: textfield;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.ticket .big-score .input::-webkit-inner-spin-button,
.ticket .big-score .input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.ticket .big-score .input:focus {
    border-color: var(--red);
    background: rgba(229, 75, 60, 0.12);
}
.ticket .big-score .static.empty {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 800;
}
.ticket .big-score .dash {
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Archivo', sans-serif;
    font-weight: 800;
    font-size: 28px;
}

/* footer (form-foot) — actions or meta */
.fx-detail-foot {
    background: var(--grey-50);
    padding: 18px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    border-top: 1px solid var(--grey-200);
    flex-wrap: wrap;
}
.fx-detail-foot .meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--grey-500);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.fx-detail-foot .actions {
    display: flex;
    gap: 10px;
    align-items: center;
}
.fx-detail-foot .btn-primary,
.fx-detail-foot .btn-ghost {
    border: none;
    padding: 12px 22px;
    border-radius: 8px;
    font-family: 'Archivo', sans-serif;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.12s, color 0.12s;
}
.fx-detail-foot .btn-primary {
    background: var(--red);
    color: #fff;
}
.fx-detail-foot .btn-primary:hover {
    background: #cf3f32;
    color: #fff;
}
.fx-detail-foot .btn-ghost {
    background: transparent;
    color: var(--grey-700);
}
.fx-detail-foot .btn-ghost:hover {
    background: var(--grey-100);
    color: var(--ink);
}

/* community predictions section that lives below the ticket */
.community-section {
    max-width: 880px;
    margin: 0 auto;
}
.community-section .section-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 24px 0 12px;
    gap: 12px;
}
.community-section .section-title h2 {
    font-family: 'Archivo', sans-serif;
    font-weight: 800;
    font-size: 18px;
    color: var(--ink);
    margin: 0;
    letter-spacing: -0.01em;
}
.community-section .section-title .count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--grey-500);
}

/* responsive — collapse to single column under 560px */
@media (max-width: 559.98px) {
    .ticket {
        margin: 24px 16px;
        grid-template-columns: 1fr;
    }
    .ticket .side.away {
        border-left: none;
        border-top: 2px dashed var(--grey-200);
    }
    .ticket .center-col {
        order: 2;
        min-width: 0;
    }
    .ticket .side.away {
        order: 3;
    }
    .ticket .center-col::before,
    .ticket .center-col::after {
        display: none;
    }
    .fx-detail-head {
        padding: 20px 18px;
        flex-wrap: wrap;
    }
    .fx-detail-head h2 {
        font-size: 22px;
    }
    .fx-detail-foot {
        padding: 16px 18px;
    }
}

/* responsive — stack the fixture row on narrow screens */
@media (max-width: 599.98px) {
    .fixture-row {
        grid-template-columns: 1fr auto 1fr;
        padding: 14px 14px;
        gap: 10px;
    }
    .fixture-row .name {
        font-size: 14px;
    }
    .fixture-row .center {
        min-width: 70px;
    }
    .pred-row {
        gap: 10px;
    }
    .round-bar {
        padding: 12px 16px;
        font-size: 12px;
    }
    .fx-save-bar {
        padding: 14px 16px;
    }
}

/* --- legacy stage-header / date-header retained for any unconverted pages --- */
.stage-header {
    background: linear-gradient(144.14deg, #4D233F -11.44%, #305B9F 123.42%);
    border-radius: 8px;
    padding: 12px 18px;
    margin: 24px 0 12px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.stage-header:first-child {
    margin-top: 0;
}
.date-header {
    font-size: 0.78rem;
    font-weight: 600;
    color: #8b8fa3;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 8px 4px 4px;
    margin-top: 8px;
}
.date-header:first-child {
    margin-top: 0;
}

/* =============================================
   BUTTONS
   ============================================= */
.btn-tc-primary,
a.btn-tc-primary {
    background: #305B9F;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-block;
    cursor: pointer;
}
.btn-tc-primary:hover,
a.btn-tc-primary:hover {
    background: #1d3a6e;
    color: #fff;
    transform: translateY(-1px);
    text-decoration: none;
}
.btn-tc-secondary {
    background: #fff;
    color: #3f3c57;
    border: 1px solid #d1d5db;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
}
.btn-tc-secondary:hover {
    background: #f8f9fa;
    color: #161D35;
    border-color: #9ca3af;
}

/* Action bar for save/randomize */
.action-bar {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-bottom: 16px;
}

/* =============================================
   POINTS BADGES
   ============================================= */
.points-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
}
.points-badge.pts-4 { background: #22c55e; color: #fff; }
.points-badge.pts-1 { background: #eab308; color: #fff; }
.points-badge.pts-0 { background: #e5e7eb; color: #9ca3af; }

/* In-play badge */
.badge-inplay {
    display: inline-block;
    background: #22c55e;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* =============================================
   FIXTURE DETAIL PAGE
   ============================================= */
.fixture-hero {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    text-align: center;
}
.fixture-hero-comp {
    font-size: 0.75rem;
    font-weight: 600;
    color: #8b8fa3;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}
.fixture-hero-teams {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
}
.fixture-hero-team {
    flex: 1;
    min-width: 0;
}
.fixture-hero-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #161D35;
}
.fixture-hero-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.fixture-hero-goals {
    font-size: 2rem;
    font-weight: 700;
    color: #161D35;
    line-height: 1;
}
.fixture-hero-dash {
    font-size: 1.5rem;
    font-weight: 300;
    color: #9ca3af;
    margin: 0 6px;
}
.fixture-hero-score {
    flex-direction: row;
    align-items: baseline;
}
.fixture-hero-live {
    margin-top: 4px;
}
.fixture-hero-time {
    font-size: 1.5rem;
    font-weight: 600;
    color: #9ca3af;
}
.fixture-hero-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: #8b8fa3;
}
.fixture-hero-meta i {
    margin-right: 4px;
}

.fixture-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 12px;
}
.fixture-section-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: #161D35;
    margin: 0;
}
.fixture-section-count {
    font-size: 0.8rem;
    color: #8b8fa3;
}

/* Three-column prediction layout */
.predictions-columns {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}
.pred-column {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.pred-col-header {
    padding: 10px 14px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
}
.pred-col-header-home {
    background: linear-gradient(135deg, #305B9F, #4a7abf);
}
.pred-col-header-draw {
    background: #6b7280;
}
.pred-col-header-away {
    background: linear-gradient(135deg, #4D233F, #7a3d64);
}

.pred-scoreline-group {
    border-bottom: 1px solid #f0f0f0;
}
.pred-scoreline-group:last-child {
    border-bottom: none;
}
.pred-scoreline {
    padding: 8px 14px 4px;
    font-size: 1rem;
    font-weight: 700;
    color: #161D35;
}
.pred-scoreline-correct {
    color: #22c55e;
}
.pred-user {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3px 14px 3px 24px;
}
.pred-user:last-child {
    padding-bottom: 8px;
}
.pred-username {
    font-size: 0.82rem;
    color: #4b5563;
}
.pred-empty-col {
    padding: 16px 14px;
    font-size: 0.82rem;
    color: #bbb;
    font-style: italic;
}
.pred-no-prediction {
    padding: 10px 14px;
    font-size: 0.78rem;
    color: #9ca3af;
    margin-bottom: 8px;
}
.pred-no-prediction-label {
    font-weight: 600;
    margin-right: 6px;
}
.pred-no-prediction-name {
    margin-right: 2px;
}

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

/* =============================================
   TEXT CONTENT PAGES (home, rules, history)
   ============================================= */
.text-page {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 28px 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.text-page h4, .text-page h5, .text-page h6 {
    color: #161D35;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}
.text-page h4:first-child,
.text-page h5:first-child {
    margin-top: 0;
}
.text-page p {
    color: #555;
    line-height: 1.7;
    margin-bottom: 0.75rem;
}
.text-page ul {
    color: #555;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
}
.text-page a {
    color: #305B9F;
}

/* =============================================
   PROFILE CARDS
   ============================================= */
.profile-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    margin-bottom: 20px;
    overflow: hidden;
}
.profile-card-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e5e7eb;
    padding: 14px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #161D35;
}
.profile-card-header i {
    margin-right: 6px;
    color: #305B9F;
}
.profile-card-body {
    padding: 24px;
}
.security-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.security-row strong {
    color: #161D35;
    font-size: 0.9rem;
}

/* =============================================
   HELPER TEXT
   ============================================= */
.helper-text {
    color: #8b8fa3;
    font-size: 0.85rem;
    margin-bottom: 16px;
}

/* =============================================
   AUTH PAGES — login, signup, password reset, etc.
   ============================================= */
/* Narrow the container and make it a card */
.auth-entrance > .container,
.auth-manage > .container {
    max-width: 480px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    padding: 0;
}
.auth-manage > .container {
    max-width: 560px;
}
/* Allauth h1 → card header (allauth renders the heading as h2.form-heading) */
.auth-entrance > .container > h1,
.auth-entrance > .container > .form-heading,
.auth-manage > .container > h1,
.auth-manage > .container > .form-heading {
    background: #f8f9fa;
    border-bottom: 1px solid #e5e7eb;
    padding: 16px 24px;
    font-size: 1rem;
    font-weight: 600;
    color: #161D35;
    margin: 0;
    letter-spacing: 0.01em;
}
/* Intro / outro paragraphs outside the form */
.auth-entrance > .container > p,
.auth-manage > .container > p {
    padding: 0 24px;
    color: #8b8fa3;
    font-size: 0.85rem;
    margin: 16px 0 0;
    line-height: 1.5;
}
.auth-entrance > .container > p:last-child,
.auth-manage > .container > p:last-child {
    padding-bottom: 24px;
}
.auth-entrance > .container > p a,
.auth-manage > .container > p a {
    color: #305B9F;
    font-weight: 500;
}
/* Form body */
.auth-entrance form,
.auth-manage form {
    padding: 20px 24px 24px;
}
/* Each <p> inside form = a form group */
.auth-entrance form > p,
.auth-manage form > p {
    margin-bottom: 16px;
}
.auth-entrance form label,
.auth-manage form label {
    display: block;
    color: #3f3c57;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 6px;
}
.auth-entrance form input[type="text"],
.auth-entrance form input[type="email"],
.auth-entrance form input[type="password"],
.auth-entrance form input[type="url"],
.auth-entrance form input[type="number"],
.auth-entrance form input[type="tel"],
.auth-entrance form textarea,
.auth-entrance form select,
.auth-manage form input[type="text"],
.auth-manage form input[type="email"],
.auth-manage form input[type="password"],
.auth-manage form input[type="url"],
.auth-manage form input[type="number"],
.auth-manage form input[type="tel"],
.auth-manage form textarea,
.auth-manage form select {
    display: block;
    width: 100%;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #161D35;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.auth-entrance form input:focus,
.auth-entrance form textarea:focus,
.auth-entrance form select:focus,
.auth-manage form input:focus,
.auth-manage form textarea:focus,
.auth-manage form select:focus {
    border-color: #305B9F;
    box-shadow: 0 0 0 2px rgba(48, 91, 159, 0.15);
    outline: none;
    background: #fff;
}
/* Help text */
.auth-entrance form .helptext,
.auth-manage form .helptext {
    display: block;
    color: #8b8fa3;
    font-size: 0.8rem;
    margin-top: 6px;
    line-height: 1.4;
}
.auth-entrance form .helptext a,
.auth-manage form .helptext a {
    color: #305B9F;
}
/* Password requirements list */
.auth-entrance form ul,
.auth-manage form ul {
    color: #8b8fa3;
    font-size: 0.8rem;
    padding-left: 1.2rem;
    margin: 4px 0 12px;
    line-height: 1.6;
}
/* Submit button */
.auth-entrance form button[type="submit"],
.auth-manage form button[type="submit"] {
    display: block;
    width: 100%;
    background: #305B9F;
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 20px;
}
.auth-entrance form button[type="submit"]:hover,
.auth-manage form button[type="submit"]:hover {
    background: #1d3a6e;
    transform: translateY(-1px);
}
/* Error list (form validation) */
.auth-entrance .errorlist,
.auth-manage .errorlist {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 10px 14px;
    margin: 0 24px 16px;
    list-style: none;
    color: #dc2626;
    font-size: 0.85rem;
}
/* Bootstrap messages inside auth card */
.auth-entrance > .container > .alert,
.auth-manage > .container > .alert {
    margin: 16px 24px 0;
    border-radius: 6px;
    font-size: 0.85rem;
}

/* =============================================
   FORMS — light theme
   ============================================= */
.tc-form .form-control,
.tc-form .form-select {
    background: #fff;
    border: 1px solid #d1d5db;
    color: #161D35;
    border-radius: 6px;
}
.tc-form .form-control:focus,
.tc-form .form-select:focus {
    border-color: #305B9F;
    box-shadow: 0 0 0 2px rgba(48, 91, 159, 0.15);
    background: #fff;
    color: #161D35;
}
.tc-form label {
    color: #3f3c57;
    font-size: 0.85rem;
    font-weight: 500;
}
/* Hide help text under form fields — labels are clear enough */
.tc-form .form-text {
    display: none;
}

/* Generic form widgets — only style raw inputs OUTSIDE our design components.
   The new components (.score-input, .ticket .big-score, .fx-detail-foot, .fx-save-bar, .auth-* forms)
   carry their own styling, so don't blanket-override every input/button in the content area. */

/* =============================================
   ALERT MESSAGES
   ============================================= */
.playing-bet .alert {
    font-size: 0.85rem;
    padding: 10px 16px;
    border: none;
    margin-bottom: 16px;
    position: relative;
}
.playing-bet .alert-success {
    background: #f0fdf4;
    color: #166534;
    border-left: 3px solid #22c55e;
}
.playing-bet .alert-info {
    background: #eff6ff;
    color: #1e40af;
    border-left: 3px solid #3b82f6;
}
.playing-bet .alert-warning {
    background: #fffbeb;
    color: #92400e;
    border-left: 3px solid #f59e0b;
}
.playing-bet .alert-danger,
.playing-bet .alert-error {
    background: #fef2f2;
    color: #991b1b;
    border-left: 3px solid #ef4444;
}
.playing-bet .alert .close,
.playing-bet .alert [data-dismiss="alert"] {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: inherit;
    opacity: 0.4;
    cursor: pointer;
    padding: 0 0 0 12px;
    float: right;
    line-height: 1;
}
.playing-bet .alert .close:hover {
    opacity: 0.8;
}

/* =============================================
   FOOTER — navy with brand mark
   ============================================= */
.site-footer {
    background: var(--navy-900);
    color: rgba(255, 255, 255, 0.6);
    padding: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.site-footer .logo {
    color: rgba(255, 255, 255, 0.85);
    font-size: 18px;
    text-decoration: none;
}
.site-footer .logo:hover {
    color: #fff;
}
.site-footer .logo-text {
    font-size: 18px;
}
.site-footer .meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.site-footer .footer-tagline {
    margin: 0;
    flex: 1 1 auto;
    text-align: center;
    font-style: italic;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}
@media (max-width: 575.98px) {
    .site-footer {
        padding: 24px 16px;
        justify-content: center;
        text-align: center;
    }
}

/* =============================================
   MOBILE RESPONSIVE
   ============================================= */
@media (max-width: 991px) {
    .tc-table {
        font-size: 0.82rem;
    }
    .tc-table thead th,
    .tc-table tbody td {
        padding: 8px;
    }
    .match-card {
        padding: 12px 14px;
    }
    .match-card .match-teams {
        flex-wrap: wrap;
    }
    .match-card .team-name {
        flex-basis: 100%;
        text-align: left !important;
    }
    .match-card .team-name.away {
        text-align: left !important;
    }
    .match-card .score-inputs {
        margin: 8px 0;
    }
}

@media (max-width: 575px) {
    .action-bar {
        flex-direction: column;
    }
    .action-bar .btn-tc-primary,
    .action-bar .btn-tc-secondary {
        width: 100%;
    }
    .match-card .match-teams {
        gap: 6px;
    }
}


/* =============================================
   CONCISE FIXTURE LIST (BBC-style)  —  /fixtures
   Group by date, one tight line per match, with
   the viewer's prediction + points pinned right.
   ============================================= */
.fxc-day {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--grey-500);
    padding: 18px 4px 8px;
}
.fxc-list {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 0 var(--grey-200), 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}
.fxc-row {
    display: grid;
    grid-template-columns: 1fr 62px 1fr 68px;
    align-items: center;
    gap: 12px;
    padding: 9px 16px;
    border-top: 1px solid var(--grey-100);
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--ink);
    text-decoration: none;
    transition: background 0.12s;
}
.fxc-row:first-child { border-top: none; }
.fxc-row:hover { background: var(--grey-50); color: var(--ink); text-decoration: none; }

.fxc-home, .fxc-away { display: flex; align-items: center; gap: 9px; min-width: 0; }
.fxc-home { justify-content: flex-end; text-align: right; }
.fxc-name {
    font-family: 'Archivo', sans-serif;
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fxc-row .flag {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    background: linear-gradient(135deg, var(--navy-700), var(--navy-600));
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Archivo', sans-serif;
    font-weight: 800;
    font-size: 8px;
    overflow: hidden;
}
.fxc-row .flag img { width: 100%; height: 100%; object-fit: cover; }

.fxc-mid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    min-width: 0;
    width: 100%;
}
.fxc-score {
    font-family: 'Archivo', sans-serif;
    font-weight: 800;
    font-size: 15px;
    color: var(--ink);
    white-space: nowrap;
}
.fxc-score .d, .fxc-pred .pick .d { color: var(--grey-300); margin: 0 3px; }
.fxc-time {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 13px;
    color: var(--ink);
}
.fxc-state {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--grey-500);
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fxc-row.is-live .fxc-state { color: var(--red); }

.fxc-pred {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    justify-self: end;
    justify-content: flex-end;
}
.fxc-pred .pick {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 12px;
    color: var(--grey-700);
    background: var(--grey-100);
    border-radius: 4px;
    padding: 3px 7px;
    white-space: nowrap;
}
.fxc-pred .pick.none { color: var(--grey-300); background: transparent; padding: 3px 0; }
.fxc-pred .pts {
    font-family: 'Archivo', sans-serif;
    font-weight: 800;
    font-size: 11px;
    border-radius: 4px;
    padding: 3px 6px;
}
.fxc-pred .pts.good { color: var(--green); background: var(--green-soft); }
.fxc-pred .pts.zero { color: var(--grey-500); background: var(--grey-100); }

.fxc-row.empty {
    display: block;
    text-align: center;
    color: var(--grey-500);
    padding: 18px;
}

@media (max-width: 559.98px) {
    .fxc-row { padding: 8px 10px; gap: 7px; grid-template-columns: 1fr 50px 1fr 50px; }
    .fxc-name { font-size: 13px; }
    .fxc-pred .pts { display: none; }   /* points still on the match page */
    .fxc-pred .pick { padding: 3px 5px; }
}

/* =============================================
   COMPACT EDITABLE PREDICTIONS  —  /predictions
   One dense line per fixture: inputs in the middle
   so many fit on screen and stay editable at once.
   ============================================= */
.fixture-row.prediction {
    grid-template-columns: 1fr auto 1fr;
    padding: 10px 18px;
    gap: 14px;
}
.fixture-row.prediction .home { justify-content: flex-end; text-align: right; }
.fixture-row.prediction .home,
.fixture-row.prediction .away { gap: 10px; }
.fixture-row.prediction .name { font-size: 14px; }
.fixture-row.prediction .flag {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    font-size: 8px;
}
.fixture-row.prediction .flag img { object-fit: cover; }

.pred-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 0;
}
.pred-controls .score-input { padding: 3px; }
.pred-controls .score-input input { width: 36px; height: 32px; font-size: 18px; }
.pred-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}
.pred-meta .ko {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--grey-500);
    white-space: nowrap;
}
.pred-controls .pred-status { padding: 4px 8px; font-size: 10px; }

/* save bar floating free (not glued under a fixture-list) */
.fx-save-bar.standalone {
    border-radius: 10px;
    margin-top: 18px;
    position: sticky;
    bottom: 12px;
    box-shadow: 0 6px 18px rgba(15, 23, 48, 0.22);
}

@media (max-width: 559.98px) {
    .fixture-row.prediction { padding: 9px 12px; gap: 8px; }
    .fixture-row.prediction .name { font-size: 13px; }
    .pred-controls .score-input input { width: 32px; height: 30px; font-size: 16px; }
}

/* =============================================
   PREDICTIONS PAGE — /predictions (redesigned)
   ============================================= */
.predictions-page .playing-bet,
.predictions-page.playing-bet {
    padding-bottom: 88px;
}

.pred-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Hero — intro + progress */
.pred-hero {
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--grey-200);
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 8px;
    box-shadow: 0 6px 20px -14px rgba(15, 23, 48, 0.35);
    display: grid;
    gap: 14px;
}
.pred-hero-user {
    font-family: 'Archivo', sans-serif;
    font-size: 19px;
    font-weight: 800;
    margin: 0;
    color: var(--ink);
    letter-spacing: -0.02em;
}
.pred-hero-user strong {
    color: var(--red);
}
.pred-hero-hint {
    font-size: 13px;
    color: var(--grey-500);
    margin: 0;
    line-height: 1.5;
}
.pred-hero-progress {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.pred-progress-track {
    height: 6px;
    background: var(--grey-200);
    border-radius: 99px;
    overflow: hidden;
}
.pred-progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--red), #ff7a6e);
    border-radius: 99px;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.pred-progress-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--grey-500);
}
.pred-hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 4px;
    justify-content: flex-end;
}
.pred-hero-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--red) !important;
    text-decoration: none;
    padding: 8px 0 0;
    border-top: 1px solid var(--grey-200);
    transition: color 0.12s;
}
.pred-hero-link:hover {
    color: var(--ink) !important;
}

/* Day sections */
.pred-day {
    margin-top: 2px;
}
.pred-day-label {
    font-family: 'Archivo', sans-serif;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--grey-700);
    padding: 12px 4px 6px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.pred-day-label::before {
    content: '';
    width: 3px;
    height: 1em;
    background: var(--red);
    border-radius: 2px;
    flex: 0 0 auto;
}

/* Match cards */
.pred-matches {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.pred-match {
    background: #fff;
    border-radius: 8px;
    border: 1px solid var(--grey-200);
    box-shadow: 0 1px 2px rgba(15, 23, 48, 0.04);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
    overflow: hidden;
}
.pred-match:hover {
    box-shadow: 0 4px 16px rgba(15, 23, 48, 0.08);
}
.pred-match[data-state="saved"] {
    border-color: rgba(31, 157, 85, 0.45);
    box-shadow: 0 1px 0 rgba(31, 157, 85, 0.2), 0 2px 12px rgba(31, 157, 85, 0.08);
}
.pred-match[data-state="saving"] {
    border-color: rgba(48, 91, 159, 0.35);
}
.pred-match[data-state="error"] {
    border-color: rgba(229, 75, 60, 0.5);
}

.pred-match-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    padding: 7px 12px;
}

.pred-team {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    width: 100%;
}
.pred-team-home {
    justify-content: flex-end;
    text-align: right;
    flex-direction: row-reverse;
}
.pred-team-away {
    justify-content: flex-start;
    text-align: left;
}
.pred-team-flag {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--navy-700), var(--navy-600));
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.95);
    font-family: 'Archivo', sans-serif;
    font-weight: 800;
    font-size: 10px;
    letter-spacing: 0.04em;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 48, 0.12);
}
.pred-team-flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.pred-team-name {
    font-family: 'Archivo', sans-serif;
    font-weight: 700;
    font-size: 13px;
    color: var(--ink);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Score block — centre column */
.pred-score-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 0;
}
.pred-kick {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--grey-500);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
}
.pred-kick i {
    opacity: 0.7;
    font-size: 8px;
}
.pred-stage {
    color: var(--grey-300);
}
.pred-stage::before {
    content: '·';
    margin: 0 3px;
    color: var(--grey-300);
}

.predictions-page .pred-score-input.score-input {
    background: var(--grey-50);
    border: 1px solid var(--grey-200);
    border-radius: 8px;
    padding: 3px 6px;
    gap: 2px;
    box-shadow: inset 0 1px 2px rgba(15, 23, 48, 0.04);
}
.predictions-page .pred-score-input .score-side {
    display: flex;
    align-items: center;
}
.predictions-page .pred-score-input input.score-cell {
    width: 34px;
    height: 30px;
    font-size: 18px;
    font-weight: 900;
    border-radius: 5px;
    background: transparent;
}
.predictions-page .pred-score-input input.score-cell:focus {
    background: #fff;
    box-shadow: inset 0 0 0 2px var(--red);
}
.predictions-page .pred-score-input .dash {
    font-size: 16px;
    padding: 0 4px;
    color: var(--grey-300);
}

.predictions-page .pred-status {
    font-size: 9px;
    padding: 2px 8px;
}
.pred-status.error {
    color: #b91c1c;
    background: var(--red-soft);
}
.pred-status.saving {
    color: var(--navy-600);
    background: rgba(48, 91, 159, 0.1);
}

/* Empty state */
.pred-empty {
    text-align: center;
    background: #fff;
    border-radius: 14px;
    border: 1px dashed var(--grey-300);
    padding: 48px 28px;
    margin-top: 12px;
}
.pred-empty-icon {
    font-size: 2.5rem;
    color: var(--grey-300);
    margin-bottom: 16px;
}
.pred-empty h3 {
    font-family: 'Archivo', sans-serif;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--ink);
    margin: 0 0 8px;
}
.pred-empty p {
    color: var(--grey-500);
    margin: 0 0 20px;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

/* Sticky action bar */
.pred-actions {
    position: sticky;
    bottom: 16px;
    z-index: 20;
    margin-top: 24px;
    background: var(--navy-800);
    color: #fff;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    box-shadow: 0 12px 40px -8px rgba(15, 23, 48, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
/* Same dark action bar, replicated at the top of the form (static, not sticky). */
.pred-actions-top {
    position: static;
    bottom: auto;
    margin-top: 8px;
    margin-bottom: 4px;
}
.pred-actions-title {
    display: block;
    font-family: 'Archivo', sans-serif;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 0.02em;
}
.pred-actions-sub {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    opacity: 0.75;
    margin-top: 2px;
}
.pred-actions-btns {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.pred-btn-ghost {
    background: rgba(255, 255, 255, 0.08);
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 11px 16px;
    border-radius: 8px;
    font-family: 'Archivo', sans-serif;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.12s;
}
.pred-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff !important;
}
.pred-btn-save {
    background: var(--red);
    color: #fff !important;
    border: none;
    padding: 11px 20px;
    border-radius: 8px;
    font-family: 'Archivo', sans-serif;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.12s, transform 0.12s;
    box-shadow: 0 4px 12px rgba(229, 75, 60, 0.35);
}
.pred-btn-save:hover {
    background: #cf3f32;
    color: #fff !important;
    transform: translateY(-1px);
}

/* Override generic playing-bet button styles inside predictions page */
.predictions-page .pred-btn-ghost,
.predictions-page .pred-btn-save {
    background-image: none;
}
.predictions-page .pred-btn-save {
    background: var(--red);
}

@media (max-width: 639.98px) {
    .pred-hero {
        padding: 18px 16px;
    }
    .pred-hero-user {
        font-size: 17px;
    }
    .pred-hero-actions {
        flex-direction: column;
    }
    .pred-hero-actions .pred-btn-ghost,
    .pred-hero-actions .pred-btn-save {
        width: 100%;
        justify-content: center;
    }
    .pred-match-inner {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 8px;
        padding: 10px 12px;
        text-align: center;
    }
    .pred-team-home,
    .pred-team-away {
        justify-content: center;
        text-align: center;
        flex-direction: row;
    }
    .pred-team-home {
        order: 1;
    }
    .pred-score-block {
        order: 2;
    }
    .pred-team-away {
        order: 3;
    }
    .pred-team-name {
        -webkit-line-clamp: 1;
    }
    .predictions-page .pred-score-input input.score-cell {
        width: 40px;
        height: 34px;
        font-size: 19px;
    }
    .pred-actions {
        flex-direction: column;
        align-items: stretch;
        bottom: 10px;
    }
    .pred-actions-btns {
        flex-direction: column;
    }
    .pred-btn-ghost,
    .pred-btn-save {
        width: 100%;
        justify-content: center;
    }
}
