
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ============================================
   SHARED FOUNDATION
   ============================================ */

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

:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --accent: #06b6d4;
    --accent-light: #22d3ee;
    --surface: #0f172a;
    --surface-light: #1e293b;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --glow: rgba(99, 102, 241, 0.4);
    --danger: #f87171;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--surface);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animated background */
.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 0;
}

.bg-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    z-index: 0;
    animation: floatGlow 20s ease-in-out infinite;
}

.bg-glow-1 {
    background: var(--primary);
    top: -200px;
    right: -100px;
}

.bg-glow-2 {
    background: var(--accent);
    bottom: -200px;
    left: -100px;
    animation-delay: -10s;
}

@keyframes floatGlow {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -40px) scale(1.1); }
    66% { transform: translate(-20px, 30px) scale(0.9); }
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* ============================================
   HEADER
   ============================================ */

header {
    padding: 24px 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    color: white;
    box-shadow: 0 0 24px var(--glow);
}

.logo-icon svg {
    width: 22px;
    height: 22px;
    stroke: white;
    fill: none;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
}

.logo-text span {
    color: var(--text-muted);
    font-weight: 400;
}

/* Header badges */
.badge-bc, .badge-secure {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.2);
    color: var(--accent-light);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.badge-secure {
    display: flex;
    align-items: center;
    gap: 6px;
}

.badge-secure svg {
    width: 14px;
    height: 14px;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 24px var(--glow), inset 0 1px 0 rgba(255,255,255,0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px var(--glow), inset 0 1px 0 rgba(255,255,255,0.1);
}

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

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--surface-light);
    color: var(--text);
    border: 1px solid rgba(255,255,255,0.08);
}

.btn-secondary:hover {
    background: #263349;
    transform: translateY(-2px);
    border-color: rgba(255,255,255,0.15);
}

.btn svg {
    width: 18px;
    height: 18px;
}

/* ============================================
   HERO BADGE (shared pulse dot badge)
   ============================================ */

.hero-badge, .welcome-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 50px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    font-size: 13px;
    font-weight: 500;
    color: var(--primary-light);
    margin-bottom: 24px;
}

.hero-badge { margin-bottom: 32px; }

.hero-badge::before, .welcome-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-light);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 32px 0;
    text-align: center;
}

footer p {
    font-size: 13px;
    color: var(--text-muted);
}

footer a {
    color: var(--primary-light);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

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

/* ============================================
   WELCOME PAGE STYLES
   ============================================ */

/* Hero */
.hero {
    text-align: center;
    padding: 80px 0 60px;
}

.hero h1 {
    font-size: clamp(40px, 6vw, 68px);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.08;
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.hero p {
    font-size: 19px;
    line-height: 1.7;
    color: var(--text-muted);
    max-width: 620px;
    margin: 0 auto 48px;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.hero-badge {
    animation: fadeInUp 0.6s ease-out both;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

/* Features */
.features {
    padding: 40px 0 80px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.feature-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(30, 41, 59, 0.3));
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 32px;
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out both;
}

.feature-card:nth-child(1) { animation-delay: 0.4s; }
.feature-card:nth-child(2) { animation-delay: 0.5s; }
.feature-card:nth-child(3) { animation-delay: 0.6s; }

.feature-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 22px;
}

.feature-icon.purple { background: rgba(99, 102, 241, 0.15); }
.feature-icon.cyan { background: rgba(6, 182, 212, 0.15); }
.feature-icon.rose { background: rgba(244, 63, 94, 0.15); }

.feature-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.feature-card p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-muted);
}

/* Divider graphic */
.divider {
    text-align: center;
    padding: 20px 0 60px;
    animation: fadeInUp 0.6s ease-out 0.7s both;
}

.divider-line {
    width: 80px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    margin: 0 auto 40px;
}

.divider h2 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.divider p {
    font-size: 15px;
    color: var(--text-muted);
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Steps */
.steps {
    padding: 0 0 80px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    counter-reset: steps;
}

.step {
    text-align: center;
    counter-increment: steps;
    animation: fadeInUp 0.6s ease-out both;
}

.step:nth-child(1) { animation-delay: 0.8s; }
.step:nth-child(2) { animation-delay: 0.9s; }
.step:nth-child(3) { animation-delay: 1.0s; }
.step:nth-child(4) { animation-delay: 1.1s; }

.step-number {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2px solid rgba(99, 102, 241, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-light);
}

.step-number::before {
    content: counter(steps);
}

.step h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
}

.step p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ============================================
   LOGIN PAGE STYLES
   ============================================ */

body.login-page {
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 40px 0;
}

.login-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    width: 100%;
}

/* Left side - Welcome text */
.welcome-section {
    animation: fadeInUp 0.6s ease-out both;
}

.welcome-section h1 {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 16px;
}

.welcome-section > p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-muted);
}

.feature-list li .icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-list li .icon-wrap svg {
    width: 18px;
    height: 18px;
}

.feature-list li .icon-wrap.purple { background: rgba(99, 102, 241, 0.15); }
.feature-list li .icon-wrap.cyan { background: rgba(6, 182, 212, 0.15); }
.feature-list li .icon-wrap.rose { background: rgba(244, 63, 94, 0.15); }
.feature-list li .icon-wrap.green { background: rgba(52, 211, 153, 0.15); }

.feature-list li .icon-wrap.purple svg { stroke: var(--primary-light); }
.feature-list li .icon-wrap.cyan svg { stroke: var(--accent-light); }
.feature-list li .icon-wrap.rose svg { stroke: #fb7185; }
.feature-list li .icon-wrap.green svg { stroke: #34d399; }

/* Right side - Login card */
.login-card-wrapper {
    animation: fadeInUp 0.6s ease-out 0.15s both;
}

.login-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(30, 41, 59, 0.4));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.login-card-header {
    padding: 28px 32px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.login-card-header h2 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.login-card-header p {
    font-size: 14px;
    color: var(--text-muted);
}

.login-card-body {
    padding: 28px 32px 32px;
}

/* Form fields */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.input-wrapper {
    position: relative;
}

.input-wrapper svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    stroke: var(--text-muted);
    fill: none;
    pointer-events: none;
    transition: stroke 0.2s ease;
}

.input-wrapper input {
    width: 100%;
    padding: 13px 16px 13px 44px;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    transition: all 0.25s ease;
    outline: none;
}

.input-wrapper input::placeholder {
    color: rgba(148, 163, 184, 0.5);
}

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

.input-wrapper input:focus + svg,
.input-wrapper input:focus ~ svg {
    stroke: var(--primary-light);
}

/* Error message */
.error-msg {
    display: none;
    padding: 12px 16px;
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.2);
    border-radius: 10px;
    font-size: 13px;
    color: var(--danger);
    margin-bottom: 20px;
    align-items: center;
    gap: 8px;
}

.error-msg.visible {
    display: flex;
}

.error-msg svg {
    width: 18px;
    height: 18px;
    stroke: var(--danger);
    fill: none;
    flex-shrink: 0;
}

/* Login button full width */
.login-card .btn {
    width: 100%;
}

.btn-primary svg {
    width: 18px;
    height: 18px;
}

.btn-loading .btn-text { display: none; }
.btn-loading .btn-spinner { display: block; }

.btn-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Contact info */
.contact-info {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.contact-item svg {
    width: 14px;
    height: 14px;
    stroke: var(--text-muted);
    fill: none;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .login-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .welcome-section {
        text-align: center;
    }
    .welcome-section h1 {
        font-size: 32px;
    }
    .feature-list {
        align-items: center;
    }
    .main-content {
        padding: 20px 0;
    }
}

@media (max-width: 600px) {
    .hero { padding: 48px 0 40px; }
    .features-grid { grid-template-columns: 1fr; }
    .header-inner { flex-direction: column; gap: 12px; }
}
