* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f4f6fb;
  color: #1c2333;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

h1 {
  margin: 0 0 8px;
}

.lead {
  margin: 0 0 16px;
  color: #4b556e;
}

.panel {
  background: #fff;
  border: 1px solid #d7dcea;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 14px;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.file-label {
  font-weight: bold;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.control-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.help-link {
  font-size: 14px;
  color: #4158d0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.help-link:hover,
.help-link:focus {
  color: #1f3d8f;
  outline: none;
}

button {
  border: 1px solid #4158d0;
  background: #4158d0;
  color: #fff;
  border-radius: 6px;
  padding: 7px 12px;
  cursor: pointer;
}

button[disabled] {
  opacity: 0.5;
  cursor: default;
}

.status {
  margin-top: 10px;
  font-size: 14px;
}

.sugar-help-details {
  font-size: 14px;
  scroll-margin-top: 16px;
}

.sugar-help-summary {
  font-weight: bold;
  font-size: 1.05rem;
  cursor: pointer;
  color: #1f3d8f;
  list-style-position: outside;
}

.sugar-help-summary::-webkit-details-marker {
  color: #4158d0;
}

.sugar-help-body {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e4e8f2;
}

.sugar-help-lead {
  margin-bottom: 12px;
}

.sugar-fix-dynamic {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #eef3ff;
  border: 1px solid #c5d4f7;
  color: #1f3d8f;
}

.sugar-fix-dynamic.is-off {
  background: #f6f7f9;
  border-color: #d7dcea;
  color: #4b556e;
}

.sugar-fix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.sugar-fix-table th,
.sugar-fix-table td {
  border: 1px solid #d7dcea;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.sugar-fix-table th {
  background: #2f5597;
  color: #fff;
}

.sugar-fix-table tbody tr:nth-child(even) {
  background: #f8faff;
}

.sugar-fix-table code {
  font-size: 12px;
}

.sugar-fix-samples {
  margin: 8px 0 0;
  padding-left: 20px;
}

.sugar-fix-samples li {
  margin-bottom: 4px;
}

.table-wrap {
  overflow-x: auto;
  max-height: 72vh;
}

.summary {
  margin-bottom: 12px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.summary-card {
  border: 1px solid #dce2f0;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fbfcff;
}

.summary-card .label {
  font-size: 12px;
  color: #4b556e;
}

.summary-card .value {
  margin-top: 4px;
  font-size: 20px;
  font-weight: bold;
}

.summary-splits {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 12px;
}

.summary-box {
  border: 1px solid #dce2f0;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
}

.summary-box h2 {
  margin: 0 0 8px;
  font-size: 14px;
}

.summary-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
}

.summary-list li {
  margin: 4px 0;
}

.summary-list code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
}

table {
  border-collapse: collapse;
  width: max-content;
  min-width: 100%;
  font-size: 13px;
}

th,
td {
  border: 1px solid #dce2f0;
  padding: 6px 8px;
  vertical-align: top;
  white-space: nowrap;
}

th {
  background: #eef2ff;
  position: sticky;
  top: 0;
  z-index: 1;
}

tr.completed-row {
  background: #f4fff4;
}

.col-task-id {
  min-width: 170px;
  max-width: 170px;
}

.col-address {
  min-width: 360px;
  max-width: 420px;
  white-space: normal;
  line-height: 1.3;
}

.col-main-type {
  min-width: 220px;
  max-width: 260px;
  white-space: normal;
}

.col-main-status {
  min-width: 160px;
  max-width: 180px;
}

.col-main-date {
  min-width: 165px;
  max-width: 165px;
}

.col-main-reason {
  min-width: 180px;
  max-width: 220px;
  white-space: normal;
}

.col-main-rnc {
  min-width: 120px;
  max-width: 140px;
}

.col-main-rnc-desc {
  min-width: 300px;
  max-width: 380px;
  white-space: normal;
}

.col-sub-type {
  min-width: 240px;
  max-width: 280px;
  white-space: normal;
}

.col-sub-date {
  min-width: 165px;
  max-width: 165px;
}

.col-sub-status {
  min-width: 145px;
  max-width: 170px;
}
