/* ================= CSS LAYOUT STANDARISASI ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Perpindahan Layer */
.page-layer { display: none; width: 100%; height: 100vh; }
.page-layer.active { display: flex; }

/* ================= THEME LOGIN ================= */
#page-login {
    background: radial-gradient(circle, #24293e 0%, #0f111a 100%);
    align-items: center;
    justify-content: center;
}
.login-card {
    background: #ffffff;
    padding: 40px;
    border-radius: 16px;
    width: 100%;
    max-width: 360px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
}
.login-logo { text-align: center; margin-bottom: 25px; }
.login-logo h2 { color: #1a1b26; font-size: 26px; }
.login-logo p { color: #6b7280; font-size: 13px; }

.input-group { margin-bottom: 15px; }
.input-group label { display: block; font-size: 12px; font-weight: 700; color: #4b5563; margin-bottom: 5px; }
.input-group input { width: 100%; padding: 10px; border: 1px solid #d1d5db; border-radius: 6px; background: #f9fafb; }

/* ================= BACKGROUND IMPLEMENTATION CORE ================= */
.main-layout {
    display: none;
    width: 100%;
    height: 100vh;
    background-image: url('background_gudang.png'); /* Gambar Anda Terbaca Global */
    background-size: cover;
    background-position: center;
}
.main-layout.active { display: flex; }

/* SIDEBAR LAYOUT */
.sidebar {
    width: 250px;
    height: 100%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e5e7eb;
}
.sidebar-brand { padding: 25px 20px; border-bottom: 1px solid #f3f4f6; }
.brand-logo { font-size: 20px; font-weight: 800; color: #111827; }
.brand-sub { font-size: 10px; color: #9ca3af; font-weight: 600; }

.sidebar-menu { flex: 1; padding: 20px 10px; display: flex; flex-direction: column; gap: 5px; }
.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: #4b5563;
    text-decoration: none;
    font-weight: 600;
    border-radius: 8px;
}
.menu-item:hover, .menu-item.active { background: #1e293b; color: #ffffff; }
.menu-item .icon { margin-right: 10px; }

.sidebar-footer { padding: 15px 10px; }
.btn-logout-sidebar {
    width: 100%; background: transparent; border: 1px solid #ef4444; color: #ef4444;
    padding: 10px; border-radius: 8px; font-weight: 600; cursor: pointer;
}
.btn-logout-sidebar:hover { background: #fef2f2; }

/* WRAPPER KONTEN & FORM FILTER */
.content-wrapper { flex: 1; padding: 30px; overflow-y: auto; background: rgba(15, 17, 26, 0.35); }
.tab-content { display: none; }
.tab-content.active { display: block; }

.content-header {
    background: rgba(255, 255, 255, 0.96); padding: 20px 25px; border-radius: 12px;
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px;
}
.content-header h1 { font-size: 22px; color: #111827; }
.content-header p { font-size: 13px; color: #6b7280; }

.filter-bar {
    display: flex; gap: 15px; margin-bottom: 20px; max-width: 600px;
}
.filter-bar input { flex: 1; padding: 10px; border-radius: 6px; border: 1px solid #ccc; }
.filter-bar select { padding: 10px; border-radius: 6px; border: 1px solid #ccc; }

/* DASHBOARD CARD & BADGE */
.grid-container { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 25px; }
.card {
    background: rgba(255, 255, 255, 0.96); padding: 20px; border-radius: 12px;
    flex: 1; min-width: 220px; height: 120px; display: flex; flex-direction: column;
    justify-content: space-between; box-shadow: 0 4px 15px rgba(0,0,0,0.1); cursor: pointer;
}
.card.tersedia { border-left: 6px solid #10b981; }
.card.habis { border-left: 6px solid #ef4444; }
.card.info { border-left: 6px solid #3b82f6; }

.badge { align-self: flex-start; padding: 4px 10px; border-radius: 12px; color: #fff; font-size: 11px; font-weight: 700; }
.badge.success { background: #10b981; }
.badge.danger { background: #ef4444; }
.badge.warning { background: #f59e0b; }
.badge.info { background: #3b82f6; }

/* TABEL DATA */
.table-container { background: rgba(255, 255, 255, 0.96); padding: 20px; border-radius: 12px; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 12px 15px; border-bottom: 1px solid #e5e7eb; text-align: left; }
.data-table th { background: #f3f4f6; font-size: 12px; text-transform: uppercase; color: #374151; }

/* BUTTONS */
.btn-primary { background: #1e293b; color: white; border: none; padding: 12px; border-radius: 6px; font-weight: 700; cursor: pointer; width: 100%; }
.btn-action { border: none; padding: 10px 16px; border-radius: 6px; color: white; font-weight: 700; cursor: pointer; }
.btn-action.green { background: #10b981; }
.btn-action.blue { background: #3b82f6; }
.btn-delete { background: #ef4444; border: none; color: white; padding: 4px 8px; border-radius: 4px; cursor: pointer; }

/* MODAL / POPUP INTERACTION */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); display: none; align-items: center; justify-content: center; z-index: 100;
}
.modal-box { background: white; padding: 30px; border-radius: 12px; width: 100%; max-width: 450px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }