/* =============================================================================
   CASHLEX — Auth Pages (Register, Login, Activate)
   ============================================================================= */

/* =============================================================================
   AUTH SHELL — Two-panel layout
   ============================================================================= */
.auth-shell {
    display: flex;
    min-height: 100vh;
}

/* =============================================================================
   BRAND PANEL (left side, desktop only)
   ============================================================================= */
.auth-brand {
    flex: 0 0 420px;
    background: var(--bg-card);
    border-right: 1px solid var(--border-subtle);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-8);
}

/* Animated gradient background */
.auth-brand::before {
    content: '';
    position: absolute;
    inset: -50%;
    background: radial-gradient(ellipse at 30% 40%, rgba(124,58,237,0.15) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 80%, rgba(6,182,212,0.1) 0%, transparent 60%);
    animation: rotateBg 20s linear infinite;
}

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

.auth-brand-inner {
    position: relative;
    z-index: 1;
    max-width: 340px;
}

.auth-brand-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-8);
}

.auth-brand-logo span {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-brand-headline {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    line-height: 1.25;
    margin-bottom: var(--space-4);
}

.auth-brand-sub {
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: var(--space-8);
}

/* Stats */
.auth-brand-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
    padding: var(--space-5);
    background: var(--glass-bg);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-card);
    backdrop-filter: blur(8px);
}

.auth-stat { text-align: center; }
.auth-stat-value { display: block; font-size: 1.125rem; font-weight: 800; letter-spacing: -0.01em; }
.auth-stat-label { font-size: 0.6875rem; color: var(--text-muted); margin-top: 2px; display: block; }

/* Decorative glow */
.auth-brand-glow {
    position: absolute;
    bottom: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(124,58,237,0.2) 0%, transparent 70%);
    pointer-events: none;
}

/* =============================================================================
   FORM PANEL (right side)
   ============================================================================= */
.auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6) var(--space-4);
    overflow-y: auto;
}

.auth-form-inner {
    width: 100%;
    max-width: 440px;
}

/* Mobile logo */
.auth-mobile-logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    justify-content: center;
    margin-bottom: var(--space-6);
}

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

.auth-form-header h2 {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

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

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

/* Two-column form grid */
.auth-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
}

.auth-form-grid .span-2 { grid-column: span 2; }

@media (max-width: 500px) {
    .auth-form-grid { grid-template-columns: 1fr; }
    .auth-form-grid .span-2 { grid-column: span 1; }
}

/* Alert */
.alert {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-input);
    font-size: 0.875rem;
    margin-bottom: var(--space-5);
    border: 1px solid;
}

.alert-danger {
    background: var(--danger-bg);
    border-color: var(--danger);
    color: var(--danger);
}

.alert-success {
    background: var(--success-bg);
    border-color: var(--success);
    color: var(--success);
}

/* Activation fee notice */
.activation-notice {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    background: rgba(6,182,212,0.08);
    border: 1px solid rgba(6,182,212,0.2);
    border-radius: var(--radius-input);
    font-size: 0.8125rem;
    color: var(--accent-secondary);
    margin-bottom: var(--space-4);
    line-height: 1.5;
}

.activation-notice svg { flex-shrink: 0; margin-top: 1px; }

/* Password strength */
.password-strength {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-top: var(--space-2);
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: var(--border-subtle);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0%;
    border-radius: var(--radius-full);
    transition: width 300ms ease, background 300ms ease;
}

.strength-label {
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Input toggle (show/hide password) */
.input-wrap-toggle { position: relative; }
.input-wrap-toggle .form-input { padding-right: 2.75rem; }

.input-toggle-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 0;
    /* Flex-center the SVG — kills baseline offset that misaligned the eye */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    line-height: 0;
    cursor: pointer;
    transition: color var(--transition), background var(--transition);
}
.input-toggle-btn svg { display: block; }
.input-toggle-btn:hover { color: var(--text-primary); background: var(--glass-hover); }
/* Reserve room so text never runs under the eye */
.input-wrap-toggle .form-input { padding-right: 3rem; }

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1.5;
    user-select: none;
}

.checkbox-input { display: none; }

.checkbox-box {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 1.5px solid var(--border-input);
    border-radius: 4px;
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    margin-top: 1px;
}

.checkbox-box svg {
    width: 10px;
    height: 10px;
    color: white;
    opacity: 0;
    transition: opacity var(--transition);
}

.checkbox-input:checked + .checkbox-box {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.checkbox-input:checked + .checkbox-box svg { opacity: 1; }

.checkbox-label.error .checkbox-box { border-color: var(--danger); }

/* =============================================================================
   LOGIN PAGE SPECIFIC
   ============================================================================= */
.login-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
}

.forgot-link {
    font-size: 0.8125rem;
    color: var(--accent-primary);
    text-align: right;
    display: block;
    margin-top: -var(--space-2);
}

/* =============================================================================
   ACTIVATE PAGE
   ============================================================================= */
.activate-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    position: relative;
    text-align: center;
    max-width: 420px;
    margin: 0 auto;
}

.activate-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--gradient-main);
}

.activate-icon {
    width: 52px;
    height: 52px;
    background: var(--gradient-subtle);
    border: 1px solid var(--border-card);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-3);
    color: var(--accent-primary);
}

.activate-fee {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: var(--space-2) 0 2px;
}

.activate-fee-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: var(--space-4);
}

/* STK Push status */
.stk-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-5);
    background: var(--success-bg);
    border: 1px solid var(--success);
    border-radius: var(--radius-input);
    color: var(--success);
    font-size: 0.9375rem;
}

.stk-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(16,185,129,0.2);
    border-top-color: var(--success);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */
@media (max-width: 768px) {
    .auth-brand { display: none !important; }
    .auth-form-panel { padding: var(--space-5) var(--space-4); }
}

/* =============================================================================
   v5 — COLORFUL AUTH
   ============================================================================= */

/* Auth form card: glass panel with gradient border glow + top accent
   (this is the bordered card seen on the live login/register pages) */
.auth-form-inner {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-card);
    padding: var(--space-6) var(--space-5);
    box-shadow:
        0 0 0 1px rgba(6,182,212,0.08),
        0 24px 60px -24px rgba(124,58,237,0.45);
    overflow: hidden;
}
.auth-form-inner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #7C3AED, #EC4899, #06B6D4);
}

/* Focused inputs glow with the gradient hue */
.form-input:focus, .form-select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(124,58,237,0.18), 0 0 20px -6px rgba(6,182,212,0.35);
}
