/* === Reset dasar === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #f4f6f9;
    color: #333;
}

/* === Sidebar === */
.sidebar {
    width: 220px;
    background: #2c3e50;
    color: #fff;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    padding: 20px 0;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
}

.sidebar h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 20px;
    color: #ecf0f1;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar ul li {
    margin: 15px 0;
}

.sidebar ul li a {
    display: block;
    padding: 10px 20px;
    color: #ecf0f1;
    text-decoration: none;
    transition: 0.3s;
    font-size: 15px;
}

.sidebar ul li a:hover,
.sidebar ul li a.active {
    background: #1abc9c;
    color: #fff;
    border-radius: 4px;
}

.sidebar ul li a.logout {
    background: #e74c3c;
    border-radius: 4px;
}

.sidebar ul li a.logout:hover {
    background: #c0392b;
}

/* === Main Content === */
.main-content {
    margin-left: 220px; /* supaya tidak ketutup sidebar */
    padding: 20px;
}

.main-content h1 {
    margin-bottom: 20px;
    font-size: 28px;
    color: #2c3e50;
}

/* === Info Boxes === */
.info-boxes {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.info-box {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.info-box h3 {
    font-size: 16px;
    color: #555;
    margin-bottom: 10px;
}

.info-box p {
    font-size: 20px;
    font-weight: bold;
    color: #2c3e50;
}

/* === Charts Layout === */
.charts-container {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2 kolom biar sejajar */
    gap: 20px;
}

.chart-box {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    height: 400px; /* fix tinggi supaya chart tidak lari turun */
}

.chart-box h4 {
    margin-bottom: 10px;
    font-size: 16px;
    color: #2c3e50;
}

.chart-box canvas {
    width: 100% !important;
    height: 300px !important;
}

/* === Tombol Umum === */
.btn-tambah,
.btn-edit,
.btn-hapus {
    display: inline-block;
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 5px;
    text-decoration: none;
    margin: 2px;
    transition: 0.3s;
}

/* Tambah Produk */
.btn-tambah {
    background: #27ae60;
    color: #fff;
}
.btn-tambah:hover {
    background: #1e8449;
}

/* Edit */
.btn-edit {
    background: #2980b9;
    color: #fff;
}
.btn-edit:hover {
    background: #21618c;
}

/* Hapus */
.btn-hapus {
    background: #e74c3c;
    color: #fff;
}
.btn-hapus:hover {
    background: #c0392b;
}

/* === Form Pencarian === */
.produk-search {
    display: flex;
    gap: 5px;
}
.produk-search input[type="text"] {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 180px;
}
.produk-search button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    background: #16a085;
    color: #fff;
    cursor: pointer;
}
.produk-search button:hover {
    background: #138d75;
}

/* === Tabel Produk === */
table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
table thead {
    background: #2c3e50;
    color: #fff;
}
table th, table td {
    padding: 10px;
    border: 1px solid #ddd;
    font-size: 14px;
    text-align: center;
}
table tbody tr:hover {
    background: #f1f1f1;
}
table img {
    border-radius: 4px;
    border: 1px solid #ccc;
}

/* === Pagination === */
.pagination {
    margin-top: 20px;
    text-align: center;
}
.pagination a, 
.pagination span {
    display: inline-block;
    padding: 6px 12px;
    margin: 2px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
}
.pagination a {
    background: #3498db;
    color: #fff;
}
.pagination a:hover {
    background: #2980b9;
}
.pagination span {
    background: #bdc3c7;
    color: #2c3e50;
}

/* === Layout dengan Sidebar === */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f5f6fa;
}

/* Sidebar sudah ada, jadi kita atur main-content */
.main-content {
    margin-left: 250px; /* lebar sidebar */
    padding: 20px;
    min-height: 100vh;
    background: #f9f9f9;
    box-sizing: border-box;
}

/* === Form Edit Produk === */
.form-edit-produk {
    max-width: 600px; /* jangan terlalu lebar */
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-edit-produk label {
    font-weight: 600;
    margin-bottom: 4px;
    color: #2c3e50;
    font-size: 14px;
}

.form-edit-produk input[type="text"],
.form-edit-produk input[type="number"],
.form-edit-produk input[type="file"],
.form-edit-produk textarea {
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.form-edit-produk input:focus,
.form-edit-produk textarea:focus {
    border-color: #3498db;
    outline: none;
}

/* Preview gambar */
.form-edit-produk img {
    border-radius: 5px;
    border: 1px solid #ddd;
    margin-top: 6px;
}

/* Tombol */
.form-edit-produk .btn-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.form-edit-produk button[type="submit"] {
    background: #27ae60;
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}
.form-edit-produk button[type="submit"]:hover {
    background: #1e8449;
}

.form-edit-produk .btn-edit {
    display: inline-block;
    padding: 8px 14px;
    text-decoration: none;
    border-radius: 5px;
}

/* === Layout dengan Sidebar === */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f5f6fa;
}

/* Sidebar sudah ada, jadi konten utama bergeser */
.main-content {
    margin-left: 250px; /* lebar sidebar */
    padding: 20px;
    min-height: 100vh;
    background: #f9f9f9;
    box-sizing: border-box;
}

.main-content h1 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #2c3e50;
}

/* === Form Tambah Produk === */
.form-produk {
    max-width: 600px; /* form tidak terlalu lebar */
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-produk label {
    font-weight: 600;
    margin-bottom: 4px;
    color: #2c3e50;
    font-size: 14px;
}

.form-produk input[type="text"],
.form-produk input[type="number"],
.form-produk input[type="file"],
.form-produk textarea {
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.form-produk input:focus,
.form-produk textarea:focus {
    border-color: #3498db;
    outline: none;
}

/* Tombol */
.form-produk .btn-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.form-produk button[type="submit"] {
    background: #27ae60;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}
.form-produk button[type="submit"]:hover {
    background: #1e8449;
}

.form-produk .btn-edit {
    display: inline-block;
    padding: 10px 16px;
    text-decoration: none;
    border-radius: 5px;
    background: #bdc3c7;
    color: #2c3e50;
    transition: background 0.3s;
}
.form-produk .btn-edit:hover {
    background: #95a5a6;
}

/* === Layout utama === */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
}

/* === Sidebar fix dari includes/sidebar.php === */
.sidebar {
    width: 220px;
    background: #2c3e50;
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    color: #fff;
    padding: 20px;
}

.sidebar h2 {
    margin-bottom: 20px;
    font-size: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 10px;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
    margin: 12px 0;
}

.sidebar ul li a {
    color: #ecf0f1;
    text-decoration: none;
    padding: 8px 12px;
    display: block;
    border-radius: 5px;
    transition: background 0.2s;
}

.sidebar ul li a:hover {
    background: #34495e;
}

/* === Konten utama === */
.main-content {
    margin-left: 240px;
    padding: 25px;
    background: #fff;
    min-height: 100vh;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.05);
}

.main-content h1 {
    margin-bottom: 20px;
    font-size: 26px;
    color: #2c3e50;
}

/* === Filter bar === */
.pesanan-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.pesanan-filter select,
.pesanan-filter input[type="text"] {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    outline: none;
    font-size: 14px;
}

.pesanan-filter button {
    background: #3498db;
    border: none;
    color: #fff;
    padding: 7px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s;
}

.pesanan-filter button:hover {
    background: #2980b9;
}

/* Tombol tambahan */
.btn-edit {
    background: #2ecc71;
    color: #fff !important;
    padding: 6px 12px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 13px;
    margin: 2px;
    display: inline-block;
    transition: background 0.2s;
}

.btn-edit:hover {
    background: #27ae60;
}

.btn-hapus {
    background: #e74c3c;
    color: #fff !important;
    padding: 6px 12px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 13px;
    margin: 2px;
    display: inline-block;
    transition: background 0.2s;
}

.btn-hapus:hover {
    background: #c0392b;
}

/* === Tabel pesanan === */
table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

table thead {
    background: #34495e;
    color: #fff;
}

table thead th {
    padding: 10px;
    text-align: left;
    font-size: 14px;
}

table tbody td {
    padding: 10px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

table tbody tr:hover {
    background: #f1f7ff;
}

/* === Pagination === */
.pagination {
    margin-top: 20px;
    text-align: center;
}

.pagination a,
.pagination span {
    margin: 0 5px;
    padding: 6px 12px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
}

.pagination a {
    background: #3498db;
    color: #fff;
    transition: 0.2s;
}

.pagination a:hover {
    background: #2980b9;
}

.pagination span {
    background: #bdc3c7;
    color: #2c3e50;
}

/* === Layout Utama === */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f9f9f9;
}

/* Konten utama berdampingan sidebar */
.main-content {
    margin-left: 250px; /* sidebar lebarnya 250px */
    padding: 20px;
    min-height: 100vh;
    background: #fff;
    box-shadow: -2px 0 5px rgba(0,0,0,0.05);
}

/* Judul */
.main-content h1 {
    margin-bottom: 20px;
    font-size: 26px;
    color: #333;
}

/* === Filter === */
.produksi-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.produksi-filter select,
.produksi-filter input[type="text"] {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    outline: none;
}

.produksi-filter button {
    padding: 8px 16px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
}

.produksi-filter button:hover {
    background: #2980b9;
}

.produksi-filter .btn-edit {
    padding: 8px 12px;
    background: #777;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
}

.produksi-filter .btn-edit:hover {
    background: #555;
}

/* === Tabel Produksi === */
table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

table thead {
    background: #3498db;
    color: #fff;
}

table th, table td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

table tr:nth-child(even) {
    background: #fdfdfd;
}

/* === Tombol di tabel === */
.btn-table {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: 0.2s;
    border: none;
    cursor: pointer;
}

/* Variasi tombol */
.btn-table.save {
    background: #27ae60;
    color: #fff;
}
.btn-table.save:hover {
    background: #1e8449;
}

.btn-table.detail {
    background: #f39c12;
    color: #fff;
}
.btn-table.detail:hover {
    background: #d68910;
}

/* === Status Badge === */
.status-badge {
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    color: #fff;
    display: inline-block;
    min-width: 90px;
}

/* Variasi status */
.status-menunggu {
    background: #e67e22;
}
.status-proses {
    background: #3498db;
}
.status-selesai {
    background: #2ecc71;
}
/* --- Layout wrapper dengan sidebar --- */
.flex-wrapper {
    display: flex;
    min-height: 100vh;
}
.main-content {
    flex: 1;
    padding: 25px;
    background: #f4f7fa;
}

/* --- Card --- */
.card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
    margin-bottom: 20px;
}
.card h3 { margin-top: 0; }

/* --- Table detail --- */
.detail-table { width: 100%; border-collapse: collapse; }
.detail-table td { padding: 8px; border-bottom: 1px solid #eee; }

/* --- Badge Status --- */
.badge { padding: 4px 10px; border-radius: 4px; font-size: 12px; color: #fff; }
.badge-pending { background: #f39c12; }
.badge-diproses { background: #3498db; }
.badge-selesai { background: #2ecc71; }
.badge-dibatalkan { background: #e74c3c; }
.badge-menunggu { background: #95a5a6; }
.badge-proses   { background: #2980b9; }

/* --- Alert Success --- */
.alert-success {
    background: #eafaf1;
    border-left: 4px solid #2ecc71;
    padding: 10px;
    margin-bottom: 15px;
    color: #2c662d;
    border-radius: 5px;
}

/* --- Form Update Status --- */
.status-form label {
    display: block;
    margin: 10px 0 5px;
    font-weight: 600;
}
.status-form select,
.status-form textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-bottom: 12px;
}
.status-form textarea { resize: vertical; }
.form-actions { margin-top: 10px; }

/* --- Buttons --- */
.btn {
    background: #16a085;
    color: #fff;
    padding: 8px 14px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}
.btn:hover { background: #138a72; }

.btn-secondary {
    background: #95a5a6;
}
.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-view {
    display: inline-block;
    padding: 4px 10px;
    background: #3498db;
    color: #fff;
    font-size: 13px;
    border-radius: 4px;
    text-decoration: none;
}
.btn-view:hover { background: #2980b9; }

/* ==== Layout Laporan + Sidebar ==== */
body.laporan-page {
    font-family: "Segoe UI", Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #f5f6fa;
}

/* Flex wrapper untuk sidebar + konten */
body.laporan-page .flex-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
body.laporan-page .sidebar {
    width: 250px;
    flex-shrink: 0;
    background: #2c3e50;
    color: #fff;
    padding: 20px;
}
