/* ==================================================
   RESET & GLOBAL
================================================== */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f3f4f6;
    color: #111827;
    font-size: 14px;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ==================================================
   HEADER
================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #1f2937;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1000;
    font-size: 14px;
}

.header a {
    color: #ffffff;
    font-size: 13px;
}

/* ==================================================
   SIDEBAR
================================================== */
.sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    bottom: 36px;
    width: 220px;
    background: #111827;
    color: #e5e7eb;
    overflow-y: auto;
    font-size: 13px;
}

.sidebar-title {
    padding: 12px 15px;
    font-size: 12px;
    font-weight: bold;
    color: #9ca3af;
    text-transform: uppercase;
    border-bottom: 1px solid #1f2937;
}

.menu-group {
    margin-top: 8px;
}

.menu-header {
    display: block;
    padding: 6px 15px;
    font-size: 11px;
    color: #6b7280;
    text-transform: uppercase;
}

.sidebar a {
    display: block;
    padding: 7px 15px;
    font-size: 13px;
    color: #e5e7eb;
}

.sidebar a:hover {
    background: #1f2937;
}

.sidebar a.active {
    background: #374151;
}

/* ==================================================
   CONTENT AREA
================================================== */
.content {
    margin-left: 230px;
    padding: 20px;
    padding-top: 80px;
    padding-bottom: 60px;
    font-size: 14px;
}

/* ==================================================
   FOOTER
================================================== */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 36px;
    background: #e5e7eb;
    color: #374151;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==================================================
   FORM
================================================== */
form {
    background: #ffffff;
    padding: 15px;
    border-radius: 6px;
    max-width: 600px;
}

input,
select,
button {
    width: 100%;
    padding: 8px;
    margin-top: 8px;
    font-size: 13px;
}

button {
    background: #1f2937;
    color: #ffffff;
    border: none;
    cursor: pointer;
}

button:hover {
    background: #374151;
}

/* ==================================================
   TABLE
================================================== */
table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    margin-top: 15px;
    font-size: 13px;
}

th, td {
    padding: 8px;
    border: 1px solid #d1d5db;
    text-align: left;
}

th {
    background: #f9fafb;
    font-weight: bold;
}

/* ==================================================
   LOGIN PAGE
================================================== */
.login-body {
    background: #111827;
}

.login-box {
    width: 350px;
    margin: 120px auto;
    background: #ffffff;
    padding: 25px;
    border-radius: 8px;
}

.login-box h2 {
    margin-top: 0;
    font-size: 18px;
    text-align: center;
}

.login-box input,
.login-box button {
    width: 100%;
    margin-top: 10px;
}

.error {
    color: red;
    font-size: 13px;
    margin-bottom: 10px;
}

/* ==================================================
   KPI DASHBOARD
================================================== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.kpi-card {
    background: #ffffff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.kpi-card span {
    font-size: 12px;
    color: #6b7280;
}

.kpi-card strong {
    display: block;
    font-size: 22px;
    margin-top: 6px;
}

.kpi-risk {
    border-left: 4px solid red;
}

/* ==================================================
   CHART AREA
================================================== */
.chart-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.chart-box {
    background: #ffffff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.chart-box h4 {
    margin-top: 0;
    font-size: 14px;
}

/* ==================================================
   RESPONSIVE (MINIMAL)
================================================== */
@media (max-width: 1024px) {
    .kpi-grid {
        grid-template-columns: 1fr 1fr;
    }

    .chart-grid {
        grid-template-columns: 1fr;
    }
}
/* CSS untuk Dashboard */
.dashboard-body {
    background-color: #f5f7fa;
    min-height: 100vh;
}

.main-container {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    padding: 20px;
    margin-left: 250px;
}

.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    color: #2c3e50;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 5px;
}

.page-header p {
    color: #95a5a6;
    font-size: 14px;
}

/* Filter Section */
.filter-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border: 1px solid #e1e8ed;
}

.filter-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.form-group {
    flex: 1;
    min-width: 200px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-secondary {
    background-color: #eee;
    color: #555;
}

/* KPI Cards */
.kpi-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-range {
    font-size: 14px;
    color: #95a5a6;
    font-weight: normal;
    margin-left: auto;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.kpi-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border-top: 4px solid #3498db;
}

.kpi-card.kpi-risk {
    border-top-color: #e74c3c;
}

.kpi-card.positive {
    border-top-color: #27ae60;
}

.kpi-card.negative {
    border-top-color: #e74c3c;
}

.kpi-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    font-size: 22px;
    color: white;
    background: linear-gradient(135deg, #3498db, #2c3e50);
}

.kpi-card:nth-child(2) .kpi-icon {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
}

.kpi-card:nth-child(3) .kpi-icon {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.kpi-card:nth-child(4) .kpi-icon {
    background: linear-gradient(135deg, #27ae60, #229954);
}

.kpi-card:nth-child(5) .kpi-icon {
    background: linear-gradient(135deg, #f39c12, #d68910);
}

.kpi-label {
    font-size: 14px;
    color: #95a5a6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    font-weight: 500;
}

.kpi-value {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
}

.kpi-subtext {
    font-size: 12px;
    color: #7f8c8d;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Charts Section */
.chart-section {
    margin-bottom: 40px;
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 25px;
}

.chart-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    height: 350px;
    display: flex;
    flex-direction: column;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.chart-badge {
    color: #3498db;
    font-weight: 600;
}

.chart-container {
    flex: 1;
    position: relative;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #95a5a6;
}

.empty-state i {
    font-size: 50px;
    margin-bottom: 15px;
    color: #bdc3c7;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: #7f8c8d;
}

/* Responsive */
@media (max-width: 1200px) {
    .chart-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main-content {
        margin-left: 0;
        padding: 15px;
    }
    
    .kpi-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-card {
        height: 300px;
    }
    
    .filter-form {
        flex-direction: column;
    }
    
    .form-group {
        min-width: 100%;
    }
}