.sim-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 20px; box-shadow: var(--shadow); }
.sim-header { background: linear-gradient(90deg, var(--accent), var(--accent2)); padding: 14px 20px; }
.sim-header h2 { font-family: 'Playfair Display', serif; font-size: 1.1rem; color: white; }
.sim-header p { font-size: 0.8rem; color: rgba(255,255,255,0.8); margin-top: 2px; }
.sim-body { padding: 16px 20px; }

.sim-event { margin-bottom: 20px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.sim-event-header {
  background: var(--surface2); padding: 10px 14px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
}
.sim-event-name { font-weight: 700; font-size: 0.95rem; color: var(--text); }
.sim-event-budget { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.budget-label { font-size: 0.75rem; color: var(--text2); }
.budget-edit {
  padding: 4px 8px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); color: var(--text); font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem; width: 120px; outline: none;
}
.budget-edit:focus { border-color: var(--accent); }

.sim-progress { height: 4px; background: var(--border); }
.sim-progress-bar { height: 100%; background: var(--green); transition: width 0.4s; }
.sim-progress-bar.over { background: var(--red); }

.sim-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; }
.sim-table { width: 100%; font-size: 0.82rem; min-width: 640px; table-layout: fixed; }
.sim-table th { background: var(--surface2); color: var(--text2); font-size: 0.72rem; text-transform: uppercase; padding: 7px 12px; text-align: left; white-space: nowrap; }
.sim-table td { padding: 8px 12px; border-top: 1px solid var(--border); vertical-align: middle; }
.sim-table tr:hover td { background: var(--surface2); }
.sim-table th:nth-child(1), .sim-table td:nth-child(1) { width: 15%; }
.sim-table th:nth-child(2), .sim-table td:nth-child(2) { width: 18%; }
.sim-table th:nth-child(3), .sim-table td:nth-child(3) { width: 22%; }
.sim-table th:nth-child(4), .sim-table td:nth-child(4) { width: 12%; }
.sim-table th:nth-child(5), .sim-table td:nth-child(5) { width: auto; }
.sim-table th:nth-child(6), .sim-table td:nth-child(6) { width: 36px; }
.sim-table td:nth-child(5) { font-size: 0.75rem; color: var(--text2); word-break: break-word; white-space: normal; }

.sim-select {
  padding: 5px 6px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); color: var(--text); font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem; width: 100%; max-width: 100%; outline: none; cursor: pointer; transition: border 0.2s;
  overflow: hidden; text-overflow: ellipsis;
}
.sim-select:focus { border-color: var(--accent); }
.sim-harga { font-weight: 700; color: var(--accent2); white-space: nowrap; min-width: 100px; }
.sim-total-row td { background: var(--surface2); font-weight: 700; border-top: 2px solid var(--border); }
.status-ok { color: var(--green); font-weight: 700; font-size: 0.78rem; }
.status-over { color: var(--red); font-weight: 700; font-size: 0.78rem; }

.add-sim-btn {
  display: flex; align-items: center; gap: 6px; padding: 7px 12px;
  background: transparent; border: 1px dashed var(--border); border-radius: 8px;
  color: var(--text2); cursor: pointer; font-size: 0.8rem; width: 100%;
  justify-content: center; margin-top: 8px; transition: all 0.2s;
}
.add-sim-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--surface2); }

.sim-display-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .sim-display-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .sim-display-grid { grid-template-columns: 1fr; } }
.sim-dv-card {
  border: 1.5px solid var(--border); border-radius: 12px;
  overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.07);
  background: var(--surface);
}
.sim-dv-head {
  background: var(--surface2); padding: 10px 12px;
  border-bottom: 1.5px solid var(--border);
  display: flex; flex-direction: column; gap: 2px;
}
.sim-dv-event { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.sim-dv-name { font-weight: 700; font-size: .9rem; color: var(--text); }
.sim-dv-paket { font-size: .76rem; color: var(--text2); }
.sim-dv-body { padding: 10px 12px; }

.dg-wrap { display: flex; flex-direction: column; gap: 6px; }
.dg-main { display: flex; align-items: center; gap: 6px; }
.dg-viewer { flex: 1; border-radius: 8px; overflow: hidden; border: 1.5px solid var(--border); background: var(--surface2); display: flex; }
.dg-img-main { width: 100%; aspect-ratio: 1; object-fit: contain; cursor: pointer; display: block; transition: opacity .15s; }
.dg-img-main:hover { opacity: .88; }
.dg-link-main { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 1; font-size: .95rem; color: var(--accent); text-decoration: none; gap: 6px; transition: background .15s, color .15s; }
.dg-link-main:hover { background: var(--accent); color: #fff; }
.dg-btn { flex-shrink: 0; width: 34px; height: 34px; border: 1.5px solid var(--border); border-radius: 50%; background: var(--surface); color: var(--text); font-size: 1.4rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .15s, color .15s, border-color .15s; padding: 0; line-height: 1; font-family: inherit; }
.dg-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.dg-counter { text-align: center; font-size: .73rem; color: var(--text2); }
.dg-strip { display: flex; gap: 4px; flex-wrap: wrap; }
.dg-sm-item { width: 38px; height: 38px; object-fit: cover; border-radius: 4px; cursor: pointer; border: 2px solid transparent; transition: border-color .15s, opacity .15s; opacity: .5; }
.dg-sm-item:hover { opacity: 1; }
.dg-sm-active { border-color: var(--accent) !important; opacity: 1 !important; }
.dg-sm-link { display: inline-flex; align-items: center; justify-content: center; background: var(--surface2); font-size: .8rem; }

.sim-btn-row { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 14px 14px; }
.sim-btn-row .add-sim-btn { margin-top: 0; flex: 1; min-width: 160px; }
.import-comp-btn { border-color: var(--accent) !important; color: var(--accent) !important; }
.import-comp-btn:hover { background: var(--accent) !important; color: #fff !important; }

.modal-import-bundle {
  max-width: 460px; width: 92%;
  display: flex; flex-direction: column; max-height: 82vh; padding: 0; overflow: hidden;
}
.modal-import-bundle h2 { padding: 20px 24px 12px; margin: 0; flex-shrink: 0; border-bottom: 1px solid var(--border); font-size: 1rem; }
.import-bundle-body { flex: 1; overflow-y: auto; padding: 16px 20px; }

.import-bundle-item {
  border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 16px; margin-bottom: 12px;
  transition: border-color 0.2s;
}
.import-bundle-item:last-child { margin-bottom: 0; }
.import-bundle-item:hover { border-color: var(--accent); }
.import-bundle-name { font-weight: 700; font-size: 0.95rem; margin-bottom: 4px; }
.import-bundle-meta { font-size: 0.78rem; color: var(--text2); margin-bottom: 8px; }
.import-bundle-vendors { font-size: 0.77rem; color: var(--text2); margin-bottom: 12px; line-height: 1.7; }
.import-bundle-item .btn { width: 100%; }
.import-bundle-empty { color: var(--text2); font-size: 0.85rem; padding: 8px 0; }

@media (max-width: 600px) {
  .sim-body { padding: 12px; }
  .sim-event-header { flex-direction: column; align-items: flex-start; }
  .budget-edit { width: 140px; }
  .sim-table th:nth-child(4), .sim-table td:nth-child(4) { width: 18%; min-width: 110px; }
  .sim-harga { font-size: 0.78rem; }
}

@media print {
  .add-sim-btn { display: none !important; }
  .sim-section { border: 1px solid #ccc !important; box-shadow: none !important; }
}
