/**
 * GarudaCBT - Theme: Emerald Clean (Minimalist Modern Light Edition)
 * Primary: Bottle Green (#0f5132), Accent: Emerald (#10b981), Pure Light Canvas (#f8fafc)
 */

:root {
    --emerald-bg: #f8fafc;
    --emerald-sidebar: #ffffff;
    --emerald-card: #ffffff;
    --emerald-border: #e2e8f0;
    --emerald-primary: #0f5132;
    --emerald-accent: #10b981;
    --emerald-soft: #ecfdf5;
    --emerald-text: #1e293b;
    --emerald-text-muted: #64748b;
}

/* Global Layout & Body */
body.theme-emerald,
.theme-emerald .wrapper {
    background-color: var(--emerald-bg) !important;
    color: var(--emerald-text) !important;
}

.theme-emerald .content-wrapper {
    background-color: var(--emerald-bg) !important;
    color: var(--emerald-text) !important;
}

/* Main Top Navbar */
.theme-emerald .main-header.navbar {
    background: #ffffff !important;
    border-bottom: 1px solid var(--emerald-border) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

.theme-emerald .main-header .nav-link,
.theme-emerald .main-header .navbar-nav .nav-link {
    color: var(--emerald-text) !important;
}

.theme-emerald .main-header .nav-link:hover {
    color: var(--emerald-primary) !important;
}

/* Brand Logo Header */
.theme-emerald .brand-link {
    background-color: #ffffff !important;
    border-bottom: 1px solid var(--emerald-border) !important;
    color: var(--emerald-primary) !important;
    font-weight: 700;
}

.theme-emerald .brand-link .brand-text {
    color: var(--emerald-primary) !important;
}

/* Emerald Light Sidebar */
.theme-emerald .main-sidebar,
.theme-emerald .main-sidebar .sidebar {
    background-color: var(--emerald-sidebar) !important;
    border-right: 1px solid var(--emerald-border) !important;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.03) !important;
}

.theme-emerald .sidebar .user-panel {
    border-bottom: 1px solid var(--emerald-border) !important;
}

.theme-emerald .sidebar .user-panel .info a {
    color: var(--emerald-text) !important;
    font-weight: 600;
}

.theme-emerald .sidebar .nav-sidebar .nav-header {
    color: var(--emerald-text-muted) !important;
    font-size: 0.72rem !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    font-weight: 700 !important;
}

.theme-emerald .sidebar .nav-sidebar .nav-link {
    color: var(--emerald-text-muted) !important;
    border-radius: 8px !important;
    margin: 2px 8px !important;
    transition: all 0.2s ease !important;
}

.theme-emerald .sidebar .nav-sidebar .nav-link:hover {
    background-color: var(--emerald-soft) !important;
    color: var(--emerald-primary) !important;
}

.theme-emerald .sidebar .nav-sidebar .nav-link.active,
.theme-emerald .sidebar .nav-sidebar .nav-item.menu-open > .nav-link {
    background: linear-gradient(135deg, #0f5132 0%, #10b981 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(15, 81, 50, 0.25) !important;
    border-radius: 20px !important; /* Capsule / Pill menu item */
    font-weight: 600 !important;
}

.theme-emerald .sidebar .nav-sidebar .nav-link.active i {
    color: #ffffff !important;
}

/* Emerald Treeview Submenus */
.theme-emerald .sidebar .nav-sidebar .nav-treeview {
    background-color: #f1f5f9 !important;
    border-radius: 10px !important;
    margin: 4px 6px 8px 6px !important;
    padding: 6px 0 !important;
    border-left: 2px solid var(--emerald-primary) !important;
}

.theme-emerald .sidebar .nav-sidebar .nav-treeview > .nav-item > .nav-link,
.theme-emerald .sidebar .nav-sidebar .nav-treeview .nav-link {
    color: #334155 !important;
    font-size: 0.88rem !important;
    padding: 6px 12px 6px 14px !important;
    margin: 2px 6px !important;
    font-weight: 500 !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}

.theme-emerald .sidebar .nav-sidebar .nav-treeview > .nav-item > .nav-link .nav-icon,
.theme-emerald .sidebar .nav-sidebar .nav-treeview .nav-link .nav-icon,
.theme-emerald .sidebar .nav-sidebar .nav-treeview .nav-link i {
    color: var(--emerald-primary) !important;
    font-size: 0.85rem !important;
    margin-right: 8px !important;
}

.theme-emerald .sidebar .nav-sidebar .nav-treeview > .nav-item > .nav-link:hover,
.theme-emerald .sidebar .nav-sidebar .nav-treeview .nav-link:hover {
    background-color: var(--emerald-soft) !important;
    color: var(--emerald-primary) !important;
}

.theme-emerald .sidebar .nav-sidebar .nav-treeview > .nav-item > .nav-link.active,
.theme-emerald .sidebar .nav-sidebar .nav-treeview .nav-link.active {
    background: linear-gradient(135deg, #0f5132 0%, #10b981 100%) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
}

.theme-emerald .sidebar .nav-sidebar .nav-treeview > .nav-item > .nav-link.active p,
.theme-emerald .sidebar .nav-sidebar .nav-treeview .nav-link.active p,
.theme-emerald .sidebar .nav-sidebar .nav-treeview > .nav-item > .nav-link.active .nav-icon,
.theme-emerald .sidebar .nav-sidebar .nav-treeview .nav-link.active .nav-icon {
    color: #ffffff !important;
}

/* In-Page Sub-Menu Tabs (Kontrol Keamanan, Guru Profile, etc.) */
.theme-emerald .card-teal.card-tabs:not(.card-outline) > .card-header {
    background: linear-gradient(90deg, #0f5132 0%, #10b981 100%) !important;
    border-bottom: 2px solid var(--emerald-primary) !important;
}

.theme-emerald .card-teal.card-tabs:not(.card-outline) > .card-header .nav-link {
    color: rgba(255, 255, 255, 0.88) !important;
    font-weight: 600 !important;
    border-radius: 8px 8px 0 0 !important;
    margin-right: 4px !important;
}

.theme-emerald .card-teal.card-tabs:not(.card-outline) > .card-header .nav-link.active {
    background-color: #ffffff !important;
    color: var(--emerald-primary) !important;
    font-weight: 700 !important;
}

.theme-emerald .nav-tabs .nav-link {
    color: #475569 !important;
    font-weight: 600 !important;
    border-radius: 8px 8px 0 0 !important;
}

.theme-emerald .nav-tabs .nav-link.active {
    color: var(--emerald-primary) !important;
    border-top: 3px solid var(--emerald-primary) !important;
    font-weight: 700 !important;
}

/* Cards & Widgets */
.theme-emerald .card {
    background-color: var(--emerald-card) !important;
    border: 1px solid var(--emerald-border) !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    color: var(--emerald-text) !important;
    margin-bottom: 1.5rem !important;
}

.theme-emerald .card-header {
    background-color: #ffffff !important;
    border-bottom: 1px solid var(--emerald-border) !important;
    color: var(--emerald-text) !important;
    font-weight: 600 !important;
}

.theme-emerald .card-title {
    color: var(--emerald-primary) !important;
    font-weight: 700 !important;
}

/* Info Box / KPI Cards */
.theme-emerald .info-box {
    background-color: var(--emerald-card) !important;
    border: 1px solid var(--emerald-border) !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

.theme-emerald .info-box .info-box-number {
    color: var(--emerald-primary) !important;
    font-size: 1.6rem !important;
    font-weight: 700 !important;
}

/* Buttons */
.theme-emerald .btn-primary {
    background-color: var(--emerald-primary) !important;
    border-color: var(--emerald-primary) !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 6px rgba(15, 81, 50, 0.2) !important;
}

.theme-emerald .btn-primary:hover {
    background-color: #0b4027 !important;
    border-color: #0b4027 !important;
}

.theme-emerald .btn-success {
    background-color: var(--emerald-accent) !important;
    border-color: var(--emerald-accent) !important;
    color: #ffffff !important;
}

/* Tables */
.theme-emerald .table thead th {
    background-color: #f1f5f9 !important;
    color: var(--emerald-primary) !important;
    border-bottom: 2px solid var(--emerald-border) !important;
    font-weight: 700 !important;
}

/* Modals */
.theme-emerald .modal-content {
    border-radius: 14px !important;
    border: 1px solid var(--emerald-border) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
}

/* CBT Exam in Emerald Clean */
.theme-emerald #nomor-soal {
    background-color: var(--emerald-primary) !important;
}

.theme-emerald #timer {
    color: var(--emerald-primary) !important;
    font-variant-numeric: tabular-nums !important;
}

.theme-emerald .pilihan-opsi,
.theme-emerald .opsi-item {
    border: 1px solid var(--emerald-border) !important;
    border-radius: 10px !important;
}

.theme-emerald .pilihan-opsi:hover,
.theme-emerald .opsi-item:hover {
    border-color: var(--emerald-accent) !important;
    background-color: var(--emerald-soft) !important;
}

.theme-emerald .opsi-selected,
.theme-emerald .pilihan-opsi.selected {
    background-color: var(--emerald-soft) !important;
    border: 2px solid var(--emerald-accent) !important;
}

/* Preservation for Arabic & KaTeX */
.theme-emerald .soal-arab,
.theme-emerald [dir="rtl"],
.theme-emerald .arabic-text {
    font-family: 'Traditional Arabic', 'Amiri', 'Scheherazade', serif !important;
    font-size: 1.45rem !important;
    line-height: 2 !important;
    direction: rtl !important;
    text-align: right !important;
}
