/* --- Variables & Reset --- */
:root {
    --bg-base: #0B0A0A;
    --bg-surface: rgba(30, 27, 24, 0.6);
    --bg-surface-hover: rgba(45, 40, 35, 0.8);
    
    --primary: #F5A623; /* Golden Yellow for Banana */
    --primary-hover: #E09419;
    --primary-light: rgba(245, 166, 35, 0.15);
    
    --accent: #5D4037; /* Brown for Chocolate */
    
    --success: #10B981;
    --success-bg: rgba(16, 185, 129, 0.15);
    --danger: #EF4444;
    --danger-bg: rgba(239, 68, 68, 0.15);
    
    --text-main: #F3F4F6;
    --text-muted: #9CA3AF;
    --border: rgba(255, 255, 255, 0.08);
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    /* Subtle background gradient pattern */
    background-image: 
        radial-gradient(at 0% 0%, rgba(93, 64, 55, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(245, 166, 35, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
}

/* --- Layout --- */
.app-container {
    display: flex;
    height: 100vh;
}

.mt-4 { margin-top: 1.5rem; }
.w-100 { width: 100%; }
.h-100 { height: 100%; }
.flex-col { display: flex; flex-direction: column; }
.flex-grow { flex-grow: 1; overflow: auto; }

/* --- Sidebar --- */
.sidebar {
    width: 260px;
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border);
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 1rem 2rem 1rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    box-shadow: 0 4px 15px rgba(245, 166, 35, 0.3);
}

.logo h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.text-primary {
    color: var(--primary);
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-muted);
    font-weight: 500;
}

.nav-item i {
    font-size: 1.25rem;
}

.nav-item:hover {
    background: var(--bg-surface-hover);
    color: var(--text-main);
}

.nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
    border-left: 3px solid var(--primary);
}

/* --- Main Content --- */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.top-header {
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title h1 {
    font-size: 1.75rem;
    font-weight: 600;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-surface);
    padding: 8px 16px 8px 8px;
    border-radius: 50px;
    border: 1px solid var(--border);
}

.avatar {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-base);
    font-size: 1.2rem;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* --- Page Sections --- */
.page-section {
    display: none;
    padding: 0 2rem 2rem 2rem;
    flex: 1;
    overflow-y: auto;
    animation: fadeIn 0.4s ease forwards;
}

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

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

/* --- Components --- */
.glass-panel {
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}

.panel-header {
    margin-bottom: 1.5rem;
}

.panel-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.panel-header.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- Dashboard Metrics --- */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.metric-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: var(--transition);
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.metric-card.highlight {
    background: linear-gradient(135deg, rgba(245, 166, 35, 0.1), rgba(93, 64, 55, 0.2));
    border-color: rgba(245, 166, 35, 0.3);
}

.metric-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.metric-icon.success { background: var(--success-bg); color: var(--success); }
.metric-icon.danger { background: var(--danger-bg); color: var(--danger); }
.metric-icon.primary { background: var(--primary-light); color: var(--primary); }

.metric-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.metric-value {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* --- Forms --- */
.form-container {
    max-width: 800px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

input, select {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: var(--text-main);
    font-size: 1rem;
    transition: var(--transition);
    outline: none;
}

input:focus, select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

select option {
    background: var(--bg-base);
    color: var(--text-main);
}

.form-summary {
    background: rgba(0,0,0,0.3);
    padding: 1rem;
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

.total-highlight {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

/* --- Buttons --- */
.btn {
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-primary {
    background: var(--primary);
    color: var(--bg-base);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(245, 166, 35, 0.4);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #DC2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* --- Tables --- */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th, .data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.badge {
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-penjualan {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-pengeluaran {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* --- Toast --- */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.toast {
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease forwards;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.danger { border-left: 4px solid var(--danger); }

.toast i { font-size: 1.25rem; }
.toast.success i { color: var(--success); }
.toast.danger i { color: var(--danger); }

@keyframes slideIn {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100%); }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        padding: 1rem;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    
    .logo {
        margin-bottom: 0;
        padding: 0;
        border-bottom: none;
    }
    
    .logo h2 { display: none; }
    
    .nav-links {
        flex-direction: row;
        gap: 0.5rem;
    }
    
    .nav-item span { display: none; }
    .nav-item { padding: 10px; }
    
    .top-header {
        padding: 1rem 1.5rem;
    }
    
    .page-section {
        padding: 0 1.5rem 1.5rem 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .panel-header.filter-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .filters {
        width: 100%;
        display: flex;
        justify-content: space-between;
    }
}

/* ============================================
   KASIR (POS) STYLES
   ============================================ */

.kasir-section {
    padding: 0 2rem 2rem 2rem;
    overflow: hidden;
    height: calc(100vh - 100px);
}

.kasir-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 1.5rem;
    height: 100%;
}

/* --- Left: Product Catalog --- */
.kasir-left {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.kasir-search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.kasir-search-bar i {
    font-size: 1.25rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.kasir-search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 8px 0;
    font-size: 1rem;
    color: var(--text-main);
    outline: none;
    box-shadow: none;
}

.kasir-search-bar input:focus {
    border: none;
    box-shadow: none;
}

.kasir-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    overflow-y: auto;
    flex: 1;
    padding-right: 4px;
}

/* Scrollbar styling */
.kasir-product-grid::-webkit-scrollbar,
.kasir-cart-list::-webkit-scrollbar { width: 4px; }
.kasir-product-grid::-webkit-scrollbar-track,
.kasir-cart-list::-webkit-scrollbar-track { background: transparent; }
.kasir-product-grid::-webkit-scrollbar-thumb,
.kasir-cart-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.product-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    user-select: none;
}

.product-edit-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    opacity: 0;
    transition: var(--transition);
    z-index: 2;
}

.product-card:hover .product-edit-btn {
    opacity: 1;
}

.product-edit-btn:hover {
    background: var(--primary);
    color: var(--bg-base);
    border-color: var(--primary);
}

.product-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-light), transparent);
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(245, 166, 35, 0.2);
}

.product-card:hover::before {
    opacity: 1;
}

.product-card:active {
    transform: scale(0.96);
}

.product-emoji {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: block;
    position: relative;
    z-index: 1;
}

.product-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
    line-height: 1.3;
}

.product-price {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary);
    position: relative;
    z-index: 1;
}

/* --- Right: Cart & Payment --- */
.kasir-right {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.kasir-right .glass-panel {
    overflow: hidden;
}

.kasir-cart-list {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    margin-bottom: 0.75rem;
}

.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--text-muted);
    gap: 8px;
}

.cart-empty i {
    font-size: 3rem;
    opacity: 0.4;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    animation: fadeIn 0.25s ease;
}

.cart-item-emoji {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-price {
    font-size: 0.8rem;
    color: var(--primary);
}

.cart-qty-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.05);
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    transition: var(--transition);
    line-height: 1;
}

.qty-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.qty-btn.remove:hover {
    background: var(--danger-bg);
    border-color: var(--danger);
    color: var(--danger);
}

.qty-display {
    font-weight: 700;
    font-size: 1rem;
    min-width: 20px;
    text-align: center;
}

/* --- Totals & Payment --- */
.kasir-totals {
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
    margin-bottom: 0.75rem;
}

.kasir-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.kasir-grand-total {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
    margin-top: 4px;
}

.kasir-grand-total span:last-child {
    color: var(--primary);
}

.kasir-payment {
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kasir-payment label {
    font-size: 0.85rem;
}

.payment-input-wrap {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: var(--transition);
}

.payment-input-wrap:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.currency-prefix {
    padding: 12px 14px;
    background: rgba(255,255,255,0.05);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    border-right: 1px solid var(--border);
}

.payment-input-wrap input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 14px;
    font-size: 1rem;
    outline: none;
    box-shadow: none;
}

.payment-input-wrap input:focus {
    border: none;
    box-shadow: none;
}

.kasir-kembalian-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
}

.kembalian-amount {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--success);
}

.quick-cash {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cash-btn {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.04);
    color: var(--text-main);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: var(--transition);
    flex: 1;
    min-width: 46px;
}

.cash-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

/* --- Receipt Modal --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
    animation: fadeIn 0.3s ease;
}

.modal-box {
    width: 420px;
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
}

.receipt-header {
    text-align: center;
    margin-bottom: 1rem;
}

.receipt-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
}

.receipt-divider {
    border: none;
    border-top: 1px dashed var(--border);
    margin: 1rem 0;
}

.receipt-body {
    font-size: 0.9rem;
}

.receipt-item-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.receipt-item-name {
    flex: 1;
    color: var(--text-muted);
}

.receipt-item-total {
    font-weight: 600;
}

.receipt-summary {
    margin-top: 0.75rem;
    background: rgba(0,0,0,0.2);
    border-radius: var(--radius-sm);
    padding: 1rem;
}

.receipt-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 0.95rem;
}

.receipt-summary-row.total {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    border-top: 1px solid var(--border);
    margin-top: 6px;
    padding-top: 10px;
}

.receipt-summary-row.kembalian {
    color: var(--success);
    font-weight: 600;
}

.receipt-thankyou {
    text-align: center;
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.modal-actions {
    margin-top: 1.5rem;
}

/* --- Kasir Responsive --- */
@media (max-width: 768px) {
    .kasir-section {
        padding: 0 1rem 1rem 1rem;
        height: auto;
        overflow: auto;
    }

    .kasir-layout {
        grid-template-columns: 1fr;
        height: auto;
    }

    .kasir-product-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        max-height: 320px;
    }

    .kasir-right {
        height: auto;
    }

    .kasir-right .glass-panel {
        height: auto;
    }

    .kasir-cart-list {
        max-height: 200px;
    }
}

/* --- Print Styles --- */
@media print {
    body * { visibility: hidden; }
    #receipt-modal, #receipt-modal * { visibility: visible; }
    #receipt-modal {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        background: white;
        color: black;
    }
    .modal-actions { display: none; }
}

/* ============================================
   RESEP & HARGA JUAL STYLES
   ============================================ */

.resep-section {
    padding: 0 2rem 2rem 2rem;
    overflow-y: auto;
}

/* --- Margin Slider Bar --- */
.resep-margin-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.resep-margin-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.resep-margin-label {
    font-weight: 600;
    font-size: 1rem;
}

.resep-margin-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 250px;
    justify-content: flex-end;
}

/* Range Slider */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: rgba(255,255,255,0.1);
    outline: none;
    width: 220px;
    cursor: pointer;
    border: none;
    padding: 0;
    background-image: linear-gradient(var(--primary), var(--primary));
    background-size: 50% 100%;
    background-repeat: no-repeat;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(245,166,35,0.5);
    transition: var(--transition);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(245,166,35,0.7);
}

input[type="range"]:focus {
    box-shadow: none;
    border: none;
}

.margin-badge {
    background: var(--primary);
    color: var(--bg-base);
    padding: 6px 16px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    min-width: 70px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(245,166,35,0.3);
    transition: var(--transition);
}

/* --- Recipe Grid --- */
.resep-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 1.5rem;
}

/* --- Recipe Card --- */
.resep-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

.resep-card:hover {
    border-color: rgba(245,166,35,0.3);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    transform: translateY(-3px);
}

.resep-card-header {
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, rgba(93,64,55,0.4), rgba(245,166,35,0.08));
    border-bottom: 1px solid var(--border);
}

.resep-emoji {
    font-size: 2.2rem;
    flex-shrink: 0;
}

.resep-card-title {
    flex: 1;
}

.resep-card-title h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.resep-yield {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.resep-card-body {
    padding: 1.25rem 1.5rem;
}

/* --- Ingredient Table --- */
.ingredient-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.ingredient-table th {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 8px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.ingredient-table td {
    padding: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    vertical-align: middle;
}

.ingredient-table tr:last-child td {
    border-bottom: none;
}

.ingredient-table td:last-child {
    text-align: right;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* --- HPP & Price Suggestion --- */
.resep-price-box {
    background: rgba(0,0,0,0.2);
    border-radius: var(--radius-sm);
    padding: 1rem;
    border: 1px solid var(--border);
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    font-size: 0.9rem;
}

.price-row .label {
    color: var(--text-muted);
}

.price-row.hpp .value {
    font-weight: 700;
    color: var(--danger);
}

.price-row.saran .value {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary);
}

.price-row.profit .value {
    color: var(--success);
    font-weight: 600;
}

.price-row.divider {
    border-top: 1px dashed var(--border);
    margin-top: 6px;
    padding-top: 10px;
}

/* Margin percentage pill on each card */
.profit-margin-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(16,185,129,0.3);
}

/* --- Steps / How to make --- */
.resep-steps-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 10px 0 0 0;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    user-select: none;
    border-top: 1px solid var(--border);
    margin-top: 1rem;
}

.resep-steps-toggle:hover {
    color: var(--primary);
}

.resep-steps-toggle i {
    transition: var(--transition);
}

.resep-steps-toggle.open i {
    transform: rotate(180deg);
}

.resep-steps-body {
    display: none;
    padding-top: 12px;
}

.resep-steps-body.open {
    display: block;
}

.step-item {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.75rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .resep-section {
        padding: 0 1rem 1rem 1rem;
    }

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

    .resep-margin-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .resep-margin-right {
        width: 100%;
        min-width: unset;
        justify-content: space-between;
    }

    input[type="range"] {
        width: 100%;
        flex: 1;
    }
}
