/* ===================================
   Authentication Pages - Styles
   =================================== */

/* Auth Container */
.auth-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    position: relative;
    overflow: hidden;
}

/* ── Signup step 2: fade-in after type picker (signup only) ──── */
.auth-container.signup-fade {
    opacity: 0;
    transition: opacity 0.4s ease;
}
.auth-container.signup-fade.auth-container-visible { opacity: 1; }

/* ── Selected profile type badge ──────────── */
.selected-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 5px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(99,102,241,0.12);
    border: 1px solid rgba(99,102,241,0.3);
    color: #a78bfa;
}
.selected-type-badge.badge-creator {
    background: rgba(236,72,153,0.12);
    border-color: rgba(236,72,153,0.3);
    color: #f472b6;
}
.change-type-link {
    background: none;
    border: none;
    color: inherit;
    font-size: 11px;
    cursor: pointer;
    opacity: 0.7;
    padding: 0;
    font-family: inherit;
    font-weight: 600;
    transition: opacity 0.2s;
}
.change-type-link:hover { opacity: 1; }

/* ═══════════════════════════════════════════════
   Profile Type Overlay  (Step 1 of signup)
   ═══════════════════════════════════════════════ */
.pto-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 24px 16px 40px;
    transition: opacity 0.38s ease, transform 0.38s ease;
}
.pto-overlay.pto-exit {
    opacity: 0;
    transform: scale(0.97);
    pointer-events: none;
}

/* Animated bg orbs */
.pto-bg { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.pto-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.22;
    animation: ptoOrb 16s ease-in-out infinite alternate;
}
.pto-orb-1 { width:600px; height:600px; top:-200px; left:-150px; background:#a855f7; animation-delay:0s; }
.pto-orb-2 { width:500px; height:500px; bottom:-200px; right:-150px; background:#ec4899; animation-delay:8s; }
@keyframes ptoOrb {
    from { transform: translate(0,0) scale(1); }
    to   { transform: translate(40px,30px) scale(1.1); }
}

.pto-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 720px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.pto-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: #f4f0ff;
}
.pto-logo-icon {
    width: 40px; height: 40px;
    background: linear-gradient(135deg,#a855f7,#ec4899);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 18px rgba(168,85,247,0.4);
}

.pto-title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(22px, 5vw, 34px);
    font-weight: 900;
    color: #f4f0ff;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.pto-sub {
    font-size: 15px;
    color: rgba(244,240,255,0.55);
    margin-bottom: 32px;
}

/* Cards grid */
.pto-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
}

.pto-card {
    position: relative;
    border-radius: 20px;
    padding: 2px; /* gradient border trick */
    cursor: pointer;
    outline: none;
    border: none;
    background: transparent; /* will be set per variant */
    text-align: left;
    transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
    width: 100%;
}
.pto-card:hover  { transform: translateY(-6px) scale(1.02); }
.pto-card:active { transform: scale(0.97); }
.pto-card:focus-visible { outline: 2px solid #a855f7; outline-offset: 2px; }

/* Professional card */
.pto-pro {
    background: linear-gradient(135deg, rgba(99,102,241,0.7), rgba(139,92,246,0.5));
}
.pto-infl {
    background: linear-gradient(135deg, #a855f7, #ec4899, #06b6d4);
}

.pto-card-inner {
    background: #0f0f23;
    border-radius: 18px;
    padding: 28px 24px 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.pto-icon-wrap {
    width: 60px; height: 60px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px;
    margin-bottom: 4px;
}
.pto-pro  .pto-icon-wrap { background: rgba(99,102,241,0.18); color: #a78bfa; }
.pto-infl .pto-icon-wrap { background: linear-gradient(135deg,#a855f7,#ec4899); color: #fff; box-shadow: 0 4px 20px rgba(236,72,153,0.4); }

.pto-card-inner h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: #f4f0ff;
    margin-bottom: 2px;
}
.pto-card-inner p {
    font-size: 13px;
    color: rgba(244,240,255,0.55);
    line-height: 1.5;
    margin-bottom: 4px;
}

.pto-features {
    list-style: none;
    text-align: left;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin: 4px 0;
}
.pto-features li {
    font-size: 13px;
    color: rgba(244,240,255,0.7);
    display: flex;
    align-items: center;
    gap: 8px;
}
.pto-features li i { font-size: 11px; }
.pto-pro  .pto-features li i { color: #a78bfa; }
.pto-infl .pto-features li i { color: #f472b6; }

.pto-cta-btn {
    margin-top: auto;
    padding: 10px 22px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: box-shadow 0.2s;
}
.pto-pro  .pto-cta-btn { background: rgba(99,102,241,0.2); color: #a78bfa; border: 1px solid rgba(99,102,241,0.4); }
.pto-infl .pto-cta-btn { background: linear-gradient(135deg,#a855f7,#ec4899); color: #fff; box-shadow: 0 4px 18px rgba(168,85,247,0.35); }
.pto-infl:hover .pto-cta-btn { box-shadow: 0 6px 26px rgba(236,72,153,0.45); }

/* Hot badge */
.pto-hot-badge {
    position: absolute;
    top: -10px; right: 16px;
    background: linear-gradient(135deg,#f97316,#ef4444);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 100px;
    box-shadow: 0 4px 14px rgba(239,68,68,0.4);
    z-index: 2;
    letter-spacing: 0.02em;
}

.pto-login-hint {
    margin-top: 28px;
    font-size: 13px;
    color: rgba(244,240,255,0.45);
}
.pto-login-hint a { color: #a78bfa; text-decoration: none; font-weight: 600; }
.pto-login-hint a:hover { text-decoration: underline; }

/* Responsive */
@media (max-width: 600px) {
    .pto-grid {
        grid-template-columns: 1fr;
        max-width: 360px;
    }
    .pto-overlay { padding: 20px 16px 36px; }
    .pto-content { gap: 4px; }
    .pto-sub     { margin-bottom: 24px; }
    .pto-card-inner { padding: 24px 20px 20px; }
}


/* Background */
.auth-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
}

.auth-bg .bg-gradient {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(99, 102, 241, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(124, 58, 237, 0.2) 0%, transparent 50%);
}

.bg-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), transparent);
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 400px;
    height: 400px;
    top: -200px;
    left: -100px;
}

.shape-2 {
    width: 300px;
    height: 300px;
    bottom: -150px;
    right: -100px;
    animation-delay: -5s;
}

.shape-3 {
    width: 200px;
    height: 200px;
    top: 50%;
    left: 50%;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(20px, -20px) rotate(5deg); }
    50% { transform: translate(-10px, 20px) rotate(-5deg); }
    75% { transform: translate(-20px, -10px) rotate(3deg); }
}

/* Auth Card */
.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.signup-card {
    max-width: 480px;
}

/* Auth Logo */
.auth-logo {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.logo-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto var(--space-md);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    box-shadow: var(--shadow-glow);
}

.auth-logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.auth-logo p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Auth Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.auth-form .form-group {
    margin-bottom: 0;
}

.auth-form .form-group label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.auth-form .form-group label i {
    font-size: 14px;
    color: var(--primary);
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="tel"] {
    width: 100%;
    padding: var(--space-md);
    background: var(--bg-surface);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 15px;
    transition: all var(--transition-normal);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-dark);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.auth-form input::placeholder {
    color: var(--text-muted);
}

/* Password Input */
.password-input {
    position: relative;
}

.password-input input {
    padding-right: 50px;
}

.toggle-password {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: color var(--transition-normal);
}

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

/* Username Input */
.username-input {
    display: flex;
    align-items: stretch;
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.username-prefix {
    display: flex;
    align-items: center;
    padding: 0 var(--space-md);
    background: var(--bg-dark);
    color: var(--text-muted);
    font-size: 13px;
    border-right: 1px solid var(--bg-surface);
    white-space: nowrap;
}

.username-input input {
    border-radius: 0;
    background: transparent;
}

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

.strength-bar {
    flex: 1;
    height: 4px;
    background: var(--bg-surface);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.strength-bar::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: var(--error);
    transition: all var(--transition-normal);
}

.password-strength.weak .strength-bar::after {
    width: 33%;
    background: var(--error);
}

.password-strength.medium .strength-bar::after {
    width: 66%;
    background: var(--warning);
}

.password-strength.strong .strength-bar::after {
    width: 100%;
    background: var(--success);
}

.strength-text {
    font-size: 12px;
    color: var(--text-muted);
}

/* Form Row */
.auth-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

/* Form Options */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    display: none;
}

.remember-me .checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--text-muted);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.remember-me input:checked + .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.remember-me input:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 12px;
}

.forgot-link {
    font-size: 14px;
    color: var(--primary);
    transition: color var(--transition-normal);
}

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

/* Terms Checkbox */
.terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1.5;
}

.terms-checkbox input {
    display: none;
}

.terms-checkbox .checkmark {
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 2px solid var(--text-muted);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    margin-top: 2px;
}

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

.terms-checkbox input:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 12px;
}

.terms-checkbox a {
    color: var(--primary);
}

/* Auth Button */
.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    margin-top: var(--space-sm);
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

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

.auth-btn i {
    transition: transform var(--transition-normal);
}

.auth-btn:hover i {
    transform: translateX(4px);
}

/* Auth Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin: var(--space-md) 0;
}

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

.auth-divider span {
    font-size: 13px;
    color: var(--text-muted);
}

/* Social Auth */
.social-auth {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
}

.social-btn {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-size: 20px;
    background: var(--bg-surface);
    color: var(--text-primary);
    transition: all var(--transition-normal);
    border: 1px solid transparent;
}

.social-btn:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
}

.social-btn.google:hover {
    background: #ea4335;
    color: white;
}

.social-btn.facebook:hover {
    background: #1877f2;
    color: white;
}

.social-btn.apple:hover {
    background: #000000;
    color: white;
}

/* Auth Switch */
.auth-switch {
    text-align: center;
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--bg-surface);
}

.auth-switch p {
    font-size: 14px;
    color: var(--text-secondary);
}

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

.auth-switch a:hover {
    color: var(--primary-light);
}

/* Demo Notice */
.demo-notice {
    position: fixed;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border-radius: var(--radius-full);
    font-size: 13px;
    color: var(--text-secondary);
    border: 1px solid var(--bg-surface);
}

.demo-notice i {
    color: var(--info);
    margin-right: var(--space-xs);
}

/* Input Hint */
.input-hint {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

/* Responsive */
@media (max-width: 480px) {
    .auth-card {
        padding: var(--space-lg);
    }
    
    .auth-form .form-row {
        grid-template-columns: 1fr;
    }
    
    .username-prefix {
        font-size: 11px;
        padding: 0 var(--space-sm);
    }
    
    .logo-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
}
