body {
    background:
        linear-gradient(180deg, #eef7ff 0, #f6f8fb 260px, #f4f6f9 100%);
    color: #172033;
    min-height: 100vh;
}

.topbar {
    align-items: center;
    background: #07111f;
    box-shadow: 0 12px 30px rgba(7, 17, 31, .18);
    display: flex;
    justify-content: space-between;
    padding: 12px 24px;
    position: sticky;
    top: 0;
    z-index: 30;
}

.brand,
.admin-link {
    color: #fff;
    text-decoration: none;
}

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

.admin-link {
    background: #0b8ee8;
    border-radius: 8px;
    padding: 8px 12px;
}

.brand img {
    background: #fff;
    border-radius: 8px;
    height: 54px;
    object-fit: contain;
    padding: 4px 8px;
    width: 150px;
}

.public-content {
    margin: 0 auto;
    max-width: 1120px;
    padding: 28px 16px 48px;
}

.app-hero {
    align-items: stretch;
    background: #07111f;
    border-radius: 8px;
    color: #fff;
    display: grid;
    gap: 24px;
    grid-template-columns: 1fr 300px;
    margin-bottom: 26px;
    overflow: hidden;
    padding: 28px;
}

.app-hero h1 {
    font-size: 38px;
    font-weight: 900;
    line-height: 1.05;
    margin: 8px 0 12px;
}

.app-hero p {
    color: #c9d7e8;
    font-size: 17px;
    margin: 0;
    max-width: 620px;
}

.hero-kicker {
    color: #38bdf8;
    display: inline-block;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.hero-panel {
    background: #fff;
    border-radius: 8px;
    color: #172033;
    padding: 18px;
}

.hero-panel > span,
.hero-panel small,
.hero-stats small {
    color: #667085;
    display: block;
}

.hero-panel > strong {
    display: block;
    font-size: 44px;
    line-height: 1;
}

.hero-stats {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr 1fr;
    margin-top: 18px;
}

.hero-stats div {
    background: #f2f7fb;
    border-radius: 8px;
    padding: 10px;
}

.section-title {
    align-items: end;
    display: flex;
    justify-content: space-between;
    margin-bottom: 14px;
}

.section-title h2 {
    font-size: 22px;
    font-weight: 900;
    margin: 0;
}

.section-title p {
    color: #667085;
    margin: 2px 0 0;
}

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

.match-card {
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(16, 24, 40, .08);
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 16px;
}

.match-card-top {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    margin-bottom: 18px;
}

.status-pill,
.date-pill {
    border-radius: 999px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    padding: 6px 10px;
}

.status-pill {
    background: #ecfdf3;
    color: #067647;
}

.date-pill {
    background: #eff8ff;
    color: #175cd3;
}

.deadline-pill {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    color: #9a3412;
    font-size: 13px;
    font-weight: 800;
    margin: -6px 0 12px;
    padding: 8px 10px;
}

.match-card-body {
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 14px;
    padding: 14px 10px;
}

.match-card-metrics {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(3, 1fr);
    margin-top: auto;
}

.match-card-metrics div {
    border: 1px solid #edf0f4;
    border-radius: 8px;
    padding: 9px;
}

.match-card-metrics span {
    color: #667085;
    display: block;
    font-size: 12px;
}

.match-card-metrics strong {
    display: block;
    font-size: 14px;
}

.match-actions {
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr 1fr;
    margin-top: 14px;
}

.empty-state {
    background: #fff;
    border: 1px dashed #98a2b3;
    border-radius: 8px;
    color: #667085;
    grid-column: 1 / -1;
    padding: 28px;
    text-align: center;
}

.sidebar {
    background: #1f2937;
    bottom: 0;
    left: 0;
    overflow-y: auto;
    padding: 24px 18px;
    position: fixed;
    top: 0;
    width: 240px;
    z-index: 80;
}

.admin-mobilebar,
.sidebar-backdrop,
.sidebar-close {
    display: none;
}

.sidebar-head {
    margin-bottom: 18px;
}

.sidebar-logo {
    background: #fff !important;
    display: block;
    padding: 8px !important;
}

.sidebar-logo img {
    display: block;
    height: auto;
    width: 100%;
}

.sidebar-links {
    display: grid;
    gap: 8px;
}

.sidebar-links a,
.sidebar-logout {
    background: #374151;
    border-radius: 8px;
    color: #fff;
    display: flex;
    font-weight: 700;
    justify-content: space-between;
    padding: 12px;
    text-decoration: none;
}

.sidebar-links a:hover,
.sidebar-links a.active,
.sidebar-logout:hover {
    background: #4b5563;
}

.sidebar-links a.active {
    box-shadow: inset 4px 0 0 #38bdf8;
}

.sidebar-logout {
    margin-top: 12px;
}

.content {
    margin-left: 260px;
    padding: 28px;
}

.card-box {
    border: 0;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(16, 24, 40, .07);
}

.bet-card {
    overflow: hidden;
}

.live-header {
    align-items: center;
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(16, 24, 40, .08);
    display: flex;
    gap: 18px;
    justify-content: space-between;
    padding: 20px;
}

.metric {
    background: #fff;
    border-radius: 8px;
    padding: 18px;
}

.metric span {
    color: #667085;
    display: block;
    font-size: 14px;
}

.metric strong {
    display: block;
    font-size: 28px;
}

.score-input {
    max-width: 90px;
    text-align: center;
}

.placar {
    align-items: center;
    display: flex;
    gap: 12px;
}

.placar-numero {
    background: #111827;
    border-radius: 8px;
    color: #fff;
    font-size: 30px;
    font-weight: 800;
    min-width: 56px;
    padding: 8px 12px;
    text-align: center;
}

.ranking-score {
    background: #ecfdf3;
    border-radius: 999px;
    color: #067647;
    display: inline-block;
    font-weight: 800;
    min-width: 54px;
    padding: 5px 10px;
    text-align: center;
}

.pix-box {
    background: #f8fafc;
    border: 1px dashed #98a2b3;
    border-radius: 8px;
    padding: 14px;
    word-break: break-word;
}

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

.team-side {
    align-items: center;
    display: flex;
    gap: 10px;
    min-width: 0;
}

.team-side.away {
    flex-direction: row-reverse;
    text-align: right;
}

.team-code {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
    max-width: 56px;
    overflow: hidden;
    text-transform: uppercase;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.team-flag {
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    display: inline-block;
    flex: 0 0 42px;
    height: 42px;
    object-fit: contain;
    padding: 4px;
    width: 42px;
}

.team-flag.placeholder {
    align-items: center;
    color: #667085;
    display: flex;
    font-weight: 800;
    justify-content: center;
}

.team-name {
    font-weight: 800;
    overflow-wrap: anywhere;
}

.versus {
    color: #667085;
    font-weight: 800;
}

#fireworksCanvas {
    inset: 0;
    pointer-events: none;
    position: fixed;
    z-index: 1056;
}

.swal-fallback-overlay {
    align-items: center;
    background: rgba(7, 17, 31, .55);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 18px;
    position: fixed;
    z-index: 2000;
}

.swal-fallback-box {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 24px 80px rgba(7, 17, 31, .28);
    max-width: 430px;
    padding: 26px;
    text-align: center;
    width: 100%;
}

.swal-fallback-box h2 {
    font-size: 24px;
    font-weight: 900;
    margin: 10px 0;
}

.swal-fallback-box p {
    color: #667085;
    margin-bottom: 20px;
}

.swal-fallback-icon {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 30px;
    font-weight: 900;
    height: 62px;
    justify-content: center;
    width: 62px;
}

.swal-fallback-icon.success {
    background: #dcfae6;
    color: #067647;
}

.swal-fallback-icon.warning,
.swal-fallback-icon.info {
    background: #fffaeb;
    color: #b54708;
}

.swal-fallback-icon.error {
    background: #fee4e2;
    color: #b42318;
}

.swal-fallback-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.news-list {
    display: grid;
    gap: 8px;
}

.news-item {
    background: transparent;
    border-bottom: 1px solid #e4e7ec;
    border-radius: 8px;
    color: #172033;
    display: block;
    padding: 9px 0;
    text-decoration: none;
}

.news-item:hover {
    color: #0b5cad;
}

.news-item strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.news-item span {
    color: #667085;
    font-size: 12px;
}

.news-panel {
    background: rgba(255, 255, 255, .7);
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    padding: 14px;
}

.news-list.compact .news-item:last-child {
    border-bottom: 0;
}

.upload-dropzone {
    align-items: center;
    background: #f8fafc;
    border: 2px dashed #98a2b3;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
    min-height: 150px;
    padding: 14px;
    text-align: center;
    transition: .2s;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
    background: #eff8ff;
    border-color: #0b8ee8;
}

.upload-dropzone input {
    display: none;
}

.upload-dropzone strong {
    font-size: 14px;
}

.upload-dropzone small {
    color: #667085;
}

.upload-preview .team-flag {
    flex-basis: 58px;
    height: 58px;
    width: 58px;
}

.log-json {
    background: #0f172a;
    border-radius: 8px;
    color: #e5e7eb;
    font-size: 12px;
    max-height: 220px;
    overflow: auto;
    padding: 10px;
    white-space: pre-wrap;
    word-break: break-word;
}

.wa-connected {
    background: #ecfdf3;
    border: 1px solid #abefc6;
    border-radius: 8px;
    color: #067647;
    display: grid;
    gap: 6px;
    padding: 18px;
}

.wa-connected strong {
    font-size: 26px;
    font-weight: 900;
}

.wa-connected span,
.wa-connected small {
    color: #085d3a;
}

@media (max-width: 768px) {
    body.admin-menu-open {
        overflow: hidden;
    }

    .admin-mobilebar {
        align-items: center;
        background: #07111f;
        box-shadow: 0 10px 24px rgba(7, 17, 31, .18);
        display: flex;
        justify-content: space-between;
        min-height: 70px;
        padding: 10px 14px;
        position: sticky;
        top: 0;
        z-index: 70;
    }

    .admin-mobilebrand {
        background: #fff;
        border-radius: 8px;
        display: inline-flex;
        padding: 4px 8px;
    }

    .admin-mobilebrand img {
        height: 42px;
        object-fit: contain;
        width: 116px;
    }

    .admin-menu-toggle {
        align-items: center;
        background: #0b8ee8;
        border: 0;
        border-radius: 8px;
        color: #fff;
        display: inline-grid;
        gap: 4px;
        grid-template-columns: 20px auto;
        min-height: 44px;
        padding: 8px 12px;
    }

    .admin-menu-toggle span {
        background: #fff;
        border-radius: 999px;
        display: block;
        height: 2px;
        width: 20px;
    }

    .admin-menu-toggle strong {
        font-size: 14px;
        grid-row: 1 / 4;
        grid-column: 2;
    }

    .sidebar-backdrop {
        background: rgba(7, 17, 31, .56);
        display: block;
        inset: 0;
        opacity: 0;
        pointer-events: none;
        position: fixed;
        transition: .18s ease;
        z-index: 78;
    }

    body.admin-menu-open .sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .sidebar {
        background: #111827;
        border-radius: 0;
        bottom: 0;
        box-shadow: 18px 0 50px rgba(7, 17, 31, .28);
        display: flex;
        flex-direction: column;
        left: 0;
        max-width: 420px;
        padding: 16px;
        position: fixed;
        top: 0;
        transform: translateX(-104%);
        transition: transform .22s ease;
        width: min(92vw, 420px);
        z-index: 90;
    }

    body.admin-menu-open .sidebar {
        transform: translateX(0);
    }

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

    .sidebar-logo {
        margin: 0 !important;
        max-width: 170px;
    }

    .sidebar-close {
        background: #fff;
        border: 0;
        border-radius: 8px;
        color: #111827;
        display: inline-flex;
        font-weight: 800;
        padding: 10px 12px;
    }

    .sidebar-links {
        display: grid;
        gap: 10px;
        grid-template-columns: 1fr;
        overflow-y: auto;
        padding-bottom: 12px;
    }

    .sidebar-links a,
    .sidebar-logout {
        align-items: center;
        background: #1f2937;
        border: 1px solid rgba(255, 255, 255, .08);
        font-size: 16px;
        min-height: 54px;
        padding: 14px 16px;
    }

    .sidebar-links a::after {
        color: #93c5fd;
        content: ">";
        font-weight: 900;
    }

    .sidebar-links a.active {
        background: #0b8ee8;
        box-shadow: none;
    }

    .sidebar-logout {
        background: #7f1d1d;
        margin-top: auto;
    }

    .content {
        margin-left: 0;
        padding: 18px 12px 34px;
    }

    .content h1 {
        font-size: 28px;
    }

    .card-box .card-body {
        padding: 16px;
    }

    .topbar {
        padding: 14px 16px;
    }

    .brand img {
        height: 44px;
        width: 120px;
    }

    .public-content {
        padding: 18px 12px 36px;
    }

    .app-hero {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .app-hero h1 {
        font-size: 30px;
    }

    .hero-panel > strong {
        font-size: 36px;
    }

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

    .match-card {
        padding: 14px;
    }

    .match-card-top,
    .live-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .match-card-metrics {
        grid-template-columns: 1fr;
    }

    .match-actions {
        grid-template-columns: 1fr;
    }

    .match-teams {
        gap: 8px;
    }

    .team-flag {
        height: 34px;
        width: 34px;
    }

    .team-name {
        font-size: 14px;
    }

    .placar-numero {
        font-size: 24px;
        min-width: 46px;
    }

    .table-responsive {
        border-radius: 8px;
    }

    .table {
        min-width: 760px;
    }
}

@media (max-width: 420px) {
    .content {
        padding-left: 10px;
        padding-right: 10px;
    }

    .sidebar {
        width: 100vw;
    }

    .admin-mobilebar {
        min-height: 64px;
    }

    .admin-mobilebrand img {
        height: 38px;
        width: 108px;
    }
}
