/*
   Order Capture System (AR Pedidos)
   Auth Styling (Login & Password Recovery)
*/

.auth-wrapper {
    min-height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 10% 20%, HSL(222, 25%, 10%) 0%, HSL(222, 25%, 5%) 90%);
    position: relative;
    overflow: hidden;
    padding: 20px;
}

/* Background Glowing Orbs */
.auth-wrapper::before,
.auth-wrapper::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: var(--border-radius-full);
    filter: blur(100px);
    opacity: 0.12;
    pointer-events: none;
    z-index: 1;
}

.auth-wrapper::before {
    background-color: var(--color-primary);
    top: 15%;
    left: 20%;
    animation: floatOrb 8s infinite alternate ease-in-out;
}

.auth-wrapper::after {
    background-color: var(--color-secondary);
    bottom: 15%;
    right: 20%;
    animation: floatOrb 12s infinite alternate-reverse ease-in-out;
}

@keyframes floatOrb {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(30px) scale(1.1); }
}

/* Auth Card */
.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 40px;
    position: relative;
    z-index: 10;
    transition: transform var(--transition-md), box-shadow var(--transition-md);
}

.auth-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), var(--shadow-primary);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    height: 60px;
    margin-bottom: 16px;
    object-fit: contain;
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--color-text-primary), var(--color-text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 6px;
}

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

/* Forms and Tabs */
.auth-panels {
    position: relative;
}

.auth-panel {
    display: none;
}

.auth-panel.active {
    display: block;
    animation: fadeInSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.input-container {
    position: relative;
    margin-bottom: 20px;
}

.input-container input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    background-color: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    color: var(--color-text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

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

.input-container svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--color-text-muted);
    pointer-events: none;
    transition: color var(--transition-fast);
}

.input-container input:focus + svg {
    color: var(--color-primary);
}

.auth-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    font-size: 0.85rem;
}

.auth-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: color var(--transition-fast);
}

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

.btn-auth {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--border-radius-md);
    margin-bottom: 16px;
}

/* Password Strength Indicator */
.pw-strength-bar {
    height: 4px;
    background-color: var(--color-border);
    border-radius: var(--border-radius-full);
    margin-top: 8px;
    overflow: hidden;
    display: flex;
}

.pw-strength-fill {
    height: 100%;
    width: 0;
    transition: width var(--transition-fast), background-color var(--transition-fast);
}

/* Spinner indicator */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: var(--border-radius-full);
    animation: spin 0.8s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Recovery Wizard Steps */
.wizard-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
    position: relative;
}

.wizard-steps::before {
    content: '';
    position: absolute;
    top: 14px;
    left: 10%;
    right: 10%;
    height: 2px;
    background-color: var(--color-border);
    z-index: 1;
}

.wizard-step {
    width: 30px;
    height: 30px;
    border-radius: var(--border-radius-full);
    background-color: var(--color-surface);
    border: 2px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text-muted);
    position: relative;
    z-index: 2;
    transition: all var(--transition-fast);
}

.wizard-step.active {
    border-color: var(--color-primary);
    background-color: var(--color-primary);
    color: #fff;
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.4);
}

.wizard-step.completed {
    border-color: var(--color-success);
    background-color: var(--color-success);
    color: #fff;
}

.alert-message {
    padding: 12px 16px;
    border-radius: var(--border-radius-md);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 20px;
    display: none;
}

.alert-message.error {
    display: block;
    background-color: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--color-danger);
}

.alert-message.success {
    display: block;
    background-color: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--color-success);
}

@media (max-width: 480px) {
    .auth-card {
        padding: 30px 20px;
    }
}
