/* ===================================================================
   UC Technology - Portal Login CSS
   components/css/login.css
   =================================================================== */

/* ==================== IMPORTS ==================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ==================== RESET E BODY ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #0a1929, #122a42 50%, #1a365d);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    overflow: hidden;
}

/* ==================== CONTAINER PRINCIPAL ==================== */
.login-container {
    width: 100%;
    max-width: 560px;
    /* Aumentado de 460px para 560px (+100px) */
    padding: 20px;
    z-index: 10;
    position: relative;
    display: flex;
    justify-content: center;
}

/* ==================== LOGIN BOX ==================== */
.login-box {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    position: relative;
    text-align: center;
    overflow: hidden;
    padding: 50px 45px 45px;
    width: 100%;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== BARRA DECORATIVA TOP ==================== */
.decorative-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #00d2ff 0%, #0072ff 100%);
    z-index: 2;
}

/* ==================== LOGO E TÍTULOS ==================== */
.logo-container {
    margin-bottom: 40px;
}

.logo {
    max-width: 280px;
    /* Aumentado de 200px para 280px */
    height: auto;
    margin-bottom: 30px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.welcome-title {
    font-size: 26px;
    color: #2c3e50;
    font-weight: 600;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.welcome-subtitle {
    color: #7f8c8d;
    font-size: 14px;
    margin: 0 0 35px 0;
    font-weight: 400;
}

/* ==================== FORMULÁRIO ==================== */
.login-form {
    text-align: left;
    width: 100%;
}

.form-group {
    margin-bottom: 22px;
    width: 100%;
}

/* ==================== LABELS ==================== */
.input-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #6c757d;
    margin-bottom: 8px;
    margin-left: 2px;
    text-align: left;
}

/* ==================== INPUTS ==================== */
.input-field {
    width: 100%;
    height: 50px;
    padding: 0 18px;
    border: 1px solid #d4e3f0;
    border-radius: 10px;
    background: #f0f7fd;
    /* Azul claríssimo - IGUAL AO PORTAL */
    font-size: 15px;
    color: #2c3e50;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    transition: all 0.25s ease;
    box-sizing: border-box;
}

.input-field::placeholder {
    color: #a8b8c8;
    font-weight: 400;
}

.input-field:focus {
    outline: none;
    border-color: #00c6ff;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 198, 255, 0.08);
}

/* ==================== CONTAINER DE SENHA ==================== */
.password-container {
    position: relative;
    width: 100%;
}

.password-container .input-field {
    padding-right: 50px;
}

/* Botão toggle senha */
.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
    z-index: 2;
}

.toggle-password:hover {
    opacity: 0.7;
}

.toggle-password:focus {
    outline: none;
}

.toggle-password i {
    font-size: 20px;
    opacity: 0.5;
    color: #6c757d;
}

/* ==================== MENSAGEM DE ERRO ==================== */
.error-message {
    background: #fff5f5;
    border: 1px solid #feb2b2;
    color: #c53030;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 20px;
    text-align: center;
    display: none;
}

.error-message:not(:empty) {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== BOTÃO ENTRAR ==================== */
.login-button {
    width: 100%;
    height: 50px;
    background: linear-gradient(90deg, #00d2ff 0%, #0072ff 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 10px;
    box-shadow: 0 4px 14px rgba(0, 114, 255, 0.3);
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.3px;
}

.login-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 114, 255, 0.4);
}

.login-button:active:not(:disabled) {
    transform: translateY(0);
}

.login-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==================== LOADING OVERLAY ==================== */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    border-radius: 20px;
}

.loading-overlay.active {
    display: flex;
}

/* Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e6ed;
    border-top-color: #0072ff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    margin-top: 15px;
    color: #0072ff;
    font-weight: 600;
    font-size: 14px;
}

/* ==================== ELEMENTOS DECORATIVOS (OCULTOS) ==================== */
.decorative-circle,
.decorative-element {
    display: none;
}

/* ==================== RESPONSIVO ==================== */
@media (max-width: 500px) {
    .login-container {
        padding: 15px;
    }

    .login-box {
        padding: 40px 30px;
        border-radius: 16px;
    }

    .logo {
        max-width: 200px;
        /* Aumentado de 160px para 200px */
    }

    .welcome-title {
        font-size: 22px;
    }

    .welcome-subtitle {
        font-size: 13px;
    }

    .input-field {
        height: 48px;
        font-size: 14px;
    }

    .login-button {
        height: 48px;
        font-size: 15px;
    }
}

@media (max-width: 400px) {
    .login-box {
        padding: 35px 25px;
    }

    .logo-container {
        margin-bottom: 30px;
    }

    .welcome-title {
        font-size: 20px;
    }
}

/* ==================== ACESSIBILIDADE ==================== */
.input-field:focus-visible,
.login-button:focus-visible,
.toggle-password:focus-visible {
    outline: 2px solid #0072ff;
    outline-offset: 2px;
}

/* ==================== PRINT ==================== */
@media print {
    body {
        background: white;
    }

    .login-box {
        box-shadow: none;
    }

    .decorative-bar {
        display: none;
    }
}