﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.login-page {
    margin: 0;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at 20% 20%, #3E2723, #1a0f0a 70%);
    position: relative;
    padding: 20px;
}
body.login-page::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: repeating-linear-gradient(45deg, rgba(210, 180, 140, 0.02) 0px, rgba(210, 180, 140, 0.02) 2px, transparent 2px, transparent 8px);
    z-index: -1;
}

#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 15, 10, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

    #page-loader.fade {
        opacity: 0;
        visibility: hidden;
    }

    #page-loader .spinner {
        width: 50px;
        height: 50px;
        border: 3px solid rgba(210, 180, 140, 0.15);
        border-top: 3px solid #b87c4f;
        border-right: 3px solid #6d4c41;
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#page-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

    #page-container.fade {
        animation: fadeInUp 0.6s ease forwards;
    }

.login-content {
    width: 100%;
}

.login-form {
    width: 100%;
    padding: 40px 35px;
    border-radius: 28px;
    background: rgba(30, 20, 15, 0.65);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(210, 180, 140, 0.25);
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 245, 215, 0.08);
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
    width: 100%;
}

.logo-img {
    max-width: 280px;
    width: 100%;
    height: auto;
    margin-bottom: 15px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.alert {
    width: 100%;
    margin-bottom: 20px;
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(140, 70, 40, 0.3);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(210, 150, 100, 0.5);
    color: #fce2c1;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    position: relative;
    box-sizing: border-box;
}

.alert-danger {
    background: rgba(140, 70, 40, 0.3);
}

.close-btn {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fce2c1;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

    .close-btn:hover {
        opacity: 1;
    }

.form-control {
    width: 100%;
    background: rgba(45, 30, 22, 0.75);
    border: 1px solid rgba(210, 180, 140, 0.3);
    color: #f5e6d3;
    border-radius: 60px;
    padding: 14px 20px;
    font-size: 1rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

    .form-control:focus {
        border-color: #c28a5c;
        box-shadow: 0 0 0 3px rgba(194, 138, 92, 0.35);
        background: rgba(55, 38, 28, 0.9);
        outline: none;
    }

    .form-control::placeholder {
        color: rgba(210, 180, 140, 0.55);
        font-weight: 300;
    }

.custom-checkbox {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin: 20px 0 25px;
    width: 100%;
}

.checkbox-wrapper {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

    .checkbox-wrapper input[type="checkbox"] {
        display: none;
    }

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(210, 180, 140, 0.6);
    border-radius: 6px;
    margin-right: 10px;
    position: relative;
    transition: all 0.2s ease;
    background: rgba(45, 30, 22, 0.7);
    backdrop-filter: blur(4px);
}

    .checkbox-custom::after {
        content: '\f00c';
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        font-size: 10px;
        color: #f0dbb4;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0);
        transition: transform 0.15s ease;
    }

.checkbox-wrapper input[type="checkbox"]:checked ~ .checkbox-custom {
    background: linear-gradient(135deg, #6d4c41, #b87c4f);
    border-color: #d4a373;
}

    .checkbox-wrapper input[type="checkbox"]:checked ~ .checkbox-custom::after {
        transform: translate(-50%, -50%) scale(1);
    }

.checkbox-wrapper:hover .checkbox-custom {
    border-color: #d4a373;
    box-shadow: 0 0 8px rgba(212, 163, 115, 0.4);
}

.checkbox-label {
    color: rgba(245, 230, 211, 0.9);
    font-size: 0.9rem;
    font-weight: 400;
}

.login-buttons {
    width: 100%;
}

.btn-login {
    width: 100%;
    background: linear-gradient(135deg, rgba(86, 55, 39, 0.95), rgba(148, 97, 62, 0.95));
    border: 1px solid rgba(212, 163, 115, 0.6);
    color: #fef3e2;
    font-weight: 600;
    border-radius: 60px;
    padding: 14px 20px;
    font-size: 1rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
    text-transform: uppercase;
    cursor: pointer;
    backdrop-filter: blur(5px);
}

    .btn-login:hover {
        background: linear-gradient(135deg, rgba(108, 70, 50, 0.95), rgba(168, 110, 70, 0.95));
        border-color: #e0b081;
        color: #fffaf0;
        box-shadow: 0 8px 22px rgba(148, 97, 62, 0.5);
        transform: translateY(-2px);
    }

    .btn-login:active {
        transform: translateY(0);
    }

    .btn-login:disabled {
        opacity: 0.7;
        cursor: not-allowed;
        transform: none;
    }

.spinner-icon {
    margin-left: 8px;
    font-size: 12px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .login-form {
        padding: 30px 20px;
    }

    .logo-img {
        max-width: 220px;
    }

    .form-control {
        padding: 12px 16px;
        font-size: 14px;
    }

    .btn-login {
        padding: 12px 16px;
        font-size: 14px;
    }

    .checkbox-label {
        font-size: 0.8rem;
    }
}

@media (max-width: 360px) {
    .login-form {
        padding: 25px 15px;
    }

    .logo-img {
        max-width: 180px;
    }
}

@media (min-width: 1920px) {
    body.login-page {
        background: radial-gradient(circle at 20% 20%, #3E2723, #1a0f0a 75%);
        padding: 60px;
    }

    #page-container {
        max-width: 1100px;
        margin: 0 auto;
    }

    .login-form {
        padding: 80px 70px;
        border-radius: 50px;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 2px solid rgba(210, 180, 140, 0.35);
        box-shadow: 0 40px 60px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 245, 215, 0.12);
    }

    .logo-img {
        max-width: 500px;
        margin-bottom: 40px;
    }

    .form-group {
        margin-bottom: 35px;
    }

    .form-control {
        padding: 22px 30px;
        font-size: 1.3rem;
        border-radius: 80px;
    }

    .custom-checkbox {
        margin: 35px 0 40px;
    }

    .checkbox-custom {
        width: 28px;
        height: 28px;
        border-radius: 10px;
        border-width: 2.5px;
    }

        .checkbox-custom::after {
            font-size: 14px;
        }

    .checkbox-label {
        font-size: 1.15rem;
    }

    .btn-login {
        padding: 22px 30px;
        font-size: 1.3rem;
        border-radius: 80px;
        letter-spacing: 3px;
    }

    .alert {
        padding: 18px 24px;
        font-size: 1.05rem;
        border-radius: 20px;
        margin-bottom: 30px;
    }

    .close-btn {
        font-size: 28px;
        right: 20px;
    }

    #page-loader .spinner {
        width: 80px;
        height: 80px;
        border-width: 5px;
    }
}

@media (min-width: 2560px) {
    #page-container {
        max-width: 1400px;
    }

    .login-form {
        padding: 100px 90px;
        border-radius: 70px;
    }

    .logo-img {
        max-width: 700px;
        margin-bottom: 55px;
    }

    .form-group {
        margin-bottom: 45px;
    }

    .form-control {
        padding: 28px 38px;
        font-size: 3.6rem;
        border-radius: 100px;
    }

    .checkbox-custom {
        width: 34px;
        height: 34px;
        border-radius: 12px;
    }

        .checkbox-custom::after {
            font-size: 17px;
        }

    .checkbox-label {
        font-size: 2.35rem;
    }

    .btn-login {
        padding: 28px 38px;
        font-size: 3.6rem;
        border-radius: 100px;
    }

    .custom-checkbox {
        margin: 45px 0 50px;
    }

    .alert {
        padding: 24px 30px;
        font-size: 2.5rem;
        border-radius: 28px;
        margin-bottom: 40px;
    }

    .close-btn {
        font-size: 56px;
        right: 25px;
    }
}

@media (min-width: 3840px) {
    #page-container {
        max-width: 1800px;
    }

    .login-form {
        padding: 130px 110px;
        border-radius: 90px;
    }

    .logo-img {
        max-width: 900px;
        margin-bottom: 70px;
    }

    .form-group {
        margin-bottom: 60px;
    }

    .form-control {
        padding: 36px 48px;
        font-size: 2rem;
        border-radius: 120px;
    }

    .checkbox-custom {
        width: 42px;
        height: 42px;
        border-radius: 14px;
        margin-right: 15px;
    }

        .checkbox-custom::after {
            font-size: 21px;
        }

    .checkbox-label {
        font-size: 1.7rem;
    }

    .btn-login {
        padding: 36px 48px;
        font-size: 2rem;
        border-radius: 120px;
        letter-spacing: 5px;
    }

    .custom-checkbox {
        margin: 60px 0 70px;
    }

    .alert {
        padding: 32px 40px;
        font-size: 1.5rem;
        border-radius: 35px;
        margin-bottom: 55px;
    }

    .close-btn {
        font-size: 40px;
        right: 30px;
    }

    #page-loader .spinner {
        width: 110px;
        height: 110px;
        border-width: 6px;
    }
}