/**
 * SIM PPDM - Tema Resmi: Hijau Jamrud, Emas, Putih
 * Gunakan di semua halaman untuk konsistensi branding & mobile-friendly.
 */
:root {
    --emerald-dark: #064e3b;
    --emerald: #10b981;
    --emerald-light: #059669;
    --gold: #fbbf24;
    --gold-dark: #d97706;
    --white: #ffffff;
    --gray-bg: #f3f4f6;
}

/* Navbar & header */
.bg-theme {
    background: linear-gradient(135deg, var(--emerald-dark) 0%, #047857 100%);
}

.text-emerald { color: var(--emerald-light) !important; }
.text-gold { color: var(--gold-dark) !important; }

/* Body default */
body { background-color: var(--gray-bg); }

/* Mobile-friendly: touch & viewport */
@media (max-width: 991.98px) {
    .navbar-collapse { padding-top: 0.5rem; }
    .navbar-brand img { max-height: 36px; }
}

@media (max-width: 575.98px) {
    .container { padding-left: 0.75rem; padding-right: 0.75rem; }
}

/* Utilitas tombol tema */
.btn-theme {
    background: linear-gradient(135deg, var(--emerald-dark) 0%, #047857 100%);
    border: none;
    color: var(--white);
}
.btn-theme:hover { color: var(--white); opacity: 0.95; }

/* Card & focus konsisten dengan tema */
.form-control:focus, .form-select:focus {
    border-color: var(--emerald);
    box-shadow: 0 0 0 0.2rem rgba(16, 185, 129, 0.25);
}

.table-responsive { -webkit-overflow-scrolling: touch; }

/* ── Dashboard-specific styles ─────────────────────────────────── */

.text-orange { color: #fd7e14 !important; }
.bg-orange { background-color: #fd7e14 !important; color: white; }

.score-circle {
    width: 55px; height: 55px; background: white; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; font-weight: 800; border: 3px solid; flex-shrink: 0;
}
.score-circle.final {
    width: 80px; height: 80px; font-size: 1.8rem;
    border-width: 4px; box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

.section-title {
    font-size: 0.85rem; font-weight: 700; color: #4b5563;
    text-transform: uppercase; margin: 25px 0 10px;
    border-bottom: 2px solid #e5e7eb; padding-bottom: 5px; letter-spacing: 0.5px;
}
.alert-consequence {
    font-size: 0.85rem; background-color: #fff5f5;
    border-left: 3px solid #dc3545; padding: 8px 12px;
    margin-top: 8px; border-radius: 4px; color: #842029;
}

.stat-card { transition: transform 0.2s; cursor: pointer; }
.stat-card:hover { transform: translateY(-5px); box-shadow: 0 .5rem 1rem rgba(0,0,0,.15) !important; }

.simulation-banner {
    background-color: #fff3cd; color: #856404;
    border-bottom: 1px solid #ffeeba; text-align: center;
    padding: 8px; font-weight: bold; font-size: 0.9rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.impersonate-banner {
    background-color: #f8d7da; color: #842029;
    border-bottom: 1px solid #f5c2c7; text-align: center;
    padding: 10px; font-weight: bold; font-size: 0.9rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.menu-card {
    transition: all 0.3s ease; border: none; border-radius: 12px;
    background: white; text-decoration: none; color: inherit;
    position: relative; min-height: 85px; display: flex;
    align-items: center; overflow: visible;
}
.menu-card:hover { transform: translateY(-4px); box-shadow: 0 10px 20px rgba(0,0,0,0.08) !important; }
.icon-box {
    width: 42px; height: 42px; display: flex; align-items: center;
    justify-content: center; border-radius: 10px; font-size: 1.25rem; flex-shrink: 0;
}
.menu-text-wrap {
    display: flex; flex-direction: column; justify-content: center;
    overflow: hidden; width: 100%;
}
.menu-title {
    font-size: 0.85rem; font-weight: 700; color: #374151; margin-bottom: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.menu-desc {
    font-size: 0.65rem; color: #6b7280;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.feed-item { transition: background-color 0.2s ease; border-bottom: 1px solid #f3f4f6; }
.feed-item:hover { background-color: #f8fafc; }
.feed-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background-color: #e5e7eb; display: flex; align-items: center;
    justify-content: center; color: #6b7280; font-size: 1rem; flex-shrink: 0;
}

.modern-card {
    border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid #e5e7eb; overflow: hidden;
}
.modern-modal .modal-content {
    border-radius: 16px; border: none;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
}
.form-control-modern { border-radius: 8px; border: 1px solid #d1d5db; padding: 0.6rem 1rem; }

/* Breadcrumb */
.breadcrumb-bar {
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.breadcrumb-bar .breadcrumb {
    font-size: 0.82rem;
    background: transparent;
}
.breadcrumb-bar .breadcrumb-item a {
    color: var(--emerald-light);
    text-decoration: none;
    transition: color 0.15s;
}
.breadcrumb-bar .breadcrumb-item a:hover {
    color: var(--emerald-dark);
    text-decoration: underline;
}
.breadcrumb-bar .breadcrumb-item.active {
    color: #6b7280;
}
.breadcrumb-bar .breadcrumb-item + .breadcrumb-item::before {
    color: #9ca3af;
}

/* DataTables overrides */
.dataTables_wrapper .dataTables_filter { margin-bottom: 15px; }
.dataTables_wrapper .dataTables_filter input {
    border-radius: 8px; border: 1px solid #d1d5db;
    padding: 0.4rem 1rem; margin-left: 0.5rem;
    outline: none; transition: all 0.2s;
}
.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--emerald);
    box-shadow: 0 0 0 0.2rem rgba(16, 185, 129, 0.25);
}
table.dataTable thead th { cursor: pointer; }
