:root {
    --bg: #f5f7fb;
    --card: #ffffff;
    --text: #182033;
    --muted: #667085;
    --primary: #1f5eff;
    --primary-dark: #164bd1;
    --border: #e6eaf2;
    --success-bg: #e9f8ef;
    --success-text: #137333;
    --error-bg: #fdecec;
    --error-text: #b42318;
    --warning-bg: #fff7e6;
    --warning-text: #945600;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Tahoma, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1080px, calc(100% - 24px));
    margin: 0 auto;
}

.topbar {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar-content {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    font-weight: 800;
    color: var(--primary);
    white-space: nowrap;
}

.nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav a {
    padding: 8px 10px;
    border-radius: 12px;
    color: var(--muted);
    font-size: 14px;
}

.nav a.active,
.nav a:hover {
    background: #eef3ff;
    color: var(--primary);
}

.page {
    padding: 24px 0 42px;
}

.footer {
    color: var(--muted);
    font-size: 13px;
    text-align: center;
    padding: 20px 0 32px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 16px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 18px;
    box-shadow: 0 12px 32px rgba(16, 24, 40, 0.06);
}

.card h1,
.card h2,
.card h3 {
    margin-top: 0;
}

.login-card {
    max-width: 430px;
    margin: 40px auto;
}

.small {
    color: var(--muted);
    font-size: 13px;
}

.form-row {
    margin-bottom: 14px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
}

input,
select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 8px 12px;
    font-size: 16px;
    background: #fff;
    color: var(--text);
}

input:focus,
select:focus {
    outline: 2px solid #dbe6ff;
    border-color: var(--primary);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    background: var(--primary);
    color: #fff;
    min-height: 42px;
    padding: 8px 16px;
    border-radius: 14px;
    font-weight: 800;
    cursor: pointer;
    font-size: 15px;
}

.btn:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: #eef3ff;
    color: var(--primary);
}

.btn-secondary:hover {
    background: #dbe6ff;
}

.btn-danger {
    background: #d92d20;
}

.btn-danger:hover {
    background: #b42318;
}

.btn-full {
    width: 100%;
}

.alert {
    padding: 12px 14px;
    border-radius: 16px;
    margin-bottom: 16px;
    border: 1px solid transparent;
}

.alert-success {
    background: var(--success-bg);
    color: var(--success-text);
    border-color: #bfe8cc;
}

.alert-error {
    background: var(--error-bg);
    color: var(--error-text);
    border-color: #f3c5c5;
}

.alert-warning {
    background: var(--warning-bg);
    color: var(--warning-text);
    border-color: #ffe0a3;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.stat {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 16px;
}

.stat .value {
    font-size: 28px;
    font-weight: 900;
    color: var(--primary);
}

.stat .label {
    color: var(--muted);
    font-size: 14px;
}

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

.match-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.teams {
    font-size: 20px;
    font-weight: 900;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: #eef3ff;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.score-inputs {
    display: grid;
    grid-template-columns: 1fr 28px 1fr;
    align-items: end;
    gap: 10px;
}

.score-sep {
    text-align: center;
    font-size: 22px;
    font-weight: 900;
    padding-bottom: 8px;
    color: var(--muted);
}

.result-line {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    margin-top: 8px;
}

.table-wrap {
    overflow-x: auto;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 22px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 620px;
}

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

th {
    color: var(--muted);
    font-size: 13px;
    background: #fbfcff;
}

tr:last-child td {
    border-bottom: 0;
}

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

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

.admin-links a {
    display: block;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: #fff;
    font-weight: 900;
    color: var(--primary);
}

.two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 760px) {
    .topbar-content {
        align-items: flex-start;
        flex-direction: column;
        padding: 12px 0;
    }

    .nav {
        justify-content: flex-start;
        width: 100%;
    }

    .nav a {
        background: #f7f9ff;
    }

    .admin-links,
    .two-cols {
        grid-template-columns: 1fr;
    }

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

    .stat {
        padding: 10px 8px;
        border-radius: 16px;
        text-align: center;
    }

    .stat .value {
        font-size: 22px;
        line-height: 1.2;
    }

    .stat .label {
        font-size: 12px;
        white-space: nowrap;
    }

    .match-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .teams {
        font-size: 18px;
    }

    .card {
        border-radius: 18px;
        padding: 14px;
    }
}

.section-title-card {
    margin-bottom: 16px;
}

.section-title-card h2 {
    margin-bottom: 4px;
}

.prediction-card {
    position: relative;
}

.badge-open {
    background: var(--success-bg);
    color: var(--success-text);
}

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

.save-message {
    min-height: 22px;
    font-size: 14px;
    font-weight: 800;
    text-align: center;
}

.save-message.success {
    color: var(--success-text);
}

.save-message.error {
    color: var(--error-text);
}

button:disabled,
.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}.prediction-score-text{
    direction: ltr;
    unicode-bidi: isolate;
}

.prediction-actions {
    margin-top: 12px;
}

@media (max-width: 760px) {
    .match-head {
        margin-bottom: 8px;
    }

    .prediction-actions {
        margin-top: 12px;
    }
}

.teams {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.prediction-score-text {
    display: inline-block;
    font-weight: 900;
}

.prediction-actions {
    margin-top: 10px;
}

@media (max-width: 760px) {
    .match-head {
        margin-bottom: 6px;
    }

    .teams {
        font-size: 18px;
        line-height: 1.35;
    }

    .prediction-actions {
        margin-top: 10px;
    }
}

@media (max-width: 380px) {

    .teams {
        font-size: 17px;
    }
}

/* v6 relational admin refinements */
.admin-links {
    grid-template-columns: repeat(4, 1fr);
}
.table-wrap input,
.table-wrap select {
    min-height: 38px;
    font-size: 14px;
}
@media (max-width: 760px) {
    .admin-links {
        grid-template-columns: 1fr;
    }
}

/* v7 import page */
.import-status,
.import-report {
    margin-top: 12px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #f8fbff;
    line-height: 1.9;
}
.import-report {
    background: #f0fff4;
    border-color: #bdeccc;
}
.danger-zone {
    border-color: #ffd2d2;
}
@media (min-width: 761px) {
    .admin-links {
        grid-template-columns: repeat(5, 1fr);
    }
}


/* v8 header + logo refinements */
.topbar {
    position: static;
    top: auto;
    z-index: auto;
}

.topbar-content {
    min-height: 72px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    max-width: 150px;
}

.brand-logo img {
    display: block;
    width: 150px;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.nav {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.nav::-webkit-scrollbar {
    display: none;
}

.nav a {
    flex: 0 0 auto;
    padding: 7px 9px;
    border-radius: 11px;
    font-size: 14px;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .topbar-content {
        min-height: 58px;
        flex-direction: row;
        align-items: center;
        padding: 7px 0;
        gap: 8px;
    }

    .brand-logo {
        max-width: 96px;
    }

    .brand-logo img {
        width: 96px;
        border-radius: 8px;
    }

    .nav {
        width: auto;
        justify-content: flex-start;
        gap: 4px;
    }

    .nav a {
        padding: 6px 7px;
        font-size: 13px;
        background: #f7f9ff;
    }

    .page {
        padding-top: 14px;
    }
}

@media (max-width: 380px) {
    .brand-logo {
        max-width: 82px;
    }

    .brand-logo img {
        width: 82px;
    }

    .nav a {
        padding-inline: 6px;
        font-size: 12.5px;
    }
}

/* v9 real flag images: Windows/Chrome does not render country emoji flags reliably */
.match-teams-inline,
.team-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    vertical-align: middle;
}

.match-teams-inline {
    max-width: 100%;
    direction: rtl;
}

.match-teams-inline .team-label {
    flex: 0 1 auto;
}

.team-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.team-flag-img {
    width: 24px;
    height: 18px;
    object-fit: contain;
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.12);
    background: #fff;
    padding: 1px;
    flex: 0 0 auto;
}

.match-x {
    flex: 0 0 auto;
    color: var(--text);
    font-weight: 900;
}

.teams .match-teams-inline {
    justify-content: flex-start;
}

@media (max-width: 760px) {
    .team-flag-img {
        width: 22px;
        height: 16px;
    }

    .teams .match-teams-inline {
        width: 100%;
    }
}

/* v11 group design preview page */
.design-control-card {
    margin-bottom: 16px;
}

.design-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
    margin-top: 12px;
}

.design-controls .form-row {
    margin-bottom: 0;
}

.design-submit-row .btn {
    min-width: 120px;
}

.design-simple-list {
    display: grid;
    gap: 10px;
}

.design-simple-row {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 12px;
    background: #fbfcff;
}

.design-simple-teams {
    font-size: 18px;
    font-weight: 900;
}

.worldcup-poster {
    position: relative;
    overflow: hidden;
    direction: ltr;
    color: #fff;
    border-radius: 28px;
    padding: 32px 18px 30px;
    background:
        radial-gradient(circle at 12% 18%, rgba(255,255,255,0.08), transparent 24%),
        radial-gradient(circle at 82% 14%, rgba(62,105,255,0.28), transparent 28%),
        linear-gradient(135deg, #111a4a 0%, #101845 45%, #070d25 100%);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 22px 55px rgba(2, 6, 23, 0.25);
    isolation: isolate;
}

.poster-bg-dots {
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0.32;
    background-image: radial-gradient(circle, rgba(255,255,255,0.42) 1.5px, transparent 1.5px);
    background-size: 18px 18px;
    mask-image: linear-gradient(90deg, transparent 0%, #000 32%, #000 100%);
}

.poster-title {
    text-align: center;
    font-family: Arial, Tahoma, sans-serif;
    font-size: clamp(24px, 5vw, 48px);
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: 8px;
    color: #f7f9ff;
    margin: 0 auto 18px;
    text-transform: uppercase;
}

.poster-group-ribbon {
    width: fit-content;
    min-width: 190px;
    margin: 0 auto 28px;
    padding: 10px 24px;
    border-radius: 10px;
    background: linear-gradient(180deg, #d73939, #9d161d);
    box-shadow: 0 10px 24px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.3);
    text-align: center;
    font-size: clamp(22px, 3.2vw, 38px);
    font-weight: 900;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.poster-matches {
    display: grid;
    gap: 20px;
}

.poster-match-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 110px minmax(0, 1fr);
    grid-template-areas:
        "home score away"
        "date date date";
    align-items: center;
    column-gap: 0;
    row-gap: 8px;
}

.poster-team {
    min-height: 72px;
    display: grid;
    align-items: center;
    background: linear-gradient(180deg, #ffffff 0%, #f2f2f2 54%, #dcdde1 100%);
    color: #111827;
    border-top: 1px solid rgba(255,255,255,0.9);
    border-bottom: 7px solid #c91b2f;
    box-shadow: 0 8px 16px rgba(0,0,0,0.24), inset 0 -7px 10px rgba(0,0,0,0.08);
}

.poster-home-team {
    grid-area: home;
    grid-template-columns: 92px minmax(0, 1fr);
    border-radius: 16px 0 0 16px;
}

.poster-away-team {
    grid-area: away;
    grid-template-columns: minmax(0, 1fr) 92px;
    border-radius: 0 16px 16px 0;
}

.poster-team-name {
    min-width: 0;
    padding: 0 16px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    font-family: Arial, Tahoma, sans-serif;
    font-size: clamp(15px, 2vw, 25px);
    font-weight: 900;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    direction: rtl;
}

.poster-flag-wrap {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
}

.poster-flag-wrap .team-flag-img {
    width: 86px;
    height: 58px;
    border: 2px solid rgba(255,255,255,0.85);
    border-radius: 12px;
    object-fit: contain;
    box-shadow: 0 4px 10px rgba(0,0,0,0.18);
    background: #fff;
    padding: 2px;
}

.poster-flag-placeholder {
    width: 62px;
    height: 62px;
    align-self: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #c9ced8, #858c9b);
    opacity: 0.9;
}

.poster-score-box {
    grid-area: score;
    z-index: 2;
    height: 84px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #e45255 0%, #a81218 100%);
    clip-path: polygon(8% 0, 92% 0, 100% 50%, 88% 100%, 12% 100%, 0 50%);
    box-shadow: 0 8px 18px rgba(0,0,0,0.36), inset 0 1px 0 rgba(255,255,255,0.3);
    color: #fff;
    font-size: clamp(24px, 3.4vw, 38px);
    font-weight: 900;
    white-space: nowrap;
    direction: ltr;
}

.poster-match-date {
    grid-area: date;
    text-align: center;
    color: #f5f7fb;
    font-family: Arial, Tahoma, sans-serif;
    font-size: clamp(14px, 2vw, 22px);
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    direction: rtl;
}

@media (min-width: 761px) {
    .admin-links {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 760px) {
    .design-controls {
        grid-template-columns: 1fr;
    }

    .design-submit-row .btn {
        width: 100%;
    }

    .worldcup-poster {
        width: calc(100% + 8px);
        margin-inline: -4px;
        border-radius: 20px;
        padding: 22px 8px 22px;
    }

    .poster-title {
        font-size: 24px;
        letter-spacing: 3px;
        margin-bottom: 12px;
    }

    .poster-group-ribbon {
        min-width: 130px;
        padding: 8px 16px;
        margin-bottom: 20px;
        border-radius: 8px;
        font-size: 22px;
        letter-spacing: 2px;
    }

    .poster-matches {
        gap: 17px;
    }

    .poster-match-row {
        grid-template-columns: minmax(0, 1fr) 70px minmax(0, 1fr);
        row-gap: 6px;
    }

    .poster-team {
        min-height: 54px;
        border-bottom-width: 5px;
    }

    .poster-home-team {
        grid-template-columns: 62px minmax(0, 1fr);
        border-radius: 12px 0 0 12px;
    }

    .poster-away-team {
        grid-template-columns: minmax(0, 1fr) 62px;
        border-radius: 0 12px 12px 0;
    }

   .poster-flag-wrap {
        height: 54px;
        padding: 5px;
    }

    .poster-flag-wrap .team-flag-img {
        width: 54px;
        height: 38px;
        border-radius: 9px;
        border-width: 1px;
    }

    .poster-flag-placeholder {
        width: 36px;
        height: 36px;
    }

    .poster-team-name {
        padding: 0 6px;
        font-size: 11.5px;
        letter-spacing: 0;
        line-height: 1.15;
    }

    .poster-score-box {
        height: 64px;
        font-size: 22px;
    }

    .poster-match-date {
        font-size: 13px;
        letter-spacing: 0.5px;
    }
}

@media (max-width: 380px) {
    .poster-match-row {
        grid-template-columns: minmax(0, 1fr) 62px minmax(0, 1fr);
    }

    .poster-home-team {
        grid-template-columns: 54px minmax(0, 1fr);
    }

    .poster-away-team {
        grid-template-columns: minmax(0, 1fr) 54px;
    }

    .poster-flag-wrap .team-flag-img {
        width: 46px;
        height: 34px;
    }

    .poster-team-name {
        font-size: 10.5px;
        padding-inline: 4px;
    }

    .poster-score-box {
        font-size: 19px;
    }
}


/* v16: تصميم كأس العالم الموحّد بعد تنظيف تعارضات v13/v14/v15 */
body.theme-worldcup {
    min-height: 100vh;
    background:
        radial-gradient(circle at 8% 4%, rgba(70, 103, 216, 0.24), transparent 26%),
        radial-gradient(circle at 94% 8%, rgba(255,255,255,0.07), transparent 22%),
        linear-gradient(180deg, #111b50 0%, #0b133d 42%, #070d25 100%);
    color: #f8fafc;
}

body.theme-worldcup::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.12;
    background-image: radial-gradient(circle, rgba(255,255,255,0.62) 1.2px, transparent 1.2px);
    background-size: 17px 17px;
    mask-image: linear-gradient(180deg, #000 0%, transparent 82%);
    z-index: -1;
}

.theme-worldcup .topbar {
    position: relative;
    top: auto;
    background: transparent;
    border-bottom: 0;
    box-shadow: none;
}

.theme-worldcup .topbar-content {
    min-height: 62px;
    padding: 8px 0 6px;
}

.theme-worldcup .brand-logo img {
    width: 128px;
    border-radius: 8px;
    box-shadow: none;
}

.theme-worldcup .nav a {
    color: rgba(255,255,255,0.82);
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
}

.theme-worldcup .nav a.active,
.theme-worldcup .nav a:hover {
    color: #fff;
    background: rgba(198,29,47,0.32);
    border-color: rgba(255,255,255,0.16);
}

.theme-worldcup .page {
    padding-top: 10px;
}

.theme-worldcup .section-title-card,
.theme-worldcup .card:not(.wc-pred-card) {
    background: rgba(8, 15, 49, 0.72);
    border: 1px solid rgba(255,255,255,0.10);
    color: #fff;
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.18);
}

.theme-worldcup .section-title-card .small,
.theme-worldcup .card .small {
    color: rgba(255,255,255,0.72);
}

.theme-worldcup .stats {
    gap: 10px;
    margin-bottom: 14px;
}

.theme-worldcup .stats .stat {
    background: rgba(8, 15, 49, 0.58);
    border: 1px solid rgba(255,255,255,0.10);
    color: #fff;
    box-shadow: 0 12px 28px rgba(2, 6, 23, 0.14);
}

.theme-worldcup .stat .value,
.theme-worldcup .stat .label {
    color: #fff;
}

.theme-worldcup .stat .label {
    opacity: 0.72;
}

.wc-pred-card {
    position: relative;
    overflow: hidden;
    direction: rtl;
    padding: 12px;
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.10);
    background:
        radial-gradient(circle at 12% 8%, rgba(255,255,255,0.08), transparent 22%),
        radial-gradient(circle at 85% 10%, rgba(65,101,223,0.30), transparent 30%),
        linear-gradient(135deg, #111b50 0%, #0d1645 48%, #070d25 100%);
    box-shadow: 0 18px 42px rgba(2, 6, 23, 0.26);
    color: #fff;
    isolation: isolate;
}

.wc-pred-card + .wc-pred-card {
    margin-top: 16px;
}

.wc-pred-form {
    position: relative;
    z-index: 1;
}

.wc-pred-dots {
    position: absolute;
    inset: 0;
    opacity: 0.22;
    z-index: -1;
    background-image: radial-gradient(circle, rgba(255,255,255,0.55) 1.4px, transparent 1.4px);
    background-size: 16px 16px;
    mask-image: linear-gradient(90deg, transparent 0%, #000 26%, #000 100%);
}

.wc-pred-top {
    position: relative;
    z-index: 1;
    min-height: 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.wc-pred-meta {
    min-width: 0;
    color: rgba(255,255,255,0.78);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wc-pred-date {
    direction: rtl;
    unicode-bidi: isolate;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.wc-pred-strip {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 88px minmax(0, 1fr);
    align-items: stretch;
    gap: 0;
}

.wc-team-panel {
    position: relative;
    min-width: 0;
    min-height: 70px;
    overflow: hidden;
    display: flex;
    align-items: stretch;
    justify-content: center;
    background: linear-gradient(180deg, #ffffff 0%, #f2f3f6 56%, #dce0e8 100%);
    color: #111827;
    border-top: 1px solid rgba(255,255,255,0.95);
    border-bottom: 0;
    box-shadow: 0 8px 15px rgba(0,0,0,0.22), inset 0 -5px 8px rgba(0,0,0,0.07);
}

.wc-team-home {
    border-radius: 0 14px 14px 0;
}

.wc-team-away {
    border-radius: 14px 0 0 14px;
}

.wc-team-panel::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 5px;
    background: #c61d2f;
    z-index: 5;
    pointer-events: none;
}

.wc-team-flagbox {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 0;
}

.wc-team-panel .team-label {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 60px;
    gap: 0;
}

.wc-team-away .team-label,
.wc-team-panel .team-label {
    flex-direction: row;
}

.wc-team-panel .team-name {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 100%;
    color: #0f172a;
    font-size: 15.5px;
    font-weight: 900;
    line-height: 1.2;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wc-team-panel .team-flag-img {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 54px;
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    object-fit: cover;
    object-position: center;
    z-index: 1;
}

.wc-team-home .team-flag-img {
    right: 0;
}

.wc-team-away .team-flag-img {
    left: 0;
}

.wc-score-panel {
    z-index: 2;
    min-height: 80px;
    margin-block: -5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #ee575b 0%, #b5121f 100%);
    clip-path: polygon(8% 0, 92% 0, 100% 50%, 88% 100%, 12% 100%, 0 50%);
    box-shadow: 0 9px 20px rgba(0,0,0,0.38), inset 0 1px 0 rgba(255,255,255,0.30);
    color: #fff;
}

.wc-score-caption {
    max-width: 78px;
    margin-bottom: 2px;
    color: rgba(255,255,255,0.88);
    font-size: 10.5px;
    font-weight: 900;
    line-height: 1.15;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wc-score-inputs-line {
    direction: ltr;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.wc-score-input,
.wc-score-static {
    width: 28px;
    min-height: 32px;
    border: 0;
    border-radius: 8px;
    padding: 0;
    background: transparent;
    color: #fff;
    text-align: center;
    font-size: 23px;
    line-height: 32px;
    font-weight: 900;
    outline: none;
    direction: ltr;
    unicode-bidi: isolate;
}

.wc-score-static {
    width: auto;
    min-width: 62px;
    padding: 0 4px;
    white-space: nowrap;
}

.wc-score-input::-webkit-outer-spin-button,
.wc-score-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.wc-score-input[type=number] {
    -moz-appearance: textfield;
}

.wc-score-input:focus {
    outline: 1px solid rgba(255,255,255,0.65);
    background: rgba(255,255,255,0.12);
}

.wc-score-dash {
    font-size: 22px;
    font-weight: 900;
    color: #fff;
}

.wc-live-control-row {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 88px minmax(0, 1fr);
    align-items: center;
    gap: 0;
    margin: 8px 0 10px;
    direction: rtl;
}

.wc-inline-stepper {
    min-width: 0;
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.wc-inline-stepper button {
    width: 34px;
    height: 30px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.28);
    background: rgba(255,255,255,0.10);
    color: #fff;
    box-shadow: none;
    font-size: 22px;
    line-height: 1;
    font-weight: 900;
    cursor: pointer;
}

.wc-inline-stepper button:hover,
.wc-inline-stepper button:active {
    background: rgba(255,255,255,0.18);
}

.wc-center-status {
    min-width: 0;
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}.wc-helper-pill,
.wc-status-pill{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    max-width: 100%;
    padding: 3px 7px;
    border-radius: 999px;
    color: #dffbe8;
    background: rgba(20, 115, 61, 0.30);
    border: 1px solid rgba(144, 238, 171, 0.45);
    font-size: 10px;
    line-height: 1.2;
    font-weight: 900;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wc-status-pill.is-closed {
    color: rgba(255,255,255,0.82);
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
}

.wc-pred-status-row {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 10px 0 8px;
}

.wc-pred-actions {
    position: relative;
    z-index: 1;
    margin-top: 8px;
}

.wc-save-btn {
    min-height: 44px;
    border-radius: 14px;
    background: linear-gradient(180deg, #2f6bff, #1c55eb);
    box-shadow: 0 12px 22px rgba(31,94,255,0.20);
}

.wc-pred-card .save-message {
    color: rgba(255,255,255,0.82);
}

.wc-pred-card .save-message.success {
    color: #a7f3bd;
}

.wc-pred-card .save-message.error {
    color: #fecaca;
}

.theme-worldcup .table-wrap {
    background: rgba(8, 15, 49, 0.78);
    border-color: rgba(255,255,255,0.10);
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.18);
}

.theme-worldcup th {
    color: rgba(255,255,255,0.74);
    background: rgba(255,255,255,0.06);
}

.theme-worldcup td,
.theme-worldcup th {
    border-bottom-color: rgba(255,255,255,0.08);
}

.theme-worldcup td {
    color: #fff;
}

.theme-worldcup .footer {
    color: rgba(255,255,255,0.58);
}

@media (min-width: 761px) {
    .wc-pred-strip,
    .wc-live-control-row {
        grid-template-columns: minmax(0, 1fr) 112px minmax(0, 1fr);
    }

    .wc-team-panel,
    .wc-team-panel .team-label {
        min-height: 78px;
    }

    .wc-team-panel .team-label {
        padding-inline: 78px;
    }

    .wc-team-panel .team-name {
        font-size: 19.5px;
    }

    .wc-team-panel .team-flag-img {
        width: 70px;
    }

    .wc-score-panel {
        min-height: 88px;
    }

    .wc-score-caption {
        max-width: 100px;
        font-size: 12px;
    }

    .wc-score-input,
    .wc-score-static {
        width: 36px;
        min-height: 38px;
        font-size: 29px;
        line-height: 38px;
    }

    .wc-score-static {
        width: auto;
        min-width: 78px;
    }

    .wc-inline-stepper button {
        width: 38px;
        height: 34px;
        font-size: 23px;
    }.wc-helper-pill,
.wc-status-pill{
        font-size: 11.5px;
    }
}

@media (max-width: 760px) {
    body.theme-worldcup::before {
        opacity: 0.10;
    }

    .theme-worldcup .topbar-content {
        min-height: 54px;
        padding: 6px 0 4px;
        gap: 7px;
    }

    .theme-worldcup .brand-logo {
        max-width: 86px;
    }

    .theme-worldcup .brand-logo img {
        width: 86px;
        border-radius: 7px;
    }

    .theme-worldcup .nav {
        gap: 4px;
    }

    .theme-worldcup .nav a {
        padding: 5px 7px;
        font-size: 12.5px;
    }

    .theme-worldcup .page {
        padding-top: 10px;
    }

    .theme-worldcup .stats {
        gap: 8px;
        margin-bottom: 12px;
    }

    .theme-worldcup .stat {
        padding: 10px 6px;
        border-radius: 14px;
    }

    .theme-worldcup .section-title-card h2 {
        font-size: 22px;
        margin-bottom: 2px;
    }

    .wc-pred-card {
        width: calc(100% + 8px);
        margin-inline: -4px;
        padding: 10px 10px 12px;
        border-radius: 20px;
    }

    .wc-pred-top {
        gap: 6px;
        margin-bottom: 8px;
    }

    .wc-pred-meta {
        font-size: 11px;
    }

    .wc-pred-date {
        font-size: 11.5px;
    }

    .wc-pred-strip,
    .wc-live-control-row {
        grid-template-columns: minmax(0, 1fr) 74px minmax(0, 1fr);
    }

    .wc-team-panel,
    .wc-team-panel .team-label {
        min-height: 62px;
    }

    .wc-team-panel .team-label {
        padding-inline: 49px;
    }

    .wc-team-panel .team-flag-img {
        width: 43px;
    }

    .wc-team-panel .team-name {
        font-size: 12.5px;
        line-height: 1.15;
    }

    .wc-score-panel {
        min-height: 72px;
    }

    .wc-score-caption {
        max-width: 66px;
        font-size: 9.2px;
    }

    .wc-score-input,
    .wc-score-static {
        width: 24px;
        min-height: 29px;
        font-size: 21px;
        line-height: 29px;
    }

    .wc-score-static {
        width: auto;
        min-width: 54px;
    }

    .wc-score-dash {
        font-size: 20px;
    }

    .wc-live-control-row {
        margin-top: 7px;
        margin-bottom: 9px;
    }

    .wc-inline-stepper {
        gap: 8px;
        min-height: 31px;
    }

    .wc-inline-stepper button {
        width: 31px;
        height: 28px;
        font-size: 20px;
    }

    .wc-center-status {
        min-height: 31px;
    }.wc-helper-pill,
.wc-status-pill{
        min-height: 20px;
        padding: 2px 5px;
        font-size: 8.6px;
    }

    .wc-save-btn {
        min-height: 42px;
    }
}

@media (max-width: 380px) {
    .wc-pred-strip,
    .wc-live-control-row {
        grid-template-columns: minmax(0, 1fr) 66px minmax(0, 1fr);
    }

    .wc-team-panel .team-label {
        padding-inline: 42px;
    }

    .wc-team-panel .team-flag-img {
        width: 36px;
    }

    .wc-team-panel .team-name {
        font-size: 11px;
    }

    .wc-score-caption {
        max-width: 60px;
        font-size: 8.5px;
    }

    .wc-inline-stepper {
        gap: 6px;
    }

    .wc-inline-stepper button {
        width: 28px;
        height: 27px;
        font-size: 19px;
    }.wc-helper-pill,
.wc-status-pill{
        font-size: 7.8px;
        padding-inline: 4px;
    }
}

/* v18: توحيد شريط الحالة أعلى النتيجة، تصحيح اتجاه الأزرار، وضبط الأعلام */
.wc-pred-meta {
    flex: 1 1 0;
    text-align: right;
}

.wc-pred-date {
    flex: 1 1 0;
    text-align: left;
}

.wc-pred-top-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.wc-top-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    max-width: 100%;
    padding: 3px 8px;
    border-radius: 999px;
    color: #dffbe8;
    background: rgba(20, 115, 61, 0.28);
    border: 1px solid rgba(144, 238, 171, 0.42);
    font-size: 10.5px;
    line-height: 1.2;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wc-score-panel {
    justify-content: center;
}

.wc-score-inputs-line {
    margin-top: 0;
}

.wc-team-panel {
    border-bottom: 0;
}

.wc-team-panel .team-flag-img {
    top: 0;
    bottom: 0;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.wc-live-control-row {
    margin: 6px 0 6px;
}

.wc-helper-pill {
    color: rgba(255,255,255,0.88);
    background: transparent;
    border-color: transparent;
    border-radius: 0;
    padding: 0 4px;
    font-size: 10.2px;
}

.wc-pred-actions {
    margin-top: 6px;
    gap: 3px;
}

.wc-pred-card .save-message {
    min-height: 0;
    line-height: 1.35;
    margin: 0;
}

.wc-pred-card .save-message:empty {
    display: none;
}

@media (min-width: 761px) {
    .wc-pred-top-center {
        width: 112px;
    }

    .wc-top-status {
        min-height: 24px;
        padding-inline: 10px;
        font-size: 11.5px;
    }

    .wc-helper-pill {
        font-size: 11.2px;
    }
}

@media (max-width: 760px) {
    .wc-pred-top {
        min-height: 23px;
        align-items: center;
        margin-bottom: 6px;
    }

    .wc-pred-top-center {
        width: 74px;
    }

    .wc-top-status {
        min-height: 19px;
        padding: 2px 5px;
        font-size: 7.9px;
    }

    .wc-pred-date {
        font-size: 10.8px;
    }

    .wc-pred-meta {
        font-size: 10.5px;
    }

    .wc-live-control-row {
        margin-top: 5px;
        margin-bottom: 5px;
    }

    .wc-helper-pill {
        font-size: 8.2px;
        padding-inline: 2px;
        white-space: nowrap;
    }

    .wc-pred-actions {
        margin-top: 5px;
    }

    .wc-save-btn {
        min-height: 40px;
    }

    .wc-pred-card {
        padding-bottom: 9px;
    }
}

@media (max-width: 380px) {
    .wc-pred-top-center {
        width: 66px;
    }

    .wc-top-status {
        padding-inline: 3px;
        font-size: 7.1px;
    }

    .wc-pred-date {
        font-size: 9.8px;
    }

    .wc-helper-pill {
        font-size: 7.5px;
    }
}

/* v19: long team names + full default prediction text + tighter flags */
.wc-team-panel .team-label {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.wc-team-home .team-label {
    padding-right: 62px !important;
    padding-left: 12px !important;
}

.wc-team-away .team-label {
    padding-left: 62px !important;
    padding-right: 12px !important;
}

.wc-team-panel .team-name {
    white-space: normal !important;
    overflow: hidden !important;
    text-overflow: clip !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.22 !important;
    word-break: normal;
    overflow-wrap: anywhere;
}

.wc-team-panel .team-flag-img {
    display: block !important;
    top: 0 !important;
    bottom: auto !important;
    height: calc(100% + 5px) !important;
    min-height: calc(100% + 5px) !important;
    object-fit: cover !important;
    object-position: center !important;
    vertical-align: top !important;
}

.wc-live-control-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    grid-template-areas:
        "hint hint"
        "home away";
    row-gap: 5px;
    column-gap: 8px;
    margin: 5px 0 6px !important;
}

.wc-stepper-home {
    grid-area: home;
}

.wc-stepper-away {
    grid-area: away;
}

.wc-center-status {
    grid-area: hint;
    width: 100%;
    min-height: 20px;
}

.wc-helper-pill {
    width: 100%;
    max-width: none;
    min-height: 18px;
    color: rgba(255,255,255,0.88);
    font-size: 10px;
    line-height: 1.2;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

@media (min-width: 761px) {
    .wc-team-home .team-label {
        padding-right: 82px !important;
        padding-left: 16px !important;
    }

    .wc-team-away .team-label {
        padding-left: 82px !important;
        padding-right: 16px !important;
    }

    .wc-helper-pill {
        font-size: 11.5px;
    }
}

@media (max-width: 760px) {
    .wc-team-home .team-label {
        padding-right: 48px !important;
        padding-left: 7px !important;
    }

    .wc-team-away .team-label {
        padding-left: 48px !important;
        padding-right: 7px !important;
    }

    .wc-team-panel .team-flag-img {
        width: 43px !important;
    }

    .wc-team-panel .team-name {
        font-size: 12.6px !important;
    }

    .wc-helper-pill {
        font-size: 9.3px;
    }
}

@media (max-width: 380px) {
    .wc-team-home .team-label {
        padding-right: 40px !important;
        padding-left: 5px !important;
    }

    .wc-team-away .team-label {
        padding-left: 40px !important;
        padding-right: 5px !important;
    }

    .wc-team-panel .team-flag-img {
        width: 36px !important;
    }

    .wc-team-panel .team-name {
        font-size: 11.4px !important;
        line-height: 1.18 !important;
    }

    .wc-helper-pill {
        font-size: 8.8px;
    }
}

/* v20: countdown beside the match date using only two time units */
.wc-pred-date-line {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    direction: ltr;
    white-space: nowrap;
    overflow: hidden;
}

.wc-pred-date-line .wc-pred-date {
    flex: 0 1 auto !important;
    min-width: 0;
    direction: rtl;
    unicode-bidi: isolate;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wc-countdown {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 20px;
    padding: 2px 7px;
    border-radius: 999px;
    direction: rtl;
    unicode-bidi: isolate;
    color: #eaf2ff;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 10.2px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: 0;
}

@media (max-width: 760px) {
    .wc-pred-date-line {
        gap: 4px;
    }

    .wc-pred-date-line .wc-pred-date {
        font-size: 9.6px;
    }

    .wc-countdown {
        min-height: 17px;
        padding: 1px 5px;
        font-size: 8.6px;
    }
}

@media (max-width: 380px) {
    .wc-pred-date-line .wc-pred-date {
        font-size: 8.8px;
    }

    .wc-countdown {
        padding-inline: 4px;
        font-size: 7.8px;
    }
}

/* v21: professional unified color palette across the whole site */
:root {
    --bg: #eef3fa;
    --card: #ffffff;
    --text: #111827;
    --muted: #64748b;
    --primary: #1f5bd8;
    --primary-dark: #173f9f;
    --primary-soft: #e8efff;
    --border: #dbe4ef;
    --success-bg: #e7f7ee;
    --success-text: #106b3a;
    --error-bg: #fff0f0;
    --error-text: #b42318;
    --warning-bg: #fff6df;
    --warning-text: #8a5a00;

    --wc-ink: #061026;
    --wc-navy-950: #050b1d;
    --wc-navy-900: #071532;
    --wc-navy-850: #0a1b42;
    --wc-navy-800: #0d2356;
    --wc-blue: #245de8;
    --wc-blue-dark: #173fba;
    --wc-red: #c91f35;
    --wc-red-dark: #931522;
    --wc-gold: #f4c86a;
    --wc-ice: #f7faff;
    --wc-line: rgba(180, 202, 245, 0.18);
}

body:not(.theme-worldcup) {
    background:
        radial-gradient(circle at 88% 0%, rgba(31, 91, 216, 0.08), transparent 28%),
        linear-gradient(180deg, #f6f9fd 0%, var(--bg) 100%);
}

body:not(.theme-worldcup) .topbar {
    background: rgba(255, 255, 255, 0.92);
    border-bottom-color: rgba(219, 228, 239, 0.88);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.045);
    backdrop-filter: blur(10px);
}

body:not(.theme-worldcup) .nav a {
    color: #475569;
    background: rgba(232, 239, 255, 0.55);
}

body:not(.theme-worldcup) .nav a.active,
body:not(.theme-worldcup) .nav a:hover {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

body:not(.theme-worldcup) .card,
body:not(.theme-worldcup) .table-wrap,
body:not(.theme-worldcup) .stat,
body:not(.theme-worldcup) .admin-links a {
    border-color: rgba(219, 228, 239, 0.95);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.055);
}

.btn {
    background: linear-gradient(180deg, var(--primary), var(--primary-dark));
    box-shadow: 0 10px 20px rgba(31, 91, 216, 0.16);
}

.btn:hover {
    background: linear-gradient(180deg, #2b67ea, var(--primary-dark));
}

.btn-secondary {
    background: var(--primary-soft);
    color: var(--primary-dark);
    box-shadow: none;
}

.btn-secondary:hover {
    background: #dbe7ff;
}

input:focus,
select:focus {
    outline-color: rgba(31, 91, 216, 0.18);
    border-color: rgba(31, 91, 216, 0.70);
}

/* Unified dark tournament theme */
body.theme-worldcup {
    min-height: 100vh;
    background:
        radial-gradient(circle at 6% 2%, rgba(36, 93, 232, 0.22), transparent 28%),
        radial-gradient(circle at 94% 8%, rgba(244, 200, 106, 0.08), transparent 20%),
        linear-gradient(180deg, var(--wc-navy-900) 0%, var(--wc-navy-950) 58%, #030817 100%);
    color: var(--wc-ice);
}

body.theme-worldcup::before {
    opacity: 0.115;
    background-image: radial-gradient(circle, rgba(216, 228, 255, 0.70) 1.1px, transparent 1.1px);
    background-size: 18px 18px;
    mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,0.62) 46%, transparent 92%);
}

.theme-worldcup .topbar {
    background: linear-gradient(180deg, rgba(5, 11, 29, 0.72), rgba(5, 11, 29, 0.20));
    border-bottom: 1px solid rgba(180, 202, 245, 0.08);
}

.theme-worldcup .topbar-content {
    min-height: 60px;
}

.theme-worldcup .brand-logo img {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

.theme-worldcup .nav a {
    color: rgba(247, 250, 255, 0.82);
    background: rgba(247, 250, 255, 0.065);
    border: 1px solid rgba(180, 202, 245, 0.11);
}

.theme-worldcup .nav a.active,
.theme-worldcup .nav a:hover {
    color: #fff;
    background: linear-gradient(180deg, rgba(31, 91, 216, 0.42), rgba(31, 91, 216, 0.22));
    border-color: rgba(244, 200, 106, 0.34);
}

.theme-worldcup .section-title-card,
.theme-worldcup .card:not(.wc-pred-card),
.theme-worldcup .stats .stat,
.theme-worldcup .table-wrap {
    background: linear-gradient(180deg, rgba(13, 35, 86, 0.68), rgba(7, 21, 50, 0.70));
    border: 1px solid var(--wc-line);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
    color: var(--wc-ice);
}

.theme-worldcup .section-title-card .small,
.theme-worldcup .card .small,
.theme-worldcup .stat .label,
.theme-worldcup .footer {
    color: rgba(226, 236, 255, 0.70);
}

.theme-worldcup .stat .value {
    color: #ffffff;
    text-shadow: 0 2px 14px rgba(36, 93, 232, 0.32);
}

.wc-pred-card {
    background:
        radial-gradient(circle at 8% 0%, rgba(36, 93, 232, 0.20), transparent 24%),
        radial-gradient(circle at 91% 10%, rgba(244, 200, 106, 0.075), transparent 22%),
        linear-gradient(135deg, #081736 0%, #0b1c49 46%, #050b1d 100%);
    border: 1px solid rgba(180, 202, 245, 0.14);
    box-shadow: 0 20px 46px rgba(0, 0, 0, 0.30);
}

.wc-pred-dots {
    opacity: 0.16;
    background-image: radial-gradient(circle, rgba(216, 228, 255, 0.78) 1.15px, transparent 1.15px);
    background-size: 17px 17px;
}

.wc-pred-meta,
.wc-pred-date {
    color: rgba(247, 250, 255, 0.88);
}

.wc-countdown {
    color: #10203f;
    background: linear-gradient(180deg, #ffe7a4, var(--wc-gold));
    border: 1px solid rgba(255, 255, 255, 0.34);
    box-shadow: 0 7px 16px rgba(0, 0, 0, 0.16);
}

.wc-top-status {
    color: #e7fff0;
    background: rgba(16, 107, 58, 0.42);
    border-color: rgba(145, 233, 176, 0.46);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
}

.wc-team-panel {
    background: linear-gradient(180deg, #ffffff 0%, #f3f6fa 54%, #d9e0ea 100%);
    box-shadow: 0 10px 17px rgba(0, 0, 0, 0.24), inset 0 -7px 11px rgba(15, 23, 42, 0.08);
}

.wc-team-panel::after {
    background: linear-gradient(90deg, var(--wc-red-dark), var(--wc-red), var(--wc-red-dark));
}

.wc-team-panel .team-name {
    color: #0b1220;
}

.wc-score-panel {
    background: linear-gradient(180deg, #e44d58 0%, var(--wc-red) 48%, var(--wc-red-dark) 100%);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.40), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.wc-score-input,
.wc-score-static,
.wc-score-dash {
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.wc-inline-stepper button {
    background: rgba(247, 250, 255, 0.10);
    border-color: rgba(247, 250, 255, 0.24);
    color: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.10);
}

.wc-inline-stepper button:hover,
.wc-inline-stepper button:active {
    background: rgba(244, 200, 106, 0.16);
    border-color: rgba(244, 200, 106, 0.44);
}

.wc-helper-pill {
    color: rgba(238, 246, 255, 0.82);
}

.wc-save-btn {
    background: linear-gradient(180deg, var(--wc-blue), var(--wc-blue-dark));
    box-shadow: 0 12px 24px rgba(36, 93, 232, 0.24);
}

.wc-save-btn:hover {
    background: linear-gradient(180deg, #316df1, var(--wc-blue-dark));
}

.theme-worldcup th {
    color: rgba(226, 236, 255, 0.75);
    background: rgba(255, 255, 255, 0.06);
}

.theme-worldcup td,
.theme-worldcup th {
    border-bottom-color: rgba(180, 202, 245, 0.11);
}

.theme-worldcup td {
    color: var(--wc-ice);
}

.theme-worldcup .badge,
.theme-worldcup .badge-open {
    background: rgba(16, 107, 58, 0.36);
    color: #dbffe8;
    border: 1px solid rgba(145, 233, 176, 0.34);
}.theme-worldcup .wc-status-pill.is-closed{
    background: rgba(255,255,255,0.10);
    color: rgba(247, 250, 255, 0.74);
    border-color: rgba(255,255,255,0.16);
}

@media (max-width: 760px) {
    .theme-worldcup .topbar {
        background: rgba(5, 11, 29, 0.46);
    }

    .theme-worldcup .nav a {
        background: rgba(247, 250, 255, 0.07);
    }

    .wc-countdown {
        box-shadow: none;
    }
}

/* v22: black + metallic gray palette with dark yellow / orange accents across the whole site */
:root {
    --bg: #0b0d10;
    --card: #161a20;
    --text: #f4f6f8;
    --muted: #a7b0bd;
    --primary: #d89b1c;
    --primary-dark: #a96410;
    --primary-soft: #2b2416;
    --border: rgba(185, 194, 207, 0.16);
    --success-bg: rgba(39, 130, 79, 0.18);
    --success-text: #8ff0b4;
    --error-bg: rgba(190, 50, 42, 0.18);
    --error-text: #ffb4ad;
    --warning-bg: rgba(214, 149, 23, 0.17);
    --warning-text: #ffd37a;

    --metal-black: #050607;
    --metal-950: #080a0d;
    --metal-900: #0d1015;
    --metal-850: #12171e;
    --metal-800: #1a2029;
    --metal-700: #252d38;
    --metal-600: #3b4654;
    --metal-500: #6f7a88;
    --metal-300: #c3cad4;
    --metal-100: #f4f6f8;
    --amber-700: #a96410;
    --amber-600: #c97f13;
    --amber-500: #d89b1c;
    --orange-600: #d55a17;
    --orange-500: #ef7a22;
    --gold-soft: #ffcf73;
    --steel-line: rgba(211, 220, 233, 0.16);

    --wc-ink: #050607;
    --wc-navy-950: #050607;
    --wc-navy-900: #080a0d;
    --wc-navy-850: #0d1015;
    --wc-navy-800: #151b23;
    --wc-blue: #d89b1c;
    --wc-blue-dark: #a96410;
    --wc-red: #d55a17;
    --wc-red-dark: #8f3510;
    --wc-gold: #ffcf73;
    --wc-ice: #f4f6f8;
    --wc-line: var(--steel-line);
}

body {
    background:
        radial-gradient(circle at 10% 0%, rgba(255, 207, 115, 0.10), transparent 24%),
        radial-gradient(circle at 92% 8%, rgba(180, 190, 205, 0.10), transparent 26%),
        linear-gradient(180deg, #11161d 0%, #080a0d 52%, #050607 100%);
    color: var(--text);
}

body:not(.theme-worldcup) {
    background:
        radial-gradient(circle at 8% 0%, rgba(255, 207, 115, 0.09), transparent 24%),
        radial-gradient(circle at 92% 10%, rgba(180, 190, 205, 0.10), transparent 24%),
        linear-gradient(180deg, #12171e 0%, #0a0d11 58%, #050607 100%);
    color: var(--text);
}

body:not(.theme-worldcup) .topbar,
.theme-worldcup .topbar {
    background: linear-gradient(180deg, rgba(13, 16, 21, 0.94), rgba(8, 10, 13, 0.78));
    border-bottom: 1px solid rgba(211, 220, 233, 0.10);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(10px);
}

body:not(.theme-worldcup) .nav a,
.theme-worldcup .nav a {
    color: rgba(244, 246, 248, 0.80);
    background: linear-gradient(180deg, rgba(255,255,255,0.075), rgba(255,255,255,0.035));
    border: 1px solid rgba(211, 220, 233, 0.11);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

body:not(.theme-worldcup) .nav a.active,
body:not(.theme-worldcup) .nav a:hover,
.theme-worldcup .nav a.active,
.theme-worldcup .nav a:hover {
    color: #11161d;
    background: linear-gradient(180deg, var(--gold-soft), var(--amber-600));
    border-color: rgba(255, 219, 144, 0.62);
    box-shadow: 0 8px 16px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.28);
}

body:not(.theme-worldcup) .card,
body:not(.theme-worldcup) .table-wrap,
body:not(.theme-worldcup) .stat,
body:not(.theme-worldcup) .admin-links a,
.theme-worldcup .section-title-card,
.theme-worldcup .card:not(.wc-pred-card),
.theme-worldcup .stats .stat,
.theme-worldcup .table-wrap {
    background: linear-gradient(180deg, rgba(31, 37, 46, 0.92), rgba(16, 20, 26, 0.92));
    border: 1px solid rgba(211, 220, 233, 0.13);
    color: var(--text);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255,255,255,0.045);
}

body:not(.theme-worldcup) .card .small,
body:not(.theme-worldcup) .stat .label,
.theme-worldcup .section-title-card .small,
.theme-worldcup .card .small,
.theme-worldcup .stat .label,
.footer,
.theme-worldcup .footer {
    color: rgba(210, 218, 229, 0.68);
}

.stat .value,
.theme-worldcup .stat .value,
.admin-links a,
body:not(.theme-worldcup) .admin-links a {
    color: var(--gold-soft);
}

input,
select {
    background: rgba(255,255,255,0.06);
    border-color: rgba(211, 220, 233, 0.14);
    color: var(--text);
}

input::placeholder {
    color: rgba(210, 218, 229, 0.48);
}

select option {
    background: #12171e;
    color: var(--text);
}

input:focus,
select:focus {
    outline: 2px solid rgba(255, 207, 115, 0.18);
    border-color: rgba(255, 207, 115, 0.58);
}

.btn,
.wc-save-btn {
    color: #12100b;
    background: linear-gradient(180deg, var(--gold-soft) 0%, var(--amber-500) 48%, var(--amber-700) 100%);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255,255,255,0.35);
}

.btn:hover,
.wc-save-btn:hover {
    color: #0b0d10;
    background: linear-gradient(180deg, #ffe099 0%, #e5a933 48%, #b86d10 100%);
}

.btn-secondary {
    color: #f6ead2;
    background: linear-gradient(180deg, rgba(94, 104, 118, 0.36), rgba(55, 63, 75, 0.34));
    border: 1px solid rgba(211, 220, 233, 0.12);
}

.btn-secondary:hover {
    color: #fff;
    background: linear-gradient(180deg, rgba(111, 122, 136, 0.48), rgba(59, 70, 84, 0.46));
}

.btn-danger {
    color: #fff;
    background: linear-gradient(180deg, #d45a4e, #9e2e25);
}

.alert-success {
    background: rgba(39, 130, 79, 0.18);
    color: #98f2b9;
    border-color: rgba(128, 232, 170, 0.28);
}

.alert-error {
    background: rgba(190, 50, 42, 0.18);
    color: #ffb4ad;
    border-color: rgba(255, 180, 173, 0.26);
}.alert-warning{
    background: rgba(214, 149, 23, 0.17);
    color: #ffd37a;
    border-color: rgba(255, 207, 115, 0.28);
}

/* Tournament cards: metallic poster style */
body.theme-worldcup {
    background:
        radial-gradient(circle at 8% 0%, rgba(255, 207, 115, 0.11), transparent 25%),
        radial-gradient(circle at 88% 6%, rgba(198, 205, 216, 0.09), transparent 24%),
        linear-gradient(180deg, #11161d 0%, #090c10 50%, #050607 100%);
    color: var(--wc-ice);
}

body.theme-worldcup::before {
    opacity: 0.10;
    background-image: radial-gradient(circle, rgba(230, 235, 244, 0.74) 1.05px, transparent 1.05px);
    background-size: 18px 18px;
    mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,0.58) 48%, transparent 92%);
}

.wc-pred-card,
.worldcup-poster {
    background:
        radial-gradient(circle at 9% 0%, rgba(255, 207, 115, 0.12), transparent 24%),
        radial-gradient(circle at 92% 8%, rgba(198, 205, 216, 0.10), transparent 22%),
        linear-gradient(135deg, #171d25 0%, #0d1118 48%, #050607 100%);
    border: 1px solid rgba(211, 220, 233, 0.14);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255,255,255,0.05);
}

.wc-pred-dots,
.poster-bg-dots {
    opacity: 0.14;
    background-image: radial-gradient(circle, rgba(220, 228, 239, 0.78) 1.05px, transparent 1.05px);
    background-size: 17px 17px;
}

.wc-pred-meta,
.wc-pred-date,
.poster-match-date {
    color: rgba(244, 246, 248, 0.88);
}

.wc-countdown {
    color: #11100b;
    background: linear-gradient(180deg, #ffe4a4, var(--gold-soft) 45%, var(--amber-500));
    border: 1px solid rgba(255, 235, 183, 0.55);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255,255,255,0.35);
}

.wc-top-status,
.badge-open,
.theme-worldcup .badge,
.theme-worldcup .badge-open {
    color: #fff3d5;
    background: linear-gradient(180deg, rgba(213, 90, 23, 0.40), rgba(169, 100, 16, 0.30));
    border-color: rgba(255, 207, 115, 0.38);
}

.wc-team-panel,
.poster-team {
    background: linear-gradient(180deg, #eef1f5 0%, #c9d0db 50%, #7f8998 100%);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255,255,255,0.75), inset 0 -7px 12px rgba(22, 28, 36, 0.18);
}

.wc-team-panel::after,
.poster-team {
    border-bottom-color: var(--orange-600);
}

.wc-team-panel::after {
    background: linear-gradient(90deg, #8f3510, var(--orange-600), #f3a236, var(--orange-600), #8f3510);
}

.wc-team-panel .team-name,
.poster-team-name {
    color: #06080b;
    text-shadow: 0 1px 0 rgba(255,255,255,0.42);
}

.wc-score-panel,
.poster-score-box,
.poster-group-ribbon {
    background: linear-gradient(180deg, #f08a2b 0%, var(--orange-600) 45%, #8f3510 100%);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.44), inset 0 1px 0 rgba(255,255,255,0.24);
}

.wc-score-input,
.wc-score-static,
.wc-score-dash {
    color: #fff9ee;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

.wc-inline-stepper button {
    color: #ffe8b7;
    background: rgba(255, 207, 115, 0.12);
    border-color: rgba(255, 207, 115, 0.26);
}

.wc-inline-stepper button:hover,
.wc-inline-stepper button:active {
    color: #11100b;
    background: linear-gradient(180deg, var(--gold-soft), var(--amber-500));
    border-color: rgba(255, 235, 183, 0.60);
}

.wc-helper-pill,
.wc-pred-card .save-message {
    color: rgba(232, 237, 245, 0.78);
}

.wc-pred-card .save-message.success {
    color: #ffd992;
}

.wc-pred-card .save-message.error {
    color: #ffb4ad;
}

.theme-worldcup th,
th {
    color: rgba(232, 237, 245, 0.72);
    background: rgba(255, 255, 255, 0.055);
}

.theme-worldcup td,
.theme-worldcup th,
td,
th {
    border-bottom-color: rgba(211, 220, 233, 0.10);
}

.theme-worldcup td,
td {
    color: var(--text);
}

.table-wrap table td,
.table-wrap table th {
    color: var(--text);
}

@media (max-width: 760px) {
    body:not(.theme-worldcup) .topbar,
    .theme-worldcup .topbar {
        background: rgba(8, 10, 13, 0.86);
    }

    body:not(.theme-worldcup) .nav a,
    .theme-worldcup .nav a {
        background: rgba(255,255,255,0.055);
    }

    .wc-countdown {
        box-shadow: none;
    }
}

/* v24: balanced metallic palette - black/steel base with controlled warm accents */
:root {
    --bg: #07090c;
    --card: #12161c;
    --text: #f2f4f7;
    --muted: #a7b0bd;
    --primary: #c77b22;
    --primary-dark: #9f5d16;
    --border: rgba(214, 222, 235, 0.13);
    --success-bg: rgba(42, 120, 72, 0.16);
    --success-text: #a9e9bd;
    --error-bg: rgba(185, 56, 48, 0.16);
    --error-text: #ffb9b1;
    --warning-bg: rgba(190, 125, 28, 0.15);
    --warning-text: #f3c878;

    --metal-black: #050607;
    --metal-950: #080a0d;
    --metal-925: #0b0e12;
    --metal-900: #0f1318;
    --metal-850: #151a21;
    --metal-800: #1b222b;
    --metal-760: #232b36;
    --metal-700: #2d3744;
    --metal-600: #4a5564;
    --metal-300: #c6ccd5;
    --metal-100: #f1f4f7;

    --accent-gold: #d6a347;
    --accent-gold-soft: #e5bd6b;
    --accent-amber: #b97824;
    --accent-orange: #c86424;
    --accent-orange-deep: #8e3f18;
    --accent-line: rgba(214, 163, 71, 0.28);
    --accent-line-strong: rgba(216, 141, 45, 0.40);

    --wc-ink: var(--metal-black);
    --wc-navy-950: var(--metal-950);
    --wc-navy-900: var(--metal-900);
    --wc-navy-850: var(--metal-850);
    --wc-navy-800: var(--metal-800);
    --wc-blue: var(--accent-gold);
    --wc-blue-dark: var(--accent-amber);
    --wc-red: var(--accent-orange);
    --wc-red-dark: var(--accent-orange-deep);
    --wc-gold: var(--accent-gold-soft);
    --wc-ice: var(--metal-100);
    --wc-line: rgba(214, 222, 235, 0.14);
}

body,
body:not(.theme-worldcup),
body.theme-worldcup {
    background:
        radial-gradient(circle at 10% -4%, rgba(214, 163, 71, 0.085), transparent 25%),
        radial-gradient(circle at 92% 6%, rgba(198, 207, 220, 0.08), transparent 26%),
        linear-gradient(180deg, #141922 0%, #0a0d11 54%, #050607 100%);
    color: var(--text);
}

body.theme-worldcup::before {
    opacity: 0.085;
    background-image: radial-gradient(circle, rgba(226, 232, 240, 0.74) 1px, transparent 1px);
    background-size: 18px 18px;
    mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,0.58) 48%, transparent 92%);
}

body:not(.theme-worldcup) .topbar,
.theme-worldcup .topbar {
    background: linear-gradient(180deg, rgba(15, 19, 24, 0.96), rgba(8, 10, 13, 0.86));
    border-bottom: 1px solid rgba(214, 222, 235, 0.11);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.36);
    backdrop-filter: blur(10px);
}

body:not(.theme-worldcup) .nav a,
.theme-worldcup .nav a {
    color: rgba(242, 244, 247, 0.82);
    background: linear-gradient(180deg, rgba(255,255,255,0.075), rgba(255,255,255,0.035));
    border: 1px solid rgba(214, 222, 235, 0.12);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.055);
}

body:not(.theme-worldcup) .nav a.active,
body:not(.theme-worldcup) .nav a:hover,
.theme-worldcup .nav a.active,
.theme-worldcup .nav a:hover {
    color: #100f0b;
    background: linear-gradient(180deg, #e2b867 0%, var(--accent-gold) 52%, #a86f20 100%);
    border-color: rgba(226, 184, 103, 0.52);
    box-shadow: 0 8px 18px rgba(0,0,0,0.24), inset 0 1px 0 rgba(255,255,255,0.30);
}

body:not(.theme-worldcup) .card,
body:not(.theme-worldcup) .table-wrap,
body:not(.theme-worldcup) .stat,
body:not(.theme-worldcup) .admin-links a,
.theme-worldcup .section-title-card,
.theme-worldcup .card:not(.wc-pred-card),
.theme-worldcup .stats .stat,
.theme-worldcup .table-wrap {
    background: linear-gradient(180deg, rgba(31, 38, 48, 0.92), rgba(15, 19, 25, 0.94));
    border: 1px solid rgba(214, 222, 235, 0.13);
    color: var(--text);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255,255,255,0.045);
}

body:not(.theme-worldcup) .card,
.theme-worldcup .section-title-card,
.theme-worldcup .card:not(.wc-pred-card) {
    border-top-color: rgba(214, 163, 71, 0.20);
}

body:not(.theme-worldcup) .card .small,
body:not(.theme-worldcup) .stat .label,
.theme-worldcup .section-title-card .small,
.theme-worldcup .card .small,
.theme-worldcup .stat .label,
.footer,
.theme-worldcup .footer {
    color: rgba(210, 218, 229, 0.68);
}

.stat .value,
.theme-worldcup .stat .value,
.admin-links a,
body:not(.theme-worldcup) .admin-links a {
    color: var(--accent-gold-soft);
    text-shadow: 0 2px 12px rgba(214, 163, 71, 0.10);
}

input,
select {
    background: rgba(255,255,255,0.058);
    border-color: rgba(214, 222, 235, 0.145);
    color: var(--text);
}

input::placeholder {
    color: rgba(210, 218, 229, 0.48);
}

select option {
    background: #12171e;
    color: var(--text);
}

input:focus,
select:focus {
    outline: 2px solid rgba(214, 163, 71, 0.18);
    border-color: rgba(214, 163, 71, 0.58);
}

.btn,
.wc-save-btn {
    color: #11100d;
    background: linear-gradient(180deg, #e2b867 0%, #c88d31 50%, #8f5d1c 100%);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.30), inset 0 1px 0 rgba(255,255,255,0.30);
}

.btn:hover,
.wc-save-btn:hover {
    color: #0b0d10;
    background: linear-gradient(180deg, #ebc77f 0%, #d79b3c 50%, #9a651e 100%);
}

.btn-secondary {
    color: #f2dfbd;
    background: linear-gradient(180deg, rgba(98, 108, 124, 0.34), rgba(51, 59, 70, 0.33));
    border: 1px solid rgba(214, 222, 235, 0.13);
    box-shadow: none;
}

.btn-secondary:hover {
    color: #fff;
    background: linear-gradient(180deg, rgba(115, 127, 144, 0.46), rgba(65, 77, 92, 0.44));
}

.btn-danger {
    color: #fff;
    background: linear-gradient(180deg, #c65347, #8f2b24);
}

.alert-success {
    background: rgba(39, 130, 79, 0.16);
    color: #a9e9bd;
    border-color: rgba(128, 232, 170, 0.26);
}

.alert-error {
    background: rgba(185, 56, 48, 0.16);
    color: #ffb9b1;
    border-color: rgba(255, 185, 177, 0.25);
}.alert-warning{
    background: rgba(190, 125, 28, 0.15);
    color: #f3c878;
    border-color: rgba(214, 163, 71, 0.27);
}

/* Match cards */
.wc-pred-card,
.worldcup-poster {
    background:
        radial-gradient(circle at 9% 0%, rgba(214, 163, 71, 0.10), transparent 24%),
        radial-gradient(circle at 92% 8%, rgba(198, 205, 216, 0.085), transparent 22%),
        linear-gradient(135deg, #171d25 0%, #0d1118 50%, #050607 100%);
    border: 1px solid rgba(214, 222, 235, 0.14);
    border-top-color: rgba(214, 163, 71, 0.24);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255,255,255,0.05);
}

.wc-pred-card::before {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    top: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(200, 109, 36, 0.55), rgba(214, 163, 71, 0.78), rgba(200, 109, 36, 0.55), transparent);
    opacity: 0.72;
    pointer-events: none;
}

.wc-pred-dots,
.poster-bg-dots {
    opacity: 0.12;
    background-image: radial-gradient(circle, rgba(220, 228, 239, 0.76) 1px, transparent 1px);
    background-size: 17px 17px;
}

.wc-pred-meta,
.wc-pred-date,
.poster-match-date {
    color: rgba(242, 244, 247, 0.88);
}

.wc-countdown {
    color: #11100d;
    background: linear-gradient(180deg, #e3bd73 0%, #c9963a 52%, #93621e 100%);
    border: 1px solid rgba(226, 184, 103, 0.44);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255,255,255,0.28);
}

.wc-top-status,
.badge-open,
.theme-worldcup .badge,
.theme-worldcup .badge-open {
    color: #fff0d0;
    background: linear-gradient(180deg, rgba(194, 100, 36, 0.32), rgba(142, 73, 26, 0.24));
    border-color: rgba(214, 163, 71, 0.32);
}

.wc-team-panel,
.poster-team {
    background: linear-gradient(180deg, #f0f2f5 0%, #cbd2db 50%, #828c9b 100%);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255,255,255,0.74), inset 0 -7px 12px rgba(22, 28, 36, 0.18);
}

.wc-team-panel::after {
    background: linear-gradient(90deg, #743415, #b35b20, #d6a347, #b35b20, #743415);
}

.poster-team {
    border-bottom-color: var(--accent-orange);
}

.wc-team-panel .team-name,
.poster-team-name {
    color: #06080b;
    text-shadow: 0 1px 0 rgba(255,255,255,0.42);
}

.wc-score-panel,
.poster-score-box,
.poster-group-ribbon {
    background: linear-gradient(180deg, #d1782d 0%, #b65420 45%, #7b3315 100%);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.44), inset 0 1px 0 rgba(255,255,255,0.22);
}

.wc-score-caption {
    color: rgba(255,255,255,0.88);
}

.wc-score-input,
.wc-score-static,
.wc-score-dash {
    color: #fff8eb;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.30);
}

.wc-inline-stepper button {
    color: #f2d49a;
    background: rgba(214, 163, 71, 0.10);
    border-color: rgba(214, 163, 71, 0.24);
}

.wc-inline-stepper button:hover,
.wc-inline-stepper button:active {
    color: #11100d;
    background: linear-gradient(180deg, #e2b867, #c88d31);
    border-color: rgba(226, 184, 103, 0.52);
}

.wc-helper-pill,
.wc-pred-card .save-message {
    color: rgba(232, 237, 245, 0.78);
}

.wc-pred-card .save-message.success {
    color: #e6bd70;
}

.wc-pred-card .save-message.error {
    color: #ffb9b1;
}

.theme-worldcup th,
th {
    color: rgba(232, 237, 245, 0.74);
    background: rgba(214, 163, 71, 0.08);
}

.theme-worldcup td,
.theme-worldcup th,
td,
th {
    border-bottom-color: rgba(214, 222, 235, 0.10);
}

.theme-worldcup td,
td,
.table-wrap table td,
.table-wrap table th {
    color: var(--text);
}

.design-simple-row,
.import-status,
.import-report {
    background: rgba(15, 19, 24, 0.92);
    border-color: rgba(214, 222, 235, 0.13);
}

.import-report {
    background: rgba(39, 130, 79, 0.10);
    border-color: rgba(128, 232, 170, 0.22);
}

@media (max-width: 760px) {
    body:not(.theme-worldcup) .topbar,
    .theme-worldcup .topbar {
        background: rgba(8, 10, 13, 0.88);
    }

    body:not(.theme-worldcup) .nav a,
    .theme-worldcup .nav a {
        background: rgba(255,255,255,0.055);
    }

    .wc-countdown {
        box-shadow: none;
    }
}

/* v25: فقط تعديل الألوان المميزة — أصفر/برتقالي/أخضر أوضح ومريح للنظر */
:root {
    --primary: #e0a12a;
    --primary-dark: #b87318;
    --accent-gold: #e8ad36;
    --accent-gold-soft: #f4c85f;
    --accent-amber: #d58a20;
    --accent-orange: #df6f24;
    --accent-orange-deep: #a74618;
    --accent-line: rgba(232, 173, 54, 0.36);
    --accent-line-strong: rgba(223, 111, 36, 0.48);
    --success-bg: rgba(42, 155, 83, 0.18);
    --success-text: #b9f2c9;
    --warning-bg: rgba(224, 161, 42, 0.17);
    --warning-text: #f6d27a;

    --wc-blue: var(--accent-gold);
    --wc-blue-dark: var(--accent-amber);
    --wc-red: var(--accent-orange);
    --wc-red-dark: var(--accent-orange-deep);
    --wc-gold: var(--accent-gold-soft);
}

body:not(.theme-worldcup) .nav a.active,
body:not(.theme-worldcup) .nav a:hover,
.theme-worldcup .nav a.active,
.theme-worldcup .nav a:hover {
    color: #11100b;
    background: linear-gradient(180deg, #f4c85f 0%, #e0a12a 52%, #b87318 100%);
    border-color: rgba(244, 200, 95, 0.58);
}

.stat .value,
.theme-worldcup .stat .value,
.admin-links a,
body:not(.theme-worldcup) .admin-links a {
    color: #f4c85f;
    text-shadow: 0 2px 12px rgba(232, 173, 54, 0.16);
}

.btn,
.wc-save-btn {
    color: #11100b;
    background: linear-gradient(180deg, #ffd36e 0%, #e8ad36 48%, #b87318 100%);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.30), inset 0 1px 0 rgba(255,255,255,0.33);
}

.btn:hover,
.wc-save-btn:hover {
    color: #080806;
    background: linear-gradient(180deg, #ffe08a 0%, #efba49 48%, #c27b1d 100%);
}.alert-warning{
    background: rgba(224, 161, 42, 0.17);
    color: #f6d27a;
    border-color: rgba(244, 200, 95, 0.32);
}

.wc-countdown {
    color: #11100b;
    background: linear-gradient(180deg, #f4cd70 0%, #e0a12a 52%, #ad6f1a 100%);
    border-color: rgba(244, 200, 95, 0.50);
}

.wc-top-status,
.badge-open,
.theme-worldcup .badge,
.theme-worldcup .badge-open {
    color: #eaffef;
    background: linear-gradient(180deg, rgba(42, 155, 83, 0.36), rgba(26, 112, 64, 0.25));
    border-color: rgba(160, 235, 183, 0.40);
}

.wc-pred-card::before {
    background: linear-gradient(90deg, transparent, rgba(223, 111, 36, 0.58), rgba(232, 173, 54, 0.78), rgba(223, 111, 36, 0.58), transparent);
}

.wc-team-panel::after {
    background: linear-gradient(90deg, #843516, #c95d20, #e8ad36, #c95d20, #843516);
}

.poster-team {
    border-bottom-color: #df6f24;
}

.wc-score-panel,
.poster-score-box,
.poster-group-ribbon {
    background: linear-gradient(180deg, #f08a32 0%, #df6f24 45%, #a74618 100%);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.44), inset 0 1px 0 rgba(255,255,255,0.24);
}

.wc-inline-stepper button {
    color: #f8d98f;
    background: rgba(232, 173, 54, 0.13);
    border-color: rgba(244, 200, 95, 0.28);
}

.wc-inline-stepper button:hover,
.wc-inline-stepper button:active {
    color: #11100b;
    background: linear-gradient(180deg, #f4c85f, #e0a12a);
    border-color: rgba(244, 200, 95, 0.58);
}

.wc-pred-card .save-message.success {
    color: #f4c85f;
}

.alert-success {
    background: rgba(42, 155, 83, 0.18);
    color: #b9f2c9;
    border-color: rgba(160, 235, 183, 0.30);
}

.import-report {
    background: rgba(42, 155, 83, 0.11);
    border-color: rgba(160, 235, 183, 0.24);
}

/* v26: ضبط سطر أزرار التعديل إلى ثلاثة أقسام متساوية */
.wc-live-control-row {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    align-items: center !important;
    column-gap: 0 !important;
    margin: 8px 0 8px !important;
}

.wc-inline-stepper,
.wc-center-status {
    width: 100% !important;
    min-width: 0 !important;
}

.wc-center-status {
    grid-column: 2 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

.wc-helper-pill {
    max-width: calc(100% - 8px) !important;
    padding-inline: 6px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.wc-inline-stepper button {
    flex: 0 0 auto;
}

@media (max-width: 420px) {
    .wc-live-control-row {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .wc-inline-stepper {
        gap: 8px !important;
    }

    .wc-helper-pill {
        font-size: 9.2px !important;
        padding-inline: 4px !important;
    }
}

/* v27: إصلاح حقيقي لسطر التحكم — كان grid-template-areas القديم من v19 يفرض سطرين */
.wc-live-control-row {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-template-areas: "home hint away" !important;
    align-items: center !important;
    justify-items: center !important;
    column-gap: 4px !important;
    row-gap: 0 !important;
    margin: 8px 0 8px !important;
    min-height: 36px !important;
}

.wc-stepper-home {
    grid-area: home !important;
    grid-row: 1 !important;
}

.wc-center-status {
    grid-area: hint !important;
    grid-row: 1 !important;
    width: 100% !important;
    min-height: 34px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

.wc-stepper-away {
    grid-area: away !important;
    grid-row: 1 !important;
}

.wc-inline-stepper {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 34px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    margin: 0 !important;
}

.wc-helper-pill {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    max-width: 100% !important;
    min-height: 22px !important;
    padding: 0 4px !important;
    margin: 0 !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    font-size: clamp(9px, 2.25vw, 11.5px) !important;
    line-height: 1.2 !important;
}

@media (max-width: 420px) {
    .wc-live-control-row {
        column-gap: 2px !important;
        min-height: 34px !important;
    }

    .wc-inline-stepper {
        gap: 7px !important;
    }

    .wc-inline-stepper button {
        width: 29px !important;
        height: 28px !important;
        font-size: 19px !important;
    }

    .wc-helper-pill {
        font-size: clamp(8.2px, 2.2vw, 10px) !important;
        padding-inline: 2px !important;
    }
}

/* v28: تجربة الستايل المسطح Flat — ألوان صلبة، بدون ظلال/تدرجات/زخارف */
:root {
    --bg: #0b0d10;
    --card: #151a20;
    --text: #f4f5f7;
    --muted: #aeb6c2;
    --primary: #f0ae35;
    --primary-dark: #cf8325;
    --border: #2a323d;
    --success-bg: #173f2b;
    --success-text: #b7f0c7;
    --warning-bg: #3d2d12;
    --warning-text: #ffd98a;
    --error-bg: #3b1d1b;
    --error-text: #ffc1b9;

    --flat-bg: #0b0d10;
    --flat-surface: #151a20;
    --flat-surface-2: #1b2129;
    --flat-border: #2a323d;
    --flat-text: #f4f5f7;
    --flat-muted: #aeb6c2;
    --flat-team: #e9edf2;
    --flat-team-text: #111827;
    --flat-orange: #d96d24;
    --flat-orange-dark: #b4551b;
    --flat-yellow: #f0ae35;
    --flat-green: #237a4f;
}

body,
body:not(.theme-worldcup),
body.theme-worldcup {
    background: var(--flat-bg) !important;
    color: var(--flat-text) !important;
}

body.theme-worldcup::before,
.wc-pred-dots,
.poster-bg-dots,
.wc-pred-card::before {
    display: none !important;
}

body:not(.theme-worldcup) .topbar,
.theme-worldcup .topbar {
    background: #0f1318 !important;
    border-bottom: 1px solid var(--flat-border) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

.theme-worldcup .topbar-content,
.topbar-content {
    min-height: 58px !important;
}

body:not(.theme-worldcup) .nav a,
.theme-worldcup .nav a,
.nav a {
    color: var(--flat-muted) !important;
    background: #171d24 !important;
    border: 1px solid var(--flat-border) !important;
    box-shadow: none !important;
}

body:not(.theme-worldcup) .nav a.active,
body:not(.theme-worldcup) .nav a:hover,
.theme-worldcup .nav a.active,
.theme-worldcup .nav a:hover,
.nav a.active,
.nav a:hover {
    color: #15100a !important;
    background: var(--flat-yellow) !important;
    border-color: var(--flat-yellow) !important;
    box-shadow: none !important;
}

.card,
.stat,
.table-wrap,
.admin-links a,
body:not(.theme-worldcup) .card,
body:not(.theme-worldcup) .table-wrap,
body:not(.theme-worldcup) .stat,
body:not(.theme-worldcup) .admin-links a,
.theme-worldcup .section-title-card,
.theme-worldcup .card:not(.wc-pred-card),
.theme-worldcup .stats .stat,
.theme-worldcup .table-wrap {
    background: var(--flat-surface) !important;
    border: 1px solid var(--flat-border) !important;
    color: var(--flat-text) !important;
    box-shadow: none !important;
}

.section-title-card,
.theme-worldcup .section-title-card {
    background: var(--flat-surface-2) !important;
}

.small,
.stat .label,
.footer,
.theme-worldcup .section-title-card .small,
.theme-worldcup .card .small,
.theme-worldcup .stat .label,
.theme-worldcup .footer {
    color: var(--flat-muted) !important;
}

.stat .value,
.theme-worldcup .stat .value,
.admin-links a,
body:not(.theme-worldcup) .admin-links a {
    color: var(--flat-yellow) !important;
    text-shadow: none !important;
}

input,
select {
    background: #11161c !important;
    color: var(--flat-text) !important;
    border: 1px solid var(--flat-border) !important;
    box-shadow: none !important;
}

input:focus,
select:focus {
    outline: 2px solid rgba(240, 174, 53, 0.22) !important;
    border-color: var(--flat-yellow) !important;
}

select option {
    background: #11161c !important;
    color: var(--flat-text) !important;
}

.btn,
.wc-save-btn {
    color: #16120a !important;
    background: var(--flat-yellow) !important;
    border: 0 !important;
    box-shadow: none !important;
}

.btn:hover,
.wc-save-btn:hover {
    color: #120f08 !important;
    background: #ffc24e !important;
    box-shadow: none !important;
}

.btn-secondary {
    color: var(--flat-text) !important;
    background: #242c36 !important;
    border: 1px solid var(--flat-border) !important;
    box-shadow: none !important;
}

.btn-secondary:hover {
    background: #2b3440 !important;
}

.btn-danger {
    color: #fff !important;
    background: #b83a2f !important;
}

.alert-success {
    background: #173f2b !important;
    color: #b7f0c7 !important;
    border-color: #24633f !important;
}

.alert-error {
    background: #3b1d1b !important;
    color: #ffc1b9 !important;
    border-color: #70403a !important;
}.alert-warning{
    background: #3d2d12 !important;
    color: #ffd98a !important;
    border-color: #6a4b17 !important;
}

/* Flat match cards */
.wc-pred-card,
.worldcup-poster {
    background: var(--flat-surface) !important;
    border: 1px solid var(--flat-border) !important;
    border-radius: 18px !important;
    box-shadow: none !important;
    color: var(--flat-text) !important;
}

.wc-pred-card + .wc-pred-card {
    margin-top: 14px !important;
}

.wc-pred-meta,
.wc-pred-date,
.poster-match-date {
    color: var(--flat-muted) !important;
}

.wc-countdown {
    color: #17110a !important;
    background: var(--flat-yellow) !important;
    border: 1px solid var(--flat-yellow) !important;
    box-shadow: none !important;
}

.wc-top-status,
.badge-open,
.theme-worldcup .badge,
.theme-worldcup .badge-open {
    color: #eaffef !important;
    background: var(--flat-green) !important;
    border: 1px solid #2a8b5c !important;
    box-shadow: none !important;
}.theme-worldcup .wc-status-pill.is-closed,
.wc-status-pill.is-closed{
    background: #242c36 !important;
    color: var(--flat-muted) !important;
    border: 1px solid var(--flat-border) !important;
}

.wc-team-panel,
.poster-team {
    background: var(--flat-team) !important;
    box-shadow: none !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
}

.wc-team-home {
    border-radius: 0 12px 12px 0 !important;
}

.wc-team-away {
    border-radius: 12px 0 0 12px !important;
}

.wc-team-panel::after {
    height: 4px !important;
    background: var(--flat-orange) !important;
}

.poster-team {
    border-bottom: 4px solid var(--flat-orange) !important;
}

.wc-team-panel .team-name,
.poster-team-name {
    color: var(--flat-team-text) !important;
    text-shadow: none !important;
}

.wc-team-panel .team-flag-img,
.poster-flag-wrap .team-flag-img,
.team-flag-img {
    box-shadow: none !important;
}

.wc-score-panel,
.poster-score-box,
.poster-group-ribbon {
    background: var(--flat-orange) !important;
    box-shadow: none !important;
}

.wc-score-input,
.wc-score-static,
.wc-score-dash {
    color: #fff !important;
    text-shadow: none !important;
}

.wc-score-input:focus {
    outline: 1px solid rgba(255,255,255,0.65) !important;
    background: rgba(255,255,255,0.12) !important;
}

.wc-inline-stepper button {
    color: var(--flat-yellow) !important;
    background: transparent !important;
    border: 1px solid #6b4c18 !important;
    box-shadow: none !important;
}

.wc-inline-stepper button:hover,
.wc-inline-stepper button:active {
    color: #17110a !important;
    background: var(--flat-yellow) !important;
    border-color: var(--flat-yellow) !important;
    box-shadow: none !important;
}

.wc-helper-pill,
.wc-pred-card .save-message {
    color: var(--flat-muted) !important;
}

.wc-pred-card .save-message.success {
    color: var(--flat-yellow) !important;
}

.wc-pred-card .save-message.error {
    color: #ffc1b9 !important;
}

.table-wrap table th,
.theme-worldcup th,
th {
    background: #1b2129 !important;
    color: var(--flat-muted) !important;
    border-bottom-color: var(--flat-border) !important;
}

.table-wrap table td,
.theme-worldcup td,
td {
    color: var(--flat-text) !important;
    border-bottom-color: var(--flat-border) !important;
}.design-simple-row,
.import-status,
.import-report{
    background: #11161c !important;
    border: 1px solid var(--flat-border) !important;
    box-shadow: none !important;
}

@media (max-width: 760px) {
    .wc-pred-card {
        border-radius: 16px !important;
    }

    .wc-team-home {
        border-radius: 0 10px 10px 0 !important;
    }

    .wc-team-away {
        border-radius: 10px 0 0 10px !important;
    }
}


/* v39: make score controls explicit without changing the prediction logic */
.wc-inline-stepper {
    flex-direction: column;
    gap: 4px;
}

.wc-stepper-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.wc-named-score {
    direction: rtl;
    unicode-bidi: isolate;
}

/* v40: تنبيه خفيف داخل فحص الاستيراد بدون تغيير تصميم الصفحة. */
.text-danger {
    color: #ffb4b4;
    font-weight: 700;
}

.import-preview-report ul {
    margin-top: 8px;
    margin-bottom: 8px;
}

/* v41: فحص النقاط والترتيب داخل الإدارة. */
.audit-stats {
    grid-template-columns: repeat(3, 1fr);
}

.audit-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 28px;
    border-radius: 999px;
    font-weight: 900;
}

.audit-ok {
    background: var(--success-bg);
    color: var(--success-text);
}

.audit-bad {
    background: var(--error-bg);
    color: var(--error-text);
}

.audit-checklist {
    margin: 0;
    padding-right: 22px;
    line-height: 1.9;
}

@media (max-width: 760px) {
    .audit-stats {
        grid-template-columns: 1fr;
    }
}

/* v43: فحص المستخدمين والدخول. */
.audit-warn {
    background: var(--warning-bg);
    color: var(--warning-text);
}


/* v44: audit tables become mobile cards instead of horizontal tables. */
@media (max-width: 760px) {
    .audit-table {
        overflow-x: visible !important;
        border-radius: 16px !important;
    }

    .audit-table table {
        min-width: 0 !important;
        width: 100% !important;
        border-collapse: separate !important;
        border-spacing: 0 !important;
    }

    .audit-table thead {
        display: none !important;
    }

    .audit-table tbody,
    .audit-table tr,
    .audit-table td {
        display: block !important;
        width: 100% !important;
    }

    .audit-table tbody {
        padding: 8px !important;
    }

    .audit-table tr {
        padding: 10px 0 !important;
        border-bottom: 1px solid var(--flat-border) !important;
    }

    .audit-table tr:last-child {
        border-bottom: 0 !important;
    }

    .audit-table td {
        display: flex !important;
        align-items: flex-start !important;
        justify-content: space-between !important;
        gap: 12px !important;
        padding: 8px 10px !important;
        border-bottom: 0 !important;
        text-align: left !important;
        overflow-wrap: anywhere !important;
        word-break: break-word !important;
        line-height: 1.7 !important;
    }

    .audit-table td::before {
        content: attr(data-label);
        flex: 0 0 42%;
        max-width: 42%;
        color: var(--flat-muted) !important;
        font-size: 12px;
        font-weight: 900;
        text-align: right;
    }

    .audit-table td > * {
        min-width: 0;
    }
}

/* v45: admin AJAX feedback and busy states. */
.admin-ajax-toast {
    position: fixed;
    z-index: 9999;
    top: 16px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    width: min(520px, calc(100vw - 28px));
    padding: 13px 16px;
    border-radius: 16px;
    border: 1px solid var(--flat-border);
    background: var(--flat-card);
    color: var(--flat-text);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    text-align: center;
    font-weight: 900;
    line-height: 1.7;
}

.admin-ajax-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.admin-ajax-toast.success {
    border-color: rgba(85, 190, 120, 0.45);
}

.admin-ajax-toast.error {
    border-color: rgba(255, 99, 99, 0.55);
}

form.is-admin-ajax-busy {
    opacity: 0.78;
}

form.is-admin-ajax-busy input,
form.is-admin-ajax-busy select,
form.is-admin-ajax-busy textarea {
    pointer-events: none;
}

/* v46: users admin table mobile cards. */
@media (max-width: 760px) {
    .users-table {
        overflow-x: visible !important;
        border-radius: 16px !important;
    }

    .users-table table {
        min-width: 0 !important;
        width: 100% !important;
        border-collapse: separate !important;
        border-spacing: 0 !important;
    }

    .users-table thead {
        display: none !important;
    }

    .users-table tbody,
    .users-table tr,
    .users-table td {
        display: block !important;
        width: 100% !important;
    }

    .users-table tbody {
        padding: 8px !important;
    }

    .users-table tr {
        padding: 12px 0 !important;
        border-bottom: 1px solid var(--flat-border) !important;
    }

    .users-table tr:last-child {
        border-bottom: 0 !important;
    }

    .users-table td {
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
        padding: 9px 10px !important;
        border-bottom: 0 !important;
        text-align: right !important;
        overflow-wrap: anywhere !important;
        word-break: break-word !important;
        line-height: 1.7 !important;
    }

    .users-table td::before {
        content: attr(data-label);
        color: var(--flat-muted) !important;
        font-size: 12px;
        font-weight: 900;
    }

    .users-inline-form,
    .users-table .actions {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 8px !important;
        width: 100% !important;
    }

    .users-inline-form input,
    .users-inline-form button,
    .users-table .actions input,
    .users-table .actions button {
        width: 100% !important;
    }
}

/* v47: cleaner homepage and match cards for admin accounts. */
.admin-main-note {
    margin-bottom: 14px;
}

.admin-home-panel {
    margin-bottom: 14px;
}

.admin-home-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.admin-home-actions .btn {
    width: 100%;
    text-align: center;
}

.admin-match-actions-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 520px;
}

.wc-admin-card-actions {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.wc-admin-card-actions .btn {
    width: 100%;
    min-height: 38px;
    padding-inline: 10px;
    font-size: 13px;
}

.wc-admin-result-line {
    position: relative;
    z-index: 1;
    margin-top: 8px;
    padding: 9px 10px;
    border-radius: 14px;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.14);
    color: rgba(255,255,255,0.90);
    font-size: 13px;
    font-weight: 800;
}

@media (max-width: 760px) {
    .admin-home-actions,
    .admin-match-actions-top,
    .wc-admin-card-actions {
        grid-template-columns: 1fr;
    }

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

/* v48: participant matches page improvements */
.participant-matches-head {
    display: grid;
    gap: 14px;
}

.participant-matches-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.participant-matches-title-row h1 {
    margin-bottom: 6px;
}

.participant-next-missing {
    flex: 0 0 auto;
    white-space: nowrap;
}

.participant-match-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.participant-match-stat {
    min-width: 0;
    padding: 10px 8px;
    border-radius: 14px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.10);
    text-align: center;
}

.participant-match-stat strong {
    display: block;
    font-size: 22px;
    line-height: 1;
    font-weight: 900;
}

.participant-match-stat span {
    display: block;
    margin-top: 5px;
    color: rgba(255,255,255,0.70);
    font-size: 12px;
    font-weight: 800;
}

.match-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.match-filter-btn {
    min-height: 36px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(255,255,255,0.07);
    color: inherit;
    font: inherit;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.match-filter-btn span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    min-height: 20px;
    margin-inline-start: 5px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(255,255,255,0.13);
    font-size: 11px;
}

.match-filter-btn.is-active {
    background: #D0F0C0;
    color: #132014;
    border-color: #D0F0C0;
}

.match-filter-btn.is-active span {
    background: rgba(19,32,20,0.14);
}

.match-filter-empty {
    margin-top: 14px;
    padding: 18px;
    border-radius: 16px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    text-align: center;
    color: rgba(255,255,255,0.72);
    font-weight: 800;
}

.match-card.is-missing-prediction {
    border-color: rgba(208,240,192,0.45);
}

.match-card.is-saved-prediction {
    border-color: rgba(255,255,255,0.18);
}

@media (max-width: 640px) {
    .participant-matches-title-row {
        display: grid;
        gap: 10px;
    }

    .participant-next-missing {
        width: 100%;
        text-align: center;
    }

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

    .participant-match-stat {
        padding: 9px 6px;
    }

    .participant-match-stat strong {
        font-size: 20px;
    }

    .match-filter-bar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .match-filter-btn {
        width: 100%;
        padding-inline: 8px;
        font-size: 12px;
    }
}

/* v49: compact participant match cards */
.wc-match-points-badge {
    min-width: 54px;
    padding-inline: 10px;
    font-size: 12.5px;
    letter-spacing: 0;
}

.wc-live-control-row .wc-center-status:empty,
.wc-center-status[aria-hidden="true"] {
    min-height: 1px;
}

.wc-live-control-row .wc-inline-stepper {
    min-height: 32px;
}

.wc-live-control-row .wc-stepper-buttons {
    margin: 0;
}

@media (max-width: 760px) {
    .wc-match-points-badge {
        min-width: 42px;
        padding-inline: 6px;
        font-size: 9.6px;
    }

    .wc-live-control-row {
        margin-top: 5px;
    }
}


/* Utility classes used instead of inline styles */
.mt-10 { margin-top: 10px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.full-width { width: 100%; }
.form-row-end { display: flex; align-items: end; }
.pin-inline-input { width: 130px; min-height: 38px; }
.admin-status-select { width: 150px; min-height: 38px; }
.team-flag-input { width: 64px; display: inline-block; margin-left: 6px; }
.team-name-input { width: 180px; display: inline-block; }
@media (max-width: 760px) {
    .form-row-end { align-items: stretch; }
    .pin-inline-input,
    .admin-status-select,
    .team-flag-input,
    .team-name-input { width: 100%; display: block; margin-left: 0; }
}
