/* ============================================
   MENTARI HATI — Design System & Global Styles
   Dark Emerald + Gold Premium Theme
   ============================================ */

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

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    /* Background */
    --bg-deep: #060f0b;
    --bg-primary: #0a1a14;
    --bg-secondary: #0f2318;
    --bg-tertiary: #112b1e;
    --bg-card: rgba(15, 40, 28, 0.65);
    --bg-card-hover: rgba(20, 55, 38, 0.75);
    --bg-glass: rgba(18, 48, 33, 0.5);
    --bg-input: rgba(10, 26, 20, 0.6);
    --bg-input-focus: rgba(10, 26, 20, 0.8);

    /* Borders */
    --border-subtle: rgba(45, 134, 89, 0.15);
    --border-card: rgba(45, 134, 89, 0.2);
    --border-hover: rgba(45, 134, 89, 0.45);
    --border-gold: rgba(212, 168, 83, 0.3);

    /* Emerald Palette */
    --emerald-50: #ecfdf5;
    --emerald-100: #d1fae5;
    --emerald-200: #a7f3d0;
    --emerald-300: #6ee7b7;
    --emerald-400: #34d399;
    --emerald-500: #10b981;
    --emerald-600: #059669;
    --emerald-700: #047857;
    --emerald-800: #065f46;
    --emerald-900: #064e3b;

    /* Gold Palette */
    --gold-300: #f0d68a;
    --gold-400: #d4a853;
    --gold-500: #c9952c;
    --gold-600: #a87d24;

    /* Text */
    --text-primary: #e8f5ee;
    --text-secondary: #a3c4b3;
    --text-muted: #6b9580;
    --text-accent: #34d399;
    --text-gold: #d4a853;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(16, 185, 129, 0.15);
    --shadow-gold-glow: 0 0 20px rgba(212, 168, 83, 0.15);

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* Spacing */
    --nav-height: 64px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-deep);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: var(--nav-height);
}

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

button {
    cursor: pointer;
    font-family: inherit;
}

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

/* ============================================
   ANIMATED BACKGROUND
   ============================================ */
.bg-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: linear-gradient(160deg, var(--bg-deep) 0%, var(--bg-primary) 30%, var(--bg-secondary) 60%, var(--bg-tertiary) 100%);
}

.bg-canvas::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(16, 185, 129, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(212, 168, 83, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(5, 150, 105, 0.04) 0%, transparent 60%);
    animation: bgDrift 25s ease-in-out infinite;
}

.bg-canvas::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 25% 25%, rgba(16, 185, 129, 0.03) 1px, transparent 1px),
        radial-gradient(circle at 75% 75%, rgba(212, 168, 83, 0.02) 1px, transparent 1px);
    background-size: 60px 60px, 80px 80px;
    animation: patternShift 40s linear infinite;
}

@keyframes bgDrift {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(-3%, -2%) rotate(1deg);
    }

    66% {
        transform: translate(2%, -1%) rotate(-0.5deg);
    }
}

@keyframes patternShift {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(60px, 80px);
    }
}

/* Floating Orbs */
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    z-index: 0;
    pointer-events: none;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.15), transparent);
    top: -100px;
    right: -100px;
    animation: orbFloat1 20s ease-in-out infinite;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(212, 168, 83, 0.1), transparent);
    bottom: -50px;
    left: -50px;
    animation: orbFloat2 18s ease-in-out infinite;
}

.orb-3 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(5, 150, 105, 0.1), transparent);
    top: 50%;
    left: 50%;
    animation: orbFloat3 22s ease-in-out infinite;
}

@keyframes orbFloat1 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-80px, 60px) scale(1.2);
    }
}

@keyframes orbFloat2 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(60px, -40px) scale(1.15);
    }
}

@keyframes orbFloat3 {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        transform: translate(-40%, -60%) scale(1.1);
    }
}

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

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

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(6, 15, 11, 0.75);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border-subtle);
    transition: var(--transition);
    height: calc(var(--nav-height) + env(safe-area-inset-top, 0px));
    padding-top: env(safe-area-inset-top, 0px);
}

.navbar.scrolled {
    background: rgba(6, 15, 11, 0.92);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    height: 100%;
    gap: 8px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--text-primary);
    flex-shrink: 0;
    transition: var(--transition);
}

.nav-brand:hover {
    color: var(--emerald-400);
}

.nav-brand-icon {
    font-size: 1.5rem;
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-4px) rotate(2deg);
    }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    margin-right: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition);
}

.nav-link:hover {
    background: rgba(16, 185, 129, 0.08);
    color: var(--text-primary);
}

.nav-link.active {
    background: rgba(16, 185, 129, 0.12);
    color: var(--emerald-400);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-login-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: linear-gradient(135deg, var(--emerald-700), var(--emerald-600));
    color: var(--emerald-50);
    border: none;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 700;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.25);
}

.nav-login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.35);
}

.nav-user-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
}

.nav-user-menu:hover {
    border-color: var(--border-hover);
    background: rgba(16, 185, 129, 0.12);
}

.nav-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--emerald-600);
    object-fit: cover;
}

.nav-user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.nav-dropdown-arrow {
    color: var(--text-muted);
    transition: var(--transition);
}

.nav-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: rgba(15, 35, 24, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.95);
    transition: var(--transition);
    z-index: 100;
}

.nav-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    transition: var(--transition);
}

.nav-dropdown-item:hover {
    background: rgba(16, 185, 129, 0.1);
    color: var(--text-primary);
}

.nav-dropdown-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 6px 0;
}

.nav-dropdown-logout {
    color: #ef5350;
}

.nav-dropdown-logout:hover {
    background: rgba(239, 83, 80, 0.1);
    color: #ff6659;
}

.nav-mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: none;
    border: none;
}

.nav-mobile-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.page-content {
    position: relative;
    z-index: 1;
    margin-top: calc(var(--nav-height) + env(safe-area-inset-top, 0px));
    padding: 10px 0 100px;
    min-height: calc(100vh - var(--nav-height) - env(safe-area-inset-top, 0px));
}

/* ============================================
   HERO / HEADER SECTION
   ============================================ */
.hero {
    text-align: center;
    padding: 50px 24px 40px;
    position: relative;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-xl);
    margin-bottom: 24px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--emerald-600), var(--gold-400), var(--emerald-400));
    animation: headerShine 4s ease-in-out infinite;
}

@keyframes headerShine {

    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }
}

.hero-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--emerald-800), var(--emerald-700));
    border: 2px solid var(--border-hover);
    border-radius: 24px;
    font-size: 36px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-glow);
    animation: iconFloat 3s ease-in-out infinite;
}

.hero h1 {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--emerald-300), var(--gold-400), var(--emerald-200));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientText 6s ease-in-out infinite;
    margin-bottom: 8px;
    letter-spacing: -0.03em;
}

@keyframes gradientText {

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

    50% {
        background-position: 100% 50%;
    }
}

.hero p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
    font-weight: 500;
}

/* ============================================
   STATS BAR
   ============================================ */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 0 0 24px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    padding: 18px 28px;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    min-width: 130px;
    transition: var(--transition);
    flex: 1;
    max-width: 200px;
}

.stat-item:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--emerald-400), var(--gold-400));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    margin-top: 2px;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
    transform: translateY(-3px);
}

.card-body {
    padding: 20px;
}

.overflow-visible {
    overflow: visible !important;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    padding: 12px 22px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--emerald-700), var(--emerald-600));
    color: var(--emerald-50);
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.35);
    background: linear-gradient(135deg, var(--emerald-600), var(--emerald-500));
}

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

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
    color: #fff;
}

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

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.82rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1rem;
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

/* ============================================
   FORM INPUTS
   ============================================ */
.input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    color: var(--text-primary);
    font-family: inherit;
    transition: var(--transition);
}

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

.input:focus {
    outline: none;
    border-color: var(--emerald-500);
    background: var(--bg-input-focus);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12), 0 0 20px rgba(16, 185, 129, 0.08);
}

textarea.input {
    resize: vertical;
    min-height: 80px;
    line-height: 1.6;
}

/* ============================================
   SEARCH SECTION
   ============================================ */
.search-section {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 24px;
}

.search-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-input-wrapper {
    flex: 1;
    min-width: 240px;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: var(--text-muted);
    pointer-events: none;
    transition: var(--transition);
}

.search-input {
    width: 100%;
    padding: 14px 16px 14px 46px;
    background: var(--bg-input);
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    color: var(--text-primary);
    font-family: inherit;
    transition: var(--transition);
}

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

.search-input:focus {
    outline: none;
    border-color: var(--emerald-500);
    background: var(--bg-input-focus);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

/* ============================================
   BADGES & TAGS
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid;
}

.badge-emerald {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.15);
    color: var(--emerald-400);
}

.badge-gold {
    background: rgba(212, 168, 83, 0.1);
    border-color: rgba(212, 168, 83, 0.15);
    color: var(--gold-400);
}

.badge-purple {
    background: rgba(139, 92, 246, 0.12);
    border-color: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
}

.badge-blue {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.badge-red {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.badge-muted {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--border-subtle);
    color: var(--text-muted);
}

/* ============================================
   TAB SYSTEM
   ============================================ */
.tabs {
    display: flex;
    gap: 4px;
    padding: 6px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    transition: var(--transition);
    white-space: nowrap;
    position: relative;
}

.tab-btn:hover {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--emerald-700), var(--emerald-600));
    color: var(--emerald-50);
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.25);
}

.tab-btn .lock-icon {
    font-size: 0.7rem;
    opacity: 0.6;
}

.tab-content {
    display: none;
    animation: tabFadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes tabFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   FATWA TEXT DISPLAY
   ============================================ */
.fatwa-text-display {
    background: rgba(0, 0, 0, 0.2);
    padding: 24px;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    line-height: 1.9;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    border-left: 4px solid var(--emerald-600);
}

.fatwa-text-display strong {
    color: var(--emerald-200);
    font-weight: 700;
}

.fatwa-text-display em {
    color: var(--text-secondary);
    font-style: italic;
}

.fatwa-text-display s {
    color: var(--text-muted);
    text-decoration: line-through;
}

.fatwa-text-display code {
    font-family: 'Courier New', Courier, monospace;
    background: rgba(16, 185, 129, 0.1);
    color: var(--emerald-300);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.88em;
}

/* ============================================
   MEDIA LINKS
   ============================================ */
.media-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.media-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 18px;
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
}

.media-link:hover {
    transform: translateY(-2px);
    filter: brightness(1.15);
}

.media-link.video {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.media-link.dokumen {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.media-link.gambar {
    background: linear-gradient(135deg, #10b981, #059669);
}

.media-link.halaman {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.media-link.audio {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 36px;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 12px 24px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-card);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    font-size: 0.88rem;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--emerald-700);
    border-color: var(--emerald-600);
    color: var(--emerald-100);
    box-shadow: var(--shadow-glow);
}

.pagination-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.pagination-info {
    background: linear-gradient(135deg, var(--emerald-700), var(--emerald-600));
    color: var(--emerald-100);
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.88rem;
}

/* ============================================
   SKELETON LOADING
   ============================================ */
.skeleton-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.skeleton-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.skeleton-badge {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 25%, rgba(255, 255, 255, 0.06) 50%, rgba(255, 255, 255, 0.03) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    flex-shrink: 0;
}

.skeleton-content {
    flex: 1;
}

.skeleton-line {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 25%, rgba(255, 255, 255, 0.06) 50%, rgba(255, 255, 255, 0.03) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    margin-bottom: 10px;
}

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

    100% {
        background-position: 200% 0;
    }
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-card);
}

.empty-icon {
    font-size: 72px;
    margin-bottom: 20px;
    animation: iconFloat 3s ease-in-out infinite;
}

.empty-state h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* ============================================
   SCROLL TO TOP
   ============================================ */
.scroll-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--emerald-700), var(--emerald-600));
    border: 1px solid var(--border-hover);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-glow);
    z-index: 998;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.3);
}

.scroll-top svg {
    width: 22px;
    height: 22px;
    fill: var(--emerald-100);
}

/* ============================================
   AUTH MODAL
   ============================================ */
.auth-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.auth-modal-overlay.active {
    opacity: 1;
}

.auth-modal {
    background: linear-gradient(180deg, rgba(15, 40, 28, 0.95), rgba(10, 26, 20, 0.98));
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-xl);
    padding: 40px;
    text-align: center;
    max-width: 420px;
    width: 100%;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.auth-modal-overlay.active .auth-modal {
    transform: scale(1) translateY(0);
}

.auth-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition);
}

.auth-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.auth-modal-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.auth-modal-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.auth-modal-desc {
    color: var(--text-secondary);
    font-size: 0.92rem;
    margin-bottom: 24px;
    line-height: 1.5;
}

.auth-modal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 32px;
    background: white;
    color: #333;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    width: 100%;
}

.auth-modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.auth-modal-note {
    margin-top: 16px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ============================================
   TOAST NOTIFICATION
   ============================================ */
.toast-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(15, 35, 24, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-card);
    color: var(--text-primary);
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    z-index: 10001;
    opacity: 0;
    transition: var(--transition);
    white-space: nowrap;
}

.toast-notification.active {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 40px 20px;
    margin-top: 60px;
    border-top: 1px solid var(--border-subtle);
}

.footer-container {
    max-width: 1000px;
    margin: 0 auto;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.footer-icon {
    font-size: 1.3rem;
}

.footer-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.footer-copyright {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
}

.section-title-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--emerald-800), var(--emerald-700));
    border-radius: 12px;
    font-size: 1.2rem;
}

/* ============================================
   RESULTS INFO
   ============================================ */
.results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 12px 18px;
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    flex-wrap: wrap;
    gap: 10px;
}

.results-count {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.results-count strong {
    color: var(--emerald-400);
    font-weight: 700;
}

.search-tag {
    background: linear-gradient(135deg, var(--emerald-700), var(--emerald-600));
    color: var(--emerald-100);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}

/* ============================================
   PROGRESS BAR
   ============================================ */
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--emerald-600), var(--emerald-400));
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    :root {
        --nav-height: 56px;
    }

    .container {
        padding: 14px;
    }

    .hero {
        padding: 36px 18px 30px;
        border-radius: var(--radius-lg);
    }

    .hero-icon {
        width: 64px;
        height: 64px;
        font-size: 28px;
    }

    .stats-bar {
        gap: 10px;
    }

    .stat-item {
        padding: 14px 18px;
        min-width: 0;
    }

    .stat-number {
        font-size: 1.6rem;
    }

    .search-section {
        padding: 16px;
    }

    .search-container {
        flex-direction: column;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: rgba(6, 15, 11, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 16px;
        border-bottom: 1px solid var(--border-subtle);
        gap: 4px;
    }

    .nav-links.mobile-open {
        display: flex;
    }

    .nav-link {
        width: 100%;
        padding: 12px 16px;
    }

    .nav-mobile-toggle {
        display: flex;
    }

    .nav-user-name {
        display: none;
    }

    .tabs {
        gap: 2px;
        padding: 4px;
    }

    .tab-btn {
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    .pagination {
        gap: 8px;
    }

    .pagination-btn {
        padding: 10px 18px;
        font-size: 0.85rem;
    }
}

@media (max-width: 420px) {
    .stat-item {
        flex: 1;
        padding: 12px 10px;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .btn {
        padding: 10px 18px;
        font-size: 0.85rem;
    }
}

/* ============================================
   BEHAVIOR CHANGE ENGINE — ADDED STYLES
   ============================================ */

/* Weekly Focus Banner on Home Page */
.weekly-focus-banner {
    background: linear-gradient(135deg, rgba(6, 95, 70, 0.35), rgba(212, 168, 83, 0.15));
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-lg);
    padding: 24px 30px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

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

.weekly-focus-banner::before {
    content: 'TEMA MINGGU INI';
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-gold);
    letter-spacing: 0.1em;
    background: rgba(212, 168, 83, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid var(--border-gold);
}

.weekly-focus-info {
    flex: 1;
}

.weekly-focus-theme-label {
    font-size: 0.8rem;
    color: var(--emerald-400);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.weekly-focus-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.25;
}

.weekly-focus-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 650px;
}

.weekly-focus-action-btn {
    flex-shrink: 0;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
    color: #1e1b04;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-gold-glow);
}

.weekly-focus-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 168, 83, 0.35);
}

@media (max-width: 768px) {
    .weekly-focus-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
    }

    .weekly-focus-action-btn {
        width: 100%;
        text-align: center;
    }
}

/* Reflection & Commitment Post-Quiz UI */
.reflection-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-xl);
    padding: 30px;
    margin: 20px auto;
    max-width: 680px;
    box-shadow: var(--shadow-lg);
    animation: cardFadeIn 0.4s ease forwards;
}

.ref-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--emerald-300);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 10px;
}

/* Impact Selector (1-4) buttons */
.impact-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

@media (max-width: 480px) {
    .impact-selector {
        grid-template-columns: 1fr;
    }
}

.impact-btn {
    background: var(--bg-input);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.impact-btn:hover {
    border-color: var(--emerald-500);
    background: rgba(16, 185, 129, 0.04);
}

.impact-btn.active {
    border-color: var(--emerald-400);
    background: rgba(16, 185, 129, 0.1);
    box-shadow: var(--shadow-glow);
}

.impact-btn-level {
    font-size: 1.4rem;
}

.impact-btn-title {
    font-weight: 700;
    color: var(--text-primary);
}

.impact-btn-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.35;
}

/* Situation/Behavior Gap Selector */
.gap-option-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.gap-option {
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.gap-option:hover {
    border-color: var(--emerald-500);
    background: rgba(16, 185, 129, 0.03);
}

.gap-option.active {
    border-color: var(--emerald-400);
    background: rgba(16, 185, 129, 0.08);
    color: var(--emerald-300);
}

.gap-radio-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gap-option.active .gap-radio-circle {
    border-color: var(--emerald-400);
}

.gap-option.active .gap-radio-circle::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--emerald-400);
}

/* Commitment textarea */
.commitment-textarea {
    width: 100%;
    min-height: 100px;
    background: var(--bg-input);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    transition: var(--transition);
    resize: vertical;
    margin-bottom: 24px;
}

.commitment-textarea:focus {
    border-color: var(--emerald-400);
    background: var(--bg-input-focus);
    outline: none;
    box-shadow: var(--shadow-glow);
}

/* Commitment Cards / Follow-up UI */
.commitment-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    transition: var(--transition);
}

.commitment-card:hover {
    border-color: var(--border-hover);
}

.commitment-card.pending {
    border-left: 4px solid var(--gold-400);
}

.commitment-card.completed {
    border-left: 4px solid var(--emerald-400);
}

.commitment-card.failed {
    border-left: 4px solid #ef4444;
}

.commitment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 12px;
}

.commitment-tag {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
}

.commitment-tag.theme-berpikir {
    background: rgba(96, 165, 250, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(96, 165, 250, 0.3);
}

.commitment-tag.theme-perubahan {
    background: rgba(52, 211, 153, 0.15);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.commitment-tag.theme-kepemimpinan {
    background: rgba(251, 146, 60, 0.15);
    color: #fb923c;
    border: 1px solid rgba(251, 146, 60, 0.3);
}

.commitment-tag.theme-pelayanan {
    background: rgba(167, 139, 250, 0.15);
    color: #a78bfa;
    border: 1px solid rgba(167, 139, 250, 0.3);
}

.commitment-tag.theme-tadabbur {
    background: rgba(244, 63, 94, 0.15);
    color: #f43f5e;
    border: 1px solid rgba(244, 63, 94, 0.3);
}

.commitment-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.commitment-meta-info {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

/* Follow-up Action Container */
.followup-actions {
    background: rgba(10, 26, 20, 0.4);
    border-top: 1px solid var(--border-subtle);
    padding-top: 16px;
    margin-top: 16px;
}

.followup-decision-buttons {
    display: flex;
    gap: 10px;
}

.followup-panel {
    margin-top: 16px;
    animation: tabFadeIn 0.3s ease;
}

/* Heatmap & Grid */
.heatmap-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 30px;
}

.heatmap-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.heatmap-label {
    width: 250px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.heatmap-bar-wrap {
    flex: 1;
    height: 18px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.heatmap-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--emerald-700), var(--emerald-400));
    border-radius: 4px;
    transition: width 0.8s ease-out;
}

.heatmap-count {
    width: 40px;
    text-align: right;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--emerald-400);
}

@media (max-width: 600px) {
    .heatmap-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .heatmap-label {
        width: 100%;
    }

    .heatmap-bar-wrap {
        width: 100%;
    }
}

.level-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
}

.level-pill-1 {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.level-pill-2 {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.level-pill-3 {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.level-pill-4 {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Progress widget for dashboard */
.concept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.concept-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 16px;
    transition: var(--transition);
}

.concept-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.concept-card-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.concept-card-theme {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.concept-card-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.concept-card-count {
    font-weight: 800;
    color: var(--emerald-400);
}

/* ============================================
   QUIZ REFLECTION FLOW STYLES
   ============================================ */

.reflection-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-xl);
    padding: 32px;
    animation: cardFadeIn 0.4s ease forwards;
}

.ref-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.4;
}

.ref-section-title span:first-child {
    font-size: 1.3rem;
    flex-shrink: 0;
}

/* ---- Impact Selector ---- */
.impact-selector {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.impact-btn {
    display: grid;
    grid-template-columns: 2.5rem 1fr;
    grid-template-rows: auto auto;
    column-gap: 14px;
    align-items: center;
    background: var(--bg-input);
    border: 2px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    width: 100%;
    font-family: inherit;
    color: var(--text-primary);
}

.impact-btn:hover {
    border-color: var(--emerald-500);
    background: rgba(16, 185, 129, 0.06);
}

.impact-btn.active {
    border-color: var(--emerald-400);
    background: rgba(16, 185, 129, 0.12);
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.15);
}

.impact-btn-level {
    grid-row: 1 / span 2;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.impact-btn-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.impact-btn-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
    line-height: 1.4;
}

/* ---- Gap Option List ---- */
.gap-option-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 4px;
}

.gap-option-list::-webkit-scrollbar {
    width: 4px;
}
.gap-option-list::-webkit-scrollbar-track {
    background: transparent;
}
.gap-option-list::-webkit-scrollbar-thumb {
    background: var(--emerald-700);
    border-radius: 4px;
}

.gap-option {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-input);
    border: 2px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.gap-option:hover {
    border-color: var(--emerald-500);
    background: rgba(16, 185, 129, 0.06);
    color: var(--text-primary);
}

.gap-option.active {
    border-color: var(--emerald-400);
    background: rgba(16, 185, 129, 0.12);
    color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.15);
}

.gap-radio-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border-card);
    flex-shrink: 0;
    transition: var(--transition);
    position: relative;
}

.gap-option.active .gap-radio-circle {
    border-color: var(--emerald-400);
    background: var(--emerald-400);
}

.gap-option.active .gap-radio-circle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--bg-deep);
}

/* ---- Commitment Textarea ---- */
.commitment-textarea {
    width: 100%;
    min-height: 100px;
    background: var(--bg-input);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.88rem;
    line-height: 1.6;
    resize: vertical;
    transition: var(--transition);
    outline: none;
}

.commitment-textarea:focus {
    border-color: var(--emerald-500);
    background: var(--bg-input-focus);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.commitment-textarea::placeholder {
    color: var(--text-muted);
}

/* ---- Template Buttons (Step 3) ---- */
.commitment-templates .qz-template-btn {
    position: relative;
    overflow: hidden;
    text-align: left;
    font-size: 0.82rem;
    padding: 10px 14px;
    justify-content: flex-start;
    white-space: normal;
    line-height: 1.4;
    border: 1px solid var(--border-card);
    background: rgba(10, 26, 20, 0.5);
    color: var(--text-secondary);
    transition: var(--transition);
}

.commitment-templates .qz-template-btn:hover {
    border-color: var(--emerald-500);
    background: rgba(16, 185, 129, 0.08);
    color: var(--text-primary);
}

/* ---- Form Input shared ---- */
.form-input:focus {
    border-color: var(--emerald-500) !important;
    background: var(--bg-input-focus) !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
    outline: none;
}

/* ============================================
   BRAND LOGO STYLES (NEW)
   ============================================ */
.nav-brand {
    display: inline-flex;
    align-items: center;
}

.nav-brand-logo {
    height: 32px;
    width: 32px;
    object-fit: contain;
    border-radius: 50%;
    margin-right: 8px;
    border: 1px solid var(--border-gold);
    background: var(--bg-secondary);
}

.footer-brand {
    display: inline-flex;
    align-items: center;
}

.footer-brand-logo {
    height: 24px;
    width: 24px;
    object-fit: contain;
    border-radius: 50%;
    margin-right: 8px;
    border: 1px solid var(--border-gold);
    background: var(--bg-secondary);
}

.hero-logo {
    display: block;
    margin: 0 auto 20px;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 2px solid var(--gold-400);
    background: var(--bg-secondary);
    box-shadow: var(--shadow-gold-glow);
    animation: pulseGlow 3s infinite alternate;
    object-fit: contain;
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 15px rgba(212, 168, 83, 0.15);
        transform: scale(1);
    }
    100% {
        box-shadow: 0 0 30px rgba(212, 168, 83, 0.45);
        transform: scale(1.04);
    }
}

/* ============================================
   CFM BUILDER — AI Assisted Facilitation
   ============================================ */

/* Context Setup (before wizard) */
.cfm-context-form {
    max-width: 560px;
    margin: 0 auto;
    padding: 32px 24px;
    text-align: center;
}
.cfm-context-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
}
.cfm-context-subtitle {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 28px;
    line-height: 1.5;
}
.cfm-context-group {
    margin-bottom: 20px;
    text-align: left;
}
.cfm-context-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-gold);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
    display: block;
}
.cfm-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.cfm-chip {
    padding: 7px 14px;
    border-radius: 20px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
    user-select: none;
}
.cfm-chip:hover {
    border-color: var(--emerald-500);
    color: var(--emerald-400);
    background: rgba(16, 185, 129, 0.06);
}
.cfm-chip.selected {
    border-color: var(--emerald-500);
    background: rgba(16, 185, 129, 0.12);
    color: var(--emerald-400);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.15);
}
.cfm-chip.duration {
    min-width: 64px;
    text-align: center;
}
.cfm-context-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 24px 0;
}
.cfm-start-btn {
    width: 100%;
    padding: 14px 20px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--emerald-600), var(--emerald-500));
    color: white;
    font-weight: 800;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.2);
}
.cfm-start-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
}
.cfm-start-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Two-panel wizard layout */
.cfm-layout {
    display: flex;
    gap: 0;
    min-height: 480px;
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-card);
}

/* Step sidebar */
.cfm-sidebar {
    width: 188px;
    flex-shrink: 0;
    border-right: 1px solid var(--border-subtle);
    padding: 16px 8px;
    background: rgba(10, 26, 20, 0.4);
}
.cfm-sidebar-title {
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0 8px;
    margin-bottom: 12px;
}
.cfm-step {
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.18s;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 2px;
}
.cfm-step:hover:not(.cfm-step--disabled) {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
}
.cfm-step--active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--emerald-400);
}
.cfm-step--approved {
    color: var(--emerald-400);
}
.cfm-step--draft {
    color: var(--gold-400);
}
.cfm-step--disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
.cfm-step-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 800;
    flex-shrink: 0;
    transition: all 0.2s;
}
.cfm-step--approved .cfm-step-icon {
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--emerald-500);
    color: var(--emerald-400);
}
.cfm-step--active .cfm-step-icon {
    background: var(--emerald-600);
    border-color: var(--emerald-400);
    color: white;
}
.cfm-step--draft .cfm-step-icon {
    border-color: var(--gold-400);
    color: var(--gold-400);
}

/* Panel kanan */
.cfm-panel {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}
.cfm-panel-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
}
.cfm-panel-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.cfm-panel-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Context badge di panel header */
.cfm-context-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(212, 168, 83, 0.08);
    border: 1px solid rgba(212, 168, 83, 0.2);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 0.73rem;
    color: var(--text-gold);
    font-weight: 600;
    margin-top: 6px;
    margin-right: 4px;
}

/* View mode (read-only display) */
.cfm-content-view {
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 16px 18px;
    line-height: 1.75;
    color: var(--text-primary);
    min-height: 80px;
    font-size: 0.93rem;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Edit mode textarea */
.cfm-content-edit {
    width: 100%;
    min-height: 120px;
    background: var(--bg-input);
    border: 1px solid var(--emerald-600);
    border-radius: 10px;
    padding: 14px 16px;
    color: var(--text-primary);
    font-size: 0.93rem;
    line-height: 1.7;
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.2s;
}
.cfm-content-edit:focus {
    outline: none;
    border-color: var(--emerald-400);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Question cards */
.cfm-question-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-card);
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 12px;
    transition: border-color 0.18s;
}
.cfm-question-card:hover {
    border-color: rgba(45, 134, 89, 0.35);
}
.cfm-question-number {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}
.cfm-question-text {
    font-size: 0.97rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 12px;
}
.cfm-question-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 0.8rem;
}
.cfm-meta-item {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-subtle);
    padding: 7px 10px;
    border-radius: 7px;
}
.cfm-meta-item.full-width {
    grid-column: 1 / -1;
}
.cfm-meta-label {
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--text-gold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}
.cfm-meta-value {
    color: var(--text-secondary);
    line-height: 1.45;
}
.cfm-question-badges {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.cfm-badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.cfm-badge--easy {
    background: rgba(16, 185, 129, 0.1);
    color: var(--emerald-400);
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.cfm-badge--medium {
    background: rgba(212, 168, 83, 0.1);
    color: var(--gold-400);
    border: 1px solid rgba(212, 168, 83, 0.2);
}
.cfm-badge--deep {
    background: rgba(139, 92, 246, 0.1);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.2);
}
.cfm-badge--time {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    border: 1px solid var(--border-subtle);
}

/* Loading state */
.cfm-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
    gap: 16px;
}
.cfm-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--emerald-400);
    border-radius: 50%;
    animation: cfmSpin 0.8s linear infinite;
}
@keyframes cfmSpin {
    to { transform: rotate(360deg); }
}
.cfm-loading-text {
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 600;
}

/* AI suggestion chip (Grammarly-like inline hint) */
.cfm-ai-hint {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: rgba(212, 168, 83, 0.06);
    border: 1px solid rgba(212, 168, 83, 0.2);
    border-radius: 8px;
    padding: 10px 14px;
    margin-top: 8px;
    font-size: 0.82rem;
}
.cfm-ai-hint-icon { font-size: 1rem; flex-shrink: 0; }
.cfm-ai-hint-text { color: var(--text-secondary); line-height: 1.5; }
.cfm-ai-hint-text strong { color: var(--text-gold); }

/* Action bar */
.cfm-action-bar {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 14px 0 0;
    margin-top: 16px;
    border-top: 1px solid var(--border-subtle);
    flex-wrap: wrap;
}
.cfm-action-bar .btn-primary {
    margin-left: auto;
}

/* Empty state */
.cfm-empty {
    padding: 48px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.cfm-empty-icon {
    font-size: 3rem;
    opacity: 0.5;
}
.cfm-empty-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-secondary);
}
.cfm-empty-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    max-width: 320px;
    line-height: 1.55;
}

/* Quality Score */
.cfm-quality-wrap {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(212, 168, 83, 0.05));
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 20px;
}
.cfm-quality-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}
.cfm-quality-score {
    font-size: 2.4rem;
    font-weight: 900;
    color: var(--emerald-400);
    line-height: 1;
}
.cfm-quality-label {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.cfm-quality-bar-wrap {
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
    width: 120px;
}
.cfm-quality-bar-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--emerald-600), var(--emerald-400));
    transition: width 0.8s ease;
}
.cfm-quality-notes {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.cfm-quality-notes li {
    font-size: 0.83rem;
    padding: 3px 0;
    display: flex;
    align-items: center;
    gap: 7px;
}
.cfm-quality-notes li.pass { color: var(--emerald-400); }
.cfm-quality-notes li.warn { color: var(--gold-400); }
.cfm-quality-notes li.fail { color: #f87171; }

/* Facilitator Mode fullscreen overlay */
.cfm-facilitator-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}
.cfm-facilitator-close {
    position: fixed;
    top: 20px;
    right: 24px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s;
}
.cfm-facilitator-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}
.cfm-facilitator-counter {
    position: fixed;
    top: 20px;
    left: 24px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 6px 14px;
}
.cfm-facilitator-slide-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-height: calc(100vh - 160px);
    width: 100%;
    max-width: 860px;
    overflow-y: auto;
    padding: 10px 20px 30px;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}
.cfm-facilitator-section-label {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--text-gold);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
    opacity: 0.8;
}
.cfm-facilitator-question {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 800;
    text-align: center;
    line-height: 1.5;
    color: var(--text-primary);
    max-width: 780px;
    animation: cfmFadeUp 0.35s ease;
}
.cfm-facilitator-question.is-long {
    font-size: clamp(0.95rem, 2vw, 1.25rem);
    font-weight: 600;
    line-height: 1.65;
    max-width: 820px;
    text-align: left;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    padding: 20px 24px;
    border-radius: 12px;
}
@keyframes cfmFadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.cfm-facilitator-meta {
    margin-top: 28px;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}
.cfm-facilitator-purpose {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 0.82rem;
    color: var(--text-muted);
    max-width: 460px;
    text-align: center;
    line-height: 1.5;
}
.cfm-facilitator-followup {
    background: rgba(212, 168, 83, 0.06);
    border: 1px solid rgba(212, 168, 83, 0.2);
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 0.82rem;
    color: var(--gold-300);
    max-width: 460px;
    text-align: center;
    line-height: 1.5;
}
.cfm-facilitator-nav {
    position: fixed;
    bottom: 36px;
    display: flex;
    gap: 16px;
    align-items: center;
}
.cfm-facilitator-btn {
    padding: 12px 28px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.18s;
}
.cfm-facilitator-btn.prev {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}
.cfm-facilitator-btn.next {
    background: linear-gradient(135deg, var(--emerald-600), var(--emerald-500));
    color: white;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}
.cfm-facilitator-btn:hover { transform: translateY(-1px); }
.cfm-facilitator-btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }
.cfm-facilitator-dots {
    display: flex;
    gap: 6px;
    align-items: center;
}
.cfm-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border-subtle);
    transition: all 0.2s;
}
.cfm-dot.active {
    background: var(--emerald-400);
    width: 18px;
    border-radius: 3px;
}

/* Responsive CFM */
@media (max-width: 640px) {
    .cfm-layout {
        flex-direction: column;
    }
    .cfm-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
        display: flex;
        gap: 4px;
        overflow-x: auto;
        padding: 8px;
        -webkit-overflow-scrolling: touch;
    }
    .cfm-sidebar-title { display: none; }
    .cfm-step {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 7px 10px;
        font-size: 0.77rem;
    }
    .cfm-panel { padding: 16px; }
    .cfm-question-meta { grid-template-columns: 1fr; }
    .cfm-context-form { padding: 20px 16px; }
}