/* ============================================
   DigiCard - Vibrant Glassmorphism UI
   ============================================ */

:root {
    --theme-color: #667eea;
    --theme-dark: #4d5fbf;
    --theme-light: #8fa2ef;
    --theme-rgb: 102, 126, 234;
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-bg-strong: rgba(255, 255, 255, 0.12);
    --glass-border: rgba(255, 255, 255, 0.15);
    --glass-border-bright: rgba(255, 255, 255, 0.25);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.75);
    --text-muted: rgba(255, 255, 255, 0.45);
    --accent-green: #48bb78;
    --accent-red: #fc8181;
    --accent-yellow: #f6e05e;
    --accent-pink: #ed64a6;
    --accent-cyan: #38b2ac;
    --accent-orange: #ed8936;
    --radius: 20px;
    --radius-sm: 12px;
    --radius-xs: 8px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #0a0a1a;
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: var(--theme-color); text-decoration: none; }

/* ============================================
   Animated Background
   ============================================ */
.animated-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1a3e 50%, #0a0a1a 100%);
}

.animated-bg .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: orbFloat 20s ease-in-out infinite;
}
.animated-bg .orb:nth-child(1) {
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(var(--theme-rgb), 0.6), transparent);
    top: -100px; left: -100px;
    animation-duration: 18s;
}
.animated-bg .orb:nth-child(2) {
    width: 350px; height: 350px;
    background: radial-gradient(circle, rgba(var(--theme-rgb), 0.4), transparent);
    top: 50%; right: -80px;
    animation-duration: 22s;
    animation-delay: -5s;
}
.animated-bg .orb:nth-child(3) {
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(var(--theme-rgb), 0.3), transparent);
    bottom: -50px; left: 30%;
    animation-duration: 25s;
    animation-delay: -10s;
}
.animated-bg .orb:nth-child(4) {
    width: 250px; height: 250px;
    background: radial-gradient(circle, rgba(var(--theme-rgb), 0.25), transparent);
    top: 30%; left: 50%;
    animation-duration: 20s;
    animation-delay: -3s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(60px, -80px) scale(1.15); }
    50% { transform: translate(-40px, 60px) scale(0.9); }
    75% { transform: translate(80px, 40px) scale(1.1); }
}

/* Floating Particles */
.particles {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}
.particles span {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(var(--theme-rgb), 0.3);
    border-radius: 50%;
    animation: particleRise linear infinite;
}
.particles span:nth-child(1) { left: 10%; animation-duration: 12s; animation-delay: 0s; width: 3px; height: 3px; }
.particles span:nth-child(2) { left: 25%; animation-duration: 16s; animation-delay: -3s; width: 5px; height: 5px; }
.particles span:nth-child(3) { left: 40%; animation-duration: 14s; animation-delay: -6s; }
.particles span:nth-child(4) { left: 55%; animation-duration: 18s; animation-delay: -2s; width: 3px; height: 3px; }
.particles span:nth-child(5) { left: 70%; animation-duration: 13s; animation-delay: -8s; width: 6px; height: 6px; }
.particles span:nth-child(6) { left: 85%; animation-duration: 15s; animation-delay: -4s; }
.particles span:nth-child(7) { left: 15%; animation-duration: 17s; animation-delay: -7s; width: 4px; height: 4px; }
.particles span:nth-child(8) { left: 60%; animation-duration: 11s; animation-delay: -1s; width: 3px; height: 3px; }

@keyframes particleRise {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { transform: translateY(-10vh) rotate(720deg); opacity: 0; }
}

/* ============================================
   Glass Card
   ============================================ */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255,255,255,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.glass-card:hover {
    border-color: var(--glass-border-bright);
    box-shadow: var(--glass-shadow), 0 0 30px rgba(var(--theme-rgb), 0.08);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-decoration: none;
    color: var(--text-primary);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}
.btn:hover::after { opacity: 1; }

.btn-primary {
    background: linear-gradient(135deg, var(--theme-color), var(--theme-dark));
    box-shadow: 0 4px 20px rgba(var(--theme-rgb), 0.35);
}
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(var(--theme-rgb), 0.5);
}

.btn-glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}
.btn-glass:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #e53e3e, #c53030);
}
.btn-danger:hover {
    box-shadow: 0 4px 15px rgba(229, 62, 62, 0.5);
    transform: translateY(-2px);
}

.btn-full { width: 100%; }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.8rem; border-radius: var(--radius-xs); }
.btn-xs { padding: 0.3rem 0.65rem; font-size: 0.75rem; border-radius: 6px; }
.btn-lg { padding: 0.9rem 2rem; font-size: 1rem; border-radius: var(--radius-sm); }

/* ============================================
   Alerts
   ============================================ */
.alert {
    padding: 0.85rem 1.2rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.2rem;
    font-size: 0.9rem;
    animation: slideDown 0.4s ease;
    backdrop-filter: blur(10px);
}
.alert-error {
    background: rgba(229, 62, 62, 0.15);
    border: 1px solid rgba(229, 62, 62, 0.35);
    color: #fed7d7;
}
.alert-success {
    background: rgba(72, 187, 120, 0.15);
    border: 1px solid rgba(72, 187, 120, 0.35);
    color: #c6f6d5;
}

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

/* ============================================
   Auth Pages (Login / Register)
   ============================================ */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

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

.auth-card {
    padding: 2.5rem 2rem;
    background: rgba(255, 255, 255, 0.06);
    animation: cardAppear 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes cardAppear {
    from { opacity: 0; transform: translateY(30px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-logo { text-align: center; margin-bottom: 2rem; }

.logo-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 0.8rem;
    background: linear-gradient(135deg, var(--theme-color), var(--theme-light));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    animation: logoPulse 3s ease-in-out infinite;
    box-shadow: 0 4px 20px rgba(var(--theme-rgb), 0.4);
}
.logo-icon svg { width: 28px; height: 28px; }
.logo-icon-lg { width: 76px; height: 76px; border-radius: 22px; }
.logo-icon-lg svg { width: 42px; height: 42px; }

@keyframes logoPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(var(--theme-rgb), 0.4); }
    50% { box-shadow: 0 4px 40px rgba(var(--theme-rgb), 0.6), 0 0 60px rgba(var(--theme-rgb), 0.15); }
}

.auth-logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff, rgba(255,255,255,0.7));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.auth-logo p { color: var(--text-secondary); font-size: 0.9rem; margin-top: 0.3rem; }

.auth-form { display: flex; flex-direction: column; gap: 1rem; }

.form-group { display: flex; flex-direction: column; gap: 0.35rem; }
.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.form-group input,
.form-group textarea,
.form-group select {
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xs);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--theme-color);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(var(--theme-rgb), 0.15);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }
.form-group select option { background: #1a1a3e; color: white; }

.input-with-status { position: relative; }
.input-with-status input { width: 100%; padding-right: 6.5rem; }
.input-status {
    position: absolute;
    right: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    transition: all 0.3s;
}
.input-status.checking { color: var(--text-muted); }
.input-status.available { color: var(--accent-green); text-shadow: 0 0 10px rgba(72,187,120,0.5); }
.input-status.taken { color: var(--accent-red); text-shadow: 0 0 10px rgba(252,129,129,0.5); }

.input-hint { font-size: 0.78rem; color: var(--text-muted); }
.input-hint span { color: var(--theme-color); font-weight: 600; }

.auth-switch {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}
.auth-switch a { color: var(--theme-color); font-weight: 600; }

/* ============================================
   Landing
   ============================================ */
.landing {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}
.landing-card {
    padding: 3rem 2.5rem;
    text-align: center;
    max-width: 500px;
    width: 100%;
}
.landing-tagline {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-top: 0.5rem;
}
.landing-actions {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 2rem;
}

/* ============================================
   Profile Page
   ============================================ */
.profile-page {
    display: flex;
    justify-content: center;
    padding: 0;
    min-height: 100vh;
}

.profile-wrapper {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    position: relative;
    background: rgba(10, 10, 26, 0.6);
    box-shadow: -30px 0 60px rgba(0,0,0,0.3), 30px 0 60px rgba(0,0,0,0.3);
}

/* Cover */
.profile-cover {
    position: relative;
    height: 240px;
    background: linear-gradient(135deg, var(--theme-color), var(--theme-dark), var(--theme-light));
    background-size: 200% 200%;
    animation: gradientShift 8s ease-in-out infinite;
    overflow: hidden;
}
.profile-cover[style*="background-image"] {
    background-size: cover;
    background-position: center;
    animation: none;
}
.cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.05), rgba(10,10,26,0.7));
}
.cover-wave {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 40px;
}
.cover-wave svg {
    display: block;
    width: 100%;
    height: 100%;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Floating shapes on cover */
.cover-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}
.cover-shapes span {
    position: absolute;
    display: block;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    background: rgba(255,255,255,0.03);
    animation: coverShapeFloat linear infinite;
}
.cover-shapes span:nth-child(1) { width: 60px; height: 60px; top: 20%; left: 10%; animation-duration: 12s; }
.cover-shapes span:nth-child(2) { width: 30px; height: 30px; top: 60%; left: 70%; animation-duration: 10s; animation-delay: -3s; }
.cover-shapes span:nth-child(3) { width: 45px; height: 45px; top: 40%; left: 40%; animation-duration: 14s; animation-delay: -5s; border-radius: 6px; }
.cover-shapes span:nth-child(4) { width: 25px; height: 25px; top: 10%; left: 80%; animation-duration: 9s; animation-delay: -2s; }
.cover-shapes span:nth-child(5) { width: 50px; height: 50px; top: 70%; left: 25%; animation-duration: 16s; animation-delay: -7s; border-radius: 8px; }

@keyframes coverShapeFloat {
    0% { transform: translateY(0) rotate(0deg); opacity: 0.3; }
    50% { opacity: 0.6; }
    100% { transform: translateY(-200px) rotate(360deg); opacity: 0; }
}

.profile-views-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(12px);
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
    border: 1px solid rgba(255,255,255,0.1);
}
.company-logo-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    height: 50px;
    max-width: 120px;
    object-fit: contain;
    z-index: 2;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}

/* Profile Info */
.profile-info-section {
    position: relative;
    text-align: center;
    padding: 0 1.5rem 1.2rem;
    margin-top: -55px;
}

.profile-avatar-wrapper {
    display: inline-block;
    position: relative;
}
.profile-avatar-wrapper::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--theme-color), var(--theme-light), var(--theme-dark));
    background-size: 200% 200%;
    animation: avatarRingRotate 4s linear infinite;
    z-index: -1;
}
.profile-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 4px solid rgba(10, 10, 26, 0.8);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    object-fit: cover;
    background: linear-gradient(135deg, var(--theme-color), var(--theme-dark));
}
.profile-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    font-weight: 700;
    color: white;
}

@keyframes avatarRingRotate {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.profile-name {
    font-size: 1.7rem;
    font-weight: 700;
    margin-top: 1rem;
    letter-spacing: -0.3px;
    animation: fadeInUp 0.5s ease;
}
.profile-designation {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 0.2rem;
    animation: fadeInUp 0.6s ease;
}
.profile-company {
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 0.6rem;
    background: linear-gradient(135deg, var(--theme-light), var(--theme-color), var(--theme-light));
    background-size: 200% auto;
    animation: gradientText 4s linear infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes gradientText {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* Mini QR Button */
.qr-mini-btn {
    position: absolute;
    top: -35px;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 3;
}
.qr-mini-btn:hover {
    background: rgba(var(--theme-rgb), 0.3);
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 4px 20px rgba(var(--theme-rgb), 0.3);
}

/* Profile Sections */
.profile-section {
    margin: 0.8rem 1rem 0;
    padding: 1.3rem;
    animation: fadeInUp 0.5s ease both;
}
.profile-section:nth-child(1) { animation-delay: 0.1s; }
.profile-section:nth-child(2) { animation-delay: 0.15s; }
.profile-section:nth-child(3) { animation-delay: 0.2s; }
.profile-section:nth-child(4) { animation-delay: 0.25s; }

.section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 1rem;
    text-align: center;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}
.section-title::before,
.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.15), transparent);
}

.profile-bio {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.8;
    font-style: italic;
}

/* Social Grid - Colorful */
.social-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
}
.social-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.5rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}
.social-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.35s;
}
.social-btn:hover {
    transform: translateY(-5px) scale(1.03);
    border-color: rgba(255, 255, 255, 0.15);
}
.social-btn:hover::before { opacity: 1; }

/* Social icons use the user's theme color */
.social-btn[data-social]::before { background: linear-gradient(135deg, rgba(var(--theme-rgb),0.2), rgba(var(--theme-rgb),0.05)); }
.social-btn[data-social] .social-icon { color: var(--theme-color); }

.social-btn:hover .social-icon {
    transform: scale(1.2);
}

.social-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}
.social-icon svg { width: 24px; height: 24px; }
.social-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
}

/* Contact List */
.contact-list { display: flex; flex-direction: column; gap: 0.5rem; }
.contact-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.75rem 0.85rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.88rem;
    word-break: break-word;
}
.contact-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateX(4px);
}
.contact-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(var(--theme-rgb), 0.2), rgba(var(--theme-rgb), 0.05));
    border-radius: 10px;
    color: var(--theme-color);
}

/* Action Buttons */
.profile-actions {
    display: flex;
    gap: 0.6rem;
    padding: 1.2rem 1rem;
    animation: fadeInUp 0.5s ease 0.3s both;
}
.btn-action {
    flex: 1;
    padding: 0.9rem 1rem;
    font-size: 0.85rem;
}

.profile-footer {
    text-align: center;
    padding: 1.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.profile-footer a { color: var(--theme-color); }
.create-card-link {
    display: inline-block;
    font-size: 0.7rem;
    color: #999 !important;
    text-decoration: none;
    opacity: 0.6;
    margin-bottom: 0.5rem;
    transition: opacity 0.2s;
}
.create-card-link:hover { opacity: 1; }

/* QR Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    padding: 1rem;
}
.modal.active { opacity: 1; pointer-events: auto; }
.modal.active .modal-content { transform: scale(1) translateY(0); }
.modal-content {
    padding: 2rem;
    text-align: center;
    max-width: 340px;
    width: 100%;
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.modal-content h3 {
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
    background: linear-gradient(135deg, #fff, rgba(255,255,255,0.7));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.modal-close {
    position: absolute;
    top: 0.8rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
}
.modal-close:hover { color: white; transform: rotate(90deg); }
.qr-display {
    background: white;
    border-radius: var(--radius-sm);
    padding: 1rem;
    display: inline-block;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.qr-display img { display: block; max-width: 100%; height: auto; }
.qr-url {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.8rem;
    word-break: break-all;
}

/* ============================================
   Dashboard
   ============================================ */
.dashboard-page { min-height: 100vh; }

.dash-nav {
    background: rgba(10, 10, 26, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 50;
}
.dash-nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-brand {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    background: linear-gradient(135deg, #fff, var(--theme-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.nav-links { display: flex; gap: 0.5rem; }

.dash-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem;
}

.dash-header { margin-bottom: 1.5rem; }
.dash-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, rgba(255,255,255,0.7));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.dash-header p { color: var(--text-secondary); font-size: 0.9rem; margin-top: 0.3rem; }
.dash-header a { color: var(--theme-color); }

.form-section {
    padding: 1.5rem;
    margin-bottom: 1.2rem;
}
.form-section .section-title {
    text-align: left;
    margin-bottom: 1.2rem;
    font-size: 0.75rem;
}
.form-section .section-title::before { display: none; }

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}
.form-group-full { grid-column: 1 / -1; }

.file-upload-area {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.preview-thumb {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid var(--glass-border);
}
.preview-thumb-wide {
    width: 100%;
    max-width: 200px;
    height: 80px;
}
.file-upload-area input[type="file"] {
    width: 100%;
    min-width: 0;
    font-size: 0.8rem;
}

/* Theme Color Picker */
.color-picker-section { margin-top: 0.5rem; }
.color-presets {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.8rem;
}
.color-preset {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.color-preset:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.color-preset.active {
    border-color: white;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.3);
}
.color-preset.active::after {
    content: '✓';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.color-custom-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.color-input {
    width: 44px !important;
    height: 44px !important;
    padding: 3px !important;
    cursor: pointer;
    border-radius: 10px !important;
    border: 2px solid rgba(255,255,255,0.15) !important;
}
.color-input:hover { border-color: rgba(255,255,255,0.3) !important; }
.color-custom-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.form-actions {
    display: flex;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

/* ============================================
   Admin
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    padding: 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
}
.stat-card:nth-child(1)::before { background: linear-gradient(90deg, var(--theme-color), var(--accent-pink)); }
.stat-card:nth-child(2)::before { background: linear-gradient(90deg, var(--accent-green), var(--accent-cyan)); }
.stat-card:nth-child(3)::before { background: linear-gradient(90deg, var(--accent-orange), var(--accent-yellow)); }
.stat-card:nth-child(4)::before { background: linear-gradient(90deg, var(--accent-pink), var(--theme-color)); }

.stat-number {
    font-size: 2.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--theme-color), var(--theme-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat-card:nth-child(2) .stat-number {
    background: linear-gradient(135deg, var(--accent-green), var(--accent-cyan));
    -webkit-background-clip: text; background-clip: text;
}
.stat-card:nth-child(3) .stat-number {
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-yellow));
    -webkit-background-clip: text; background-clip: text;
}
.stat-card:nth-child(4) .stat-number {
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-red));
    -webkit-background-clip: text; background-clip: text;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 0.4rem;
    font-weight: 600;
}
.stat-inline { font-size: 1rem; font-weight: 600; margin: 0; }

.admin-search {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    align-items: center;
}
.search-input {
    flex: 1;
    min-width: 200px;
    padding: 0.65rem 1rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xs);
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s;
}
.search-input:focus { border-color: var(--theme-color); box-shadow: 0 0 0 3px rgba(var(--theme-rgb), 0.15); }
.search-input::placeholder { color: var(--text-muted); }
.search-select {
    padding: 0.65rem 1rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xs);
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
}
.search-select option { background: #1a1a3e; color: white; }

.table-wrap { overflow-x: auto; }
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.admin-table th {
    text-align: left;
    padding: 0.8rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    white-space: nowrap;
    font-weight: 700;
}
.admin-table td {
    padding: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
}
.admin-table tr { transition: background 0.2s; }
.admin-table tr:hover td { background: rgba(255, 255, 255, 0.03); }
.user-cell { display: flex; flex-direction: column; gap: 0.15rem; }
.user-cell small { color: var(--text-muted); font-size: 0.75rem; }
.actions-cell { display: flex; gap: 0.3rem; white-space: nowrap; }

.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.badge-free { background: rgba(160, 174, 192, 0.15); color: #a0aec0; border: 1px solid rgba(160, 174, 192, 0.2); }
.badge-basic { background: rgba(102, 126, 234, 0.15); color: #667eea; border: 1px solid rgba(102, 126, 234, 0.2); }
.badge-premium { background: rgba(237, 137, 54, 0.15); color: #ed8936; border: 1px solid rgba(237, 137, 54, 0.2); }
.badge-enterprise { background: rgba(167, 139, 250, 0.15); color: #a78bfa; border: 1px solid rgba(167, 139, 250, 0.2); }
.badge-active { background: rgba(72, 187, 120, 0.15); color: var(--accent-green); border: 1px solid rgba(72, 187, 120, 0.2); }
.badge-inactive { background: rgba(229, 62, 62, 0.15); color: var(--accent-red); border: 1px solid rgba(229, 62, 62, 0.2); }
.badge-pending { background: rgba(237, 137, 54, 0.15); color: var(--accent-orange); border: 1px solid rgba(237, 137, 54, 0.2); }

.pagination {
    display: flex;
    gap: 0.3rem;
    justify-content: center;
    margin-top: 1.2rem;
    flex-wrap: wrap;
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 600px) {
    .auth-card { padding: 2rem 1.2rem; }
    .form-grid { grid-template-columns: 1fr; }
    .profile-cover { height: 200px; }
    .profile-name { font-size: 1.4rem; }
    .social-grid { grid-template-columns: repeat(3, 1fr); }
    .profile-actions { flex-direction: column; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-search { flex-direction: column; }
    .form-actions { flex-direction: column; }
    .actions-cell { flex-wrap: wrap; }
    .landing-card { padding: 2rem 1.5rem; }
}

/* OTP Input */
.otp-input-wrap {
    display: flex;
    justify-content: center;
}
.otp-input {
    width: 100%;
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 12px;
    font-family: 'Courier New', monospace;
    padding: 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    transition: border-color 0.3s;
}
.otp-input:focus {
    outline: none;
    border-color: var(--theme-color);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.15);
}
.otp-input::placeholder {
    color: rgba(255, 255, 255, 0.15);
    letter-spacing: 12px;
}

/* Settings Help Box */
.settings-help {
    margin-bottom: 1.5rem;
}
.help-box {
    background: rgba(102, 126, 234, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: var(--radius-sm);
    padding: 1.2rem 1.5rem;
}
.help-box h4 {
    font-size: 0.85rem;
    color: var(--theme-color);
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.help-box ol {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.8;
}
.help-box ol strong {
    color: var(--text-primary);
}

/* Password toggle */
.input-with-toggle {
    position: relative;
    display: flex;
}
.input-with-toggle input {
    flex: 1;
    padding-right: 70px;
}
.toggle-pass {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s;
}
.toggle-pass:hover {
    background: rgba(255, 255, 255, 0.18);
    color: var(--text-primary);
}

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

/* ============================================
   Profile Page - Lovable-style clean theme
   ============================================ */
.profile-page {
    background: #f0f2f5;
    color: #1c1e21;
}
.profile-page .profile-wrapper {
    background: #f0f2f5;
    box-shadow: none;
}

/* Cover */
.profile-page .profile-cover {
    height: 220px;
    /*background: linear-gradient(135deg, var(--theme-color), var(--theme-light), var(--theme-dark));*/
    /*background-size: 300% 300%;*/
    animation: coverGradient 8s ease-in-out infinite;
    overflow: hidden;
}
.profile-page .profile-cover[style*="background-image"] {
    animation: none;
}
.cover-wave-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}
.cover-wave-svg {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 50px;
    z-index: 3;
    display: block;
}
.cover-company-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(12px);
    padding: 0.35rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
    z-index: 4;
    border: 1px solid rgba(255,255,255,0.25);
}
.profile-page .profile-views-badge {
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    z-index: 4;
}
.profile-page .company-logo-badge {
    z-index: 4;
}
@keyframes coverGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Profile Info - Left-aligned layout */
.profile-page .profile-info-section {
    background: #fff;
    border-radius: 0 0 16px 16px;
    padding: 1.2rem 1.5rem 1rem;
    margin-top: 0;
    position: relative;
    z-index: 4;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    text-align: left;
}
.profile-info-top {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}
.profile-page .profile-avatar-wrapper {
    margin-top: -55px;
    position: relative;
    z-index: 5;
    flex-shrink: 0;
}
.profile-page .profile-avatar-wrapper::before {
    display: none;
}
.profile-page .profile-avatar {
    width: 90px;
    height: 90px;
    border: 3px solid #fff;
    box-shadow: 0 0 0 3px var(--theme-color), 0 4px 16px rgba(0,0,0,0.15);
}
.profile-page .profile-avatar-placeholder {
    width: 90px;
    height: 90px;
    font-size: 2.2rem;
    border: 3px solid #fff;
    box-shadow: 0 0 0 3px var(--theme-color), 0 4px 16px rgba(0,0,0,0.15);
}
.verified-badge {
    display: inline-block;
    width: 16px;
    height: 16px;
    vertical-align: -1px;
    margin-left: 4px;
    flex-shrink: 0;
}
.verified-badge svg {
    width: 100%;
    height: 100%;
    display: block;
}
.profile-info-text {
    flex: 1;
    min-width: 0;
    padding-top: 0.5rem;
}
.profile-page .profile-name {
    color: #1c1e21;
    font-size: 1.35rem;
    margin-top: 0;
    text-align: left;
    animation: none;
    line-height: 1.3;
}
.profile-page .profile-designation {
    color: #65676b;
    font-size: 0.88rem;
    margin-top: 0.15rem;
    text-align: left;
    animation: none;
}
.profile-company-at {
    color: #65676b;
    font-size: 0.85rem;
    margin-top: 0.1rem;
}
.profile-company-at strong {
    color: var(--theme-color);
    font-weight: 700;
}

/* QR Pill Button */
.qr-pill-btn {
    position: absolute;
    bottom: 10px;
    right: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.9rem;
    border: none;
    border-radius: 20px;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 6;
}
.qr-pill-btn:hover {
    opacity: 0.85;
    transform: scale(1.05);
}

/* Cards / Sections */
.profile-page .profile-section {
    background: #fff;
    border: 1px solid #e4e6eb;
    border-radius: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    backdrop-filter: none;
    margin: 0.8rem 1rem 0;
    padding: 1.3rem;
}
.profile-page .profile-bio-section {
    border: none;
    background: transparent;
    box-shadow: none;
    padding: 0.6rem 1.2rem;
}
.profile-page .section-title {
    color: #65676b;
    font-size: 0.72rem;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    text-align: center;
}
.profile-page .section-title::before,
.profile-page .section-title::after {
    background: linear-gradient(to right, transparent, #e4e6eb, transparent);
}
.profile-page .profile-bio {
    color: #4b5563;
    text-align: left;
    font-style: normal;
    font-size: 0.88rem;
}

/* Social Grid - Circular Brand-Colored Icons */
.profile-page .social-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 0.8rem;
}
.profile-page .social-btn {
    background: transparent;
    border: none;
    padding: 0.5rem;
    gap: 0.4rem;
    color: #1c1e21;
}
.profile-page .social-btn::before { display: none; }
.profile-page .social-btn:hover {
    background: transparent;
    border: none;
    box-shadow: none;
    transform: translateY(-4px) scale(1.1);
}
.profile-page .social-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.profile-page .social-icon svg {
    width: 22px;
    height: 22px;
}
.profile-page .social-label {
    color: #65676b;
    font-size: 0.5rem;
}

/* Brand colors for social icons */
.profile-page .social-btn[data-social="phone"] .social-icon { background: #e8f5e9; color: #4caf50; }
.profile-page .social-btn[data-social="whatsapp"] .social-icon { background: #e8f5e9; color: #25d366; }
.profile-page .social-btn[data-social="email"] .social-icon { background: #e3f2fd; color: #1e88e5; }
.profile-page .social-btn[data-social="website"] .social-icon { background: #e8eaf6; color: #5c6bc0; }
.profile-page .social-btn[data-social="facebook"] .social-icon { background: #e3f2fd; color: #1877f2; }
.profile-page .social-btn[data-social="instagram"] .social-icon { background: #fce4ec; color: #e4405f; }
.profile-page .social-btn[data-social="twitter"] .social-icon { background: #e8f4f8; color: #1da1f2; }
.profile-page .social-btn[data-social="linkedin"] .social-icon { background: #e3f2fd; color: #0a66c2; }
.profile-page .social-btn[data-social="youtube"] .social-icon { background: #ffebee; color: #ff0000; }
.profile-page .social-btn[data-social="github"] .social-icon { background: #f3e5f5; color: #333; }
.profile-page .social-btn[data-social="telegram"] .social-icon { background: #e3f2fd; color: #0088cc; }
.profile-page .social-btn[data-social="tiktok"] .social-icon { background: #f3e5f5; color: #010101; }
.profile-page .social-btn[data-social="snapchat"] .social-icon { background: #fffde7; color: #fffc00; }
.profile-page .social-btn[data-social="pinterest"] .social-icon { background: #ffebee; color: #bd081c; }
.profile-page .social-btn[data-social="google_maps"] .social-icon { background: #e8f5e9; color: #34a853; }

/* Contact Items - Label/Value layout */
.profile-page .contact-item {
    background: #f8f9fa;
    border: 1px solid #e4e6eb;
    border-radius: 12px;
    color: #1c1e21;
    padding: 0.85rem 1rem;
}
.profile-page .contact-item:hover {
    background: #f0f2f5;
    border-color: var(--theme-color);
    transform: translateX(4px);
}
.profile-page .contact-icon {
    background: rgba(var(--theme-rgb), 0.1);
    color: var(--theme-color);
    border-radius: 12px;
}
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}
.contact-label {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #9ca3af;
    text-transform: uppercase;
}
.contact-value {
    font-size: 0.88rem;
    font-weight: 500;
    color: #1c1e21;
    word-break: break-word;
}

/* Action buttons */
.profile-page .btn-primary {
    background: var(--theme-color);
    color: #fff;
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(var(--theme-rgb), 0.25);
}
.profile-page .btn-primary:hover {
    box-shadow: 0 4px 16px rgba(var(--theme-rgb), 0.35);
}
.profile-page .btn-glass.btn-action {
    background: #fff;
    border: 1px solid #dadde1;
    color: #1c1e21;
    backdrop-filter: none;
    border-radius: 12px;
}
.profile-page .btn-glass.btn-action:hover {
    background: #f0f2f5;
    border-color: var(--theme-color);
    color: var(--theme-color);
}

/* Footer */
.profile-page .profile-footer {
    color: #9ca3af;
    font-size: 0.72rem;
}

/* Modal */
.profile-page .modal {
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
}
.profile-page .modal-content {
    background: #fff;
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    backdrop-filter: none;
}
.profile-page .modal-content h3 {
    background: none;
    -webkit-text-fill-color: #1c1e21;
    color: #1c1e21;
}
.profile-page .modal-close {
    color: #9ca3af;
}
.profile-page .modal-close:hover {
    color: #1c1e21;
}
.profile-page .qr-url {
    color: #9ca3af;
}

/* Responsive - profile social grid */
@media (max-width: 400px) {
    .profile-page .social-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .profile-page .social-icon {
        width: 42px;
        height: 42px;
    }
}