/* Login Page Styles - sem dependência do Bootstrap */

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

/* Utilitários usados no formulário (substituem Bootstrap) */
.mb-3 { margin-bottom: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; }
.w-100 { width: 100%; }
.text-center { text-align: center; }

/* Base: inputs e botões (só o necessário para o login) */
.form-control {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #333;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    appearance: none;
}
.form-control:focus {
    outline: 0;
}
.form-control-lg {
    padding: 0.75rem 1rem;
    font-size: 1rem;
}
.form-control::placeholder {
    color: #999;
    opacity: 1;
}

/* Form check / switch (Lembrar-me) */
.form-check {
    display: flex;
    align-items: center;
    min-height: 1.5rem;
    padding-left: 0;
    margin-bottom: 0.125rem;
}
.form-check-input {
    width: 2.5rem;
    height: 1.25rem;
    margin: 0;
    margin-right: 0.5rem;
    flex-shrink: 0;
    appearance: none;
    background-color: #ddd;
    border: none;
    border-radius: 2rem;
    transition: background-color 0.25s ease;
    cursor: pointer;
    position: relative;
}
.form-check-input::after {
    content: '';
    position: absolute;
    width: 1rem;
    height: 1rem;
    left: 2px;
    top: 2px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.25s ease;
}
.form-check-input:checked {
    background-color: #7579e7;
}
.form-check-input:checked::after {
    transform: translateX(1.25rem);
}
.form-check-label {
    margin-bottom: 0;
    font-size: 0.9375rem;
    color: #666;
    cursor: pointer;
    user-select: none;
}

/* Botão base */
.btn {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
}
.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* Alert (mensagem de erro) */
.alert {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}
.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

body.login-page {
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    background: linear-gradient(to right, #ffffff 0%, #fce9b2 100%);
}

/* Left Side - Form */
.login-left {
    width: 40%;
    display: flex;
    flex-direction: column;
    padding: 40px 80px 100px 80px;
    background: transparent;
    position: relative;
    z-index: 1;
}

.login-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0;
    margin-top: 0;
    align-self: flex-start;
}

.login-logo-icon {
    width: 40px;
    height: 40px;
    background: #2c3e50;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 20px;
}

.login-logo-text {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
}

.login-content {
    max-width: 420px;
    margin: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
}

.login-form-title {
    font-size: 30px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 12px;
    line-height: 1.2;
}

.login-form-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 32px;
    line-height: 1.4;
}

.login-hero-text {
    font-size: 48px;
    font-weight: 300;
    color: #2c3e50;
    margin-bottom: 16px;
    line-height: 1.2;
    letter-spacing: -0.5px;
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    text-align: center;
}

.login-title {
    font-size: 36px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 12px;
}

.login-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 40px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 12px;
    margin-left: 20px;
    color: #666;
    font-weight: 400;
    font-size: 14px;
    text-align: left;
}

.form-group input {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 50px;
    font-size: 16px;
    transition: all 0.3s;
    background: #ffffff;
    color: #333;
    font-family: 'Lato', sans-serif;
    font-weight: 400;
}

.form-group input:focus {
    outline: none;
    border-color: #c0c0c0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.form-group input::placeholder {
    color: #999;
}

/* Remember me toggle */
.form-group-remember {
    margin-bottom: 28px;
}

.toggle-wrap {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    cursor: pointer;
    font-size: 15px;
    color: #666;
    font-weight: 400;
    user-select: none;
}

.toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    min-width: 44px;
    flex-shrink: 0;
    background: #ddd;
    border-radius: 24px;
    transition: background 0.3s;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 2px;
    top: 2px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s;
}

.toggle-input:checked + .toggle-slider {
    background: #7579e7;
}

.toggle-input:checked + .toggle-slider::after {
    transform: translateX(20px);
}

.toggle-label {
    margin-left: 0;
    padding-left: 0;
    white-space: nowrap;
}

.password-wrapper {
    position: relative;
}

.password-wrapper input,
.password-wrapper .form-control {
    padding-right: 50px;
}

/* Bootstrap form adaptado ao layout do login */
.login-content .form-control {
    border-radius: 50px;
    border: 1px solid #e0e0e0;
}

.login-content .form-control:focus {
    border-color: #ca8a04;
    box-shadow: 0 0 0 0.2rem rgba(234, 179, 8, 0.25);
}

.login-content .btn-primary {
    background: #ffd85f;
    border-color: #ffd85f;
    color: #333;
    border-radius: 50px;
}

.login-content .btn-primary:hover {
    background: #ffd030;
    border-color: #ffd030;
    color: #333;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    font-size: 18px;
    padding: 4px;
    z-index: 2;
}

.password-toggle:hover {
    color: #333;
}

.btn-submit {
    width: 100%;
    padding: 16px 20px;
    background: #ffd85f;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 8px;
    font-family: 'Lato', sans-serif;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-submit:hover {
    background: #ffd030;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 216, 95, 0.4);
}

.forgot-password-link {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #999;
    font-family: 'Lato', sans-serif;
}

.forgot-password-link a {
    color: #8b6f47;
    text-decoration: none;
    font-weight: 400;
}

.forgot-password-link a:hover {
    color: #6b5435;
}

.forgot-password-text {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-bottom: 30px;
    line-height: 1.5;
}

.back-to-login {
    text-align: center;
    margin-top: 20px;
}

.back-to-login a {
    color: #8b6f47;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: color 0.3s;
}

.back-to-login a:hover {
    color: #6b5435;
    text-decoration: none;
}

.social-login {
    margin-top: 30px;
}

.social-buttons {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.btn-social {
    flex: 1;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    transition: all 0.3s;
}

.btn-social:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.login-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 40%;
    padding: 20px 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #999;
    font-family: 'Lato', sans-serif;
    z-index: 10;
}

.login-footer-left {
    color: #999;
}

.login-footer-left a {
    color: #8b6f47;
    text-decoration: none;
    font-weight: 400;
}

.login-footer-left a:hover {
    color: #6b5435;
}

.login-footer-right a {
    color: #8b6f47;
    text-decoration: none;
    font-weight: 400;
}

.login-footer-right a:hover {
    color: #6b5435;
}

/* Right Side - Background */
.login-right {
    width: 60%;
    position: relative;
    padding: 24px;
    overflow: hidden;
}

.login-right::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 24px;
    right: 24px;
    bottom: 24px;
    background-image: var(--login-bg-url);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 30px;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.alert-success {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

/* Responsive */
@media (max-width: 968px) {
    body.login-page {
        flex-direction: column;
    }

    .login-right {
        display: none;
    }

    .login-left {
        padding: 40px 30px 100px 30px;
    }

    .login-footer {
        width: 100%;
        padding: 20px 30px;
    }
}
