* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
    background: url('../../imagens/background_pubye.png') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.top-bar {
    background-color: rgba(0, 123, 255, 0.65);
    backdrop-filter: blur(3px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 999;
    height: 40px;
}

.icon-text { margin-right: .35rem; line-height: 1; }

.content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 60px 10px 10px;
}

.login-container {
    display: flex;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    max-width: 900px;
    width: 100%;
}

.login-image {
    width: 50%;
    background: url('../../imagens/subestacao-scaled.jpg') no-repeat center center;
    background-size: cover;
}

.login-form {
    width: 50%;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo {
    display: block;
    margin: 0 auto;
    max-width: 180px;
}

.btn-custom {
    background-color: #007bff;
    color: #fff;
    font-weight: bold;
    padding: 12px;
    border-radius: 8px;
    transition: background-color .3s ease;
}

.btn-custom:hover, .btn-custom:focus {
    background-color: #0056b3;
    color: #fff;
}

.link-alterar-senha {
    margin-top: 15px;
    text-decoration: none;
    color: #007bff;
    font-weight: bold;
    font-size: 13px;
}

.link-alterar-senha:hover, .link-alterar-senha:focus { text-decoration: underline; }

.form-control {
    font-size: 16px;
    padding: 12px 15px;
    border-radius: 10px;
    border: 2px solid #ced4da;
    box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
    transition: border-color .3s, box-shadow .3s;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0,123,255,.7);
}

.password-input { padding-right: 52px; }

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
}

.password-toggle:focus-visible { outline: 2px solid #007bff; }

.lembrar-label { font-size: 12px; color: #6c757d; }

.recaptcha-wrapper {
    transform: scale(.85);
    transform-origin: center;
    margin: 0 auto 5px;
    display: flex;
    justify-content: center;
}

.loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.loading-overlay.is-visible { display: flex; }
.loading-spinner { width: 4rem; height: 4rem; }
.loading-text { color: #fff; margin-top: 15px; font-size: 1.2rem; font-weight: bold; }

footer {
    font-size: 14px;
    color: #fff;
    text-shadow: 1px 1px 2px #000;
    text-align: center;
    padding: 10px 0;
}

.force-mobile .login-container {
    flex-direction: column;
    max-width: 480px;
    width: 100%;
    margin: 12px auto;
    border-radius: 14px;
}
.force-mobile .login-image { display: none; }
.force-mobile .login-form { width: 100%; padding: 20px 16px; }
.force-mobile .recaptcha-wrapper { transform: scale(.86); transform-origin: center; }
.force-mobile .form-control { font-size: 16px; }

@media (max-width: 768px) {
    .login-container { flex-direction: column; max-width: 100%; }
    .login-image { display: none; }
    .login-form { width: 100%; padding: 30px 20px; }
    .btn { font-size: 16px; padding: 14px 16px; }
    .form-label { font-size: 16px; }
    .top-bar { justify-content: center !important; height: 35px; padding: 5px 10px !important; }
    .top-bar a { margin-bottom: 0; font-size: 12px; padding: 6px 10px; }
}
