:root {
  font-family:Segoe UI,Arial,sans-serif;
  color:#25322e;
  background:#f5f6f3;
  font-size:14px;
  --green:#245c47;
  --border:#dfe4dd;
  --muted:#718077;
}
* {
  box-sizing:border-box;
}
body {
  margin:0;
}
button,input,select,textarea {
  font:inherit;
}
button,a,input,select,textarea {
  outline-offset:4px;
}
button {
  border:1px solid #cfd8cf;
  background:#fff;
  color:#304c3c;
  border-radius:7px;
  padding:10px 15px;
  font-weight:600;
  cursor:pointer;
  white-space:nowrap;
}
button:hover {
  background:#eef3ec;
}
button:disabled {
  opacity:.45;
  cursor:not-allowed;
}
a {
  color:inherit;
  text-decoration:none;
}
p {
  line-height:1.65;
  color:var(--muted);
}
h1,h2,h3,p {
  margin-top:0;
}
h1 {
  font-size:34px;
  font-weight:650;
  letter-spacing:-1.2px;
  margin-bottom:10px;
}
h2 {
  font-size:18px;
  letter-spacing:-.3px;
  margin-bottom:6px;
}
h3 {
  font-size:15px;
  margin-bottom:12px;
}
small {
  font-size:12px;
}
.sidebar {
  position:fixed;
  inset:0 auto 0 0;
  width:238px;
  background:#fff;
  border-right:1px solid var(--border);
  padding:30px 20px;
  display:flex;
  flex-direction:column;
}
.brand {
  display:flex;
  align-items:center;
  gap:11px;
  font-size:19px;
  letter-spacing:-.5px;
  font-weight:650;
}
.brand small {
  display:block;
  font-size:9px;
  letter-spacing:1.5px;
  color:#78857e;
  margin-top:6px;
}
.brand-icon {
  background:var(--green);
  color:#eaf2d5;
  border-radius:9px;
  display:grid;
  place-items:center;
  width:39px;
  height:42px;
  font-size:30px;
}
.workspace {
  border:1px solid var(--border);
  border-radius:7px;
  padding:12px 10px;
  margin:35px 0 25px;
  display:flex;
  align-items:center;
  gap:8px;
  font-size:12px;
}
.workspace-dot,.offline i {
  display:inline-block;
  background:#71936a;
  width:7px;
  height:7px;
  border-radius:50%;
}
.workspace .tag {
  margin-left:auto;
}
nav a {
  padding:12px 13px;
  display:flex;
  align-items:center;
  gap:13px;
  border-radius:6px;
  color:#6c7770;
  margin:5px 0;
  font-weight:550;
}
nav a span {
  font-size:19px;
  line-height:1;
}
nav a.active {
  background:#edf3e9;
  color:#245c47;
}
nav a:hover {
  background:#f4f6f0;
}
nav b {
  margin-left:auto;
  background:#dfead9;
  padding:2px 7px;
  border-radius:5px;
  font-size:11px;
}
.nav-label {
  font-size:10px;
  letter-spacing:1.5px;
  color:#909990;
  margin:32px 13px 13px;
}
.local-note {
  margin-top:auto;
  padding:18px 10px 0;
  border-top:1px solid var(--border);
  font-size:11px;
}
.local-note strong {
  margin-left:8px;
  font-weight:600;
}
.local-note p {
  font-size:11px;
  margin:9px 0 0;
}
.shell {
  margin-left:238px;
}
.topbar {
  height:73px;
  border-bottom:1px solid var(--border);
  background:#fafbf8;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 38px;
  font-size:12px;
  color:var(--muted);
}
.topbar strong {
  color:#37463c;
  font-weight:500;
}
.slash {
  margin:0 14px;
  color:#b7beb7;
}
.offline {
  display:flex;
  align-items:center;
  gap:7px;
  font-size:11px;
}
main {
  padding:38px;
  max-width:1600px;
  margin:0 auto;
  min-height:calc(100vh - 125px);
}
footer {
  padding:18px 38px;
  color:#8a948c;
  font-size:9px;
  letter-spacing:1.4px;
  display:flex;
  justify-content:space-between;
}
footer span {
  letter-spacing:0;
  font-size:10px;
}
.page-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  margin-bottom:28px;
}
.page-heading p {
  margin:0;
  font-size:13px;
}
.eyebrow {
  font-size:10px;
  color:#76866e;
  font-weight:650;
  letter-spacing:1.8px;
  margin-bottom:12px;
}
.actions {
  display:flex;
  align-items:center;
  gap:10px;
}
.primary {
  background:var(--green);
  border-color:var(--green);
  color:white;
}
.primary:hover {
  background:#184633;
}
.primary span {
  margin-right:7px;
}
.stats {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:16px;
  margin-bottom:25px;
}
.stats article {
  background:#fff;
  border:1px solid var(--border);
  border-radius:9px;
  padding:22px;
}
.stats article span {
  color:#6c7d71;
  font-size:12px;
}
.stats strong {
  display:block;
  font-size:37px;
  font-weight:600;
  letter-spacing:-1px;
  margin:12px 0;
}
.stats small {
  color:#8b958d;
  font-size:11px;
}
.card {
  background:#fff;
  border:1px solid var(--border);
  border-radius:10px;
  overflow:hidden;
}
.card-heading {
  padding:23px 24px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.card-heading p {
  font-size:12px;
  margin:0;
}
.overview-grid {
  display:grid;
  grid-template-columns:minmax(0,1fr) 270px;
  gap:22px;
  margin-bottom:25px;
}
.pipeline {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(120px,1fr));
  padding:0 24px 25px;
  gap:12px;
}
.stage {
  border-color:#e5e9df;
  background:#fafbf8;
  text-align:left;
  white-space:normal;
  padding:17px 12px;
  min-width:0;
}
.stage>div {
  display:flex;
  flex-direction:column;
  gap:13px;
  align-items:flex-start;
}
.stage-number {
  font-size:10px;
  color:#8a9686;
}
.stage strong {
  display:block;
  font-size:30px;
  font-weight:550;
  margin:18px 0 9px;
}
.stage small {
  display:block;
  font-size:10px;
  color:#7d8b77;
  margin-top:14px;
}
progress {
  width:100%;
  height:5px;
  display:block;
  border:none;
  background:#e2e8db;
  border-radius:4px;
}
progress::-webkit-progress-bar {
  background:#e2e8db;
  border-radius:4px;
}
progress::-webkit-progress-value {
  background:#87a374;
  border-radius:4px;
}
progress::-moz-progress-bar {
  background:#87a374;
}
.quick-card {
  background:#eaf0df;
  border:1px solid #dbe5cd;
  border-radius:10px;
  padding:26px;
}
.quick-card h2 {
  font-size:27px;
  line-height:1.2;
  letter-spacing:-.8px;
  color:#31553d;
}
.quick-card p {
  font-size:12px;
  color:#6a7d60;
}
.quick-card button {
  display:flex;
  justify-content:space-between;
  width:100%;
  font-size:12px;
  background:#f8fbf2;
  border-color:#cfddbf;
}
.quick-card a {
  display:block;
  font-size:11px;
  margin-top:15px;
  color:#65795a;
}
.table-wrap {
  overflow:auto;
}
table {
  border-collapse:collapse;
  width:100%;
  min-width:700px;
  text-align:left;
}
th {
  background:#fafbf8;
  color:#8b958d;
  text-transform:uppercase;
  font-size:9px;
  letter-spacing:1.1px;
  font-weight:650;
  padding:13px 22px;
  border-top:1px solid #e9ece6;
  border-bottom:1px solid #e9ece6;
  white-space:nowrap;
}
td {
  padding:17px 22px;
  border-bottom:1px solid #edf0e9;
  font-size:12px;
  max-width:350px;
  overflow-wrap:anywhere;
}
tr:last-child td {
  border-bottom:0;
}
.device-link {
  border:0;
  padding:0;
  border-radius:2px;
  color:#355343;
  font-size:12px;
  letter-spacing:.2px;
}
.device-link:hover {
  text-decoration:underline;
  background:none;
}
.subtext {
  font-size:11px;
  color:#8a948b;
  margin-top:5px;
}
.order-cell {
  color:#7a897c;
  font-size:11px;
}
.badge {
  display:inline-block;
  padding:5px 9px;
  border-radius:5px;
  font-size:10px;
  font-weight:550;
  background:#eff2ed;
  color:#677261;
  white-space:normal;
  overflow-wrap:anywhere;
}
.badge.green {
  background:#eaf2e6;
  color:#5a8050;
}
.badge.blue {
  background:#eaf0f6;
  color:#5d7c99;
}
.badge.amber {
  background:#f9f0de;
  color:#a2813c;
}
.badge.muted {
  background:#efefed;
  color:#838679;
}
.tag {
  display:inline-block;
  font-size:10px;
  padding:4px 7px;
  background:#f1f4ec;
  color:#7c8b73;
  border-radius:4px;
}
.text-link {
  font-size:12px;
  color:#4b6b47;
}
.text-button {
  border:0;
  padding:6px;
  background:transparent;
  color:#71836b;
  font-size:12px;
}
.text-button:hover {
  background:#f2f6ee;
}
.filters {
  padding:20px;
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
}
.filters label {
  margin:0;
}
.search {
  flex:1;
  min-width:220px;
}
.filters input,.filters select {
  font-size:12px;
}
.selection-bar {
  border-top:1px solid var(--border);
  padding:10px 22px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-size:11px;
  color:#819079;
}
.selection-bar button {
  font-size:11px;
  padding:7px 10px;
}
.check-col {
  width:35px;
}
input[type=checkbox] {
  width:16px;
  height:16px;
  accent-color:var(--green);
  padding:0;
  flex-shrink:0;
}
label {
  display:block;
  font-size:12px;
  font-weight:600;
  color:#5a6c5e;
}
input,select,textarea {
  display:block;
  width:100%;
  border:1px solid #d5ddd2;
  border-radius:6px;
  padding:10px 11px;
  background:white;
  color:#314536;
  margin-top:7px;
  min-width:0;
}
input[type=checkbox] {
  margin:0;
}
textarea {
  resize:vertical;
  line-height:1.6;
}
label small {
  display:block;
  color:#939c8f;
  font-weight:400;
  margin-top:6px;
}
.notice {
  padding:13px 16px;
  background:#f0f4e9;
  border:1px solid #dfe7d7;
  border-radius:6px;
  font-size:12px;
  color:#718264;
  line-height:1.6;
  margin-bottom:22px;
}
.order-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(310px,1fr));
  gap:22px;
}
.order-card {
  padding:24px;
}
.order-top,.order-bottom {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}
.order-card h2 {
  margin-top:23px;
}
.order-card p {
  font-size:12px;
  white-space:pre-wrap;
}
.order-assets {
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  min-height:36px;
  margin:20px 0;
}
.order-bottom {
  padding-top:18px;
  border-top:1px solid var(--border);
  font-size:12px;
}
.order-bottom button {
  font-size:12px;
}
.transfer-grid {
  display:grid;
  grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);
  gap:22px;
}
.padded {
  padding:26px;
}
.padded>p {
  font-size:13px;
}
.feature-icon {
  font-size:26px;
  background:#edf3e6;
  color:#6b875c;
  padding:7px 14px;
  border-radius:8px;
  display:inline-block;
  margin-bottom:20px;
}
.file-zone {
  padding:24px;
  border:1px dashed #bdcdb4;
  border-radius:8px;
  background:#fafbf7;
  margin-bottom:20px;
}
.file-zone input {
  border:0;
  background:transparent;
  padding:12px 0;
}
.file-zone small {
  display:block;
  font-weight:400;
  margin-top:10px;
}
.format {
  margin-top:30px;
  border-top:1px solid var(--border);
  padding-top:24px;
}
.format code {
  display:block;
  font-size:12px;
  line-height:1.8;
  overflow-wrap:anywhere;
  background:#f4f6f0;
  padding:15px;
  border-radius:5px;
}
.format p {
  font-size:12px;
}
#preview {
  margin-top:24px;
}
#preview:empty {
  display:none;
}
#preview td,#preview th {
  padding:11px;
  font-size:11px;
}
#preview .table-wrap {
  max-height:400px;
  margin-bottom:20px;
}
.validation {
  color:#a34235;
  background:#fff2ed;
  padding:15px;
  border-radius:6px;
  font-size:12px;
  line-height:1.6;
  margin-bottom:20px;
}
.settings-grid {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:22px;
  margin:25px 0;
}
.reset-card {
  display:flex;
  gap:24px;
  align-items:center;
  justify-content:space-between;
  margin-top:24px;
}
.reset-card p {
  font-size:12px;
  margin:0;
  max-width:650px;
}
.danger {
  color:#ab574b;
  border-color:#e2bfb5;
}
.empty {
  text-align:center;
  padding:60px 20px;
  color:#8b9980;
}
.empty>span {
  font-size:32px;
}
.empty h3 {
  margin-top:17px;
}
.empty p {
  font-size:13px;
}
dialog {
  border:1px solid #d4ddce;
  border-radius:12px;
  box-shadow:0 25px 80px #172d2730;
  padding:0;
  width:min(500px,calc(100vw - 32px));
  max-height:90vh;
  color:#2d4031;
}
dialog.wide {
  width:min(740px,calc(100vw - 32px));
}
dialog::backdrop {
  background:#142d2666;
  backdrop-filter:blur(3px);
}
.modal-heading {
  padding:25px 28px;
  border-bottom:1px solid var(--border);
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:15px;
}
.modal-heading p {
  font-size:12px;
  margin:6px 0 0;
}
.close {
  font-size:24px;
  padding:0 5px;
  line-height:1;
}
dialog form {
  padding:25px 28px;
}
.form-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
}
.full {
  grid-column:1/-1;
}
.modal-footer {
  margin-top:22px;
  display:flex;
  justify-content:flex-end;
  gap:10px;
}
.form-error {
  color:#b04f3a;
  font-size:13px;
  margin-top:14px;
  line-height:1.6;
}
.form-error:empty {
  display:none;
}
.history, .group-associations {
  border-top:1px solid var(--border);
  padding:24px 28px;
  background:#fafbf7;
}
.history-item {
  display:flex;
  gap:14px;
  margin-top:15px;
}
.history-item i {
  width:7px;
  height:7px;
  border-radius:50%;
  background:#99af88;
  margin-top:6px;
  flex-shrink:0;
}
.history p {
  font-size:12px;
  margin-bottom:4px;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}
.history time {
  color:#9aa591;
  font-size:10px;
}
.device-picker {
  max-height:260px;
  overflow:auto;
  margin-top:15px;
  border:1px solid var(--border);
  border-radius:6px;
}
.pick-row {
  display:flex;
  gap:12px;
  align-items:center;
  padding:13px;
  border-bottom:1px solid #edf0e9;
}
.pick-row[hidden] {
  display:none;
}
.pick-row small {
  margin-top:3px;
}
.pick-status {
  font-size:10px;
  font-weight:400;
  color:#8b947e;
  margin-left:auto;
  max-width:170px;
}
#order-form h3 {
  margin-top:24px;
}
#toast {
  position:fixed;
  bottom:24px;
  right:24px;
  max-width:calc(100vw - 48px);
  background:#234f3b;
  color:white;
  padding:14px 20px;
  border-radius:8px;
  box-shadow:0 8px 35px #193b2522;
  opacity:0;
  pointer-events:none;
  transform:translateY(10px);
  transition:.2s;
  font-size:13px;
  z-index:20;
}
#toast.visible {
  opacity:1;
  transform:translateY(0);
}
#toast.error {
  background:#984b3b;
}
.sr-only {
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
}
@media(min-width:1550px) {
  main {
    padding-top:45px;
  }
  .stats article {
    padding:25px;
  }
  .stage {
    padding:22px 16px;
  }
}
@media(max-width:1150px) {
  .sidebar {
    width:208px;
    padding:25px 15px;
  }
  .shell {
    margin-left:208px;
  }
  main {
    padding:26px;
  }
  .overview-grid {
    grid-template-columns:1fr;
  }
  .quick-card {
    display:none;
  }
  .stats {
    gap:10px;
  }
  .stats article {
    padding:17px;
  }
  .transfer-grid {
    grid-template-columns:1fr;
  }
  .page-heading {
    align-items:flex-start;
  }
  .page-heading .actions {
    flex-wrap:wrap;
    justify-content:flex-end;
  }
  .topbar {
    padding:0 26px;
  }
  td,th {
    padding-left:15px;
    padding-right:15px;
  }
}
@media(max-width:760px) {
  .sidebar {
    position:static;
    width:100%;
    padding:18px;
    border:0;
    border-bottom:1px solid var(--border);
  }
  .brand {
    font-size:18px;
  }
  .brand small {
    font-size:8px;
  }
  .brand-icon {
    width:34px;
    height:36px;
  }
  .workspace,.local-note,.nav-label {
    display:none;
  }
  nav {
    display:flex;
    gap:5px;
    flex-wrap:wrap;
    margin-top:15px;
  }
  nav a {
    padding:10px;
    white-space:nowrap;
    font-size:11px;
  }
  nav a span,nav b {
    display:none;
  }
  .shell {
    margin:0;
  }
  .topbar {
    height:50px;
    padding:0 20px;
  }
  main {
    padding:25px 18px;
  }
  h1 {
    font-size:27px;
  }
  .page-heading {
    display:block;
  }
  .page-heading .actions {
    justify-content:flex-start;
    margin-top:18px;
  }
  .stats {
    grid-template-columns:1fr 1fr;
  }
  .stats strong {
    font-size:29px;
  }
  .pipeline {
    grid-template-columns:1fr 1fr;
    padding:0 18px 18px;
  }
  .card-heading {
    padding:20px 18px;
  }
  .settings-grid,.form-grid {
    grid-template-columns:1fr;
  }
  .full {
    grid-column:auto;
  }
  .reset-card {
    display:block;
  }
  .reset-card button {
    margin-top:18px;
  }
  .filters {
    padding:15px;
    gap:10px;
  }
  .filters label {
    flex:1;
    min-width:130px;
  }
  .selection-bar {
    gap:12px;
    flex-wrap:wrap;
    padding:12px 15px;
  }
  .order-grid {
    grid-template-columns:1fr;
  }
  .padded {
    padding:20px;
  }
  footer {
    padding:18px;
    line-height:1.6;
    gap:15px;
  }
  dialog form,.modal-heading,.history,.group-associations {
    padding:20px;
  }
  .order-top {
    align-items:flex-start;
    flex-direction:column;
  }
}

.saved-review { max-height: 20rem; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.saved-review dt { font-weight: 600; }
.saved-review dd { margin: 0 0 .6rem; }
.saved-review pre { white-space: pre-wrap; overflow-wrap: anywhere; }
#restore-preview, #backup-status { overflow-wrap: anywhere; }
.intake-help { font-size: .85rem; line-height: 1.6; }
.intake-section { border-top: 1px solid #dfe4dc; margin-top: 18px; padding-top: 14px; }
.intake-section summary, .test-run summary { cursor: pointer; font-weight: 600; padding: 8px 0; }
.intake-section summary span { display: block; margin: 6px 0 0 18px; font-size: .8rem; font-weight: 400; }
.intake-section > .form-grid, .test-grid { margin-top: 14px; }
.test-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 20px; }
.test-opt-in { margin: 16px 0; }
.test-run { border: 1px solid #dfe4dc; padding: 10px; margin-bottom: 12px; }
.serial-warning { background: #fff5db; border: 2px solid #936319; padding: 14px; margin: 14px 0; color: #51360c; }
.input-error { color: #9d302d; }
.input-error:empty { display: none; }
[aria-invalid="true"] { border-color: #9d302d; }
#device-form .modal-footer { flex-wrap: wrap; }
summary:focus-visible { outline: 2px solid #245d4b; outline-offset: 3px; }
@media (max-width: 540px) { .test-grid { grid-template-columns: 1fr; } }

.mapping-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:12px; margin:16px 0; }
.mapping-grid label { min-width:0; overflow-wrap:anywhere; }
.csv-confirm { display:flex; gap:10px; align-items:flex-start; }
.csv-confirm input { width:auto; margin-top:4px; }
#csv-mapping { margin-top:20px; }

.csv-warnings { max-height:280px; overflow:auto; overflow-wrap:anywhere; }
.transfer-grid.import-active { grid-template-columns:minmax(0,1fr); }
#preview td:nth-child(3), #preview td:nth-child(4) { white-space:nowrap; }

.pagination { display:flex; flex-wrap:wrap; gap:10px; align-items:center; padding:14px 20px; }
.pagination span { flex:1; font-size:12px; min-width:160px; }
.testing-help { padding:0 20px 16px; font-size:12px; }
.testing-help summary { cursor:pointer; }
.test-summary { font-size:12px; font-weight:600; }
.test-summary.attention { color:#8a3e23; }
.group-link { display:block; text-align:left; white-space:normal; }
.group-link .subtext { display:block; }
.group-actions { flex-wrap:wrap; margin-top:16px; }
.serial-summary { max-width:230px; overflow-wrap:anywhere; }
#import-destination { margin-top:20px; }

.filters label { max-width:100%; min-width:0; }
.filters select { max-width:100%; }
.filters .search { flex:1 0 280px; }
.getting-started { margin-bottom:20px; }
.getting-started summary { cursor:pointer; font-weight:600; }
.getting-started li { margin:10px 0; }
.getting-started .actions { flex-wrap:wrap; }
.help-card { max-width:900px; }
.help-card h2 { margin-top:24px; }
.data-location { overflow-wrap:anywhere; font-family:monospace; }
.release-label { font-weight:600; color:var(--green); }
.operation-status { margin:18px 38px 0; }
.operation-status[hidden] { display:none; }
.customer-guide { max-width:850px; margin:32px auto; padding:24px; overflow-wrap:anywhere; }
.customer-guide h1,.customer-guide h2 { margin-top:28px; }
.customer-guide p { line-height:1.7; margin:16px 0; }
@media (max-width:760px) { .operation-status { margin:18px 18px 0; } .customer-guide { margin:0; padding:20px; } }
@media (max-width:540px) {
  .filters { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .filters .search, .filters label:has([data-filter="order"]), .filters label:has([data-filter="batch"]) { grid-column:1 / -1; }
}

.preview-notice { margin: 20px 38px 0; }
@media (max-width: 760px) { .preview-notice { margin: 18px 18px 0; } }
