/* ====== SP 2026 Prognoze | v1.1.4 ====== */

:root {
    --hr-red: #c8102e;
    --hr-red-dark: #a10d25;
    --hr-blue: #0b1f4e;
}

/* ---- Global ---- */
body {
    overflow-x: hidden;
}
.container-app {
    max-width: 960px;
}

/* ---- Navbar ---- */
.croatia-navbar {
    background: linear-gradient(90deg, var(--hr-red) 0%, var(--hr-red-dark) 100%);
}
@media (max-width: 575.98px) {
    .navbar-brand {
        font-size: 1rem;
    }
    .navbar .text-white-50 {
        display: none;
    }
}

/* ---- Auth ---- */
.auth-page {
    height: 100svh;
    height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    margin: 0;
    background: linear-gradient(135deg, var(--hr-red) 0%, var(--hr-blue) 100%);
}

/* ---- Admin ---- */
.admin-sidebar .list-group-item.active,
.admin-offcanvas .list-group-item.active {
    background: var(--hr-red);
    border-color: var(--hr-red);
}
.admin-sidebar .list-group-item i,
.admin-offcanvas .list-group-item i {
    width: 1.4rem;
}
.admin-offcanvas {
    max-width: 280px;
}
@media (max-width: 991.98px) {
    main.col-lg-10 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    .admin-page-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: .75rem;
    }
    .admin-actions {
        width: 100%;
        display: flex;
        flex-direction: column;
    }
    .admin-actions .btn,
    .admin-actions form {
        width: 100%;
    }
    .admin-actions .btn {
        justify-content: center;
    }
    .table .btn-group {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
}

/* ---- Match cards ---- */
.match-card {
    border: none;
    border-left: 4px solid #dee2e6;
}
.match-card.status-open      { border-left-color: #198754; }
.match-card.status-locked    { border-left-color: #6c757d; }
.match-card.status-live      { border-left-color: #fd7e14; }
.match-card.status-finished  { border-left-color: var(--hr-blue); }

.page-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}
.stat-badge {
    min-width: 120px;
}
.stat-rank.rank-default {
    background: #212529;
    color: #fff;
}
.stat-rank.rank-default .stat-rank-label {
    color: rgba(255, 255, 255, .5);
}
.stat-rank.rank-gold {
    background: linear-gradient(135deg, #f1c40f 0%, #d4ac0d 100%);
    color: #1a1a1a;
}
.stat-rank.rank-gold .stat-rank-label {
    color: rgba(0, 0, 0, .55);
}
.stat-rank.rank-silver {
    background: linear-gradient(135deg, #e8e8e8 0%, #95a5a6 100%);
    color: #1a1a1a;
}
.stat-rank.rank-silver .stat-rank-label {
    color: rgba(0, 0, 0, .55);
}
.stat-rank.rank-bronze {
    background: linear-gradient(135deg, #e8a862 0%, #cd7f32 100%);
    color: #1a1a1a;
}
.stat-rank.rank-bronze .stat-rank-label {
    color: rgba(0, 0, 0, .55);
}

.phase-heading {
    color: var(--hr-blue);
    font-weight: 700;
    padding-bottom: .35rem;
    border-bottom: 2px solid rgba(200, 16, 46, .25);
}
.match-phase:last-child {
    margin-bottom: 0 !important;
}
.match-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem .75rem;
}
.match-date {
    line-height: 1.4;
}
.match-date-inline {
    white-space: nowrap;
}
.match-countdown {
    white-space: nowrap;
}

.match-teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: .5rem .75rem;
    align-items: center;
}
.team-block {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: .45rem;
    min-width: 0;
}
.team-home {
    justify-content: flex-end;
}
.team-away {
    justify-content: flex-start;
}
.team-flag {
    display: block;
    width: 24px;
    height: 18px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .08);
    flex-shrink: 0;
}
.team-name {
    font-weight: 600;
    font-size: .95rem;
    word-break: break-word;
    line-height: 1.25;
}
.team-home .team-name {
    text-align: right;
}
.team-away .team-name {
    text-align: left;
}
.match-score {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 .35rem;
    min-width: 2.75rem;
    text-align: center;
}
.match-score .text-muted {
    font-weight: 700;
    font-size: .85rem;
    letter-spacing: .04em;
}
.score-display {
    font-size: 1.35rem;
    font-weight: 700;
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .page-header {
        flex-direction: column;
    }
    .page-stats {
        width: 100%;
    }
    .stat-badge {
        flex: 1 1 calc(50% - .5rem);
        min-width: 0;
    }
    .pred-field .form-select-lg {
        font-size: 1rem;
        padding: .5rem .75rem;
    }
    .score-input-row .form-control-lg {
        height: 3.5rem;
        font-size: 1.35rem;
    }
    .team-name {
        font-size: .85rem;
    }
    .score-display {
        font-size: 1.15rem;
    }
}

/* ---- Prediction form ---- */
.prediction-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.pred-field {
    margin-bottom: .75rem;
}
.pred-field .form-select {
    width: 100%;
}
.pred-outcome {
    margin-bottom: 20px;
}
.pred-score {
    text-align: center;
}
.pred-score .form-label {
    text-align: center;
}
.score-input-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}
.score-input-row .form-control {
    flex: 1 1 0;
    width: 100%;
    min-width: 0;
    max-width: none;
    height: 3.75rem;
    font-size: 1.5rem;
    font-weight: 600;
    padding: .5rem;
}
.score-sep {
    font-size: 1.5rem;
    font-weight: 700;
    color: #6c757d;
    line-height: 1;
    flex: 0 0 auto;
}
.pred-submit {
    margin-top: 0;
    margin-bottom: 0;
}

/* ---- Buttons & misc ---- */
.btn-hr {
    background: var(--hr-red);
    border-color: var(--hr-red);
    color: #fff;
}
.btn-hr:hover {
    background: var(--hr-red-dark);
    border-color: var(--hr-red-dark);
    color: #fff;
}

.rank-1 { background: linear-gradient(90deg, #fff8e1, #fff); }
.rank-2 { background: linear-gradient(90deg, #f3f4f6, #fff); }
.rank-3 { background: linear-gradient(90deg, #fbe9e7, #fff); }
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    font-weight: 700;
    color: #fff;
    background: #adb5bd;
}
.rank-badge.gold   { background: #f1c40f; }
.rank-badge.silver { background: #95a5a6; }
.rank-badge.bronze { background: #cd7f32; }

.live-dot {
    display: inline-block;
    width: .55rem;
    height: .55rem;
    background: #fd7e14;
    border-radius: 50%;
    animation: pulse 1s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .3; }
}

/* ---- Tables on mobile ---- */
.table-responsive {
    -webkit-overflow-scrolling: touch;
}

/* ---- Admin result form ---- */
.result-form-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: .5rem;
    align-items: end;
}
@media (max-width: 575.98px) {
    .result-form-grid {
        grid-template-columns: 1fr 1fr;
    }
    .result-form-grid .result-sep {
        display: none;
    }
}
