:root {
    --primary: #6C3EF4;
    --primary-hover: #5A2BD4;
    --primary-light: #ECE5FE;
    --secondary: #8E98A8;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --dark: #1E293B;
    --light: #F8FAFC;
    --white: #FFFFFF;
    --body-bg: #F1F5F9;
    --border-color: #E2E8F0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--body-bg);
    color: var(--dark);
    overflow-x: hidden;
}

/* Authentication Page */
.auth-wrapper {
    height: 100vh;
    display: flex;
}
.auth-illustration {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--white);
    padding: 3rem;
}
.auth-illustration h1 {
    font-weight: 700;
    margin-bottom: 1rem;
}
.auth-illustration p {
    font-size: 1.1rem;
    opacity: 0.9;
    text-align: center;
}
.auth-form-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--white);
    padding: 3rem;
}
.auth-card {
    width: 100%;
    max-width: 400px;
}
.btn-primary-custom {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s;
}
.btn-primary-custom:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
}

/* Layout */
#wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

/* Sidebar */
#sidebar {
    min-width: 250px;
    max-width: 250px;
    background: var(--white);
    color: var(--dark);
    transition: all 0.3s;
    height: 100vh;
    position: fixed;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}
#sidebar.collapsed {
    margin-left: -250px;
}
#sidebar .sidebar-header {
    padding: 20px;
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}
#sidebar .sidebar-header h3 {
    color: var(--primary);
    font-weight: 700;
    margin: 0;
    font-size: 1.5rem;
}
#sidebar ul.components {
    padding: 20px 0;
    flex: 1;
    overflow-y: auto;
}
#sidebar ul li a {
    padding: 12px 20px;
    font-size: 1rem;
    display: block;
    color: var(--dark);
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}
#sidebar ul li a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
    color: var(--secondary);
    transition: all 0.3s;
}
#sidebar ul li.active > a, #sidebar ul li a:hover {
    color: var(--primary);
    background: var(--primary-light);
    border-right: 4px solid var(--primary);
}
#sidebar ul li.active > a i, #sidebar ul li a:hover i {
    color: var(--primary);
}

/* Page Content */
#content {
    width: calc(100% - 250px);
    margin-left: 250px;
    min-height: 100vh;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}
#content.expanded {
    width: 100%;
    margin-left: 0;
}

/* Topbar */
.topbar {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 999;
}
.sidebarCollapse {
    background: transparent;
    border: none;
    color: var(--dark);
    font-size: 1.25rem;
    cursor: pointer;
}
.topbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}
.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-light);
    color: var(--primary);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
}

/* Main Content Area */
.main-content {
    padding: 24px;
    flex: 1;
}
.page-title {
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--dark);
}

/* Cards */
.card-modern {
    background: var(--white);
    border-radius: 12px;
    border: none;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    transition: transform 0.3s, box-shadow 0.3s;
}
.card-modern:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}
.card-header-modern {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    font-weight: 600;
}

/* Form Inputs */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 0.6rem 1rem;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(108, 62, 244, 0.25);
}
.form-floating > label {
    padding-left: 1rem;
}

/* DataTables customization */
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 5px 10px;
    margin-left: 5px;
}
.dataTables_wrapper .dataTables_filter input:focus {
    outline: none;
    border-color: var(--primary);
}
table.dataTable.no-footer {
    border-bottom: 1px solid var(--border-color);
}
table.dataTable thead th, table.dataTable thead td {
    border-bottom: 1px solid var(--border-color);
    padding: 12px 10px;
    font-weight: 600;
    color: var(--dark);
}
.page-item.active .page-link {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* Badge Risk */
.badge-risk-rendah { background-color: var(--success); color: white; }
.badge-risk-sedang { background-color: var(--warning); color: white; }
.badge-risk-tinggi { background-color: var(--danger); color: white; }

/* Responsive */
@media (max-width: 768px) {
    #sidebar {
        margin-left: -250px;
    }
    #sidebar.active {
        margin-left: 0;
    }
    #content {
        width: 100%;
        margin-left: 0;
    }
    .auth-illustration {
        display: none;
    }
}
