:root {
  font-family:
    Inter,
    Segoe UI,
    Arial,
    sans-serif;
  color: #263b39;
  background: #f4f6f3;
  font-size: 14px;
  --green: #186957;
  --line: #dbe2dc;
  --muted: #6d7d76;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  height: 78px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 32px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.brand {
  font-size: 19px;
  font-weight: 700;
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand small {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  border-left: 1px solid var(--line);
  padding-left: 14px;
}
.brandmark {
  background: var(--green);
  color: white;
  padding: 7px 11px;
  border-radius: 9px;
  font-size: 25px;
}
.local {
  margin-left: auto;
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--muted);
}
main {
  max-width: 1680px;
  margin: 0 auto;
  padding: 28px 32px;
}
h1 {
  font-size: 29px;
  font-weight: 650;
  letter-spacing: -0.8px;
  margin: 8px 0;
}
h2 {
  font-size: 17px;
  margin: 0;
}
p {
  line-height: 1.6;
  color: var(--muted);
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.8px;
  font-weight: 700;
  color: var(--green);
}
.topline,
.row,
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.topline {
  justify-content: space-between;
  margin-bottom: 24px;
}
.topline p {
  margin: 6px 0;
}
.workspace {
  display: grid;
  grid-template-columns: 285px minmax(440px, 1fr) 360px;
  gap: 18px;
  align-items: start;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.panelhead {
  padding: 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pad {
  padding: 18px;
}
label {
  display: block;
  font-size: 11px;
  font-weight: 650;
  color: #55675f;
  margin: 12px 0 5px;
}
input,
select {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #ccd6cf;
  border-radius: 6px;
  background: white;
  color: #233c31;
  font: inherit;
  min-width: 0;
}
input[type="color"] {
  padding: 2px;
  height: 35px;
}
input[type="checkbox"] {
  width: auto;
}
input[type="range"] {
  padding: 0;
}
button,
.filebutton {
  border: 1px solid #cad6cd;
  background: white;
  color: #314d42;
  border-radius: 6px;
  padding: 9px 13px;
  font:
    600 12px Segoe UI,
    sans-serif;
  cursor: pointer;
  display: inline-block;
}
button:hover,
.filebutton:hover {
  background: #edf4ef;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.primary {
  background: var(--green);
  border-color: var(--green);
  color: white;
}
.primary:hover {
  background: #105747;
}
.danger {
  color: #a04d40;
}
.small {
  font-size: 11px;
  color: var(--muted);
}
.twocol {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.profile {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 12px 0;
  background: #fafbf9;
}
.profile summary {
  font-weight: 650;
  cursor: pointer;
}
.profile label {
  margin-top: 8px;
}
.upload {
  border: 1px dashed #a6bfae;
  border-radius: 9px;
  background: #f7faf6;
  text-align: center;
  padding: 22px 10px;
  margin: 15px 0;
}
.upload strong {
  display: block;
  margin: 5px 0;
}
.upload p {
  font-size: 12px;
  margin: 4px 0 14px;
}
.upload.drag {
  background: #e4f3e9;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
}
.stat {
  padding: 18px;
  border-right: 1px solid var(--line);
}
.stat:last-child {
  border: 0;
}
.stat b {
  font-size: 25px;
  display: block;
  margin-bottom: 3px;
}
.stat span {
  color: var(--muted);
  font-size: 11px;
}
.toolbar {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.toolbar select {
  width: auto;
  max-width: 180px;
}
.tablewrap {
  max-height: 570px;
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}
th {
  position: sticky;
  top: 0;
  background: #f8faf7;
  color: #6a7c70;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 13px 16px;
  border-bottom: 1px solid #eef1ec;
  vertical-align: middle;
}
tr[data-index] {
  cursor: pointer;
}
tr.selected {
  background: #edf5ef;
}
tr[data-index]:hover {
  background: #f2f7f0;
}
.filename {
  font-weight: 600;
  word-break: break-all;
}
.sub {
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}
.badge {
  display: inline-block;
  white-space: nowrap;
  border-radius: 12px;
  font-size: 10px;
  padding: 4px 8px;
  background: #edf2ee;
  color: #577063;
}
.badge.blocked,
.badge.review,
.badge.failed {
  background: #fff1d8;
  color: #906211;
}
.badge.done {
  background: #e5f3e9;
  color: #247247;
}
.progress {
  height: 4px;
  background: #e6ede5;
}
.progress > div {
  height: 100%;
  background: #3e8e6b;
  transition: width 0.2s;
}
.preview {
  height: 260px;
  position: relative;
  background: repeating-conic-gradient(#f3f3ef 0% 25%, #e9ece7 0% 50%) 50%/20px
    20px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.preview img {
  max-width: 100%;
  max-height: 260px;
  object-fit: contain;
}
.previewstage {
  position: relative;
  display: inline-flex;
  max-width: 100%;
  max-height: 100%;
}
.cropbox {
  position: absolute;
  border: 2px solid #e9a33b;
  box-shadow: 0 0 0 1000px #192b3359;
  pointer-events: none;
}
.warning {
  background: #fff7e6;
  color: #855d1c;
  border: 1px solid #eedbad;
  border-radius: 7px;
  padding: 12px;
  line-height: 1.6;
  font-size: 12px;
  margin: 12px 0;
}
.ok {
  color: #267247;
}
.tabs {
  display: flex;
  gap: 6px;
  padding: 12px 18px;
}
.tabs button.active {
  background: #e5efe8;
  color: var(--green);
}
.empty {
  padding: 55px 24px;
  text-align: center;
  color: var(--muted);
}
.auth {
  max-width: 480px;
  margin: 50px auto;
}
.auth h1 {
  font-size: 25px;
}
.auth button {
  margin-top: 18px;
}
.auth .panel {
  padding: 28px;
}
#notice {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #fff1d8;
  color: #7c4c12;
  padding: 14px 32px;
  border-bottom: 1px solid #ebd9b9;
}
footer {
  padding: 24px 32px;
  font-size: 11px;
  color: #819087;
  display: flex;
  justify-content: space-between;
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #80bba2;
  outline-offset: 2px;
}
.help {
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
}
@media (max-width: 1250px) {
  .workspace {
    grid-template-columns: 260px minmax(350px, 1fr);
  }
  .inspector {
    grid-column: 2;
  }
}
@media (max-width: 800px) {
  header {
    padding: 12px;
    height: auto;
  }
  .brand small,
  .local {
    display: none;
  }
  main {
    padding: 20px 12px;
  }
  .workspace {
    display: block;
  }
  .panel {
    margin-bottom: 16px;
  }
  .brand {
    font-size: 16px;
  }
  footer {
    padding: 20px 12px;
  }
  .topline {
    align-items: start;
  }
}

[hidden] {
  display: none !important;
}
.preset-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.preset-actions button {
  padding: 7px 9px;
  font-size: 11px;
}
.wide {
  width: 100%;
  margin-top: 12px;
  border-style: dashed;
}
.remove-profile {
  font-size: 10px;
  padding: 5px 8px;
  color: #8e5146;
}
.checkcol {
  width: 34px;
  padding: 12px 8px 12px 14px;
}
.checkcol input {
  width: 15px;
  height: 15px;
  accent-color: var(--green);
}
.issuehint {
  color: #9b6a18;
  font-size: 10px;
  line-height: 1.5;
  margin-top: 6px;
  max-width: 280px;
}
.bulkbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: #f8faf7;
  flex-wrap: wrap;
}
.bulkbar span {
  font-size: 11px;
  color: var(--muted);
}
.bulkbar select {
  width: auto;
  flex: 1;
  min-width: 140px;
  font-size: 11px;
  padding: 7px;
}
.bulkbar button {
  padding: 7px 9px;
  font-size: 11px;
}
.source-list {
  max-height: 330px;
  overflow: auto;
  padding: 0 18px 18px;
}
.source-list > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.source-list span {
  overflow-wrap: anywhere;
}
.topline > .row {
  flex-wrap: nowrap;
}
.topline select {
  max-width: 220px;
}
.tabs {
  flex-wrap: wrap;
  gap: 5px;
}
.tabs button {
  padding: 7px 9px;
  font-size: 11px;
}
.previewstage {
  touch-action: none;
  cursor: crosshair;
}
.previewstage img {
  user-select: none;
  -webkit-user-drag: none;
}
.inspector {
  position: sticky;
  top: 16px;
}
.inspector .pad {
  max-height: calc(100vh - 400px);
  min-height: 240px;
  overflow: auto;
}
.preview {
  height: 280px;
}
.preview img {
  max-height: 280px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  width: min(620px, calc(100vw - 36px));
  padding: 0;
  color: #263b39;
  box-shadow: 0 24px 90px #183d3933;
}
dialog::backdrop {
  background: #122f3866;
  backdrop-filter: blur(3px);
}
.dialoghead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.dialogbody {
  padding: 22px;
  max-height: 80vh;
  overflow: auto;
}
.dialogbody form > .primary {
  margin-top: 20px;
}
.compare-dialog {
  width: min(1120px, calc(100vw - 36px));
}
.comparegrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.comparegrid section {
  min-width: 0;
  background: #f5f7f3;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}
.comparegrid img {
  width: 100%;
  height: 380px;
  object-fit: contain;
}
.comparegrid h3 {
  font-size: 13px;
  font-weight: 600;
}
.healthgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.healthgrid > div {
  padding: 16px;
  background: #f3f7f2;
  border-radius: 8px;
}
.healthgrid strong,
.healthgrid span {
  display: block;
}
.healthgrid span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}
.healthgrid strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.tablewrap td {
  padding-top: 11px;
  padding-bottom: 11px;
}
#notice:empty {
  display: none;
}
@media (min-width: 1000px) {
  main {
    padding: 24px;
  }
  .workspace {
    grid-template-columns: 230px minmax(320px, 1fr) 340px;
    gap: 16px;
  }
  .inspector {
    grid-column: auto;
  }
  .panelhead,
  .pad {
    padding: 15px;
  }
  .stat {
    padding: 16px 12px;
  }
  .toolbar {
    padding: 12px;
    gap: 7px;
  }
  .toolbar select {
    max-width: 160px;
  }
  .toolbar button {
    padding: 8px 10px;
  }
  .tablewrap {
    max-height: calc(100vh - 380px);
    min-height: 280px;
  }
}
@media (min-width: 1450px) {
  .workspace {
    grid-template-columns: 270px minmax(420px, 1fr) 390px;
  }
  .preview {
    height: 320px;
  }
  .preview img {
    max-height: 320px;
  }
}
@media (max-width: 999px) {
  .inspector {
    position: static;
  }
  .inspector .pad {
    max-height: none;
  }
  .topline > .row {
    flex-wrap: wrap;
  }
  .comparegrid {
    grid-template-columns: 1fr;
  }
  .comparegrid img {
    height: 260px;
  }
}
