:root {
    --primary: #0f766e; /* Teal elegan */
    --primary-hover: #115e59;
    --primary-light: #ccfbf1; /* Soft teal background untuk icon */
    
    --sidebar-bg: #1e293b; /* Slate 800 - Agak diterangkan sedikit dari sebelumnya */
    --sidebar-hover: rgba(255, 255, 255, 0.08);
    
    --bg-main: #f4f7f9; /* Soft Blue-Gray, buat kontras dengan Card putih */
    --bg-card: #ffffff;
    --bg-soft: #f8fafc;
    
    --text-dark: #334155;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
    
    /* Shadow yang lebih premium dan mengambang */
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.08);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-dark);
    margin: 0; padding: 0; overflow-x: hidden;
    letter-spacing: -0.01em; /* Membuat teks terlihat lebih padat/profesional */
}
.hidden { display: none !important; }
.bg-light-soft { background-color: #fcfcfd; }

/* --- AUTH PAGE --- */
.auth-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; background: linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 100%); }
.auth-card { width: 100%; max-width: 450px; background: var(--bg-card); padding: 3rem 2.5rem; border-radius: var(--radius-lg); box-shadow: 0 20px 40px rgba(0,0,0,0.08); border: 1px solid rgba(255,255,255,0.6); }
.auth-icon i { font-size: 3.5rem; }
.auth-links a { color: var(--primary); transition: 0.2s; font-weight: 500; }
.auth-links a:hover { color: var(--primary-hover); text-decoration: underline !important;}

/* --- SIDEBAR LAYOUT --- */
.admin-layout { display: flex; min-height: 100vh; }
.sidebar {
    width: 280px; 
    background-color: var(--sidebar-bg);
    color: #cbd5e1; display: flex; flex-direction: column;
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 1050;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 24px rgba(0,0,0,0.05);
}
/* Revisi Logo & Header */
.sidebar-header { 
    padding: 1.5rem 1rem; display: flex; align-items: center; justify-content: center; /* Senter di tengah */
    border-bottom: 1px solid rgba(255,255,255,0.06); position: relative;
}
.sidebar-logo-wrapper { background: transparent; padding: 0; }
.sidebar-logo { 
    height: 60px; /* Logo diperbesar */
    width: auto; object-fit: contain; 
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3)); /* Shadow elegan tanpa box putih */
    transition: transform 0.3s ease; 
}
.sidebar-logo:hover { transform: scale(1.05); }
.close-sidebar { position: absolute; right: 15px; top: 20px; background: none; border: none; color: #fff; font-size: 1.2rem; }

/* Revisi User & Foto Profil */
.sidebar-user { padding: 1.5rem; display: flex; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.06); }
.avatar-wrapper { position: relative; display: inline-block; cursor: pointer; flex-shrink: 0; border-radius: 50%; }
.avatar-img { 
    width: 52px; height: 52px; object-fit: cover; border-radius: 50%; 
    border: 2px solid var(--sidebar-bg); box-shadow: 0 0 0 2px rgba(255,255,255,0.15); 
    transition: 0.3s ease; 
}
.avatar-overlay { 
    position: absolute; top: 0; left: 0; right: 0; bottom: 0; 
    background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; 
    opacity: 0; transition: opacity 0.2s; color: white; font-size: 1.2rem; border-radius: 50%; 
}
.avatar-wrapper:hover .avatar-overlay { opacity: 1; }
.avatar-wrapper:hover .avatar-img { box-shadow: 0 0 0 2px #2dd4bf; }
.user-details { min-width: 0; flex: 1; }

.sidebar-nav { padding: 1.5rem 1rem; flex-grow: 1; }
.nav-title { font-size: 0.75rem; font-weight: 700; color: #64748b; letter-spacing: 1.5px; margin-bottom: 1.2rem; padding-left: 1rem; }
.nav-item {
    display: flex; align-items: center; gap: 1rem;
    padding: 0.9rem 1rem; color: #cbd5e1; text-decoration: none;
    border-radius: var(--radius-md); font-weight: 500; margin-bottom: 0.5rem;
    transition: all 0.2s;
}
.nav-item i { width: 22px; text-align: center; font-size: 1.1rem; }
.nav-item:hover { background: var(--sidebar-hover); color: #fff; transform: translateX(3px); }
.nav-item.active { background: rgba(15, 118, 110, 0.25); color: #2dd4bf; border-left: 4px solid #2dd4bf; }

.sidebar-footer { padding: 1.5rem; border-top: 1px solid rgba(255,255,255,0.06); }
.btn-logout {
    width: 100%; background: rgba(248, 113, 113, 0.1); border: 1px solid rgba(248, 113, 113, 0.2);
    color: #fca5a5; padding: 0.9rem; border-radius: var(--radius-md);
    cursor: pointer; font-weight: 600; transition: 0.2s;
}
.btn-logout:hover { background: #ef4444; color: #fff; border-color: #ef4444; }

/* --- MAIN CONTENT AREA --- */
.main-wrapper { flex-grow: 1; margin-left: 280px; display: flex; flex-direction: column; min-height: 100vh; background-color: var(--bg-main); }
.top-header {
    background: var(--bg-card); padding: 1.2rem 3rem;
    border-bottom: 1px solid var(--border-color);
    display: flex; justify-content: space-between; align-items: center;
    position: sticky; top: 0; z-index: 900;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}
.page-title { font-size: 1.4rem; font-weight: 800; color: #0f172a; letter-spacing: -0.5px; }
.accreditation-logo { height: 32px; margin-left: 15px; filter: grayscale(100%) opacity(0.4); transition: 0.3s; }
.accreditation-logo:hover { filter: none; opacity: 1; transform: scale(1.05); }

.content-body { padding: 2.5rem 3rem; max-width: 1100px; margin: 0 auto; width: 100%; }

/* --- KARTU KONTEN / FORM SECTIONS --- */
.section-card {
    background-color: var(--bg-card); border-radius: var(--radius-lg);
    padding: 2.5rem; margin-bottom: 2rem; 
    box-shadow: var(--shadow-soft); border: 1px solid rgba(0,0,0,0.03);
    transition: box-shadow 0.3s ease;
}
.section-card:hover { box-shadow: var(--shadow-hover); }

fieldset legend {
    font-size: 1.2rem; font-weight: 700; color: #0f172a;
    margin-bottom: 0.5rem; width: 100%;
}
.icon-circle {
    width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1rem;
}
.bg-primary-light { background-color: #ccfbf1; }
.bg-warning-light { background-color: #fef3c7; }
.bg-success-light { background-color: #dcfce7; }
.bg-info-light { background-color: #e0f2fe; }

/* --- FORMS & INPUTS --- */
.form-label { font-weight: 600; color: var(--text-dark); font-size: 0.9rem; margin-bottom: 0.5rem;}
.form-control, .form-select { 
    border-radius: var(--radius-sm); border: 1px solid #cbd5e1; 
    padding: 0.75rem 1rem; font-size: 0.95rem; color: #334155;
    background-color: #fff; transition: all 0.2s;
}
.form-control::placeholder { color: #94a3b8; }
.form-control:focus, .form-select:focus { 
    border-color: var(--primary); box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.1); 
    background-color: #fff;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.border-dashed { border-style: dashed !important; border-width: 2px !important; }

/* --- NESTED CARDS (Item Bahaya/Rambu) --- */
.form-card { border: 1px solid #cbd5e1; border-radius: var(--radius-md); overflow: hidden; transition: 0.2s; }
.form-card:hover { border-color: #94a3b8; box-shadow: 0 4px 12px rgba(0,0,0,0.03); }
.form-card .card-content { padding: 1.5rem; }
.inner-fieldset { border: 1px solid #cbd5e1; border-radius: var(--radius-sm); padding: 1.2rem; height: 100%; }
.inner-fieldset legend { font-size: 0.85rem; font-weight: 700; margin: 0; background: transparent; width: auto; padding: 0; }

/* Lists Status Laporan */
#review-list li, #public-list li {
    background-color: #fff; border: 1px solid #e2e8f0; border-radius: var(--radius-md);
    margin-bottom: 1rem; padding: 1.2rem 1.5rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    transition: all 0.2s;
}
#review-list li:hover, #public-list li:hover { border-color: #cbd5e1; box-shadow: 0 5px 15px rgba(0,0,0,0.05); cursor: pointer; transform: translateY(-2px); }

/* Status Badges */
.status { font-weight: 700; padding: 0.4rem 1rem; border-radius: 99px; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px;}
.status-Submitted { background-color: #fef3c7; color: #b45309; }
.status-Reviewed_K3 { background-color: #e0e7ff; color: #4338ca; }
.status-Approved_TU { background-color: #dcfce7; color: #15803d; }
.status-Rejected_K3, .status-Rejected_TU { background-color: #fee2e2; color: #b91c1c; }

/* Risk & Result Output Matrix */
.risk-output { padding: 1rem; border-radius: 8px;}
.risk-output.risk-E { background-color: #fef2f2 !important; color: #dc2626 !important; border: 1px solid #fecaca !important;}
.risk-output.risk-H { background-color: #fff7ed !important; color: #ea580c !important; border: 1px solid #fed7aa !important;}
.risk-output.risk-M { background-color: #fefce8 !important; color: #ca8a04 !important; border: 1px solid #fef08a !important;}
.risk-output.risk-L { background-color: #f0fdf4 !important; color: #16a34a !important; border: 1px solid #bbf7d0 !important;}
.result-output.result-bagus { background-color: #f0fdf4 !important; color: #16a34a !important; border: 1px solid #bbf7d0 !important;}
.result-output.result-layak { background-color: #fefce8 !important; color: #ca8a04 !important; border: 1px solid #fef08a !important;}
.result-output.result-perbaikan { background-color: #fef2f2 !important; color: #dc2626 !important; border: 1px solid #fecaca !important;}

/* Alert Messages */
#status-message, #rekap-status, #auth-status-message { padding: 1rem 1.5rem; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.95rem; margin-top: 1rem; }
#status-message:empty, #rekap-status:empty, #auth-status-message:empty { display: none; }
.success { background-color: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.error { background-color: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.loading { background-color: #f0f9ff; color: #0369a1; border: 1px solid #bae6fd; }

/* --- RESPONSIVE MOBILE --- */
.mobile-topbar { background: var(--bg-card); padding: 1rem 1.5rem; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; gap: 1rem; position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 10px rgba(0,0,0,0.02);}
.hamburger-btn { background: none; border: none; font-size: 1.5rem; color: var(--text-dark); cursor: pointer; padding: 0; }

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); width: 280px; }
    .sidebar.show { transform: translateX(0); box-shadow: 10px 0 25px rgba(0,0,0,0.3); }
    .main-wrapper { margin-left: 0; }
    .content-body { padding: 1.5rem 1rem; }
    .section-card { padding: 1.5rem; }
    .form-grid { grid-template-columns: 1fr; gap: 1rem; }
    #review-list li, #public-list li { flex-direction: column; align-items: flex-start; }
    .rekap-controls { flex-direction: column; }
    .btn { width: 100%; margin-bottom: 0.5rem; }
    .sidebar-user { padding: 1.5rem 1rem; }
}