* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", Arial, sans-serif;
}

body {
    background: #f2f2f2;
    color: #333;
}

/* SIDEBAR */
.sidebar {
    width: 220px;
    background: #3a3a3a;
    position: fixed;
    top: 0;
    bottom: 0;
    padding-top: 20px;
}

.logo {
    text-align: center;
    color: #f57c00;
    margin-bottom: 30px;
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li a {
    display: block;
    padding: 14px 22px;
    color: #eee;
    text-decoration: none;
}

.sidebar ul li a:hover,
.sidebar ul li a.active {
    background: #2b2b2b;
    color: #f57c00;
}

/* HEADER */
.header {
    margin-left: 220px;
    height: 60px;
    background: linear-gradient(90deg, #f57c00, #e65100);
    color: #fff;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* CONTENT */
.content {
    margin-left: 220px;
    padding: 25px;
}

.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* CARD */
.card {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    text-align: center;
}

.card h4 {
    color: #555;
}

.card p {
    font-size: 36px;
    font-weight: bold;
    color: #f57c00;
}

/* STATUS */
.tersedia { border-left: 6px solid #2e7d32; }
.habis { border-left: 6px solid #c62828; }
.kategori { border-left: 6px solid #546e7a; }

/* DIAGRAM */
.section {
    margin-top: 40px;
}

.chart-box {
    max-width: 600px;
    margin: 20px auto;
}

.chart-box canvas {
    height: 260px !important;
}

/* FOOTER */
.footer {
    margin-top: 40px;
    text-align: center;
    font-size: 14px;
    color: #777;
}

/* =========================
   HALAMAN PRODUK SAJA
========================= */

/* JUDUL */
.content h3 {
    color: #f57c00;
    margin-bottom: 15px;
}

/* =========================
   FORM TAMBAH PRODUK
========================= */
.card form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.card form input,
.card form select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

.card form button {
    grid-column: span 2;
    background: #f57c00;
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

.card form button:hover {
    background: #ef6c00;
}

/* =========================
   TABEL PRODUK
========================= */
.table-box table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table-box thead {
    background: #f57c00;
    color: #fff;
}

.table-box th,
.table-box td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left; /* RATA KIRI */
}

.table-box tbody tr:nth-child(even) {
    background: #f9f9f9;
}

.table-box tbody tr:hover {
    background: #fff3e0;
}

/* =========================
   KOLOM KHUSUS
========================= */
.table-box td:nth-child(1) {
    width: 40px;
    text-align: center;
    font-weight: bold;
}

.table-box td:nth-child(4),
.table-box td:nth-child(5) {
    font-weight: bold;
}

/* =========================
   STATUS PRODUK
========================= */
.table-box td:nth-child(6) {
    text-transform: capitalize;
    font-weight: bold;
    color: #2e7d32;
}

/* =========================
   AKSI
========================= */
.table-box td a {
    color: #e53935;
    text-decoration: none;
    font-weight: bold;
}

.table-box td a:hover {
    text-decoration: underline;
}

/* LOGIN */
.login-page {
    background: #f4f4f4;
    display: flex;
    height: 100vh;
    justify-content: center;
    align-items: center;
}

.login-box {
    background: #fff;
    padding: 30px;
    width: 320px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,.15);
}

.login-box h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #f57c00;
}

.login-box input {
    width: 100%;
    padding: 10px;
    margin-bottom: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.login-box button {
    width: 100%;
    padding: 10px;
    background: #f57c00;
    border: none;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    border-radius: 5px;
}

.login-box button:hover {
    background: #e86c00;
}

.error {
    color: red;
    text-align: center;
    margin-bottom: 10px;
}
