body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma;
    background: #f6f8fc;
}

/* =========================
   MAIN LAYOUT (FLEX FIX)
========================= */
.main-wrapper {
    display: flex;
}

/* ✅ TOGGLE BUTTON */
.toggle-btn {
    font-size: 20px;
    background: none;
    border: none;
    cursor: pointer;
    margin-right: 10px;
}

/* =========================
   SIDEBAR
========================= */
.sidebar {
    width: 220px;
    min-width: 220px;
    min-height: 100vh;
    flex-shrink:0;
    background: #2c3e50;
    color: white;
    padding: 15px;
    transition: all 0.3s ease;
}

/*.sidebar h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    height:44px;
}*/

.sidebar h3 {
    display: flex;
    align-items: center;
    height: 44px;
}

/*.sidebar a {
    transition: 0.2s;
    display: flex;
    color: white;
    padding: 0 15px;
    text-decoration: none;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    height:44px;
    align-items:center;
    font-size:18px;
    justify-content: flex-start;

}*/

.sidebar a {
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
    height: 44px;
    padding: 0 15px;
    gap: 10px;
    font-size: 18px;
}

.sidebar a:hover {
    background: #34495e;
    color: white;
    transform: none;
}

.sidebar a i {
    width: 20px;
    text-align: center;
}

.sidebar span {
    transition: 0.2s;
}

.sidebar a:visited {
    color: white;
}

.sidebar a:active {
    color: white;
}

/* =========================
   SIDEBAR COLLAPSED
========================= */
.sidebar.collapsed {
    width: 50px;       /* ✅ lebih kecil */
    min-width: 50px;   /* ✅ override */
    overflow: hidden;
}

/* sembunyikan text */
.sidebar.collapsed span {
    display: none;
}

/* center icon */
/*.sidebar.collapsed a {
    display: flex;
    width:70px;
    justify-content: center;
    align-items: center;
    padding: 0;
    gap:0;
}*/

.sidebar.collapsed a {
    justify-content: center;
    padding: 0;
    gap: 0;
}

.sidebar.collapsed a:hover {
    background: #3b5166;
    transform: scale(1.1);
}

/* title kecil */

.sidebar-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar.collapsed .sidebar-title {
    padding-left:10px;
}

.sidebar.collapsed .sidebar-title span {
    display: none;
}

/*.sidebar.collapsed h3 {
    display: flex;
    justify-content: center;  *//* ✅ paksa ke kiri *//*
    padding-left:12px;
}*/

.sidebar.collapsed h3 {
    justify-content: center;
}


/* =========================
   MAIN CONTENT AREA
========================= */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width:0;
    transition: 0.3s;
}

/* =========================
   HEADER
========================= */
.header {
    height: 64px;
    backdrop-filter: blur(6px);
    background: rgba(255,255,255,0.9);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 25px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
    transition: all 0.2s ease;
    position: sticky;
    top: 0;
    z-index: 999;

}

.header:hover {
    box-shadow: 0 6px 14px rgba(0,0,0,0.08);
    background: linear-gradient(90deg,#ffffff,#f8fbff);
}

.page-header {
    margin-bottom: 15px;
}

.page-header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(90deg,#4e73df,#1cc88a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent
}

.page-header p {
    margin: 3px 0 0;
    font-size: 13px;
    color: #888;
}

/* LEFT */
.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    height: 34px;
}

/* TITLE */
.title-group {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.app-name {
    font-size: 16px;
    font-weight: 600;
}

.app-subtitle {
    font-size: 11px;
    color: #999;
}

/* RIGHT */
.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.username {
    font-size: 13px;
    color: #555;
}

/* AVATAR */
.avatar {
    height: 32px;
    width: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #eee;
    transition: all 0.2s ease;
}

.avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0 3px rgba(78,115,223,0.2);
}

/* USER MENU */
.user-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 8px;
    transition: 0.2s;
}

.user-menu:hover {
    background: #f2f4f8;
}

/* DROPDOWN */
.dropdown-menu {
    position: absolute;
    top: 60px;
    right: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    display: none;
    flex-direction: column;
    min-width: 160px;
    overflow: hidden;
    z-index: 999;
    transition: all 0.2s ease;
    transform: translateY(-5px);
    opacity: 0;

}

.dropdown-menu.show {
    transform: translateY(0);
    opacity: 1;
}

.dropdown-menu a {
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
}

.dropdown-menu a:hover {
    background: #f5f5f5;
}

/* SHOW */
.dropdown-menu.show {
    display: flex;
}
/* =========================
   CONTENT
========================= */
.content {
    padding: 30px;
    width: 100%;
    margin: auto;
    /*max-width: 1400px;*/
    box-sizing: border-box;
}

@media (min-width: 1600px) {
    .content {
        padding-left: 40px;
        padding-right: 40px;
    }
}

/* =========================
   FOOTER
========================= */
.footer {
    padding: 10px 20px;
    background: #eee;
}

/* =========================
   KPI
========================= */
.kpi-container {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.kpi {
    flex: 1;
    background: linear-gradient(135deg,#4e73df,#224abe);
    color: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: 0.2s;
}

.kpi:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.1);
}

.kpi:nth-child(2){ background: #1cc88a; }
.kpi:nth-child(3){ background: #f6c23e; }

/* =========================
   DASHBOARD GRID
========================= */
.dashboard {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;

    width: 100%;
    box-sizing: border-box;
}

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

/* =========================
   CARD
========================= */
.card {
    background: white;
    padding: 12px;
    border-radius: 10px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
    width: 100%;
    min-width: 0;
    box-sizing: border-box;

    overflow: hidden;   /* ✅ INI FIX KEPOTONG */
    transition: all 0.2s ease;
}

.card:hover{
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.1);
}

.card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}
/* =========================
   CHART
========================= */
.chart-box {
    height: 260px;
    width: 100%;
    position: relative;
    padding: 5px 5px 0 5px;

    overflow: hidden;   /* ✅ jaga dalam container */
}

.chart-box canvas {
    max-width:100%;
}


/* =========================
   TABLE FIX
========================= */

/* ✅ WRAPPER DATATABLE
.dataTables_wrapper {
    width: 100%;
    overflow-x: auto;
}

 ✅ SCROLL BODY
.dataTables_scrollBody {
    overflow-x: auto !important;
    overflow-y: auto !important;
}

✅ BIAR HEAD DAN BODY SYNC
.dataTables_scrollHeadInner {
    width: max-content !important;
}

table.dataTable {
    min-width: 1200px;   /* ✅ bikin tabel lebar
}*/
.container {
    margin-top: 20px;
    background: white;
    padding: 10px;
    border-radius: 10px;
}

table.dataTable th,
table.dataTable td {
    white-space:nowrap;
}

.export-container {
    display: flex;
    justify-content: space-between;
    align-items: center;

    background: white;
    padding: 12px 16px;
    border-radius: 10px;

    margin-top: 15px;
    margin-bottom: 15px;

    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
    margin-bottom: 15px;
}

.periode {
    font-size: 14px;
    color: #555;
}

.export-btn {
    /*margin-top: 10px;*/
    margin-left: auto;
    background: linear-gradient(135deg,#1cc88a,#17a673);
    display: flex;
    align-items: center;
    gap: 6px;
}

.export-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* =========================
   FILTER BOX
========================= */
.filter-box {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

/* =========================
   FORM LAYOUT
========================= */
.filter-form {
    display: flex;
    gap: 20px;
    align-items: end;
    flex-wrap: wrap;
}

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

/* =========================
   INPUT STYLE
========================= */
.form-group label {
    font-size: 13px;
    margin-bottom: 4px;
    color: #555;
}

.form-group input {
    padding: 7px 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 13px;
}

/* =========================
   BUTTON MODERN
========================= */
.btn-primary {
    padding: 8px 18px;
    background: linear-gradient(135deg,#4e73df,#224abe);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
}

.btn-primary:hover {
    opacity: 0.9;
}

.filter-box {
    display: flex;
    justify-content: space-between;
}

/* =========================
   LOGIN PAGE
========================= */

.login-container {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;

    /* 🔥 background gradient */
    background: linear-gradient(135deg,#85c1e9,#d6eaf8);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* CARD */
.login-card {
    width: 320px;
    padding: 30px;

    border-radius: 16px;

    /* 🔥 glass effect */
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(12px);

    box-shadow: 0 10px 30px rgba(0,0,0,0.2);

    text-align: center;
    color: #fff;
}

/* ICON */
.login-icon {
    font-size: 28px;
    margin-bottom: 10px;
}

/* TITLE */
.login-card h2 {
    margin: 10px 0 5px;
}

.subtitle {
    font-size: 13px;
    opacity: 0.8;
    margin-bottom: 15px;
}

/* INPUT */
.input-group {
    margin-bottom: 12px;
}

.input-group input {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: none;
    outline: none;
}

/* PASSWORD TOGGLE */
.password-group {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 8px;
    cursor: pointer;
}

/* FORGOT */
.forgot {
    text-align: right;
    font-size: 12px;
    margin-bottom: 15px;
}

.forgot a {
    color: white;
    text-decoration: none;
}

.forgot a:hover {
    text-decoration: underline;
}

/* BUTTON */
.btn-login {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: none;

    background: linear-gradient(135deg,#4e73df,#224abe);
    color: white;

    cursor: pointer;
    font-weight: 600;
}

.btn-login:hover {
    opacity: 0.9;
}

/* ERROR */
.error-msg {
    background: rgba(255,0,0,0.2);
    padding: 8px;
    margin-bottom: 10px;
    border-radius: 6px;
}

.kpi-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.kpi-card {
    padding: 15px;
    border-radius: 10px;
    color: white;
}

.kpi-card h4 {
    font-size: 13px;
    opacity: 0.9;
}

.kpi-card p {
    font-size: 20px;
    font-weight: bold;
}

.blue { background: #4e73df; }
.red { background: #e74a3b; }
.green { background: #1cc88a; }
.orange { background: #f39c12; }

/* =========================
   COST DASHBOARD OVERRIDE
========================= */


.cost-page .chart-box {
    height: 300px;  /* lebih tinggi dari default */
}

.cost-page .kpi-card p {
    font-size: 22px;
}

.cost-page .kpi-card h4 {
    font-size: 12px;
    letter-spacing: 0.4px;
}

/* highlight negative */
.cost-page .neg {
    color: #e74a3b;
    font-weight: bold;
}

/* table spacing */
.cost-page table {

