:root {
  color-scheme: light;
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  --page: #f3f5f2;
  --surface: #ffffff;
  --surface-soft: #f8faf7;
  --ink: #17202a;
  --muted: #667085;
  --line: #d9e0dc;
  --line-strong: #c7d0cb;
  --brand: #0f766e;
  --brand-strong: #115e59;
  --blue: #2563eb;
  --green: #15803d;
  --amber: #b7791f;
  --red: #b42318;
  --shadow: 0 18px 44px rgba(23, 32, 42, .08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--page);
  color: var(--ink);
  letter-spacing: 0;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  color: var(--brand-strong);
}

button,
.button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: var(--brand);
  color: #fff;
  white-space: nowrap;
}

button:hover,
.button:hover {
  color: #fff;
  background: var(--brand-strong);
}

button:disabled {
  background: #a9b5b0;
  color: #eef3f0;
  cursor: not-allowed;
}

.primary {
  background: var(--brand);
  color: #fff;
}

.secondary,
.ghost {
  background: #fff;
  border-color: var(--line-strong);
  color: var(--ink);
}

.secondary:hover,
.ghost:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.text-button {
  min-height: 34px;
  border-radius: 6px;
  padding: 7px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  font-weight: 700;
}

.text-button:hover {
  background: #e8f4f1;
  color: var(--brand-strong);
}

.button-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: rgba(255, 255, 255, .2);
  font-size: 16px;
  line-height: 1;
}

input,
textarea,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 9px 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .14);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
  line-height: 1.18;
}

h2 {
  font-size: 18px;
  line-height: 1.3;
}

.muted,
.page-subtitle,
.section-title p,
.machine-title p,
.machine-meta {
  color: var(--muted);
}

.eyebrow {
  margin-bottom: 7px;
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 800;
}

.admin-body {
  background:
    linear-gradient(180deg, #eef3f0 0, var(--page) 220px),
    var(--page);
}

.topbar {
  min-height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 22px;
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  min-width: 210px;
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #123833;
  color: #f5d76e;
  font-size: 13px;
  font-weight: 900;
}

.brand-mark.large {
  width: 48px;
  height: 48px;
  font-size: 16px;
}

.brand-text {
  display: grid;
  gap: 2px;
}

.brand-text b {
  font-size: 15px;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
}

.topnav {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 4px;
}

.topnav a {
  min-width: 66px;
  min-height: 38px;
  border-radius: 7px;
  padding: 9px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #344054;
  font-weight: 700;
}

.topnav a.active,
.topnav a:hover {
  background: #e5f1ee;
  color: var(--brand-strong);
}

.logout-form {
  margin: 0;
}

.shell {
  width: min(1360px, 100%);
  margin: 0 auto;
  padding: 26px 24px 44px;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 18px;
}

.page-head h1 {
  margin-bottom: 8px;
}

.head-actions,
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.head-actions form,
.inline-actions form {
  margin: 0;
}

.inline-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.live-chip {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, .78);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(21, 128, 61, .12);
}

.live-chip [data-tone="bad"] {
  color: var(--red);
}

.live-chip [data-tone="bad"] + .live-dot,
.live-chip:has([data-tone="bad"]) .live-dot {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(180, 35, 24, .12);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric-card,
.panel,
.table-panel,
.empty-surface {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(23, 32, 42, .03);
}

.metric-card {
  padding: 16px;
  display: grid;
  gap: 8px;
}

.metric-card span,
.metric-card small {
  color: var(--muted);
  font-size: 13px;
}

.metric-card strong {
  font-size: 30px;
  line-height: 1;
}

.machine-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.machine-pill {
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5px 9px;
  align-items: center;
  background: #fff;
  color: var(--ink);
}

.machine-pill b {
  font-size: 15px;
}

.machine-pill small {
  grid-column: 2;
  color: var(--muted);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #98a2b3;
}

.tone-good .status-dot {
  background: var(--green);
}

.tone-info .status-dot {
  background: var(--blue);
}

.tone-warn .status-dot {
  background: var(--amber);
}

.tone-bad .status-dot {
  background: var(--red);
}

.table-panel {
  overflow: hidden;
}

.section-title {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.compact-title {
  padding: 0 0 14px;
  border-bottom: 0;
}

.count-pill,
.badge {
  min-height: 26px;
  border-radius: 999px;
  padding: 5px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  background: #edf1ee;
  color: #475467;
}

.badge.large {
  min-height: 32px;
  padding: 7px 12px;
  font-size: 13px;
}

.tone-good {
  background: #e7f6ea;
  color: var(--green);
  border-color: #bfe6c8;
}

.tone-info {
  background: #eaf1ff;
  color: var(--blue);
  border-color: #c7d8ff;
}

.tone-warn {
  background: #fff4df;
  color: var(--amber);
  border-color: #f3d49a;
}

.tone-bad {
  background: #fff0ee;
  color: var(--red);
  border-color: #f2c3be;
}

.tone-muted {
  background: #edf1ee;
  color: #667085;
  border-color: var(--line);
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.table-scroll.slim {
  margin: 0 -18px -18px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.data-table th,
.data-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  background: #f3f6f4;
  color: #475467;
  font-size: 12px;
  font-weight: 900;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.compact th,
.compact td {
  padding: 10px 12px;
  font-size: 13px;
}

.order-link {
  color: var(--ink);
  font-weight: 900;
}

.progress-cell {
  min-width: 190px;
}

.level-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 7px;
}

.level-row span {
  color: var(--muted);
}

.mini-progress,
.hero-progress {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #e4e9e6;
}

.mini-progress span,
.hero-progress span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #d6a540);
}

.hero-progress {
  height: 12px;
}

.table-action {
  text-align: right;
}

.empty {
  color: var(--muted);
  text-align: center;
  padding: 28px;
}

.empty-surface {
  padding: 22px;
  color: var(--muted);
}

.panel {
  padding: 18px;
  margin-bottom: 18px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, .75fr);
  gap: 18px;
  align-items: start;
}

.progress-panel,
.link-panel {
  min-height: 250px;
}

.percent-label {
  font-size: 24px;
  color: var(--brand-strong);
}

.kv {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 11px 14px;
  margin: 16px 0 0;
}

.kv.two-column {
  grid-template-columns: 110px minmax(0, 1fr) 110px minmax(0, 1fr);
}

.kv dt {
  color: var(--muted);
}

.kv dd {
  margin: 0;
  min-width: 0;
  word-break: break-word;
}

.copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.shot-preview {
  width: 100%;
  max-height: 560px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f172a;
}

.shot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.shot-card {
  display: grid;
  gap: 7px;
  color: var(--ink);
}

.shot-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #111827;
}

.shot-card span {
  color: var(--muted);
  font-size: 12px;
}

.event-list {
  display: grid;
  gap: 10px;
}

.event-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  background: #fff;
}

.event-item time,
.event-item small {
  color: var(--muted);
  font-size: 12px;
}

.event-item p {
  margin-top: 4px;
  color: #344054;
  line-height: 1.5;
}

.form-panel,
.settings-layout {
  display: grid;
  gap: 16px;
}

.form-panel {
  max-width: 980px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.form-section {
  display: grid;
  gap: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-grid label,
.machine-form label,
.login-box label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-weight: 800;
}

.wide {
  grid-column: 1 / -1;
}

.error {
  padding: 10px 12px;
  border: 1px solid #f2c3be;
  border-radius: 7px;
  background: #fff0ee;
  color: var(--red);
  font-weight: 700;
}

.machine-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 16px;
}

.machine-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.machine-form > form {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.machine-form > .inline-actions {
  grid-column: 1 / -1;
}

.machine-title {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.machine-meta,
.machine-form button {
  grid-column: 1 / -1;
}

.switch-row {
  min-height: 42px;
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.switch-row input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  padding: 0;
  accent-color: var(--brand);
}

.switch-row.warning {
  border-color: #f3d49a;
  background: #fff8ea;
}

.settings-layout {
  max-width: 980px;
}

.settings-card {
  display: grid;
  gap: 14px;
}

.sticky-actions {
  justify-content: flex-start;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, .16), transparent 34%),
    linear-gradient(315deg, rgba(183, 121, 31, .12), transparent 36%),
    #eef3f0;
}

.login-shell {
  width: min(860px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 24px;
  align-items: stretch;
}

.login-copy,
.login-box {
  background: rgba(255, 255, 255, .9);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.login-copy {
  padding: 32px;
  display: grid;
  align-content: end;
  gap: 12px;
  min-height: 340px;
}

.login-copy h1 {
  font-size: 32px;
}

.login-copy p {
  color: var(--muted);
}

.login-box {
  padding: 26px;
  display: grid;
  gap: 16px;
}

.login-box h2 {
  font-size: 24px;
}

.customer-page {
  min-height: 100vh;
  padding: 28px 20px 44px;
  background: #f4f7f6;
}

.customer-shell {
  width: min(1040px, 100%);
  margin: 0 auto;
}

.customer-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px;
  display: grid;
  gap: 24px;
  box-shadow: 0 16px 38px rgba(23, 32, 42, .07);
}

.customer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.customer-header h1 {
  margin-top: 3px;
  font-size: 24px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.customer-identity {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.customer-order-copy {
  width: fit-content;
  max-width: 100%;
  min-height: 30px;
  margin-top: 2px;
  padding: 3px 0;
  border: 0;
  background: transparent;
  color: #52615b;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-align: left;
}

.customer-order-copy:hover,
.customer-order-copy:focus-visible {
  color: var(--brand-strong);
  background: transparent;
}

.customer-order-copy > span,
.customer-order-copy > small {
  font-size: 12px;
}

.customer-order-copy > b {
  min-width: 0;
  color: #27352f;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.customer-order-copy .lucide {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.customer-order-copy > small {
  color: var(--brand-strong);
  white-space: nowrap;
}

.customer-order-copy.is-copied > small {
  color: #08724f;
}

.customer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 28px;
  align-items: start;
}

.customer-main {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.customer-announcements {
  display: grid;
  gap: 8px;
}

.customer-announcement {
  padding: 11px 13px;
  border: 1px solid #cbdcf7;
  border-left: 4px solid #2563eb;
  border-radius: 7px;
  background: #f5f8ff;
  display: grid;
  gap: 3px;
}

.customer-announcement p {
  color: #41516a;
  font-size: 13px;
  line-height: 1.55;
}

.customer-announcement.level-warn {
  border-color: #efd9a9;
  border-left-color: #d89516;
  background: #fffaf0;
}

.customer-announcement.level-error,
.customer-announcement.level-danger {
  border-color: #efc2bc;
  border-left-color: #d84a3a;
  background: #fff6f5;
}

.stepper {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}

.stepper li {
  min-width: 0;
  min-height: 62px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  text-align: center;
  color: var(--muted);
}

.stepper li:not(:last-child)::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 14px;
  left: calc(50% + 19px);
  width: calc(100% - 38px);
  height: 2px;
  background: #dfe5e2;
}

.stepper span {
  width: 30px;
  height: 30px;
  position: relative;
  z-index: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid #d8dfdc;
  background: #f7f9f8;
  color: #667085;
  font-size: 12px;
  font-weight: 900;
}

.stepper b {
  min-width: 0;
  font-size: 13px;
  line-height: 1.25;
  white-space: nowrap;
}

.stepper li.active {
  color: var(--brand-strong);
}

.stepper li.active span,
.stepper li.done span {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.stepper li.done {
  color: var(--brand-strong);
}

.stepper li.done:not(:last-child)::after {
  background: var(--brand);
}

.current-task {
  border: 1px solid #d7e5e1;
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  padding: 16px 18px;
  background: #f6fbf9;
  display: grid;
  gap: 8px;
}

.current-task.tone-info {
  border-color: #cbdcf7;
  border-left-color: var(--blue);
  background: #f5f8ff;
}

.current-task.tone-warn {
  border-color: #efd9a9;
  border-left-color: #d89516;
  background: #fffaf0;
}

.current-task.tone-bad {
  border-color: #efc2bc;
  border-left-color: #d84a3a;
  background: #fff6f5;
}

.current-task.tone-good {
  border-color: #b9dfd5;
  border-left-color: var(--brand);
  background: #f2fbf8;
}

.current-task.is-stale {
  border-color: #efd9a9;
  border-left-color: #d89516;
  background: #fffaf0;
}

.current-task-head,
.section-heading,
.qr-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.current-task-head h2,
.section-heading h2,
.qr-head h2 {
  margin-top: 2px;
  font-size: 20px;
  line-height: 1.35;
}

.task-eyebrow,
.section-kicker {
  margin: 0;
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 900;
}

.task-message {
  color: #344054;
  line-height: 1.65;
}

.task-timer {
  min-height: 0;
  color: #a56308;
  font-size: 14px;
  font-weight: 800;
}

.task-timer:empty {
  display: none;
}

.live-indicator {
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid #d8e2de;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: #52615b;
  font-size: 12px;
  white-space: nowrap;
}

.live-indicator i,
.qr-live-badge i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1a9b66;
  box-shadow: 0 0 0 3px rgba(26, 155, 102, .12);
}

.method-section,
.farm-dashboard,
.issue-box,
.completion-box {
  display: grid;
  gap: 14px;
  padding-top: 2px;
}

.section-heading > span {
  padding-top: 18px;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.method-selector {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef2f0;
}

.method-option {
  min-width: 0;
  min-height: 52px;
  background: transparent;
  color: #344054;
  border: 1px solid transparent;
  border-radius: 7px;
  display: flex;
  gap: 9px;
  font-weight: 900;
}

.method-option:hover {
  background: #fff;
  color: var(--brand-strong);
}

.method-option.active {
  background: #fff;
  color: var(--brand-strong);
  border-color: #75c9bc;
  box-shadow: 0 1px 2px rgba(23, 32, 42, .08);
}

.method-option:disabled {
  cursor: not-allowed;
}

.method-selector.locked {
  background: #f4f6f5;
}

.method-glyph {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.method-glyph-qq {
  background: #2563eb;
}

.method-glyph-wechat {
  background: #169b62;
}

.method-lock {
  min-height: 42px;
  margin: 0;
  padding: 9px 12px;
  border: 1px solid #cfe4dd;
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f4faf8;
  color: #3c5f55;
  font-size: 13px;
  line-height: 1.5;
}

.method-lock > span:first-child {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.method-lock-copy,
#methodLockCopy {
  min-width: 0;
  flex: 1 1 auto;
}

.qr-box {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  display: grid;
  gap: 14px;
}

.qr-status {
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  background: #e9f6f1;
  color: #0c7456;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.qr-image-wrap,
.qr-loading {
  width: min(100%, 420px);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  position: relative;
}

.qr-image-wrap {
  padding: 14px;
  border: 1px solid #d6deda;
  border-radius: 8px;
  background: #fff;
}

.qr-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 4px;
  background: #fff;
}

.qr-loading {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-content: center;
  gap: 10px;
  text-align: center;
  background: #f7f9f8;
  color: #344054;
}

.qr-loading small {
  color: var(--muted);
}

.loading-ring {
  width: 32px;
  height: 32px;
  margin: 0 auto;
  border: 3px solid #dce6e2;
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: customer-spin .9s linear infinite;
}

.qr-overlay {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 18px;
  text-align: center;
  background: rgba(23, 32, 42, .88);
  color: #fff;
}

.qr-overlay strong {
  font-size: 24px;
}

.qr-overlay span {
  color: #f7d6d2;
  font-weight: 800;
}

.qr-meta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 30px;
}

.qr-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #0c7456;
  font-size: 14px;
  font-weight: 900;
}

.qr-live-badge.is-invalid {
  color: var(--red);
}

.qr-live-badge.is-invalid i {
  background: #d84a3a;
  box-shadow: 0 0 0 3px rgba(216, 74, 58, .12);
}

.qr-countdown {
  color: #344054;
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  font-weight: 800;
}

.qr-alert {
  border: 1px solid #f2c3be;
  border-radius: 7px;
  padding: 10px 12px;
  background: #fff0ee;
  color: var(--red);
  font-weight: 900;
  text-align: center;
}

.qr-second-notice {
  margin: 0;
  border: 1px solid #e3b451;
  border-radius: 7px;
  padding: 11px 13px;
  background: #fff3cf;
  color: #8a5600;
  font-size: 16px;
  font-weight: 900;
  text-align: center;
}

.qr-state-expired,
.qr-state-switching,
.qr-state-preparing {
  border-top-color: #efc2bc;
}

.qr-state-expired .qr-status,
.qr-state-switching .qr-status,
.qr-state-preparing .qr-status {
  background: #fff0ee;
  color: var(--red);
}

.qr-state-second_scan {
  border-top-color: #e3b451;
}

.qr-state-second_scan .qr-status {
  background: #fff3cf;
  color: #8a5600;
}

.qr-box.is-locally-expired .qr-countdown {
  color: var(--red);
}

.customer-notice {
  margin: 0;
  border: 1px solid;
  border-radius: 7px;
  padding: 12px 14px;
  display: grid;
  gap: 3px;
  line-height: 1.55;
}

.qr-camera-help {
  padding: 12px 14px;
  border: 1px solid #d5dedb;
  border-radius: 7px;
  background: #f7f9f8;
  display: grid;
  gap: 7px;
  color: #344054;
}

.qr-camera-help p {
  color: #59665f;
  font-size: 13px;
  line-height: 1.55;
}

.secondary-link {
  width: fit-content;
  color: #174da5;
  font-size: 13px;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.notice-info {
  border-color: #b9d1fb;
  background: #f2f7ff;
  color: #174da5;
}

.issue-box {
  padding: 16px;
  border: 1px solid #efc2bc;
  border-radius: 8px;
  background: #fff8f7;
}

.issue-heading .section-kicker,
.issue-heading h2,
.issue-heading > span {
  color: #b42318;
}

.issue-image-frame,
.completion-image-frame {
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: #111820;
}

.issue-image-frame img,
.completion-image-frame img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.issue-box > p {
  color: #7a3028;
  line-height: 1.55;
}

.farm-dashboard {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.farm-levels {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 14px;
}

.farm-levels > div {
  display: grid;
  gap: 4px;
}

.farm-levels span,
.farm-progress-head span,
.estimate-box span {
  color: var(--muted);
  font-size: 13px;
}

.farm-levels strong {
  font-size: 26px;
  line-height: 1.2;
}

.farm-levels strong b {
  font-size: inherit;
}

.align-right {
  text-align: right;
}

.level-arrow {
  padding-bottom: 2px;
  color: var(--brand);
  font-size: 25px;
  font-weight: 900;
}

.farm-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.farm-progress-head b {
  color: var(--brand-strong);
  font-size: 13px;
}

.hero-progress,
.weekly-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5ebe8;
}

.hero-progress span,
.weekly-track span {
  width: 0;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--brand);
  transition: width .35s ease;
}

.weekly-progress {
  display: grid;
  gap: 8px;
  padding-top: 4px;
}

.weekly-track span {
  background: #2563eb;
}

.estimate-box {
  border: 1px solid #cbdcf7;
  border-radius: 7px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  background: #f5f8ff;
}

.estimate-box > div {
  display: grid;
  gap: 3px;
}

.estimate-box b {
  font-size: 15px;
}

.estimate-box > strong {
  color: #174da5;
  font-size: 14px;
  text-align: right;
}

.farm-timeline {
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.farm-timeline li {
  min-width: 0;
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.farm-timeline li > span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  background: #e9eeec;
  font-size: 11px;
  font-weight: 900;
}

.farm-timeline li.done,
.farm-timeline li.active {
  border-color: #b9dfd5;
  background: #f2fbf8;
  color: var(--brand-strong);
}

.farm-timeline li.done > span,
.farm-timeline li.active > span {
  background: var(--brand);
  color: #fff;
}

.farm-timeline li.paused {
  border-color: #efd9a9;
  background: #fffaf0;
  color: #8a5600;
}

.farm-timeline li.paused > span {
  background: #d89516;
  color: #fff;
}

.completion-box {
  padding: 16px;
  border: 1px solid #b9dfd5;
  border-radius: 8px;
  background: #f7fcfa;
}

.completion-heading .section-kicker,
.completion-heading h2 {
  color: var(--brand-strong);
}

.customer-actions {
  display: grid;
  gap: 10px;
}

.customer-actions button {
  width: 100%;
  min-height: 52px;
  font-size: 16px;
}

.customer-contact {
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(190px, .8fr) minmax(330px, 1.2fr);
  gap: 22px;
  align-items: start;
}

.customer-contact-intro {
  display: grid;
  gap: 4px;
}

.customer-contact h2 {
  font-size: 18px;
}

.customer-contact p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.customer-contact form {
  display: grid;
  gap: 12px;
}

.customer-contact-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.customer-contact-fields label {
  display: grid;
  gap: 5px;
  color: #52615b;
  font-size: 12px;
  font-weight: 800;
}

.customer-contact-fields input {
  min-width: 0;
  width: 100%;
}

.wechat-preference {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 7px;
}

.wechat-preference legend {
  margin-bottom: 7px;
  color: #52615b;
  font-size: 12px;
  font-weight: 800;
}

.wechat-preference > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.wechat-preference label {
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #d8e2de;
  border-radius: 7px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #34443e;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.wechat-preference label:has(input:checked) {
  border-color: #65b8aa;
  background: #f2fbf8;
  color: var(--brand-strong);
}

.wechat-preference input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--brand);
}

.contact-save-state {
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.contact-save-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #98a2b3;
}

.contact-save-state.is-pending,
.contact-save-state.is-saving {
  color: #9a6200;
}

.contact-save-state.is-pending .contact-save-dot,
.contact-save-state.is-saving .contact-save-dot {
  background: #d89516;
}

.contact-save-state.is-saved {
  color: #08724f;
}

.contact-save-state.is-saved .contact-save-dot {
  background: #1a9b66;
}

.contact-save-state.is-error {
  color: #b42318;
}

.contact-save-state.is-error .contact-save-dot {
  background: #d84a3a;
}

.summary-levels strong.is-unknown,
.farm-levels strong.is-unknown {
  color: #667085;
  font-size: 20px;
}

.customer-summary {
  min-width: 0;
  padding-left: 24px;
  border-left: 1px solid var(--line);
  display: grid;
  gap: 16px;
}

.summary-heading {
  display: grid;
  gap: 3px;
}

.summary-heading > strong {
  font-size: 18px;
}

.summary-levels {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 8px;
}

.summary-levels > div {
  display: grid;
  gap: 3px;
}

.summary-levels > div:last-child {
  text-align: right;
}

.summary-levels span {
  color: var(--muted);
  font-size: 12px;
}

.summary-levels > span {
  padding-bottom: 2px;
  color: var(--brand);
  font-size: 20px;
  font-weight: 900;
}

.summary-levels strong {
  font-size: 21px;
}

.summary-levels strong b {
  font-size: inherit;
}

.summary-facts {
  margin: 2px 0 0;
  padding-top: 4px;
  border-top: 1px solid var(--line);
  display: grid;
}

.summary-facts > div {
  min-width: 0;
  padding: 10px 0;
  border-bottom: 1px solid #edf1ef;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 8px;
  font-size: 13px;
}

.summary-facts dt {
  color: var(--muted);
  white-space: nowrap;
}

.summary-facts dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
}

.wechat-guide {
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 9px;
}

.wechat-guide h2 {
  font-size: 18px;
}

.wechat-guide > p:not(.section-kicker) {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.wechat-guide > img {
  width: min(100%, 210px);
  aspect-ratio: 1;
  object-fit: contain;
  justify-self: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.wechat-id-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}

.wechat-id-row > span {
  color: var(--muted);
}

.wechat-id-row b {
  min-width: 0;
  overflow-wrap: anywhere;
}

.icon-copy {
  min-height: 34px;
  padding: 6px 9px;
  background: #fff;
  color: var(--brand-strong);
  border: 1px solid #b9dfd5;
}

@keyframes customer-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 980px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .kv.two-column {
    grid-template-columns: 110px minmax(0, 1fr);
  }

  .machine-grid {
    grid-template-columns: 1fr;
  }

  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-copy {
    min-height: 220px;
  }

  .customer-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .customer-summary {
    padding: 20px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .customer-contact {
    grid-template-columns: 1fr;
  }

  .summary-levels {
    max-width: 360px;
  }
}

@media (max-width: 720px) {
  h1 {
    font-size: 24px;
  }

  .topbar {
    padding: 10px 12px;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
  }

  .brand {
    min-width: 0;
    flex: 1 1 220px;
  }

  .topnav {
    order: 3;
    width: 100%;
    overflow-x: auto;
  }

  .logout-form {
    margin-left: auto;
  }

  .shell {
    padding: 18px 12px 32px;
  }

  .page-head {
    flex-direction: column;
    align-items: stretch;
  }

  .head-actions {
    justify-content: space-between;
  }

  .metric-grid,
  .form-grid,
  .machine-form {
    grid-template-columns: 1fr;
  }

  .machine-form > form {
    grid-template-columns: 1fr;
  }

  .copy-row {
    grid-template-columns: 1fr;
  }

  .event-item {
    grid-template-columns: 1fr;
  }

  .customer-page {
    padding: 0;
    background: #fff;
  }

  .customer-card {
    min-height: 100vh;
    padding: 18px 16px 28px;
    border: 0;
    border-radius: 0;
    gap: 20px;
    box-shadow: none;
  }

  .customer-header {
    align-items: flex-start;
  }

  .customer-header h1 {
    max-width: min(62vw, 280px);
    font-size: 22px;
  }

  .stepper {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .stepper li {
    min-height: 58px;
    gap: 6px;
  }

  .stepper b {
    font-size: 12px;
  }

  .current-task {
    padding: 14px;
  }

  .current-task-head,
  .section-heading,
  .qr-head {
    gap: 10px;
  }

  .current-task-head h2,
  .section-heading h2,
  .qr-head h2 {
    font-size: 18px;
  }

  .live-indicator {
    padding-inline: 7px;
  }

  .method-option {
    min-height: 50px;
    padding-inline: 8px;
  }

  .qr-image-wrap,
  .qr-loading {
    width: min(100%, 320px);
  }

  .qr-image-wrap {
    padding: 10px;
  }

  .qr-overlay strong {
    font-size: 20px;
  }

  .qr-meta-row {
    gap: 12px;
  }

  .farm-levels strong {
    font-size: 24px;
  }

  .farm-timeline {
    grid-template-columns: 1fr;
  }

  .farm-timeline li {
    min-height: 44px;
  }

  .customer-summary {
    gap: 14px;
  }

  .summary-levels {
    max-width: none;
  }

  .customer-contact form {
    width: 100%;
  }

  .customer-contact-fields {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 390px) {
  .customer-card {
    padding-inline: 14px;
  }

  .customer-header .badge.large {
    padding-inline: 8px;
    font-size: 12px;
  }

  .customer-order-copy {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .customer-order-copy > b {
    flex: 1 1 calc(100% - 70px);
  }

  .stepper b {
    font-size: 11px;
  }

  .current-task-head {
    align-items: flex-start;
  }

  .live-indicator span {
    display: none;
  }

  .live-indicator {
    width: 28px;
    justify-content: center;
  }

  .section-heading > span {
    max-width: 110px;
  }

  .qr-meta-row,
  .estimate-box {
    align-items: flex-start;
    flex-direction: column;
  }

  .estimate-box > strong {
    text-align: left;
  }
}

.customer-contacts-admin {
  gap: 18px;
}

.contact-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.contact-metrics article {
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid #d9e1de;
  border-radius: 8px;
  background: #fff;
  display: grid;
  gap: 3px;
}

.contact-metrics span,
.contact-metrics small {
  color: #667085;
}

.contact-metrics span {
  font-size: 13px;
  font-weight: 800;
}

.contact-metrics strong {
  color: #1f2d27;
  font-size: 26px;
  line-height: 1.1;
}

.contact-metrics small {
  font-size: 12px;
}

.contact-filter-bar {
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px auto auto;
  gap: 8px;
  align-items: center;
}

.contact-filter-bar .search-control {
  min-width: 0;
}

.contact-filter-bar select,
.contact-filter-bar input {
  width: 100%;
}

.contact-profile-table td {
  vertical-align: middle;
}

.contact-profile-table td > small,
.contact-profile-table td > strong {
  display: block;
}

.contact-profile-table td > small {
  margin-top: 3px;
  color: #667085;
}

.table-primary-link {
  color: var(--brand-strong);
  font-weight: 900;
}

.contact-copy-cell,
.table-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.contact-copy-cell code {
  max-width: 190px;
  color: #27352f;
  font-family: inherit;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.muted-copy {
  color: #98a2b3;
}

.contact-settings-section {
  scroll-margin-top: 18px;
}

.contact-settings-section .linear-form {
  max-width: 900px;
}

.contact-settings-section .toggle-line > span {
  display: grid;
  gap: 2px;
}

.contact-settings-section .toggle-line small {
  color: #667085;
  font-weight: 500;
}

@media (max-width: 980px) {
  .contact-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-filter-bar {
    grid-template-columns: 1fr 1fr;
  }

  .contact-filter-bar .search-control {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .contact-metrics,
  .contact-filter-bar {
    grid-template-columns: 1fr;
  }

  .contact-filter-bar .search-control {
    grid-column: auto;
  }
}

/* Multi-game operations workspace */
.v2-page {
  display: grid;
  gap: 20px;
}

.v2-page-header,
.section-heading,
.header-actions,
.inline-actions,
.device-name,
.position-title,
.redeem-brand,
.copy-field {
  display: flex;
  align-items: center;
}

.v2-page-header,
.section-heading {
  justify-content: space-between;
  gap: 20px;
}

.v2-page-header h1,
.v2-section h2,
.data-list h3,
.position-title strong,
.device-copy h3,
.redeem-panel h1 {
  margin: 0;
  letter-spacing: 0;
}

.v2-page-header h1 {
  font-size: 28px;
}

.v2-page-header p,
.section-heading p,
.data-list p,
.position-item p,
.device-copy p {
  margin: 5px 0 0;
  color: var(--muted);
}

.eyebrow,
.redeem-kicker {
  margin: 0 0 5px !important;
  color: var(--brand) !important;
  font-size: 12px;
  font-weight: 800;
}

.header-actions,
.inline-actions {
  gap: 8px;
  flex-wrap: wrap;
}

.icon-command {
  width: 40px;
  min-width: 40px;
  padding: 0;
  border-color: var(--line-strong);
  background: #fff;
  color: var(--ink);
}

.icon-command:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.primary-command,
.secondary-command,
.danger-command {
  min-height: 40px;
  border-radius: 7px;
  padding: 9px 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  font-weight: 750;
}

.primary-command {
  background: var(--brand);
  color: #fff;
}

.primary-command:hover {
  background: var(--brand-strong);
  color: #fff;
}

.secondary-command {
  background: #fff;
  border-color: var(--line-strong);
  color: var(--ink);
}

.secondary-command:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.danger-command {
  background: #fff;
  border-color: #efb4ae;
  color: var(--red);
}

.danger-command:hover {
  background: #fff1f0;
  color: #8f1c13;
}

.primary-command .lucide,
.secondary-command .lucide,
.icon-command .lucide {
  width: 17px;
  height: 17px;
}

.wide {
  width: 100%;
}

.metric-strip,
.node-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.metric-strip > div {
  min-height: 92px;
  padding: 18px 20px;
  border-right: 1px solid var(--line);
}

.metric-strip > div:last-child {
  border-right: 0;
}

.metric-strip small {
  display: block;
  color: var(--muted);
}

.metric-strip strong {
  display: block;
  margin-top: 6px;
  font-size: 27px;
}

.v2-section {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.section-heading {
  margin-bottom: 17px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 {
  font-size: 18px;
}

.position-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.position-item {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.position-title {
  gap: 11px;
}

.position-title small,
.device-name span,
.qualification-line,
.data-list small {
  color: var(--muted);
  font-size: 12px;
}

.position-title strong,
.position-title small {
  display: block;
}

.platform-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #dff3ee;
  color: var(--brand-strong);
}

.platform-icon .lucide {
  width: 20px;
}

.position-item dl,
.device-copy dl {
  display: grid;
  margin: 16px 0;
}

.position-item dl {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.position-item dl div {
  border-right: 1px solid var(--line);
}

.position-item dl div:last-child {
  border-right: 0;
}

.position-item dt,
.device-copy dt {
  color: var(--muted);
  font-size: 12px;
}

.position-item dd,
.device-copy dd {
  margin: 4px 0 0;
  font-weight: 800;
}

.qualification-line {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.split-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(310px, .75fr);
  gap: 16px;
  align-items: start;
}

.linear-form {
  display: grid;
  gap: 14px;
}

.configuration-forms {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.configuration-forms > form {
  min-width: 0;
  align-content: start;
}

.configuration-forms h3 {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
}

.two-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.form-readonly-note {
  min-height: 72px;
  padding: 12px 14px;
  border: 1px solid #cbdcf7;
  border-radius: 7px;
  background: #f5f8ff;
  display: grid;
  align-content: center;
  gap: 4px;
}

.form-readonly-note b {
  color: #174da5;
}

.form-readonly-note span {
  color: #5b6678;
  font-size: 13px;
  line-height: 1.45;
}

.linear-form label,
.linear-form legend {
  color: #344054;
  font-size: 13px;
  font-weight: 750;
}

.linear-form input,
.linear-form select,
.linear-form textarea {
  margin-top: 6px;
  font-weight: 500;
}

.linear-form label small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-weight: 500;
}

.linear-form fieldset {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.check-line,
.toggle-line {
  display: flex !important;
  align-items: center;
  gap: 9px;
}

.check-line + .check-line {
  margin-top: 8px;
}

.check-line input,
.toggle-line input {
  width: 18px;
  min-height: 18px;
  margin: 0;
}

.form-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.form-wide {
  max-width: 720px;
}

.data-list,
.plain-list {
  display: grid;
}

.data-list > article,
.batch-row,
.plain-list > div {
  min-width: 0;
  padding: 15px 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-bottom: 1px solid var(--line);
}

.data-list > article:last-child,
.batch-row:last-child,
.plain-list > div:last-child {
  border-bottom: 0;
}

.data-list h3 {
  margin-top: 7px;
  font-size: 16px;
}

.state-chip,
.profile-tags span {
  width: fit-content;
  padding: 3px 7px;
  border-radius: 5px;
  display: inline-flex;
  color: #475467;
  background: #eef1f0;
  font-size: 11px;
  font-weight: 800;
}

.state-chip.good {
  color: #126438;
  background: #e5f5e9;
}

.state-chip.warn {
  color: #8a5a0a;
  background: #fff3d6;
}

.state-chip.muted {
  color: #667085;
  background: #edf0ef;
}

.profile-tags {
  margin-left: auto;
  display: flex;
  gap: 5px;
}

.batch-row {
  color: var(--ink);
}

.batch-row:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

.batch-numbers {
  margin-left: auto;
  text-align: right;
}

.batch-numbers strong,
.batch-numbers small {
  display: block;
}

.table-scroll {
  overflow-x: auto;
}

.v2-table {
  width: 100%;
  border-collapse: collapse;
}

.v2-table th,
.v2-table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.v2-table th {
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 12px;
}

.copy-field {
  min-width: 320px;
  gap: 6px;
}

.copy-field input {
  min-width: 0;
  height: 38px;
}

.copy-field .icon-command {
  flex: 0 0 38px;
  min-height: 38px;
  height: 38px;
}

.node-strip {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.node-strip > div {
  padding: 14px 16px;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 8px;
}

.node-strip small {
  grid-column: 2;
  color: var(--muted);
}

.device-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.device-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.device-metrics > a {
  min-height: 92px;
  padding: 18px 20px;
  display: grid;
  align-content: center;
  gap: 5px;
  border-right: 1px solid var(--line);
  color: inherit;
  transition: background-color .15s ease;
}

.device-metrics > a:hover,
.device-metrics > a.active {
  background: var(--surface-soft);
}

.device-metrics > a:last-child {
  border-right: 0;
}

.device-metrics span,
.device-facts dt,
.detail-facts dt {
  color: var(--muted);
  font-size: 12px;
}

.device-metrics strong {
  font-size: 26px;
}

.device-node-bar,
.device-discovery-section,
.device-activity {
  padding-top: 8px;
}

.discovery-list,
.managed-device-list,
.revision-list,
.profile-binding-list {
  display: grid;
  gap: 10px;
}

.discovery-row {
  padding: 12px;
  display: grid;
  grid-template-columns: 40px minmax(180px, 1fr) minmax(150px, .7fr) minmax(220px, .9fr) auto;
  gap: 12px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.discovery-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  align-self: center;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 6px;
}

.discovery-identity {
  align-self: center;
  min-width: 0;
}

.discovery-identity strong,
.discovery-identity span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discovery-identity span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.discovery-row label > span,
.device-editor label > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.managed-device {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 145px;
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.managed-device-preview {
  display: grid;
  place-items: center;
  min-height: 190px;
  color: #b9c5c2;
  background: #182126;
}

.managed-device-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.managed-device-preview .lucide {
  width: 38px;
  height: 38px;
}

.managed-device-main {
  min-width: 0;
  padding: 16px 18px;
  border-right: 1px solid var(--line);
}

.managed-device-title,
.managed-device-title > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.managed-device-title {
  justify-content: space-between;
}

.managed-device-title h3 {
  margin: 0;
  font-size: 17px;
}

.managed-device-title h3 a {
  color: var(--text);
}

.platform-tag {
  padding: 3px 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-soft);
}

.sync-state {
  min-height: 28px;
  padding: 4px 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 800;
  border-radius: 5px;
}

.sync-state .lucide {
  width: 14px;
  height: 14px;
}

.sync-state.is-synced {
  color: #136a52;
  background: #e9f7f1;
}

.sync-state.is-pending {
  color: #8a5600;
  background: #fff3d8;
}

.managed-device-meta {
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.device-facts {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 16px;
}

.device-facts dd,
.detail-facts dd {
  margin: 3px 0 0;
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.managed-device-actions {
  padding: 14px;
  display: grid;
  align-content: center;
  gap: 8px;
}

.managed-device-actions form,
.managed-device-actions button,
.managed-device-actions a {
  width: 100%;
}

.device-alert,
.form-warning,
.operator-diagnostic {
  display: flex;
  gap: 10px;
  border: 1px solid #efd9a9;
  border-radius: 7px;
  background: #fffaf0;
}

.device-alert {
  margin-top: 12px;
  padding: 9px 11px;
}

.device-alert .lucide,
.form-warning .lucide,
.operator-diagnostic > .lucide {
  flex: 0 0 20px;
  color: #a66a00;
}

.device-alert p,
.form-warning p,
.operator-diagnostic p {
  margin: 2px 0 0;
  color: #6f551f;
  font-size: 12px;
  line-height: 1.5;
}

.segmented-links {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.segmented-links a {
  padding: 7px 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  border-radius: 4px;
}

.segmented-links a.active {
  color: var(--brand);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(18, 39, 34, .08);
}

.device-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.device-live-view {
  min-height: 320px;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  gap: 8px;
  color: #b9c5c2;
  background: #182126;
}

.device-live-view img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.device-live-view .lucide {
  width: 42px;
  height: 42px;
}

.device-status-panel {
  padding: 20px;
}

.status-heading {
  padding-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.status-heading small,
.status-heading strong {
  display: block;
}

.status-heading small {
  color: var(--muted);
}

.status-heading strong {
  margin-top: 2px;
  font-size: 18px;
}

.detail-facts {
  margin: 0;
}

.detail-facts > div {
  padding: 9px 0;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.detail-facts dd {
  margin: 0;
  text-align: right;
}

.operator-diagnostic {
  padding: 16px;
  align-items: flex-start;
}

.operator-diagnostic h2 {
  margin-top: 2px;
  font-size: 16px;
}

.operator-diagnostic ol {
  margin: 10px 0 0;
  padding-left: 20px;
  color: #5f4b22;
}

.operator-diagnostic li {
  margin-top: 5px;
  line-height: 1.5;
}

.device-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.device-detail-column {
  min-width: 0;
}

.profile-binding-list > div,
.revision-list > div {
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.profile-binding-list > div:last-child,
.revision-list > div:last-child {
  border-bottom: 0;
}

.profile-binding-list > div > div,
.revision-list > div > div {
  min-width: 0;
  flex: 1;
}

.profile-binding-list strong,
.profile-binding-list small,
.revision-list strong,
.revision-list small {
  display: block;
}

.profile-binding-list small,
.revision-list small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.revision-list > div > span {
  width: 42px;
  font-weight: 800;
}

.revision-list p {
  margin: 4px 0 0;
  color: var(--red);
  font-size: 12px;
}

.device-control-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.device-control-grid button,
.device-control-grid form {
  width: 100%;
}

.device-eligibility {
  margin-top: 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.device-eligibility > div {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.device-eligibility .lucide {
  width: 20px;
  height: 20px;
  color: var(--brand);
}

.device-eligibility strong,
.device-eligibility p {
  display: block;
}

.device-eligibility p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.device-eligibility ul {
  margin: 10px 0 0 30px;
  padding: 0;
  color: #7a5211;
  font-size: 13px;
}

.qualification-launcher {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
  gap: 10px;
}

.qualification-launcher label span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.qualification-launcher button {
  min-height: 42px;
}

.operation-page {
  gap: 22px;
}

.operation-progress-band,
.operation-review-band,
.operation-evidence-layout {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.operation-progress-band {
  padding: 20px;
}

.operation-progress-copy,
.operation-progress-copy > div,
.operation-review-band,
.operation-evidence-layout {
  display: flex;
  align-items: center;
}

.operation-progress-copy {
  justify-content: space-between;
  gap: 20px;
}

.operation-progress-copy > div {
  gap: 12px;
}

.operation-progress-copy span,
.operation-progress-copy p {
  color: var(--muted);
}

.operation-progress-copy strong {
  font-size: 26px;
}

.operation-progress-copy p {
  margin: 0;
}

.operation-progress-track {
  height: 10px;
  margin: 14px 0 18px;
  overflow: hidden;
  border-radius: 5px;
  background: var(--surface-soft);
}

.operation-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
  transition: width .25s ease;
}

.operation-facts {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.operation-facts > div {
  padding: 12px;
  background: var(--surface);
}

.operation-facts dt,
.operation-facts dd {
  margin: 0;
}

.operation-facts dt {
  color: var(--muted);
  font-size: 12px;
}

.operation-facts dd {
  margin-top: 5px;
  font-weight: 800;
}

.operation-review-band {
  padding: 18px 20px;
  justify-content: space-between;
  gap: 28px;
  border-color: #b8ddd2;
  background: #f4fbf8;
}

.operation-review-band h2 {
  margin-top: 3px;
  font-size: 18px;
}

.operation-review-band p {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
}

.operation-review-form {
  min-width: min(100%, 380px);
}

.operation-review-form label,
.operation-review-form label span {
  display: block;
}

.operation-review-form label span {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.operation-review-form .inline-actions {
  margin-top: 8px;
}

.operation-evidence-layout {
  align-items: stretch;
  overflow: hidden;
}

.operation-evidence-layout > div {
  min-width: 0;
  padding: 18px;
  flex: 1;
}

.operation-primary-evidence {
  min-height: 280px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 6px;
  background: #182126;
}

.operation-primary-evidence img {
  width: 100%;
  max-height: 620px;
  object-fit: contain;
}

.operation-proof-strip {
  width: 260px;
  padding: 18px;
  border-left: 1px solid var(--line);
  background: var(--surface-soft);
}

.operation-proof-strip h3 {
  margin-bottom: 12px;
  font-size: 15px;
}

.operation-proof-strip > div {
  min-height: 44px;
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.operation-proof-strip > div.is-ready {
  color: var(--text);
}

.operation-proof-strip .lucide {
  width: 18px;
  height: 18px;
}

.operation-proof-strip .is-ready .lucide {
  color: var(--brand);
}

.health-result-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.health-result-grid > div {
  padding: 15px;
  border-right: 1px solid var(--line);
}

.health-result-grid > div:last-child {
  border-right: 0;
}

.health-result-grid span,
.health-result-grid strong {
  display: block;
}

.health-result-grid span {
  color: var(--muted);
  font-size: 12px;
}

.health-result-grid strong {
  margin-top: 5px;
}

.muted-copy {
  color: var(--muted);
  font-size: 12px;
}

.form-warning {
  padding: 13px 15px;
}

.device-editor {
  display: grid;
  gap: 26px;
}

.device-editor > section {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.form-grid .span-2 {
  grid-column: span 2;
}

.toggle-field {
  min-height: 42px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.toggle-field > span {
  margin: 0 !important;
  color: var(--text) !important;
}

.profile-selector {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.profile-selector > label {
  min-height: 62px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.profile-selector b,
.profile-selector small {
  display: block;
}

.profile-selector small {
  margin-top: 3px;
  color: var(--muted);
}

.sticky-form-actions {
  position: sticky;
  bottom: 12px;
  z-index: 3;
  padding: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--shadow);
}

.event-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.event-table-wrap .ops-table {
  min-width: 760px;
  margin: 0;
}

@media (max-width: 1100px) {
  .discovery-row {
    grid-template-columns: 40px 1fr 1fr;
  }

  .discovery-row label:nth-of-type(2) {
    grid-column: 2 / 4;
  }

  .discovery-row .primary-command {
    grid-column: 3;
  }

  .managed-device {
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .managed-device-actions {
    grid-column: 1 / 3;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--line);
  }

  .managed-device-main {
    border-right: 0;
  }

  .form-grid.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .device-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .device-metrics > a:nth-child(2) {
    border-right: 0;
  }

  .device-metrics > a:nth-child(-n+4) {
    border-bottom: 1px solid var(--line);
  }

  .device-metrics > a:nth-child(4) {
    border-right: 0;
  }

  .device-metrics > a:last-child {
    grid-column: 1 / 3;
  }

  .discovery-row {
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: center;
  }

  .discovery-row label,
  .discovery-row label:nth-of-type(2),
  .discovery-row .primary-command {
    grid-column: 1 / 3;
  }

  .managed-device {
    grid-template-columns: 1fr;
  }

  .managed-device-preview {
    min-height: 180px;
  }

  .managed-device-main {
    border-top: 1px solid var(--line);
  }

  .managed-device-actions {
    grid-column: 1;
    grid-template-columns: 1fr 1fr;
  }

  .managed-device-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .device-facts {
    grid-template-columns: 1fr 1fr;
  }

  .device-detail-hero,
  .device-detail-grid {
    grid-template-columns: 1fr;
  }

  .device-live-view {
    min-height: 210px;
  }

  .form-grid.three,
  .form-grid.four,
  .profile-selector {
    grid-template-columns: 1fr;
  }

  .form-grid .span-2 {
    grid-column: auto;
  }

  .device-control-grid {
    grid-template-columns: 1fr;
  }

  .qualification-launcher {
    grid-template-columns: 1fr;
  }

  .operation-progress-copy,
  .operation-review-band,
  .operation-evidence-layout {
    align-items: stretch;
    flex-direction: column;
  }

  .operation-facts,
  .health-result-grid {
    grid-template-columns: 1fr 1fr;
  }

  .operation-proof-strip {
    width: auto;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .health-result-grid > div:nth-child(2) {
    border-right: 0;
  }

  .health-result-grid > div:nth-child(-n+2) {
    border-bottom: 1px solid var(--line);
  }

  .sticky-form-actions {
    bottom: 8px;
  }
}

.device-item {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.device-preview {
  aspect-ratio: 16 / 7;
  display: grid;
  place-items: center;
  background: #1c2329;
  color: #c9d2d0;
}

.device-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.device-preview .lucide {
  width: 32px;
  height: 32px;
}

.device-copy,
.device-item > .inline-actions {
  padding: 14px;
}

.device-copy {
  border-bottom: 1px solid var(--line);
}

.device-name {
  gap: 8px;
}

.device-name h3 {
  font-size: 16px;
}

.device-name span:last-child {
  margin-left: auto;
}

.device-copy dl {
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.device-copy dd {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.device-diagnostic {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #efd9a9;
  border-radius: 7px;
  background: #fffaf0;
  display: grid;
  gap: 4px;
}

.device-diagnostic b {
  color: #8a5600;
  font-size: 13px;
}

.device-diagnostic p,
.device-diagnostic span {
  color: #6f551f;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.text-danger {
  color: var(--red);
}

.empty-copy {
  padding: 20px 0;
  color: var(--muted);
}

.notice-level {
  width: 5px;
  align-self: stretch;
  border-radius: 2px;
  background: var(--blue);
}

.plain-list > div {
  display: grid;
  grid-template-columns: 5px minmax(120px, .35fr) minmax(0, 1fr);
}

.plain-list p {
  margin: 0;
  color: var(--muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* Voucher redemption */
.redeem-page {
  display: grid;
  place-items: center;
  padding: 20px;
  background: #eef3f1;
}

.redeem-shell {
  width: min(100%, 520px);
}

.redeem-panel {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.redeem-brand {
  gap: 11px;
  margin-bottom: 32px;
}

.redeem-brand small,
.redeem-brand strong {
  display: block;
}

.redeem-brand small {
  color: var(--brand);
  font-weight: 800;
}

.redeem-panel h1 {
  font-size: 25px;
}

.redeem-description {
  margin: 10px 0 20px;
  color: var(--muted);
  line-height: 1.7;
}

.redeem-facts {
  margin: 0;
  border-block: 1px solid var(--line);
}

.redeem-facts div {
  padding: 11px 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.redeem-facts div:last-child {
  border-bottom: 0;
}

.redeem-facts dt {
  color: var(--muted);
}

.redeem-facts dd {
  margin: 0;
  text-align: right;
  font-weight: 700;
}

.redeem-progress {
  margin-top: 22px;
  padding: 15px;
  display: flex;
  gap: 12px;
  border: 1px solid #b9ddd4;
  border-radius: 6px;
  background: #f0faf7;
}

.redeem-progress p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.redeem-spinner {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border: 2px solid #b9ddd4;
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: redeem-spin .8s linear infinite;
}

.redeem-panel .primary-action {
  width: 100%;
  margin-top: 14px;
}

@keyframes redeem-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 920px) {
  .split-workspace,
  .position-grid,
  .device-grid {
    grid-template-columns: 1fr;
  }

  .metric-strip {
    grid-template-columns: 1fr 1fr;
  }

  .metric-strip > div:nth-child(2) {
    border-right: 0;
  }

  .metric-strip > div:nth-child(-n+2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 560px) {
  .v2-page-header,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-actions,
  .header-actions .primary-command,
  .header-actions .secondary-command {
    width: 100%;
  }

  .metric-strip,
  .form-pair {
    grid-template-columns: 1fr;
  }

  .metric-strip > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .metric-strip > div:last-child {
    border-bottom: 0;
  }

  .position-item dl {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .position-item dl div {
    padding-bottom: 8px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .position-item dl div:last-child {
    border-bottom: 0;
  }

  .data-list > article,
  .batch-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-tags,
  .batch-numbers {
    margin-left: 0;
  }

  .copy-field {
    min-width: 260px;
  }

  .redeem-page {
    align-items: start;
    padding: 12px;
  }

  .redeem-panel {
    padding: 20px;
  }
}

/* Admin console v5 */
.admin-body {
  --admin-page: #f4f6f5;
  --admin-sidebar: #1f2927;
  --admin-sidebar-muted: #9aaba7;
  --admin-brand: #0f766e;
  --admin-brand-dark: #0b5f59;
  --admin-ink: #17211f;
  --admin-muted: #687773;
  --admin-line: #dce3e0;
  --admin-soft: #f7f9f8;
  min-height: 100vh;
  background: var(--admin-page);
  color: var(--admin-ink);
}

.admin-body .lucide {
  width: 18px;
  height: 18px;
  stroke-width: 2;
  flex: 0 0 auto;
}

.admin-sidebar {
  width: 244px;
  height: 100vh;
  padding: 18px 14px 14px;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  background: var(--admin-sidebar);
  color: #fff;
}

.sidebar-brand {
  min-height: 48px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #fff;
}

.sidebar-brand:hover {
  color: #fff;
}

.sidebar-brand .brand-mark {
  background: #f1c84b;
  color: #26312e;
}

.sidebar-brand > span:last-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.sidebar-brand b {
  font-size: 15px;
}

.sidebar-brand small {
  color: var(--admin-sidebar-muted);
  font-size: 11px;
}

.sidebar-nav {
  margin-top: 28px;
  display: grid;
  gap: 4px;
}

.sidebar-nav p {
  margin: 18px 10px 6px;
  color: #81928e;
  font-size: 11px;
  font-weight: 800;
}

.sidebar-nav a {
  min-height: 42px;
  border-radius: 7px;
  padding: 10px 11px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #c7d2cf;
  font-size: 14px;
  font-weight: 700;
}

.sidebar-nav a:hover {
  background: #2a3734;
  color: #fff;
}

.sidebar-nav a.active {
  background: #e8f4f1;
  color: #0c645d;
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid #34423f;
  padding-top: 14px;
  display: grid;
  gap: 8px;
}

.server-state,
.sidebar-logout {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.server-state > span:last-child {
  display: grid;
  gap: 1px;
}

.server-state b {
  font-size: 13px;
}

.server-state small {
  color: var(--admin-sidebar-muted);
  font-size: 11px;
}

.sidebar-logout {
  border: 0;
  background: transparent;
  color: #c7d2cf;
  justify-content: flex-start;
}

.sidebar-logout:hover {
  background: #2a3734;
  color: #fff;
}

.admin-frame {
  min-height: 100vh;
  margin-left: 244px;
}

.admin-topbar {
  height: 58px;
  padding: 0 28px;
  border-bottom: 1px solid var(--admin-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 25;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
}

.admin-topbar > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.admin-topbar p {
  color: var(--admin-muted);
  font-size: 12px;
}

.admin-topbar b {
  font-size: 14px;
}

.environment-chip {
  min-height: 28px;
  border: 1px solid var(--admin-line);
  border-radius: 999px;
  padding: 5px 9px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  color: var(--admin-muted);
  font-size: 11px;
  font-weight: 700;
}

.environment-chip span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16a34a;
}

.admin-body .shell {
  width: 100%;
  max-width: 1560px;
  margin: 0 auto;
  padding: 28px 30px 48px;
}

.admin-body .page-head {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.admin-body .page-head h1 {
  font-size: 26px;
}

.admin-body .page-subtitle {
  margin-top: 5px;
  font-size: 13px;
}

.admin-body .eyebrow {
  margin-bottom: 4px;
  color: var(--admin-brand);
  font-size: 11px;
}

.head-actions,
.title-with-back {
  display: flex;
  align-items: center;
  gap: 9px;
}

.admin-body button,
.admin-body .button {
  min-height: 38px;
  padding: 9px 13px;
  border-radius: 7px;
  font-size: 13px;
}

.admin-body .primary {
  background: var(--admin-brand);
}

.admin-body .primary:hover {
  background: var(--admin-brand-dark);
}

.icon-button {
  width: 38px;
  min-width: 38px;
  padding: 0 !important;
}

.admin-body .ghost,
.admin-body .secondary {
  border-color: #cfd8d4;
  background: #fff;
}

.admin-body .ghost:hover,
.admin-body .secondary:hover {
  border-color: #b7c4bf;
  background: #f7f9f8;
}

.live-chip {
  min-height: 30px;
  padding: 5px 9px;
  border-color: var(--admin-line);
  background: #fff;
  font-size: 11px;
}

.mobile-menu-button,
.sidebar-scrim {
  display: none;
}

.metric-grid.workbench-metrics {
  margin-bottom: 24px;
  gap: 10px;
}

.admin-body .metric-card,
.admin-body .table-panel,
.admin-body .machine-card,
.admin-body .order-status-panel,
.admin-body .proof-highlight,
.admin-body .activity-panel,
.admin-body .side-section,
.admin-body .settings-section,
.admin-body .form-panel {
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(31, 41, 39, .03);
}

.admin-body .metric-card {
  min-height: 118px;
  padding: 15px 16px;
  gap: 7px;
  color: var(--admin-ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}

.admin-body a.metric-card:hover,
.admin-body a.metric-card.active {
  border-color: #8fb8b0;
  box-shadow: 0 4px 12px rgba(31, 41, 39, .08);
}

.admin-body .metric-card span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--admin-muted);
  font-weight: 700;
}

.admin-body .metric-card span .lucide {
  width: 16px;
  height: 16px;
}

.admin-body .metric-card strong {
  font-size: 28px;
}

.admin-body .metric-card small {
  font-size: 11px;
}

.admin-body .metric-card.metric-alert {
  border-color: #edc8a4;
  background: #fffaf5;
}

.admin-body .metric-card.metric-alert span,
.admin-body .metric-card.metric-alert strong {
  color: #a54e12;
}

.section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-heading-row h2 {
  font-size: 17px;
}

.count-label {
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 700;
}

.attention-section {
  margin-bottom: 24px;
}

.attention-list {
  margin-top: 10px;
  border: 1px solid #ead6c2;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.attention-row {
  min-height: 88px;
  padding: 13px 14px;
  border-bottom: 1px solid #eee5dc;
  display: grid;
  grid-template-columns: 34px minmax(130px, .7fr) minmax(240px, 1.5fr) minmax(210px, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.attention-row:last-child {
  border-bottom: 0;
}

.attention-row.tone-bad {
  background: #fffafa;
}

.attention-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff1e3;
  color: #b45309;
}

.attention-row.tone-bad .attention-icon {
  background: #feeeee;
  color: #b42318;
}

.attention-order,
.attention-message,
.attention-next {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.attention-order a,
.attention-message strong {
  color: var(--admin-ink);
  font-weight: 800;
}

.attention-order small,
.attention-next small {
  color: var(--admin-muted);
  font-size: 11px;
}

.attention-message p {
  color: var(--admin-muted);
  font-size: 12px;
  line-height: 1.45;
}

.attention-next b {
  font-size: 12px;
  line-height: 1.4;
}

.compact-button {
  min-height: 34px !important;
  padding: 7px 10px !important;
}

.execution-center {
  margin-bottom: 24px;
}

.execution-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(440px, 1fr));
  gap: 10px;
}

.execution-card {
  min-width: 0;
  min-height: 210px;
  border: 1px solid var(--admin-line);
  border-left: 3px solid #178477;
  border-radius: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  overflow: hidden;
  color: var(--admin-ink);
  background: #fff;
  box-shadow: 0 1px 2px rgba(31, 41, 39, .03);
}

.execution-card:hover {
  border-color: #9cbab4;
  border-left-color: #116c62;
  box-shadow: 0 5px 16px rgba(31, 41, 39, .08);
}

.execution-card-main {
  min-width: 0;
  padding: 14px 15px;
  display: grid;
  align-content: start;
  gap: 12px;
}

.execution-card-head,
.execution-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.execution-platform {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #176b63;
  font-size: 11px;
  font-weight: 800;
}

.execution-platform .lucide {
  width: 15px;
  height: 15px;
}

.execution-title > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.execution-title strong {
  font-size: 16px;
}

.execution-title small {
  color: var(--admin-muted);
  font-size: 11px;
}

.execution-title > .lucide {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  color: var(--admin-muted);
}

.execution-facts {
  margin: 0;
  padding: 10px 0;
  border-top: 1px solid var(--admin-line);
  border-bottom: 1px solid var(--admin-line);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.execution-facts > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.execution-facts dt {
  color: var(--admin-muted);
  font-size: 10px;
}

.execution-facts dd {
  margin: 0;
  overflow: hidden;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.execution-latest {
  min-width: 0;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.execution-latest > .lucide {
  width: 16px;
  height: 16px;
  color: #178477;
}

.execution-latest span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.execution-latest b {
  font-size: 12px;
}

.execution-latest small {
  color: var(--admin-muted);
  font-size: 11px;
  line-height: 1.45;
}

.execution-preview {
  position: relative;
  min-width: 0;
  border-left: 1px solid var(--admin-line);
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #161d23;
}

.execution-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.execution-preview span {
  position: absolute;
  right: 7px;
  bottom: 7px;
  padding: 3px 6px;
  border-radius: 4px;
  color: #fff;
  background: rgba(17, 24, 39, .82);
  font-size: 10px;
  font-weight: 700;
}

.execution-preview-empty {
  align-content: center;
  gap: 7px;
  color: #aeb9c0;
  background: #f4f6f5;
}

.execution-preview-empty .lucide {
  width: 22px;
  height: 22px;
}

.execution-preview-empty span {
  position: static;
  padding: 0;
  color: var(--admin-muted);
  background: transparent;
}

.execution-empty {
  min-height: 76px;
  margin-top: 10px;
  padding: 14px 16px;
  border: 1px dashed #bdcbc7;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #176b63;
  background: #fbfcfc;
}

.execution-empty > .lucide {
  width: 20px;
  height: 20px;
}

.execution-empty span {
  display: grid;
  gap: 2px;
}

.execution-empty b {
  color: var(--admin-ink);
  font-size: 12px;
}

.execution-empty small {
  color: var(--admin-muted);
  font-size: 11px;
}

.resource-band {
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 20px;
  background: #fff;
}

.resource-band-title {
  padding-right: 16px;
  border-right: 1px solid var(--admin-line);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
}

.resource-band-title h2 {
  font-size: 16px;
}

.resource-band-title a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
}

.resource-band-title a .lucide {
  width: 13px;
  height: 13px;
}

.resource-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 6px 18px;
}

.resource-item {
  min-height: 46px;
  padding: 5px 0;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  color: var(--admin-ink);
}

.resource-item > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.resource-item b {
  font-size: 12px;
}

.resource-item small {
  color: var(--admin-muted);
  font-size: 10px;
}

.resource-item em {
  color: var(--admin-muted);
  font-size: 11px;
  font-style: normal;
}

.status-dot.tone-good {
  background: #16a34a;
}

.status-dot.tone-info {
  background: #2563eb;
}

.status-dot.tone-warn {
  background: #d97706;
}

.status-dot.tone-bad {
  background: #dc2626;
}

.status-dot.tone-muted {
  background: #98a2b3;
}

.table-toolbar {
  min-height: 68px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--admin-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.table-toolbar > div {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.table-toolbar h2 {
  font-size: 17px;
}

.table-toolbar > div span {
  color: var(--admin-muted);
  font-size: 11px;
}

.search-control {
  width: min(340px, 42vw);
  position: relative;
  display: block;
}

.search-control .lucide {
  width: 16px;
  height: 16px;
  position: absolute;
  top: 11px;
  left: 11px;
  color: #8a9793;
}

.search-control input {
  min-height: 38px;
  padding-left: 35px;
  background: #f9fbfa;
  font-size: 12px;
}

.segmented-filter {
  padding: 8px 12px;
  border-bottom: 1px solid var(--admin-line);
  display: flex;
  gap: 4px;
  overflow-x: auto;
  background: #fafcfb;
}

.segmented-filter button {
  min-height: 32px;
  padding: 6px 11px;
  border: 0;
  background: transparent;
  color: var(--admin-muted);
  font-size: 11px;
}

.segmented-filter button:hover {
  background: #edf2f0;
  color: var(--admin-ink);
}

.segmented-filter button.active {
  background: #dff1ed;
  color: var(--admin-brand-dark);
}

.admin-body .data-table th {
  background: #f5f8f6;
  color: #53615e;
  font-size: 11px;
}

.admin-body .data-table th,
.admin-body .data-table td {
  padding: 11px 13px;
  border-color: #e5ebe8;
}

.audit-filter {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
}

.audit-filter label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.audit-filter select {
  min-height: 42px;
}

.audit-table small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.audit-data {
  display: block;
  max-width: 460px;
  overflow-wrap: anywhere;
  white-space: normal;
  color: var(--muted);
  font-size: 12px;
}

.audit-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
}

@media (max-width: 760px) {
  .audit-filter {
    grid-template-columns: 1fr;
  }

  .audit-filter .button {
    width: 100%;
  }

  .audit-pagination {
    justify-content: space-between;
  }
}

.orders-table tbody tr:not([hidden]):hover {
  background: #fafcfb;
}

.orders-table .muted {
  margin-top: 3px;
  font-size: 11px;
}

.orders-table .error-code {
  max-width: 180px;
  margin-top: 4px;
  overflow: hidden;
  color: #b42318;
  font-family: Consolas, monospace;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-body .mini-progress,
.admin-body .hero-progress {
  background: #e6ece9;
}

.admin-body .mini-progress span,
.admin-body .hero-progress span {
  background: var(--admin-brand);
}

.orders-table .progress-cell {
  min-width: 160px;
}

.admin-body .badge {
  border-radius: 999px;
  font-size: 11px;
}

.order-detail-head {
  margin-bottom: 16px !important;
}

.incident-panel {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid #e8c49c;
  border-left: 4px solid #d97706;
  border-radius: 8px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 15px;
  align-items: start;
  background: #fffaf4;
}

.incident-panel.tone-bad {
  border-color: #e8bab5;
  border-left-color: #c9372c;
  background: #fff8f7;
}

.incident-panel.tone-info {
  border-color: #b9d8d2;
  border-left-color: #167d70;
  background: #f4fbf9;
}

.incident-symbol {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #ffebd5;
  color: #b45309;
}

.incident-panel.tone-bad .incident-symbol {
  background: #fee7e5;
  color: #b42318;
}

.incident-panel.tone-info .incident-symbol {
  background: #dff4ef;
  color: #116a60;
}

.incident-panel.tone-info .incident-label {
  color: #116a60;
}

.incident-panel.tone-info .incident-main > p:not(.incident-label) {
  color: #405b56;
}

.incident-main {
  min-width: 0;
}

.incident-label {
  color: #a54e12;
  font-size: 11px;
  font-weight: 800;
}

.incident-main h2 {
  margin-top: 2px;
  font-size: 19px;
}

.incident-main > p:not(.incident-label) {
  margin-top: 5px;
  color: #5e4a39;
  font-size: 13px;
}

.incident-impact {
  margin-top: 12px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 12px;
}

.incident-impact b {
  color: #8b480f;
}

.incident-steps {
  margin-top: 12px;
}

.incident-steps > b {
  font-size: 12px;
}

.incident-steps ol {
  margin: 7px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 5px;
  color: #4f5a57;
  font-size: 12px;
}

.incident-action {
  min-width: 210px;
  display: grid;
  gap: 8px;
}

.incident-action form,
.incident-action button,
.incident-action .button {
  width: 100%;
}

.technical-details {
  margin-top: 12px;
  font-size: 11px;
}

.technical-details summary {
  width: fit-content;
  cursor: pointer;
  color: #7c5a3e;
  font-weight: 700;
}

.technical-details dl {
  margin: 10px 0 0;
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 6px 10px;
}

.technical-details dt {
  color: var(--admin-muted);
}

.technical-details dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-family: Consolas, "Microsoft YaHei", sans-serif;
}

.order-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
  align-items: start;
}

.order-main,
.order-side {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.order-status-panel,
.proof-highlight {
  padding: 18px;
}

.progress-percent {
  color: var(--admin-brand);
  font-size: 24px;
}

.level-summary {
  margin: 18px 0 12px;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto minmax(120px, 1fr);
  gap: 18px;
  align-items: center;
}

.level-summary > div {
  display: grid;
  gap: 2px;
}

.level-summary > div:last-child {
  text-align: right;
}

.level-summary small {
  color: var(--admin-muted);
  font-size: 11px;
}

.level-summary strong {
  font-size: 30px;
}

.level-summary strong span {
  margin-left: 3px;
  color: var(--admin-muted);
  font-size: 13px;
}

.level-summary > .lucide {
  color: #96a39f;
}

.admin-body .hero-progress {
  height: 10px;
}

.stage-strip {
  margin-top: 18px;
  border-top: 1px solid var(--admin-line);
  padding-top: 15px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stage-strip div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.stage-strip small {
  color: var(--admin-muted);
  font-size: 10px;
}

.stage-strip b {
  overflow-wrap: anywhere;
  font-size: 12px;
}

.execution-now {
  margin-top: 15px;
  padding: 12px;
  border: 1px solid #c8ddd8;
  border-radius: 7px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) minmax(140px, auto) auto;
  gap: 11px;
  align-items: center;
  background: #f6fbf9;
}

.execution-now-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #176b63;
  background: #e0f2ed;
}

.execution-now-icon .lucide {
  width: 16px;
  height: 16px;
}

.execution-now > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.execution-now small {
  color: var(--admin-muted);
  font-size: 10px;
}

.execution-now strong,
.execution-now b {
  font-size: 12px;
}

.execution-now p,
.execution-now span {
  color: var(--admin-muted);
  font-size: 11px;
  line-height: 1.4;
}

.execution-now-meta {
  padding-left: 12px;
  border-left: 1px solid #c8ddd8;
}

.featured-proof-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.featured-proof {
  min-width: 0;
  border: 1px solid var(--admin-line);
  border-radius: 7px;
  overflow: hidden;
  display: grid;
  color: var(--admin-ink);
}

.featured-proof img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #17211f;
}

.featured-proof > span {
  padding: 9px 10px;
  display: grid;
  gap: 2px;
}

.featured-proof b {
  font-size: 12px;
}

.featured-proof small {
  color: var(--admin-muted);
  font-size: 10px;
}

.activity-panel {
  overflow: hidden;
}

.activity-tabs {
  min-height: 52px;
  padding: 0 8px;
  border-bottom: 1px solid var(--admin-line);
  display: flex;
  align-items: end;
  gap: 2px;
  overflow-x: auto;
}

.activity-tabs button {
  min-height: 48px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 9px 11px;
  background: transparent;
  color: var(--admin-muted);
  font-size: 12px;
}

.activity-tabs button:hover {
  background: #f6f9f7;
  color: var(--admin-ink);
}

.activity-tabs button.active {
  border-bottom-color: var(--admin-brand);
  background: transparent;
  color: var(--admin-brand-dark);
}

.activity-tabs em {
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  padding: 3px 6px;
  background: #edf2f0;
  color: #596662;
  font-size: 9px;
  font-style: normal;
}

.activity-content {
  padding: 14px;
}

.admin-shot-grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.admin-shot-grid .shot-card {
  border: 1px solid var(--admin-line);
  border-radius: 7px;
  overflow: hidden;
  gap: 0;
}

.admin-shot-grid .shot-card img {
  border: 0;
  border-radius: 0;
}

.admin-shot-grid .shot-card > span {
  padding: 8px 9px;
  display: grid;
  gap: 2px;
}

.admin-shot-grid .shot-card b {
  color: var(--admin-ink);
  font-size: 11px;
}

.admin-shot-grid .shot-card small {
  font-size: 9px;
}

.admin-body .event-list {
  gap: 0;
}

.admin-body .event-item {
  min-height: 66px;
  border: 0;
  border-bottom: 1px solid #e8edeb;
  border-radius: 0;
  padding: 10px 2px;
  grid-template-columns: 9px 142px minmax(0, 1fr) auto;
  gap: 10px;
  background: #fff;
}

.admin-body .event-item:last-child {
  border-bottom: 0;
}

.event-dot {
  width: 8px;
  height: 8px;
  margin-top: 4px;
  border-radius: 50%;
  background: #98a2b3;
}

.event-dot.tone-good {
  background: #16a34a;
}

.event-dot.tone-info {
  background: #2563eb;
}

.event-dot.tone-warn {
  background: #d97706;
}

.event-dot.tone-bad {
  background: #dc2626;
}

.admin-body .event-item p {
  margin-top: 3px;
  font-size: 11px;
}

.event-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.event-stage {
  padding: 2px 6px;
  border: 1px solid #dce5e2;
  border-radius: 4px;
  color: var(--admin-muted);
  background: #f5f8f7;
  font-size: 9px;
  font-weight: 700;
}

.event-technical {
  margin-top: 6px;
  color: var(--admin-muted);
  font-size: 9px;
}

.event-technical summary {
  width: fit-content;
  cursor: pointer;
  font-weight: 700;
}

.event-technical pre {
  max-height: 220px;
  margin: 6px 0 0;
  padding: 8px;
  overflow: auto;
  border: 1px solid #e4e9e7;
  border-radius: 4px;
  background: #f7f9f8;
  color: #475467;
  font: 9px/1.55 Consolas, "Microsoft YaHei", sans-serif;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.side-section {
  padding: 15px;
}

.side-section-title {
  margin-bottom: 12px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.side-section-title h2 {
  font-size: 14px;
}

.side-section-title span {
  color: var(--admin-muted);
  font-size: 10px;
}

.side-actions {
  display: grid;
  gap: 8px;
}

.full-width,
.side-actions form {
  width: 100%;
}

.copy-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 7px;
}

.copy-control input {
  min-width: 0;
  font-size: 11px;
}

.text-danger-button {
  width: 100%;
  min-height: 30px !important;
  margin-top: 7px;
  padding: 5px !important;
  border: 0 !important;
  background: transparent !important;
  color: #b42318 !important;
  font-size: 10px !important;
}

.text-danger-button:hover {
  background: #fff3f2 !important;
}

.side-facts {
  margin: 0;
  display: grid;
  gap: 0;
}

.side-facts > div {
  min-height: 37px;
  border-bottom: 1px solid #edf1ef;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  font-size: 11px;
}

.side-facts > div:last-child {
  border-bottom: 0;
}

.side-facts dt {
  color: var(--admin-muted);
}

.side-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
  text-align: right;
  font-weight: 700;
}

.order-remark {
  color: #52605c;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.resource-overview {
  margin-bottom: 16px;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: #fff;
}

.resource-overview > div {
  min-height: 82px;
  padding: 14px 18px;
  border-right: 1px solid var(--admin-line);
  display: grid;
  align-content: center;
  gap: 5px;
}

.resource-overview > div:last-child {
  border-right: 0;
}

.resource-overview span {
  color: var(--admin-muted);
  font-size: 11px;
}

.resource-overview strong {
  font-size: 23px;
}

.redesigned-machines {
  grid-template-columns: repeat(auto-fill, minmax(460px, 1fr));
}

.machine-card {
  min-width: 0;
  padding: 16px;
}

.machine-card-head,
.machine-identity,
.machine-actions {
  display: flex;
  align-items: center;
}

.machine-card-head {
  justify-content: space-between;
  gap: 14px;
}

.machine-identity {
  min-width: 0;
  gap: 11px;
}

.machine-avatar {
  width: 38px;
  height: 38px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: #e6f2ef;
  color: var(--admin-brand);
}

.machine-identity > div {
  min-width: 0;
}

.machine-identity h2 {
  font-size: 15px;
}

.machine-identity p {
  margin-top: 2px;
  color: var(--admin-muted);
  font-size: 10px;
}

.machine-current {
  margin-top: 15px;
  border-block: 1px solid var(--admin-line);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.machine-current > div {
  min-height: 72px;
  padding: 13px 4px;
  display: grid;
  align-content: center;
  gap: 4px;
}

.machine-current > div:last-child {
  padding-left: 16px;
  border-left: 1px solid var(--admin-line);
}

.machine-current small {
  color: var(--admin-muted);
  font-size: 10px;
}

.machine-current b,
.machine-current a {
  font-size: 13px;
  font-weight: 800;
}

.machine-health {
  min-height: 60px;
  padding: 10px 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: center;
}

.machine-health > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.machine-health > div > span:last-child {
  display: grid;
  gap: 1px;
}

.machine-health b {
  font-size: 11px;
}

.machine-health small {
  color: var(--admin-muted);
  font-size: 9px;
}

.machine-health > a {
  font-size: 10px;
  font-weight: 700;
}

.machine-error {
  margin-bottom: 10px;
  padding: 9px 10px;
  border: 1px solid #efc5c1;
  border-radius: 7px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #fff7f6;
  color: #a72b23;
  font-size: 11px;
}

.machine-actions {
  gap: 7px;
  flex-wrap: wrap;
}

.machine-actions form {
  flex: 0 0 auto;
}

.danger-outline {
  border-color: #e7b9b5 !important;
  background: #fff !important;
  color: #b42318 !important;
}

.danger-outline:hover {
  background: #fff4f3 !important;
}

.storage-page {
  display: grid;
  gap: 18px;
}

.storage-metrics {
  margin-bottom: 0 !important;
}

.storage-notice {
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid var(--admin-line);
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
}

.storage-notice .lucide {
  width: 18px;
}

.storage-notice.good {
  border-color: #b8d9d1;
  background: #f2faf7;
  color: #0f7665;
}

.storage-notice.warn {
  border-color: #edcf9c;
  background: #fffaf0;
  color: #9a5b0a;
}

.storage-notice.bad {
  border-color: #e8bbb7;
  background: #fff6f5;
  color: #b42318;
}

.storage-policy-grid,
.storage-category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.storage-policy-item {
  min-height: 104px;
  padding: 14px;
  border: 1px solid var(--admin-line);
  border-radius: 7px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 86px;
  align-items: center;
  gap: 11px;
  background: #fbfcfb;
}

.storage-policy-icon {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: #e1f1ed;
  color: var(--admin-brand);
}

.storage-policy-icon .lucide {
  width: 19px;
}

.storage-policy-copy,
.storage-policy-copy b,
.storage-policy-copy small,
.storage-policy-copy em {
  min-width: 0;
  display: block;
}

.storage-policy-copy b {
  color: var(--admin-ink);
  font-size: 14px;
}

.storage-policy-copy small {
  margin-top: 4px;
  color: var(--admin-muted);
  line-height: 1.4;
}

.storage-policy-copy em {
  margin-top: 7px;
  color: #50615c;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.storage-days {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
}

.storage-days input {
  width: 100%;
  margin: 0;
  text-align: center;
}

.storage-days small {
  color: var(--admin-muted);
}

.storage-category-option {
  min-height: 76px;
  padding: 12px 13px;
  border: 1px solid var(--admin-line);
  border-radius: 7px;
  display: grid !important;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  background: #fff;
  cursor: pointer;
}

.storage-category-option:has(input:checked) {
  border-color: #81b9ae;
  background: #f2faf7;
}

.storage-category-option input {
  width: 18px;
  min-height: 18px;
  margin: 2px 0 0;
}

.storage-category-option b,
.storage-category-option small {
  display: block;
}

.storage-category-option small {
  margin-top: 4px;
  color: var(--admin-muted);
  font-weight: 500;
  line-height: 1.4;
}

.storage-age-field {
  max-width: 360px;
}

.storage-preview {
  padding: 14px;
  border: 1px solid #b8d9d1;
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 11px;
  background: #f2faf7;
}

.storage-preview > span {
  color: var(--admin-brand);
}

.storage-preview b,
.storage-preview small {
  display: block;
}

.storage-preview small {
  margin-top: 3px;
  color: var(--admin-muted);
}

.storage-preview.empty {
  border-color: var(--admin-line);
  background: #f8faf9;
}

.storage-actions {
  min-height: 54px;
  padding-top: 13px;
  border-top: 1px solid var(--admin-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.storage-actions > span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--admin-muted);
  font-size: 12px;
}

.storage-actions > span .lucide {
  width: 15px;
}

.storage-actions > div {
  display: flex;
  gap: 8px;
}

.machine-config {
  margin-top: 14px;
  border-top: 1px solid var(--admin-line);
}

.machine-config summary {
  min-height: 44px;
  padding: 10px 2px 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #4c5a56;
  font-size: 11px;
  font-weight: 800;
  list-style: none;
}

.machine-config summary > span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.machine-config[open] summary > .lucide {
  transform: rotate(180deg);
}

.machine-config form {
  padding-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.machine-config label {
  display: grid;
  gap: 6px;
  color: #475450;
  font-size: 11px;
  font-weight: 800;
}

.redesigned-settings {
  max-width: 1100px;
  padding-bottom: 78px;
}

.settings-section {
  padding: 0;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
}

.settings-intro {
  padding: 20px;
  border-right: 1px solid var(--admin-line);
  display: flex;
  align-items: flex-start;
  gap: 11px;
  background: #fafcfb;
}

.settings-intro > span {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: #e4f1ee;
  color: var(--admin-brand);
}

.settings-intro h2 {
  font-size: 14px;
}

.settings-intro p {
  margin-top: 4px;
  color: var(--admin-muted);
  font-size: 10px;
  line-height: 1.5;
}

.settings-fields {
  padding: 18px 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  align-content: start;
}

.settings-fields label,
.redesigned-form label {
  display: grid;
  gap: 6px;
  color: #43514d;
  font-size: 11px;
  font-weight: 800;
}

.settings-savebar {
  min-height: 60px;
  padding: 10px 16px;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  position: sticky;
  bottom: 12px;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 8px 28px rgba(31, 41, 39, .12);
  backdrop-filter: blur(10px);
}

.settings-savebar > span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--admin-muted);
  font-size: 11px;
}

.form-page-head,
.redesigned-form {
  max-width: 920px;
}

.redesigned-form {
  padding: 0;
  gap: 0;
}

.redesigned-form .form-section {
  padding: 22px;
  border-bottom: 1px solid var(--admin-line);
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 22px;
}

.form-section-title {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.form-section-title > span {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e2f1ed;
  color: var(--admin-brand-dark);
  font-size: 11px;
  font-weight: 900;
}

.form-section-title h2 {
  font-size: 14px;
}

.form-section-title p {
  margin-top: 4px;
  color: var(--admin-muted);
  font-size: 10px;
  line-height: 1.5;
}

.redesigned-form .form-actions {
  padding: 16px 22px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.visually-hidden {
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  position: absolute;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-good {
  color: #15803d;
}

.text-warn {
  color: #b45309;
}

.text-bad {
  color: #b42318;
}

@media (max-width: 1180px) {
  .attention-row {
    grid-template-columns: 34px minmax(130px, .7fr) minmax(230px, 1.5fr) auto;
  }

  .attention-next {
    display: none;
  }

  .order-detail-layout {
    grid-template-columns: minmax(0, 1fr) 290px;
  }

  .stage-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .admin-sidebar {
    transform: translateX(-100%);
    transition: transform .2s ease;
  }

  .admin-frame {
    margin-left: 0;
  }

  .mobile-menu-button {
    width: 38px;
    height: 38px;
    padding: 0;
    position: fixed;
    top: 10px;
    left: 12px;
    z-index: 35;
    display: grid;
    place-items: center;
    border: 1px solid var(--admin-line);
    background: #fff;
    color: var(--admin-ink);
  }

  .admin-topbar {
    padding-left: 62px;
  }

  .sidebar-open .admin-sidebar {
    transform: translateX(0);
  }

  .sidebar-open .sidebar-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 39;
    background: rgba(18, 28, 25, .36);
  }

  .order-detail-layout {
    grid-template-columns: 1fr;
  }

  .order-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-section {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .configuration-forms {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .admin-body .shell {
    padding: 20px 12px 34px;
  }

  .admin-topbar {
    padding-right: 12px;
  }

  .admin-topbar p,
  .environment-chip {
    display: none;
  }

  .admin-body .page-head {
    align-items: stretch;
  }

  .admin-body .page-head,
  .head-actions {
    flex-wrap: wrap;
  }

  .admin-body .page-head h1 {
    font-size: 22px;
  }

  .head-actions {
    width: 100%;
  }

  .head-actions .live-chip {
    margin-right: auto;
  }

  .metric-grid.workbench-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-body .metric-card {
    min-height: 104px;
  }

  .attention-row {
    padding: 13px;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    align-items: start;
  }

  .attention-message {
    grid-column: 2 / -1;
  }

  .attention-row .compact-button {
    grid-column: 3;
    grid-row: 1;
  }

  .execution-grid {
    grid-template-columns: 1fr;
  }

  .execution-card {
    grid-template-columns: 1fr;
  }

  .execution-preview {
    min-height: 150px;
    border-top: 1px solid var(--admin-line);
    border-left: 0;
    aspect-ratio: 16 / 7;
  }

  .execution-now {
    grid-template-columns: 32px minmax(0, 1fr) auto;
    align-items: start;
  }

  .execution-now-meta {
    grid-column: 2;
    padding: 9px 0 0;
    border-top: 1px solid #c8ddd8;
    border-left: 0;
  }

  .execution-now > .icon-button {
    grid-column: 3;
    grid-row: 1;
  }

  .resource-band {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .resource-band-title {
    padding: 0 0 10px;
    border-right: 0;
    border-bottom: 1px solid var(--admin-line);
  }

  .table-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .search-control {
    width: 100%;
  }

  .orders-table {
    min-width: 930px;
  }

  .incident-panel {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .incident-action {
    min-width: 0;
    grid-column: 2;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stage-strip,
  .featured-proof-grid,
  .order-side,
  .resource-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .resource-overview > div:nth-child(2) {
    border-right: 0;
  }

  .resource-overview > div:nth-child(-n+2) {
    border-bottom: 1px solid var(--admin-line);
  }

  .redesigned-machines {
    grid-template-columns: 1fr;
  }

  .settings-section,
  .redesigned-form .form-section {
    grid-template-columns: 1fr;
  }

  .settings-intro {
    border-right: 0;
    border-bottom: 1px solid var(--admin-line);
  }

  .settings-fields,
  .machine-config form {
    grid-template-columns: 1fr;
  }

  .settings-savebar > span {
    display: none;
  }

  .settings-savebar {
    justify-content: flex-end;
  }

  .storage-policy-grid,
  .storage-category-grid {
    grid-template-columns: 1fr;
  }

  .storage-policy-item {
    grid-template-columns: 36px minmax(0, 1fr) 82px;
  }

  .storage-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .storage-actions > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .storage-actions button {
    width: 100%;
  }

  .admin-body .event-item {
    grid-template-columns: 8px minmax(0, 1fr) auto;
  }

  .admin-body .event-item time {
    grid-column: 2;
  }

  .admin-body .event-item > div {
    grid-column: 2 / -1;
  }
}

.incident-bundle-strip {
  padding: 16px;
  border: 1px solid #bfd6d1;
  border-radius: 8px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  background: #f4faf8;
}

.incident-bundle-icon,
.incident-bundle-status {
  width: 40px;
  height: 40px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: #dceee9;
  color: var(--admin-brand);
}

.incident-bundle-strip h2 {
  margin-top: 2px;
  font-size: 15px;
}

.incident-bundle-strip p:not(.eyebrow) {
  margin-top: 4px;
  color: var(--admin-muted);
  font-size: 12px;
}

.incident-bundle-actions,
.incident-bundle-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.incident-library {
  display: grid;
  gap: 18px;
}

.incident-library .device-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.incident-bundle-list {
  display: grid;
}

.incident-bundle-row {
  min-height: 104px;
  padding: 14px 0;
  border-bottom: 1px solid var(--admin-line);
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
}

.incident-bundle-row:last-child {
  border-bottom: 0;
}

.incident-bundle-status.tone-info {
  background: #e8f0ff;
  color: #2256a3;
}

.incident-bundle-status.tone-good {
  background: #e4f3eb;
  color: #20704e;
}

.incident-bundle-copy > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.incident-bundle-copy p,
.incident-bundle-copy small,
.incident-bundle-copy em {
  display: block;
  margin-top: 5px;
}

.incident-bundle-copy p,
.incident-bundle-copy small {
  color: var(--admin-muted);
  font-size: 11px;
}

.incident-bundle-copy em {
  color: #4b5b56;
  font-size: 11px;
  font-style: normal;
}

.incident-resolve-form {
  display: grid;
  grid-template-columns: minmax(150px, 230px) auto;
  gap: 7px;
}

.incident-resolve-form input {
  min-height: 36px;
}

@media (max-width: 720px) {
  .incident-library .device-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .incident-library .device-metrics > a:last-child {
    grid-column: auto;
  }

  .incident-bundle-strip,
  .incident-bundle-row {
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: start;
  }

  .incident-bundle-actions,
  .incident-bundle-row-actions {
    grid-column: 2;
    flex-wrap: wrap;
  }

  .incident-resolve-form {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

@media (max-width: 390px) {
  .execution-facts {
    grid-template-columns: 1fr;
  }

  .execution-facts dd {
    white-space: normal;
  }

  .stage-strip,
  .featured-proof-grid,
  .order-side,
  .resource-overview,
  .machine-current {
    grid-template-columns: 1fr;
  }

  .resource-overview > div,
  .resource-overview > div:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--admin-line);
  }

  .resource-overview > div:last-child {
    border-bottom: 0;
  }

  .machine-current > div:last-child {
    padding-left: 4px;
    border-top: 1px solid var(--admin-line);
    border-left: 0;
  }

  .machine-health {
    grid-template-columns: 1fr;
  }

  .incident-panel {
    padding: 14px;
  }

  .incident-symbol {
    width: 32px;
    height: 32px;
  }

  .incident-action {
    grid-template-columns: 1fr;
  }

  .incident-bundle-strip,
  .incident-bundle-row {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .incident-bundle-icon,
  .incident-bundle-status {
    width: 34px;
    height: 34px;
  }

  .incident-bundle-actions,
  .incident-bundle-row-actions,
  .incident-resolve-form {
    grid-column: 1 / -1;
    width: 100%;
  }

  .incident-bundle-actions > *,
  .incident-bundle-row-actions > *,
  .incident-resolve-form {
    flex: 1 1 100%;
  }

  .incident-resolve-form {
    grid-template-columns: 1fr;
  }

  .incident-bundle-actions .primary-command,
  .incident-bundle-actions .secondary-command,
  .incident-bundle-row-actions .primary-command,
  .incident-bundle-row-actions .secondary-command {
    width: 100%;
    justify-content: center;
  }

  .level-summary {
    gap: 8px;
  }

  .level-summary strong {
    font-size: 25px;
  }

  .activity-tabs button {
    padding-inline: 8px;
  }

  .activity-tabs button .lucide {
    display: none;
  }
}
