/* ==========================================================================
   1. LAYOUT UTAMA (SEJAJAR TOP BAR & FULL HEIGHT)
   ========================================================================== */
.vendor-layout { display: flex; flex-direction: column; height: calc((100vh / var(--global-zoom)) - var(--topbar-tinggi) - var(--topbar-jarak-atas) - 2px); padding: 0 var(--padding-x) 2px var(--padding-x); overflow: hidden; }

/* ==========================================================================
   2. TOP CONTROL BAR & KPI (PILLS)
   ========================================================================== */
.tmc-action-btn { height: 36px; border-radius: 50px; font-size: 0.8rem; font-weight: 700; display: flex; align-items: center; justify-content: center; transition: 0.2s; border: 1px solid #cbd5e1; background: #fff; color: #475569; padding: 0 16px; cursor: pointer; }
.tmc-action-btn:hover { background: #f8fafc; border-color: var(--tirta-blue); color: var(--tirta-blue); }
.tmc-action-btn.icon-only { width: 36px; padding: 0; }

.tmc-primary-btn { height: 36px; border-radius: 50px; font-size: 0.8rem; font-weight: 700; display: flex; align-items: center; justify-content: center; transition: 0.2s; background: var(--tirta-blue); border: none; color: white; padding: 0 20px; box-shadow: 0 4px 6px -1px rgba(48, 82, 138, 0.2); cursor: pointer; }
.tmc-primary-btn:hover { background: #25416e; color: white; transform: translateY(-1px); box-shadow: 0 6px 8px -1px rgba(48, 82, 138, 0.3); }

.kpi-inline { background-color: #ffffff; border: 1px solid #e2e8f0; border-radius: 50px; height: 36px; display: inline-flex; align-items: center; padding: 0 14px; box-shadow: 0 2px 4px rgba(0,0,0,0.02); white-space: nowrap; transition: 0.2s; }
.kpi-inline:hover { box-shadow: 0 4px 8px rgba(0,0,0,0.05); transform: translateY(-1px); }

/* ==========================================================================
   3. MULTISELECT FILTERS (FLOATING ULTIMATE Z-INDEX)
   ========================================================================== */
.filter-box { margin: 0; }
.custom-multiselect { position: relative; width: 100%; height: 100%; cursor: pointer; }
.custom-multiselect .multiselect-header { background: #fff; border: 1px solid #cbd5e1; height: 36px; border-radius: 50px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #475569; font-weight: 700; font-size: 0.75rem; transition: 0.2s; min-width: 160px; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.custom-multiselect .multiselect-header:hover { border-color: var(--tirta-blue); background-color: #f8fafc; }
.multiselect-dropdown { position: absolute; top: 110%; right: 0; background: #fff; border: 1px solid rgba(0,0,0,0.05); border-radius: 12px; box-shadow: 0 15px 40px rgba(0,0,0,0.15); display: none; max-height: 280px; overflow-y: auto; padding: 8px; min-width: 180px; z-index: 105000 !important; }
.multiselect-dropdown.show { display: block; animation: dropFade 0.2s ease; }
.multiselect-dropdown label { display: flex; align-items: center; gap: 10px; padding: 8px 12px; font-size: 0.8rem; cursor: pointer; border-radius: 6px; font-weight: 600; color:#1e293b; margin:0;}
.multiselect-dropdown label:hover { background: #f0f4f8; color: #30528A; }
.multiselect-dropdown input[type="checkbox"] { cursor: pointer; accent-color: #30528A; transform: scale(1.1); margin: 0; }
.divider { height: 1px; background: #e2e8f0; margin: 4px 0; }
@keyframes dropFade { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

/* ==========================================================================
   4. BODY WRAPPER & TABLE (NO COLUMN DELETED! ULTRA-COMPACT)
   ========================================================================== */
.vendor-body-wrapper { flex-grow: 1; height: 0; display: flex; flex-direction: row; overflow: hidden; width: 100%; }
.vendor-body-wrapper.show-sidebar { gap: 0px !important; }

.vendor-main-card { background: #ffffff; border-radius: 16px !important; border: 1px solid rgba(0,0,0,0.04); overflow: hidden !important; display: flex; flex-direction: column; width: 100%; flex-shrink: 1; transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1); }

/* 🔥 FIX 1: Benerin Flexbox & Hapus translateZ yang bikin sticky rusak 🔥 */
.table-responsive-wrapper { 
    flex: 1; 
    min-height: 0; /* INI KUNCI BIAR BISA DI-SCROLL */
    overflow: auto !important; 
    background: #fff; 
    position: relative; 
    padding: 0 !important; 
    margin: 0 !important; 
}

.t-table { width: 100%; border-collapse: separate !important; border-spacing: 0 !important; table-layout: fixed; min-width: 900px; margin: 0 !important; border: none !important; }
.t-table thead { position: static !important; }

/* 🔥 FIX 2: Benerin jarak top sticky-nya 🔥 */
.t-table th { 
    position: sticky !important; 
    top: 0 !important; /* Ganti jadi 0 biar nempel sempurna di atas */
    z-index: 50 !important; 
    background-color: #f8fafc !important; 
    color: #64748b; 
    font-size: 0.7rem; 
    text-transform: uppercase; 
    font-weight: 800; 
    box-shadow: 0 -10px 0 #f8fafc, inset 0 -2px 0 #e2e8f0 !important; 
    background-clip: padding-box !important; 
    padding: 12px 14px; 
    letter-spacing: 0.5px; 
    white-space: nowrap !important; 
    text-align: left; 
    border: none !important; 
    outline: none !important;
}

/* PADDING BARIS DIPANGKAS HABIS */
.t-table td { padding: 8px 14px; vertical-align: middle; font-size: 0.8rem; font-weight: 600; color: #1e293b; border-bottom: 1px solid #f1f5f9; transition: background 0.2s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.t-table tr:hover td { background-color: #f8fafc; }

/* 🔥 MICRO-CARD UNTUK PRICING (YANG ANDA SUKA) 🔥 */
.price-micro-card {
    background: #ffffff; border: 1px solid #e2e8f0; border-radius: 6px; padding: 3px 8px;
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 3px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.01); width: 100%; max-width: 220px;
}
.price-micro-card:last-child { margin-bottom: 0; }
.price-micro-label { font-size: 0.65rem; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; }
.price-micro-value { font-size: 0.8rem; font-weight: 800; font-family: 'Poppins', monospace; }

/* INLINE ACTION BUTTONS */
.action-container { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.inline-action-btn { width: 28px; height: 28px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; background: #ffffff; border: 1px solid #e2e8f0; cursor: pointer; transition: 0.2s; font-size: 0.75rem; box-shadow: 0 1px 2px rgba(0,0,0,0.02);}
.inline-action-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.08); }
.btn-edit { color: var(--tirta-blue); }
.btn-edit:hover { border-color: var(--tirta-blue); background: #f8fafc;}
.btn-delete { color: var(--tirta-red); }
.btn-delete:hover { border-color: var(--tirta-red); background: #fff1f2;}

.dt-pagination-wrapper { flex-shrink: 0; background: #ffffff; border-top: 1px solid #e2e8f0; padding: 8px 24px; z-index: 5; height: 45px; } 
.dataTables_info { font-size: 0.75rem; font-weight: 600; color: #64748b; padding: 0 !important; }
.pagination { margin: 0 !important; gap: 4px; }
.page-link { border-radius: 6px !important; border: none; color: #475569; font-weight: 700; font-size: 0.75rem; padding: 4px 10px; transition: 0.2s; }
.page-item.active .page-link { background-color: var(--tirta-blue); color: #fff; box-shadow: 0 2px 5px rgba(48,82,138,0.3); }
.page-link:hover:not(.active) { background-color: #f1f5f9; color: var(--tirta-blue); }

/* ==========================================================================
   5. PUSH SIDEPANEL (SMOOTH SLIDE UX)
   ========================================================================== */
.tmc-push-sidebar, #pushSidebar { width: 380px !important; min-width: 380px !important; flex-shrink: 0; margin-right: -380px !important; margin-left: 0px !important; opacity: 0; visibility: hidden; background: #fff; border-radius: 16px !important; border: none !important; transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1); overflow: hidden !important; z-index: 1040; }
.vendor-body-wrapper.show-sidebar #pushSidebar, .vendor-body-wrapper.show-sidebar .tmc-push-sidebar { margin-right: 0px !important; margin-left: 15px !important; opacity: 1; visibility: visible; border: 1px solid rgba(0,0,0,0.04) !important; border-left: 1px solid #e2e8f0 !important; box-shadow: -5px 0 15px rgba(0,0,0,0.03);}

/* SEMBUNYIKAN KOLOM ACTION SAAT SIDEBAR MUNCUL AGAR TIDAK GENCET */
#tableVendor th:nth-child(5), #tableVendor td:nth-child(5) { transition: max-width 0.35s ease, opacity 0.25s ease, padding 0.35s ease; max-width: 80px; overflow: hidden; white-space: nowrap; opacity: 1; }
.vendor-body-wrapper.show-sidebar #tableVendor th:nth-child(5), .vendor-body-wrapper.show-sidebar #tableVendor td:nth-child(5) { max-width: 0 !important; min-width: 0 !important; width: 0 !important; padding-left: 0 !important; padding-right: 0 !important; opacity: 0 !important; border-right: none !important; pointer-events: none; }

/* INFO COMPACT GRID (SIDEBAR) */
.info-compact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.info-compact-item { display: flex; align-items: center; gap: 8px; overflow: hidden; }
.info-icon-box { width: 26px; height: 26px; border-radius: 6px; background: #ffffff; border: 1px solid #cbd5e1; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; flex-shrink: 0; box-shadow: 0 1px 2px rgba(0,0,0,0.02); }
.info-text-box { display: flex; flex-direction: column; line-height: 1.1; overflow: hidden; }
.info-label { font-size: 0.55rem; text-transform: uppercase; font-weight: 800; color: #94a3b8; letter-spacing: 0.5px; margin-bottom: 1px; }
.info-value { font-size: 0.75rem; font-weight: 800; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ==========================================================================
   6. DYNAMIC FORM (MODAL)
   ========================================================================== */
.modal-backdrop { z-index: 104900 !important; }
.modal { z-index: 105000 !important; }

.input-group-text.rp-label { background-color: #f8fafc; color: #30528A; font-weight: 800; border-right: 0; font-size: 0.8rem; padding: 0.25rem 0.5rem;}
.form-control.price-input { border-left: 0; padding-left: 5px; font-family: monospace; font-size: 0.9rem; font-weight: 700; letter-spacing: 0.5px; }
.form-control.price-input:focus { box-shadow: none; border-color: #dee2e6; }
.input-group:focus-within { box-shadow: 0 0 0 3px rgba(48, 82, 138, 0.1); border-radius: 0.375rem; }
.input-group:focus-within .form-control, .input-group:focus-within .input-group-text { border-color: var(--tirta-blue); }
.dynamic-form-box { background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 8px; padding: 15px; }
.form-label { font-size: 0.7rem; font-weight: 700; color: var(--text-dark); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px;}

/* SPINNER LOADING */
.sch-loading-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(255, 255, 255, 0.6); backdrop-filter: blur(3px); z-index: 50; display: flex; justify-content: center; align-items: center; border-radius: 8px; }
.mini-spinner { width: 3rem; height: 3rem; border-radius: 50%; border: 3px solid rgba(48, 82, 138, 0.1); border-top-color: var(--tirta-blue); border-right-color: var(--tirta-red); animation: tmc-spin-1 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite; position: relative; box-shadow: 0 0 10px rgba(48, 82, 138, 0.1); }
.mini-spinner::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; border: 3px solid transparent; border-top-color: var(--tirta-gold); border-left-color: var(--tirta-gold); animation: tmc-spin-2 0.7s linear infinite reverse; }
@keyframes tmc-spin-1 { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes tmc-spin-2 { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }