/* ========================================
   MAIN CONTENT
   ======================================== */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    position: relative;
    z-index: 1;
    padding-bottom: 60px;
}

.view-section.active > header + section,
.view-section.active > section + section {
    margin-top: 8px;
    padding-top: 24px;
    position: relative;
}

.view-section.active > header + section::before,
.view-section.active > section + section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 32px;
    right: 32px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--divider-soft), transparent);
}

/* ---------- HERO ---------- */
.hero-section {
    padding: 50px 44px 30px;
    position: relative;
    overflow: hidden;
}

.hero-section::after {
    content: "";
    position: absolute;
    top: -80px;
    right: -80px;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 18px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.04));
    border: 1px solid rgba(16, 185, 129, 0.18);
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--emerald-700);
    margin-bottom: 18px;
    animation: fadeInUp 0.6s ease-out;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.08);
}

.hero-badge i {
    color: var(--emerald-500);
}

h1 {
    font-family: "Poppins", sans-serif;
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.15;
    color: var(--text-primary);
    margin-bottom: 12px;
    animation: fadeInUp 0.6s ease-out 0.1s both;
    letter-spacing: -0.5px;
}

.gold-text {
    background: linear-gradient(135deg, var(--emerald-500) 0%, var(--emerald-600) 50%, var(--emerald-700) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    animation: fadeInUp 0.6s ease-out 0.2s both;
    font-weight: 400;
}

.hero-programs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.program-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: var(--surface-elevated);
    border: 1px solid var(--divider-soft);
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--emerald-700);
    transition: var(--transition-base);
    box-shadow: var(--shadow-float-sm);
}

.program-chip:hover {
    background: rgba(16, 185, 129, 0.05);
    border-color: var(--emerald-400);
    transform: translateY(-3px);
    box-shadow: var(--shadow-float-md);
}

/* ---------- COUNTDOWN ---------- */
.countdown-section {
    margin: 0 32px 32px;
    padding: 36px 40px;
    background: rgba(250, 250, 250, 0.88);
    backdrop-filter: blur(24px) saturate(1.5);
    -webkit-backdrop-filter: blur(24px) saturate(1.5);
    border: 1px solid var(--divider-soft);
    border-radius: var(--radius-2xl);
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: floatIn 0.7s ease-out 0.4s both;
    box-shadow: var(--shadow-float-xl);
}

.countdown-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--emerald-400), var(--emerald-500), transparent);
    border-radius: 3px 3px 0 0;
}

.countdown-section::after {
    content: "";
    position: absolute;
    bottom: -60px;
    right: -60px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.countdown-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--emerald-600);
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.countdown-label i {
    color: var(--emerald-500);
    transition: opacity 0.3s ease;
}

.countdown-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
    padding: 12px 8px;
    background: rgba(16, 185, 129, 0.04);
    border-radius: var(--radius-lg);
    transition: var(--transition-base);
}

.countdown-unit:hover {
    background: rgba(16, 185, 129, 0.07);
    transform: translateY(-2px);
}

.countdown-value {
    font-family: "Poppins", sans-serif;
    font-size: 3.4rem;
    font-weight: 800;
    background: linear-gradient(180deg, var(--emerald-600) 0%, var(--emerald-800) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    letter-spacing: -1px;
}

.countdown-text {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--text-muted);
    margin-top: 6px;
}

.countdown-separator {
    font-family: "Poppins", sans-serif;
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--emerald-400);
    opacity: 0.85;
    animation: countdownSeparatorPulse 2s ease-in-out infinite;
    margin-top: -18px;
}

.countdown-date {
    margin-top: 20px;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}

.countdown-date i {
    color: var(--emerald-500);
    margin-right: 6px;
}

/* ---------- CONTROLS ---------- */
.controls-section {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 20px;
    padding: 0 32px;
    margin-bottom: 32px;
    animation: fadeInUp 0.6s ease-out 0.5s both;
}

.glass-card {
    background: rgba(250, 250, 250, 0.88);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    transform: translateZ(0);
    border: 1px solid var(--divider-soft);
    border-radius: var(--radius-xl);
    padding: 22px 26px;
    transition: var(--transition-base);
    box-shadow: var(--shadow-float-md);
}

.glass-card:hover {
    border-color: rgba(16, 185, 129, 0.2);
    transform: translateY(-3px);
    box-shadow: var(--shadow-float-lg);
}

.toggle-container {
    display: flex;
    align-items: center;
    gap: 14px;
}

.toggle-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.prodi-toggle {
    --toggle-gap: 3px;
    display: flex;
    align-items: stretch;
    position: relative;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    padding: var(--toggle-gap);
    border: 1px solid var(--gray-200);
}

.toggle-btn {
    position: relative;
    z-index: 2;
    padding: 8px 18px;
    border: none;
    background: none;
    font-family: "Poppins", "Inter", sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 6px;
    min-height: 46px;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
    border-radius: 10px;
}

.toggle-btn.active {
    color: var(--white);
}

.toggle-btn i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.toggle-btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
}

.toggle-slider {
    position: absolute;
    top: var(--toggle-gap);
    bottom: var(--toggle-gap);
    left: var(--toggle-gap);
    width: calc(50% - var(--toggle-gap));
    background: linear-gradient(135deg, var(--emerald-500), var(--emerald-600));
    border-radius: 10px;
    transition: var(--transition-slow);
    z-index: 1;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.35);
}

.toggle-slider.right {
    left: calc(50%);
}

.progress-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.progress-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-title i {
    color: var(--emerald-500);
}

.progress-percent {
    font-family: "Poppins", sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--emerald-500), var(--emerald-700));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.progress-bar-wrapper {
    width: 100%;
    height: 10px;
    background: var(--gray-100);
    border-radius: 100px;
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--emerald-400), var(--emerald-500), var(--emerald-600));
    border-radius: 100px;
    transition: width var(--transition-slow);
    position: relative;
}

.progress-bar::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
    animation: shimmer 4s ease-in-out infinite;
    will-change: transform;
}

.progress-detail {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ---------- PREDICTOR ---------- */
.predictor-section {
    margin: 0 32px 32px;
    padding: 32px;
    background: rgba(250, 250, 250, 0.88);
    backdrop-filter: blur(24px) saturate(1.5);
    -webkit-backdrop-filter: blur(24px) saturate(1.5);
    transform: translateZ(0);
    border: 1px solid var(--divider-soft);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-float-lg);
    animation: floatIn 0.6s ease-out 0.55s both;
    position: relative;
    overflow: hidden;
}

.predictor-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--emerald-400), var(--gold), var(--emerald-500), transparent);
    border-radius: 3px 3px 0 0;
}

.predictor-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}

.predictor-title {
    font-family: "Poppins", sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.predictor-subtitle {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.predictor-tiers {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 28px;
}

.predictor-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: var(--surface-elevated);
    border: 1px solid var(--divider-soft);
    border-radius: var(--radius-lg);
    transition: var(--transition-base);
    opacity: 0.55;
}

.predictor-card.active {
    opacity: 1;
    border-color: var(--emerald-400);
}

.key-sub-section {
    padding-top: 20px;
    border-top: 1px solid var(--gray-200);
}

.key-sub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
}

.key-sub-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--surface-elevated);
    border: 1px solid var(--divider-soft);
    border-radius: var(--radius-md);
}

@media (max-width: 1024px) {
    .hero-section {
        padding: 70px 20px 20px;
    }

    h1 {
        font-size: 1.8rem;
    }

    .countdown-section {
        margin: 0 16px 20px;
        padding: 28px 20px;
    }

    .countdown-value {
        font-size: 2.4rem;
    }

    .controls-section {
        grid-template-columns: 1fr;
        padding: 0 16px;
        gap: 14px;
    }

    .toggle-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .predictor-section {
        margin: 0 16px 20px;
        padding: 24px 18px;
    }

    .key-sub-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main-content {
        margin-left: 0;
    }
}

@media (max-width: 640px) {
    h1 {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 0.88rem;
    }

    .countdown-value {
        font-size: 1.8rem;
    }

    .countdown-unit {
        min-width: 55px;
    }

    .countdown-separator {
        font-size: 1.8rem;
    }

    .toggle-btn {
        padding: 8px 12px;
        font-size: 0.78rem;
    }

    .predictor-title {
        font-size: 1.1rem;
    }
}

/* ---------- PREDICTOR DETAIL ---------- */
.predictor-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--emerald-500), var(--emerald-600));
    color: var(--white);
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.predictor-card {
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.predictor-card:hover {
    opacity: 0.75;
    transform: translateY(-1px);
    box-shadow: var(--shadow-float-sm);
}

.predictor-card.active {
    box-shadow:
        0 2px 8px rgba(16, 185, 129, 0.1),
        0 8px 24px rgba(16, 185, 129, 0.08);
    transform: translateY(-2px) scale(1.01);
}

.tier-indicator {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 4px 0 0 4px;
    background: var(--gray-300);
    transition: var(--transition-base);
}

.tier-unggul5 .tier-indicator { background: linear-gradient(180deg, #10b981, #059669); }
.tier-unggul4 .tier-indicator { background: linear-gradient(180deg, #34d399, #10b981); }
.tier-unggul3 .tier-indicator { background: linear-gradient(180deg, #6ee7b7, #34d399); }
.tier-akreditasi .tier-indicator { background: linear-gradient(180deg, #fbbf24, #d97706); }
.tier-tidak .tier-indicator { background: linear-gradient(180deg, #f87171, #ef4444); }

.tier-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.tier-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: var(--gray-100);
    font-size: 1rem;
    flex-shrink: 0;
    transition: var(--transition-base);
}

.tier-unggul5 .tier-badge { color: #059669; background: rgba(16, 185, 129, 0.1); }
.tier-unggul4 .tier-badge { color: #10b981; background: rgba(16, 185, 129, 0.08); }
.tier-unggul3 .tier-badge { color: #34d399; background: rgba(52, 211, 153, 0.1); }
.tier-akreditasi .tier-badge { color: #d97706; background: rgba(245, 158, 11, 0.1); }
.tier-tidak .tier-badge { color: #ef4444; background: rgba(239, 68, 68, 0.08); }

.predictor-card.active .tier-badge { box-shadow: 0 2px 10px rgba(16, 185, 129, 0.2); }
.predictor-card.active.tier-akreditasi .tier-badge { box-shadow: 0 2px 10px rgba(245, 158, 11, 0.2); }
.predictor-card.active.tier-tidak .tier-badge { box-shadow: 0 2px 10px rgba(239, 68, 68, 0.2); }

.tier-info { display: flex; flex-direction: column; }

.tier-name {
    font-family: "Poppins", sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.tier-duration { font-size: 0.75rem; font-weight: 600; color: var(--emerald-600); }
.tier-akreditasi .tier-duration { color: var(--warning); }
.tier-tidak .tier-duration { color: var(--danger); }

.tier-condition {
    flex: 1;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
    padding-left: 8px;
    border-left: 1px solid var(--gray-200);
    margin-left: 4px;
}

.tier-condition strong { color: var(--text-secondary); }

.tier-status-icon {
    display: none;
    font-size: 1.3rem;
    color: var(--emerald-500);
    flex-shrink: 0;
    animation: checkPop 0.4s ease-out;
}

.predictor-card.active .tier-status-icon { display: flex; }
.predictor-card.active.tier-akreditasi .tier-status-icon { color: var(--warning); }
.predictor-card.active.tier-tidak .tier-status-icon { color: var(--danger); }

.predictor-card.active.tier-akreditasi {
    border-color: #fbbf24;
    box-shadow:
        0 2px 8px rgba(245, 158, 11, 0.1),
        0 8px 24px rgba(245, 158, 11, 0.08);
}

.predictor-card.active.tier-tidak {
    border-color: #f87171;
    box-shadow:
        0 2px 8px rgba(239, 68, 68, 0.1),
        0 8px 24px rgba(239, 68, 68, 0.08);
}

.key-sub-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.key-sub-title i {
    color: var(--gold);
    font-size: 0.9rem;
}

.key-sub-item {
    transition: var(--transition-base);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.key-sub-item:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-float-sm);
}

.key-sub-id {
    font-family: "Poppins", sans-serif;
    font-weight: 700;
    font-size: 0.78rem;
    color: var(--emerald-600);
    min-width: 28px;
}

.key-sub-name {
    flex: 1;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1.3;
}

.key-sub-status {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 100px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.key-sub-status.status-memenuhi { background: rgba(16, 185, 129, 0.1); color: #059669; border: 1px solid rgba(16, 185, 129, 0.2); }
.key-sub-status.status-sebagian { background: rgba(245, 158, 11, 0.1); color: #d97706; border: 1px solid rgba(245, 158, 11, 0.2); }
.key-sub-status.status-tidak { background: rgba(239, 68, 68, 0.08); color: #dc2626; border: 1px solid rgba(239, 68, 68, 0.15); }

/* ---------- KRITERIA & TABLE ---------- */
.kriteria-section {
    margin: 0 32px 28px;
    animation: fadeInUp 0.4s ease-out both;
}

.kriteria-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    padding: 18px 22px;
    background: var(--glass-bg-strong);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-float-md);
    transition: var(--transition-base);
}

.kriteria-header:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-float-lg);
}

.kriteria-header::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--emerald-400), var(--emerald-600));
    border-radius: 4px 0 0 4px;
}

.kriteria-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--emerald-500), var(--emerald-600));
    font-family: "Poppins", sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--white);
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.kriteria-title {
    font-family: "Poppins", sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.kriteria-progress {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--emerald-600);
}

.kriteria-progress-ring { width: 36px; height: 36px; }
.kriteria-progress-ring circle { fill: none; stroke-width: 3; }
.kriteria-progress-ring .ring-bg { stroke: var(--gray-200); }

.kriteria-progress-ring .ring-fill {
    stroke: var(--emerald-500);
    stroke-linecap: round;
    transition: stroke-dashoffset var(--transition-slow);
    transform: rotate(-90deg);
    transform-origin: center;
}

.sub-kriteria-card {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(18px) saturate(1.3);
    -webkit-backdrop-filter: blur(18px) saturate(1.3);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: var(--radius-xl);
    margin-bottom: 14px;
    overflow: hidden;
    transition: var(--transition-base);
    box-shadow: var(--shadow-float-sm);
}

.sub-kriteria-card:hover {
    border-color: rgba(16, 185, 129, 0.18);
    transform: translateY(-2px);
    box-shadow: var(--shadow-float-md);
}

.sub-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.3);
    border-bottom: 1px solid rgba(16, 185, 129, 0.06);
    cursor: pointer;
    user-select: none;
    transition: var(--transition-base);
}

.sub-header:hover { background: rgba(16, 185, 129, 0.04); }
.sub-header-left { display: flex; align-items: center; gap: 12px; }
.sub-number { font-family: "Poppins", sans-serif; font-weight: 700; font-size: 0.85rem; color: var(--emerald-600); min-width: 30px; }
.sub-title { font-size: 0.88rem; font-weight: 600; color: var(--text-primary); }

.sub-element-count {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--emerald-600);
    background: rgba(16, 185, 129, 0.08);
    padding: 3px 12px;
    border-radius: 100px;
    white-space: nowrap;
    border: 1px solid rgba(16, 185, 129, 0.12);
}

.sub-header-right { display: flex; align-items: center; gap: 12px; }
.sub-toggle-icon { color: var(--text-muted); font-size: 0.8rem; transition: transform var(--transition-base); }
.sub-kriteria-card.expanded .sub-toggle-icon { transform: rotate(180deg); }

.element-table-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sub-kriteria-card.expanded .element-table-wrapper { max-height: 2000px; }
#view-spmi .spmi-glass-card .element-table-wrapper { max-height: none; overflow: visible; }

#view-spmi .element-table thead th:nth-child(1) { width: 50px; text-align: center; }
#view-spmi .element-table thead th:nth-child(2) { min-width: 180px; }
#view-spmi .element-table thead th:nth-child(3) { min-width: 220px; }
#view-spmi .element-table thead th:nth-child(4) { min-width: 140px; }
#view-spmi .element-table thead th:nth-child(5) { min-width: 200px; }

.element-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.element-table thead th {
    padding: 10px 14px;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    background: rgba(16, 185, 129, 0.04);
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap;
}

.element-table thead th:first-child { width: 50px; text-align: center; }
.element-table thead th:nth-child(2) { min-width: 200px; }
.element-table thead th:nth-child(3) { width: 80px; text-align: center; }
.element-table thead th:nth-child(4) { min-width: 240px; }
.element-table thead th:nth-child(5) { min-width: 160px; }
.element-table thead th:nth-child(6) { min-width: 260px; }

.element-table tbody tr {
    border-bottom: 1px solid rgba(16, 185, 129, 0.06);
    transition: var(--transition-fast);
}

.element-table tbody tr:hover {
    background: rgba(16, 185, 129, 0.08);
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.05);
}

.element-table tbody tr.completed { background: rgba(16, 185, 129, 0.04); }
.element-table tbody td { padding: 10px 14px; color: var(--text-secondary); vertical-align: middle; }

.element-table tbody td:first-child {
    text-align: center;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-family: "Inter", Courier, monospace;
    font-variant-numeric: tabular-nums;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 100px;
    white-space: nowrap;
}

.status-indicator .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    position: relative;
}

.status-indicator.active { background: rgba(16, 185, 129, 0.1); color: var(--emerald-600); }
.status-indicator.active .dot { background: var(--emerald-500); }

.status-indicator.active .dot::after {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: var(--emerald-400);
    opacity: 0.4;
    animation: none;
}

.status-indicator.inactive { background: rgba(148, 163, 184, 0.1); color: var(--text-muted); }
.status-indicator.inactive .dot { background: var(--text-muted); }

.verify-cell {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.verify-top-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.verify-status-input {
    min-width: 130px;
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 10px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
}

.verify-status-input:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.verify-pill {
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}

.verify-pill.verify-draft {
    background: rgba(148, 163, 184, 0.14);
    color: #64748b;
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.verify-pill.verify-diverifikasi {
    background: rgba(16, 185, 129, 0.14);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.verify-pill.verify-revisi {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.verify-summary {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.verify-notes-input {
    width: 100%;
    min-height: 34px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 0.76rem;
    background: rgba(255, 255, 255, 0.82);
    color: var(--text-secondary);
    resize: vertical;
}

.verify-notes-input[readonly] {
    opacity: 0.8;
}

/* ---------- ADMIN MONITORING ---------- */
.admin-monitoring-card {
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-xl);
    padding: 28px;
    box-shadow: var(--shadow-float-md);
}

.admin-monitoring-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.deadline-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
}

.deadline-inline i {
    color: var(--emerald-600);
}

.realtime-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--emerald-700);
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.realtime-sidebar-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 10px 18px 0;
}

.realtime-pill-sidebar {
    flex: 1;
    margin: 0;
    padding: 4px 10px;
    font-size: 0.65rem;
    min-width: 0;
    justify-content: center;
}

.btn-refresh-sidebar {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: var(--radius-md);
    background: rgba(16, 185, 129, 0.06);
    color: var(--emerald-600);
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.btn-refresh-sidebar:hover {
    background: rgba(16, 185, 129, 0.12);
}

.btn-refresh-sidebar:active {
    transform: scale(0.95);
    color: var(--emerald-700);
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.realtime-pill.state-connected {
    color: var(--emerald-700);
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.25);
}

.realtime-pill.state-connecting,
.realtime-pill.state-reconnecting {
    color: #92400e;
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.28);
}

.realtime-pill.state-fallback {
    color: #1d4ed8;
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.3);
}

.realtime-pill.state-offline {
    color: #475569;
    background: rgba(148, 163, 184, 0.14);
    border-color: rgba(148, 163, 184, 0.3);
}

.admin-progress-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.admin-progress-card {
    background: var(--surface-elevated);
    border: 1px solid var(--divider-soft);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.admin-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.admin-progress-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--emerald-800);
    font-weight: 700;
}

.admin-progress-percent {
    margin: 8px 0 6px;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--emerald-700);
    line-height: 1;
}

.admin-progress-bar-wrap {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
}

.admin-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--emerald-400), var(--emerald-600));
    transition: width var(--transition-slow);
}

.admin-progress-detail {
    margin-top: 8px;
    margin-bottom: 12px;
    font-size: 0.76rem;
    color: var(--text-muted);
}

.critical-badge,
.safe-badge {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.critical-badge {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.28);
    color: #dc2626;
}

.safe-badge {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #047857;
}

.admin-detail-btn {
    width: 100%;
    justify-content: center;
}

.admin-kriteria-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.admin-kriteria-card {
    background: var(--surface-elevated);
    border: 1px solid var(--divider-soft);
    border-radius: var(--radius-md);
    padding: 14px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.admin-kriteria-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.admin-kriteria-compare {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.admin-kriteria-col {
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    padding: 10px;
}

.admin-kriteria-col-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 600;
}

.admin-kriteria-col-sub {
    margin-top: 6px;
    font-size: 0.74rem;
    color: var(--text-muted);
}

.admin-kriteria-status {
    margin-top: 7px;
    font-size: 0.7rem;
    font-weight: 700;
}

.admin-kriteria-col.status-complete {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.25);
}

.admin-kriteria-col.status-complete .admin-kriteria-status {
    color: #047857;
}

.admin-kriteria-col.status-progress {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.3);
}

.admin-kriteria-col.status-progress .admin-kriteria-status {
    color: #b45309;
}

.admin-kriteria-col.status-empty {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.22);
}

.admin-kriteria-col.status-empty .admin-kriteria-status {
    color: #b91c1c;
}

.admin-missing-panel {
    background: rgba(16, 185, 129, 0.03);
    border: 1px dashed rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-md);
    padding: 14px;
}

.admin-missing-placeholder {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.admin-missing-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.admin-missing-head h3 {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.admin-missing-list {
    display: grid;
    gap: 8px;
}

.admin-missing-item {
    background: var(--surface-elevated);
    border: 1px solid var(--divider-soft);
    border-radius: 10px;
    padding: 10px;
}

.admin-missing-item-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.admin-missing-item-count {
    margin-top: 4px;
    font-size: 0.72rem;
    color: #b45309;
    font-weight: 600;
}

.admin-missing-empty {
    font-size: 0.8rem;
    color: #047857;
    font-weight: 600;
}

/* ---------- SPMI ---------- */
.spmi-section { margin: 0 30px 28px; }

.spmi-section + .spmi-section {
    padding-top: 18px;
    border-top: 1px solid var(--divider-soft);
}

.spmi-glass-card {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 20px;
    padding: 30px;
    box-shadow:
        0 20px 40px rgba(5, 47, 32, 0.05),
        inset 0 0 0 1px rgba(16, 185, 129, 0.1);
    position: relative;
    overflow: hidden;
}

.spmi-glass-card::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(80, 200, 120, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.spmi-header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }

.spmi-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--emerald-400), var(--emerald-600));
    color: var(--white);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.25);
}

.spmi-title { font-family: "Poppins", sans-serif; font-size: 1.4rem; font-weight: 700; color: var(--emerald-800); margin: 0 0 4px 0; }
.spmi-subtitle { font-size: 0.85rem; color: var(--emerald-600); margin: 0; }
.spmi-card-body { margin-top: 20px; }
.spmi-input-group { display: flex; gap: 12px; align-items: center; }
.spmi-input-group .link-input { flex: 1; margin-bottom: 0; }
.spmi-table { width: 100%; }
.spmi-table th { background: rgba(16, 185, 129, 0.08); }
.spmi-category-name { font-weight: 600; color: var(--emerald-800) !important; }
.spmi-input { background: rgba(255, 255, 255, 0.7); border: 1px solid rgba(16, 185, 129, 0.2); }
.spmi-input:focus { background: var(--white); border-color: var(--emerald-500); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15); }
.spmi-action-cell { text-align: right; width: 140px; }

#view-sarpras #sarpras-inventaris {
    margin: 0 30px 28px;
}

.sarpras-section {
    margin: 0 0 16px;
}

.spmi-item-title {
    margin: 18px 0 10px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--emerald-800);
}

.spmi-item-list {
    margin: 0;
    padding-left: 20px;
}

.spmi-item-list li {
    margin-bottom: 8px;
    color: var(--text-primary);
    line-height: 1.55;
}

.btn-buka-link {
    background: #052F20;
    color: var(--white);
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(5, 47, 32, 0.2);
}

.btn-buka-link:hover {
    background: #0a4d36;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(5, 47, 32, 0.3);
}

.btn-buka-link:active { transform: translateY(0); }

/* Pulse halus countdown (tanpa kedip keras) */
@keyframes countdownSeparatorPulse {
    0%, 100% { opacity: 0.95; }
    50% { opacity: 1; }
}

@keyframes ping {
    75%, 100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

@media (max-width: 1024px) {
    .admin-progress-grid {
        grid-template-columns: 1fr;
    }

    .admin-kriteria-compare {
        grid-template-columns: 1fr;
    }

    .admin-missing-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .predictor-card { flex-wrap: wrap; gap: 10px; }
    .tier-condition {
        border-left: none;
        padding-left: 0;
        margin-left: 0;
        width: 100%;
        padding-top: 4px;
    }

    .kriteria-section { margin: 0 16px 20px; }
    .kriteria-header { padding: 14px 16px; }
    .kriteria-title { font-size: 1rem; }
    .element-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

    .spmi-section { margin: 0 16px 22px; }
    .spmi-section + .spmi-section { padding-top: 14px; }
    #view-sarpras #sarpras-inventaris { margin: 0 16px 22px; }
    .sarpras-section { margin: 0 0 14px; }

    .spmi-glass-card,
    .admin-monitoring-card,
    .admin-table-card {
        padding: 22px 18px;
    }

    .spmi-input-group {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .btn-buka-link {
        width: 100%;
        min-height: 44px;
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .sub-header { flex-wrap: wrap; gap: 8px; }
    .sub-header-right { width: 100%; justify-content: flex-end; }

    .spmi-section { margin: 0 12px 18px; }
    .spmi-section + .spmi-section { padding-top: 12px; }
    #view-sarpras #sarpras-inventaris { margin: 0 12px 18px; }
    .sarpras-section { margin: 0 0 12px; }

    .spmi-glass-card,
    .admin-monitoring-card,
    .admin-table-card {
        border-radius: 16px;
        padding: 16px 14px;
    }

    .spmi-header {
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 16px;
    }

    .admin-monitoring-meta,
    .admin-missing-head {
        gap: 12px;
    }

    .admin-progress-grid,
    .admin-kriteria-grid,
    .admin-missing-list {
        gap: 12px;
    }

    .admin-progress-card,
    .admin-kriteria-card,
    .admin-missing-item {
        padding: 12px;
    }

    .btn-buka-link {
        min-height: 44px;
        padding: 10px 14px;
        font-size: 0.84rem;
    }
}
