/**
 * ============================================================================
 * KONFIGURASI TEMA, LEBAR KONTEN, & COLOR MODE KPAB GIMBAL
 * ============================================================================
 * Variabel di bawah ini mengatur seluruh website:
 * 1. --site-content-width: Mengatur lebar konten di semua halaman (default 70%).
 * 2. --brand-*: Mengatur palet monotone warna utama (dapat diganti tiap tahun).
 * 3. Bright & Dark Mode: Mengatur adaptasi warna latar, kartu, teks, dan tabel.
 * ============================================================================
 */

:root {
    /* 1. LEBAR KONTEN UTAMA */
    --site-content-width: 70%;

    /* 2. PALET MONOTONE WARNA UTAMA (Tahun ini: Oranye GIMBAL) */
    --brand-50: #fff7ed;
    --brand-100: #ffedd5;
    --brand-200: #fed7aa;
    --brand-300: #fdba74;
    --brand-400: #fb923c;
    --brand-500: #f97316;
    --brand-600: #ea580c;
    /* Warna primer brand logo GIMBAL */
    --brand-700: #c2410c;
    --brand-800: #9a3412;
    --brand-900: #7c2d12;
    --brand-950: #431407;

    /* RGB helper untuk transparansi rgba(...) */
    --brand-500-rgb: 249, 115, 22;
    --brand-600-rgb: 234, 88, 12;
    --brand-700-rgb: 194, 65, 12;
    --brand-800-rgb: 154, 52, 18;
    --brand-900-rgb: 124, 45, 18;
    --brand-950-rgb: 67, 20, 7;

    /* Token Warna Global (Bright Mode Default) */
    --color-bg-body: #fcfcfb;
    --color-bg-card: #ffffff;
    --color-text-main: #1c1917;
    --color-text-sub: #57534e;
    --color-border: #e2e8f0;
}

/* ============================================================================
   KONTEN CONTAINER UNIVERSAL
   Gunakan class ini pada semua kontainer yang harus mengikuti lebar konten utama
   ============================================================================ */
.site-container {
    width: var(--site-content-width, 70%) !important;
    max-width: var(--site-content-width, 70%) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 1rem;
    padding-right: 1rem;
    min-width: 0;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .site-container {
        width: 95% !important;
        max-width: 95% !important;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

@media (min-width: 640px) {
    .site-container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* ============================================================================
   SISTEM TAMPILAN STANDAR (BRIGHT MODE PERMANEN)
   Menjamin mode terang bekerja rapi, kontras tinggi, dan bersih di seluruh halaman
   ============================================================================ */

body {
    background-color: var(--color-bg-body, #fcfcfb);
    color: #0f172a;
}

.bg-white {
    background-color: #ffffff !important;
}

.text-slate-400 {
    color: #64748b !important;
}
.text-stone-400 {
    color: #78716c !important;
}
.text-gray-400 {
    color: #6b7280 !important;
}

/* ============================================================================
   TOP NAVBAR RESMI GIMBAL (BERBASIS WARNA TEMA MONOTONE FLAT - TEKS PUTIH)
   ============================================================================ */
.top-navbar-theme,
nav.top-navbar-theme,
header.top-navbar-theme {
    background: var(--brand-600, #ea580c) !important;
    background-color: var(--brand-600, #ea580c) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.15) !important;
    color: #ffffff !important;
}

/* Hanya elemen top navbar langsung di bar atas (BUKAN di dalam dropdown) yang berwarna putih */
.top-navbar-theme #user-profile-btn,
.top-navbar-theme #user-profile-btn *,
.top-navbar-theme #admin-menu-btn,
.top-navbar-theme #admin-menu-btn *,
.top-navbar-theme #mobile-menu-btn,
.top-navbar-theme #mobile-menu-btn * {
    color: #ffffff !important;
}

/* Pastikan ukuran dan tinggi kedua tombol navbar persis sama */
#admin-menu-btn,
#user-profile-btn {
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    box-sizing: border-box !important;
}

/* ============================================================================
   DROPDOWN MENUS (ADMIN & USER PROFILE): TEKS TERANG, KONTRAS TINGGI, THEME FLAT
   ============================================================================ */
#admin-menu-dropdown,
#user-profile-dropdown {
    background-color: #ffffff !important;
    color: #1e293b !important;
    border: 1px solid #e2e8f0 !important;
}

/* ADMIN & MEMBER NAV ITEM BASE (INACTIVE) */
.admin-nav-item:not(.active),
.member-nav-item:not(.active) {
    color: #334155 !important;
    background-color: transparent !important;
    transition: all 0.15s ease-in-out;
}

.admin-nav-item:not(.active) span,
.member-nav-item:not(.active) p.leading-tight {
    color: #0f172a !important;
    font-weight: 700 !important;
}

.member-nav-item:not(.active) p.opacity-75 {
    color: #64748b !important;
}

.admin-nav-item:not(.active) .nav-icon-box,
.member-nav-item:not(.active) .nav-icon-box {
    background-color: var(--brand-50, #fff7ed) !important;
    color: var(--brand-600, #ea580c) !important;
}

.admin-nav-item:not(.active) .nav-icon-box i,
.member-nav-item:not(.active) .nav-icon-box i {
    color: var(--brand-600, #ea580c) !important;
}

.admin-nav-item:not(.active) .nav-arrow,
.member-nav-item:not(.active) .nav-arrow {
    color: #94a3b8 !important;
}

/* HOVER: Background warna tema lembut, teks & icon warna tema */
.admin-nav-item:not(.active):hover,
.member-nav-item:not(.active):hover {
    background-color: var(--brand-50, #fff7ed) !important;
}

.admin-nav-item:not(.active):hover *,
.member-nav-item:not(.active):hover * {
    color: var(--brand-600, #ea580c) !important;
}

.admin-nav-item:not(.active):hover .nav-icon-box,
.member-nav-item:not(.active):hover .nav-icon-box {
    background-color: var(--brand-100, #ffedd5) !important;
}

/* SELECTED / ACTIVE: Background flat warna tema utama, SEMUA TEKS PUTIH TAJAM */
.admin-nav-item.active,
.admin-nav-item.bg-orange-600,
.member-nav-item.active,
.member-nav-item.bg-orange-600 {
    background-color: var(--brand-600, #ea580c) !important;
    background: var(--brand-600, #ea580c) !important;
    color: #ffffff !important;
}

.admin-nav-item.active *,
.admin-nav-item.bg-orange-600 *,
.member-nav-item.active *,
.member-nav-item.bg-orange-600 * {
    color: #ffffff !important;
}

.admin-nav-item.active .nav-icon-box,
.admin-nav-item.bg-orange-600 .nav-icon-box,
.member-nav-item.active .nav-icon-box,
.member-nav-item.bg-orange-600 .nav-icon-box {
    background-color: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
}

.admin-nav-item.active .nav-icon-box i,
.admin-nav-item.bg-orange-600 .nav-icon-box i,
.member-nav-item.active .nav-icon-box i,
.member-nav-item.bg-orange-600 .nav-icon-box i {
    color: #ffffff !important;
}

.admin-nav-item.active .nav-arrow,
.admin-nav-item.bg-orange-600 .nav-arrow,
.member-nav-item.active .nav-arrow,
.member-nav-item.bg-orange-600 .nav-arrow {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* ============================================================================
   KOMPONEN DROPDOWN & SIDEBAR SESUAI WARNA UTAMA TEMA
   ============================================================================ */

/* 1. Header Identitas Profil Pengguna di Dropdown (Warna Utama Tema - Teks Putih) */
.theme-profile-header-card {
    background: var(--brand-600, #ea580c) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    box-shadow: 0 4px 16px -2px rgba(var(--brand-600-rgb, 234, 88, 12), 0.35) !important;
}

.theme-profile-header-card,
.theme-profile-header-card *,
.theme-profile-header-card p,
.theme-profile-header-card span:not(.badge-admin),
.theme-profile-header-card div {
    color: #ffffff !important;
}

.theme-profile-header-card .badge-admin {
    background-color: #ffffff !important;
    color: var(--brand-700, #c2410c) !important;
}

/* 2. Tombol Kelola Profil & Akun Hub (Teks Terbaca Jelas & Kontras Tinggi) */
.theme-account-hub-btn {
    background-color: var(--brand-50, #fff7ed) !important;
    border: 1px solid var(--brand-200, #fed7aa) !important;
    color: var(--brand-900, #7c2d12) !important;
}

.theme-account-hub-btn,
.theme-account-hub-btn *,
.theme-account-hub-btn span {
    color: var(--brand-900, #7c2d12) !important;
}

.theme-account-hub-btn i {
    color: var(--brand-600, #ea580c) !important;
}

.theme-account-hub-btn:hover {
    background-color: var(--brand-100, #ffedd5) !important;
    border-color: var(--brand-400, #fb923c) !important;
}

.theme-account-hub-btn:hover,
.theme-account-hub-btn:hover *,
.theme-account-hub-btn:hover span {
    color: var(--brand-950, #431407) !important;
}

/* Jaminan ID-scoped untuk kontras maksimal di dropdown */
#user-profile-dropdown .theme-account-hub-btn,
#user-profile-dropdown .theme-account-hub-btn *,
#user-profile-dropdown .theme-account-hub-btn span {
    color: #7c2d12 !important;
}

#user-profile-dropdown .theme-account-hub-btn i {
    color: #ea580c !important;
}

#user-profile-dropdown .member-nav-item.active,
#user-profile-dropdown .member-nav-item.active *,
#user-profile-dropdown .member-nav-item.active p,
#user-profile-dropdown .member-nav-item.active span,
#admin-menu-dropdown .admin-nav-item.active,
#admin-menu-dropdown .admin-nav-item.active *,
#admin-menu-dropdown .admin-nav-item.active span {
    color: #ffffff !important;
}

/* 3. Kotak Simulasi Peran Dev Mode (Aksen Warna Tema) */
.theme-dev-role-box {
    background-color: var(--brand-50, #fff7ed) !important;
    border: 1.5px solid var(--brand-200, #fed7aa) !important;
}

.theme-dev-role-box .role-title {
    color: var(--brand-800, #9a3412) !important;
}

.theme-dev-role-box a {
    color: #334155 !important;
}

.theme-dev-role-box a:hover {
    background-color: #ffffff !important;
    color: var(--brand-600, #ea580c) !important;
}

.theme-dev-role-box a.active-role {
    background-color: rgba(var(--brand-500-rgb, 249, 115, 22), 0.18) !important;
    color: var(--brand-900, #7c2d12) !important;
    font-weight: 800 !important;
}

/* 4. Kotak Mode Sistem (Sidebar Kiri Admin) */
.theme-system-mode-box {
    background-color: var(--brand-50, #fff7ed) !important;
    border: 1.5px solid var(--brand-200, #fed7aa) !important;
}

.theme-system-mode-box .mode-title {
    color: var(--brand-900, #7c2d12) !important;
}

.theme-system-mode-box .mode-sub {
    color: var(--brand-700, #c2410c) !important;
}

/* Menu Navigasi Sidebar Admin (Kontras Tinggi Sempurna) */
.admin-nav-item:not(.active) {
    color: #334155 !important; /* Slate 700 gelap dan tegas di mode terang */
    background-color: transparent !important;
}

.admin-nav-item:not(.active) i,
.admin-nav-item:not(.active) span {
    color: #334155 !important;
}

.admin-nav-item:not(.active):hover {
    color: var(--brand-600) !important;
    background-color: rgba(var(--brand-500-rgb), 0.12) !important;
}

.admin-nav-item:not(.active):hover i,
.admin-nav-item:not(.active):hover span {
    color: var(--brand-600) !important;
}

/* ============================================================================
   KOMPONEN KHUSUS BERBASIS TEMA MONOTONE DINAMIS
   ============================================================================ */

/* Hero Overlay Sinematik (Mengikuti Monotone Brand Tahunan Aktif & Gambar AI Dinamis Event) */
.hero-overlay {
    background: linear-gradient(180deg,
            rgba(10, 14, 22, 0.35) 0%,
            rgba(10, 14, 22, 0.15) 35%,
            rgba(10, 14, 22, 0.40) 75%,
            rgba(10, 14, 22, 0.82) 100%),
        var(--hero-bg-url, url('/static/pics/cartoon/hero.jpg'));
    background-size: cover;
    background-position: center;
    transition: background 0.5s ease-in-out;
}

/* Section Call To Action (Mengikuti Monotone Brand Aktif) */
.cta-theme-section {
    background: radial-gradient(circle at 50% 25%, var(--brand-700) 0%, transparent 65%),
                linear-gradient(135deg, 
                    var(--brand-950) 0%, 
                    var(--brand-900) 50%, 
                    #070a0f 100%) !important;
}

/* Section Piagam Kode Etik */
.kode-etik-section {
    background: radial-gradient(circle at center, 
            var(--brand-900) 0%, 
            #070a0f 100%) !important;
}

.piagam-border {
    border: 2px solid var(--brand-500) !important;
    background: radial-gradient(circle at center, 
            var(--brand-950), 
            #070a0f) !important;
}

/* Footer Komunitas (Mengikuti Monotone Brand Aktif - Lighter Warm Tone) */
.footer-theme-bg {
    background: linear-gradient(180deg, 
            var(--brand-900, #7c2d12) 0%, 
            var(--brand-950, #431407) 100%) !important;
    border-top: 2px solid var(--brand-600, #ea580c) !important;
}

/* Kartu Tanda Anggota (KTA) Digital: FLAT WARNA TEMA UTAMA TANPA GRADIENT */
.kta-card {
    background: var(--brand-600, #ea580c) !important;
    background-color: var(--brand-600, #ea580c) !important;
    box-shadow: 0 10px 25px -5px rgba(var(--brand-600-rgb, 234, 88, 12), 0.35) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
}

.kta-card h1, .kta-card h2, .kta-card h3, .kta-card p, .kta-card span {
    color: #ffffff !important;
}

/* Hero Banner Dashboard Anggota: FLAT WARNA TEMA UTAMA TANPA GRADIENT */
.member-hero-banner {
    background: var(--brand-600, #ea580c) !important;
    background-color: var(--brand-600, #ea580c) !important;
    color: #ffffff !important;
    box-shadow: 0 10px 25px -5px rgba(var(--brand-600-rgb, 234, 88, 12), 0.3) !important;
}

.member-hero-banner h1, .member-hero-banner h2, .member-hero-banner h3, .member-hero-banner p {
    color: #ffffff !important;
}

/* Tombol & Aksen Universal */
.btn-brand-primary {
    background-color: var(--brand-600);
    color: #ffffff;
    transition: all 0.2s ease-in-out;
}

.btn-brand-primary:hover {
    background-color: var(--brand-700);
}

.text-brand-primary {
    color: var(--brand-600);
}

.bg-brand-primary {
    background-color: var(--brand-600);
}

/* Card Hover Animation Effect */
.card-hover {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-hover:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 30px -10px rgba(var(--brand-700-rgb, 194, 65, 12), 0.25);
}

/* ============================================================================
   TYPOGRAPHY & MARKDOWN CONTENT RENDERING (.prose)
   ============================================================================ */
.prose {
    color: #1e293b;
    line-height: 1.75;
}

.prose h1, .prose h2, .prose h3, .prose h4 {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    color: #0f172a;
    font-weight: 800;
    line-height: 1.3;
}

.prose h1 {
    font-size: 1.75rem;
    margin-top: 1.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f1f5f9;
}

.prose h2 {
    font-size: 1.4rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid #f1f5f9;
}

.prose h3 {
    font-size: 1.15rem;
    color: #9a3412;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.prose h4 {
    font-size: 1rem;
    color: #334155;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.prose p {
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
}

.prose ul {
    list-style-type: disc !important;
    padding-left: 1.5rem !important;
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
}

.prose ol {
    list-style-type: decimal !important;
    padding-left: 1.5rem !important;
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
}

.prose li {
    margin-top: 0.35rem;
    margin-bottom: 0.35rem;
    padding-left: 0.25rem;
}

.prose strong {
    font-weight: 700;
    color: #0f172a;
}

.prose em {
    font-style: italic;
    color: #475569;
}

.prose blockquote {
    border-left: 4px solid var(--brand-500, #f97316);
    padding-left: 1rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
    color: #475569;
    font-style: italic;
    background: #fff7ed;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    border-radius: 0 0.5rem 0.5rem 0;
}

.prose code {
    background-color: #f1f5f9;
    color: #c2410c;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.85em;
    font-family: monospace;
}

.prose pre {
    background-color: #0f172a;
    color: #f8fafc;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.prose pre code {
    background-color: transparent;
    color: inherit;
    padding: 0;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.prose th, .prose td {
    padding: 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
}

.prose th {
    background-color: #f8fafc;
    font-weight: 700;
    text-align: left;
}

.prose hr {
    border: 0;
    border-top: 1px solid #e2e8f0;
    margin: 1.5rem 0;
}