/**
 * SMPN 12 Modern & Dynamic Theme Stylesheet
 * SLiMS 9 Bulian - Perpustakaan UPTD SMP Negeri 12 Tangerang Selatan
 */

/* ==========================================================================
   1. CSS Custom Properties & Design Tokens
   ========================================================================== */
:root {
    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    
    /* Primary Colors - Deep Royal Blue / Slate */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --primary-dark: #1e3a8a;
    
    /* Secondary & Accent Colors */
    --accent-emerald: #10b981;
    --accent-emerald-light: #ecfdf5;
    --accent-cyan: #06b6d4;
    --accent-amber: #f59e0b;
    --accent-amber-light: #fffbeb;
    --accent-purple: #8b5cf6;
    --accent-rose: #f43f5e;
    
    /* Neutral / Surfaces (Light Mode) */
    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-trans: rgba(255, 255, 255, 0.82);
    --bg-surface-subtle: #f1f5f9;
    --border-color: #e2e8f0;
    --border-light: #edf2f7;
    
    /* Text Colors */
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-subtle: #94a3b8;
    --text-inverse: #ffffff;
    
    /* Radius & Shadows */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-card: 0 4px 20px -2px rgba(15, 23, 42, 0.08);
    --shadow-hover: 0 14px 30px -4px rgba(15, 23, 42, 0.14);
    --shadow-glow: 0 0 25px rgba(37, 99, 235, 0.25);
    --shadow-emerald-glow: 0 0 20px rgba(16, 185, 129, 0.25);
    
    /* Navbar height */
    --nav-height: 76px;
    
    /* Transition standard */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Mode Tokens */
[data-theme="dark"] {
    --bg-body: #090d16;
    --bg-surface: #111827;
    --bg-surface-trans: rgba(17, 24, 39, 0.88);
    --bg-surface-subtle: #1e293b;
    --border-color: #1f293d;
    --border-light: #2d3748;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-subtle: #64748b;
    
    --shadow-card: 0 4px 25px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 14px 35px rgba(0, 0, 0, 0.6);
    --primary-light: rgba(37, 99, 235, 0.15);
    --accent-emerald-light: rgba(16, 185, 129, 0.15);
    --accent-amber-light: rgba(245, 158, 11, 0.15);
}

/* ==========================================================================
   2. Global Typography & Reset
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-body);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover {
    color: var(--primary-hover);
    text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-top: 0;
}

/* ==========================================================================
   3. Modern Navbar (Glassmorphic)
   ========================================================================== */
.modern-navbar-wrapper {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-surface-trans);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.modern-navbar {
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}
.brand-logo-img {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    object-fit: contain;
    background: #ffffff;
    padding: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.brand-text-container {
    display: flex;
    flex-direction: column;
}
.brand-title {
    font-size: 1.08rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
    margin: 0;
}
.brand-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0;
    font-weight: 500;
}

.nav-menu-list {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu-link {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 8px 14px;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.nav-menu-link:hover {
    color: var(--primary);
    background: var(--primary-light);
}
.nav-menu-link.active {
    color: var(--primary);
    background: var(--primary-light);
    font-weight: 700;
}

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

/* Theme Toggle Button */
.btn-theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.btn-theme-toggle:hover {
    background: var(--bg-surface-subtle);
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.05);
}

/* Area Member Button */
.btn-member-portal {
    background: linear-gradient(135deg, var(--primary), var(--accent-cyan));
    color: #ffffff !important;
    font-size: 0.88rem;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
    transition: all var(--transition-fast);
}
.btn-member-portal:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
    color: #ffffff;
}

/* ==========================================================================
   4. Hero Section & Dynamic Greeting
   ========================================================================== */
.modern-hero-section {
    position: relative;
    padding: 64px 0 54px;
    background: radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.12) 0%, rgba(6, 182, 212, 0.05) 50%, transparent 80%);
    overflow: hidden;
}
[data-theme="dark"] .modern-hero-section {
    background: radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.22) 0%, rgba(6, 182, 212, 0.08) 50%, transparent 80%);
}

.hero-ambient-glow {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 350px;
    background: radial-gradient(ellipse, rgba(59, 130, 246, 0.35), transparent 70%);
    filter: blur(60px);
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 820px;
    margin: 0 auto;
}

/* Dynamic Live Status Badge */
.status-badge-container {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    box-shadow: var(--shadow-subtle);
    margin-bottom: 20px;
}

.status-dot-pulse {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent-emerald);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulseEmerald 2s infinite;
}
.status-badge-closed .status-dot-pulse {
    background: var(--accent-rose);
    box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.7);
    animation: pulseRose 2s infinite;
}

@keyframes pulseEmerald {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
@keyframes pulseRose {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(244, 63, 94, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(244, 63, 94, 0); }
}

.hero-greeting-text {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.hero-main-title {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.22;
    margin-bottom: 14px;
    background: linear-gradient(135deg, var(--text-main) 30%, var(--primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
[data-theme="dark"] .hero-main-title {
    background: linear-gradient(135deg, #ffffff 40%, #93c5fd 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 660px;
    margin: 0 auto 36px;
}

/* ==========================================================================
   5. Floating Super Search Box
   ========================================================================== */
.super-search-wrapper {
    position: relative;
    max-width: 740px;
    margin: 0 auto;
}

.super-search-card {
    background: var(--bg-surface);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 10px 14px;
    box-shadow: var(--shadow-card), 0 10px 30px rgba(37, 99, 235, 0.08);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all var(--transition-fast);
}
.super-search-card:focus-within {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow), var(--shadow-hover);
    transform: translateY(-2px);
}

.search-input-field {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 1.08rem;
    color: var(--text-main);
    font-family: inherit;
    padding: 8px 6px;
}
.search-input-field::placeholder {
    color: var(--text-subtle);
    font-weight: 400;
}

.search-field-selector {
    border: 1px solid var(--border-color);
    background: var(--bg-surface-subtle);
    color: var(--text-main);
    font-size: 0.88rem;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    outline: none;
    cursor: pointer;
}

.btn-search-submit {
    background: var(--primary);
    color: #ffffff;
    border: none;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-fast);
}
.btn-search-submit:hover {
    background: var(--primary-hover);
    transform: scale(1.02);
}

/* Quick Search Tag Chips */
.quick-tags-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}
.quick-tags-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
}
.quick-tag-chip {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}
.quick-tag-chip:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-1px);
}

/* ==========================================================================
   6. Smart Categories Grid
   ========================================================================== */
.section-wrapper {
    padding: 60px 0;
}
.section-header-centered {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 40px;
}
.section-tag {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary);
    background: var(--primary-light);
    padding: 4px 14px;
    border-radius: var(--radius-full);
    margin-bottom: 10px;
}
.section-title {
    font-size: 1.85rem;
    font-weight: 800;
    margin-bottom: 8px;
}
.section-description {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0;
}

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

.category-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px 18px;
    text-align: center;
    box-shadow: var(--shadow-card);
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}
.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent-cyan));
    opacity: 0;
    transition: opacity var(--transition-fast);
}
.category-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(37, 99, 235, 0.3);
}
.category-card:hover::before {
    opacity: 1;
}

.category-icon-box {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}
.category-card:hover .category-icon-box {
    transform: translateY(-3px) scale(1.08);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.cat-blue {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(59, 130, 246, 0.08));
    color: #2563eb;
    border: 1px solid rgba(37, 99, 235, 0.2);
}
.cat-rose {
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.15), rgba(251, 113, 133, 0.08));
    color: #e11d48;
    border: 1px solid rgba(244, 63, 94, 0.2);
}
.cat-cyan {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(34, 211, 238, 0.08));
    color: #0891b2;
    border: 1px solid rgba(6, 182, 212, 0.2);
}
.cat-amber {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(251, 191, 36, 0.08));
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
}
.cat-emerald {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(52, 211, 153, 0.08));
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.cat-purple {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(167, 139, 250, 0.08));
    color: #7c3aed;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.category-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}
.category-count {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ==========================================================================
   7. Interactive Book Showcase & Cards
   ========================================================================== */
.collection-tabs-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 34px;
    flex-wrap: wrap;
}

.tab-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.92rem;
    font-weight: 700;
    padding: 10px 22px;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-fast);
}
.tab-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--primary-light);
}
.tab-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.book-showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}

.book-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    position: relative;
}
.book-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(37, 99, 235, 0.25);
}

.book-cover-wrapper {
    position: relative;
    padding-top: 130%;
    background: var(--bg-surface-subtle);
    overflow: hidden;
    display: block;
}
.book-cover-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.book-card:hover .book-cover-img {
    transform: scale(1.06);
}

.book-availability-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.badge-available {
    background: rgba(16, 185, 129, 0.9);
    color: #ffffff;
}
.badge-empty {
    background: rgba(244, 63, 94, 0.9);
    color: #ffffff;
}

.book-info-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.book-call-number {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    padding: 2px 8px;
    border-radius: 4px;
    align-self: flex-start;
    margin-bottom: 8px;
}

.book-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.book-title:hover {
    color: var(--primary);
}

.book-author {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-footer-actions {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border-light);
    padding-top: 12px;
}

.btn-book-detail {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap var(--transition-fast);
}
.btn-book-detail:hover {
    gap: 7px;
}

/* ==========================================================================
   8. Library Live Statistics Counter
   ========================================================================== */
.stats-section-bg {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: #ffffff;
    border-radius: var(--radius-lg);
    padding: 48px 36px;
    margin: 40px 0;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.2);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    text-align: center;
}

.stat-card {
    padding: 16px;
}
.stat-icon {
    font-size: 2rem;
    color: #38bdf8;
    margin-bottom: 12px;
}
.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #ffffff, #93c5fd);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.stat-label {
    font-size: 0.88rem;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==========================================================================
   9. Hall of Fame (Top Readers)
   ========================================================================== */
.readers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.reader-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px 18px;
    text-align: center;
    box-shadow: var(--shadow-card);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}
.reader-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.reader-medal-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    font-size: 1.3rem;
}

.reader-avatar-box {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin: 0 auto 14px;
    overflow: hidden;
    border: 3px solid var(--primary-light);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}
.reader-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reader-name {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 4px;
}
.reader-type {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 10px;
}
.reader-score-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-emerald-light);
    color: var(--accent-emerald);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-full);
}

/* ==========================================================================
   10. Modern Footer
   ========================================================================== */
.modern-footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 60px 0 24px;
    border-top: 1px solid #1e293b;
}

.footer-brand-title {
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 12px;
}
.footer-text {
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.footer-heading {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 18px;
}

.footer-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.footer-links-list a {
    color: #94a3b8;
    font-size: 0.88rem;
    transition: all var(--transition-fast);
}
.footer-links-list a:hover {
    color: #38bdf8;
    padding-left: 4px;
}

.footer-social-links {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}
.social-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    background: #1e293b;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}
.social-icon-btn:hover {
    background: var(--primary);
    color: #ffffff;
    transform: translateY(-2px);
}

.footer-bottom-bar {
    border-top: 1px solid #1e293b;
    margin-top: 48px;
    padding-top: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    flex-wrap: wrap;
    gap: 12px;
}

/* ==========================================================================
   11. Search Results & Detail Overrides
   ========================================================================== */
.search-results-container {
    padding: 40px 0;
}
.filter-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-card);
    margin-bottom: 24px;
}
.biblio-item-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 18px;
    box-shadow: var(--shadow-card);
    display: flex;
    gap: 20px;
    transition: all var(--transition-normal);
}
.biblio-item-card:hover {
    box-shadow: var(--shadow-hover);
    border-color: rgba(37, 99, 235, 0.3);
}

.biblio-thumb-img {
    width: 110px;
    height: 155px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

/* Detail Page 3D Cover presentation */
.detail-cover-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-card);
    text-align: center;
}
.detail-cover-img {
    max-width: 100%;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    transition: transform var(--transition-normal);
}
.detail-cover-img:hover {
    transform: scale(1.03);
}

/* ==========================================================================
   12. Responsive Media Queries
   ========================================================================== */
@media (max-width: 991px) {
    .hero-main-title {
        font-size: 2.1rem;
    }
    .modern-navbar {
        height: auto;
        padding: 12px 0;
    }
    .nav-menu-list {
        display: none; /* Can be toggled via mobile menu */
    }
}

@media (max-width: 768px) {
    .modern-hero-section {
        padding: 40px 0 34px;
    }
    .hero-main-title {
        font-size: 1.75rem;
    }
    .super-search-card {
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
    }
    .btn-search-submit {
        justify-content: center;
    }
    .biblio-item-card {
        flex-direction: column;
    }
    .biblio-thumb-img {
        width: 100%;
        max-width: 140px;
        margin: 0 auto;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ==========================================================================
   13. Comprehensive Dark Mode Overrides & Mobile Menu
   ========================================================================== */
.dropdown-toggle-no-caret::after {
    display: none !important;
}

/* Mobile Menu Drawer Styling */
.mobile-nav-drawer {
    border-top: 1px solid var(--border-color);
    padding: 16px 0;
    animation: fadeInMenu 0.2s ease;
}
@keyframes fadeInMenu {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}
.mobile-nav-link:hover, .mobile-nav-link.active {
    background: var(--primary-light);
    color: var(--primary);
}

/* Bootstrap Dark Mode Overrides */
[data-theme="dark"] .text-dark {
    color: #f8fafc !important;
}
[data-theme="dark"] .text-secondary {
    color: #94a3b8 !important;
}
[data-theme="dark"] .card {
    background-color: var(--bg-surface) !important;
    color: var(--text-main) !important;
    border-color: var(--border-color) !important;
}
[data-theme="dark"] .modal-content {
    background-color: var(--bg-surface) !important;
    color: var(--text-main) !important;
    border-color: var(--border-color) !important;
}
[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer {
    border-color: var(--border-color) !important;
}
[data-theme="dark"] .form-control,
[data-theme="dark"] .custom-select {
    background-color: var(--bg-surface-subtle) !important;
    color: var(--text-main) !important;
    border-color: var(--border-color) !important;
}
[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .custom-select:focus {
    background-color: var(--bg-surface) !important;
    color: var(--text-main) !important;
    border-color: var(--primary) !important;
}
[data-theme="dark"] .table {
    color: var(--text-main) !important;
}
[data-theme="dark"] .table th,
[data-theme="dark"] .table td {
    border-color: var(--border-color) !important;
}
[data-theme="dark"] .dropdown-menu {
    background-color: var(--bg-surface) !important;
    border-color: var(--border-color) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
}
[data-theme="dark"] .dropdown-item {
    color: var(--text-main) !important;
}
[data-theme="dark"] .dropdown-item:hover {
    background-color: var(--bg-surface-subtle) !important;
    color: var(--primary) !important;
}
[data-theme="dark"] .dropdown-divider {
    border-color: var(--border-color) !important;
}
[data-theme="dark"] .badge-light {
    background-color: var(--bg-surface-subtle) !important;
    color: var(--text-muted) !important;
    border-color: var(--border-color) !important;
}
[data-theme="dark"] .btn-outline-secondary {
    color: var(--text-muted) !important;
    border-color: var(--border-color) !important;
}
[data-theme="dark"] .btn-outline-secondary:hover {
    background-color: var(--primary) !important;
    color: #ffffff !important;
    border-color: var(--primary) !important;
}
[data-theme="dark"] .close {
    color: var(--text-main) !important;
    text-shadow: none !important;
}
[data-theme="dark"] .list-group-item {
    background-color: var(--bg-surface) !important;
    color: var(--text-main) !important;
    border-color: var(--border-color) !important;
}
[data-theme="dark"] hr {
    border-color: var(--border-color) !important;
}
[data-theme="dark"] .bg-white {
    background-color: var(--bg-surface) !important;
}
[data-theme="dark"] .border-top,
[data-theme="dark"] .border-bottom,
[data-theme="dark"] .border-left,
[data-theme="dark"] .border-right,
[data-theme="dark"] .border {
    border-color: var(--border-color) !important;
}

/* ==========================================================================
   14. DDC Topic Modal Styling
   ========================================================================== */
.topic {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 14px;
    width: 100%;
}
.topic li {
    margin: 0 !important;
    display: flex;
}
.topic li a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 18px 12px;
    background: var(--bg-surface-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    transition: all var(--transition-fast);
    width: 100%;
    min-height: 140px;
}
.topic li a:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-card);
    text-decoration: none;
}
.topic li a img {
    margin-bottom: 12px !important;
    width: 52px;
    height: 52px;
    object-fit: contain;
    transition: transform var(--transition-fast);
}
.topic li a:hover img {
    transform: scale(1.1);
}

/* ==========================================================================
   15. Forms & Auth Pages (Login, Member Area, CMS Content)
   ========================================================================== */
#loginForm {
    max-width: 480px;
    margin: 0 auto;
    padding: 10px 0;
}
.heading1, .fieldLabel {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
    margin-top: 14px;
}
.login_input input[type="text"],
.login_input input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.95rem;
    color: var(--text-main);
    background-color: var(--bg-surface);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    outline: none;
}
.login_input input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.remember_forgot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 16px 0 20px;
    font-size: 0.88rem;
    color: var(--text-muted);
}
.remember_forgot label {
    margin-bottom: 0;
    margin-left: 6px;
    cursor: pointer;
}
.loginButton, .memberButton {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 12px 30px;
    border: none;
    border-radius: var(--radius-pill);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
}
.loginButton:hover, .memberButton:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
    background: linear-gradient(135deg, var(--primary-dark), #1d4ed8);
    color: #ffffff !important;
}
.homeButton {
    background: var(--bg-surface-subtle);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 12px 24px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    cursor: pointer;
    margin-left: 10px;
    transition: all var(--transition-fast);
}
.homeButton:hover {
    background: var(--border-color);
    color: var(--text-main);
}
.tagline {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}
.loginInfo {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 18px;
}
.ck-content {
    color: var(--text-main);
}
.ck-content p {
    margin-bottom: 1rem;
}
.ck-content h3 {
    color: var(--text-main);
    font-size: 1.3rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--primary-light);
}

/* Dark mode overrides for forms and topics */
[data-theme="dark"] .topic li a {
    background: var(--bg-surface);
    border-color: var(--border-color);
    color: var(--text-main);
}
[data-theme="dark"] .topic li a:hover {
    background: rgba(37, 99, 235, 0.15);
    border-color: var(--primary);
    color: var(--accent-cyan);
}
[data-theme="dark"] .login_input input[type="text"],
[data-theme="dark"] .login_input input[type="password"] {
    background-color: var(--bg-surface-subtle);
    border-color: var(--border-color);
    color: var(--text-main);
}
[data-theme="dark"] .homeButton {
    background: var(--bg-surface-subtle);
    border-color: var(--border-color);
    color: var(--text-muted);
}
[data-theme="dark"] .homeButton:hover {
    background: var(--border-color);
    color: #ffffff;
}
[data-theme="dark"] .ck-content {
    color: var(--text-main);
}
[data-theme="dark"] .ck-content h3 {
    border-bottom-color: var(--border-color);
}
[data-theme="dark"] .cat-blue { background: rgba(37, 99, 235, 0.2); color: #60a5fa; border-color: rgba(37, 99, 235, 0.35); }
[data-theme="dark"] .cat-rose { background: rgba(244, 63, 94, 0.2); color: #fb7185; border-color: rgba(244, 63, 94, 0.35); }
[data-theme="dark"] .cat-cyan { background: rgba(6, 182, 212, 0.2); color: #38bdf8; border-color: rgba(6, 182, 212, 0.35); }
[data-theme="dark"] .cat-amber { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border-color: rgba(245, 158, 11, 0.35); }
[data-theme="dark"] .cat-emerald { background: rgba(16, 185, 129, 0.2); color: #34d399; border-color: rgba(16, 185, 129, 0.35); }
[data-theme="dark"] .cat-purple { background: rgba(139, 92, 246, 0.2); color: #a78bfa; border-color: rgba(139, 92, 246, 0.35); }

/* ==========================================================================
   16. Visitor Portal & Kiosk Design System (Buku Tamu Pengunjung)
   ========================================================================== */
.btn-visitor-portal {
    background: rgba(16, 185, 129, 0.12);
    color: #059669 !important;
    font-size: 0.88rem;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    border: 1.5px solid rgba(16, 185, 129, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    transition: all var(--transition-fast);
}
.btn-visitor-portal:hover {
    background: #10b981;
    color: #ffffff !important;
    border-color: #10b981;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
    text-decoration: none;
}
.btn-visitor-portal:hover .text-emerald {
    color: #ffffff !important;
}

.visitor-hero-badge {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    padding: 6px 16px;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    transition: all var(--transition-fast);
}
.visitor-hero-badge:hover {
    background: rgba(16, 185, 129, 0.08);
    border-color: #10b981;
    color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.18);
    text-decoration: none;
}

.visitor-kiosk-wrapper {
    width: 100%;
}
.visitor-clock-badge {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.visitor-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-card);
    transition: all var(--transition-fast);
}
.visitor-side-card {
    background: linear-gradient(135deg, var(--bg-surface), var(--bg-surface-subtle));
}

.visitor-input-group {
    position: relative;
    display: flex;
    align-items: center;
}
.visitor-input-lg {
    font-size: 1.15rem;
    font-weight: 600;
    padding: 14px 48px 14px 18px;
    height: auto;
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
    background-color: var(--bg-surface);
    color: var(--text-main);
    letter-spacing: 0.04em;
    transition: all var(--transition-fast);
}
.visitor-input-lg:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
    background-color: var(--bg-surface);
    color: var(--text-main);
}
.visitor-input-icon {
    position: absolute;
    right: 18px;
    font-size: 1.25rem;
    pointer-events: none;
}
.visitor-input {
    padding: 12px 16px;
    height: auto;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border-color);
    background-color: var(--bg-surface);
    color: var(--text-main);
    transition: all var(--transition-fast);
}
.visitor-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.visitor-submit-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    transition: all var(--transition-fast);
}
.visitor-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.35);
    background: linear-gradient(135deg, var(--primary-dark), #1d4ed8);
}

.visitor-avatar-ring {
    position: relative;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(135deg, #10b981, #06b6d4);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
}
.visitor-avatar-photo {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    background: #ffffff;
}
.visitor-avatar-check {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 32px;
    background: #10b981;
    color: #ffffff;
    border-radius: 50%;
    border: 3px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.visitor-quote-box {
    background: var(--bg-surface-subtle);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 20px 22px;
    margin: 0;
}
.visitor-tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
}
.visitor-tip-item {
    background: var(--bg-surface-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform var(--transition-fast);
}
.visitor-tip-item:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
}
.visitor-tip-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Dark Mode Overrides for Visitor Kiosk */
[data-theme="dark"] .btn-visitor-portal {
    background: rgba(16, 185, 129, 0.18);
    color: #34d399 !important;
    border-color: rgba(16, 185, 129, 0.4);
}
[data-theme="dark"] .btn-visitor-portal:hover {
    background: #10b981;
    color: #ffffff !important;
}
[data-theme="dark"] .visitor-hero-badge {
    background: var(--bg-surface);
    border-color: var(--border-color);
    color: #f1f5f9;
}
[data-theme="dark"] .visitor-hero-badge:hover {
    background: rgba(16, 185, 129, 0.18);
    color: #34d399;
}
[data-theme="dark"] .visitor-card {
    background: var(--bg-surface);
    border-color: var(--border-color) !important;
}
[data-theme="dark"] .visitor-clock-badge {
    background: var(--bg-surface);
    border-color: var(--border-color);
    color: #f1f5f9;
}
[data-theme="dark"] .visitor-input-lg,
[data-theme="dark"] .visitor-input {
    background-color: var(--bg-surface-subtle);
    border-color: var(--border-color);
    color: #f1f5f9;
}
[data-theme="dark"] .visitor-input-lg:focus,
[data-theme="dark"] .visitor-input:focus {
    background-color: var(--bg-surface);
    border-color: var(--primary);
    color: #ffffff;
}
[data-theme="dark"] .visitor-quote-box {
    background: var(--bg-surface-subtle);
    border-color: var(--border-color);
}
[data-theme="dark"] .visitor-tip-item {
    background: var(--bg-surface-subtle);
    border-color: var(--border-color);
}
[data-theme="dark"] .visitor-avatar-check {
    border-color: var(--bg-surface);
}

/* ==========================================================================
   17. Unified Portal Access Dropdown & Mobile Cards
   ========================================================================== */

/* Trigger Button */
.portal-access-dropdown {
    position: relative;
}

.btn-portal-trigger {
    background: linear-gradient(135deg, var(--primary), #1d4ed8);
    color: #ffffff !important;
    font-size: 0.88rem;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
    cursor: pointer;
    transition: all var(--transition-fast);
    outline: none;
}

.btn-portal-trigger:hover,
.btn-portal-trigger:focus,
.portal-access-dropdown.show .btn-portal-trigger {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.42);
    transform: translateY(-1px);
}

.portal-chevron {
    transition: transform var(--transition-fast);
}

.portal-access-dropdown.show .portal-chevron {
    transform: rotate(180deg);
}

/* Dropdown Menu Container */
.portal-dropdown-menu {
    width: 320px;
    padding: 10px;
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 16px 36px -6px rgba(15, 23, 42, 0.16), 0 4px 12px rgba(0, 0, 0, 0.05) !important;
    margin-top: 12px !important;
    animation: portalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Header inside Dropdown */
.portal-dropdown-header {
    padding: 8px 12px 10px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 6px;
}

.portal-dropdown-title {
    display: block;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
}

.portal-dropdown-subtitle {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Menu Item */
.portal-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    text-decoration: none !important;
    color: var(--text-main);
    transition: all var(--transition-fast);
    position: relative;
}

.portal-menu-item:hover {
    background: var(--bg-surface-subtle);
    color: var(--text-main);
    transform: translateX(3px);
}

.portal-item-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    transition: transform var(--transition-fast);
}

.portal-menu-item:hover .portal-item-icon {
    transform: scale(1.08);
}

.portal-item-content {
    flex: 1;
    min-width: 0;
}

.portal-item-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    line-height: 1.25;
}

.portal-item-desc {
    font-size: 0.73rem;
    color: var(--text-muted);
    margin-top: 2px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portal-item-arrow {
    font-size: 0.75rem;
    color: var(--text-subtle);
    opacity: 0;
    transform: translateX(-4px);
    transition: all var(--transition-fast);
}

.portal-menu-item:hover .portal-item-arrow {
    opacity: 1;
    transform: translateX(0);
    color: var(--primary);
}

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

/* Subtle icon background colors */
.bg-emerald-subtle {
    background: #ecfdf5;
}
.text-emerald {
    color: #059669;
}
.bg-blue-subtle {
    background: #eff6ff;
}
.bg-purple-subtle {
    background: #f5f3ff;
}
.text-purple {
    color: #7c3aed;
}

.badge-success-soft {
    background: #d1fae5;
    color: #065f46;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-full);
}

/* Mobile Portal Cards in Drawer */
.mobile-portal-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--bg-surface-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    text-decoration: none !important;
    transition: all var(--transition-fast);
}

.mobile-portal-card:hover {
    background: var(--bg-surface);
    border-color: var(--primary);
}

.mobile-portal-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

/* Dark Mode Overrides */
[data-theme="dark"] .portal-dropdown-menu {
    background: #151d2e;
    border-color: #24324a !important;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6) !important;
}

[data-theme="dark"] .portal-dropdown-header {
    border-color: #1e293b;
}

[data-theme="dark"] .portal-menu-item:hover {
    background: #1e293b;
}

[data-theme="dark"] .portal-dropdown-divider {
    background: #1e293b;
}

[data-theme="dark"] .bg-emerald-subtle {
    background: rgba(16, 185, 129, 0.15);
}
[data-theme="dark"] .text-emerald {
    color: #34d399;
}
[data-theme="dark"] .bg-blue-subtle {
    background: rgba(37, 99, 235, 0.18);
}
[data-theme="dark"] .bg-purple-subtle {
    background: rgba(139, 92, 246, 0.18);
}
[data-theme="dark"] .text-purple {
    color: #a78bfa;
}

[data-theme="dark"] .badge-success-soft {
    background: rgba(16, 185, 129, 0.25);
    color: #6ee7b7;
}

[data-theme="dark"] .mobile-portal-card {
    background: #131b2c;
    border-color: #24324a;
}
[data-theme="dark"] .mobile-portal-card:hover {
    background: #1a253c;
    border-color: var(--primary);
}
[data-theme="dark"] .mobile-portal-card .text-dark {
    color: #f1f5f9 !important;
}
