:root {
  font-family: Inter, "Segoe UI", sans-serif;
  color: #203e4f;
  background: #f2f5f5;
  font-size: 14px;
  --ink: #163d56;
  --teal: #087f77;
  --line: #dbe4e6;
  --muted: #58717d;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: #08756f;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  border: 1px solid transparent;
  background: var(--teal);
  color: white;
  border-radius: 7px;
  padding: 10px 15px;
  font-weight: 650;
  cursor: pointer;
}
button:hover {
  filter: brightness(0.94);
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button.secondary {
  background: white;
  border-color: #c8d7dc;
  color: var(--ink);
}
button.text-button {
  padding: 5px 2px;
  background: none;
  color: #136960;
  font-size: 12px;
}
.danger {
  color: #ad3333 !important;
}
input,
select,
textarea {
  background: white;
  border: 1px solid #b9cbd2;
  color: #173c52;
  border-radius: 5px;
  padding: 8px;
  max-width: 100%;
}
input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #6dc9bf;
  outline-offset: 2px;
}
input[type="checkbox"] {
  accent-color: var(--teal);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin: 10px 0 5px;
}
select {
  width: 100%;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 7px;
}
h2 {
  font-size: 21px;
  letter-spacing: -0.4px;
  margin-bottom: 12px;
}
h3 {
  font-size: 15px;
  margin-bottom: 10px;
}
p {
  line-height: 1.6;
}
summary {
  cursor: pointer;
  font-size: 13px;
  padding: 8px 0;
}
fieldset {
  border: 0;
  padding: 0;
}
details > div {
  padding: 6px 0;
}
.page-header {
  max-width: 1900px;
  margin: auto;
  padding: 32px 36px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.page-header p {
  color: var(--muted);
  margin: 0;
}
.brand {
  display: inline-block;
  color: var(--ink);
  font-size: 11px;
  letter-spacing: 1.7px;
  font-weight: 800;
  margin-bottom: 20px;
}
.brand span {
  color: #6e858f;
  font-weight: 500;
}
.badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.3px;
  border: 1px solid #b8d9d2;
  padding: 9px 13px;
  border-radius: 30px;
  color: #096f61;
  background: #e7f4ef;
}
.workspace {
  max-width: 1900px;
  margin: auto;
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
  gap: 24px;
  padding: 0 36px 50px;
}
.card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  padding: 22px;
  box-shadow: 0 3px 10px #12334403;
}
.library {
  align-self: start;
}
.library h2 {
  font-size: 15px;
}
.library > button {
  width: 100%;
  margin: 12px 0;
}
.library .small {
  margin-top: 15px;
}
.create-project {
  border-bottom: 1px solid var(--line);
  padding: 10px 0 16px;
  margin-bottom: 18px;
}
.create-project input {
  width: 100%;
}
.create-project button {
  margin-top: 12px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.section-heading h2,
.section-heading h3 {
  margin: 0;
}
.section-heading a {
  font-size: 11px;
}
.schedule-list {
  max-height: 330px;
  overflow: auto;
}
.schedule-list button {
  display: block;
  text-align: left;
  background: transparent;
  color: var(--ink);
  width: 100%;
  border: 1px solid transparent;
  padding: 10px 8px;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.schedule-list button.active {
  background: #edf7f4;
  border-color: #afd9d1;
}
.schedule-list button small {
  display: block;
  margin-top: 6px;
  font-weight: 400;
  color: var(--muted);
}
.steps {
  display: flex;
  list-style: none;
  gap: 30px;
  margin: 0 0 20px;
  padding: 4px 0;
  color: #748994;
  font-size: 12px;
}
.steps li {
  display: flex;
  gap: 8px;
  align-items: center;
}
.steps .active {
  color: #077668;
  font-weight: 750;
}
.steps .done {
  color: var(--ink);
}
.upload-panel {
  padding: 60px 40px;
  text-align: center;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.6px;
  color: #168777;
  font-weight: 800;
  display: block;
  margin-bottom: 15px;
}
.upload-panel h2 {
  font-size: 30px;
  margin-bottom: 15px;
}
.upload-panel p {
  color: var(--muted);
}
.drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 32px;
  border: 2px dashed #bfd3d6;
  border-radius: 10px;
  background: #f8fbfa;
  max-width: 610px;
  margin: 30px auto 10px;
  cursor: pointer;
}
.drop-zone.dragging {
  background: #e6f6ef;
  border-color: var(--teal);
}
.drop-zone input {
  width: 100%;
  max-width: 370px;
  font-size: 12px;
}
.drop-zone > span {
  font-weight: 400;
  color: var(--muted);
  font-size: 12px;
}
.drop-zone .upload-symbol {
  font-size: 30px;
  border: 1px solid #d2e5e3;
  border-radius: 10px;
  width: 48px;
  height: 48px;
  color: #168777;
  background: white;
}
.upload-panel form {
  margin-bottom: 24px;
}
.small {
  font-size: 12px;
}
.muted {
  color: var(--muted);
}
#notice {
  position: sticky;
  top: 56px;
  margin: 0 36px 16px;
  padding: 13px 18px;
  background: #e7f5ef;
  border: 1px solid #afd8c5;
  border-radius: 8px;
  z-index: 20;
  white-space: pre-line;
}
#notice.error {
  background: #fff1e9;
  border-color: #efbeab;
  color: #8e3e20;
}
.gate {
  margin: 0 36px 30px;
}
.processing {
  text-align: center;
  padding: 60px;
}
.spinner {
  height: 30px;
  width: 30px;
  border: 3px solid #d3eae3;
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.unit-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin: 22px 0;
  max-height: 600px;
  overflow: auto;
}
.unit {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
}
.unit .check {
  margin: 0;
}
.mapping {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.mapping input {
  width: 100%;
}
.check {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 13px;
  line-height: 1.4;
}
.review-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 14px;
}
.review-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.review-heading h2 {
  overflow-wrap: anywhere;
  font-size: 19px;
}
.review-heading .eyebrow {
  margin-bottom: 8px;
}
.coverage {
  padding: 14px 20px;
  margin-bottom: 14px;
}
.coverage summary {
  font-weight: 650;
}
.coverage .unit-review {
  border-top: 1px solid #edf1f1;
  padding: 7px 0;
  display: flex;
  gap: 10px;
  align-items: start;
}
.coverage .unit-review p {
  margin: 3px 0;
  color: var(--muted);
  font-size: 11px;
}
.coverage .unit-review.failed {
  color: #a54525;
}
.review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.items-panel {
  padding: 16px;
  min-width: 0;
}
.table-scroll {
  overflow: auto;
  max-height: 740px;
}
.items {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 660px;
  font-size: 12px;
}
.items th {
  background: #f0f5f5;
  padding: 11px 7px;
  position: sticky;
  top: 0;
  z-index: 2;
  color: #526e7b;
  font-weight: 600;
  white-space: nowrap;
}
.items td {
  padding: 10px 6px;
  border-bottom: 1px solid #e3eaea;
  vertical-align: top;
}
.items td:nth-child(2) {
  width: 43%;
}
.items td:first-child {
  width: 17%;
}
.items input:not([type="checkbox"]),
.items textarea {
  width: 100%;
  padding: 7px;
  font-size: 12px;
}
.items textarea {
  min-height: 64px;
  resize: vertical;
}
.items tr.selected {
  background: #eef8f5;
}
.items tr.excluded {
  background: #f5f5f5;
  color: #788c94;
}
.items .row-number {
  font-size: 10px;
  display: block;
  margin-bottom: 5px;
  color: #597583;
}
.items .check {
  font-size: 10px;
}
.items .check input {
  width: 13px;
  height: 13px;
}
.source-panel {
  padding: 16px;
  position: sticky;
  top: 75px;
  min-width: 0;
}
.source-view {
  position: relative;
  overflow: auto;
  max-height: 670px;
  min-height: 200px;
  background: #f0f3f3;
  border: 1px solid var(--line);
  border-radius: 4px;
  margin-top: 12px;
}
.source-image {
  position: relative;
  line-height: 0;
}
.source-image img {
  width: 100%;
  display: block;
}
.highlight {
  position: absolute;
  border: 2px solid #e3a629;
  background: #ffc92f26;
  pointer-events: none;
}
.source-table {
  border-collapse: collapse;
  font-size: 11px;
  min-width: 100%;
}
.source-table td,
.source-table th {
  border: 1px solid #d6e1e3;
  padding: 7px;
  white-space: pre-wrap;
  min-width: 60px;
  max-width: 400px;
}
.source-table tr.highlighted {
  background: #fff0bf;
}
.row-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}
.original-values {
  font-size: 11px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.5;
  background: #f3f7f7;
  padding: 10px;
}
.row-warning {
  color: #996b23;
  font-size: 11px;
  line-height: 1.4;
  margin: 7px 0;
}
.advanced-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.advanced-fields input {
  width: 100%;
}
.export-panel {
  margin-top: 14px;
}
.export-panel p {
  margin: 8px 0;
}
.export-panel ul {
  color: #9e5b26;
  font-size: 12px;
  line-height: 1.7;
  padding-left: 20px;
}
.end-actions {
  justify-content: flex-end;
  margin-top: 16px;
}
#history-panel {
  margin-top: 16px;
}
#export-history a {
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid #edf1f1;
  font-size: 13px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 1400px) {
  .workspace {
    padding: 0 20px 35px;
    grid-template-columns: 205px minmax(0, 1fr);
    gap: 16px;
  }
  .review-layout {
    grid-template-columns: 1fr;
  }
  .source-panel {
    position: static;
  }
  .source-view {
    max-height: 550px;
  }
  .review-heading {
    flex-direction: column;
    align-items: flex-start;
  }
  .steps {
    gap: 16px;
  }
  .library {
    padding: 15px;
  }
}
@media (max-width: 720px) {
  .page-header {
    padding: 24px 18px;
  }
  .page-header h1 {
    font-size: 24px;
  }
  .brand span {
    display: none;
  }
  .workspace {
    display: block;
    padding: 0 14px 30px;
  }
  .library {
    margin-bottom: 20px;
  }
  .schedule-list {
    max-height: 130px;
  }
  .upload-panel {
    padding: 30px 18px;
  }
  .upload-panel h2 {
    font-size: 24px;
  }
  .steps {
    justify-content: space-between;
    gap: 8px;
  }
  .steps li {
    font-size: 11px;
    gap: 4px;
  }
  .badge {
    font-size: 8px;
    padding: 7px;
  }
  .gate {
    margin: 0 14px 20px;
  }
  #notice {
    margin: 0 14px 14px;
  }
  .unit-list {
    grid-template-columns: 1fr;
  }
  .review-heading h2 {
    font-size: 17px;
  }
}
@media print {
  .page-header {
    padding: 0;
  }
  .library,
  .steps,
  .toolbar,
  button {
    display: none;
  }
  .workspace {
    display: block;
  }
  .card {
    box-shadow: none;
    border: none;
  }
  .source-panel {
    position: static;
  }
}
