/* 10. Survey Report — Monitoring Sump & Pompa (prefix: ms-) */
/* Modal ditempel ke <body>, jadi token juga didefinisikan di backdrop-nya. */
#surveyMonitoringSumpRoot,
.ms-modal-backdrop {
  --ms-ink: #0f172a;
  --ms-muted: #64748b;
  --ms-line: #e2e8f0;
  --ms-primary: #0284c7;
  --ms-primary-dark: #0369a1;
  --ms-bg-subtle: #f8fafc;
  --ms-card-bg: #ffffff;
  font-size: 13px;
  color: var(--ms-ink);
}

.ms-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 16px;
  background: var(--ms-card-bg);
  border: 1px solid var(--ms-line);
  border-radius: 10px;
  padding: 10px 14px;
}
.ms-toolbar label {
  display: grid;
  gap: 4px;
  font-size: 11.5px;
  color: var(--ms-muted);
  font-weight: 600;
}
.ms-toolbar select, .ms-toolbar input {
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 12px;
  background: #fff;
  min-width: 120px;
}
.ms-toolbar .ms-spacer {
  flex: 1;
}

.ms-btn {
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 7px;
  padding: 7px 14px;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  color: var(--ms-ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease-in-out;
}
.ms-btn:hover {
  background: #f1f5f9;
}
.ms-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.ms-btn.pri {
  background: var(--ms-primary);
  border-color: var(--ms-primary);
  color: #fff;
}
.ms-btn.pri:hover {
  background: var(--ms-primary-dark);
}
.ms-btn.sm {
  padding: 4px 9px;
  font-size: 11px;
}
.ms-btn.danger {
  color: #b91c1c;
  border-color: #fecaca;
}
.ms-btn.danger:hover {
  background: #fee2e2;
}

.ms-card {
  background: var(--ms-card-bg);
  border: 1px solid var(--ms-line);
  border-radius: 12px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.ms-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 18px;
  background: #f8fafc;
  border-bottom: 1px solid var(--ms-line);
}
.ms-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ms-card-title h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}
.ms-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: #e0f2fe;
  color: #0369a1;
}
.ms-badge.pit {
  background: #f1f5f9;
  color: #475569;
}

.ms-kpi-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  padding: 12px 18px;
  background: #ffffff;
  border-bottom: 1px solid var(--ms-line);
}
.ms-kpi-item {
  background: #f8fafc;
  border: 1px solid var(--ms-line);
  border-radius: 8px;
  padding: 8px 12px;
}
.ms-kpi-item small {
  display: block;
  font-size: 11px;
  color: var(--ms-muted);
  font-weight: 600;
}
.ms-kpi-item b {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.ms-kpi-item b span {
  font-size: 11px;
  font-weight: 500;
  color: var(--ms-muted);
}

.ms-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
  background: #f1f5f9;
  border-top: 1px solid var(--ms-line);
  border-bottom: 1px solid var(--ms-line);
  font-weight: 700;
  font-size: 12.5px;
  color: #334155;
}

.ms-table-wrap {
  overflow-x: auto;
  max-height: 480px;
}
.ms-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}
.ms-table th {
  background: #f8fafc;
  padding: 8px 10px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  border-bottom: 2px solid #cbd5e1;
  position: sticky;
  top: 0;
  z-index: 2;
  white-space: nowrap;
}
.ms-table th.num, .ms-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.ms-table td {
  padding: 6px 10px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}
.ms-table tr:hover td {
  background: #f8fafc;
}
.ms-table tfoot td {
  background: #f1f5f9;
  font-weight: 700;
  border-top: 2px solid #cbd5e1;
}

.ms-cell-input {
  width: 100%;
  padding: 4px 6px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  font-size: 12px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  box-sizing: border-box;
}
.ms-cell-input:hover {
  border-color: #cbd5e1;
  background: #fff;
}
.ms-cell-input:focus {
  border-color: var(--ms-primary);
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}
.ms-cell-input.is-dirty {
  background: #fef3c7;
  border-color: #f59e0b;
}

.ms-empty {
  padding: 36px 20px;
  text-align: center;
  color: var(--ms-muted);
}
.ms-empty-icon {
  font-size: 36px;
  margin-bottom: 8px;
}

/* Modal */
.ms-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1050;
}
.ms-modal-panel {
  background: #fff;
  border-radius: 12px;
  width: 90%;
  max-width: 580px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.ms-modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--ms-line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ms-modal-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}
.ms-modal-body {
  padding: 16px 18px;
  overflow-y: auto;
  display: grid;
  gap: 12px;
}
.ms-modal-body label {
  display: grid;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: #334155;
}
.ms-modal-body input, .ms-modal-body select {
  padding: 7px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 12.5px;
}
.ms-modal-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--ms-line);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: #f8fafc;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}
