/* auth.css v5 */
.auth-area {
    display: flex;
    align-items: center;
    gap: 8px;
}

    .auth-area .user-badge {
        background: rgba(201,168,76,.15);
        color: #c9a84c;
        padding: 5px 12px;
        border-radius: 20px;
        font-size: 13px;
        font-weight: 600;
        display: none;
    }

        .auth-area .user-badge.active {
            display: inline-flex;
            align-items: center;
            gap: 4px;
        }

    .auth-area .btn-auth {
        background: transparent;
        border: 1px solid #c9a84c;
        color: #c9a84c;
        padding: 5px 14px;
        border-radius: 20px;
        cursor: pointer;
        font-size: 12px;
        font-weight: 600;
        transition: all .3s;
    }

        .auth-area .btn-auth:hover {
            background: #c9a84c;
            color: #1a1a2e;
        }

        .auth-area .btn-auth.logout {
            border-color: #ff6b6b;
            color: #ff6b6b;
            display: none;
        }

            .auth-area .btn-auth.logout:hover {
                background: #ff6b6b;
                color: #fff;
            }

        .auth-area .btn-auth.mypolla {
            border-color: #4ecdc4;
            color: #4ecdc4;
            display: none;
        }

            .auth-area .btn-auth.mypolla:hover {
                background: #4ecdc4;
                color: #1a1a2e;
            }

.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.82);
    z-index: 1500;
    justify-content: center;
    align-items: flex-start;
    padding: 30px 10px;
    overflow-y: auto;
}

.overlay-box {
    background: var(--card-bg,#1e1e3a);
    border: 1px solid #333;
    border-radius: 16px;
    padding: 24px;
    width: 700px;
    max-width: 95vw;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
}

    .overlay-box.overlay-lg {
        width: 850px;
    }

    .overlay-box.overlay-xl {
        width: 960px;
    }

.overlay-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
}

    .overlay-close:hover {
        color: #fff;
    }

.ranking-table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
    font-size: 14px;
}

    .ranking-table th {
        background: rgba(201,168,76,.12);
        color: #c9a84c;
        padding: 10px 8px;
        font-size: 12px;
        text-transform: uppercase;
        text-align: center;
    }

    .ranking-table td {
        padding: 8px;
        text-align: center;
        border-bottom: 1px solid rgba(255,255,255,.06);
        color: var(--text,#e0e0e0);
    }

    .ranking-table tr.top1 td {
        background: rgba(255,215,0,.08);
    }

    .ranking-table tr.top2 td {
        background: rgba(192,192,192,.06);
    }

    .ranking-table tr.top3 td {
        background: rgba(205,127,50,.06);
    }

.login-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

    .login-overlay.active {
        display: flex;
    }

.login-box {
    background: #1e1e3a;
    border: 1px solid #c9a84c;
    border-radius: 16px;
    padding: 28px;
    width: 370px;
    max-width: 90vw;
    text-align: center;
    position: relative;
}

    .login-box h2 {
        color: #c9a84c;
        margin: 0 0 6px;
        font-size: 20px;
    }

    .login-box .subtitle {
        color: #aaa;
        margin: 0 0 20px;
        font-size: 13px;
    }

    .login-box .close-btn {
        position: absolute;
        top: 10px;
        right: 14px;
        background: none;
        border: none;
        color: #888;
        font-size: 22px;
        cursor: pointer;
    }

        .login-box .close-btn:hover {
            color: #fff;
        }

    .login-box .form-group {
        margin-bottom: 14px;
        text-align: left;
    }

    .login-box label {
        display: block;
        color: #ccc;
        font-size: 12px;
        margin-bottom: 4px;
        font-weight: 600;
    }

    .login-box input {
        width: 100%;
        padding: 9px 12px;
        border: 1px solid #444;
        border-radius: 8px;
        background: #12122a;
        color: #fff;
        font-size: 14px;
        box-sizing: border-box;
    }

        .login-box input:focus {
            border-color: #c9a84c;
            outline: none;
        }

    .login-box .btn-submit {
        width: 100%;
        padding: 11px;
        background: linear-gradient(135deg,#c9a84c,#b8963c);
        color: #1a1a2e;
        border: none;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 700;
        cursor: pointer;
        margin-top: 6px;
    }

        .login-box .btn-submit:hover {
            opacity: .85;
        }

        .login-box .btn-submit:disabled {
            opacity: .5;
            cursor: not-allowed;
        }

    .login-box .login-msg {
        margin-top: 10px;
        font-size: 13px;
        min-height: 18px;
    }

        .login-box .login-msg.error {
            color: #ff6b6b;
        }

        .login-box .login-msg.success {
            color: #4ecdc4;
        }

    .login-box .step {
        display: none;
    }

        .login-box .step.active {
            display: block;
        }

    .login-box .back-link {
        color: #888;
        font-size: 12px;
        cursor: pointer;
        margin-top: 10px;
        display: inline-block;
    }

        .login-box .back-link:hover {
            color: #c9a84c;
        }

.mypolla-header {
    text-align: center;
    margin-bottom: 16px;
}

    .mypolla-header h2 {
        color: #c9a84c;
        margin: 0 0 6px;
        font-size: 20px;
    }

    .mypolla-header p {
        color: #aaa;
        font-size: 13px;
        margin: 0;
    }

.mypolla-day {
    margin-bottom: 16px;
}

.mypolla-day-label {
    color: #c9a84c;
    font-weight: 700;
    font-size: 14px;
    padding: 8px 0 6px;
    border-bottom: 1px solid rgba(201,168,76,.25);
    margin-bottom: 8px;
}

.mypolla-row {
    display: grid;
    grid-template-columns: 70px 1fr 120px 1fr 90px;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: background .2s;
}

    .mypolla-row:hover {
        background: rgba(255,255,255,.03);
    }

    .mypolla-row.locked {
        opacity: .5;
    }

.mp-group {
    font-size: 11px;
    color: #888;
    text-align: center;
}

.mp-team {
    font-size: 13px;
    color: var(--text,#e0e0e0);
    display: flex;
    align-items: center;
    gap: 6px;
}

.mp-home {
    justify-content: flex-end;
    text-align: right;
}

.mp-away {
    justify-content: flex-start;
}

.mp-name {
    font-weight: 600;
}

.mp-inputs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.mp-input {
    width: 44px;
    padding: 6px;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    border: 1px solid #444;
    border-radius: 6px;
    background: #12122a;
    color: #fff;
}

    .mp-input:focus {
        border-color: #c9a84c;
        outline: none;
    }

    .mp-input:disabled {
        background: #0a0a1a;
        color: #555;
        cursor: not-allowed;
    }

.mp-vs {
    color: #888;
    font-weight: 600;
    font-size: 14px;
}

.mp-status {
    text-align: center;
}

.mp-badge {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 600;
}

    .mp-badge.scheduled {
        background: rgba(201,168,76,.15);
        color: #c9a84c;
    }

    .mp-badge.live {
        background: rgba(231,76,60,.2);
        color: #ff6b6b;
        animation: pulse 1s infinite;
    }

    .mp-badge.finished {
        background: rgba(78,205,196,.12);
        color: #4ecdc4;
    }

@keyframes pulse {
    0%,100% {
        opacity: 1;
    }

    50% {
        opacity: .5;
    }
}

.mypolla-footer {
    text-align: center;
    padding: 16px 0 0;
}

.btn-save-all {
    padding: 12px 32px;
    background: linear-gradient(135deg,#4ecdc4,#44b3ab);
    color: #1a1a2e;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .3s;
}

    .btn-save-all:hover {
        opacity: .85;
    }

    .btn-save-all:disabled {
        opacity: .5;
        cursor: not-allowed;
    }

.save-all-msg {
    margin-top: 10px;
    font-size: 14px;
    min-height: 20px;
}

    .save-all-msg.error {
        color: #ff6b6b;
    }

    .save-all-msg.success {
        color: #4ecdc4;
    }

.ranking-pill {
    background: rgba(201,168,76,.15) !important;
    color: #c9a84c !important;
    font-weight: 700;
}

    .ranking-pill:hover {
        background: #c9a84c !important;
        color: #1a1a2e !important;
    }

@media(max-width:700px) {
    .mypolla-row {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 4px;
        padding: 10px 6px;
    }

    .mp-home, .mp-away {
        justify-content: center;
    }

    .mp-group {
        font-size: 12px;
    }

    .overlay-box {
        padding: 16px;
    }

    .auth-area {
        gap: 4px;
    }

        .auth-area .btn-auth {
            padding: 4px 10px;
            font-size: 11px;
        }
}

[data-theme="light"] .login-box {
    background: #fff;
    border-color: #b8963c;
}

    [data-theme="light"] .login-box input {
        background: #f5f5f5;
        color: #333;
        border-color: #ccc;
    }

[data-theme="light"] .overlay-box {
    background: #fff;
    border-color: #ddd;
}

[data-theme="light"] .ranking-table td {
    color: #333;
}

[data-theme="light"] .mp-name {
    color: #333;
}

[data-theme="light"] .mp-input {
    background: #f5f5f5;
    color: #333;
    border-color: #ccc;
}

    [data-theme="light"] .mp-input:disabled {
        background: #e8e8e8;
        color: #999;
    }
