/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f4f0;
    color: #333;
    height: 100vh;
    overflow: hidden;
}

/* ===== HEADER ===== */
header {
    background: linear-gradient(135deg, #2d7a3a, #4caf50);
    color: white;
    padding: 10px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.header-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-logo {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    object-fit: contain;
}

.header-container h1 {
    font-size: 1.3rem;
}

.header-container .subtitle {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* ===== APP LAYOUT (Sidebar + Content) ===== */
.app-layout {
    display: flex;
    height: calc(100vh - 56px);
    overflow: hidden;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 220px;
    background: white;
    border-right: 1px solid #e0e0e0;
    padding: 15px 10px;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.04);
    height: 100%;
    overflow-y: auto;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 14px;
    border: none;
    background: transparent;
    color: #555;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.sidebar-btn:hover {
    background: #e8f5e9;
    color: #2d7a3a;
}

.sidebar-btn.active {
    background: #4caf50;
    color: white;
}

.sidebar-icon {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.sidebar-label {
    white-space: nowrap;
}

/* ===== CONTENT AREA ===== */
.content-area {
    flex: 1;
    padding: 20px 25px;
    overflow-y: auto;
    height: 100%;
}

/* ===== SECTIONS ===== */
.section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-title {
    font-size: 1.4rem;
    color: #2d7a3a;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

/* ===== MENU GRID (Home) ===== */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    padding: 10px 0;
}

.menu-card {
    background: white;
    border-radius: 14px;
    padding: 40px 25px 35px;
    text-align: center;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 280px;
}

.menu-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.2);
    border-color: #4caf50;
}

.menu-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.menu-card h2 {
    font-size: 1.2rem;
    color: #2d7a3a;
    margin-bottom: 8px;
}

.menu-card p {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* ===== BACK BUTTON ===== */
.btn-back-sm {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: white;
    color: #666;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 20px;
    float: right !important;
    margin-top: -70px !important;
    position: relative;
    z-index: 10;
}

.btn-back-sm:hover {
    background: #f5f5f5;
    border-color: #4caf50;
    color: #4caf50;
}

.stok-menu {
    margin-top: 0;
    display: grid;
    padding-top: 40px;
    align-content: start;
}

.card-supplier {
    border: 2px solid #e8f5e9;
}

/* ===== SUB SECTIONS ===== */
.sub-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.sub-section.active {
    display: block;
}

/* ===== FORM CARD ===== */
.form-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
    margin-bottom: 25px;
}

.form-card h3 {
    font-size: 1.15rem;
    color: #2d7a3a;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e8f5e9;
}

/* ===== FORM ELEMENTS ===== */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #444;
    font-size: 0.88rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.93rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4caf50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* ===== FIELD ERROR (validasi inline) ===== */
.field-error {
    display: block;
    margin-top: 5px;
    color: #e53935;
    font-size: 0.78rem;
    font-weight: 500;
}

.form-group input.input-error,
.form-group textarea.input-error {
    border-color: #e53935;
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.1);
}

.form-group input.input-error:focus,
.form-group textarea.input-error:focus {
    border-color: #e53935;
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.15);
}

/* Hide number input arrows */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-row-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

/* ===== FORM ACTIONS ===== */
.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.btn-primary {
    padding: 12px 28px;
    background: linear-gradient(135deg, #4caf50, #2d7a3a);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.93rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-secondary {
    padding: 12px 28px;
    background: white;
    color: #666;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.93rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-secondary:hover {
    background: #f5f5f5;
    border-color: #bbb;
}

.btn-success {
    padding: 12px 28px;
    background: linear-gradient(135deg, #1565c0, #0d47a1);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.93rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.3);
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.2s ease;
}

.modal-box {
    background: white;
    border-radius: 14px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-box h3 {
    font-size: 1.2rem;
    color: #2d7a3a;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e8f5e9;
}

.modal-box table {
    width: 100%;
    margin-bottom: 20px;
    font-size: 0.85rem;
}

.modal-box th {
    background: #e8f5e9;
    padding: 8px 10px;
    font-size: 0.8rem;
}

.modal-box td {
    padding: 8px 10px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* ===== STEP INDICATOR ===== */
.step-indicator {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.step {
    flex: 1;
    padding: 10px 15px;
    background: #f5f5f5;
    border-radius: 8px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 500;
    color: #999;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.step.active {
    background: #e8f5e9;
    color: #2d7a3a;
    border-color: #4caf50;
}

/* ===== STEP FORM ===== */
.step-form {
    display: none;
}

.step-form.active {
    display: block;
}

/* ===== INFO BOX ===== */
.info-box {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    border-radius: 8px;
    padding: 12px 18px;
    margin-bottom: 20px;
    color: #2e7d32;
    font-size: 0.9rem;
}

/* ===== TABLE ===== */
.table-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
    overflow-x: auto;
}

/* ===== DATA TOOLBAR ===== */
.data-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
    flex-wrap: wrap;
}

.toolbar-left {
    flex: 1;
    min-width: 200px;
}

.search-input {
    width: 100%;
    max-width: 350px;
    padding: 10px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #4caf50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.table-card h3 {
    font-size: 1.1rem;
    color: #2d7a3a;
    margin-bottom: 15px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

thead {
    background: #e8f5e9;
}

th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #2d7a3a;
    border-bottom: 2px solid #c8e6c9;
}

td {
    padding: 11px 15px;
    border-bottom: 1px solid #f0f0f0;
    color: #555;
}

tbody tr:hover {
    background: #f9fdf9;
}

/* ===== STATUS BADGE ===== */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}

.status-badge.pending {
    background: #fff3e0;
    color: #e65100;
}

.status-badge.selesai {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-badge.proses {
    background: #e3f2fd;
    color: #1565c0;
}

/* ============================================
   ORDER PAGE - KATALOG STYLE
   ============================================ */

.order-content-full {
    width: 100%;
}

.order-tab {
    display: none;
}

.order-tab.active {
    display: block;
}

/* Search Bar */
.order-search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.order-search-bar input {
    flex: 1;
    padding: 10px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
}

.order-search-bar input:focus {
    outline: none;
    border-color: #4caf50;
}

.btn-cari {
    padding: 10px 20px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    font-weight: 500;
}

.btn-cari:hover {
    background: #388e3c;
}

/* Kategori */
.order-kategori {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.kat-btn {
    padding: 6px 14px;
    border: 2px solid #e0e0e0;
    background: white;
    color: #555;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.kat-btn:hover {
    border-color: #4caf50;
    color: #4caf50;
}

.kat-btn.active {
    background: #4caf50;
    color: white;
    border-color: #4caf50;
}

/* Order Main (Grid + Keranjang) */
.order-main {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
}

/* Product Grid */
.product-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.product-card {
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    transition: all 0.2s ease;
    background: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.product-card:hover {
    border-color: #4caf50;
    box-shadow: 0 3px 10px rgba(76,175,80,0.15);
}

.product-img {
    font-size: 2.2rem;
    margin-bottom: 6px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.product-kategori {
    font-size: 0.7rem;
    color: #999;
    margin-bottom: 5px;
}

.product-stok {
    font-size: 0.72rem;
    color: #2d7a3a;
    font-weight: 500;
    margin-bottom: 6px;
    background: #e8f5e9;
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
}

.product-stok.stok-habis {
    background: #fbe9e7;
    color: #e53935;
}

.product-card.product-habis {
    opacity: 0.6;
    border-color: #f0f0f0;
}

.product-card.product-habis:hover {
    border-color: #f0f0f0;
    box-shadow: none;
    transform: none;
}

.product-harga {
    font-size: 0.82rem;
    color: #e53935;
    font-weight: 600;
    margin-bottom: 8px;
}

.product-qty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border: 2px solid #e0e0e0;
    background: white;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-weight: 700;
    color: #555;
}

.qty-btn:first-child {
    border-radius: 6px 0 0 6px;
}

.qty-btn:last-child {
    border-radius: 0 6px 6px 0;
}

.qty-btn:hover {
    background: #4caf50;
    color: white;
    border-color: #4caf50;
}

.qty-input {
    width: 36px;
    height: 28px;
    border: 2px solid #e0e0e0;
    border-left: none;
    border-right: none;
    text-align: center;
    font-size: 0.82rem;
    font-weight: 600;
    color: #333;
    -moz-appearance: textfield;
}

.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Keranjang Panel */
.keranjang-panel {
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    padding: 18px;
    height: fit-content;
    position: sticky;
    top: 20px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.keranjang-panel h3 {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.keranjang-items {
    max-height: 280px;
    overflow-y: auto;
    margin-bottom: 12px;
}

.keranjang-empty {
    text-align: center;
    color: #bbb;
    font-size: 0.85rem;
    padding: 30px 0;
}

.keranjang-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 0.85rem;
}

.keranjang-item-left {
    flex: 1;
    min-width: 0;
}

.keranjang-item-name {
    font-weight: 500;
    color: #333;
    font-size: 0.88rem;
}

.keranjang-qty {
    color: #888;
    font-weight: 400;
    font-size: 0.8rem;
}

.keranjang-item-inputs {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
}

.k-harga-input {
    width: 80px;
    padding: 5px 8px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    font-size: 0.8rem;
    color: #e53935;
    font-weight: 600;
}

.k-harga-input:focus {
    outline: none;
    border-color: #4caf50;
}

.k-slash {
    font-size: 0.8rem;
    color: #999;
}

.k-satuan-select {
    padding: 5px 8px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    font-size: 0.8rem;
    color: #555;
    background: white;
    cursor: pointer;
}

.k-satuan-select:focus {
    outline: none;
    border-color: #4caf50;
}

.keranjang-item-detail {
    color: #888;
    font-size: 0.78rem;
}

.keranjang-item-price {
    font-weight: 600;
    color: #e53935;
    white-space: nowrap;
    font-size: 0.85rem;
    margin-left: 10px;
}

.keranjang-total {
    border-top: 2px solid #e8e8e8;
    padding-top: 12px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 12px;
    color: #2d7a3a;
}

.keranjang-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.btn-kosongkan {
    padding: 12px 10px;
    background: white;
    color: #e53935;
    border: 2px solid #e53935;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-kosongkan:hover {
    background: #fbe9e7;
}

.btn-pesan {
    padding: 12px 10px;
    background: linear-gradient(135deg, #4caf50, #2d7a3a);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-pesan:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-checkout {
    width: 100%;
    text-align: center;
    padding: 12px;
}

/* ===== CHECKOUT FORM ===== */
.checkout-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.checkout-header .section-title {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.btn-back-checkout {
    padding: 8px 16px;
    background: white;
    color: #555;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-back-checkout:hover {
    border-color: #4caf50;
    color: #4caf50;
}

.checkout-buttons {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.checkout-buttons .btn-kirim-pesanan {
    width: 100%;
}
.checkout-ringkasan {
    background: white;
    border: 2px solid #e8f5e9;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.checkout-ringkasan h3 {
    font-size: 1rem;
    color: #2d7a3a;
    margin-bottom: 12px;
}

.checkout-ringkasan table {
    width: 100%;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.checkout-ringkasan th {
    background: #f5f5f5;
    padding: 8px 12px;
    font-size: 0.8rem;
    color: #555;
}

.checkout-ringkasan td {
    padding: 8px 12px;
}

.checkout-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 2px solid #4caf50;
    font-weight: 600;
    font-size: 0.95rem;
}

.checkout-total-harga {
    font-size: 1.2rem;
    color: #e53935;
    font-weight: 700;
}

.btn-kirim-pesanan {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #4caf50, #2d7a3a);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-kirim-pesanan:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
}

/* ===== STOK BARANG (Expandable Cards) ===== */
.stok-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stok-empty {
    text-align: center;
    color: #999;
    padding: 40px;
    background: white;
    border-radius: 12px;
    font-size: 0.9rem;
}

.stok-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    border: 1px solid #e8e8e8;
    transition: all 0.2s ease;
}

.stok-card:hover {
    border-color: #c8e6c9;
}

.stok-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.stok-card-header:hover {
    background: #f9fdf9;
}

.stok-card-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stok-no {
    width: 28px;
    height: 28px;
    background: #e8f5e9;
    color: #2d7a3a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

.stok-nama {
    font-weight: 600;
    font-size: 0.95rem;
    color: #333;
}

.stok-kategori-badge {
    font-size: 0.7rem;
    background: #f0f0f0;
    color: #888;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.stok-card-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stok-total {
    background: #e8f5e9;
    color: #2d7a3a;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.stok-toggle {
    font-size: 0.8rem;
    color: #999;
    transition: transform 0.3s ease;
}

.stok-card.expanded .stok-toggle {
    transform: rotate(180deg);
}

.stok-card-detail {
    display: none;
    padding: 0 20px 15px;
    border-top: 1px solid #f0f0f0;
}

.stok-card.expanded .stok-card-detail {
    display: block;
}

.stok-card-detail table {
    width: 100%;
    font-size: 0.85rem;
    margin-top: 10px;
}

.stok-card-detail th {
    padding: 8px 12px;
    background: #f8f8f8;
    font-size: 0.8rem;
}

.stok-card-detail td {
    padding: 8px 12px;
    font-size: 0.85rem;
}

.transaksi-detail-footer {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    font-size: 0.83rem;
    color: #555;
    line-height: 1.8;
}

.transaksi-total-final {
    color: #e53935;
    font-size: 0.9rem;
}

/* ===== EXPANDABLE TABLE ROWS ===== */
.expandable-row {
    cursor: pointer;
    transition: background 0.2s ease;
}

.expandable-row:hover {
    background: #e8f5e9 !important;
}

.detail-row {
    background: #fafffe;
}

.detail-cell {
    padding: 15px 20px !important;
}

.inner-table {
    width: 100%;
    font-size: 0.82rem;
    border-collapse: collapse;
    margin: 0;
}

.inner-table th {
    background: #f5f5f5;
    padding: 8px 10px;
    font-size: 0.78rem;
    color: #555;
    border-bottom: 1px solid #e0e0e0;
}

.inner-table td {
    padding: 7px 10px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.82rem;
}

.btn-download-resi {
    margin-top: 12px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #1565c0, #0d47a1);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-download-resi:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(21, 101, 192, 0.3);
}

.btn-dl-row {
    padding: 4px 10px;
    background: #1565c0;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-dl-row:hover {
    background: #0d47a1;
}

/* ===== SUPPLIER LIST EXPANDABLE ===== */
.supplier-row {
    cursor: pointer;
    transition: background 0.2s ease;
}

.supplier-row:hover {
    background: #e8f5e9 !important;
}

.supplier-detail-cell {
    background: #fafffe;
    padding: 15px 20px !important;
}

.supplier-detail-content {
    font-size: 0.85rem;
    line-height: 1.8;
    color: #555;
}

.supplier-detail-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.barang-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.barang-tag {
    display: inline-block;
    background: #e8f5e9;
    color: #2d7a3a;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.78rem;
    font-weight: 500;
    border: 1px solid #c8e6c9;
}

.btn-update-barang {
    padding: 6px 14px;
    background: white;
    color: #1565c0;
    border: 1.5px solid #1565c0;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-update-barang:hover {
    background: #e3f2fd;
}

.checkbox-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    max-height: 250px;
    overflow-y: auto;
    margin-top: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #f9f9f9;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.checkbox-item:hover {
    background: #e8f5e9;
}

.checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #4caf50;
}

/* ===== TOAST ===== */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #2d7a3a;
    color: white;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 0.9rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transform: translateX(150%);
    transition: transform 0.4s ease;
    z-index: 9999;
}

.toast.show {
    transform: translateX(0);
}

/* ===== FOOTER ===== */
footer {
    display: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .order-main {
        grid-template-columns: 1fr;
    }

    .keranjang-panel {
        position: static;
    }
}

@media (max-width: 768px) {
    .app-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: static;
        flex-direction: row;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        padding: 10px;
    }

    .sidebar-nav {
        flex-direction: row;
        gap: 6px;
        overflow-x: auto;
    }

    .sidebar-btn {
        white-space: nowrap;
        padding: 10px 14px;
        font-size: 0.8rem;
    }

    .sidebar-label {
        display: none;
    }

    .sidebar-icon {
        font-size: 1.3rem;
    }

    .content-area {
        padding: 20px 15px;
    }

    .header-container h1 {
        font-size: 1.3rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-row-3 {
        grid-template-columns: 1fr;
    }

    .menu-grid {
        grid-template-columns: 1fr;
    }

    .step-indicator {
        flex-direction: column;
    }

    table {
        font-size: 0.78rem;
    }

    th, td {
        padding: 8px 10px;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

@media (max-width: 480px) {
    .form-card {
        padding: 20px 15px;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        text-align: center;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* ===== LOADING OVERLAY ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    animation: fadeIn 0.2s ease;
}

.loading-box {
    background: white;
    border-radius: 14px;
    padding: 35px 45px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top: 4px solid #4caf50;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 15px;
}

.loading-box p {
    color: #333;
    font-size: 0.95rem;
    font-weight: 500;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== SKELETON LOADING ===== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card {
    background: white;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.skeleton-card .skeleton-line {
    height: 14px;
    border-radius: 7px;
}

.skeleton-card .skeleton-line.w60 { width: 60%; }
.skeleton-card .skeleton-line.w30 { width: 30%; }
.skeleton-card .skeleton-line.w20 { width: 20%; }
.skeleton-card .skeleton-line.w40 { width: 40%; }

.skeleton-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.skeleton-product-card {
    background: white;
    border-radius: 12px;
    padding: 20px 12px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    border: 2px solid #e8e8e8;
}

.skeleton-product-card .skeleton-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin: 0 auto 10px;
}

.skeleton-product-card .skeleton-line {
    height: 12px;
    border-radius: 6px;
    margin: 6px auto;
}

.skeleton-product-card .skeleton-line.w80 { width: 80%; }
.skeleton-product-card .skeleton-line.w50 { width: 50%; }


/* ===== EDIT & DELETE BUTTONS (inline table) ===== */
.btn-edit-sm,
.btn-delete-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.btn-edit-sm {
    background: #e3f2fd;
    color: #1565c0;
}

.btn-edit-sm:hover {
    background: #bbdefb;
    transform: translateY(-1px);
}

.btn-delete-sm {
    background: #fbe9e7;
    color: #e53935;
}

.btn-delete-sm:hover {
    background: #ffcdd2;
    transform: translateY(-1px);
}


/* ===== PRODUCT LIST VIEW ===== */
.product-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    padding: 12px 18px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.product-list-item:hover {
    border-color: #4caf50;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.1);
}

.product-list-habis {
    opacity: 0.6;
}

.product-list-habis:hover {
    border-color: #e8e8e8;
    box-shadow: none;
}

.product-list-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.product-list-emoji {
    font-size: 1.6rem;
    width: 36px;
    text-align: center;
}

.product-list-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.product-list-name {
    font-weight: 600;
    font-size: 0.92rem;
    color: #333;
}

.product-list-kategori {
    font-size: 0.75rem;
    color: #999;
}

.product-list-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.product-list-stok {
    font-size: 0.8rem;
    color: #2d7a3a;
    font-weight: 500;
    background: #e8f5e9;
    padding: 4px 10px;
    border-radius: 12px;
    white-space: nowrap;
}

.product-list-stok.stok-habis {
    background: #fbe9e7;
    color: #e53935;
}

@media (max-width: 768px) {
    .product-list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .product-list-right {
        width: 100%;
        justify-content: space-between;
    }
}


/* ===== REKAP TABLE (pivot style) ===== */
.rekap-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #ccc;
    font-size: 0.83rem !important;
    margin-top: 8px;
}

.rekap-table th,
.rekap-table td {
    border: 1px solid #ddd;
    padding: 8px 10px !important;
    font-size: 0.83rem !important;
}

.rekap-table thead th {
    background: #f5f5f5 !important;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

.rekap-th-no { width: 40px; text-align: center; }
.rekap-th-nama { min-width: 150px; text-align: left; }
.rekap-th-client { min-width: 100px; text-align: center; white-space: nowrap; }
.rekap-th-jml { width: 50px; text-align: center; }
.rekap-th-harga { width: 90px; text-align: right; }
.rekap-th-total { width: 100px; text-align: right; }

.rekap-td-no { text-align: center; }
.rekap-td-nama { text-align: left; }
.rekap-td-qty { text-align: center; }
.rekap-td-qty.rekap-highlight { background: #fffde7; font-weight: 600; }
.rekap-td-jml { text-align: center; font-weight: 600; }
.rekap-td-harga { text-align: right; }
.rekap-td-total { text-align: right; font-weight: 600; }

.rekap-table tbody tr:hover {
    background: #f9fdf9;
}

.rekap-day-section {
    border-bottom: 2px solid #e0e0e0;
    padding: 14px 0;
    margin-bottom: 10px;
}

.rekap-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.rekap-day-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: #2d7a3a;
}

.rekap-day-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rekap-day-total {
    font-weight: 600;
    color: #333;
    font-size: 0.88rem;
}


/* ===== LANDING PAGE ===== */
.landing-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.landing-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2d7a3a 0%, #4caf50 50%, #81c784 100%);
}

.landing-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
}

.landing-logo {
    width: 120px;
    height: 120px;
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    object-fit: contain;
    background: white;
    padding: 10px;
}

.landing-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.landing-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 40px;
}

.landing-btn {
    padding: 14px 50px;
    background: white;
    color: #2d7a3a;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.landing-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* ===== LOGIN OVERLAY ===== */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5500;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    background: rgba(0, 0, 0, 0.4);
    animation: fadeIn 0.3s ease;
}

.login-box {
    background: white;
    border-radius: 18px;
    padding: 40px 35px;
    width: 90%;
    max-width: 380px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    text-align: center;
    position: relative;
}

.login-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    margin-bottom: 15px;
    object-fit: contain;
}

.login-title {
    font-size: 1.5rem;
    color: #2d7a3a;
    margin-bottom: 25px;
    font-weight: 700;
}

.login-box .form-group {
    text-align: left;
    margin-bottom: 18px;
}

.login-box .form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #444;
    font-size: 0.88rem;
}

.login-box .form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.login-box .form-group input:focus {
    outline: none;
    border-color: #4caf50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.login-submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #4caf50, #2d7a3a);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.login-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
}

.login-close {
    position: absolute;
    top: 15px;
    right: 18px;
    background: none;
    border: none;
    font-size: 1.3rem;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
}

.login-close:hover {
    color: #333;
}


/* ===== SIDEBAR PROFILE ===== */
.sidebar-profile {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px 14px;
    border-top: 1px solid #e0e0e0;
    background: white;
}

.sidebar-profile-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.sidebar-profile-icon {
    font-size: 1.2rem;
    width: 32px;
    height: 32px;
    background: #e8f5e9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-profile-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
}

.sidebar-profile-actions {
    display: flex;
    gap: 8px;
}

.sidebar-btn-profile {
    flex: 1;
    padding: 8px 10px;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border: none;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 500;
    color: #1565c0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-btn-profile:hover {
    background: linear-gradient(135deg, #bbdefb, #90caf9);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(21, 101, 192, 0.2);
}

.sidebar-btn-logout {
    flex: 1;
    padding: 8px 10px;
    background: linear-gradient(135deg, #fbe9e7, #ffcdd2);
    border: none;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 500;
    color: #e53935;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-btn-logout:hover {
    background: linear-gradient(135deg, #ffcdd2, #ef9a9a);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(229, 57, 53, 0.2);
}

.sidebar {
    position: relative;
    padding-bottom: 100px;
}



/* ===== PASSWORD TOGGLE ===== */
.pass-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.pass-input-wrap input {
    width: 100%;
    padding-right: 40px;
}

.pass-toggle {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.pass-toggle:hover {
    opacity: 1;
}


/* ===== PASSWORD RULES ===== */
.pass-rules {
    margin-top: 12px;
    padding: 12px 14px;
    background: #f5f5f5;
    border-radius: 8px;
    font-size: 0.78rem;
    color: #555;
}

.pass-rules p {
    margin-bottom: 6px;
    font-size: 0.8rem;
}

.pass-rules ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pass-rules ul li {
    padding: 2px 0;
    padding-left: 16px;
    position: relative;
}

.pass-rules ul li::before {
    content: "•";
    position: absolute;
    left: 4px;
    color: #4caf50;
}


/* ===== IMAGE PREVIEW OVERLAY ===== */
.image-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 8000;
    cursor: pointer;
}

.image-preview-box {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.image-preview-box img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.image-preview-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 36px;
    height: 36px;
    background: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-preview-close:hover {
    background: #f5f5f5;
}


/* ===== NOTIFICATION BADGE ===== */
.notif-badge {
    position: absolute;
    top: 4px;
    right: 8px;
    background: #e53935;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}


/* ===== NOTIFICATION CARD BADGE ===== */
.notif-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #e53935;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    box-shadow: 0 2px 6px rgba(229, 57, 53, 0.4);
}
