/* ========================================
   ERP Enterprise Theme
   Primary: Blue (#1E3A8A)
   Accent: Orange (#F97316)
   ======================================== */

:root {
    --primary: #1E3A8A;
    --primary-dark: #1E2F5A;
    --primary-light: #3B5BBF;
    --primary-soft: #E0E7FF;
    --accent: #F97316;
    --accent-dark: #EA580C;
    --accent-light: #FB923C;
    --accent-soft: #FFEDD5;
    --bg-body: #F3F4F6;
    --bg-card: #FFFFFF;
    --text-main: #1F2937;
    --text-muted: #6B7280;
    --border-color: #E5E7EB;
    --sidebar-width: 260px;
    --sidebar-collapsed: 0px;
    --topbar-height: 64px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-body);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

/* ============ Sidebar ============ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: #fff;
    z-index: 1040;
    overflow-y: auto;
    transition: transform 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar::-webkit-scrollbar {
    width: 5px;
}
.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: var(--accent);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(249,115,22,0.4);
}

.logo-text h5 {
    margin: 0;
    font-weight: 700;
    font-size: 16px;
}

.logo-text small {
    font-size: 11px;
    opacity: 0.7;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    padding: 15px 12px;
}

.nav-section-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    opacity: 0.5;
    padding: 15px 12px 8px;
    text-transform: uppercase;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 2px;
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-item i {
    font-size: 16px;
    width: 20px;
}

.nav-item:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.nav-item.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 10px rgba(249,115,22,0.3);
}

/* ============ Main Wrapper ============ */
.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
}

/* ============ Top Navbar ============ */
.top-navbar {
    height: var(--topbar-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 20px;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: var(--shadow-sm);
}

/* ========================================
   Toggle Sidebar Button - ALWAYS VISIBLE
   ======================================== */
.btn-toggle-sidebar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(30, 58, 138, 0.25);
    flex-shrink: 0;
}

.btn-toggle-sidebar:hover {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
}

.btn-toggle-sidebar:active {
    transform: scale(0.95);
}

.btn-toggle-sidebar i {
    transition: transform 0.3s ease;
}

/* Animasi icon saat sidebar collapsed */
.sidebar.collapsed ~ .main-wrapper .btn-toggle-sidebar i {
    transform: rotate(180deg);
}

/* Responsive - tombol tetap terlihat di semua device */
@media (max-width: 991.98px) {
    .btn-toggle-sidebar {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }
}

@media (max-width: 575.98px) {
    .btn-toggle-sidebar {
        width: 36px;
        height: 36px;
        font-size: 17px;
    }
}

.search-box {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 8px 14px 8px 40px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-body);
    font-size: 13px;
    transition: all 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: var(--text-main);
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 18px;
}

.icon-btn:hover {
    background: var(--bg-body);
    color: var(--primary);
}

.icon-btn .badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--accent);
    color: #fff;
    font-size: 9px;
    padding: 2px 5px;
    border-radius: 10px;
    font-weight: 600;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: none;
    padding: 4px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.user-info:hover {
    background: var(--bg-body);
}

.user-avatar {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
}

.user-details {
    text-align: left;
    line-height: 1.2;
}

.user-name {
    display: block;
    font-weight: 600;
    font-size: 13px;
}

.user-details small {
    color: var(--text-muted);
    font-size: 11px;
}

/* ============ Content ============ */
.content {
    flex: 1;
    padding: 24px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 4px 0;
}

.page-subtitle {
    color: var(--text-muted);
    margin: 0;
    font-size: 13.5px;
}

.page-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ============ Cards ============ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    padding: 16px 20px;
    background: #FAFBFC;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 12px 20px;
    background: #FAFBFC;
    border-top: 1px solid var(--border-color);
}

/* ============ Buttons ============ */
.btn {
    font-weight: 500;
    font-size: 13.5px;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    box-shadow: 0 4px 10px rgba(30,58,138,0.3);
}

.btn-warning {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.btn-warning:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline-primary:hover {
    background: var(--primary);
    color: #fff;
}

.btn-outline-danger {
    color: #DC2626;
    border-color: #DC2626;
}
.btn-outline-danger:hover {
    background: #DC2626;
    color: #fff;
}

/* ============ Tables ============ */
.table {
    margin-bottom: 0;
}

.table thead th {
    background: #F9FAFB;
    color: var(--text-main);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 12px 16px;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.table tbody td {
    padding: 12px 16px;
    vertical-align: middle;
    font-size: 13.5px;
    border-bottom: 1px solid var(--border-color);
}

.table-hover tbody tr:hover {
    background: #F9FAFB;
}

/* ============ Badges ============ */
.badge {
    font-weight: 500;
    padding: 4px 10px;
    font-size: 11.5px;
    border-radius: 6px;
}

.bg-primary-soft {
    background: var(--primary-soft) !important;
    color: var(--primary) !important;
}

.bg-success-soft {
    background: #D1FAE5 !important;
    color: #065F46 !important;
}

.bg-warning-soft {
    background: var(--accent-soft) !important;
    color: var(--accent-dark) !important;
}

.bg-danger-soft {
    background: #FEE2E2 !important;
    color: #991B1B !important;
}

.bg-secondary-soft {
    background: #F3F4F6 !important;
    color: #4B5563 !important;
}

.bg-info-soft {
    background: #DBEAFE !important;
    color: #1E40AF !important;
}

/* ============ Forms ============ */
.form-label {
    font-weight: 500;
    font-size: 13px;
    color: var(--text-main);
    margin-bottom: 6px;
}

.form-control, .form-select {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13.5px;
    transition: all 0.2s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
    outline: none;
}

.input-group-text {
    background: #F9FAFB;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* ============ Pagination ============ */
.pagination .page-link {
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 6px 12px;
    font-size: 13px;
    margin: 0 2px;
    border-radius: 6px !important;
}

.pagination .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.pagination .page-link:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

/* ============ Stat Cards ============ */
.stat-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
}

.stat-card-primary .stat-icon {
    background: var(--primary-soft);
    color: var(--primary);
}
.stat-card-warning .stat-icon {
    background: var(--accent-soft);
    color: var(--accent);
}
.stat-card-success .stat-icon {
    background: #D1FAE5;
    color: #065F46;
}
.stat-card-danger .stat-icon {
    background: #FEE2E2;
    color: #991B1B;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.stat-trend {
    font-size: 11.5px;
    font-weight: 500;
}
.stat-trend.positive { color: #059669; }
.stat-trend.negative { color: #DC2626; }

/* ============ Quick Access ============ */
.quick-access-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-main);
    background: #FAFBFC;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
}

.quick-access-item:hover {
    background: #fff;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--primary);
}

.quick-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

/* ============ Activity List ============ */
.activity-list {
    padding: 8px 0;
}

.activity-item {
    display: flex;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.activity-text {
    font-size: 13px;
    margin-bottom: 2px;
}

/* ============ Footer ============ */
.footer {
    padding: 16px 24px;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12.5px;
    color: var(--text-muted);
}

/* ============ Sidebar Overlay ============ */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1035;
}

/* ============ Alerts ============ */
.alert {
    border-radius: 10px;
    border: none;
    padding: 12px 16px;
    font-size: 13.5px;
}

.alert-success {
    background: #D1FAE5;
    color: #065F46;
}
.alert-danger {
    background: #FEE2E2;
    color: #991B1B;
}
.alert-warning {
    background: var(--accent-soft);
    color: var(--accent-dark);
}
.alert-info {
    background: #DBEAFE;
    color: #1E40AF;
}

/* ============ Responsive ============ */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .sidebar-overlay.show {
        display: block;
    }
    .main-wrapper {
        margin-left: 0;
    }
    .btn-toggle-sidebar {
        display: block;
    }
    .content {
        padding: 16px;
    }
    .page-title {
        font-size: 20px;
    }
}

@media (max-width: 767.98px) {
    .content {
        padding: 12px;
    }
    .page-header {
        margin-bottom: 16px;
    }
    .card-body {
        padding: 16px;
    }
    .card-header {
        padding: 12px 16px;
    }
    .table thead th, .table tbody td {
        padding: 10px 12px;
    }
    .stat-card {
        padding: 16px;
    }
    .stat-value {
        font-size: 20px;
    }
    .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 22px;
    }
    .footer {
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }
}

@media (max-width: 575.98px) {
    .top-navbar {
        padding: 0 12px;
    }
    .page-actions {
        width: 100%;
    }
    .page-actions .btn {
        flex: 1;
        font-size: 12px;
        padding: 6px 10px;
    }
    .btn span.d-none.d-md-inline {
        display: none !important;
    }
}

/* ============ Scrollbar ============ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #F3F4F6;
}
::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

/* ============ Modal ============ */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    border-radius: 12px 12px 0 0;
}

.modal-header.bg-danger {
    background: linear-gradient(135deg, #DC2626, #991B1B) !important;
}


/* ========================================
   Sidebar Collapsed State
   ======================================== */

/* Sidebar collapsed */
.sidebar.collapsed {
    width: 72px;
}

.sidebar.collapsed .sidebar-header {
    padding: 16px 10px;
    justify-content: center;
}

.sidebar.collapsed .logo-text {
    display: none;
}

.sidebar.collapsed .logo-icon {
    width: 42px;
    height: 42px;
    margin: 0;
}

.sidebar.collapsed .nav-section-title {
    font-size: 0;
    height: 1px;
    background: rgba(255,255,255,0.1);
    padding: 0;
    margin: 12px 8px;
    overflow: hidden;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 12px 10px;
    position: relative;
}

.sidebar.collapsed .nav-item i {
    font-size: 20px;
    width: auto;
    margin: 0;
}

.sidebar.collapsed .nav-item span {
    display: none;
}

.sidebar.collapsed .nav-item.active {
    background: var(--accent);
}

/* Tooltip saat hover di collapsed state */
.sidebar-tooltip {
    position: fixed;
    background: var(--primary-dark);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 9999;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.sidebar-tooltip.show {
    opacity: 1;
}

.sidebar-tooltip::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: var(--primary-dark);
    border-left: 0;
}

/* Main wrapper saat sidebar collapsed */
.main-wrapper.sidebar-collapsed {
    margin-left: 72px;
}

/* Smooth transition */
.sidebar, .main-wrapper {
    transition: all 0.3s ease;
}

/* Toggle button animation */
.btn-toggle-sidebar {
    transition: transform 0.3s ease;
}

.sidebar.collapsed ~ .main-wrapper .btn-toggle-sidebar i::before {
    content: "\F479"; /* bi-list icon berubah saat collapsed */
}

/* Hover effect di collapsed nav-item */
.sidebar.collapsed .nav-item:hover {
    background: rgba(255,255,255,0.1);
}

/* Responsive untuk collapsed state */
@media (max-width: 991.98px) {
    .sidebar.collapsed {
        width: var(--sidebar-width);
        transform: translateX(-100%);
    }
    
    .sidebar.collapsed.show {
        transform: translateX(0);
    }
    
    .sidebar.collapsed .logo-text {
        display: block;
    }
    
    .sidebar.collapsed .nav-section-title {
        font-size: 10px;
        height: auto;
        background: transparent;
        padding: 15px 12px 8px;
        margin: 0;
    }
    
    .sidebar.collapsed .nav-item {
        justify-content: flex-start;
        padding: 10px 14px;
    }
    
    .sidebar.collapsed .nav-item i {
        font-size: 16px;
        width: 20px;
    }
    
    .sidebar.collapsed .nav-item span {
        display: inline;
    }
    
    .main-wrapper.sidebar-collapsed {
        margin-left: 0;
    }
}

/* Print style - hide sidebar */
@media print {
    .sidebar, .top-navbar, .sidebar-overlay {
        display: none !important;
    }
    .main-wrapper, .main-wrapper.sidebar-collapsed {
        margin-left: 0 !important;
    }
}


/* Pulse animation saat pertama kali load */
@keyframes pulse-once {
    0% { box-shadow: 0 2px 6px rgba(30, 58, 138, 0.25); }
    50% { box-shadow: 0 2px 20px rgba(249, 115, 22, 0.6); }
    100% { box-shadow: 0 2px 6px rgba(30, 58, 138, 0.25); }
}

.btn-toggle-sidebar.pulse-hint {
    animation: pulse-once 2s ease-in-out;
}

/* Badge indicator untuk sidebar state */
.btn-toggle-sidebar::after {
    content: '';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    border: 2px solid #fff;
    opacity: 0;
    transition: opacity 0.3s;
}

.sidebar.collapsed ~ .main-wrapper .btn-toggle-sidebar::after {
    opacity: 1;
}

.btn-toggle-sidebar {
    position: relative;
}


/* ========================================
   STAT CARDS - BOOTSTRAP GRID COMPATIBLE
   ======================================== */
.stat-card {
    display: flex;
    align-items: center; /* Rata tengah vertikal (icon & teks) */
    padding: 1.25rem;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
    height: 100%; /* KUNCI: Memaksa tinggi card mengikuti kolom tertinggi */
    min-height: 110px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    flex-shrink: 0; /* Mencegah icon gepeng */
    font-size: 1.5rem;
}

/* Warna background icon */
.stat-card-primary .stat-icon { background: #e0e7ff; color: #4f46e5; }
.stat-card-info .stat-icon { background: #dbeafe; color: #2563eb; }
.stat-card-danger .stat-icon { background: #fee2e2; color: #dc2626; }
.stat-card-warning .stat-icon { background: #ffedd5; color: #ea580c; }
.stat-card-success .stat-icon { background: #d1fae5; color: #059669; }

.stat-content {
    margin-left: 1rem;
    flex: 1;
    min-width: 0; /* Mencegah teks keluar batas */
}

.stat-value {
    font-size: 1.5rem; /* Ukuran font disesuaikan agar angka panjang muat */
    font-weight: 700;
    color: #1f2937;
    line-height: 1.2;
    margin-bottom: 0.25rem;
    word-break: break-word; /* Memaksa angka panjang turun baris jika terlalu sempit */
}

.stat-label {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 500;
    line-height: 1.3;
}


/* ========================================
   STAT CARDS - COMPACT VERTICAL LAYOUT
   ======================================== */
.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem 0.75rem; /* Padding diperkecil */
    border-radius: 8px;    /* Radius sudut diperkecil */
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    height: 100%;
    min-height: 100px;     /* Tinggi minimal dikurangi dari 130px */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;           /* Icon diperkecil dari 56px */
    height: 40px;
    border-radius: 8px;
    flex-shrink: 0;
    font-size: 1.25rem;    /* Ukuran icon diperkecil */
    margin-bottom: 0.5rem; /* Jarak icon ke teks diperkecil */
    margin-right: 0;
}

/* Warna background icon */
.stat-card-primary .stat-icon { background: #e0e7ff; color: #4f46e5; }
.stat-card-info .stat-icon { background: #dbeafe; color: #2563eb; }
.stat-card-danger .stat-icon { background: #fee2e2; color: #dc2626; }
.stat-card-warning .stat-icon { background: #ffedd5; color: #ea580c; }
.stat-card-success .stat-icon { background: #d1fae5; color: #059669; }

.stat-content {
    margin-left: 0;
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 1.25rem;    /* Angka diperkecil dari 1.5rem */
    font-weight: 700;
    color: #1f2937;
    line-height: 1.2;
    margin-bottom: 0.15rem;
    word-break: break-word;
}

.stat-label {
    font-size: 0.75rem;    /* Label diperkecil dari 0.85rem */
    color: #6b7280;
    font-weight: 500;
    line-height: 1.2;
    max-width: 90%;
}

/* Khusus Card Uang (Tetap sedikit lebih menonjol tapi tetap compact) */
.stat-card-success .stat-value.currency-value {
    font-size: 1.35rem; 
    letter-spacing: -0.5px;
    font-variant-numeric: tabular-nums;
}