/* Compact Modern Login - Transport Edition - Simplified */
.modern-login-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    min-height: 100vh;
    padding: 15px;
    background: linear-gradient(135deg, #065BE5 0%, #0B4BBE 100%);
}

/* Card principal simplificado */
.login-card {
    background: #ffffff !important;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 420px;
    text-align: center;
    max-height: 90vh;
    overflow-y: auto;
    box-sizing: border-box;
}

/* Logo */
.login-logo {
    text-align: center;
    margin-bottom: 25px;
}

.login-logo img {
    max-width: 240px;
    height: auto;
}

/* Título */
.login-title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.login-subtitle {
    text-align: center;
    color: #555555;
    font-size: 14px;
    margin-bottom: 30px;
}

/* Formulário compacto */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #2d2d2d;
    margin-bottom: 8px;
    font-size: 14px;
    text-transform: none;
    letter-spacing: 0.2px;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 400;
    color: #333333;
    background-color: #ffffff;
    transition: all 0.3s ease;
    outline: none;
}

.form-control:focus {
    border-color: #065BE5;
    box-shadow: 0 0 0 3px rgba(6, 91, 229, 0.1);
    background-color: #ffffff;
    transform: translateY(-1px);
}

.form-control::placeholder {
    color: #888888;
    font-weight: 400;
}

.input-icon {
    position: relative;
}

.input-icon i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666666;
    font-size: 16px;
    pointer-events: none;
    transition: all 0.3s ease;
}

.input-icon .form-control {
    padding-left: 45px;
}

.input-icon.focused i,
.input-icon .form-control:focus + i {
    color: #065BE5;
}

/* Checkbox e links */
.remember-me {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 20px 0;
}

.checkbox-container {
    display: flex;
    align-items: center;
}

.custom-checkbox {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    accent-color: #065BE5;
}

.checkbox-label {
    color: #444444;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.forgot-password {
    color: #065BE5;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 4px 8px;
    border-radius: 6px;
}

.forgot-password:hover {
    color: #0B4BBE;
    background: rgba(6, 91, 229, 0.05);
}

/* Botão de login */
.login-button {
    width: 100%;
    background: linear-gradient(135deg, #065BE5 0%, #0B4BBE 100%);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(6, 91, 229, 0.3);
    color: white;
    text-decoration: none;
}

.login-button:focus,
.login-button:active {
    color: white;
    text-decoration: none;
    outline: none;
}

/* Loading state */
.login-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Mensagem de erro compacta */
.error-message {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-left: 4px solid #DC2626;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 15px;
    color: #DC2626;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.error-message i {
    margin-right: 8px;
    font-size: 16px;
}

/* Rodapé compacto */
.login-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
    color: #666666;
    font-size: 12px;
}

.login-footer p {
    margin-bottom: 5px;
    line-height: 1.4;
}

/* Responsividade melhorada */
@media (max-width: 768px) {
    .modern-login-container {
        padding: 15px 10px;
        min-height: 100vh;
        align-items: flex-start;
        padding-top: 20px;
    }
    
    .login-card {
        padding: 25px 15px;
        margin: 0;
        max-width: 100%;
        width: 100%;
        max-height: 85vh;
        box-sizing: border-box;
        overflow-y: auto;
    }
    
    .login-logo img {
        max-width: 200px;
    }
    
    .login-title {
        font-size: 20px;
        margin-bottom: 5px;
    }
    
    .login-subtitle {
        font-size: 12px;
        margin-bottom: 20px;
    }
    
    /* Navegação responsiva */
    .login-card > div[style*="margin-bottom: 30px"] {
        margin-bottom: 15px !important;
    }
    
    .login-card > div[style*="margin-bottom: 30px"] button {
        width: 48% !important;
        margin-right: 2% !important;
        padding: 8px 6px !important;
        font-size: 12px !important;
    }
    
    .login-card > div[style*="margin-bottom: 30px"] button:last-child {
        margin-right: 0 !important;
    }
    
    /* Formulários responsivos */
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-control {
        padding: 10px 12px;
        font-size: 16px;
    }
    
    .input-icon .form-control {
        padding-left: 38px;
    }
    
    .input-icon i {
        left: 12px;
        font-size: 14px;
    }
    
    .login-button {
        padding: 11px;
        font-size: 13px;
    }
    
    /* Instruções do primeiro acesso responsivas - MUITO COMPACTAS */
    #first-access-container > div[style*="background: #f8f9fc"] {
        padding: 10px !important;
        margin-bottom: 12px !important;
        border-radius: 6px !important;
    }
    
    #first-access-container h4 {
        font-size: 14px !important;
        margin-bottom: 8px !important;
    }
    
    #first-access-container ul {
        font-size: 11px !important;
        padding-left: 15px !important;
        margin: 0 !important;
    }
    
    #first-access-container li {
        margin-bottom: 4px !important;
        line-height: 1.3 !important;
    }
    
    /* Remember me responsivo */
    .remember-me {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin: 12px 0;
    }
    
    .checkbox-container {
        width: 100%;
    }
    
    .forgot-password {
        font-size: 12px;
        padding: 4px 0;
    }
    
    /* Rodapé responsivo */
    .login-footer {
        margin-top: 15px;
        padding-top: 12px;
        font-size: 10px;
    }
    
    .login-footer p {
        margin-bottom: 6px;
        line-height: 1.3;
    }
}

@media (max-width: 480px) {
    .modern-login-container {
        padding: 8px 5px;
        padding-top: 10px;
    }
    
    .login-card {
        padding: 15px 12px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .login-logo img {
        max-width: 150px;
    }
    
    .login-title {
        font-size: 18px;
    }
    
    .login-subtitle {
        font-size: 11px;
        margin-bottom: 15px;
    }
    
    /* Navegação ainda mais compacta */
    .login-card > div[style*="margin-bottom: 30px"] {
        margin-bottom: 12px !important;
    }
    
    .login-card > div[style*="margin-bottom: 30px"] button {
        width: 100% !important;
        margin: 0 0 6px 0 !important;
        padding: 10px !important;
        font-size: 12px !important;
        display: block !important;
    }
    
    .login-card > div[style*="margin-bottom: 30px"] button:last-child {
        margin-bottom: 0 !important;
    }
    
    /* Formulários mais compactos */
    .form-group {
        margin-bottom: 10px;
    }
    
    .form-control {
        padding: 10px;
        font-size: 16px;
    }
    
    .input-icon .form-control {
        padding-left: 35px;
    }
    
    .input-icon i {
        left: 10px;
        font-size: 13px;
    }
    
    .login-button {
        padding: 10px;
        font-size: 12px;
    }
    
    /* Instruções ULTRA compactas */
    #first-access-container > div[style*="background: #f8f9fc"] {
        padding: 8px !important;
        margin-bottom: 10px !important;
        border-radius: 5px !important;
    }
    
    #first-access-container h4 {
        font-size: 13px !important;
        margin-bottom: 6px !important;
    }
    
    #first-access-container ul {
        font-size: 10px !important;
        padding-left: 12px !important;
        margin: 0 !important;
    }
    
    #first-access-container li {
        margin-bottom: 3px !important;
        line-height: 1.2 !important;
    }
    
    /* Remember me em coluna */
    .remember-me {
        margin: 10px 0;
        gap: 6px;
    }
    
    .forgot-password {
        font-size: 11px;
        width: 100%;
        text-align: center;
        padding: 6px 0;
        background: rgba(6, 91, 229, 0.05);
        border-radius: 5px;
    }
    
    /* Rodapé compacto */
    .login-footer {
        margin-top: 12px;
        padding-top: 10px;
        font-size: 9px;
    }
    
    .login-footer p {
        margin-bottom: 4px;
        line-height: 1.2;
    }
}

/* Altura mínima fixa para evitar saltos */
@media (max-width: 768px) {
    .login-card {
        min-height: auto;
        transition: height 0.3s ease;
        position: relative;
    }
    
    #login-form-container,
    #first-access-container {
        transition: opacity 0.2s ease;
    }
    
    /* Força o container a não crescer além da viewport */
    .modern-login-container {
        max-height: 100vh;
        overflow: hidden;
    }
    
    /* Scroll interno apenas no card se necessário */
    .login-card {
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: rgba(6, 91, 229, 0.3) transparent;
    }
    
    .login-card::-webkit-scrollbar {
        width: 4px;
    }
    
    .login-card::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .login-card::-webkit-scrollbar-thumb {
        background: rgba(6, 91, 229, 0.3);
        border-radius: 2px;
    }
}
