/**
 * Auth Pages - Premium SaaS Design System
 * Padrão: Stripe / Linear / Vercel
 * 
 * Design minimalista, neutro e executivo
 */

/* ============================================
   BASE
   ============================================ */

body.auth-page {
    background: linear-gradient(to bottom, #ffffff 0%, #f9fafb 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    padding: var(--ds-space-3);
    margin: 0;
}

/* ============================================
   AUTH CARD
   ============================================ */

.auth-card {
    background: white;
    border-radius: var(--ds-radius-xl);
    border: 1px solid var(--ds-gray-200);
    box-shadow: var(--ds-shadow-lg);
    overflow: hidden;
    max-width: 420px;
    width: 100%;
    animation: fadeInUp 0.4s ease-out;
}

.auth-card__header {
    padding: var(--ds-space-6);
    text-align: center;
    background: white;
    border-bottom: 1px solid var(--ds-gray-200);
}

.auth-card__header img {
    max-width: 180px;
    height: auto;
    margin-bottom: var(--ds-space-4);
}

.auth-card__header h4 {
    font-size: 1.5rem;
    font-weight: var(--ds-font-weight-bold);
    color: var(--ds-text-primary);
    margin: 0;
}

.auth-card__header p {
    font-size: 0.9375rem;
    color: var(--ds-text-secondary);
    margin: var(--ds-space-2) 0 0 0;
}

.auth-card__body {
    padding: var(--ds-space-6);
}

/* ============================================
   FORMS
   ============================================ */

.auth-form .form-label {
    font-size: 0.875rem;
    font-weight: var(--ds-font-weight-semibold);
    color: var(--ds-text-primary);
    margin-bottom: var(--ds-space-2);
}

.auth-form .form-control {
    border: 1px solid var(--ds-gray-300);
    border-radius: var(--ds-radius-md);
    padding: var(--ds-space-3) var(--ds-space-4);
    font-size: 1rem;
    color: var(--ds-text-primary);
    transition: all 0.15s ease;
    background: white;
}

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

.auth-form .form-control::placeholder {
    color: var(--ds-text-tertiary);
}

.auth-form .form-text {
    font-size: 0.8125rem;
    color: var(--ds-text-secondary);
    margin-top: var(--ds-space-1);
}

.auth-form .form-check {
    margin-bottom: var(--ds-space-6);
    display: flex;
    align-items: center;
}

.auth-form .form-check-input {
    border: 2px solid var(--ds-gray-300);
    border-radius: var(--ds-radius-sm);
    width: 1.125rem;
    height: 1.125rem;
    margin-top: 0;
    margin-right: var(--ds-space-2);
    cursor: pointer;
    background-color: white;
    flex-shrink: 0;
    position: relative;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.auth-form .form-check-input::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: var(--ds-radius-sm);
    background-color: transparent;
    transition: all 0.15s ease;
}

.auth-form .form-check-input:checked {
    background-color: var(--ds-primary);
    border-color: var(--ds-primary);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 0.75rem;
}

.auth-form .form-check-input:checked::before {
    background-color: var(--ds-primary);
}

.auth-form .form-check-input:focus {
    border-color: var(--ds-primary);
    box-shadow: 0 0 0 3px rgba(var(--ds-primary-rgb), 0.1);
    outline: none;
}

.auth-form .form-check-input:hover {
    border-color: var(--ds-primary-light);
}

.auth-form .form-check-label {
    font-size: 0.9375rem;
    color: var(--ds-text-secondary);
    margin-left: 0;
    cursor: pointer;
    user-select: none;
}

/* ============================================
   BUTTONS
   ============================================ */

.auth-btn {
    width: 100%;
    background: var(--ds-primary);
    color: white;
    font-weight: var(--ds-font-weight-semibold);
    font-size: 1rem;
    padding: var(--ds-space-4);
    border: none;
    border-radius: var(--ds-radius-md);
    transition: all 0.15s ease;
    margin-bottom: var(--ds-space-4);
}

.auth-btn:hover {
    background: var(--ds-primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--ds-shadow-md);
}

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

/* ============================================
   LINKS
   ============================================ */

.auth-link {
    color: var(--ds-primary);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: var(--ds-font-weight-medium);
    transition: color 0.15s ease;
}

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

.auth-link--back {
    display: inline-flex;
    align-items: center;
    gap: var(--ds-space-2);
    color: var(--ds-text-secondary);
}

.auth-link--back:hover {
    color: var(--ds-text-primary);
}

/* ============================================
   ALERTS
   ============================================ */

.auth-alert {
    border-radius: var(--ds-radius-md);
    border: none;
    padding: var(--ds-space-4);
    margin-bottom: var(--ds-space-6);
    font-size: 0.9375rem;
    animation: slideInDown 0.3s ease-out;
}

.auth-alert.alert-success {
    background: rgba(var(--ds-green-rgb), 0.1);
    color: var(--ds-green-dark);
    border-left: 3px solid var(--ds-green);
}

.auth-alert.alert-danger {
    background: rgba(var(--ds-pink-rgb), 0.1);
    color: var(--ds-pink-dark);
    border-left: 3px solid var(--ds-pink);
}

.auth-alert.alert-info {
    background: rgba(var(--ds-cyan-rgb), 0.1);
    color: var(--ds-cyan-dark);
    border-left: 3px solid var(--ds-cyan);
}

.auth-alert .btn-close {
    opacity: 0.5;
}

.auth-alert .btn-close:hover {
    opacity: 1;
}

/* ============================================
   FOOTER
   ============================================ */

.auth-footer {
    text-align: center;
    padding: var(--ds-space-6);
    background: var(--ds-gray-50);
    border-top: 1px solid var(--ds-gray-200);
}

.auth-footer small {
    font-size: 0.8125rem;
    color: var(--ds-text-secondary);
}

.auth-footer__link {
    display: inline-flex;
    align-items: center;
    gap: var(--ds-space-2);
    color: var(--ds-text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    margin-top: var(--ds-space-4);
    transition: color 0.15s ease;
}

.auth-footer__link:hover {
    color: var(--ds-text-primary);
}

/* ============================================
   HELPER TEXT
   ============================================ */

.auth-helper-text {
    font-size: 0.9375rem;
    color: var(--ds-text-secondary);
    line-height: 1.6;
    margin-bottom: var(--ds-space-6);
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

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

/* ============================================
   RESPONSIVIDADE
   ============================================ */

@media (max-width: 480px) {
    body.auth-page {
        padding: var(--ds-space-2);
        min-height: 100vh;
        align-items: flex-start;
        padding-top: var(--ds-space-4);
    }
    
    .auth-card {
        max-width: 100%;
        margin-top: 0;
    }
    
    .auth-card__header {
        padding: var(--ds-space-4);
    }
    
    .auth-card__header img {
        max-width: 140px;
        margin-bottom: var(--ds-space-2);
    }
    
    .auth-card__header h4 {
        font-size: 1.25rem;
        margin: 0;
    }
    
    .auth-card__body {
        padding: var(--ds-space-4);
    }
    
    .auth-helper-text {
        margin-bottom: var(--ds-space-4);
        font-size: 0.875rem;
    }
}

