/* Auth Pages Styles */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--background);
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(37, 99, 235, 0.1), transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(37, 99, 235, 0.08), transparent 40%);
}

.auth-container {
    width: 100%;
    max-width: 440px;
    padding: var(--spacing-md);
}

/* Cadastro form grid layout */
.auth-container:has(.cadastro-form-grid) {
    max-width: 800px;
}

.auth-box {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--spacing-2xl);
    box-shadow: var(--shadow-xl);
}

.auth-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.auth-logo {
    height: 72px;
    margin-bottom: var(--spacing-lg);
}

.auth-title {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

.form-row .form-group {
    margin: 0;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.input-with-icon {
    position: relative;
    width: 100%;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

.form-input.with-icon {
    padding-left: 2.75rem;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    cursor: pointer;
    color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
    cursor: pointer;
}

.link-text {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

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

.auth-submit {
    width: 100%;
    margin-top: var(--spacing-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.error-message {
    color: var(--danger-color);
    background-color: rgba(239, 68, 68, 0.1);
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 15px;
    border-left: 3px solid var(--danger-color);
}

.success-message {
    color: #10b981;
    background-color: rgba(16, 185, 129, 0.1);
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 15px;
    border-left: 3px solid #10b981;
    display: flex;
    align-items: center;
    gap: 10px;
}

.success-message::before {
    content: '✓';
    font-size: 18px;
    font-weight: bold;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease-in-out;
}

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

.modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

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

.modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #6b7280;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.modal-close:hover {
    background-color: #f3f4f6;
    color: var(--primary-color);
}

.modal-body {
    padding: 24px;
}

.modal-description {
    color: #6b7280;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 24px;
}

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

.modal-body .btn {
    width: 100%;
    margin-top: 10px;
}

.success-message {
    padding: 0.75rem 1rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: var(--radius-md);
    color: #86EFAC;
    font-size: 0.875rem;
    text-align: center;
}

.auth-footer {
    margin-top: var(--spacing-lg);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin: var(--spacing-lg) 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* Loading state */
.auth-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-submit.loading {
    position: relative;
    color: transparent;
}

.auth-submit.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Responsivo */
@media (max-width: 768px) {
    .auth-container:has(.cadastro-form-grid) {
        max-width: 440px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
}

@media (max-width: 480px) {
    .auth-box {
        padding: var(--spacing-lg);
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
}
