/* =====================================================================
   SMMS BIMA — Portal Resources
   Design system: sidebar navy, aksen oranye BIMA, kartu putih.
   Semua nama class lama dipertahankan (dipakai app.js).
   ===================================================================== */
:root {
  --brand: #E04D23;          /* oranye BIMA */
  --brand-dark: #C2401A;
  --brand-soft: #FFF1EC;
  --brand-line: #FFD3C4;

  --navy: #141B2D;
  --navy-2: #1C2540;
  --navy-3: #26314F;
  --navy-text: #AEB7CC;

  --bg: #F3F4F7;
  --surface: #FFFFFF;
  --surface-2: #F7F8FA;
  --surface-3: #EEF0F4;
  --text: #121826;
  --text-muted: #5F6878;
  --text-faint: #8B93A3;
  --border: #E3E6EC;
  --border-strong: #CED3DC;

  --success: #11804B; --success-bg: #E5F5EC;
  --warn: #9A5B00;    --warn-bg: #FDF3DC;
  --danger: #C8302B;  --danger-bg: #FCEBEA;
  --info: #2F4FA8;    --info-bg: #E9EEFB;

  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 7px;
  --shadow-sm: 0 1px 2px rgba(18,24,38,.05);
  --shadow-card: 0 1px 2px rgba(18,24,38,.04), 0 2px 12px rgba(18,24,38,.05);
  --shadow-pop: 0 14px 40px rgba(18,24,38,.18);
  --sidebar-w: 256px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body.layout-sidebar {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 14px;
  display: flex !important;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); }
h2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
h3 { font-size: 15px; font-weight: 700; color: var(--text); }
h4 { font-size: 14px; font-weight: 700; color: var(--text); }

/* =========================== SIDEBAR =========================== */
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--navy-2) 0%, var(--navy) 100%);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  z-index: 100;
  border-right: 1px solid rgba(255,255,255,.04);
  transition: transform .25s ease;
}

.sidebar-header-orange {
  padding: 22px 18px 20px;
  margin: 0 0 6px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  position: relative;
}
.sidebar-header-orange::after { /* garis aksen oranye */
  content: ''; position: absolute; left: 18px; bottom: -1px; width: 44px; height: 2px;
  background: var(--brand); border-radius: 2px;
}

.brand-box { display: flex; align-items: center; gap: 12px; }

.logo-circle {
  width: 46px; height: 46px;
  background: #fff;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,.3);
  flex-shrink: 0;
  padding: 4px;
}
.bima-logo-img { width: 100%; height: 100%; object-fit: contain; }

.brand-title { color: #fff; font-weight: 800; font-size: 18px; display: block; line-height: 1.1; letter-spacing: -.01em; }
.brand-sub { color: #FF9C7E; font-size: 10px; font-weight: 700; letter-spacing: .14em; }

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 12px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--navy-3) transparent;
}
.sidebar-menu::-webkit-scrollbar { width: 6px; }
.sidebar-menu::-webkit-scrollbar-thumb { background: var(--navy-3); border-radius: 3px; }

.menu-label {
  font-size: 10px; font-weight: 700; color: #6B7591;
  letter-spacing: .14em; margin: 0 0 6px; padding-left: 12px;
}

.sidebar-nav-btn {
  width: 100%;
  background: transparent;
  color: var(--navy-text);
  border: none;
  padding: 10px 12px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s;
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  text-align: left;
  position: relative;
  line-height: 1.3;
}
.sidebar-nav-btn .nav-icon { width: 18px; height: 18px; stroke: currentColor; flex-shrink: 0; opacity: .85; }
.sidebar-nav-btn:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar-nav-btn.active {
  background: linear-gradient(90deg, rgba(224,77,35,.22), rgba(224,77,35,.08));
  color: #fff;
  font-weight: 700;
}
.sidebar-nav-btn.active::before {
  content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--brand);
}
.sidebar-nav-btn.active .nav-icon { stroke: #FF8A66; opacity: 1; }
a.sidebar-nav-btn::after { /* penanda link keluar (Monitoring Web) */
  content: '↗'; margin-left: auto; font-size: 12px; opacity: .5;
}

/* Kartu user di bawah sidebar */
.sidebar-user {
  padding: 12px;
  margin: 0;
  border-top: 1px solid rgba(255,255,255,.06);
  background: rgba(0,0,0,.12);
  border-radius: 0;
}
.sidebar-user:empty, .sidebar-user:has(#userInfo:empty) { display: none; }

.user-card-profile {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  box-shadow: none;
}
.user-card-detail { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.user-name-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.user-avatar-icon {
  width: 28px; height: 28px; padding: 5px; border-radius: 50%;
  background: var(--brand); color: #fff; flex-shrink: 0;
}
.user-card-name {
  font-size: 13.5px; font-weight: 700; color: #fff;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-card-role {
  font-size: 11px; font-weight: 500; color: var(--navy-text);
  padding-left: 36px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-card-profile .btn-logout-card {
  width: 100%;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: none;
  color: #fff;
}
.user-card-profile .btn-logout-card:hover { background: rgba(224,77,35,.85); border-color: var(--brand); transform: none; box-shadow: none; }

/* ======================== TOPBAR MOBILE ======================== */
.mobile-topbar { display: none; }
.sidebar-backdrop { display: none; }

/* ========================= MAIN CONTENT ======================== */
.main-wrapper {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  max-width: 1440px;
  padding: 32px 32px 64px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.app-section { display: flex; flex-direction: column; gap: 18px; animation: secIn .25s ease; }
@keyframes secIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Judul halaman */
.page-title-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 4px;
}
.page-title-section.with-action { flex-direction: row; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-title-section.with-action > div { display: flex; flex-direction: column; gap: 4px; }
.category-tag {
  display: inline-flex; align-self: flex-start; align-items: center; gap: 6px;
  color: var(--brand); font-size: 10.5px; font-weight: 800; letter-spacing: .12em;
}
.category-tag::before { content: ''; width: 14px; height: 2px; background: var(--brand); border-radius: 2px; }
.page-title-section h2 { font-size: 24px; font-weight: 800; color: var(--text); letter-spacing: -.02em; }
.page-title-section p { font-size: 13.5px; color: var(--text-muted); max-width: 720px; }

/* Tabs kategori */
.category-tabs {
  display: inline-flex; align-self: flex-start;
  gap: 2px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 4px; box-shadow: var(--shadow-sm);
  max-width: 100%;
}
.tab-btn {
  padding: 8px 15px;
  background: transparent;
  color: var(--text-muted);
  border: none;
  border-radius: 9px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.tab-btn:hover { background: var(--surface-2); color: var(--text); }
.tab-btn.active { background: var(--brand); color: #fff; box-shadow: 0 2px 8px rgba(224,77,35,.3); }

/* ============================ CARD ============================= */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.card-header {
  padding: 16px 22px 14px;
  border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 2px;
}
.card-header h3 { font-size: 15px; font-weight: 700; color: var(--text); }
.card-subtitle { font-size: 12.5px; color: var(--text-muted); }
.card-header.space-between { flex-direction: row; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.card-body { padding: 18px 22px; }

/* Langkah bernomor (dipakai di Buat RFQ) */
.step-title { display: flex; align-items: center; gap: 10px; }
.step-no {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ============================ FORM ============================= */
.form-grid {
  padding: 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}
.input-group { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.input-group label, .field-label { font-size: 12.5px; font-weight: 600; color: #374151; }
.field-label { display: block; margin-bottom: 6px; }

.input-group input,
.input-group select,
.input-group textarea,
.form-control,
.search-input,
.select-input {
  width: 100%;
  padding: 10px 13px;
  font-size: 13.5px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.input-group input[type=file] { padding: 8px 10px; background: var(--surface-2); cursor: pointer; }
.input-group input[type=file]::file-selector-button {
  font-family: inherit; font-weight: 600; font-size: 12.5px; margin-right: 10px;
  border: none; background: var(--navy-2); color: #fff; padding: 6px 12px; border-radius: 7px; cursor: pointer;
}
.input-group textarea, textarea.form-control { resize: vertical; }
.input-group input[readonly] { background: var(--surface-3) !important; color: var(--text-faint) !important; }

select.select-input, .input-group select, .cost-step-body select {
  appearance: none; -webkit-appearance: none;
  padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235F6878' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center;
}
.select-input { max-width: 420px; }

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus,
.form-control:focus,
.search-input:focus,
.select-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(224,77,35,.13);
}

.search-input {
  padding-left: 38px;
  background-color: var(--surface-2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238B93A3' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 13px center;
}
.search-input:focus { background-color: var(--surface); }
.search-input.compact { max-width: 360px; }

.table-search-bar {
  padding: 12px 22px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

/* =========================== BUTTON ============================ */
.btn-primary {
  width: 100%;
  padding: 11px 18px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(224,77,35,.25);
  transition: background .15s, transform .08s, box-shadow .15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-primary:hover { background: var(--brand-dark); box-shadow: 0 4px 14px rgba(224,77,35,.32); }
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .6; cursor: progress; }
.btn-auto { width: auto; }

.btn-secondary {
  padding: 11px 18px;
  background: var(--surface);
  color: var(--text);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  font-family: inherit; font-size: 13.5px; font-weight: 600;
  cursor: pointer;
}
.btn-secondary:hover { background: var(--surface-2); }

.flex-action { grid-column: 1 / -1; display: flex; gap: 10px; }
.action-bar { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

/* Tombol kecil oranye (dipakai banyak tempat di app.js) */
.btn-logout-card {
  background: var(--brand);
  color: #fff;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 7px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 1px 4px rgba(224,77,35,.25);
  transition: background .15s, transform .08s, box-shadow .15s;
  white-space: nowrap;
}
.btn-logout-card svg { width: 14px; height: 14px; stroke: currentColor; }
.btn-logout-card:hover { background: var(--brand-dark); transform: translateY(-1px); box-shadow: 0 4px 10px rgba(224,77,35,.3); }
.btn-logout-card:active { transform: none; }

/* Tombol ikon tabel */
.action-btns { display: flex; justify-content: center; align-items: center; gap: 6px; }
.btn-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .15s; padding: 0;
}
.btn-icon svg { width: 15px; height: 15px; stroke: var(--text-muted); transition: stroke .15s; }
.btn-icon:hover { background: var(--surface-2); border-color: var(--border-strong); }
.btn-icon-edit:hover { background: var(--brand-soft); border-color: var(--brand-line); }
.btn-icon-edit:hover svg { stroke: var(--brand); }
.btn-icon-delete:hover { background: var(--danger-bg); border-color: #F3B9B5; }
.btn-icon-delete:hover svg { stroke: var(--danger); }

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

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  background: var(--surface-2);
  color: var(--text-muted);
  font-weight: 700;
  padding: 11px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 10.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
}
td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  color: #263041;
  vertical-align: middle;
}
tbody tr { transition: background .12s; }
tbody tr:hover td { background: #FAFBFC; }
tbody tr:last-child td { border-bottom: none; }

/* Tabel yang berdiri sendiri (bukan di dalam .card) tampil seperti kartu */
.data-table {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.card .data-table { border: none; border-radius: 0; box-shadow: none; }
.data-table thead th:first-child { border-top-left-radius: var(--radius-lg); }
.data-table thead th:last-child { border-top-right-radius: var(--radius-lg); }
.data-table input[type=checkbox], table input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }

/* Scroll horizontal di layar kecil untuk tabel standalone */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); }

/* =========================== BADGES ============================ */
.badge-count {
  background: var(--brand-soft);
  color: var(--brand);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}
.badge-unit {
  background: var(--surface-3);
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.bg-secondary { background: var(--surface-3); color: var(--text-muted); }
.text-warning { color: var(--warn); }

/* ============================ LOGIN ============================ */
.modal-overlay {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh;
  background:
    radial-gradient(900px 500px at 0% 0%, rgba(224,77,35,.25), transparent 60%),
    radial-gradient(800px 500px at 100% 100%, rgba(47,79,168,.25), transparent 60%),
    rgba(14,19,32,.92);
  backdrop-filter: blur(6px);
  display: flex; justify-content: center; align-items: center;
  z-index: 9999;
  padding: 20px;
}
.modal-card {
  background: var(--surface);
  padding: 32px 30px 28px;
  border-radius: 20px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 30px 80px rgba(0,0,0,.4);
  position: relative;
  overflow: visible;
}
.modal-logo {
  width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 18px; background: #fff;
  border: 1px solid var(--border); box-shadow: var(--shadow-card);
  display: flex; align-items: center; justify-content: center; padding: 7px;
}
.modal-logo img { width: 100%; height: 100%; object-fit: contain; }
.modal-header { text-align: center; margin-bottom: 22px; }
.modal-header h3 { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.modal-header p { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.modal-card .input-group + .input-group { margin-top: 14px; }

.suggest-box {
  display: none; position: absolute; top: 100%; left: 0; right: 0; margin-top: 4px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md);
  max-height: 220px; overflow-y: auto; z-index: 20; box-shadow: var(--shadow-pop);
}
.suggest-box > div { padding: 10px 13px; font-size: 13.5px; cursor: pointer; border-bottom: 1px solid var(--surface-3); }
.suggest-box > div:hover { background: var(--brand-soft); }

/* ============================ TOAST ============================ */
#toastContainer {
  position: fixed; top: 20px; right: 20px; z-index: 10000;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  min-width: 280px; max-width: 380px;
  padding: 13px 16px 13px 14px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px; font-weight: 600;
  box-shadow: var(--shadow-pop);
  border: 1px solid var(--border);
  border-left: 4px solid var(--text-faint);
  display: flex; align-items: center; gap: 10px;
  animation: toastIn .3s ease forwards;
}
.toast.success { border-left-color: var(--success); background: linear-gradient(90deg, var(--success-bg), var(--surface) 40%); }
.toast.error { border-left-color: var(--danger); background: linear-gradient(90deg, var(--danger-bg), var(--surface) 40%); }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(40px); } }
.toast.hide { animation: toastOut .3s ease forwards; }

/* ===================== FORM PERMINTAAN ======================= */
.picker-hint { display: block; font-size: 12px; color: var(--warn); min-height: 16px; margin-top: 2px; }
.picker-hint.ok { color: var(--success); }
#reqWoNo:disabled { background-color: var(--surface-3); cursor: not-allowed; }

.cost-alloc {
  grid-column: 1 / -1;
  border: 1px solid var(--brand-line);
  background: linear-gradient(180deg, #FFF8F5, #FFFDFC);
  border-radius: var(--radius-lg);
  padding: 18px 20px 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
}
.cost-alloc legend {
  font-size: 12px; font-weight: 800; color: var(--brand); padding: 3px 10px;
  letter-spacing: .04em; background: var(--surface); border: 1px solid var(--brand-line); border-radius: 999px;
}
.cost-step { display: flex; gap: 11px; align-items: flex-start; min-width: 0; }
.cost-step[hidden] { display: none; }
.cost-step-no {
  flex: 0 0 24px; height: 24px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; margin-top: 0;
  box-shadow: 0 0 0 3px rgba(224,77,35,.14);
}
.cost-step-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cost-step-body > label { font-size: 12.5px; font-weight: 600; color: #374151; }
.cost-step-body input, .cost-step-body select {
  padding: 10px 13px; font-size: 13.5px; border: 1.5px solid var(--border); border-radius: var(--radius-md);
  outline: none; font-family: inherit; background: var(--surface); color: inherit; width: 100%;
}
.cost-step-body select { padding-right: 36px; }
.cost-step-body input:focus, .cost-step-body select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(224,77,35,.13); }
.cost-step-body input[readonly]:not(:disabled) { background: var(--surface-3); }
.cost-choice { display: flex; flex-wrap: wrap; gap: 8px; }
.cost-choice label {
  display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 500; color: var(--text);
  border: 1.5px solid var(--border); background: var(--surface); border-radius: var(--radius-md);
  padding: 9px 12px; cursor: pointer; transition: border-color .15s, background .15s;
}
.cost-choice label:hover { border-color: var(--border-strong); }
.cost-choice label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.cost-alloc .cost-choice input[type="radio"] { accent-color: var(--brand); margin: 0; width: 16px; height: 16px; flex: 0 0 16px; padding: 0; box-shadow: none; }
.cost-choice label span { flex: 1; min-width: 0; text-align: left; }
.cost-choice-stack { flex-direction: column; }
.cost-summary {
  grid-column: 1 / -1; font-size: 13px; border-radius: var(--radius-md); padding: 10px 13px;
  background: var(--warn-bg); color: var(--warn); border: 1px dashed #E8C77A;
}
.cost-summary.ok { background: var(--success-bg); color: #14532D; border: 1px solid #B7E1C6; }
.cost-summary span { color: var(--text-muted); }

/* Baris item di tabel Detail Item */
#datasheetBody td { padding: 8px 10px; }
#datasheetBody input, #datasheetBody select {
  width: 100%; padding: 8px 10px; font-size: 13px; font-family: inherit;
  border: 1.5px solid var(--border); border-radius: 8px; background: var(--surface); outline: none;
}
#datasheetBody input, #datasheetBody select { padding: 8px 10px !important; border: 1.5px solid var(--border) !important; font-size: 13px !important; }
#datasheetBody select {
  appearance: none; -webkit-appearance: none; padding-right: 30px !important; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235F6878' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important; background-position: right 10px center !important;
}
#datasheetBody input:focus, #datasheetBody select:focus { border-color: var(--brand) !important; }
#datasheetBody input:disabled, #datasheetBody select:disabled { background-color: var(--surface-3) !important; color: var(--text-faint); cursor: not-allowed; }
#datasheetBody input:focus, #datasheetBody select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(224,77,35,.13); }

/* ========================= RESPONSIVE ========================== */
@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); box-shadow: none; }
  body.sidebar-open .sidebar { transform: none; box-shadow: 20px 0 60px rgba(0,0,0,.35); }
  .sidebar-backdrop {
    display: block; position: fixed; inset: 0; background: rgba(10,14,24,.5);
    z-index: 90; opacity: 0; pointer-events: none; transition: opacity .25s;
  }
  body.sidebar-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }

  .mobile-topbar {
    display: flex; align-items: center; gap: 12px;
    position: fixed; top: 0; left: 0; right: 0; height: 58px; z-index: 80;
    background: var(--navy); color: #fff; padding: 0 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,.2);
  }
  .mobile-topbar .burger {
    width: 38px; height: 38px; border-radius: 10px; border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.06); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer;
  }
  .mobile-topbar .burger svg { width: 20px; height: 20px; }
  .mobile-topbar .mt-logo { width: 34px; height: 34px; border-radius: 9px; background: #fff; padding: 3px; display: flex; }
  .mobile-topbar .mt-logo img { width: 100%; height: 100%; object-fit: contain; }
  .mobile-topbar .mt-title { font-weight: 800; font-size: 15px; line-height: 1.1; }
  .mobile-topbar .mt-title small { display: block; font-size: 10px; letter-spacing: .12em; color: #FF9C7E; font-weight: 700; }

  .main-wrapper { margin-left: 0; padding: 82px 16px 56px; }
}

@media (max-width: 768px) {
  .cost-alloc { grid-template-columns: 1fr; padding: 16px 14px; }
  .form-grid { grid-template-columns: 1fr; padding: 16px; }
  .page-title-section h2 { font-size: 20px; }
  .card-header { padding: 14px 16px 12px; }
  .table-search-bar { padding: 10px 16px; }
  th, td { padding: 10px 12px; }
  .category-tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; align-self: stretch; }
  .data-table { display: block; overflow-x: auto; }
  .select-input { max-width: none; }
  #toastContainer { left: 12px; right: 12px; top: 70px; }
  .toast { min-width: 0; max-width: none; }
}
