/* CSS customizado para GPK Finanças */

/* ===== LOGIN PAGE LAYOUT v2 (dark glass) ===== */

html:has(body.lg-page-body) {
    height: 100%;
}

body.lg-page-body {
    position: relative;
    min-height: 100vh;
    height: 100%;
    background: url("../img/unnamed.jpg") center / cover no-repeat fixed !important;
    background-color: #1a1a2e !important;
    font-family: 'Nunito', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    padding: 0;
    margin: 0;
}

.lg-bg-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 0;
    pointer-events: none;
}

.lg-page-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

.lg-card-wrapper {
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    width: 100%;
    max-width: 1280px;
    height: auto;
    overflow: hidden;
    /*padding-top: 20px;
    padding-bottom: 20px;*/
    box-sizing: border-box;
    border-radius: 28px;
    box-shadow: 0 30px 100px rgba(15, 23, 42, 0.22);
}

/* Left panel */
.lg-left-panel {
    position: relative;
    min-height: 400px;
    overflow: hidden;
    background: url("../img/imagemLogin.jpg") center top/cover no-repeat;
    background-color: #3a3028;
    border-radius: 28px 0 0 28px;
}

.lg-left-overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.35) 50%, rgba(0,0,0,0.1) 100%);
}

.lg-left-content {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    min-height: 100%;
    padding: clamp(1.25rem, 2.5vw, 2.5rem);
    padding-top: clamp(1.25rem, 3vh, 2.25rem);
}

.lg-quote {
    max-width: 360px;
    color: #ffffff;
}

.lg-quote-text {
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 2rem;
}

.lg-quote-author {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.85);
}

.lg-quote-name {
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.25rem;
}

.lg-quote-desc {
    margin: 0;
}

/* Right panel */
.lg-right-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
    padding: 2rem 2.5rem;
    overflow-y: auto;
}

.lg-form-container {
    width: 100%;
    max-width: 400px;
}

.lg-logo {
    max-height: 44px;
    display: block;
    margin: 0 auto;
}

.lg-welcome-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.lg-welcome-sub {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 0;
}

.lg-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
    display: block;
    margin-bottom: 0.4rem;
}

.lg-input {
    height: 44px;
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.25) !important;
    background: rgba(255,255,255,0.15) !important;
    padding: 0 0.75rem;
    font-size: 0.875rem;
    color: #ffffff !important;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    display: block;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.lg-input::placeholder {
    color: rgba(255,255,255,0.4);
}

.lg-input:focus {
    border-color: rgba(255,255,255,0.5) !important;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.15) !important;
    background: rgba(255,255,255,0.18) !important;
}

/* Override browser autofill yellow/blue */
.lg-input:-webkit-autofill,
.lg-input:-webkit-autofill:hover,
.lg-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 30px rgba(40, 40, 60, 0.9) inset !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ffffff;
}

.lg-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.lg-input-group .lg-input {
    padding-right: 2.75rem;
}

.lg-toggle-pw {
    position: absolute;
    right: 0.75rem;
    cursor: pointer;
    color: rgba(255,255,255,0.55);
    font-size: 0.9rem;
    z-index: 2;
    line-height: 1;
}

.lg-btn-primary {
    height: 48px;
    border-radius: 999px;
    background: #22c55e !important;
    color: #ffffff !important;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    box-shadow: 0 14px 28px rgba(34,197,94,0.35);
    transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.lg-btn-primary:hover {
    background: #16a34a !important;
    color: #ffffff !important;
    text-decoration: none;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 20px 40px rgba(34,197,94,0.5);
}

.lg-btn-primary:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 8px 16px rgba(34,197,94,0.3);
}

.lg-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem 0;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
}

.lg-divider::before,
.lg-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.2);
    margin: 0 0.75rem;
}

.lg-btn-google {
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.1);
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: background 0.2s;
}

.lg-btn-google:hover {
    background: rgba(255,255,255,0.18);
    color: #ffffff;
    text-decoration: none;
}

.lg-signup {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
}

.lg-signup a {
    font-weight: 600;
    color: rgba(255,255,255,0.85);
}

.lg-signup a:hover {
    color: #ffffff;
    text-decoration: none;
}

/* Responsive */
@media (max-width: 1366px) and (min-width: 1025px), (max-height: 860px) and (min-width: 1025px) {
    .lg-page-content {
        padding: 0.75rem;
    }

    .lg-card-wrapper {
        height: auto;
        max-height: 85vh;
        grid-template-columns: 1.03fr 0.97fr;
    }

    .lg-left-content {
        padding: 1.5rem;
        padding-top: 1.25rem;
    }

    .lg-right-panel {
        padding: 1.5rem 1.85rem;
    }

    .lg-quote-text {
        font-size: 1.75rem;
        margin-bottom: 1.25rem;
    }

    .lg-welcome-title {
        font-size: 1.8rem;
    }

    .lg-logo {
        max-height: 38px;
    }
}

@media (max-height: 760px) and (min-width: 1025px) {
    .lg-card-wrapper {
        height: auto;
        max-height: 85vh;
    }

    .lg-left-content {
        padding: 1.1rem 1.2rem;
        padding-top: 1rem;
    }

    .lg-right-panel {
        padding: 1.25rem 1.4rem;
    }

    .lg-quote-text {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .lg-quote-author {
        font-size: 0.8rem;
    }

    .lg-welcome-title {
        font-size: 1.55rem;
        margin-bottom: 0.35rem;
    }

    .lg-welcome-sub {
        font-size: 0.82rem;
    }

    .lg-logo {
        max-height: 34px;
    }
}

@media (max-width: 1024px) {
    .lg-card-wrapper {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 0;
        max-height: none;
    }

    .lg-left-panel {
        min-height: 280px;
    }

    .lg-left-content {
        min-height: 280px;
        padding: 1.75rem;
    }

    .lg-right-panel {
        padding: 2rem 2rem;
    }
}

@media (max-width: 576px) {
    .lg-page-content {
        padding: 0.5rem;
    }

    .lg-card-wrapper {
        border-radius: 18px;
        min-height: calc(100vh - 1rem);
        max-height: none;
        height: auto;
    }

    .lg-right-panel {
        padding: 2rem 1.25rem;
    }

    .lg-welcome-title {
        font-size: 1.5rem;
    }
}

/* ===== REGISTER PAGE – dark glass extras ===== */

.lg-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    margin-bottom: 0.75rem;
    margin-top: 0.25rem;
}

.lg-required {
    color: #f87171;
    font-size: 0.85em;
}

.lg-hint {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.45);
    margin-top: 0.3rem;
    display: block;
}

.lg-alert-error {
    background: rgba(239,68,68,0.15);
    border: 1px solid rgba(239,68,68,0.35);
    color: #fca5a5;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    font-size: 0.85rem;
}

/* Select normal (single) */
.lg-select {
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='rgba(255,255,255,0.5)' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    padding-right: 2.25rem !important;
    cursor: pointer;
}

/* Options sempre com texto escuro para legibilidade no dropdown nativo do SO */
.lg-select option,
.lg-input option {
    background: #ffffff !important;
    color: #1a1a2e !important;
}

/* Multi-select */
.lg-select-multi {
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.25) !important;
    background: rgba(30, 37, 53, 0.85) !important;
    color: #ffffff !important;
    font-size: 0.875rem;
    padding: 0.3rem;
    box-sizing: border-box;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.lg-select-multi:focus {
    border-color: rgba(255,255,255,0.5) !important;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.12) !important;
}

.lg-select-multi option {
    background: #1e2535 !important;
    color: #ffffff !important;
    padding: 0.4rem 0.5rem;
}

.lg-select-multi option:checked {
    background: #22c55e !important;
    color: #ffffff !important;
}

/* Textarea */
.lg-textarea {
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.25) !important;
    background: rgba(255,255,255,0.12) !important;
    color: #ffffff !important;
    font-size: 0.875rem;
    padding: 0.65rem 0.75rem;
    box-sizing: border-box;
    outline: none;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.lg-textarea::placeholder {
    color: rgba(255,255,255,0.4);
}

.lg-textarea:focus {
    border-color: rgba(255,255,255,0.5) !important;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.12) !important;
    background: rgba(255,255,255,0.18) !important;
}

/* Entertainment block */
.lg-block-ent {
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 1rem;
    background: rgba(255,255,255,0.05);
}

/* ===== LOGIN PAGE LAYOUT (legacy — kept for compatibility) ===== */

.login-gradient-bg {
    background: url("../img/unnamed.jpg") center/cover no-repeat fixed;
    font-family: 'Nunito', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    min-height: 100vh;
}

.login-wrapper {
    max-width: 1000px;
    width: 100%;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    padding: 1.75rem;
}

.login-card {
    display: flex;
    border-radius: 20px;
    overflow: hidden;
    background: #ffffff;
    min-height: 480px;
}

.login-left,
.login-right {
    padding: 2.5rem 2.25rem;
}

.login-left {
    flex: 1.1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    max-height: 90vh;
    overflow-y: auto;
}

.login-form {
    width: 100%;
    max-width: 100%;
    text-align: left;
}

.login-right {
    flex: 1;
    background: transparent;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 0;
}

.login-logo-img {
    max-height: 40px;
}

.login-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #101828;
}

.login-subtitle {
    color: #6b7280;
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

.login-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #4b5563;
}

.login-input {
    border-radius: 999px;
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
    border: 1px solid #e5e7eb;
}

.login-input:focus {
    border-color: #111827;
    box-shadow: 0 0 0 2px rgba(17, 24, 39, 0.15);
}

/* Select com .login-input: evita borda em pill que trunca texto/seta */
select.login-input {
    border-radius: 0.5rem;
    padding-right: 2.25rem;
    min-height: 2.75rem;
    appearance: auto;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Garante que o select de Gerência e outros tenham espaço para mostrar o texto completo */
.login-form select.form-control {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.login-input-group {
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.login-input-icon {
    background: transparent;
    border: none;
    padding-right: 1.1rem;
    color: #9ca3af;
}

.login-primary-btn {
    border-radius: 999px;
    padding: 0.85rem 1rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.login-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.75rem 0 1rem;
    font-size: 0.8rem;
    color: #9ca3af;
}

.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e5e7eb;
    margin: 0 0.75rem;
}

.login-google-btn {
    border-radius: 999px;
    padding: 0.8rem 1rem;
    border: 1px solid #e5e7eb;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.login-google-btn:hover {
    background: #f9fafb;
}

.login-google-icon {
    width: 18px;
    height: 18px;
}

.login-signup {
    font-size: 0.85rem;
    color: #6b7280;
}

.login-signup a {
    font-weight: 600;
}

.login-signup a:hover {
    text-decoration: none;
}

.login-forgot {
    font-size: 0.8rem;
    color: #9ca3af;
}

.login-forgot.disabled {
    cursor: default;
}

.login-hero-card {
    width: 100%;
    height: 100%;
    border-radius: 24px;
    background: transparent;
    padding: 0;
    box-shadow: none;
    overflow: hidden;
}

.login-hero-image {
    display: flex;
    justify-content: center;
    align-items: stretch;
    height: 100%;
    width: 100%;
}

.login-illustration {
    width: 100%;
    height: 100%;
    border-radius: 24px;
    object-fit: cover;
}

.login-hero-image.full-image {
    margin: 0;
}

.login-illustration.full-cover {
    border-radius: 24px;
}

.login-hero-text h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-hero-text p {
    font-size: 0.85rem;
    color: #e5e7eb;
    line-height: 1.5;
}

@media (max-width: 992px) {
    .login-card {
        flex-direction: column;
    }

    .login-left,
    .login-right {
        padding: 1.75rem;
    }

    .login-wrapper {
        padding: 1.25rem;
    }

    .login-right {
        order: -1;
        border-radius: 16px;
        margin-bottom: 1.25rem;
    }
}

@media (max-width: 576px) {
    .login-wrapper {
        padding: 0.75rem;
        border-radius: 18px;
    }

    .login-left,
    .login-right {
        padding: 1.5rem 1.25rem;
    }

    .login-title {
        font-size: 1.4rem;
    }
}

/* Estilos para campos select múltiplos */
select[multiple] {
    border-radius: 0.35rem;
    border: 1px solid #d1d3e2;
    padding: 0.5rem;
    font-size: 0.9rem;
}

select[multiple]:focus {
    border-color: #4e73df;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

select[multiple] option {
    padding: 0.5rem;
    border-radius: 0.25rem;
    margin-bottom: 2px;
}

select[multiple] option:hover {
    background-color: #4e73df;
    color: white;
}

/* Labels melhoradas */
label.small {
    margin-bottom: 0.5rem;
    display: block;
}

/* Alerts customizados */
.alert {
    border-radius: 0.35rem;
    font-size: 0.9rem;
}

.alert ul {
    padding-left: 1.2rem;
}

/* Textos de ajuda */
.form-text {
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Botões customizados */
.btn-user {
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-user:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Cards customizados */
.card {
    border-radius: 0.5rem;
}

/* Ícones de sucesso/erro */
.text-success {
    color: #1cc88a !important;
}

.text-danger {
    color: #e74a3b !important;
}

/* Melhorias visuais para a tela de login/registro */
.bg-login-image {
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
}

/* Responsividade */
@media (max-width: 768px) {
    .card-body .p-5 {
        padding: 2rem !important;
    }
    
    select[multiple] {
        font-size: 0.85rem;
    }
}

/* Animação suave para alertas */
.alert {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estilos para required fields */
.text-danger {
    font-weight: bold;
}

/* Melhorias para textarea */
textarea.form-control {
    border-radius: 0.35rem;
    resize: vertical;
}

textarea.form-control:focus {
    border-color: #4e73df;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

/* Espaçamento entre form groups */
.form-group {
    margin-bottom: 1.5rem;
}

/* Hover effects para links */
a.small {
    transition: color 0.2s ease;
}

a.small:hover {
    color: #224abe !important;
    text-decoration: none;
}

/* Separadores */
hr {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin: 1.5rem 0;
}

/* Badge para campos obrigatórios */
.badge-required {
    background-color: #e74a3b;
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    margin-left: 0.25rem;
}
