:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17191c;
  background: #f4f5f6;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  min-height: 64px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  background: #15171a;
  border-bottom: 3px solid #d8bf46;
}

.brand {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0;
  color: inherit;
  text-decoration: none;
}

.environment {
  font-size: 12px;
  font-weight: 700;
  color: #d8bf46;
  letter-spacing: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.auth-link {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}

.login-page {
  width: min(440px, calc(100% - 40px));
  display: grid;
  place-items: center;
  padding: 48px 0;
}

.login-panel {
  width: 100%;
  padding: 32px;
  background: #fff;
  border: 1px solid #cfd3d7;
  border-top: 3px solid #d8bf46;
  border-radius: 4px;
}

.login-panel h1 {
  font-size: 32px;
}

.login-form {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.login-form label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 800;
}

.login-form input {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  color: #202327;
  background: #fff;
  border: 1px solid #b8bec5;
  border-radius: 4px;
  font: inherit;
}

main {
  width: min(920px, calc(100% - 40px));
  margin: 0 auto;
  flex: 1;
  padding: 64px 0 72px;
}

.heading {
  margin-bottom: 36px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #676d75;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(32px, 6vw, 52px);
  line-height: 1.05;
  letter-spacing: 0;
}

.intro {
  margin: 14px 0 0;
  color: #555b63;
  font-size: 17px;
}

.tool-list {
  border-top: 1px solid #cfd3d7;
}

.tool-row {
  min-height: 104px;
  padding: 22px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid #cfd3d7;
}

.active-tool {
  color: inherit;
  text-decoration: none;
}

.active-tool:hover {
  background: #eceff1;
}

.tool-row h2 {
  margin: 0 0 5px;
  font-size: 19px;
  letter-spacing: 0;
}

.tool-row p {
  margin: 0;
  color: #676d75;
  font-size: 14px;
}

.status {
  flex: 0 0 auto;
  min-width: 82px;
  padding: 6px 10px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid #b8bec5;
  border-radius: 4px;
}

.planned {
  color: #555b63;
  background: #e8eaec;
}

.ready {
  color: #174f35;
  background: #dcece4;
  border-color: #9ac2ad;
}

.tool-page {
  width: min(720px, calc(100% - 40px));
}

.wide-tool-page {
  width: min(920px, calc(100% - 40px));
}

.back-link {
  display: inline-block;
  margin-bottom: 32px;
  color: #454b52;
  font-size: 14px;
  font-weight: 700;
}

.compact-heading h1 {
  font-size: clamp(30px, 5vw, 44px);
}

.error {
  margin: 0 0 24px;
  padding: 14px 16px;
  color: #7a1f24;
  background: #f8e5e6;
  border-left: 4px solid #b43a42;
}

.split-form {
  display: grid;
  gap: 28px;
}

.split-form fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.split-form legend,
.file-field > span {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 800;
}

.radio-row {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-top: 1px solid #cfd3d7;
  cursor: pointer;
}

.radio-row:last-child {
  border-bottom: 1px solid #cfd3d7;
}

.radio-row input {
  width: 18px;
  height: 18px;
  accent-color: #15171a;
}

.radio-row span {
  display: grid;
  gap: 3px;
}

.radio-row small,
.file-field small {
  color: #676d75;
}

.file-field input {
  width: 100%;
  margin-bottom: 8px;
  padding: 14px;
  color: #31353a;
  background: #fff;
  border: 1px solid #b8bec5;
  border-radius: 4px;
}

.primary-button {
  width: fit-content;
  min-height: 44px;
  padding: 0 20px;
  color: #fff;
  background: #15171a;
  border: 1px solid #15171a;
  border-radius: 4px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.primary-button:hover {
  background: #33373c;
}

.section-tabs {
  display: flex;
  gap: 6px;
  margin: 0 0 44px;
  border-bottom: 1px solid #cfd3d7;
}

.section-tabs a {
  padding: 11px 15px;
  color: #555b63;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  border-bottom: 3px solid transparent;
}

.section-tabs a.current {
  color: #15171a;
  border-color: #d8bf46;
}

.work-section {
  padding: 0 0 56px;
  scroll-margin-top: 24px;
}

.work-section + .work-section {
  padding-top: 48px;
  border-top: 1px solid #cfd3d7;
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-title h2,
.section-title h3 {
  margin: 0;
  font-size: 21px;
  letter-spacing: 0;
}

.section-title span {
  color: #747a82;
  font-size: 12px;
}

.tool-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}

.tool-form label {
  display: grid;
  gap: 7px;
  color: #363a3f;
  font-size: 13px;
  font-weight: 800;
}

.tool-form input,
.tool-form select {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  color: #202327;
  background: #fff;
  border: 1px solid #b8bec5;
  border-radius: 4px;
  font: inherit;
}

.tool-form input[type="file"] {
  padding: 10px;
}

.full-field {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 4px;
}

.form-actions span {
  color: #676d75;
  font-size: 12px;
}

.result-band {
  margin-top: 28px;
  padding: 20px 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  border-top: 1px solid #9ac2ad;
  border-bottom: 1px solid #9ac2ad;
  background: #eef7f2;
}

.result-band > div {
  padding: 0 20px;
  display: grid;
  gap: 6px;
}

.result-band span {
  color: #4e6358;
  font-size: 12px;
}

.result-band strong {
  font-size: 20px;
}

.preflight-result {
  margin-top: 28px;
  padding: 22px;
  background: #fff;
  border: 1px solid #cfd3d7;
  border-radius: 4px;
}

.preflight-result h4 {
  margin: 20px 0 8px;
}

.preflight-result ul {
  margin: 0 0 18px;
  padding-left: 20px;
}

.secondary-button {
  min-height: 40px;
  padding: 0 16px;
  color: #202327;
  background: #fff;
  border: 1px solid #8e959d;
  border-radius: 4px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.button-link {
  display: inline-flex;
  align-items: center;
  color: #fff;
  text-decoration: none;
}

.notice {
  margin: 0 0 24px;
  padding: 14px 16px;
  color: #174f35;
  background: #e2f1e9;
  border-left: 4px solid #37845d;
}

.warning {
  margin: 0 0 24px;
  padding: 14px 16px;
  color: #5b4a16;
  background: #f3eac8;
  border-left: 4px solid #b6962d;
}

.issue-details {
  padding: 11px 0;
  border-bottom: 1px solid #d9dde0;
  font-size: 13px;
}

.issue-details summary {
  font-weight: 800;
  cursor: pointer;
}

.issue-details ul {
  margin: 10px 0 0;
  padding-left: 22px;
}

.issue-upload {
  margin-top: 12px;
  align-items: end;
}

.batch-summary {
  margin: 0 0 48px;
  padding: 18px 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid #cfd3d7;
  border-bottom: 1px solid #cfd3d7;
}

.batch-summary > div {
  padding: 0 18px;
  display: grid;
  gap: 5px;
}

.batch-summary span {
  color: #676d75;
  font-size: 12px;
}

.batch-summary strong {
  font-size: 19px;
}

.table-scroll {
  overflow-x: auto;
}

.order-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  font-size: 12px;
}

.order-table th,
.order-table td {
  padding: 11px 9px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #d9dde0;
}

.order-table th {
  color: #555b63;
  font-size: 11px;
  text-transform: uppercase;
}

.order-table td small {
  display: block;
  margin-top: 3px;
  color: #747a82;
}

.blocked-row {
  color: #747a82;
  background: #f2f2f2;
}

.row-status {
  display: inline-block;
  padding: 4px 6px;
  border-radius: 3px;
  font-weight: 700;
}

.ok-status {
  color: #174f35;
  background: #dcece4;
}

.wait-status {
  color: #5b4a16;
  background: #f3eac8;
}

.error-status {
  color: #7a1f24;
  background: #f8e5e6;
}

.muted-status {
  color: #555b63;
  background: #e5e7e9;
}

.row-selector {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #202327;
}

.selection-actions {
  padding-top: 16px;
}

.inline-actions {
  display: flex;
  gap: 12px;
}

.order-confirmation {
  padding: 32px;
  background: #fff;
  border: 1px solid #d1b84a;
}

.confirm-check {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 10px !important;
}

.confirm-check input {
  width: 18px;
  min-height: 18px;
}

.danger-button {
  min-height: 44px;
  padding: 0 20px;
  color: #fff;
  background: #8f252c;
  border: 1px solid #8f252c;
  border-radius: 4px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

@media (max-width: 620px) {
  .tool-form,
  .result-band,
  .batch-summary {
    grid-template-columns: 1fr;
  }

  .result-band > div {
    padding: 0 16px;
  }

  .section-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
}

footer {
  padding: 24px 32px;
  color: #747a82;
  font-size: 12px;
  border-top: 1px solid #dfe2e5;
}

@media (max-width: 560px) {
  .topbar {
    padding: 0 20px;
  }

  main {
    width: calc(100% - 32px);
    padding-top: 44px;
  }

  .tool-row {
    gap: 14px;
  }
}
