/* ============================================
   TOKOH PLATFORM - Modern Purple Theme
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --primary: #6C3FA0;
    --primary-dark: #4A2270;
    --primary-light: #A78BFA;
    --primary-glow: rgba(108, 63, 160, 0.15);
    --secondary: #7C3AED;
    --accent: #F59E0B;
    --accent-light: #FCD34D;
    --surface: #FAFAFA;
    --surface-dark: #1A0A2E;
    --surface-card: #FFFFFF;
    --text-primary: #1A0A2E;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --text-on-dark: #F3F0FF;
    --border: #E5E7EB;
    --border-light: #F3F4F6;
    --success: #10B981;
    --error: #EF4444;
    --warning: #F59E0B;
    --info: #3B82F6;
    --gradient-hero: linear-gradient(135deg, #1A0A2E 0%, #4A2270 40%, #6C3FA0 70%, #7C3AED 100%);
    --gradient-card: linear-gradient(145deg, #6C3FA0 0%, #7C3AED 100%);
    --gradient-accent: linear-gradient(135deg, #F59E0B 0%, #F97316 100%);
    --gradient-soft: linear-gradient(180deg, #F3F0FF 0%, #FAFAFA 100%);
    --shadow-sm: 0 1px 3px rgba(26, 10, 46, 0.06);
    --shadow-md: 0 4px 14px rgba(26, 10, 46, 0.08);
    --shadow-lg: 0 10px 40px rgba(26, 10, 46, 0.12);
    --shadow-xl: 0 20px 60px rgba(26, 10, 46, 0.15);
    --shadow-purple: 0 8px 30px rgba(108, 63, 160, 0.25);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--surface);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }
h1,h2,h3,h4,h5,h6 { font-family: var(--font-display); color: var(--text-primary); line-height: 1.3; font-weight: 600; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.6rem); }
p { margin-bottom: 1rem; }
::selection { background: var(--primary-light); color: #fff; }

/* ---- Container ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: 1400px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 800px; margin: 0 auto; padding: 0 24px; }

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
    background: #ffffff;
    border-bottom: 1px solid rgba(108,63,160,0.1);
    box-shadow: 0 1px 8px rgba(0,0,0,0.06);
    transition: var(--transition);
    padding: 0;
}
.navbar.scrolled {
    box-shadow: 0 4px 20px rgba(26,10,46,0.1);
}
.navbar-inner {
    display: flex; align-items: center; justify-content: space-between;
    max-width: 1400px; margin: 0 auto; padding: 14px 24px;
}
.navbar-brand {
    display: flex; align-items: center; gap: 12px;
    font-family: var(--font-display); font-weight: 700;
    color: var(--primary-dark);
    max-width: 320px; min-width: 0; flex-shrink: 0;
}
.navbar-brand img { height: 40px; width: auto; border-radius: 8px; flex-shrink: 0; }
.brand-text {
    display: flex; flex-direction: column; justify-content: center; line-height: 1.2;
}
.brand-name {
    font-size: 1.1rem;
    color: var(--primary-dark);
    font-weight: 800;
}
.brand-title {
    font-size: 0.72rem; font-weight: 500;
    color: var(--text-muted);
    -webkit-text-fill-color: initial;
}
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; flex-shrink: 1; margin: 0; padding: 0; }
.nav-links li { list-style: none; }
.nav-links a {
    display: inline-flex; align-items: center; padding: 8px 12px;
    font-size: 0.88rem; font-weight: 500; color: var(--text-secondary);
    border-radius: var(--radius-sm); transition: var(--transition);
    position: relative; white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active {
    color: var(--primary); background: var(--primary-glow);
}
.nav-links a.active::after {
    content: ''; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
    width: 20px; height: 3px; background: var(--primary); border-radius: 2px;
}
.nav-cta {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 24px !important; background: var(--gradient-card) !important;
    color: #fff !important; border-radius: var(--radius-xl) !important;
    font-weight: 600 !important; font-size: 0.88rem !important;
    box-shadow: var(--shadow-purple);
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 35px rgba(108,63,160,0.35) !important; }
.nav-toggle {
    display: none; background: #fff; border: 2px solid var(--primary);
    cursor: pointer; width: 44px; height: 44px; border-radius: var(--radius-sm);
    justify-content: center; align-items: center;
    position: relative; z-index: 20; flex-shrink: 0;
}
.nav-toggle:hover { background: var(--primary-glow); }
.nav-toggle span {
    display: block; width: 22px; height: 2.5px; background: var(--primary);
    position: relative; transition: all 0.3s ease; border-radius: 2px;
}
.nav-toggle span::before, .nav-toggle span::after {
    content: ''; position: absolute; left: 0; width: 22px; height: 2.5px;
    background: var(--primary); transition: all 0.3s ease; border-radius: 2px;
}
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }
/* Hamburger → X */
.nav-toggle.active { background: var(--primary); border-color: var(--primary); }
.nav-toggle.active span { background: transparent; }
.nav-toggle.active span::before { top: 0; transform: rotate(45deg); background: #fff; }
.nav-toggle.active span::after { top: 0; transform: rotate(-45deg); background: #fff; }

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    min-height: 100vh; display: flex; align-items: center;
    background: var(--gradient-hero); position: relative; overflow: hidden;
    padding: 120px 0 80px;
}
.hero::before {
    content: ''; position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero::after {
    content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
    height: 60px; background: var(--surface);
    clip-path: ellipse(70% 100% at 50% 100%);
}
.hero-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 60px;
    align-items: center; position: relative; z-index: 1;
}
.hero-content { color: var(--text-on-dark); }
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15);
    padding: 8px 20px; border-radius: var(--radius-xl); font-size: 0.85rem;
    font-weight: 500; margin-bottom: 28px; backdrop-filter: blur(10px);
    color: var(--accent-light);
}
.hero-badge i { font-size: 0.75rem; }
.hero-title {
    font-size: clamp(2.4rem, 5.5vw, 3.8rem); font-weight: 700;
    line-height: 1.15; margin-bottom: 20px; color: #fff;
}
.hero-title .highlight {
    background: var(--gradient-accent);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle {
    font-size: 1.15rem; line-height: 1.8; margin-bottom: 36px;
    color: rgba(255,255,255,0.8); max-width: 520px; font-weight: 300;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-image {
    display: flex; justify-content: center; align-items: center; position: relative;
}
.hero-image-wrapper {
    width: 380px; height: 480px; border-radius: var(--radius-xl);
    overflow: hidden; position: relative; z-index: 2;
    box-shadow: 0 30px 80px rgba(0,0,0,0.3);
    border: 3px solid rgba(255,255,255,0.15);
}
.hero-image-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.hero-image-decoration {
    position: absolute; width: 300px; height: 300px;
    border: 2px solid rgba(245,158,11,0.3); border-radius: var(--radius-xl);
    top: -30px; right: -30px; z-index: 1;
    animation: float 6s ease-in-out infinite;
}
.hero-stats { display: none; }

/* ---- Stats Floating Bar ---- */
.stats-floating {
    position: relative; z-index: 10; margin-top: -60px; padding-bottom: 40px;
}
.stats-floating-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.stats-floating-card {
    background: #fff; border-radius: 16px; padding: 28px 24px;
    display: flex; align-items: center; gap: 18px;
    box-shadow: 0 10px 40px rgba(26,10,46,0.08);
    border: 1px solid rgba(108,63,160,0.06);
    transition: var(--transition);
}
.stats-floating-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(26,10,46,0.12);
}
.stats-floating-icon {
    width: 52px; height: 52px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; flex-shrink: 0;
}
.stats-floating-info { display: flex; flex-direction: column; }
.stats-floating-number {
    font-family: var(--font-display); font-size: 1.6rem; font-weight: 700;
    color: var(--text-primary); line-height: 1.2;
}
.stats-floating-label {
    font-size: 0.82rem; color: var(--text-muted); font-weight: 500; margin-top: 2px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 32px; font-family: var(--font-body); font-size: 0.95rem;
    font-weight: 600; border-radius: var(--radius-xl); border: none;
    cursor: pointer; transition: var(--transition); text-align: center;
    justify-content: center; white-space: nowrap;
}
.btn-primary {
    background: var(--gradient-card); color: #fff; box-shadow: var(--shadow-purple);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 14px 40px rgba(108,63,160,0.4); color: #fff; }
.btn-accent {
    background: var(--gradient-accent); color: #fff;
    box-shadow: 0 8px 30px rgba(245,158,11,0.3);
}
.btn-accent:hover { transform: translateY(-3px); box-shadow: 0 14px 40px rgba(245,158,11,0.4); color: #fff; }
.btn-outline {
    background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.3);
}
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: #fff; color: #fff; }
.btn-outline-primary {
    background: transparent; color: var(--primary); border: 2px solid var(--primary);
}
.btn-outline-primary:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: 10px 22px; font-size: 0.85rem; }
.btn-lg { padding: 18px 40px; font-size: 1.05rem; }
.btn-ghost {
    background: transparent; color: var(--primary); padding: 10px 8px;
}
.btn-ghost:hover { color: var(--primary-dark); }
.btn-white { background: #fff; color: var(--primary); }
.btn-white:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); color: var(--primary); }
.btn-block { width: 100%; }

/* ============================================
   SECTION STYLES
   ============================================ */
.section {
    padding: 100px 0; position: relative;
}
.section-light { background: var(--surface); }
.section-white { background: #fff; }
.section-gradient { background: var(--gradient-soft); }
.section-dark { background: var(--surface-dark); color: var(--text-on-dark); }
.section-header {
    text-align: center; max-width: 700px; margin: 0 auto 60px;
}
.section-label {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--primary); font-weight: 600; font-size: 0.88rem;
    text-transform: uppercase; letter-spacing: 2px; margin-bottom: 16px;
    font-family: var(--font-body);
}
.section-label::before, .section-label::after {
    content: ''; width: 30px; height: 2px; background: var(--primary-light);
}
.section-title { margin-bottom: 16px; }
.section-desc { color: var(--text-secondary); font-size: 1.05rem; max-width: 600px; margin: 0 auto; }

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--surface-card); border-radius: var(--radius-lg);
    overflow: hidden; transition: var(--transition);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}
.card:hover {
    transform: translateY(-6px); box-shadow: var(--shadow-lg);
    border-color: rgba(108,63,160,0.15);
}
.card-image {
    width: 100%; height: 240px; overflow: hidden; position: relative;
}
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.card:hover .card-image img { transform: scale(1.05); }
.card-body { padding: 28px; }
.card-category {
    display: inline-block; font-size: 0.78rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 1px; color: var(--primary);
    background: var(--primary-glow); padding: 5px 14px; border-radius: var(--radius-xl);
    margin-bottom: 14px;
}
.card-title { font-size: 1.2rem; margin-bottom: 12px; line-height: 1.4; }
.card-title a { color: inherit; }
.card-title a:hover { color: var(--primary); }
.card-text { color: var(--text-secondary); font-size: 0.92rem; line-height: 1.7; }
.card-meta {
    display: flex; align-items: center; gap: 16px; margin-top: 20px;
    padding-top: 20px; border-top: 1px solid var(--border-light);
    font-size: 0.82rem; color: var(--text-muted);
}
.card-meta i { color: var(--primary-light); }
.card-price {
    font-family: var(--font-display); font-size: 1.4rem; font-weight: 700;
    color: var(--primary);
}
.card-price-old {
    font-size: 0.9rem; color: var(--text-muted); text-decoration: line-through;
    font-weight: 400; margin-left: 8px;
}
.card-badge {
    position: absolute; top: 16px; left: 16px; z-index: 2;
    background: var(--gradient-accent); color: #fff;
    padding: 6px 14px; border-radius: var(--radius-xl);
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
}

/* ---- Grid Layouts ---- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }

/* ============================================
   BOOK CARDS
   ============================================ */
.book-card {
    display: flex; gap: 24px; padding: 24px; background: #fff;
    border-radius: var(--radius-lg); border: 1px solid var(--border-light);
    transition: var(--transition);
}
.book-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.book-cover {
    width: 140px; min-width: 140px; height: 200px;
    border-radius: var(--radius-md); overflow: hidden;
    box-shadow: var(--shadow-md);
}
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-info { flex: 1; }
.book-info h3 { font-size: 1.15rem; margin-bottom: 8px; }
.book-info .book-meta { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 12px; }
.book-info .book-desc { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; }

/* ============================================
   E-BOOK & COURSE CARDS
   ============================================ */
.ebook-card .card-image { height: auto; aspect-ratio: 148 / 210; }
.ebook-card .card-image img { width: 100%; height: 100%; object-fit: cover; }
.ebook-grid .ebook-card { display: flex; flex-direction: column; }
.ebook-grid .ebook-card .card-body { flex: 1; display: flex; flex-direction: column; }
.ebook-grid .ebook-card .card-body .mt-2 { margin-top: auto; }
.course-card { position: relative; }
.course-level {
    position: absolute; top: 16px; right: 16px; z-index: 2;
    padding: 5px 14px; border-radius: var(--radius-xl);
    font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
    background: rgba(255,255,255,0.95); color: var(--primary);
    backdrop-filter: blur(10px);
}
.course-stats {
    display: flex; gap: 20px; margin-top: 16px;
}
.course-stat {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.82rem; color: var(--text-muted);
}
.course-stat i { color: var(--primary-light); font-size: 0.9rem; }

/* ============================================
   TIMELINE
   ============================================ */
.timeline { position: relative; padding-left: 40px; }
.timeline::before {
    content: ''; position: absolute; left: 15px; top: 0; bottom: 0;
    width: 2px; background: linear-gradient(to bottom, var(--primary), var(--primary-light));
}
.timeline-item {
    position: relative; margin-bottom: 40px; padding: 24px;
    background: #fff; border-radius: var(--radius-lg);
    border: 1px solid var(--border-light); transition: var(--transition);
}
.timeline-item:hover { box-shadow: var(--shadow-md); border-color: rgba(108,63,160,0.15); }
.timeline-item::before {
    content: ''; position: absolute; left: -33px; top: 28px;
    width: 14px; height: 14px; background: var(--primary);
    border-radius: 50%; border: 3px solid var(--surface);
    box-shadow: 0 0 0 3px var(--primary-light);
}
.timeline-year {
    display: inline-block; font-size: 0.82rem; font-weight: 600;
    color: var(--primary); background: var(--primary-glow);
    padding: 4px 14px; border-radius: var(--radius-xl); margin-bottom: 12px;
}
.timeline-title { font-size: 1.1rem; margin-bottom: 6px; }
.timeline-institution { color: var(--text-secondary); font-size: 0.92rem; margin-bottom: 8px; }
.timeline-desc { color: var(--text-muted); font-size: 0.88rem; }

/* ============================================
   BIOGRAPHY PAGE LAYOUT
   ============================================ */
.bio-section {
    overflow: hidden; /* contain floats */
}
.bio-section .bio-photo-wrapper {
    float: left;
    width: 280px;
    margin: 0 40px 24px 0;
}
.bio-photo-wrapper img.bio-photo {
    width: 100%;
    display: block;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    aspect-ratio: 3/4;
    object-fit: cover;
}
.bio-photo-placeholder {
    width: 100%;
    aspect-ratio: 3/4;
    background: var(--gradient-card);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-xl);
}
.bio-identity {
    margin-top: 16px;
}
.bio-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.3;
}
.bio-title {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .bio-section .bio-photo-wrapper {
        float: none;
        width: 200px;
        margin: 0 auto 24px;
        text-align: center;
    }
    .bio-identity {
        text-align: center;
    }
    .bio-section .section-label {
        justify-content: center;
    }
    .bio-section .section-title {
        text-align: center !important;
    }
}

/* ============================================
   TESTIMONIAL
   ============================================ */
.testimonial-card {
    background: #fff; padding: 36px; border-radius: var(--radius-lg);
    border: 1px solid var(--border-light); position: relative;
    transition: var(--transition);
}
.testimonial-card:hover { box-shadow: var(--shadow-lg); }
.testimonial-quote {
    font-size: 3rem; color: var(--primary-light); font-family: var(--font-display);
    line-height: 1; margin-bottom: 16px;
}
.testimonial-text { font-size: 1rem; color: var(--text-secondary); line-height: 1.8; margin-bottom: 24px; font-style: italic; }
.testimonial-author { display: flex; align-items: center; gap: 14px; }
.testimonial-avatar {
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--gradient-card); display: flex; align-items: center;
    justify-content: center; color: #fff; font-weight: 700; font-size: 1.1rem;
}
.testimonial-name { font-weight: 600; font-size: 0.95rem; }
.testimonial-role { font-size: 0.82rem; color: var(--text-muted); }
.testimonial-stars { color: var(--accent); font-size: 0.85rem; margin-top: 4px; }

/* ============================================
   STATS BAR
   ============================================ */
.stats-bar {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px;
    padding: 60px 0;
}
.stat-item { text-align: center; }
.stat-number {
    font-family: var(--font-display); font-size: 2.8rem; font-weight: 700;
    background: var(--gradient-card);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; margin-bottom: 8px;
}
.stat-label { font-size: 0.92rem; color: var(--text-secondary); font-weight: 500; }

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
    background: var(--gradient-hero); padding: 100px 0; text-align: center;
    position: relative; overflow: hidden;
}
.cta-section::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(167,139,250,0.15) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(245,158,11,0.1) 0%, transparent 50%);
}
.cta-content { position: relative; z-index: 1; }
.cta-title { color: #fff; margin-bottom: 16px; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.cta-desc { color: rgba(255,255,255,0.8); font-size: 1.1rem; max-width: 600px; margin: 0 auto 36px; }
.cta-actions { display: flex; gap: 16px; justify-content: center; }

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--surface-dark); color: var(--text-on-dark);
    padding: 80px 0 0; position: relative;
}
.footer-grid {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 32px;
    padding-bottom: 60px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand { }
.footer-brand p { color: rgba(255,255,255,0.6); font-size: 0.92rem; margin-top: 16px; line-height: 1.8; }
.footer-title {
    font-family: var(--font-body); font-size: 0.88rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 24px;
    color: var(--accent-light);
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: rgba(255,255,255,0.6); font-size: 0.92rem; }
.footer-links a:hover { color: #fff; }
.footer-social { display: flex; gap: 12px; margin-top: 24px; }
.footer-social a {
    display: flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 50%;
    background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.6);
    transition: var(--transition);
}
.footer-social a:hover { background: var(--primary); color: #fff; }
.footer-bottom {
    padding: 28px 0; text-align: center; font-size: 0.85rem;
    color: rgba(255,255,255,0.4);
}

/* ============================================
   FORMS
   ============================================ */
.form-group { margin-bottom: 24px; }
.form-label {
    display: block; font-size: 0.88rem; font-weight: 600;
    color: var(--text-primary); margin-bottom: 8px;
}
.form-control {
    width: 100%; padding: 14px 18px; font-family: var(--font-body);
    font-size: 0.95rem; border: 2px solid var(--border);
    border-radius: var(--radius-md); background: #fff;
    transition: var(--transition); color: var(--text-primary);
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-glow); }
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { min-height: 120px; resize: vertical; }
select.form-control {
    appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7280' stroke-width='2' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 16px center;
    padding-right: 40px;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 16px 24px; border-radius: var(--radius-md); margin-bottom: 24px;
    font-size: 0.92rem; display: flex; align-items: center; gap: 12px;
    border: 1px solid;
}
.alert-success { background: #ECFDF5; color: #065F46; border-color: #A7F3D0; }
.alert-error { background: #FEF2F2; color: #991B1B; border-color: #FECACA; }
.alert-warning { background: #FFFBEB; color: #92400E; border-color: #FDE68A; }
.alert-info { background: #EFF6FF; color: #1E40AF; border-color: #BFDBFE; }

/* ============================================
   BADGE & TAGS
   ============================================ */
.badge {
    display: inline-flex; align-items: center; padding: 5px 14px;
    font-size: 0.78rem; font-weight: 600; border-radius: var(--radius-xl);
    text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-primary { background: var(--primary-glow); color: var(--primary); }
.badge-accent { background: rgba(245,158,11,0.15); color: #B45309; }
.badge-success { background: #ECFDF5; color: #065F46; }
.badge-error { background: #FEF2F2; color: #991B1B; }

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header {
    background: var(--gradient-hero); padding: 140px 0 80px;
    position: relative; overflow: hidden;
}
.page-header::before {
    content: ''; position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.page-header::after {
    content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
    height: 80px; background: var(--surface);
    clip-path: ellipse(70% 100% at 50% 100%);
}
.page-header-content { position: relative; z-index: 1; text-align: center; }
.page-header h1 { color: #fff; margin-bottom: 12px; }
.page-header .breadcrumb {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    font-size: 0.88rem; color: rgba(255,255,255,0.6);
}
.page-header .breadcrumb a { color: var(--accent-light); }

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin-top: 48px;
}
.pagination a, .pagination span {
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: var(--radius-sm);
    font-size: 0.92rem; font-weight: 500; transition: var(--transition);
}
.pagination a { color: var(--text-secondary); background: #fff; border: 1px solid var(--border); }
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .active { background: var(--primary); color: #fff; border: none; }

/* ============================================
   PROGRESS BAR
   ============================================ */
.progress-bar {
    height: 8px; background: var(--border-light); border-radius: 4px; overflow: hidden;
}
.progress-fill {
    height: 100%; background: var(--gradient-card); border-radius: 4px;
    transition: width 0.5s ease;
}

/* ============================================
   FEATURE CARDS (why section)
   ============================================ */
.feature-card {
    padding: 40px 32px; background: #fff; border-radius: var(--radius-lg);
    border: 1px solid var(--border-light); text-align: center;
    transition: var(--transition);
}
.feature-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.feature-icon {
    width: 72px; height: 72px; margin: 0 auto 24px; border-radius: var(--radius-lg);
    background: var(--primary-glow); display: flex; align-items: center;
    justify-content: center; font-size: 1.8rem; color: var(--primary);
    transition: var(--transition);
}
.feature-card:hover .feature-icon { background: var(--gradient-card); color: #fff; }
.feature-card h3 { font-size: 1.15rem; margin-bottom: 12px; }
.feature-card p { color: var(--text-secondary); font-size: 0.92rem; }

/* ============================================
   QUOTE BLOCK
   ============================================ */
.quote-block {
    background: var(--gradient-soft); padding: 60px; border-radius: var(--radius-xl);
    text-align: center; position: relative; border: 1px solid rgba(108,63,160,0.08);
}
.quote-text {
    font-family: var(--font-display); font-size: clamp(1.3rem, 3vw, 1.8rem);
    font-style: italic; color: var(--primary-dark); line-height: 1.6;
    max-width: 700px; margin: 0 auto 20px;
}
.quote-author { font-weight: 600; color: var(--primary); font-size: 1rem; }

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(3deg); }
    50% { transform: translateY(-20px) rotate(3deg); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideRight {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}
.animate-fade-up { animation: fadeInUp 0.8s ease forwards; }
.animate-fade-in { animation: fadeIn 0.8s ease forwards; }
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }

/* ============================================
   ADMIN PANEL
   ============================================ */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 280px; background: var(--surface-dark); color: var(--text-on-dark);
    padding: 0; position: fixed; top: 0; left: 0; bottom: 0;
    overflow-y: auto; z-index: 100;
    display: flex; flex-direction: column;
}
.admin-sidebar-brand {
    padding: 20px 24px; border-bottom: 1px solid rgba(255,255,255,0.08);
    font-family: var(--font-display); font-weight: 700; font-size: 1.1rem;
    display: flex; align-items: center; justify-content: center; gap: 12px;
}
.admin-sidebar-brand img { max-height: 48px; border-radius: 8px; object-fit: contain; }
.admin-nav { padding: 16px 0; flex: 1; display: flex; flex-direction: column; }
.admin-nav-section {
    padding: 12px 24px 8px; font-size: 0.72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 2px; color: rgba(255,255,255,0.3);
}
.admin-nav a {
    display: flex; align-items: center; gap: 12px; padding: 11px 24px;
    color: rgba(255,255,255,0.6); font-size: 0.9rem; font-weight: 500;
    transition: var(--transition); border-left: 3px solid transparent;
}
.admin-nav a:hover { color: #fff; background: rgba(255,255,255,0.05); }
.admin-nav a.active {
    color: #fff; background: rgba(108,63,160,0.2);
    border-left-color: var(--accent);
}
.admin-nav a i { width: 20px; text-align: center; font-size: 1rem; }
.admin-content { flex: 1; margin-left: 280px; background: var(--surface); }
.admin-topbar {
    background: #fff; padding: 16px 32px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 50;
}
.admin-topbar h2 { font-family: var(--font-body); font-size: 1.3rem; font-weight: 700; }
.admin-topbar-actions { display: flex; align-items: center; gap: 16px; }
.admin-toggle {
    display: none; width: 36px; height: 36px; border-radius: var(--radius-sm);
    background: var(--surface); border: 1px solid var(--border);
    align-items: center; justify-content: center; cursor: pointer;
    font-size: 1rem; color: var(--text-secondary); margin-right: 8px;
}
.admin-toggle:hover { background: var(--bg-secondary); color: var(--text-primary); }
.admin-body { padding: 32px; }

/* Admin Cards */
.admin-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-bottom: 32px; }
.admin-stat-card {
    background: #fff; padding: 28px; border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
}
.admin-stat-card .stat-icon {
    width: 48px; height: 48px; border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; margin-bottom: 16px;
}
.admin-stat-card .stat-icon.purple { background: var(--primary-glow); color: var(--primary); }
.admin-stat-card .stat-icon.amber { background: rgba(245,158,11,0.15); color: var(--accent); }
.admin-stat-card .stat-icon.green { background: #ECFDF5; color: var(--success); }
.admin-stat-card .stat-icon.blue { background: #EFF6FF; color: var(--info); }
.admin-stat-card .stat-value { font-size: 2rem; font-weight: 800; margin-bottom: 4px; color: var(--text-primary); }
.admin-stat-card .stat-label { font-size: 0.85rem; color: var(--text-muted); }

/* Admin Table */
.admin-table-wrap {
    background: #fff; border-radius: var(--radius-lg);
    border: 1px solid var(--border-light); overflow-x: auto;
}
.admin-table-header {
    padding: 20px 24px; border-bottom: 1px solid var(--border-light);
    display: flex; align-items: center; justify-content: space-between;
}
.admin-table-header h3 { font-family: var(--font-body); font-weight: 700; font-size: 1.05rem; }
.admin-table {
    width: 100%; border-collapse: collapse;
}
.admin-table th {
    text-align: left; padding: 14px 24px; font-size: 0.82rem;
    font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
    color: var(--text-muted); background: var(--surface);
    border-bottom: 1px solid var(--border-light);
}
.admin-table td {
    padding: 16px 24px; font-size: 0.92rem; border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
}
.admin-table tr:hover td { background: rgba(108,63,160,0.02); }
.admin-table .actions { display: flex; gap: 8px; }
.admin-table .actions a, .admin-table .actions button {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: var(--radius-sm);
    font-size: 0.85rem; border: 1px solid var(--border);
    background: #fff; color: var(--text-secondary); cursor: pointer;
    transition: var(--transition);
}
.admin-table .actions a:hover, .admin-table .actions button:hover {
    border-color: var(--primary); color: var(--primary);
}

/* Admin Form */
.admin-form-card {
    background: #fff; border-radius: var(--radius-lg);
    border: 1px solid var(--border-light); padding: 32px;
}
.admin-form-card .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

/* Settings specific */
.settings-group {
    background: #fff; border-radius: var(--radius-lg);
    border: 1px solid var(--border-light); margin-bottom: 24px; overflow: hidden;
}
.settings-group-header {
    padding: 20px 28px; background: var(--surface);
    border-bottom: 1px solid var(--border-light);
    font-weight: 700; font-size: 1rem; color: var(--text-primary);
    display: flex; align-items: center; gap: 10px;
}
.settings-group-body { padding: 28px; }
.settings-item {
    display: grid; grid-template-columns: 250px 1fr; gap: 24px;
    align-items: start; padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
}
.settings-item:last-child { border-bottom: none; }
.settings-item label { font-weight: 600; font-size: 0.9rem; padding-top: 10px; }
.settings-item .hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }
.settings-preview { max-width: 120px; max-height: 80px; border-radius: var(--radius-sm); margin-top: 8px; }
.color-preview {
    display: inline-flex; align-items: center; gap: 10px;
}
.color-swatch {
    width: 40px; height: 40px; border-radius: var(--radius-sm);
    border: 2px solid var(--border);
}

/* ============================================
   RESPONSIVE GRID UTILITIES
   ============================================ */
.resp-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.resp-grid-2-sm { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.resp-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.resp-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.resp-grid-contact { display: grid; grid-template-columns: 1fr 1.5fr; gap: 48px; align-items: start; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-subtitle { margin: 0 auto 36px; }
    .hero-actions { justify-content: center; }
    .hero-image { order: -1; }
    .hero-stats { justify-content: center; flex-wrap: wrap; }
    .stats-floating-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
    .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 20px; }
    .stats-bar { grid-template-columns: repeat(2, 1fr); }
    .admin-stat-grid { grid-template-columns: repeat(2, 1fr); }
    .resp-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .nav-links a { padding: 8px 8px; font-size: 0.82rem; }
    .navbar-inner { padding: 12px 16px; }
}
/* === MOBILE NAV DRAWER === */
@media (max-width: 768px) {
    .nav-links {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 280px !important;
        max-width: 85vw;
        background: #fff !important;
        flex-direction: column !important;
        padding: 24px 20px 24px !important;
        padding-top: 72px !important;
        margin: 0 !important;
        box-shadow: -4px 0 25px rgba(0,0,0,0.15);
        gap: 2px !important;
        z-index: 10 !important;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
        visibility: hidden;
    }
    .nav-links::before {
        content: 'Menu';
        position: absolute;
        top: 0; left: 0; right: 0;
        padding: 20px 20px 14px;
        font-size: 0.8rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 1.5px;
        color: var(--text-muted);
        border-bottom: 1px solid var(--border-light);
        background: #fff;
        z-index: 2;
    }
    .nav-links.open {
        transform: translateX(0) !important;
        visibility: visible !important;
    }
    .nav-links li {
        width: 100%;
    }
    .nav-links a {
        display: flex !important;
        width: 100%;
        padding: 14px 16px !important;
        border-radius: var(--radius-md) !important;
        font-size: 0.95rem !important;
        color: var(--text-primary) !important;
        white-space: normal !important;
    }
    .nav-links a:hover {
        background: var(--primary-glow) !important;
        color: var(--primary) !important;
    }
    .nav-links a.active::after { display: none !important; }
    .nav-links a.active {
        background: var(--primary-glow) !important;
        color: var(--primary) !important;
        font-weight: 600;
    }
    .nav-links .nav-cta {
        margin-top: 12px;
        justify-content: center;
    }
    .nav-toggle {
        display: flex !important;
    }
    /* Backdrop overlay */
    .nav-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 1;
        background: rgba(0,0,0,0.5);
    }
    .nav-backdrop.show {
        display: block !important;
    }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr !important; }
    .detail-grid-sidebar .detail-cover-col { max-width: 280px; margin: 0 auto; }
    .detail-info-grid { grid-template-columns: repeat(3, 1fr) !important; }
    .hero { padding: 100px 0 60px; min-height: auto; }
    .hero-image-wrapper { width: 280px; height: 350px; }
    .hero-stats { flex-direction: row; flex-wrap: wrap; gap: 12px; }
    .hero-stat-card { flex: 1 1 calc(50% - 12px); min-width: 120px; padding: 16px; }
    .stats-floating-grid { grid-template-columns: 1fr; gap: 12px; }
    .stats-floating-card { padding: 20px; }
    .stats-floating { margin-top: -40px; }
    .page-header h1 { font-size: 1.5rem; }
    .section { padding: 60px 0; }
    .footer-grid { grid-template-columns: 1fr; }
    .stats-bar { grid-template-columns: 1fr 1fr; gap: 24px; }
    .book-card { flex-direction: column; }
    .book-cover { width: 100%; height: 240px; }
    .quote-block { padding: 32px; }
    .page-header { padding: 120px 0 60px; }
    .settings-item { grid-template-columns: 1fr; }
    .admin-form-card .form-row { grid-template-columns: 1fr; }
    .admin-sidebar {
        transform: translateX(-100%); transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
        width: 280px; z-index: 200;
    }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-content { margin-left: 0; }
    .admin-topbar { padding: 12px 16px; }
    .admin-topbar h2 { font-size: 1.05rem; }
    .admin-topbar-actions { gap: 8px; }
    .admin-body { padding: 16px; }
    .admin-toggle { display: flex !important; }
    .admin-overlay {
        display: none; position: fixed; inset: 0; z-index: 150;
        background: rgba(0,0,0,0.4); backdrop-filter: blur(2px);
    }
    .admin-overlay.show { display: block; }
    .admin-stat-grid { grid-template-columns: 1fr; }
    .admin-table-header { flex-direction: column; gap: 12px; align-items: stretch; }
    .admin-search-bar { flex-wrap: wrap; }
    .admin-search-bar input { width: 100%; }
    .admin-pagination { flex-wrap: wrap; }
    .tab-nav { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .tab-nav a { white-space: nowrap; padding: 10px 16px; font-size: 0.82rem; }
    .hero-title { font-size: 2rem; }
    .hero-subtitle { font-size: 1rem; }
    .hero-actions { flex-wrap: wrap; justify-content: center; }
    .cta-actions { flex-wrap: wrap; justify-content: center; }
    .cta-title { font-size: 1.5rem; }
    .btn-lg { padding: 16px 32px; font-size: 1rem; }
    .section-title { font-size: 1.5rem; }
    .container { padding: 0 16px; }
    .navbar-brand { max-width: calc(100% - 60px); }
    .navbar-brand img { height: 32px; }
    .brand-name { font-size: 0.95rem; }
    .resp-grid-2, .resp-grid-2-sm, .resp-grid-contact { grid-template-columns: 1fr !important; }
    .resp-grid-4 { grid-template-columns: 1fr 1fr; }
    .resp-grid-contact { gap: 32px; }
    .admin-table-wrap, .admin-table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .admin-table { font-size: 0.85rem; }
    .admin-table th, .admin-table td { padding: 10px 8px; white-space: nowrap; }
}
@media (max-width: 480px) {
    .container { padding: 0 12px; }
    .hero-title { font-size: 1.6rem; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-actions .btn { text-align: center; }
    .cta-actions { flex-direction: column; align-items: stretch; }
    .cta-actions .btn { text-align: center; }
    .cta-title { font-size: 1.3rem; }
    .btn-lg { padding: 14px 24px; font-size: 0.95rem; }
    .section-title { font-size: 1.3rem; }
    .section-desc { font-size: 0.9rem; }
    .detail-info-grid { grid-template-columns: 1fr 1fr !important; }
    .page-header { padding: 100px 0 40px; }
    .page-header h1 { font-size: 1.3rem; }
    .section { padding: 40px 0; }
    .grid-2 { gap: 16px; }
    .resp-grid-3 { grid-template-columns: 1fr 1fr !important; }
    .resp-grid-4 { grid-template-columns: 1fr !important; }
}

/* ============================================
   MOBILE APP DASHBOARD — .mapp-*
   ============================================ */
.mapp {
    min-height: 100vh;
    background: #F6F7FB;
    display: flex; flex-direction: column;
    max-width: 480px;
    margin: 0 auto;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Hide regular navbar & footer when mapp is active */
body.is-mapp .navbar { display: none !important; }
body.is-mapp footer,
body.is-mapp .footer { display: none !important; }
body.is-mapp { background: #F6F7FB; }

/* Top Bar */
.mapp-topbar {
    position: sticky; top: 0; z-index: 100;
    background: #fff;
    border-bottom: 1px solid #EEEDF2;
    padding: 0 20px;
}
.mapp-topbar-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 60px;
}
.mapp-title {
    font-size: 1.25rem; font-weight: 800;
    color: #1A1A2E;
}
.mapp-welcome {
    font-size: 0.78rem; color: #9CA3AF; margin-top: 1px;
}
.mapp-topbar-actions {
    display: flex; gap: 8px;
}
.mapp-icon-btn {
    width: 38px; height: 38px; border-radius: 50%;
    background: #F3F4F6; color: #6B7280;
    display: flex; align-items: center; justify-content: center;
    text-decoration: none; font-size: 0.95rem;
    transition: all 0.2s;
}
.mapp-icon-btn:hover { background: #E5E7EB; color: #374151; }
.mapp-logout { background: #FEF2F2; color: #EF4444; }
.mapp-logout:hover { background: #FEE2E2; color: #DC2626; }

/* Content Area */
.mapp-content {
    flex: 1;
    padding: 16px 20px 100px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* ---- Islamic Header: Date, Clock, Weather ---- */
.mapp-islamic-header {
    background: linear-gradient(135deg, #1E3A5F, #2C5F8A);
    border-radius: 20px;
    padding: 16px 18px;
    margin-bottom: 14px;
    color: #fff;
}
.mapp-datetime-row {
    display: flex; justify-content: space-between;
    align-items: center; margin-bottom: 10px;
}
.mapp-clock-box {
    display: flex; align-items: center; gap: 8px;
    font-size: 1.35rem; font-weight: 800;
    letter-spacing: 1px;
    font-variant-numeric: tabular-nums;
}
.mapp-clock-box i { font-size: 0.9rem; opacity: 0.7; }
.mapp-weather-box {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.82rem; font-weight: 600;
    background: rgba(255,255,255,0.12);
    padding: 6px 12px; border-radius: 20px;
}
.mapp-weather-box i { font-size: 1rem; color: #FBBF24; }
.mapp-date-row {
    display: flex; justify-content: space-between;
    align-items: center; gap: 8px;
    border-top: 1px solid rgba(255,255,255,0.12);
    padding-top: 10px;
}
.mapp-date-masehi, .mapp-date-hijri {
    font-size: 0.72rem; opacity: 0.85;
    display: flex; align-items: center; gap: 5px;
}
.mapp-date-hijri { direction: ltr; }
.mapp-date-hijri i { color: #FBBF24; }

/* ---- Prayer Times Card ---- */
.mapp-prayer-card {
    background: #fff;
    border-radius: 20px;
    padding: 16px 18px;
    margin-bottom: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.mapp-prayer-header {
    display: flex; justify-content: space-between;
    align-items: center; margin-bottom: 14px;
}
.mapp-prayer-title {
    font-weight: 700; font-size: 0.92rem;
    color: #1A1A2E;
    display: flex; align-items: center; gap: 8px;
}
.mapp-prayer-title i { color: #059669; font-size: 1rem; }
.mapp-prayer-loc {
    font-size: 0.7rem; color: #9CA3AF;
    display: flex; align-items: center; gap: 4px;
}
.mapp-prayer-loc i { font-size: 0.65rem; color: #EF4444; }
.mapp-prayer-times {
    display: flex; justify-content: space-between;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
}
.mapp-prayer-times::-webkit-scrollbar { display: none; }
.mapp-prayer-item {
    flex: 1; min-width: 52px;
    display: flex; flex-direction: column;
    align-items: center; gap: 4px;
    padding: 10px 4px;
    border-radius: 14px;
    transition: all 0.25s;
    background: #F9FAFB;
}
.mapp-prayer-item.active {
    background: linear-gradient(135deg, #059669, #34D399);
    color: #fff;
    box-shadow: 0 4px 12px rgba(5,150,105,0.25);
    transform: scale(1.04);
}
.mapp-prayer-name {
    font-size: 0.65rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.3px;
    opacity: 0.7;
}
.mapp-prayer-item.active .mapp-prayer-name { opacity: 1; }
.mapp-prayer-time {
    font-size: 0.82rem; font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.mapp-prayer-next {
    margin-top: 12px;
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    color: #065F46;
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 0.75rem;
    text-align: center;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.mapp-prayer-next i { color: #059669; }

/* User Card */
.mapp-user-card {
    background: linear-gradient(135deg, var(--primary, #6C3FA0), #A78BFA);
    border-radius: 20px;
    padding: 20px;
    display: flex; align-items: center; gap: 14px;
    margin-bottom: 20px;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.mapp-user-card::after {
    content: '';
    position: absolute; right: -20px; top: -20px;
    width: 100px; height: 100px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}
.mapp-user-avatar {
    width: 50px; height: 50px; border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1.2rem; color: #fff;
    flex-shrink: 0; overflow: hidden;
    border: 2px solid rgba(255,255,255,0.3);
}
.mapp-user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mapp-user-info { flex: 1; min-width: 0; }
.mapp-user-name {
    font-weight: 700; font-size: 1rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mapp-user-email {
    font-size: 0.78rem; opacity: 0.8; margin-top: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mapp-user-badge {
    background: rgba(255,255,255,0.2);
    padding: 4px 12px; border-radius: 20px;
    font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px;
    flex-shrink: 0;
}

/* Stats Row */
.mapp-stats {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 10px; margin-bottom: 24px;
    text-decoration: none;
}
.mapp-stat {
    background: #fff; border-radius: 16px;
    padding: 16px 12px; text-align: center;
    text-decoration: none; color: inherit;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: all 0.2s;
}
.mapp-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.mapp-stat-num {
    font-size: 1.5rem; font-weight: 800;
    color: var(--primary, #6C3FA0);
    line-height: 1;
}
.mapp-stat-lbl {
    font-size: 0.72rem; color: #9CA3AF;
    font-weight: 600; margin-top: 4px;
    text-transform: uppercase; letter-spacing: 0.3px;
}

/* Section Title & Header */
.mapp-section-title {
    font-size: 0.82rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px;
    color: #9CA3AF; margin-bottom: 12px;
}
.mapp-section-header {
    display: flex; justify-content: space-between;
    align-items: center; margin-bottom: 12px;
    margin-top: 4px;
}
.mapp-section-header .mapp-section-title { margin-bottom: 0; }
.mapp-section-link {
    font-size: 0.75rem; font-weight: 600;
    color: var(--primary, #6C3FA0);
    text-decoration: none;
    display: flex; align-items: center; gap: 4px;
}
.mapp-section-link:hover { opacity: 0.8; }
.mapp-section-link i { font-size: 0.6rem; }

/* Horizontal Scroll Row (E-Books) */
.mapp-scroll-row {
    display: flex; gap: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    margin-bottom: 20px;
}
.mapp-scroll-row::-webkit-scrollbar { display: none; }
.mapp-mini-card {
    flex: 0 0 130px;
    background: #fff; border-radius: 16px;
    overflow: hidden; text-decoration: none; color: inherit;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: all 0.2s;
}
.mapp-mini-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.mapp-mini-cover {
    height: 160px; background: #F3F4F6;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.mapp-mini-cover img { width: 100%; height: 100%; object-fit: cover; }

/* Consistent Cover Placeholder (matches ebook.php gradient) */
.mapp-cover-placeholder {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, #6C3FA0, #A78BFA);
    display: flex; align-items: center; justify-content: center;
    flex-direction: column; gap: 8px;
}
.mapp-cover-placeholder i {
    font-size: 2.2rem; color: rgba(255,255,255,0.4);
}
.mapp-cover-placeholder span {
    color: rgba(255,255,255,0.5); font-size: 0.72rem; font-weight: 600;
}
.mapp-cover-placeholder.mapp-cover-sm {
    border-radius: 14px;
}
.mapp-cover-placeholder.mapp-cover-sm i {
    font-size: 1.4rem;
}
.mapp-cover-placeholder.mapp-cover-sm span { display: none; }

.mapp-mini-title {
    padding: 8px 10px 2px; font-size: 0.75rem; font-weight: 600;
    color: #1A1A2E; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.mapp-mini-price {
    padding: 2px 10px 10px; font-size: 0.72rem; font-weight: 700;
    color: var(--primary, #6C3FA0);
}

/* Course Row Item */
.mapp-course-row {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px;
    background: #fff; border-radius: 16px;
    text-decoration: none; color: inherit;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    margin-bottom: 8px;
    transition: all 0.2s;
}
.mapp-course-row:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.mapp-course-row-img {
    width: 56px; height: 56px; border-radius: 14px;
    background: #F3F4F6; flex-shrink: 0;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.mapp-course-row-img img { width: 100%; height: 100%; object-fit: cover; }
.mapp-course-row-body { flex: 1; min-width: 0; }
.mapp-course-row-title {
    font-weight: 600; font-size: 0.88rem; color: #1A1A2E;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mapp-course-row-meta {
    display: flex; align-items: center; gap: 10px;
    font-size: 0.72rem; color: #9CA3AF; margin-top: 3px;
}
.mapp-course-row-meta i { font-size: 0.65rem; }
.mapp-course-row-price { font-weight: 700; color: var(--primary, #6C3FA0); }

/* Article Row Item */
.mapp-article-row {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px;
    background: #fff; border-radius: 16px;
    text-decoration: none; color: inherit;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    margin-bottom: 8px;
    transition: all 0.2s;
}
.mapp-article-row:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.mapp-article-row-img {
    width: 64px; height: 64px; border-radius: 14px;
    background: #F3F4F6; flex-shrink: 0;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.mapp-article-row-img img { width: 100%; height: 100%; object-fit: cover; }
.mapp-article-row-body { flex: 1; min-width: 0; }
.mapp-article-row-title {
    font-weight: 600; font-size: 0.88rem; color: #1A1A2E;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
    line-height: 1.4;
}
.mapp-article-row-date {
    font-size: 0.7rem; color: #9CA3AF; margin-top: 4px;
    display: flex; align-items: center; gap: 4px;
}
.mapp-article-row-date i { font-size: 0.6rem; }

/* Menu List */
.mapp-menu-list {
    display: flex; flex-direction: column;
    gap: 8px; margin-bottom: 24px;
}
.mapp-menu-item {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px;
    background: #fff; border-radius: 16px;
    text-decoration: none; color: inherit;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: all 0.2s;
}
.mapp-menu-item:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.mapp-menu-icon {
    width: 44px; height: 44px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; flex-shrink: 0;
}
.mapp-menu-text { flex: 1; min-width: 0; }
.mapp-menu-label {
    font-weight: 600; font-size: 0.92rem;
    color: #1A1A2E;
}
.mapp-menu-desc {
    font-size: 0.75rem; color: #9CA3AF; margin-top: 2px;
}
.mapp-menu-arrow {
    color: #D1D5DB; font-size: 0.8rem;
}

/* Order Item */
.mapp-order-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 16px;
    background: #fff; border-radius: 16px;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.mapp-order-left { min-width: 0; }
.mapp-order-id {
    font-weight: 700; font-size: 0.85rem; color: #1A1A2E;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mapp-order-date {
    font-size: 0.72rem; color: #9CA3AF; margin-top: 2px;
}
.mapp-order-right { text-align: right; flex-shrink: 0; }
.mapp-order-amount {
    font-weight: 700; font-size: 0.92rem;
    color: var(--primary, #6C3FA0);
}
.mapp-badge {
    display: inline-block;
    padding: 3px 10px; border-radius: 20px;
    font-size: 0.68rem; font-weight: 700;
    margin-top: 4px; white-space: nowrap;
}

/* E-Book Card Grid */
.mapp-card-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.mapp-ebook-card {
    background: #fff; border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.mapp-ebook-cover {
    aspect-ratio: 148 / 210; background: #F3F4F6;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.mapp-ebook-cover img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.mapp-ebook-placeholder { font-size: 2rem; color: #D1D5DB; }
.mapp-ebook-body { padding: 12px; }
.mapp-ebook-title {
    font-size: 0.82rem; font-weight: 600; color: #1A1A2E;
    margin-bottom: 8px; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}

/* Course Card */
.mapp-course-card {
    background: #fff; border-radius: 16px;
    overflow: hidden; margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.mapp-course-img {
    height: 140px; background: #F3F4F6;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.mapp-course-img img { width: 100%; height: 100%; object-fit: cover; }
.mapp-course-detail { padding: 14px; }
.mapp-course-title {
    font-weight: 700; font-size: 0.95rem; color: #1A1A2E;
    margin-bottom: 10px;
}
.mapp-progress { margin-bottom: 12px; }
.mapp-progress-track {
    background: #E5E7EB; border-radius: 8px;
    height: 6px; overflow: hidden; margin-bottom: 4px;
}
.mapp-progress-bar {
    background: linear-gradient(90deg, var(--primary, #6C3FA0), #A78BFA);
    height: 100%; border-radius: 8px;
    transition: width 0.3s;
}
.mapp-progress-pct {
    font-size: 0.72rem; font-weight: 700;
    color: var(--primary, #6C3FA0);
}

/* Empty State */
.mapp-empty {
    text-align: center; padding: 48px 20px;
    background: #fff; border-radius: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.mapp-empty i {
    font-size: 2.5rem; color: #D1D5DB;
    margin-bottom: 16px; display: block;
}
.mapp-empty h3 {
    margin: 0 0 6px; font-size: 1rem; color: #1A1A2E;
}
.mapp-empty p {
    margin: 0 0 16px; font-size: 0.85rem; color: #9CA3AF;
}

/* Profile */
.mapp-profile-top {
    text-align: center; margin-bottom: 24px;
    padding: 24px 0;
}
.mapp-profile-avatar {
    width: 72px; height: 72px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary, #6C3FA0), #A78BFA);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1.6rem; color: #fff;
    margin: 0 auto 12px; overflow: hidden;
    border: 3px solid #E5E7EB;
}
.mapp-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mapp-profile-name {
    font-weight: 700; font-size: 1.1rem; color: #1A1A2E;
}
.mapp-profile-email {
    font-size: 0.82rem; color: #9CA3AF;
}

/* Alert */
.mapp-alert-success {
    background: #F0FDF4; border: 1px solid #BBF7D0;
    color: #166534; padding: 12px 16px;
    border-radius: 14px; font-size: 0.85rem;
    margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}

/* Form */
.mapp-form-group {
    margin-bottom: 16px;
}
.mapp-form-group label {
    display: block; font-size: 0.82rem; font-weight: 600;
    color: #6B7280; margin-bottom: 6px;
}
.mapp-form-group input,
.mapp-form-group textarea,
.mapp-form-group select {
    width: 100%; padding: 12px 16px;
    border: 1.5px solid #E5E7EB;
    border-radius: 14px; font-size: 0.92rem;
    background: #fff; color: #1A1A2E;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
}
.mapp-form-group textarea {
    resize: vertical; min-height: 60px;
}
.mapp-form-group input:focus,
.mapp-form-group textarea:focus,
.mapp-form-group select:focus {
    border-color: var(--primary, #6C3FA0);
    box-shadow: 0 0 0 3px rgba(108, 63, 160, 0.1);
}
.mapp-form-group input:disabled,
.mapp-form-group textarea:disabled {
    background: #F9FAFB; color: #9CA3AF;
}

/* Modal */
.mapp-modal-overlay {
    display: none; position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
    align-items: center; justify-content: center; padding: 16px;
    animation: mapp-fadeIn 0.2s ease;
}
.mapp-modal {
    background: #fff; border-radius: 20px; width: 100%; max-width: 460px;
    max-height: 88vh; overflow-y: auto; color: #1F2937;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: mapp-slideUp 0.3s ease;
}
.mapp-modal-header {
    display: flex; align-items: center; gap: 12px;
    padding: 20px 24px 16px; border-bottom: 1px solid #F3F4F6;
    position: sticky; top: 0; background: #fff;
    border-radius: 20px 20px 0 0; z-index: 1;
}
.mapp-modal-header .modal-icon {
    width: 42px; height: 42px; border-radius: 12px;
    background: linear-gradient(135deg, var(--primary, #6C3FA0), var(--primary-light, #A78BFA));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.1rem; flex-shrink: 0;
}
.mapp-modal-header h3 {
    margin: 0; font-size: 1.1rem; color: #1F2937; font-weight: 700;
}
.mapp-modal-header .modal-subtitle {
    font-size: 0.78rem; color: #9CA3AF; font-weight: 400; margin-top: 2px;
}
.mapp-modal-close {
    margin-left: auto; background: #F3F4F6; border: none;
    width: 32px; height: 32px; border-radius: 10px;
    font-size: 1.2rem; cursor: pointer; color: #6B7280;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s; flex-shrink: 0;
}
.mapp-modal-close:hover { background: #E5E7EB; color: #1F2937; }
.mapp-modal-body { padding: 20px 24px 24px; }
.mapp-modal-section {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.8rem; font-weight: 600; color: var(--primary, #6C3FA0);
    margin: 18px 0 12px; padding-bottom: 8px;
    border-bottom: 1.5px dashed #E5E7EB;
}
.mapp-modal-section i { font-size: 0.85rem; }
@keyframes mapp-fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes mapp-slideUp { from { opacity: 0; transform: translateY(30px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.mapp-form-group small {
    display: block; font-size: 0.72rem;
    color: #9CA3AF; margin-top: 4px;
}

/* Buttons */
.mapp-btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 6px; padding: 10px 20px;
    border-radius: 14px; font-weight: 700;
    font-size: 0.85rem; text-decoration: none;
    border: none; cursor: pointer;
    transition: all 0.2s;
}
.mapp-btn-primary {
    background: var(--primary, #6C3FA0);
    color: #fff;
}
.mapp-btn-primary:hover { opacity: 0.9; color: #fff; }
.mapp-btn-outline {
    background: transparent;
    border: 1.5px solid #E5E7EB;
    color: #6B7280;
}
.mapp-btn-outline:hover { background: #F9FAFB; color: #374151; }
.mapp-btn-sm { padding: 8px 14px; font-size: 0.78rem; border-radius: 10px; }
.mapp-btn-block { display: flex; width: 100%; }

/* Bottom Navigation */
.mapp-bottomnav {
    position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 480px;
    background: #fff;
    border-top: 1px solid #EEEDF2;
    display: flex; justify-content: space-around;
    padding: 6px 0 env(safe-area-inset-bottom, 8px);
    z-index: 200;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.04);
}
.mapp-nav-item {
    display: flex; flex-direction: column; align-items: center;
    gap: 3px; padding: 6px 0;
    text-decoration: none; color: #9CA3AF;
    font-size: 0.68rem; font-weight: 600;
    transition: color 0.2s;
    min-width: 48px;
}
.mapp-nav-item i { font-size: 1.15rem; }
.mapp-nav-item.active {
    color: var(--primary, #6C3FA0);
}
.mapp-nav-item.active i {
    transform: scale(1.1);
}

/* ---- Utility ---- */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 32px; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; } .gap-3 { gap: 24px; }
.d-flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; }
.fw-bold { font-weight: 700; }
.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.img-cover { width: 100%; height: 100%; object-fit: cover; }

/* ---- Badges ---- */
.badge { display:inline-flex;align-items:center;padding:4px 10px;border-radius:20px;font-size:0.75rem;font-weight:600; }
.badge-success { background:#ECFDF5;color:#059669; }
.badge-warning { background:#FFFBEB;color:#D97706; }
.badge-danger { background:#FEF2F2;color:#DC2626; }
.badge-info { background:#EFF6FF;color:#2563EB; }
.badge-purple { background:var(--primary-glow);color:var(--primary); }

/* ---- Extra Buttons ---- */
.btn-danger { background:#DC2626;color:#fff;border:none; }
.btn-danger:hover { background:#B91C1C;color:#fff; }
.btn-success { background:#059669;color:#fff;border:none; }
.btn-success:hover { background:#047857;color:#fff; }
.btn-sm { padding:6px 12px;font-size:0.8rem; }
.btn-lg { padding:14px 28px;font-size:1rem; }
.btn-block { display:block;width:100%;text-align:center; }

/* ---- Form Rows ---- */
.form-row { display:grid;grid-template-columns:1fr 1fr;gap:16px; }
.form-row-3 { display:grid;grid-template-columns:1fr 1fr 1fr;gap:16px; }

/* ---- Article Content ---- */
.article-content h2 { font-size:1.5rem;margin:32px 0 16px;color:var(--text-primary); }
.article-content h3 { font-size:1.25rem;margin:24px 0 12px;color:var(--text-primary); }
.article-content p { margin-bottom:16px; }
.article-content img { max-width:100%;border-radius:var(--radius-md);margin:16px 0; }
.article-content blockquote { border-left:4px solid var(--primary);padding:16px 24px;margin:24px 0;background:var(--primary-glow);border-radius:0 var(--radius-md) var(--radius-md) 0; }
.article-content ul, .article-content ol { margin:16px 0;padding-left:24px; }
.article-content li { margin-bottom:8px; }
.article-content a { color:var(--primary);text-decoration:underline; }
.article-content code { background:var(--bg-secondary);padding:2px 6px;border-radius:4px;font-family:'JetBrains Mono',monospace;font-size:0.9em; }

/* ---- Detail Page Grids ---- */
.detail-grid { display:grid; gap:48px; align-items:start; }
.detail-grid-sidebar { grid-template-columns:300px 1fr; }
.detail-grid-main { grid-template-columns:1fr 360px; }

/* ---- Admin Table Wrapper ---- */
.admin-table-wrapper { overflow-x:auto;border:1px solid var(--border);border-radius:var(--radius-lg);background:#fff; }
.admin-table { width:100%;border-collapse:collapse; }
.admin-table thead { background:var(--bg-secondary); }
.admin-table th { padding:12px 16px;text-align:left;font-weight:600;font-size:0.85rem;color:var(--text-muted);text-transform:uppercase;letter-spacing:0.5px; }
.admin-table td { padding:12px 16px;border-top:1px solid var(--border);font-size:0.9rem; }
.admin-table tbody tr:hover { background:rgba(108,63,160,0.02); }

/* ---- Card Image ---- */
.card-image { height:200px;overflow:hidden; }
.card-image img { width:100%;height:100%;object-fit:cover;transition:transform 0.3s; }
.card:hover .card-image img { transform:scale(1.05); }

/* ===== Mobile App: Auth Pages (Login/Register) ===== */
.mapp-auth {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(160deg, #6C3FA0 0%, #4C1D95 40%, #1e1b4b 100%);
    position: relative;
    overflow: hidden;
}
.mapp-auth::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 200px; height: 200px;
    border-radius: 50%;
    background: rgba(167, 139, 250, .15);
}
.mapp-auth::after {
    content: '';
    position: absolute;
    bottom: -40px; left: -40px;
    width: 160px; height: 160px;
    border-radius: 50%;
    background: rgba(167, 139, 250, .1);
}
.mapp-auth-header {
    position: relative;
    z-index: 2;
    padding: 20px 20px 0;
}
.mapp-auth-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.12);
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    transition: background .2s;
    margin-bottom: 24px;
}
.mapp-auth-back:hover { background: rgba(255,255,255,.2); }
.mapp-auth-brand {
    text-align: center;
    padding: 0 20px 32px;
}
.mapp-auth-logo {
    width: 68px; height: 68px;
    border-radius: 50%;
    background: rgba(255,255,255,.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 2rem;
    color: #fff;
    backdrop-filter: blur(4px);
}
.mapp-auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 6px;
}
.mapp-auth-subtitle {
    font-size: .88rem;
    color: rgba(255,255,255,.6);
    margin: 0;
}
.mapp-auth-body {
    position: relative;
    z-index: 2;
    flex: 1;
    background: #fff;
    border-radius: 28px 28px 0 0;
    padding: 32px 24px 40px;
    box-shadow: 0 -4px 30px rgba(0,0,0,.12);
}
.mapp-auth-alert {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: .85rem;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
}
.mapp-auth-alert.error {
    background: #FEF2F2;
    color: #DC2626;
    border: 1px solid #FECACA;
}
.mapp-auth-alert.success {
    background: #F0FDF4;
    color: #16A34A;
    border: 1px solid #BBF7D0;
}
.mapp-auth-alert.success a { color: #15803D; font-weight: 600; }
.mapp-auth-field {
    margin-bottom: 18px;
}
.mapp-auth-field label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
    letter-spacing: .2px;
}
.mapp-auth-input-wrap {
    display: flex;
    align-items: center;
    border: 1.5px solid #E2E8F0;
    border-radius: 12px;
    background: #F8FAFC;
    padding: 0 14px;
    transition: border-color .2s, box-shadow .2s;
    gap: 10px;
}
.mapp-auth-input-wrap:focus-within {
    border-color: #A78BFA;
    box-shadow: 0 0 0 3px rgba(167,139,250,.15);
    background: #fff;
}
.mapp-auth-input-wrap > i {
    color: #94A3B8;
    font-size: .9rem;
    flex-shrink: 0;
}
.mapp-auth-input-wrap:focus-within > i { color: #7C3AED; }
.mapp-auth-input-wrap input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 13px 0;
    font-size: .92rem;
    color: #1e293b;
    outline: none;
    min-width: 0;
}
.mapp-auth-input-wrap input::placeholder { color: #CBD5E1; }
.mapp-auth-toggle {
    border: none;
    background: none;
    color: #94A3B8;
    cursor: pointer;
    padding: 4px;
    font-size: .9rem;
    flex-shrink: 0;
    transition: color .2s;
}
.mapp-auth-toggle:hover { color: #6C3FA0; }
.mapp-auth-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #7C3AED, #6C3FA0);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    transition: transform .15s, box-shadow .2s;
    box-shadow: 0 4px 14px rgba(108,63,160,.3);
}
.mapp-auth-btn:active { transform: scale(.98); }
.mapp-auth-btn:hover { box-shadow: 0 6px 20px rgba(108,63,160,.4); }
.mapp-auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: .88rem;
    color: #94A3B8;
}
.mapp-auth-footer a {
    color: #6C3FA0;
    font-weight: 600;
    text-decoration: none;
}
.mapp-auth-footer a:hover { text-decoration: underline; }

/* ===== Mobile App: Browse & Detail Views ===== */
.mapp-back-btn {
    color: #6B7280;
    text-decoration: none;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #F3F4F6;
    transition: all .2s;
    flex-shrink: 0;
}
.mapp-back-btn:hover { background: #E5E7EB; color: #374151; }

/* Browse Grid (Ebooks) */
.mapp-browse-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 4px 0;
}
.mapp-browse-card {
    display: block;
    text-decoration: none;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    transition: transform .2s;
}
.mapp-browse-card:active { transform: scale(.97); }
.mapp-browse-cover {
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: #f3f4f6;
}
.mapp-browse-cover img { width: 100%; height: 100%; object-fit: cover; }
.mapp-browse-cover .mapp-cover-placeholder { width: 100%; height: 100%; border-radius: 0; }
.mapp-browse-info { padding: 10px; }
.mapp-browse-title {
    font-size: .82rem;
    font-weight: 600;
    color: #1e293b;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
    line-height: 1.3;
}
.mapp-browse-price {
    font-size: .78rem;
    font-weight: 700;
    color: #6C3FA0;
}
.mapp-browse-price .free { color: #16A34A; font-weight: 700; }

/* Detail View */
.mapp-detail { margin: -16px -16px 0; }
.mapp-detail-cover {
    width: 100%;
    overflow: hidden;
    background: #f8f7fc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.mapp-detail-cover img { max-width: 280px; width: 100%; height: auto; object-fit: contain; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
.mapp-detail-cover .mapp-cover-placeholder { width: 280px; aspect-ratio: 148/210; border-radius: 12px; }
.mapp-cover-placeholder.mapp-cover-lg {
    width: 280px;
    aspect-ratio: 148/210;
    border-radius: 12px;
    font-size: 3rem;
}
.mapp-detail-body { padding: 20px 16px 24px; }
.mapp-detail-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 10px;
    line-height: 1.35;
}
.mapp-detail-price {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.mapp-price-old {
    font-size: .9rem;
    color: #94a3b8;
    text-decoration: line-through;
}
.mapp-price-now {
    font-size: 1.15rem;
    font-weight: 700;
    color: #6C3FA0;
}
.mapp-price-free {
    font-size: 1.05rem;
    font-weight: 700;
    color: #16A34A;
    background: #F0FDF4;
    padding: 2px 10px;
    border-radius: 6px;
}
.mapp-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    font-size: .8rem;
    color: #64748b;
    margin-bottom: 14px;
}
.mapp-detail-meta i { margin-right: 3px; color: #A78BFA; }
.mapp-detail-dates {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: .8rem;
    color: #64748b;
    margin-bottom: 14px;
    padding: 10px;
    background: #f8fafc;
    border-radius: 8px;
}
.mapp-detail-dates i { margin-right: 4px; color: #A78BFA; }
.mapp-detail-badges {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}
.mapp-badge-level {
    font-size: .72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.mapp-badge-level.beginner { background: #DBEAFE; color: #2563EB; }
.mapp-badge-level.intermediate { background: #FEF3C7; color: #D97706; }
.mapp-badge-level.advanced { background: #FEE2E2; color: #DC2626; }
.mapp-badge-free {
    font-size: .72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    background: #F0FDF4;
    color: #16A34A;
}
.mapp-detail-desc {
    font-size: .88rem;
    line-height: 1.75;
    color: #475569;
    margin-bottom: 20px;
    text-align: justify;
    word-break: break-word;
}
.mapp-detail-desc p { margin-bottom: 10px; }
.mapp-detail-desc img { max-width: 100%; height: auto; border-radius: 8px; }
.mapp-detail-actions {
    padding-top: 8px;
}
.mapp-article-content {
    font-size: .9rem;
    line-height: 1.75;
    color: #334155;
    margin-top: 16px;
}
.mapp-article-content p { margin-bottom: 12px; }
.mapp-article-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 8px 0; }
.mapp-article-content h2, .mapp-article-content h3 { margin: 16px 0 8px; color: #1e293b; }
.mapp-article-content blockquote { border-left: 3px solid #A78BFA; padding: 10px 14px; margin: 12px 0; background: #f5f3ff; border-radius: 0 8px 8px 0; font-style: italic; }
.mapp-article-content ul, .mapp-article-content ol { margin: 10px 0; padding-left: 20px; }
.mapp-article-content li { margin-bottom: 6px; }

/* ===== Mobile App: Video Components ===== */
.mapp-video-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
.mapp-video-card {
    text-decoration: none;
    color: inherit;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}
.mapp-video-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.mapp-video-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #1A1A2E;
}
.mapp-video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mapp-video-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.mapp-video-play i {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(108,63,160,0.85);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    padding-left: 3px;
    box-shadow: 0 4px 16px rgba(108,63,160,0.4);
}
.mapp-video-duration {
    position: absolute;
    bottom: 8px; right: 8px;
    background: rgba(0,0,0,0.75);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
}
.mapp-video-info { padding: 12px 14px; }
.mapp-video-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.35;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mapp-video-meta { font-size: 0.72rem; color: #9CA3AF; }

/* Video Player Detail */
.mapp-video-detail { margin: -16px -16px 0; }
.mapp-video-player { position: relative; background: #000; }
.mapp-yt-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    overflow: hidden;
    background: #000;
}
.mapp-yt-shield {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 40px;
    z-index: 10;
    cursor: default;
}
/* Hide YouTube logo area at bottom-right */
.mapp-yt-container::after {
    content: '';
    position: absolute;
    bottom: 0; right: 0;
    width: 120px; height: 32px;
    background: transparent;
    z-index: 10;
    pointer-events: none;
}

/* ============================================
   Quill Content Rendering (ql-content)
   Consistent styling for Quill HTML output
   Used on ALL pages that render rich text
   ============================================ */
.ql-content {
    font-size: 1rem;
    line-height: 1.75;
    color: #374151;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    letter-spacing: 0.01em;
}
.ql-content > *:first-child { margin-top: 0 !important; }
.ql-content > *:last-child { margin-bottom: 0 !important; }

/* Headings */
.ql-content h1 { font-size: 1.5rem; margin: 20px 0 6px; color: var(--text-primary, #1e293b); font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; }
.ql-content h2 { font-size: 1.3rem; margin: 18px 0 6px; color: var(--text-primary, #1e293b); font-weight: 700; line-height: 1.35; letter-spacing: -0.01em; }
.ql-content h3 { font-size: 1.12rem; margin: 16px 0 4px; color: var(--text-primary, #1e293b); font-weight: 600; line-height: 1.4; }
.ql-content h4 { font-size: 1.02rem; margin: 14px 0 4px; color: var(--text-primary, #1e293b); font-weight: 600; line-height: 1.4; }
.ql-content h5 { font-size: 0.95rem; margin: 12px 0 4px; color: var(--text-primary, #1e293b); font-weight: 600; }
.ql-content h6 { font-size: 0.88rem; margin: 10px 0 4px; color: var(--text-muted, #64748b); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

/* Adjacent heading spacing reduction */
.ql-content h1 + h2, .ql-content h2 + h3, .ql-content h3 + h4 { margin-top: 4px; }

/* Paragraphs */
.ql-content p { margin-bottom: 8px; line-height: 1.75; }
.ql-content p:last-child { margin-bottom: 0; }

/* Empty Quill paragraphs — collapse excessive blank lines */
.ql-content p:empty,
.ql-content p > br:only-child { display: block; }
.ql-content p:empty { margin-bottom: 4px; min-height: 0; line-height: 0.5; }
.ql-content p:empty + p:empty { display: none; }

/* Lists — restore list-style stripped by global reset */
.ql-content ul { margin: 6px 0; padding-left: 28px; list-style-type: disc; }
.ql-content ol { margin: 6px 0; padding-left: 28px; list-style-type: decimal; }
.ql-content ul ul { list-style-type: circle; margin: 4px 0; }
.ql-content ul ul ul { list-style-type: square; }
.ql-content ol ol { list-style-type: lower-alpha; margin: 4px 0; }
.ql-content ol ol ol { list-style-type: lower-roman; }
.ql-content li { margin-bottom: 4px; line-height: 1.7; }
.ql-content li:last-child { margin-bottom: 0; }
.ql-content li > p { margin-bottom: 2px; }

/* Blockquote */
.ql-content blockquote {
    border-left: 4px solid var(--primary, #6C3FA0);
    padding: 12px 18px;
    margin: 14px 0;
    background: var(--primary-glow, rgba(108,63,160,0.06));
    border-radius: 0 var(--radius-md, 8px) var(--radius-md, 8px) 0;
    color: #475569;
    font-style: italic;
    line-height: 1.75;
}
.ql-content blockquote p { margin-bottom: 8px; }
.ql-content blockquote p:last-child { margin-bottom: 0; }

/* Code */
.ql-content code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.88em;
    color: var(--primary, #6C3FA0);
}
.ql-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 20px;
    border-radius: var(--radius-md, 8px);
    overflow-x: auto;
    margin: 20px 0;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.88em;
    line-height: 1.6;
}
.ql-content pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

/* Links */
.ql-content a { color: var(--primary, #6C3FA0); text-decoration: underline; text-underline-offset: 2px; transition: opacity 0.2s; }
.ql-content a:hover { opacity: 0.75; }

/* Images */
.ql-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md, 8px);
    margin: 16px 0;
    display: block;
}

/* Videos (iframes) */
.ql-content iframe {
    max-width: 100%;
    border-radius: var(--radius-md, 8px);
    margin: 16px 0;
}
.ql-content .ql-video {
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
    border-radius: var(--radius-md, 8px);
    margin: 16px 0;
}

/* Text formatting */
.ql-content strong, .ql-content b { font-weight: 700; color: var(--text-primary, #1e293b); }
.ql-content em, .ql-content i:not(.fas):not(.far):not(.fab) { font-style: italic; }
.ql-content u { text-decoration: underline; text-underline-offset: 2px; }
.ql-content s { text-decoration: line-through; opacity: 0.7; }
.ql-content sub { vertical-align: sub; font-size: 0.8em; }
.ql-content sup { vertical-align: super; font-size: 0.8em; }

/* Quill indent classes */
.ql-content .ql-indent-1 { padding-left: 3em; }
.ql-content .ql-indent-2 { padding-left: 6em; }
.ql-content .ql-indent-3 { padding-left: 9em; }
.ql-content .ql-indent-4 { padding-left: 12em; }
.ql-content .ql-indent-5 { padding-left: 15em; }
.ql-content .ql-indent-6 { padding-left: 18em; }
.ql-content .ql-indent-7 { padding-left: 21em; }
.ql-content .ql-indent-8 { padding-left: 24em; }

/* Quill list indent — lists indented by Quill get .ql-indent-N */
.ql-content li.ql-indent-1 { padding-left: 3em; }
.ql-content li.ql-indent-2 { padding-left: 6em; }
.ql-content li.ql-indent-3 { padding-left: 9em; }

/* Quill alignment classes */
.ql-content .ql-align-center { text-align: center; }
.ql-content .ql-align-right { text-align: right; }
.ql-content .ql-align-justify { text-align: justify; }

/* Quill size classes */
.ql-content .ql-size-small { font-size: 0.85em; }
.ql-content .ql-size-large { font-size: 1.3em; }
.ql-content .ql-size-huge { font-size: 1.8em; }

/* Quill font-family classes */
.ql-content .ql-font-serif { font-family: Georgia, 'Times New Roman', serif; }
.ql-content .ql-font-monospace { font-family: 'JetBrains Mono', 'Fira Code', monospace; }

/* Horizontal rule */
.ql-content hr {
    border: none;
    border-top: 2px solid var(--border, #e2e8f0);
    margin: 28px 0;
}

/* Tables (if Quill table module used) */
.ql-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}
.ql-content table td, .ql-content table th {
    border: 1px solid var(--border, #e2e8f0);
    padding: 10px 14px;
    text-align: left;
}
.ql-content table th {
    background: #f1f5f9;
    font-weight: 600;
}

/* Neutralize white/near-white text colors from Quill (invisible on white bg) */
.ql-content span[style*="color: rgb(255, 255, 255)"],
.ql-content span[style*="color: rgb(255,255,255)"],
.ql-content span[style*="color: white"],
.ql-content span[style*="color:#ffffff"],
.ql-content span[style*="color: #ffffff"],
.ql-content span[style*="color:#fff;"],
.ql-content span[style*="color: #fff;"],
.ql-content span[style*="color: rgb(250, 250, 250)"],
.ql-content span[style*="color: rgb(248, 249, 250)"],
.article-content span[style*="color: rgb(255, 255, 255)"],
.article-content span[style*="color: rgb(255,255,255)"],
.article-content span[style*="color: white"],
.article-content span[style*="color:#ffffff"],
.article-content span[style*="color: #ffffff"],
.article-content span[style*="color:#fff;"],
.article-content span[style*="color: #fff;"],
.article-content span[style*="color: rgb(250, 250, 250)"],
.article-content span[style*="color: rgb(248, 249, 250)"] {
    color: var(--text-primary, #1e293b) !important;
}

/* Also neutralize white background-color from Quill on white bg sections */
.ql-content span[style*="background-color: rgb(255, 255, 255)"],
.ql-content span[style*="background-color: white"],
.article-content span[style*="background-color: rgb(255, 255, 255)"],
.article-content span[style*="background-color: white"] {
    background-color: transparent !important;
}

/* Neutralize font-family from copy-paste — keep platform fonts consistent */
.ql-content span[style*="font-family"] {
    font-family: inherit !important;
}

/* Mobile responsive for ql-content */
@media (max-width: 768px) {
    .ql-content {
        font-size: 0.95rem;
        line-height: 1.8;
    }
    .ql-content h1 { font-size: 1.4rem; }
    .ql-content h2 { font-size: 1.25rem; }
    .ql-content h3 { font-size: 1.08rem; }
    .ql-content blockquote { padding: 12px 16px; }
    .ql-content pre { padding: 14px; }
    .ql-content .ql-indent-1 { padding-left: 1.5em; }
    .ql-content .ql-indent-2 { padding-left: 3em; }
    .ql-content .ql-indent-3 { padding-left: 4.5em; }
    .ql-content li.ql-indent-1 { padding-left: 1.5em; }
    .ql-content li.ql-indent-2 { padding-left: 3em; }
}
