/* ========================================
   Login Page - Modern & Responsive Design
   ======================================== */

:root {
    --primary-color: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #6366f1;
    --secondary-color: #0ea5e9;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --gray-color: #64748b;
    --gray-light: #e2e8f0;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========================================
   Main Container
   ======================================== */

.login-container {
    position: relative;
    min-height: 100vh;
    width: 100%;
}

/* ========================================
   Left Side - Image Section
   ======================================== */

.login-image-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 50%;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    overflow: hidden;
    z-index: 1;
}

.login-image-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Background image - usa SVG disponível */
    background-image: url('../../../images/login/login-bg.svg');
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    z-index: 0;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
    z-index: 1;
}

.image-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    max-width: 500px;
}

.brand-logo {
    margin-bottom: 3rem;
    animation: fadeInDown 1s ease;
}

.brand-logo i {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
    color: var(--white);
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

.brand-logo h1 {
    font-size: 3rem;
    font-weight: 700;
    text-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.welcome-text {
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease 0.2s both;
}

.welcome-text h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.welcome-text p {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.6;
}

.features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: fadeInUp 1s ease 0.4s both;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    transition: var(--transition);
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(10px);
}

.feature-item i {
    font-size: 1.5rem;
    color: var(--success-color);
}

/* ========================================
   Right Side - Form Section
   ======================================== */

.login-form-section {
    margin-left: 50%;
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--white);
    min-height: 100vh;
    position: relative;
    z-index: 2;
}

.login-box {
    width: 100%;
    max-width: 480px;
    animation: fadeIn 1s ease;
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--gray-color);
    font-size: 0.95rem;
}

/* ========================================
   Form Styles
   ======================================== */

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.form-group label i {
    color: var(--primary-color);
    font-size: 1rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
    border: 2px solid var(--gray-light);
    border-radius: 10px;
    transition: var(--transition);
    font-family: 'Poppins', sans-serif;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.password-input-wrapper {
    position: relative;
}

.password-input-wrapper .form-control {
    padding-right: 3rem;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-color);
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--transition);
}

/* Also support register page markup (.password-input and .password-toggle) */
.password-input {
    position: relative;
}

.password-input .form-control {
    padding-right: 3rem;
}

.password-input .password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-color);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: var(--transition);
}

.password-input .password-toggle:hover {
    color: var(--primary-color);
}

.toggle-password:hover {
    color: var(--primary-color);
}

.toggle-password i {
    font-size: 1.1rem;
}

/* ========================================
   Form Options
   ======================================== */

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.remember-me label {
    font-size: 0.9rem;
    color: var(--gray-color);
    cursor: pointer;
    user-select: none;
}

.forgot-password {
    font-size: 0.9rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.forgot-password:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ========================================
   Button Styles
   ======================================== */

.btn-login {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ========================================
   Divider
   ======================================== */

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 2rem 0;
    color: var(--gray-color);
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--gray-light);
}

.divider span {
    padding: 0 1rem;
    font-size: 0.875rem;
}

/* ========================================
   Register Link
   ======================================== */

.register-link {
    text-align: center;
}

.register-link p {
    font-size: 0.95rem;
    color: var(--gray-color);
}

.register-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.register-link a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ========================================
   Footer
   ======================================== */

.login-footer {
    margin-top: 3rem;
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-light);
}

.login-footer p {
    font-size: 0.85rem;
    color: var(--gray-color);
}

/* ========================================
   Alert Styles
   ======================================== */

.alert {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideInDown 0.3s ease;
}

.alert i {
    font-size: 1.25rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success-color);
    color: var(--success-color);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
}

.alert-info {
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
}

/* ========================================
   Animations
   ======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ========================================
   Responsive Design
   ======================================== */

/* Tablets */
@media (max-width: 1024px) {
    .login-image-section {
        padding: 2rem;
    }

    .brand-logo h1 {
        font-size: 2.5rem;
    }

    .welcome-text h2 {
        font-size: 2rem;
    }

    .welcome-text p {
        font-size: 1rem;
    }

    .feature-item {
        font-size: 1rem;
    }
}

/* Mobile Landscape and Portrait */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
    }

    /* OCULTA completamente a imagem lateral em mobile */
    .login-image-section {
        display: none !important;
        position: static !important;
        width: auto !important;
    }

    /* Formulário ocupa 100% da tela */
    .login-form-section {
        width: 100% !important;
        margin-left: 0 !important;
        flex: 1;
    }

    .brand-logo {
        margin-bottom: 2rem;
    }

    .brand-logo i {
        font-size: 3rem;
    }

    .brand-logo h1 {
        font-size: 2rem;
    }

    .welcome-text {
        margin-bottom: 2rem;
    }

    .welcome-text h2 {
        font-size: 1.5rem;
    }

    .welcome-text p {
        font-size: 0.9rem;
    }

    .features {
        gap: 1rem;
    }

    .feature-item {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    .feature-item i {
        font-size: 1.25rem;
    }

    .login-form-section {
        padding: 2rem 1.5rem;
    }

    .login-box {
        max-width: 100%;
    }

    .login-header h2 {
        font-size: 1.75rem;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .login-image-section {
        min-height: 35vh;
        padding: 1.5rem 1rem;
    }

    .brand-logo i {
        font-size: 2.5rem;
    }

    .brand-logo h1 {
        font-size: 1.75rem;
    }

    .welcome-text h2 {
        font-size: 1.25rem;
    }

    .welcome-text p {
        font-size: 0.85rem;
    }

    .features {
        gap: 0.75rem;
    }

    .feature-item {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    .login-form-section {
        padding: 1.5rem 1rem;
    }

    .login-header {
        margin-bottom: 2rem;
    }

    .login-header h2 {
        font-size: 1.5rem;
    }

    .login-header p {
        font-size: 0.85rem;
    }

    .form-control {
        padding: 0.75rem 0.875rem;
        font-size: 0.9rem;
    }

    .btn-login {
        padding: 0.875rem;
        font-size: 0.95rem;
    }
}

/* Ultra Small Devices */
@media (max-width: 360px) {
    .brand-logo h1 {
        font-size: 1.5rem;
    }

    .login-header h2 {
        font-size: 1.25rem;
    }

    .feature-item {
        font-size: 0.8rem;
    }
}

/* High Resolution Displays */
@media (min-width: 1440px) {
    .login-box {
        max-width: 520px;
    }

    .image-content {
        max-width: 600px;
    }
}

/* Print Styles */
@media print {
    .login-image-section {
        display: none;
    }

    .login-form-section {
        min-height: 100vh;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    /* Pode adicionar suporte a dark mode aqui se necessário */
}

/* ========================================
   Password Policy Requirements
   ======================================== */

.password-requirements {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    display: none;
}

.password-requirements.show {
    display: block;
    animation: slideDown 0.3s ease;
}

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

.password-requirement {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    color: #64748b;
    transition: var(--transition);
}

.password-requirement i {
    width: 20px;
    margin-right: 0.75rem;
    text-align: center;
    font-size: 0.875rem;
}

.password-requirement.unmet {
    color: #64748b;
}

.password-requirement.unmet i {
    color: #cbd5e1;
}

.password-requirement.met {
    color: #10b981;
}

.password-requirement.met i {
    color: #10b981;
}

.password-requirements.all-met {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 0.75rem;
    display: none;
}

.password-strength.show {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.password-strength-bars {
    display: flex;
    gap: 0.25rem;
}

.password-strength-bar {
    width: 4px;
    height: 6px;
    border-radius: 2px;
    background-color: #e2e8f0;
    transition: var(--transition);
}

.password-strength-bar.filled {
    background-color: #ef4444;
}

.password-strength.medium .password-strength-bar:nth-child(-n+2) {
    background-color: #f59e0b;
}

.password-strength.strong .password-strength-bar:nth-child(-n+3) {
    background-color: #10b981;
}

.password-strength.very-strong .password-strength-bar {
    background-color: #059669;
}

.password-strength-label {
    font-weight: 500;
    color: #64748b;
}

.password-strength.weak .password-strength-label {
    color: #ef4444;
}

.password-strength.medium .password-strength-label {
    color: #f59e0b;
}

.password-strength.strong .password-strength-label {
    color: #10b981;
}

.password-strength.very-strong .password-strength-label {
    color: #059669;
}
