/* SwarnSales CRM — Auth Pages Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #0a0b10;
    --surface: #13141c;
    --border: rgba(255,255,255,0.06);
    --text: #e2e8f0;
    --text-muted: #64748b;
    --primary: #6366f1;
    --primary-glow: rgba(99,102,241,0.35);
    --secondary: #06b6d4;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --radius: 20px;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* Animated gradient orbs */
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}
.orb-1 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, var(--primary), transparent 70%);
    top: -15%; left: -10%;
    animation: orbFloat1 12s ease-in-out infinite;
}
.orb-2 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, var(--secondary), transparent 70%);
    bottom: -10%; right: -8%;
    animation: orbFloat2 15s ease-in-out infinite;
}
.orb-3 {
    width: 300px; height: 300px;
    background: radial-gradient(circle, var(--accent), transparent 70%);
    top: 50%; left: 60%;
    opacity: 0.2;
    animation: orbFloat3 18s ease-in-out infinite;
}

@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(80px, 60px) scale(1.1); }
    66% { transform: translate(-40px, 100px) scale(0.9); }
}
@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-60px, -80px) scale(1.15); }
    66% { transform: translate(50px, -40px) scale(0.85); }
}
@keyframes orbFloat3 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-100px, 50px); }
}

/* Auth Container */
.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    padding: 20px;
}

.auth-card {
    background: rgba(19, 20, 28, 0.85);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 48px 40px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.03) inset;
    animation: cardSlideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(30px);
}

@keyframes cardSlideUp {
    to { opacity: 1; transform: translateY(0); }
}

/* Brand */
.brand {
    text-align: center;
    margin-bottom: 36px;
}

.brand-icon {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    font-size: 1.8rem;
    box-shadow: 0 8px 30px var(--primary-glow);
    animation: iconPulse 3s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { box-shadow: 0 8px 30px var(--primary-glow); }
    50% { box-shadow: 0 8px 50px rgba(6,182,212,0.4); }
}

.brand h2 {
    font-size: 1.6rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 6px;
}

.brand p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Form Fields */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    font-size: 1rem;
    z-index: 1;
    pointer-events: none;
}

.input-wrapper input,
.input-wrapper select {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 18px 14px 48px;
    font-size: 0.95rem;
    font-family: 'Outfit', sans-serif;
    color: var(--text);
    outline: none;
    transition: all 0.3s ease;
}

.input-wrapper input:focus,
.input-wrapper select:focus {
    border-color: var(--primary);
    background: rgba(99,102,241,0.06);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.input-wrapper input::placeholder {
    color: #475569;
}

/* Primary Button */
.btn-primary {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--primary), #818cf8);
    border: none;
    border-radius: 14px;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px var(--primary-glow);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255,255,255,0.15), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.btn-primary:hover::after {
    transform: translateX(100%);
}

/* Loader */
.btn-loader {
    width: 20px; height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin: 0 auto;
}

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

/* Error Message */
.error-message {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.3);
    color: #fca5a5;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.88rem;
    margin-bottom: 20px;
    animation: shakeIn 0.4s ease;
}

@keyframes shakeIn {
    0% { transform: translateX(-10px); opacity: 0; }
    25% { transform: translateX(8px); }
    50% { transform: translateX(-5px); }
    75% { transform: translateX(3px); }
    100% { transform: translateX(0); opacity: 1; }
}

/* Success Message */
.success-message {
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.3);
    color: #6ee7b7;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.88rem;
    margin-bottom: 20px;
}

/* Switch Form */
.switch-form {
    text-align: center;
    margin-top: 24px;
}

.switch-form p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.switch-form a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.switch-form a:hover {
    color: var(--secondary);
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

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

/* Invite Code Toggle */
.invite-toggle {
    text-align: center;
    margin-top: 16px;
}

.invite-toggle button {
    background: none;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 20px;
    color: var(--text-muted);
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
}

.invite-toggle button:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.invite-section {
    display: none;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.invite-section.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* Responsive */
@media (max-width: 480px) {
    .auth-card {
        padding: 36px 24px;
    }
    .brand-icon {
        width: 56px; height: 56px;
        font-size: 1.5rem;
    }
    .brand h2 {
        font-size: 1.4rem;
    }
}
