﻿:root {
    --primary: #4f46e5;
    --primary-light: #818cf8;
    --primary-dark: #3730a3;
    --accent: #06b6d4;
    --surface: #ffffff;
    --bg: #f8fafc;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --success: #10b981;
    --warning: #f59e0b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Animated background */
.bg-pattern {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

    .bg-pattern .orb {
        position: absolute;
        border-radius: 50%;
        filter: blur(80px);
        opacity: 0.15;
        animation: orbFloat 20s ease-in-out infinite;
    }

        .bg-pattern .orb:nth-child(1) {
            width: 600px;
            height: 600px;
            background: var(--primary);
            top: -200px;
            left: -100px;
            animation-delay: 0s;
        }

        .bg-pattern .orb:nth-child(2) {
            width: 400px;
            height: 400px;
            background: var(--accent);
            bottom: -100px;
            right: -100px;
            animation-delay: -7s;
        }

        .bg-pattern .orb:nth-child(3) {
            width: 300px;
            height: 300px;
            background: #a78bfa;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            animation-delay: -14s;
        }

@keyframes orbFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(30px, -40px) scale(1.05);
    }

    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }

    75% {
        transform: translate(40px, 30px) scale(1.02);
    }
}

/* Navbar */
.navbar-custom {
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--text);
}

.brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
}

.brand .dot {
    color: var(--primary);
}

/* Main content area */
.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    padding: 2rem 1rem;
}

/* Card */
.card-main {
    background: var(--surface);
    border-radius: 24px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 20px 50px -12px rgba(0,0,0,0.1);
    border: 1px solid var(--border);
    width: 100%;
    max-width: 460px;
    overflow: hidden;
}

.card-header-section {
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    padding: 2.5rem 2rem 2rem;
    text-align: center;
    color: #fff;
    position: relative;
}

    .card-header-section::after {
        content: '';
        position: absolute;
        bottom: -1px;
        left: 0;
        right: 0;
        height: 30px;
        background: var(--surface);
        border-radius: 24px 24px 0 0;
    }

    .card-header-section .icon-circle {
        width: 64px;
        height: 64px;
        background: rgba(255,255,255,0.2);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 1rem;
        backdrop-filter: blur(10px);
    }

    .card-header-section h1 {
        font-size: 1.5rem;
        font-weight: 700;
        margin-bottom: 0.4rem;
    }

    .card-header-section p {
        font-size: 0.9rem;
        opacity: 0.85;
    }

.card-body-section {
    padding: 1.5rem 2rem 2rem;
}

/* Network SVG illustration */
.network-illustration {
    width: 48px;
    height: 48px;
}

    .network-illustration circle {
        fill: rgba(255,255,255,0.9);
    }

    .network-illustration line {
        stroke: rgba(255,255,255,0.6);
        stroke-width: 1.5;
    }

/* Google Sign-In */
#buttonDiv {
    display: flex;
    justify-content: center;
    margin: 0.5rem 0;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

    .divider::before, .divider::after {
        content: '';
        flex: 1;
        height: 1px;
        background: var(--border);
    }

/* Feature pills */
.features-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
}

.feature-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #f1f5f9;
    border-radius: 100px;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

    .feature-pill svg {
        width: 14px;
        height: 14px;
        color: var(--primary);
    }

/* View sections */
.view-section {
    display: none;
}

    .view-section.active {
        display: block;
    }

/* Mobile input form */
.form-label-custom {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.input-group-custom {
    display: flex;
    border: 2px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.2s;
}

    .input-group-custom:focus-within {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
    }

.input-prefix {
    background: #f8fafc;
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: var(--text-muted);
    border-right: 1px solid var(--border);
    display: flex;
    align-items: center;
    font-size: 0.95rem;
}

.input-field {
    flex: 1;
    border: none;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    background: transparent;
}

    .input-field::placeholder {
        color: #cbd5e1;
    }

.btn-primary-custom {
    width: 100%;
    padding: 0.85rem;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    margin-top: 1rem;
}

    .btn-primary-custom:hover {
        transform: translateY(-1px);
        box-shadow: 0 8px 25px rgba(79,70,229,0.35);
    }

    .btn-primary-custom:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }

.error-text {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    display: none;
}

/* Welcome / approval pending */
.welcome-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-light);
    margin: 0 auto 1rem;
    display: block;
}

.welcome-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
    color: #fff;
    font-weight: 700;
}

.welcome-name {
    font-size: 1.3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.25rem;
}

.welcome-email {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 1.5rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
}

    .status-badge.pending {
        background: #fef3c7;
        color: #92400e;
        border: 1px solid #fde68a;
    }

    .status-badge .dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #f59e0b;
        animation: pulse-dot 2s ease-in-out infinite;
    }

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

.approval-info {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 14px;
    padding: 1rem 1.25rem;
    margin-top: 1.25rem;
    font-size: 0.85rem;
    color: #166534;
    line-height: 1.6;
}

    .approval-info strong {
        font-weight: 600;
    }

/* Footer */
.footer-custom {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 1.25rem 0;
    position: relative;
    z-index: 1;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

    .footer-links a {
        font-size: 0.8rem;
        color: var(--text-muted);
        text-decoration: none;
        font-weight: 500;
        transition: color 0.2s;
    }

        .footer-links a:hover {
            color: var(--primary);
        }

/* Spinner */
.spinner {
    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;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 500px) {
    .card-main {
        border-radius: 20px;
    }

    .card-header-section {
        padding: 2rem 1.5rem 1.5rem;
    }

    .card-body-section {
        padding: 1.25rem 1.5rem 1.5rem;
    }

    .footer-inner {
        justify-content: center;
        text-align: center;
    }
}
