/* ============================================================
   ECHO-GLANCE - Auth Pages Stylesheet (Login / Register)
   Split-screen design with brand showcase
   ============================================================ */

/* === AUTH LAYOUT === */
.auth-wrapper {
    display: flex;
    min-height: 100vh;
    background: var(--color-bg);
}

/* Left Panel - Brand Showcase */
.auth-brand {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, var(--color-primary-dark) 0%, #0D1845 60%, #070E30 100%);
    position: relative;
    overflow: hidden;
    padding: var(--space-3xl);
}

.auth-brand::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 65, 178, 0.3) 0%, transparent 70%);
    top: -100px;
    right: -200px;
    pointer-events: none;
}

.auth-brand::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(242, 114, 30, 0.15) 0%, transparent 70%);
    bottom: -50px;
    left: -100px;
    pointer-events: none;
}

.auth-brand-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 400px;
}

.auth-brand-logo {
    width: 180px;
    height: auto;
    margin-bottom: var(--space-xl);
    filter: drop-shadow(0 4px 20px rgba(0,0,0,0.3));
    animation: floatLogo 6s ease-in-out infinite;
}

@keyframes floatLogo {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.auth-brand h1 {
    color: #FFFFFF;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: var(--space-md);
    letter-spacing: 0.02em;
}

.auth-brand h1 span {
    color: var(--color-accent);
}

.auth-brand p {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.9375rem;
    line-height: 1.7;
    margin-bottom: var(--space-xl);
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    text-align: left;
}

.auth-feature-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
}

.auth-feature-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-feature-text {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
}

/* Floating decorative elements */
.auth-brand .floating-shape {
    position: absolute;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
    pointer-events: none;
}

.floating-shape-1 {
    width: 80px;
    height: 80px;
    top: 15%;
    left: 10%;
    animation: float1 8s ease-in-out infinite;
}

.floating-shape-2 {
    width: 60px;
    height: 60px;
    bottom: 20%;
    right: 15%;
    animation: float2 10s ease-in-out infinite;
    border-radius: 50% !important;
}

.floating-shape-3 {
    width: 40px;
    height: 40px;
    top: 60%;
    left: 20%;
    animation: float3 7s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(15px, -20px) rotate(45deg); }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-10px, 15px); }
}

@keyframes float3 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(10px, 10px) rotate(-30deg); }
}

/* Right Panel - Form */
.auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    max-width: 580px;
}

.auth-form-container {
    width: 100%;
    max-width: 420px;
    animation: fadeInUp 0.6s ease both;
}

.auth-form-header {
    margin-bottom: var(--space-2xl);
}

.auth-form-header .auth-logo-mobile {
    display: none;
    width: 48px;
    margin-bottom: var(--space-md);
}

.auth-form-header h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: var(--space-xs);
}

.auth-form-header p {
    color: var(--color-text-muted);
    font-size: 0.9375rem;
}

/* Form styles */
.auth-form .form-group {
    margin-bottom: var(--space-lg);
}

.auth-form .form-input {
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    border-radius: var(--radius-md);
    background: var(--color-bg);
    border-color: transparent;
}

.auth-form .form-input:focus {
    background: var(--color-card);
    border-color: var(--color-primary);
}

.auth-form .form-label {
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.auth-form .btn-primary {
    width: 100%;
    padding: 0.875rem;
    font-size: 1rem;
    border-radius: var(--radius-md);
    margin-top: var(--space-sm);
}

.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
    transition: color var(--transition-fast);
}

.password-toggle:hover {
    color: var(--color-text);
}

/* Role Selector */
.role-selector {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.role-option {
    flex: 1;
    position: relative;
}

.role-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.role-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-sm);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    background: var(--color-card);
    text-align: center;
}

.role-option label:hover {
    border-color: var(--color-primary-light);
    background: var(--color-primary-surface);
}

.role-option input:checked + label {
    border-color: var(--color-primary);
    background: var(--color-primary-surface);
    box-shadow: 0 0 0 3px rgba(37, 65, 178, 0.1);
}

.role-option .role-icon {
    font-size: 1.5rem;
}

.role-option .role-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text);
}

.role-option .role-desc {
    font-size: 0.6875rem;
    color: var(--color-text-muted);
}

/* STR Field (conditional reveal) */
.str-field {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
    margin-top: 0;
}

.str-field.visible {
    max-height: 120px;
    opacity: 1;
    margin-top: 0;
}

/* Auth footer links */
.auth-footer {
    text-align: center;
    margin-top: var(--space-xl);
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.auth-footer a {
    font-weight: 600;
    color: var(--color-primary);
}

.auth-footer a:hover {
    color: var(--color-accent);
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin: var(--space-xl) 0;
    color: var(--color-text-muted);
    font-size: 0.8125rem;
}

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

/* Success state */
.auth-success {
    text-align: center;
    padding: var(--space-2xl);
}

.auth-success .success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--color-success-surface);
    color: var(--color-success);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto var(--space-lg);
    animation: scaleIn 0.5s var(--transition-spring);
}

.auth-success h3 {
    margin-bottom: var(--space-sm);
}

.auth-success p {
    color: var(--color-text-muted);
    margin-bottom: var(--space-xl);
}

/* Pending verification page */
.pending-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: var(--space-2xl);
    text-align: center;
    background: var(--color-bg);
}

.pending-card {
    background: var(--color-card);
    border-radius: var(--radius-xl);
    padding: var(--space-3xl) var(--space-2xl);
    max-width: 480px;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.6s ease both;
}

.pending-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--color-warning-surface);
    color: var(--color-warning);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto var(--space-xl);
    animation: pulse-glow-orange 2s ease-in-out infinite;
}

@keyframes pulse-glow-orange {
    0%, 100% { box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.3); }
    50% { box-shadow: 0 0 0 12px rgba(217, 119, 6, 0); }
}

.pending-card h2 {
    margin-bottom: var(--space-md);
}

.pending-card p {
    color: var(--color-text-muted);
    line-height: 1.7;
    margin-bottom: var(--space-xl);
}

.pending-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .auth-brand {
        display: none;
    }

    .auth-form-panel {
        max-width: 100%;
    }

    .auth-form-header .auth-logo-mobile {
        display: block;
    }
}

@media (max-width: 480px) {
    .auth-form-panel {
        padding: var(--space-lg);
    }

    .auth-form-header h2 {
        font-size: 1.5rem;
    }

    .role-selector {
        flex-direction: column;
    }

    .pending-actions {
        flex-direction: column;
    }
}
