:root {
    --snp-primary: #0f3d6e;
    --snp-secondary: #1e6091;
    --snp-accent: #0d9488;
    --snp-bg: #f4f7fb;
}

html, body {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    background-color: var(--snp-bg);
    font-family: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
    color: #1e293b;
}

.navbar-snp {
    background: linear-gradient(135deg, var(--snp-primary) 0%, var(--snp-secondary) 100%);
    box-shadow: 0 2px 10px rgba(15, 61, 110, 0.2);
}

.kpi-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.09);
}

.kpi-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.card-panel {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

.table-snp th {
    background-color: #f8fafc;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

.table-snp td {
    vertical-align: middle;
    font-size: 0.875rem;
}

.score-pill {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.progress-thin {
    height: 6px;
    border-radius: 999px;
}

.progress-stacked-snp {
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background-color: #e2e8f0;
}

.nav-pills .nav-link.active {
    background-color: var(--snp-primary);
}

.nav-pills .nav-link {
    color: #334155;
    font-weight: 500;
}

.formula-box {
    background-color: #f8fafc;
    border-left: 4px solid var(--snp-secondary);
    padding: 0.85rem 1rem;
    border-radius: 0 8px 8px 0;
    font-size: 0.9rem;
    word-break: break-word;
}

.cursor-pointer {
    cursor: pointer;
}

.clickable-card {
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.clickable-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(15, 61, 110, 0.14) !important;
}

.modal-modern .modal-content {
    border: none;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
}

.modal-header-gradient {
    background: linear-gradient(135deg, #0f3d6e 0%, #1e6091 65%, #0d9488 100%);
    color: #ffffff;
    border-bottom: none;
    padding: 1.25rem 1.5rem;
}

.modal-header-gradient .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.drilldown-stat-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.75rem 1rem;
}

.narrative-card {
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
    border: 1px solid #bfdbfe;
    border-left: 4px solid #1e6091;
    border-radius: 12px;
    padding: 0.95rem 1.15rem;
}

.badge-cat-A { background-color: #15803d; color: #fff; }
.badge-cat-B { background-color: #0369a1; color: #fff; }
.badge-cat-C { background-color: #d97706; color: #fff; }
.badge-cat-D { background-color: #b91c1c; color: #fff; }

/* Persentase SNP Jenjang Card */
.jenjang-stat-card {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.jenjang-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.hero-persentase {
    background: linear-gradient(135deg, #0f3d6e 0%, #1e6091 65%, #0d9488 100%);
    color: #ffffff;
    border-radius: 14px;
    border: none;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.08);
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    padding: 0.35rem 0.25rem calc(0.35rem + env(safe-area-inset-bottom));
}

.mobile-nav-btn {
    flex: 1 1 0;
    min-width: 0;
    border: none;
    background: transparent;
    color: #64748b;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 0.15rem;
    font-size: 0.68rem;
    font-weight: 500;
    border-radius: 8px;
    transition: color 0.15s ease, background-color 0.15s ease;
    text-align: center;
}

.mobile-nav-btn i {
    font-size: 1.15rem;
    line-height: 1.2;
    margin-bottom: 0.15rem;
}

.mobile-nav-btn span {
    display: block;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-nav-btn.active {
    color: var(--snp-primary);
    background-color: rgba(15, 61, 110, 0.08);
    font-weight: 700;
}

@media (max-width: 991.98px) {
    body {
        padding-bottom: 76px;
    }
    .navbar-brand small {
        display: none;
    }
    main.container-fluid {
        padding-left: 0.85rem !important;
        padding-right: 0.85rem !important;
        padding-top: 1rem !important;
    }
    .kpi-card .fs-4 {
        font-size: 1.25rem !important;
    }
}
