/* Wiza SSO — Professional UI */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #0b0f19;
    --bg-elevated: #111827;
    --bg-card: #151d2e;
    --bg-soft: #f4f7fb;
    --border: rgba(255, 255, 255, 0.08);
    --border-light: #e5eaf3;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --text-dark: #0f172a;
    --text-secondary: #64748b;
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-soft: rgba(99, 102, 241, 0.12);
    --accent: #22d3ee;
    --success: #10b981;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
    --shadow-lg: 0 30px 80px rgba(15, 23, 42, 0.18);
    --radius: 16px;
    --radius-sm: 10px;
    --sidebar-w: 260px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    color: var(--text-dark);
    background: var(--bg-soft);
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

img, svg { display: block; max-width: 100%; }

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    color: #fff;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.45);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.btn-ghost:hover { background: rgba(255, 255, 255, 0.14); }

.btn-outline {
    background: #fff;
    color: var(--text-dark);
    border: 1px solid var(--border-light);
}

.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover { background: var(--danger-hover); }

.btn-sm { padding: 0.5rem 0.875rem; font-size: 0.8125rem; }

.btn-lg { padding: 0.9375rem 1.75rem; font-size: 1rem; }

/* ─── Landing Page ─── */
.landing {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    overflow: hidden;
    position: relative;
}

.landing::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 10%, rgba(99, 102, 241, 0.25), transparent 50%),
        radial-gradient(ellipse 60% 50% at 80% 80%, rgba(34, 211, 238, 0.12), transparent 50%);
    pointer-events: none;
}

.landing-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
    pointer-events: none;
}

.landing-nav {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 800;
    font-size: 1.125rem;
    letter-spacing: -0.02em;
}

.brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    display: grid;
    place-items: center;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.brand-icon svg { width: 22px; height: 22px; color: #fff; }

.landing-hero {
    position: relative;
    z-index: 10;
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem 6rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.875rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero-title {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
}

.hero-title span {
    background: linear-gradient(135deg, #a5b4fc, #22d3ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 480px;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

.hero-visual {
    position: relative;
}

.hero-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.75rem;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
}

.hero-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.hero-avatar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 1.125rem;
}

.hero-card-title { font-weight: 700; font-size: 1rem; }
.hero-card-sub { font-size: 0.8125rem; color: var(--text-muted); }

.hero-flow {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.flow-step {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.875rem;
}

.flow-num {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--primary-soft);
    color: #a5b4fc;
    display: grid;
    place-items: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.flow-step.active {
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(99, 102, 241, 0.1);
}

.features {
    position: relative;
    z-index: 10;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 5rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.feature-card {
    padding: 1.5rem;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
}

.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--primary-soft);
    display: grid;
    place-items: center;
    margin-bottom: 1rem;
    color: #a5b4fc;
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ─── Dashboard Layout ─── */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-w);
    background: var(--bg);
    color: var(--text);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    border-right: 1px solid var(--border);
}

.sidebar-brand {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 0.75rem 0.75rem 0.375rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.15s;
}

.nav-item svg { width: 20px; height: 20px; flex-shrink: 0; }

.nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
}

.nav-item.active {
    background: var(--primary-soft);
    color: #a5b4fc;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    display: grid;
    place-items: center;
    font-size: 0.8125rem;
    font-weight: 700;
    flex-shrink: 0;
}

.sidebar-user-info { min-width: 0; flex: 1; }
.sidebar-user-name {
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-email {
    font-size: 0.6875rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    background: #fff;
    border-bottom: 1px solid var(--border-light);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-title {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.topbar-actions { display: flex; align-items: center; gap: 0.75rem; }

.page-content { padding: 2rem; flex: 1; }

/* ─── Dashboard Cards ─── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.stat-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
}

.stat-icon.purple { background: rgba(99, 102, 241, 0.1); color: var(--primary); }
.stat-icon.green { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.stat-icon.cyan { background: rgba(34, 211, 238, 0.1); color: #0891b2; }

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-dark);
}

.stat-desc {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.content-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 1.25rem;
}

.panel {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

.panel-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.panel-body { padding: 1.5rem; }

.profile-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    display: grid;
    place-items: center;
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

.profile-name {
    font-size: 1.375rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}

.profile-email { color: var(--text-secondary); font-size: 0.9375rem; }

.info-list { display: flex; flex-direction: column; gap: 0; }

.info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.875rem;
}

.info-row:last-child { border-bottom: none; }

.info-key { color: var(--text-secondary); font-weight: 500; }
.info-val { font-weight: 600; color: var(--text-dark); }

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.status-badge.success::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
}

.sso-steps { display: flex; flex-direction: column; gap: 1rem; }

.sso-step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.sso-step-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--primary-soft);
    color: var(--primary);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.sso-step-icon.done { background: rgba(16, 185, 129, 0.1); color: var(--success); }

.sso-step-title { font-weight: 600; font-size: 0.875rem; margin-bottom: 0.125rem; }
.sso-step-desc { font-size: 0.8125rem; color: var(--text-secondary); }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
    .landing-hero { grid-template-columns: 1fr; gap: 3rem; }
    .hero-visual { order: -1; }
    .features { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    .content-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .main-content { margin-left: 0; }
    .landing-nav, .landing-hero, .features { padding-left: 1.25rem; padding-right: 1.25rem; }
    .page-content { padding: 1.25rem; }
    .topbar { padding: 1rem 1.25rem; }
}
