/* --- RESET & GLOBAL STYLE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Aturan Global untuk Seluruh Aplikasi */
* {
    font-family: 'Plus Jakarta Sans', sans-serif;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: #f1f5f9; /* atau warna background glassmorphism Anda */
    color: #1e293b;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Pastikan elemen form, tombol, dan tabel juga ikut berubah */
input, button, select, textarea, table, th, td {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* --- HEADER STYLE --- */
.app-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.app-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.05em;
    background: linear-gradient(to right, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.app-header .version {
    font-size: 1rem;
    vertical-align: super;
    background: rgba(129, 140, 248, 0.2);
    color: #a5b4fc;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-weight: 500;
}

.app-header p {
    color: #94a3b8;
    font-size: 1rem;
}

/* --- GLASS-MORPHISM CARD BASE --- */
.glass-card {
    background: rgba(30, 41, 59, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* --- FORM SECTION --- */
.form-section {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

#irsForm {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #cbd5e1;
}

.form-group input {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

button[type="submit"] {
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.85rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

button[type="submit"]:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}

/* --- LOADING STATUS --- */
.loading-status {
    text-align: center;
    padding: 2rem;
    color: #94a3b8;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    margin: 0 auto 1rem auto;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- ERS SUMMARY CARD --- */
.ers-summary-card {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(30, 41, 59, 0.45) 100%);
}

.ers-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.6);
    border: 4px solid #10b981; /* Warna hijau default, diubah dinamis lewat JS */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.ers-circle span {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
}

.ers-circle small {
    font-size: 0.7rem;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 600;
}

.ers-info h2 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.ers-info p {
    color: #cbd5e1;
    font-size: 0.95rem;
}

/* --- RESULT GRID & TABLES --- */
.result-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .result-grid {
        grid-template-columns: 1fr;
    }
}

.chart-card h3, .index-card h3, .table-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: #94a3b8;
    border-left: 3px solid #6366f1;
    padding-left: 0.75rem;
}

.chart-container {
    position: relative;
    width: 100%;
    height: 320px;
}

.index-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.index-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.index-item:last-child {
    border-bottom: none;
}

.index-item span {
    color: #94a3b8;
    font-size: 0.95rem;
}

.index-item strong {
    color: #f8fafc;
    font-size: 1.1rem;
}

/* --- DATA TABLE --- */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

.data-table th, .data-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table th {
    color: #94a3b8;
    font-weight: 500;
    background: rgba(15, 23, 42, 0.3);
}

.data-table td {
    color: #cbd5e1;
}

/* Badge Kuadran */
.badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-masterpiece { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.badge-giant { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.badge-overdrive { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.badge-dormant { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }