/* assets/css/custom.css */

:root {
    --sidebar-width: 240px;
    --sidebar-bg: #1e293b;
    --sidebar-text: #94a3b8;
    --sidebar-active: #ffffff;
    --sidebar-hover-bg: rgba(255,255,255,0.07);
    --sidebar-active-bg: rgba(255,255,255,0.13);
    --accent: #3b82f6;
}

body {
    background-color: #f8fafc;
    font-size: 14px;
}

/* ======== SIDEBAR ======== */
#wrapper {
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--sidebar-bg);
    flex-shrink: 0;
    transition: width 0.25s ease;
    overflow: hidden;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-brand {
    padding: 20px 16px;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    white-space: nowrap;
    letter-spacing: .3px;
}

.sidebar-brand .bi { font-size: 18px; color: var(--accent); }

.sidebar-divider {
    border-color: rgba(255,255,255,0.1);
    margin: 0 16px 8px;
}

.sidebar-nav { padding: 0 8px 16px; }

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 13.5px;
    margin-bottom: 2px;
    transition: background .15s, color .15s;
    white-space: nowrap;
}

.sidebar-link .bi { font-size: 16px; flex-shrink: 0; }
.sidebar-link:hover { background: var(--sidebar-hover-bg); color: #fff; }
.sidebar-link.active { background: var(--sidebar-active-bg); color: var(--sidebar-active); font-weight: 500; }
.sidebar-link.active .bi { color: var(--accent); }

/* Collapsed sidebar */
#wrapper.sidebar-collapsed .sidebar { width: 56px; }
#wrapper.sidebar-collapsed .sidebar-brand span,
#wrapper.sidebar-collapsed .sidebar-link span { display: none; }
#wrapper.sidebar-collapsed .sidebar-brand { padding: 20px 16px; }
#wrapper.sidebar-collapsed .sidebar-link { justify-content: center; padding: 9px; }

/* ======== MAIN CONTENT ======== */
#page-content-wrapper {
    flex: 1;
    min-width: 0;
}

/* ======== STAT CARDS ======== */
.stat-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    transition: box-shadow .2s;
}
.stat-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.07); }
.stat-card .label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #94a3b8;
    margin-bottom: 6px;
    font-weight: 600;
}
.stat-card .value {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
}
.stat-card .icon-box {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
}

/* ======== TABLES ======== */
.table-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}
.table-card .card-header {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 14px 20px;
    font-weight: 600;
    font-size: 14px;
}
.table th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: #64748b;
    font-weight: 600;
    border-bottom-width: 1px;
    background: #f8fafc;
}
.table td { vertical-align: middle; font-size: 13px; }

/* ======== FILTER BAR ======== */
.filter-bar {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

/* ======== DEBIT / KREDIT COLORS ======== */
.text-debit  { color: #16a34a; font-weight: 600; }
.text-kredit { color: #dc2626; font-weight: 600; }
.text-saldo  { color: #2563eb; font-weight: 600; }

/* ======== NOTA PRINT ======== */
@media print {
    .no-print { display: none !important; }
    body { background: #fff; font-size: 12px; }
    .nota-box {
        max-width: 300px;
        margin: 0 auto;
        font-family: 'Courier New', monospace;
    }
}
.nota-box {
    background: #fff;
    border: 1px dashed #ccc;
    border-radius: 8px;
    padding: 20px;
    max-width: 320px;
    margin: 0 auto;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}
.nota-box hr { border-style: dashed; }

/* ======== CHART ======== */
.chart-container { position: relative; height: 260px; }

/* ======== MISC ======== */
.stok-warning { background: #fffbeb; border-left: 3px solid #f59e0b; }
.month-card-hover { transition: border-color .15s, box-shadow .15s; cursor: pointer; }
.month-card-hover:hover { border-color: var(--accent) !important; box-shadow: 0 2px 8px rgba(59,130,246,.15); }

@media (max-width: 768px) {
    .sidebar { position: fixed; z-index: 1000; left: -240px; transition: left .25s; }
    #wrapper.sidebar-open .sidebar { left: 0; }
    #page-content-wrapper { width: 100%; }
}
