/* ==========================================================================
   ESTILOS ESPECÍFICOS DA PÁGINA DE LOGIN
   ========================================================================== */

/* ==========================================================================
   CONTAINER PRINCIPAL
   ========================================================================== */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 2rem 1rem;
    position: relative;
}

/* ==========================================================================
   CARD DE LOGIN
   ========================================================================== */
.login-card {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 400px;
    position: relative;
    overflow: hidden;
    margin: auto;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

/* ==========================================================================
   HEADER DO LOGIN
   ========================================================================== */
.login-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-logo {
    width: 70px;
    height: 70px;
    margin: 0 auto 0.75rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.75rem;
    box-shadow: var(--shadow-md);
}

.login-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.login-subtitle {
    color: var(--gray-600);
    font-size: 0.95rem;
}

/* ==========================================================================
   FORMULÁRIO
   ========================================================================== */
.login-form {
    margin-top: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
    position: relative;
}

.form-label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    display: block;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
}

.form-group.focused .form-label {
    color: var(--primary-color);
    font-weight: 700;
}

.form-control::placeholder {
    color: var(--gray-400);
}

/* ==========================================================================
   ÍCONES NOS CAMPOS
   ========================================================================== */
.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    transition: color 0.3s ease;
    z-index: 2;
}

.form-control:focus + .input-icon {
    color: var(--primary-color);
}

.form-control.has-icon {
    padding-left: 3rem;
}

/* ==========================================================================
   TOGGLE DE SENHA
   ========================================================================== */
.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 2;
}

.password-toggle:hover {
    color: var(--primary-color);
}

/* ==========================================================================
   GRUPO DE NOMES (NOVO CADASTRO)
   ========================================================================== */
.name-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 480px) {
    .name-group {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   BOTÃO DE LOGIN
   ========================================================================== */
.btn-login {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled,
.btn-login.btn-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    background: var(--gray-400);
}

.btn-login:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ==========================================================================
   VALIDAÇÃO
   ========================================================================== */
.text-danger {
    color: var(--danger-color) !important;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.validation-summary-errors {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-top: 1rem;
    color: var(--danger-color);
    font-size: 0.875rem;
}

.validation-summary-errors ul {
    margin: 0;
    padding-left: 1.5rem;
}

.validation-summary-errors li {
    margin-bottom: 0.25rem;
}

/* ==========================================================================
   ALERTAS E MENSAGENS
   ========================================================================== */
.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    border: none;
    position: relative;
    animation: slideInDown 0.5s ease-out;
}

.alert-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.alert-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.success-message {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    border-left: 4px solid #10b981;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    color: #065f46;
    border: 1px solid #bbf7d0;
}

.success-message .alert-content {
    display: flex;
    align-items: center;
    flex: 1;
}

.success-message i {
    color: #10b981;
    font-size: 1.1rem;
}

.alert-close {
    background: none;
    border: none;
    color: #10b981;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--border-radius);
    transition: var(--transition-normal);
    margin-left: 0.5rem;
}

.alert-close:hover {
    background: rgba(16, 185, 129, 0.1);
    transform: scale(1.1);
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   FOOTER DO LOGIN
   ========================================================================== */
.login-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.login-register-link {
    font-size: 0.98rem;
    color: var(--gray-600);
}

.register-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    margin-left: 0.2rem;
    transition: color 0.2s;
}

.register-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ==========================================================================
   CHECKBOX DE TERMOS
   ========================================================================== */
.terms-checkbox {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(99, 102, 241, 0.05);
    border-radius: var(--border-radius);
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.terms-checkbox input[type="checkbox"] {
    margin-right: 0.5rem;
}

.terms-checkbox label {
    font-size: 0.875rem;
    color: var(--gray-600);
    cursor: pointer;
}

.terms-checkbox a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.terms-checkbox a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   CAIXA INFORMATIVA
   ========================================================================== */
.info-box {
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.1);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.info-box i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

/* ==========================================================================
   CONFIRMAÇÃO DE CADASTRO - CÓDIGO
   ========================================================================== */
.codigo-ok {
    color: var(--primary-color);
    font-weight: 600;
}

.timer {
    font-size: 0.95rem;
    color: #888;
    margin-left: 0.5rem;
    font-weight: 500;
}

.reenviar-btn[disabled] {
    opacity: 0.6;
    pointer-events: none;
}

.input-group {
    position: relative;
    display: flex;
    align-items: stretch;
}

.input-group .form-control {
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    border-right: none;
}

.input-group .btn {
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    border-left: none;
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    font-weight: 600;
    transition: all 0.3s ease;
}

.input-group .btn:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.codigo-status {
    margin-top: 0.5rem;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 500;
    display: none;
}

.codigo-status.success {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.codigo-status.error {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.codigo-status.info {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.timer-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: rgba(99, 102, 241, 0.05);
    border-radius: var(--border-radius);
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.timer-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.timer-icon {
    color: var(--primary-color);
    font-size: 0.875rem;
}

.reenviar-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-reenviar {
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.btn-reenviar:hover:not(:disabled) {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-dark);
}

.btn-reenviar:disabled {
    color: #9ca3af;
    cursor: not-allowed;
}

/* ==========================================================================
   FORÇA DA SENHA
   ========================================================================== */
.password-strength {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--gray-600);
}

.strength-bar {
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    margin-top: 0.25rem;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-weak { background: #ef4444; width: 25%; }
.strength-medium { background: #f59e0b; width: 50%; }
.strength-good { background: #10b981; width: 75%; }
.strength-strong { background: #059669; width: 100%; }

/* ==========================================================================
   ELEMENTOS DECORATIVOS
   ========================================================================== */
.login-decoration {
    position: absolute;
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: 50%;
    top: -100px;
    right: -100px;
    z-index: -1;
}

.login-decoration::after {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
    border-radius: 50%;
    bottom: -75px;
    left: -75px;
}

/* ==========================================================================
   RESPONSIVIDADE
   ========================================================================== */
@media (min-width: 1200px) {
    .login-container {
        padding: 3rem 2rem;
    }
    
    .login-card {
        max-width: 450px;
        padding: 3rem 2.5rem;
    }
    
    .login-title {
        font-size: 2rem;
    }
    
    .login-logo {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .login-container {
        padding: 2.5rem 1.5rem;
    }
    
    .login-card {
        max-width: 420px;
        padding: 2.75rem 2.25rem;
    }
}

@media (max-width: 768px) {
    .login-container {
        padding: 1.5rem 1rem;
    }
    
    .login-card {
        padding: 2rem 1.5rem;
        max-width: 350px;
    }
    
    .login-title {
        font-size: 1.5rem;
    }
    
    .login-logo {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 1rem 0.75rem;
    }
    
    .login-card {
        padding: 1.75rem 1.25rem;
        max-width: 320px;
    }
    
    .login-title {
        font-size: 1.4rem;
    }
    
    .login-subtitle {
        font-size: 0.85rem;
    }
    
    .login-logo {
        width: 55px;
        height: 55px;
        font-size: 1.4rem;
    }
    
    .form-control {
        padding: 0.625rem 0.875rem;
        font-size: 0.95rem;
    }
    
    .btn-login {
        padding: 0.875rem;
        font-size: 1rem;
    }
}

@media (max-width: 360px) {
    .login-container {
        padding: 0.75rem 0.5rem;
    }
    
    .login-card {
        padding: 1.5rem 1rem;
        max-width: 280px;
    }
    
    .login-title {
        font-size: 1.3rem;
    }
    
    .login-subtitle {
        font-size: 0.8rem;
    }
    
    .login-logo {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    .form-control {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .btn-login {
        padding: 0.75rem;
        font-size: 0.95rem;
    }
}

/* ==========================================================================
   ANIMAÇÕES
   ========================================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card {
    animation: fadeInUp 0.6s ease-out;
}

/* ==========================================================================
   ESTADOS DE LOADING
   ========================================================================== */
.btn-login.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn-login.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.btn-login.loading i {
    display: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   FEEDBACK VISUAL
   ========================================================================== */
.form-group.focused .form-control {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group.focused .form-label {
    color: var(--primary-color);
    font-weight: 700;
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* ==========================================================================
   MENSAGENS DE ERRO MELHORADAS
   ========================================================================== */
.text-danger {
    color: var(--danger-color) !important;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
    animation: fadeIn 0.3s ease-in;
}

.validation-summary-errors {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-top: 1rem;
    color: var(--danger-color);
    font-size: 0.875rem;
    animation: slideIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
} 