/* ========================================
   TELA DE LOGIN MODERNA - SPLIT SCREEN
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.login-page {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.login-split-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ========================================
   LADO ESQUERDO - BRANDING
   ======================================== */

.login-left-side {
    flex: 1;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.brand-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding: 3rem;
    animation: fadeInLeft 0.8s ease-out;
}

.brand-logo {
    margin-bottom: 3rem;
}

.logo-icon {
    width: 220px;
    height: 220px;
    margin: 0 auto 2rem;
    background: white;
    border-radius: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    animation: float 3s ease-in-out infinite;
    padding: 2.5rem;
}

.logo-icon i {
    font-size: 60px;
    color: white;
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
}

.brand-name {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.brand-tagline {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

.brand-features {
    display: grid;
    gap: 1.5rem;
    max-width: 400px;
    margin: 0 auto;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(10px);
}

.feature-item i {
    font-size: 24px;
    width: 40px;
    flex-shrink: 0;
}

.feature-item span {
    font-size: 1rem;
    font-weight: 400;
}

/* Elementos decorativos */
.decorative-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    overflow: hidden;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    animation: float 6s ease-in-out infinite;
}

.circle-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.circle-2 {
    width: 200px;
    height: 200px;
    bottom: 50px;
    left: -50px;
    animation-delay: 2s;
}

.circle-3 {
    width: 150px;
    height: 150px;
    top: 50%;
    left: 10%;
    animation-delay: 4s;
}

/* ========================================
   LADO DIREITO - FORMULÁRIO
   ======================================== */

.login-right-side {
    flex: 1;
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-form-container {
    width: 100%;
    max-width: 450px;
    animation: fadeInRight 0.8s ease-out;
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary-dark);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--color-text-light);
    font-size: 1rem;
}

.login-form {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--color-text);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group label i {
    margin-right: 0.5rem;
    color: var(--color-primary);
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius-md);
    transition: all var(--transition-base) ease;
    background: var(--color-bg-light);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.1);
}

.form-control::placeholder {
    color: var(--color-text-muted);
}

.form-options {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-check-label {
    color: var(--color-text);
    font-size: 0.95rem;
    cursor: pointer;
    user-select: none;
}

/* Botão de Login */
.btn-login {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border: none;
    border-radius: var(--border-radius-md);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base) ease;
    position: relative;
    overflow: hidden;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(var(--color-primary-rgb), 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login .btn-text {
    position: relative;
    z-index: 2;
}

/* Estados do botão */
.btn-login.loading {
    pointer-events: none;
    color: transparent !important;
}

.btn-login.loading .btn-text {
    visibility: hidden;
}

.pulse-container {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
}

.btn-login.loading .pulse-container {
    display: flex;
    gap: 0.5rem;
}

.pulse-bubble {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: white;
}

.pulse-bubble-1 {
    animation: pulse 0.6s ease 0s infinite alternate;
}

.pulse-bubble-2 {
    animation: pulse 0.6s ease 0.2s infinite alternate;
}

.pulse-bubble-3 {
    animation: pulse 0.6s ease 0.4s infinite alternate;
}

/* Footer */
.login-footer {
    text-align: center;
    margin-top: 2rem;
    color: var(--color-text-light);
    font-size: 0.875rem;
}

.login-footer .text-muted {
    color: var(--color-text-muted) !important;
    display: block;
    margin-top: 0.25rem;
}

/* Alertas */
.alert-danger {
    background: rgba(var(--color-danger-rgb), 0.1);
    color: var(--color-danger);
    border: 1px solid var(--color-danger);
    border-radius: var(--border-radius-md);
    padding: 1rem;
    font-size: 0.95rem;
}

/* Social Login Divider */
.social-login-divider {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
}

.social-login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--color-border);
    z-index: 0;
}

.social-login-divider span {
    position: relative;
    background: white;
    padding: 0 1rem;
    color: var(--color-text-light);
    font-size: 0.9rem;
    z-index: 1;
}

/* Social Login Buttons */
.social-login-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.social-login-buttons-single {
    margin-top: 1rem;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1rem;
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all var(--transition-base) ease;
    background: white;
    cursor: pointer;
    width: 100%;
}

.btn-social:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.btn-social:active {
    transform: translateY(0);
}

.btn-google {
    color: #DB4437;
    border-color: #DB4437;
}

.btn-google:hover {
    background: #DB4437;
    color: white;
    border-color: #DB4437;
}

.btn-google i {
    margin-right: 0.5rem;
}

.btn-apple {
    color: #000000;
    border-color: #000000;
}

.btn-apple:hover {
    background: #000000;
    color: white;
    border-color: #000000;
}

/* Magic Link Section */
.magic-link-section {
    margin-top: 1rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--color-border);
}

.magic-link-section .btn-link {
    color: var(--color-primary);
    font-size: 0.9rem;
    padding: 0.5rem;
    transition: all var(--transition-base) ease;
}

.magic-link-section .btn-link:hover {
    color: var(--color-primary-dark);
    transform: translateY(-1px);
}

.magic-link-section .btn-link i {
    transition: transform var(--transition-base) ease;
}

.magic-link-section .btn-link:hover i {
    transform: translateX(2px);
}

/* ========================================
   ANIMAÇÕES
   ======================================== */

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

/* ========================================
   RESPONSIVIDADE - MOBILE
   ======================================== */

@media (max-width: 992px) {
    body.login-page {
        height: auto;
        min-height: 100vh;
    }

    .login-split-container {
        flex-direction: column;
        min-height: 100vh;
        height: auto;
    }

    .login-left-side {
        flex: 0 0 auto;
        min-height: 250px;
        padding: 1.5rem 1rem;
    }

    .brand-content {
        padding: 1rem;
    }

    .brand-logo {
        margin-bottom: 1rem;
    }

    .logo-icon {
        width: 100px;
        height: 100px;
        border-radius: 20px;
        padding: 1.25rem;
        margin-bottom: 1rem;
    }

    .logo-icon i {
        font-size: 35px;
    }

    .logo-icon img {
        width: 100%;
        height: 100%;
    }

    .brand-name {
        font-size: 1.75rem;
        margin-bottom: 0.25rem;
    }

    .brand-tagline {
        font-size: 0.9rem;
    }

    .brand-features {
        display: none; /* Ocultar features em mobile para economizar espaço */
    }

    .login-right-side {
        flex: 1;
        padding: 1.5rem 1rem 2rem;
        min-height: auto;
    }

    .login-form-container {
        max-width: 100%;
    }

    .login-form {
        padding: 1.5rem;
    }

    .login-header {
        margin-bottom: 1.5rem;
    }

    .login-header h2 {
        font-size: 1.5rem;
    }

    .login-header p {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .login-left-side {
        min-height: 200px;
        padding: 1rem;
    }

    .logo-icon {
        width: 80px;
        height: 80px;
        padding: 1rem;
        border-radius: 16px;
        margin-bottom: 0.75rem;
    }

    .logo-icon i {
        font-size: 30px;
    }

    .logo-icon img {
        width: 100%;
        height: 100%;
    }

    .brand-name {
        font-size: 1.5rem;
        letter-spacing: 1px;
    }

    .brand-tagline {
        font-size: 0.85rem;
    }

    .login-right-side {
        padding: 1rem;
    }

    .login-form {
        padding: 1.25rem;
        border-radius: 15px;
    }

    .login-header {
        margin-bottom: 1.25rem;
    }

    .form-group {
        margin-bottom: 1.25rem;
    }

    .form-control {
        padding: 0.75rem;
        font-size: 0.95rem;
    }

    .btn-login {
        padding: 0.875rem;
        font-size: 1rem;
    }

    .login-footer {
        margin-top: 1.5rem;
        font-size: 0.8rem;
    }
}

/* ========================================
   MODO ESCURO DESATIVADO
   Comentado para evitar ativação automática em sistemas com tema escuro
   Isso garante que a tela de login sempre use cores claras
   ======================================== */

/*
@media (prefers-color-scheme: dark) {
    .login-right-side {
        background: var(--bg-dark);
    }

    .login-header h2 {
        color: var(--bg-light);
    }

    .login-header p {
        color: var(--text-muted);
    }

    .login-form {
        background: var(--primary-dark);
    }

    .form-group label {
        color: var(--bg-light);
    }

    .form-control {
        background: var(--bg-dark);
        border-color: rgba(var(--primary-light-rgb), 0.3);
        color: var(--bg-light);
    }

    .form-control:focus {
        background: var(--primary-dark);
        border-color: var(--primary-light);
    }

    .form-check-label {
        color: var(--bg-light);
    }

    .login-footer {
        color: var(--text-muted);
    }
}
*/
