/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f9fafb;
    color: #1f2937;
}

/* Layout Styles */
.app-layout {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

.app-main-wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.app-content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: 100%;
}

@media (min-width: 1024px) {
    .app-content-area {
        width: calc(100% - 256px); /* w-64 = 256px */
    }
}

.app-main-content {
    flex: 1;
    overflow-y: auto;
    background-color: #ffffff;
    padding: 16px;
}

@media (min-width: 640px) {
    .app-main-content {
        padding: 24px;
    }
}

/* Sidebar Styles */
#sidebar {
    transition: transform 0.3s ease-in-out;
    z-index: 50;
}

#sidebar.hidden {
    transform: translateX(-100%);
}

@media (min-width: 1024px) {
    #sidebar {
        position: static;
        display: block !important;
    }
    
    #sidebar.hidden {
        transform: translateX(0);
    }
}

/* Sidebar Scroll - Hidden Scrollbar */
.sidebar-scroll {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.sidebar-scroll::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 40;
}

.sidebar-overlay.active {
    display: block;
}

/* Menu Item Active State */
.menu-item.active {
    background-color: #dbeafe;
    color: #2563eb;
    font-weight: 600;
}

/* Sub Menu Styles */
.submenu {
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.2s ease-out;
    opacity: 0;
}

.submenu.hidden {
    max-height: 0;
}

.submenu.open {
    max-height: 500px;
    opacity: 1;
}

.submenu-item.active {
    background-color: #dbeafe;
    color: #2563eb;
    font-weight: 600;
}

#masterDataArrow.rotate,
#subMasterArrow.rotate,
#bahanBakuArrow.rotate,
#planningArrow.rotate,
#produksiArrow.rotate,
#finishGoodArrow.rotate,
#shippingArrow.rotate {
    transform: rotate(180deg);
}

/* Content Cards */
.content-card {
    background: white;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

