* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.login-page {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background:
        linear-gradient(rgba(10, 20, 30, 0.55), rgba(10, 20, 30, 0.55)),
        url('../images/fondo-logistico.jpg') center/cover no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.app-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 20, 30, 0.72);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.app-loader.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.app-loader__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.app-loader__spinner {
    width: 58px;
    height: 58px;
    border: 5px solid rgba(255, 255, 255, 0.35);
    border-top-color: rgb(82, 123, 164);
    border-radius: 50%;
    animation: appSpin 0.85s linear infinite;
}

.app-loader__text {
    margin: 0;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.4px;
}

@keyframes appSpin {
    to { transform: rotate(360deg); }
}

.login-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-box {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    padding: 34px 44px;
    width: 100%;
    max-width: 480px;
    backdrop-filter: blur(10px);
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.logo-container {
    text-align: center;
    margin-bottom: 28px;
}

.logo {
    width: 317px;
    max-width: 100%;
    height: 107px;
    object-fit: contain;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.app-input {
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    min-height: 52px;
    transition: all 0.3s ease;
    background: #f9f9f9;
}

.app-input:focus {
    outline: none;
    border-color: rgb(82, 123, 164);
    background: white;
    box-shadow: 0 0 10px rgba(82, 123, 164, 0.12);
}

.btn-login {
    background: rgb(82, 123, 164);
    color: white;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
}

.btn-login:hover {
    transform: translateY(-2px);
    background: rgb(82, 123, 164);
    box-shadow: 0 10px 20px rgba(102, 153, 204, 0.35);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: wait;
}

.btn-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-decoration: none;
    padding: 8px 12px;
    font-size: 13px;
    letter-spacing: 0.5px;
    text-transform: none;
}

.btn-home i {
    font-size: 12px;
}

.form-footer {
    text-align: center;
    margin-top: 30px;
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
}

@media (max-width: 600px) {
    .login-box {
        padding: 28px 20px;
        max-width: 350px;
    }

    .logo {
        width: 100%;
        height: 96px;
    }

    .app-input {
        padding: 12px 14px;
        font-size: 16px;
        min-height: 50px;
    }

    .btn-login {
        padding: 10px;
        font-size: 14px;
    }
}

@media (prefers-color-scheme: dark) {
    .login-box {
        background: rgba(45, 45, 45, 0.95);
    }

    .form-group label {
        color: #e0e0e0;
    }

    .app-input {
        background: #333;
        border-color: #555;
        color: #fff;
    }

    .app-input:focus {
        border-color: rgb(0, 51, 102);
        background: #3a3a3a;
    }

    .form-footer {
        border-color: #555;
    }

    .form-footer p {
        color: #bbb;
    }
}
