:root {
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  color: #17342b;
  background: #f8f7f2;
  font-size: 15px;
  font-synthesis: none;
  --ink: #113f31;
  --muted: #68776f;
  --line: #e7e7df;
  --accent: #d9ae67;
  --soft: #f2f5ef;
  --white: #fff;
}
.so9-match-log {
  margin: 4px 0 12px;
  padding: 14px 16px;
  border: 1px solid #dce8df;
  border-radius: 12px;
  background: #f7faf7;
}
.so9-match-log-items {
  max-height: 260px;
  overflow-y: auto;
  margin-top: 9px;
  font-size: 0.87rem;
  line-height: 1.7;
}
.bulk-upload-card .form {
  gap: 12px;
}
.bulk-files-card {
  padding-bottom: 12px;
}
.bulk-activity {
  margin: 16px 0;
}
.bulk-activity h2 {
  margin-bottom: 5px;
}
.bulk-activity .muted {
  margin: 0 0 14px;
}
.bulk-activity-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  font-size: 12px;
}
.bulk-activity-table th,
.bulk-activity-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.bulk-activity-table thead,
.bulk-activity-total {
  background: var(--soft);
}
.bulk-activity-table small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}
.bulk-activity-metrics {
  display: flex;
  gap: 12px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.bulk-dashboard-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.bulk-dashboard-title h2 {
  margin-bottom: 4px;
}
.bulk-dashboard-title p {
  margin-bottom: 0;
}
.bulk-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(145px, 210px));
  gap: 10px;
  margin: 20px 0 16px;
}
.bulk-machine {
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow: hidden;
  margin-bottom: 14px;
  background: var(--white);
}
.bulk-machine[hidden],
.bulk-id-table tr[hidden] {
  display: none;
}
.bulk-machine-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 15px 18px;
  background: #e8f1eb;
}
.bulk-machine-head h3 {
  margin: 0 0 3px;
  font-size: 17px;
}
.bulk-machine-head small,
.bulk-id-table small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.bulk-machine-controls {
  display: flex;
  align-items: end;
  gap: 8px;
}
.bulk-machine-controls label {
  min-width: 270px;
}
.bulk-machine-controls select {
  min-height: 40px;
}
.bulk-machine-controls button {
  white-space: nowrap;
}
.bulk-machine-meta {
  padding: 10px 18px;
  font-size: 12px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.bulk-table-scroll {
  overflow-x: auto;
}
.bulk-id-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1060px;
  font-size: 12px;
}
.proposal-machine {
  margin-top: 15px;
}
.proposal-id-table {
  min-width: 1450px;
}
.proposal-id-table th:nth-child(2),
.proposal-id-table td:nth-child(2) {
  min-width: 420px;
}
.proposal-id-table th:nth-child(9),
.proposal-id-table td:nth-child(9) {
  min-width: 190px;
}
.proposal-id-error {
  color: #a43b2d !important;
}
.proposal-failed-fanpages td {
  padding: 12px 18px 16px;
  background: #fffaf1;
  border-left: 3px solid #d9ae67;
}
.proposal-failed-page {
  margin-top: 8px;
  padding: 9px 12px;
  border: 1px solid #eadcc5;
  border-radius: 8px;
  background: #fff;
}
.proposal-failed-page details {
  margin-top: 5px;
}
.proposal-failed-page summary {
  width: fit-content;
  color: var(--ink);
  cursor: pointer;
}
.proposal-failed-page ul {
  margin: 7px 0 0;
  padding-left: 22px;
}
.bulk-id-table th {
  text-align: left;
  background: #f5f7f4;
  color: #5e746b;
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.bulk-id-table th,
.bulk-id-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e8eee8;
  vertical-align: middle;
}
.bulk-id-table th:nth-child(6),
.bulk-id-table th:nth-child(7),
.bulk-id-table th:nth-child(8),
.bulk-id-table td:nth-child(6),
.bulk-id-table td:nth-child(7),
.bulk-id-table td:nth-child(8) {
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.bulk-id-table tr:last-child td {
  border-bottom: 0;
}
.bulk-id-table strong {
  color: var(--ink);
}
.bulk-id-table input[type="checkbox"] {
  width: 18px;
}
.bulk-id-toggle {
  min-width: 76px;
  padding: 7px 10px;
  white-space: nowrap;
}
.bulk-id-toggle.is-paused {
  color: #136b48;
  border-color: #a8d8bd;
  background: #ebf8ef;
}
.bulk-quality-note {
  margin: 4px 0 0;
  padding: 10px 13px;
  border-left: 3px solid var(--accent);
  background: #fff8e9;
  color: #795f36;
  font-size: 12px;
}
.bulk-legacy {
  margin-top: 16px;
}
.bulk-legacy > summary {
  cursor: pointer;
  font-weight: 650;
}
@media (max-width: 1000px) {
  .bulk-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bulk-machine-head {
    align-items: stretch;
    flex-direction: column;
  }
  .bulk-machine-controls {
    flex-wrap: wrap;
  }
}
@media (max-width: 600px) {
  .bulk-filters {
    grid-template-columns: 1fr;
  }
  .bulk-machine-controls label {
    width: 100%;
    min-width: 0;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
}
.skip-link {
  position: fixed;
  left: 12px;
  top: 8px;
  z-index: 1000;
  padding: 10px 14px;
  color: white;
  background: var(--ink);
  border-radius: 7px;
  transform: translateY(-160%);
}
.skip-link:focus {
  transform: translateY(0);
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  min-height: 42px;
  padding: 9px 15px;
  border-radius: 10px;
  background: white;
  color: var(--ink);
  font-weight: 650;
  transition-property:
    background-color, border-color, box-shadow, color, transform;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}
button:hover {
  border-color: #8bac9d;
  background: #f2f7f2;
  box-shadow: 0 2px 8px #153b340d;
}
button:active {
  background: #e7f0e9;
  transform: translateY(1px);
}
button:focus-visible,
summary:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #76ad91;
  outline-offset: 2px;
}
button:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
.primary {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
.primary:hover {
  background: #24544c;
  color: white;
}
.primary:active {
  background: #0d2924;
}
.danger {
  color: #a73434;
  background: #fff5f5;
}
input,
select,
textarea {
  border: 1px solid #ccd9cf;
  background: #fff;
  border-radius: 10px;
  padding: 10px 13px;
  min-height: 44px;
  min-width: 0;
  width: 100%;
  color: #213a32;
  transition-property: border-color, box-shadow;
  transition-duration: 150ms;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #6eaa88;
  box-shadow: 0 0 0 3px #6eaa8824;
}
textarea {
  resize: vertical;
  line-height: 1.6;
  min-height: 120px;
}
label {
  display: grid;
  gap: 7px;
  font-weight: 650;
  font-size: 12px;
  color: #4e6659;
}
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 0;
  padding: 0;
  flex: 0 0 18px;
  accent-color: #174c3d;
}
a {
  color: #245c53;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(27px, 2vw, 34px);
  letter-spacing: -1.1px;
  font-weight: 750;
  margin-bottom: 9px;
  line-height: 1.17;
  text-wrap: balance;
}
h2 {
  font-size: 19px;
  letter-spacing: -0.45px;
  line-height: 1.3;
  text-wrap: balance;
}
h3 {
  font-size: 16px;
}
.muted,
small {
  color: var(--muted);
  font-weight: 400;
}
.overdue {
  color: #a33f32;
  font-weight: 650;
}
.shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: linear-gradient(165deg, #173e35 0%, #102e29 78%);
  color: #e0eee6;
  padding: 28px 15px 18px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}
.brand {
  font-size: 27px;
  letter-spacing: -1.25px;
  font-weight: 780;
  padding: 3px 13px 18px;
  color: white;
  border-bottom: 1px solid #ffffff22;
}
.brand span {
  color: #e0b872;
}
.brand small {
  display: block;
  letter-spacing: 1.8px;
  font-size: 10px;
  margin-top: 5px;
  color: #aac8b6;
  text-transform: uppercase;
}
.sidebar nav {
  display: grid;
  gap: 3px;
  align-content: start;
}
.nav-group-label {
  display: block;
  margin: 17px 12px 7px;
  color: #a8c4b3;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 1.45px;
  text-transform: uppercase;
}
.nav-group-label:first-child {
  margin-top: 2px;
}
.sidebar nav button {
  border: 0;
  text-align: left;
  color: #d6e6db;
  background: transparent;
  font-weight: 550;
  padding: 10px 13px;
  font-size: 13px;
  min-height: 40px;
  box-shadow: none;
}
.sidebar nav button:hover {
  background: #ffffff14;
  border-color: transparent;
  color: white;
  box-shadow: none;
}
.sidebar nav button.active {
  background: #ffffff1e;
  color: white;
  font-weight: 750;
  box-shadow: inset 3px 0 0 var(--accent);
}
.sidebar .account {
  margin-top: auto;
  padding: 14px 12px 4px;
  border-top: 1px solid #ffffff22;
  display: grid;
  grid-template-columns: 35px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
}
.account-avatar {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 10px;
  background: #e0b872;
  color: #17352e;
  font-weight: 800;
}
.account-identity {
  display: grid;
  min-width: 0;
  gap: 2px;
}
.account-identity strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
  font-size: 12px;
}
.account-identity small {
  color: #afcaba;
  font-size: 11px;
}
.sidebar .account button {
  grid-column: 1 / -1;
  margin-top: 3px;
  background: transparent;
  color: #e8f1e9;
  border-color: #668779;
  width: 100%;
  min-height: 38px;
  font-size: 12px;
}
.main {
  padding: 24px clamp(24px, 3.2vw, 52px) 54px;
  max-width: 1840px;
  width: 100%;
  margin: 0 auto;
}
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 31px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 17px;
}
.topbar > * {
  min-width: 0;
}
.topbar small {
  letter-spacing: 1.15px;
  text-transform: uppercase;
  font-size: 10px;
}
.workspace-label {
  display: grid;
  gap: 4px;
}
.workspace-label strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.workspace-state {
  border: 1px solid #cddccf;
  border-radius: 999px;
  background: #eaf2e9;
  padding: 6px 11px;
  color: #426a50;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.topbar select {
  max-width: 290px;
}
.heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin: 0 0 25px;
}
.heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  text-wrap: pretty;
}
.heading > button {
  flex: 0 0 auto;
  white-space: nowrap;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 19px;
  box-shadow:
    0 8px 28px #17382c08,
    0 1px 2px #17382c05;
}
.video-rules-card {
  padding: 0;
}
.video-rules-card > summary {
  cursor: pointer;
  padding: 18px 24px;
  font-weight: 700;
}
.video-rules-card[open] > summary {
  border-bottom: 1px solid var(--line);
}
.video-rules-body {
  padding: 20px 24px 24px;
}
.compact-card {
  padding: 16px 20px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.metric {
  padding: 19px 21px;
  background: white;
  border-radius: 14px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  box-shadow: 0 6px 22px #17382c08;
  font-variant-numeric: tabular-nums;
}
.metric b {
  display: block;
  font-size: 30px;
  font-weight: 750;
  margin-top: 8px;
  letter-spacing: -1.25px;
  color: var(--ink);
}
.row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.row > * {
  flex: 0 1 auto;
}
.row input {
  flex: 1;
  min-width: 180px;
}
.row input[type="checkbox"] {
  flex: 0 0 18px;
  min-width: 0;
  width: 18px;
}
.row select {
  width: auto;
  max-width: 260px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.full {
  grid-column: 1/-1;
}
.form {
  display: grid;
  gap: 16px;
}
.actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 18px;
}
.filters {
  margin-bottom: 18px;
}
.table-wrap {
  overflow: auto;
  scrollbar-color: #bdcfc1 transparent;
}
.select-page-label {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  cursor: pointer;
  color: #516b5e;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.95px;
  font-weight: 750;
  color: #516b5e;
  padding: 13px 12px;
  border-bottom: 1px solid #cbd9cd;
  background: #f7f9f5;
  white-space: nowrap;
}
td {
  padding: 15px 12px;
  border-bottom: 1px solid #e8eee8;
  vertical-align: middle;
  line-height: 1.5;
}
tbody tr:hover {
  background: #f7faf6;
}
tbody tr:last-child td {
  border-bottom: 0;
}
td.title {
  max-width: 480px;
  min-width: 240px;
}
td.title strong {
  display: block;
  font-size: 14px;
  color: #1a4036;
  font-weight: 700;
  line-height: 1.42;
  text-wrap: pretty;
}
td.title small {
  display: block;
  margin-top: 5px;
  line-height: 1.45;
}
td.title .writing-profile {
  color: #375f54;
  overflow-wrap: anywhere;
}
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  font-size: 11px;
  font-weight: 650;
  padding: 4px 9px;
  border-radius: 7px;
  background: #eef2ed;
  color: #526b59;
  white-space: nowrap;
}
.badge.done,
.badge.ready,
.badge.published,
.badge.met {
  background: #e2f2e7;
  color: #21633c;
}
.badge.failed,
.badge.rejected,
.badge.violation,
.badge.facebook-posted {
  background: #fae8e4;
  color: #993e30;
}
.badge.running,
.badge.queued {
  background: #fbefd2;
  color: #816018;
}
.badge.uncertain,
.badge.needs_attention {
  background: #fbe8d5;
  color: #92531d;
}
.badge.manual_only {
  background: #e8e2f2;
  color: #5b4a8a;
}
.badge.prompt-gemini {
  background: #e2f2e7;
  color: #21633c;
}
.badge.no-prompt-gemini {
  background: #eef2ed;
  color: #526b59;
}
.empty {
  padding: 54px 20px;
  text-align: center;
  color: #66796e;
}
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 18px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.icon-button {
  min-height: 38px;
  padding: 7px 11px;
  font-size: 12px;
}
.subnav {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 0 0 17px;
}
.subnav button {
  font-size: 12px;
  padding: 8px 13px;
  min-height: 39px;
}
.subnav button.active {
  background: #e4efe5;
  border-color: #95b7a0;
  color: #164e36;
  box-shadow: inset 0 0 0 1px #95b7a04d;
}
.check-list {
  display: grid;
  gap: 7px;
  max-height: 260px;
  overflow: auto;
  background: #f7f9f5;
  padding: 12px;
  border-radius: 8px;
}
.check-list label {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  font-weight: 400;
}
.profile-picker {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.profile-picker legend {
  margin-left: 12px;
  padding: 0 6px;
  color: #53685b;
  font-size: 12px;
  font-weight: 650;
}
.machine-tabs {
  display: flex;
  gap: 7px;
  padding: 10px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background: #f7f9f5;
}
.machine-tabs button {
  flex: 0 0 auto;
  padding: 8px 12px;
  font-size: 12px;
}
.machine-tabs button.active {
  color: white;
  background: var(--ink);
  border-color: var(--ink);
}
.machine-profile-panel {
  max-height: 220px;
  border-radius: 0;
  background: white;
}
.machine-profile-panel label span {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.machine-profile-panel small {
  overflow-wrap: anywhere;
}
.machine-list {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.machine-card {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  background: white;
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: clip;
  box-shadow: 0 7px 24px #17382c08;
}
.machine-card summary {
  padding: 18px 21px;
  cursor: pointer;
  list-style-position: inside;
}
.machine-card summary:hover {
  background: #f7faf6;
}
.machine-card[open] summary {
  border-bottom: 1px solid var(--line);
  background: #f7faf6;
}
.machine-pairing-notice {
  margin: 16px 20px;
  padding: 16px;
  border: 1px solid #e4cd8d;
  border-radius: 12px;
  background: #fff9e9;
  line-height: 1.5;
}
.machine-pairing-notice p {
  margin: 8px 0 12px;
}
.machine-pairing-notice a {
  display: inline-block;
  margin-left: 12px;
}
.pairing-guide {
  line-height: 1.6;
}
.pairing-guide p {
  margin: 10px 0;
}
.pairing-guide code,
.machine-pairing-notice code {
  overflow-wrap: anywhere;
}
.pairing-code {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f4f8f3;
}
.pairing-code code {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
}
.machine-summary {
  display: inline-flex;
  width: calc(100% - 24px);
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  vertical-align: middle;
  min-width: 0;
  max-width: 100%;
}
.machine-summary h2 {
  margin: 0 0 4px;
}
.status-cluster {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
}
.machine-body {
  padding: 20px 21px 22px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.machine-warehouse-form {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f7faf6;
}
.machine-warehouse-form h3 {
  margin: 0 0 5px;
}
.machine-warehouse-form p {
  margin: 0;
}
.machine-warehouse-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
}
.machine-warehouse-list label {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font-weight: 500;
}
.machine-warehouse-list input {
  flex: none;
}
.machine-warehouse-list span {
  overflow-wrap: anywhere;
}
.machine-actions {
  margin-bottom: 10px;
}
.profile-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f4f7f2;
}
.profile-toolbar button,
.profile-toolbar select,
.profile-toolbar .select-all {
  min-height: 40px;
}
.profile-toolbar .select-all,
.provider-filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: 12px;
}
.provider-filter select {
  width: auto;
  min-width: 120px;
  max-width: min(260px, 55vw);
}
.profile-name {
  display: block;
  max-width: 260px;
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: var(--muted);
}
.capability-summary {
  min-width: 230px;
}
.capability-summary ul {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.capability-summary li {
  display: grid;
  gap: 2px;
}
.capability-summary small {
  color: var(--muted);
  overflow-wrap: anywhere;
}
.profile-config-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr)) auto;
  align-items: end;
  gap: 8px;
  min-width: 500px;
}
.profile-config-form label {
  display: grid;
  gap: 4px;
  margin: 0;
  font-size: 11px;
}
.profile-config-form select,
.profile-config-form button {
  min-height: 40px;
}
.profile-config-form button.config-saved {
  background: #2f8f52;
  border-color: #2f8f52;
  color: white;
}
.profile-config-form button.config-saved:hover {
  background: #267846;
  border-color: #267846;
}
.machine-profiles {
  overflow: visible;
}
.machine-profiles table,
.machine-profiles tbody {
  display: block;
  width: 100%;
}
.machine-profiles thead {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.machine-profiles tbody {
  display: grid;
  gap: 11px;
}
.machine-profiles tbody tr {
  display: grid;
  grid-template-columns:
    24px minmax(140px, 1fr) minmax(155px, 1.1fr) minmax(190px, 1.5fr)
    minmax(105px, 0.8fr);
  gap: 12px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.machine-profiles tbody tr[hidden] {
  display: none;
}
.machine-profiles tbody tr:hover {
  background: #fbfcfa;
}
.machine-profiles td {
  display: block;
  min-width: 0;
  padding: 0;
  border: 0;
  overflow-wrap: anywhere;
}
.machine-profiles td:first-child {
  grid-column: 1;
  grid-row: 1;
  padding-top: 3px;
}
.machine-profiles td:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
}
.machine-profiles td:nth-child(3) {
  grid-column: 3;
  grid-row: 1;
}
.machine-profiles td:nth-child(4) {
  grid-column: 4;
  grid-row: 1;
}
.machine-profiles td:nth-child(5) {
  grid-column: 5;
  grid-row: 1;
}
.machine-profiles td:nth-child(6) {
  grid-column: 2 / -1;
  grid-row: 2;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.machine-profiles td:nth-child(n + 2)::before {
  display: block;
  margin-bottom: 7px;
  color: #62796a;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.8px;
}
.machine-profiles td:nth-child(2)::before {
  content: "PROFILE";
}
.machine-profiles td:nth-child(3)::before {
  content: "NHÂN VIÊN";
}
.machine-profiles td:nth-child(4)::before {
  content: "MODEL / SUY LUẬN";
}
.machine-profiles td:nth-child(5)::before {
  content: "TRẠNG THÁI";
}
.machine-profiles td:nth-child(6)::before {
  content: "CẤU HÌNH MẶC ĐỊNH";
}
.machine-profiles .capability-summary {
  min-width: 0;
}
.machine-profiles .profile-config-form {
  grid-template-columns: repeat(4, minmax(120px, 1fr)) auto;
  min-width: 0;
}
.machine-profiles .profile-config-form button {
  white-space: nowrap;
}
.compact-notice {
  padding: 10px 13px;
}
.auto20-gemini-accounts {
  margin: 14px 0;
  padding: 14px 17px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f5f8f3;
  font-variant-numeric: tabular-nums;
}
.auto20-gemini-accounts ul {
  margin: 9px 0 0;
  padding-left: 20px;
}
.auto20-gemini-accounts li + li {
  margin-top: 7px;
}
.rolling-windows {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-variant-numeric: tabular-nums;
}
.rolling-windows > span {
  display: grid;
  min-width: 48px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: center;
}
.rolling-windows .rolling-label {
  align-self: center;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.rolling-windows small {
  white-space: nowrap;
}
.rolling-inline {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.rolling-machine-overview {
  margin: 14px 0;
}
.rolling-machine-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 9px 0;
}
.rolling-machine-row + .rolling-machine-row {
  border-top: 1px solid var(--line);
}
.rolling-machine-row > strong {
  min-width: 150px;
}
.inline-profile-form {
  margin: 16px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fafbf9;
}
.notice {
  border-left: 3px solid #c99e55;
  border-radius: 0 9px 9px 0;
  background: #fbf5e9;
  padding: 14px 17px;
  color: #665631;
  line-height: 1.6;
  font-size: 13px;
}
.notice[hidden],
.auto10-warning[hidden] {
  display: none;
}
.error {
  border-left: 3px solid #b65b4a;
  border-radius: 0 9px 9px 0;
  background: #fff2ee;
  color: #924e41;
  padding: 14px;
}
.login {
  width: min(460px, calc(100vw - 36px));
  margin: max(8vh, 45px) auto;
}
.login .brand {
  color: var(--ink);
  padding: 0;
  margin-bottom: 28px;
  border: 0;
}
.login .card {
  padding: 34px;
  box-shadow: 0 22px 55px #17382c12;
}
.login .card h2 {
  font-size: 25px;
  letter-spacing: -0.6px;
  margin-bottom: 8px;
}
.login .form .primary {
  min-height: 46px;
}
dialog {
  width: min(1000px, 94vw);
  max-height: 92vh;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 30px 100px #031b1a38;
  color: inherit;
}
dialog::backdrop {
  background: #0c272c80;
  backdrop-filter: blur(3px);
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 20px;
}
.dialog-head h2 {
  margin: 0;
}
.section-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f5f8f3;
  padding: 18px;
  border-radius: 11px;
  line-height: 1.7;
  max-height: 330px;
  overflow: auto;
  font-size: 13px;
}
.details-section {
  margin-top: 20px;
}
.details-section .row {
  justify-content: space-between;
  margin-bottom: 8px;
}
.word-count {
  margin-left: 8px;
  color: #66756f;
  font-size: 0.8em;
  font-weight: 400;
  white-space: nowrap;
}
pre {
  white-space: pre-wrap;
  word-break: break-word;
  font:
    12px/1.65 ui-monospace,
    monospace;
  max-height: 300px;
  overflow: auto;
  background: #f5f7f3;
  padding: 14px;
  border-radius: 8px;
}
#toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: #173e34;
  color: white;
  padding: 14px 20px;
  border-radius: 11px;
  box-shadow: 0 9px 30px #18382f30;
  display: none;
  z-index: 100;
  max-width: min(560px, calc(100vw - 32px));
  overflow-wrap: anywhere;
}
#toast a {
  color: white;
  text-decoration: underline;
}
.web-link {
  overflow-wrap: anywhere;
}
.loading {
  padding: 60px;
  text-align: center;
  color: #5c7766;
}
.public-story {
  max-width: 800px;
  margin: 40px auto;
  padding: 30px;
  background: #fff;
  line-height: 1.8;
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 20px 0;
}
progress {
  width: 100%;
  accent-color: #376749;
}
.cleanup-job + .cleanup-job {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 14px;
}
.cleanup-job progress {
  display: block;
  margin: 9px 0 4px;
}
.cleanup-job small {
  display: block;
  color: var(--muted);
}
.inline-status {
  font-size: 11px;
  color: #668174;
}
.profile-box {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 10px;
}
.table-wrap button {
  white-space: nowrap;
}
.batch-profile-details {
  margin-top: 0.65rem;
}
.batch-profile-details > summary {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f6f8f6;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  list-style: none;
  user-select: none;
}
.batch-profile-details > summary::-webkit-details-marker {
  display: none;
}
.batch-profile-details > summary::before {
  content: "▸";
  color: #376749;
}
.batch-profile-details[open] > summary::before {
  content: "▾";
}
.batch-profile-details > summary:hover {
  border-color: #9eb7a7;
  background: #eef4ef;
}
.batch-profile-details > summary small {
  color: #668174;
  font-weight: 500;
}
.batch-profile-progress {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.5rem;
}
.batch-profile {
  display: grid;
  gap: 0.12rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  background: #f6f8f6;
}
.batch-profile code {
  overflow-wrap: anywhere;
  font-size: 0.72rem;
}
.batch-profile.has-error {
  border-color: #d78b7c;
  background: #fff4f1;
}
.batch-profile-error {
  color: #a22b2b;
}
@media (max-width: 1000px) {
  .shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  .main {
    padding: 22px 24px 42px;
  }
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .sidebar {
    padding: 22px 10px 16px;
  }
  .profile-config-form {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
    min-width: 350px;
  }
  .article-table {
    overflow: visible;
  }
  .article-table table,
  .article-table thead,
  .article-table tbody,
  .article-table tr {
    display: block;
    width: 100%;
  }
  .article-table thead {
    margin-bottom: 9px;
  }
  .article-table th {
    display: none;
  }
  .article-table th:first-child:has(input) {
    display: block;
    padding: 7px 2px;
    border: 0;
    background: transparent;
  }
  .article-table tbody {
    display: grid;
    gap: 10px;
  }
  .article-table tbody tr {
    display: grid;
    grid-template-columns: 23px minmax(0, 1fr);
    gap: 4px 10px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
  }
  .article-table tbody tr:hover {
    background: #f9fbf8;
  }
  .article-table td {
    display: block;
    min-width: 0;
    padding: 0;
    border: 0;
    overflow-wrap: anywhere;
  }
  .article-table td:first-child {
    grid-column: 1;
    grid-row: 1;
    padding-top: 2px;
  }
  .article-table td.title {
    grid-column: 2;
    grid-row: 1;
    max-width: none;
    min-width: 0;
  }
  .article-table td:nth-child(n + 3) {
    grid-column: 2;
  }
  .article-table td:nth-child(3),
  .article-table td:nth-child(6) {
    color: var(--muted);
    font-size: 11px;
  }
  .article-table td:nth-child(3)::before {
    content: "Phụ trách · ";
    font-weight: 700;
  }
  .article-table td:nth-child(4) {
    margin-top: 6px;
  }
  .article-table td:nth-child(4),
  .article-table td:nth-child(5),
  .article-table td:nth-child(7) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
  }
  .article-table td:nth-child(6)::before {
    content: "Tạo lúc · ";
    font-weight: 700;
  }
  .article-table td:nth-child(7) {
    margin-top: 7px;
  }
  .article-table td.empty {
    grid-column: 1 / -1;
    padding: 28px 8px;
  }
  .machine-profiles tbody tr {
    grid-template-columns: 23px repeat(2, minmax(0, 1fr));
  }
  .machine-profiles td:nth-child(3) {
    grid-column: 3;
    grid-row: 1;
  }
  .machine-profiles td:nth-child(4),
  .machine-profiles td:nth-child(5),
  .machine-profiles td:nth-child(6) {
    grid-column: 2 / -1;
    grid-row: auto;
  }
  .machine-profiles .profile-config-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .machine-profiles .profile-config-form button {
    grid-column: 1 / -1;
  }
}
@media (max-width: 700px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: sticky;
    z-index: 20;
    top: 0;
    height: auto;
    padding: 10px 14px 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0;
    box-shadow: 0 5px 20px #0b2c2430;
  }
  .brand {
    font-size: 23px;
    padding: 2px 0 10px;
    border: 0;
  }
  .brand small {
    display: none;
  }
  .sidebar nav {
    display: flex;
    grid-column: 1 / -1;
    grid-row: 2;
    overflow-x: auto;
    gap: 5px;
    margin: 0 -14px;
    padding: 0 14px 8px;
    scrollbar-width: none;
  }
  .sidebar nav::-webkit-scrollbar {
    display: none;
  }
  .nav-group-label {
    display: none;
  }
  .sidebar nav button {
    white-space: nowrap;
    min-height: 37px;
    padding: 8px 11px;
    font-size: 12px;
  }
  .sidebar nav button.active {
    box-shadow: inset 0 -3px 0 var(--accent);
  }
  .sidebar .account {
    grid-column: 2;
    grid-row: 1;
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
  }
  .account-avatar,
  .account-identity {
    display: none;
  }
  .sidebar .account button {
    width: auto;
    min-height: 34px;
    margin: 0;
    padding: 6px 10px;
  }
  .main {
    padding: 19px 16px 38px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .topbar {
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
  }
  .topbar select {
    max-width: 100%;
  }
  .heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  h1 {
    font-size: 27px;
  }
  .card {
    padding: 17px;
  }
  dialog {
    padding: 18px;
  }
  .topbar small {
    font-size: 9px;
  }
  .row select {
    max-width: 100%;
  }
  .filters input:not([type="checkbox"]) {
    flex-basis: 100%;
    min-width: 0;
  }
  .filters select {
    flex: 0 0 90px;
  }
  .filters > button {
    flex-grow: 1;
  }
  .table-wrap {
    margin-inline: -8px;
    padding-inline: 8px;
  }
  .article-table {
    margin-inline: 0;
    padding-inline: 0;
  }
  input,
  select,
  textarea {
    font-size: 16px;
  }
  .machine-summary {
    align-items: flex-start;
    flex-direction: column;
  }
  .status-cluster {
    justify-content: flex-start;
  }
  .machine-card summary,
  .machine-body {
    padding: 14px;
  }
  .machine-card summary {
    min-width: 0;
    max-width: 100%;
  }
  .profile-config-form {
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .profile-config-form button {
    grid-column: 1 / -1;
  }
  .pagination {
    gap: 10px;
  }
  .machine-profiles {
    margin-inline: 0;
    padding-inline: 0;
  }
  .machine-profiles tbody tr {
    grid-template-columns: 23px minmax(0, 1fr);
    padding: 13px;
  }
  .machine-profiles td:nth-child(n + 2) {
    grid-column: 2;
    grid-row: auto;
  }
  .machine-profiles td:nth-child(2) {
    grid-row: 1;
  }
}
.video-backlog {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line, #dce5df);
  border-radius: 10px;
  background: var(--subtle, #f6f9f6);
}
.video-backlog .row {
  margin: 0;
}
.auto10-config {
  padding: 0;
  overflow: hidden;
}
.auto10-section-head {
  padding: 19px 24px;
  background: linear-gradient(110deg, #edf5f0, #f8faf6);
  border-bottom: 1px solid var(--line);
}
.auto10-section-head h2,
.auto10-machine h2 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 18px;
}
.auto10-section-head p,
.auto10-machine-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.auto10-config > form {
  padding: 22px 24px 24px;
}
.auto10-config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(170px, 1fr)) minmax(260px, 2fr);
  gap: 16px;
  align-items: start;
}
.auto10-config-grid label {
  min-width: 0;
}
.auto10-config-grid textarea {
  min-height: 98px;
}
.auto10-prompt-mode {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin: 0;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.auto10-prompt-mode legend {
  font-weight: 700;
}
.auto10-prompt-mode label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
}
.auto10-prompt-mode input {
  width: auto;
  margin: 0;
}
.prompt10-master-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.prompt10-master {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.prompt10-master-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.prompt10-master textarea {
  width: 100%;
  min-height: 190px;
}
.auto10-rules-wrap {
  position: relative;
}
.auto10-rules-wrap > button {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 1;
  padding: 5px 11px;
  font-size: 12px;
}
.auto10-rules {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  background: #f9fbf9;
}
.auto10-rules summary {
  cursor: pointer;
  font-weight: 600;
  padding-right: 110px;
}
.auto10-rules div {
  max-height: 260px;
  overflow: auto;
  margin-top: 12px;
}
.auto10-rules ul {
  margin-top: 6px;
}
.auto10-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 19px;
}
.auto10-overview > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 17px 20px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}
.auto10-overview strong {
  color: #1a7957;
  font-size: 26px;
  line-height: 1;
}
.auto10-overview span {
  color: var(--muted);
  font-size: 13px;
}
.auto10-machine {
  padding: 0;
  overflow: hidden;
}
.auto10-machine-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
  background: #f3f8f4;
}
.auto10-machine-head h2 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}
.auto10-windows {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.auto10-windows > span {
  display: grid;
  min-width: 54px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  text-align: center;
}
.auto10-windows strong {
  font-size: 15px;
}
.auto10-windows small {
  white-space: nowrap;
}
.auto10-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.auto10-select-all {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-right: 8px;
  white-space: nowrap;
  cursor: pointer;
  font-weight: 600;
}
.auto10-select-all input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #155b47;
}
.auto10-actions button {
  min-width: 78px;
}
.auto10-ids {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}
.auto10-id {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: linear-gradient(150deg, #fff 65%, #f7faf7);
}
.auto10-id.is-running {
  border-color: #48b67a;
  background: linear-gradient(145deg, #e5f8eb, #f4fff7);
  box-shadow: 0 0 0 2px rgba(49, 151, 92, 0.12);
}
.auto10-id.is-running .auto10-id-stats span {
  background: #fff;
}
.auto10-current {
  margin: 7px 0 0;
  color: #126b43;
  font-size: 12px;
  font-weight: 700;
}
.auto10-current:empty {
  display: none;
}
.auto10-id-head,
.auto10-quota,
.auto10-id-stats {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.auto10-id-head {
  align-items: flex-start;
}
.auto10-id-head label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  line-height: 1.35;
}
.auto10-id-head label span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.auto10-id-head small,
.auto10-id > small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.auto10-pill {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 8px;
  background: #e8eeeb;
  color: #52665b;
  font-size: 11px;
  font-weight: 700;
}
.auto10-pill.is-running {
  background: #dbf4e7;
  color: #126b43;
}
.auto10-pill.is-waiting {
  background: #e8f0fb;
  color: #24619e;
}
.auto10-warning {
  margin: 9px 0 0;
  color: #a34c2e;
  font-size: 12px;
}
.auto10-id-stats {
  margin: 15px 0 12px;
}
.auto10-id-stats span {
  flex: 1;
  min-width: 0;
  padding: 7px;
  border-radius: 7px;
  background: #f4f7f4;
  color: var(--muted);
  font-size: 11px;
}
.auto10-id-stats strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 17px;
}
.auto10-quota {
  flex-wrap: wrap;
  margin-bottom: 8px;
  font-size: 12px;
}
.auto10-id-toggle {
  margin-top: 12px;
  min-width: 78px;
}
.auto10-requeue {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 25px;
  padding: 14px 18px;
  border: 1px solid #f3d8ce;
  border-radius: 12px;
  background: #fff4ef;
}
.auto10-requeue small {
  display: block;
  margin-top: 3px;
  color: #755f55;
}
@media (max-width: 1100px) {
  .prompt10-master-grid {
    grid-template-columns: 1fr;
  }
  .auto10-config-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .auto10-ids {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .auto10-config-grid,
  .auto10-ids,
  .auto10-overview {
    grid-template-columns: 1fr;
  }
  .auto10-machine-head,
  .auto10-requeue {
    align-items: flex-start;
    flex-direction: column;
  }
  .auto10-actions {
    width: 100%;
  }
  .auto10-actions button {
    flex: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
.worker-update-page {
  display: grid;
  gap: 22px;
}
.worker-update-release {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 22px;
  border: 1px solid #b8ded0;
  border-radius: 14px;
  background: linear-gradient(100deg, #e8f7ee, #f8fcfa);
}
.worker-update-release > div,
.worker-update-state > div {
  display: grid;
  gap: 4px;
}
.worker-update-release strong {
  color: #123f32;
}
.worker-update-release small,
.worker-update-state small {
  color: #62776e;
}
.worker-setup-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}
.worker-setup-heading h2 {
  margin: 0 0 5px;
}
.worker-setup-heading p,
.worker-setup-steps p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.5;
}
.worker-setup-heading .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid var(--ink);
  border-radius: 10px;
  white-space: nowrap;
  text-decoration: none;
  font-weight: 650;
}
.worker-setup-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 28px;
  margin: 20px 0 0;
  padding-left: 22px;
}
.worker-setup-steps li {
  padding-left: 4px;
}
.worker-setup-steps li::marker {
  color: var(--ink);
  font-weight: 700;
}
.worker-setup-steps a,
.worker-setup-steps button {
  display: inline-block;
  margin-top: 8px;
}
.worker-update-config,
.worker-update-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
}
.worker-update-config label {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.worker-update-config input[type="checkbox"] {
  width: 18px;
  height: 18px;
}
.worker-update-config select {
  min-width: 110px;
}
.worker-update-page .heading {
  margin-bottom: 0;
}
.worker-update-toolbar input {
  flex: 1;
  min-width: 180px;
}
.worker-update-toolbar select {
  width: 215px;
}
.worker-update-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.worker-update-card {
  border: 1px solid #d6e3da;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 7px 22px #164a2c0b;
  padding: 18px;
  display: grid;
  gap: 16px;
  min-width: 0;
}
.worker-update-card.worker-update-ready {
  border-color: #9edbb7;
}
.worker-update-card.worker-update-error {
  border-color: #f0b0a9;
}
.worker-update-card.worker-update-progress {
  border-color: #9ecdf3;
}
.worker-update-card.worker-update-waiting {
  border-color: #ead39d;
}
.worker-update-card-top,
.worker-update-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 10px;
}
.worker-update-card-top h2 {
  margin-bottom: 1px;
  font-size: 17px;
}
.worker-update-card-top small {
  overflow-wrap: anywhere;
  font-size: 11px;
}
.worker-online {
  color: #68736e;
  background: #edf2ee;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.worker-online.is-online {
  color: #08764a;
  background: #def5e8;
}
.worker-update-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.worker-update-facts > div {
  background: #f5f8f6;
  padding: 11px;
  border-radius: 9px;
  display: grid;
  gap: 5px;
}
.worker-update-facts small {
  font-size: 11px;
}
.worker-update-facts strong {
  font-size: 14px;
  overflow-wrap: anywhere;
}
.worker-update-state {
  display: flex;
  gap: 10px;
  align-items: start;
  min-height: 46px;
}
.worker-update-state strong {
  color: #176446;
}
.worker-update-error .worker-update-state strong {
  color: #b9342d;
}
.worker-update-waiting .worker-update-state strong {
  color: #a26700;
}
.worker-update-dot {
  flex: 0 0 12px;
  height: 12px;
  margin-top: 3px;
  border-radius: 50%;
  background: #16a265;
}
.worker-update-waiting .worker-update-dot {
  background: #e8a72c;
}
.worker-update-error .worker-update-dot {
  background: #e34840;
}
.worker-update-progress .worker-update-dot {
  background: #2994dc;
}
.worker-update-card-bottom {
  flex-wrap: wrap;
  justify-content: start;
}
.worker-update-card-bottom button {
  font-size: 12px;
  min-height: 36px;
}
.worker-update-checked {
  font-size: 11px;
}
.worker-update-log ol {
  padding: 0;
  margin: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.worker-update-log li {
  border-left: 2px solid #8fd4ae;
  padding-left: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  font-size: 12px;
}
.worker-update-log time {
  color: #6b7b73;
}
@media (max-width: 1200px) {
  .worker-update-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 800px) {
  .worker-setup-heading {
    align-items: stretch;
    flex-direction: column;
  }
  .worker-setup-steps {
    grid-template-columns: 1fr;
  }
  .worker-update-release {
    align-items: stretch;
    flex-direction: column;
  }
  .worker-update-grid,
  .worker-update-log ol {
    grid-template-columns: 1fr;
  }
  .worker-update-config {
    flex-wrap: wrap;
  }
  .worker-update-toolbar {
    flex-wrap: wrap;
  }
  .worker-update-toolbar select {
    width: 100%;
  }
}
.article-thumbnail {
  display: block;
  max-width: 100%;
  max-height: 360px;
  border-radius: 12px;
  object-fit: contain;
}
.overview-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.overview-head h1 {
  margin-bottom: 5px;
}
.overview-head p {
  margin-bottom: 0;
  color: var(--muted);
}
.overview-head > span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.overview-warehouses {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 17px;
}
.overview-warehouses button,
.overview-filters button {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 11px;
  border-radius: 8px;
}
.overview-warehouses button.active,
.overview-filters button.active {
  background: #a77b2d;
  border-color: #a77b2d;
  color: #fff;
}
.overview-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.overview-kpis .overview-metric {
  min-height: 95px;
}
.overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
.overview-box {
  margin: 0;
  padding: 17px;
  min-width: 0;
}
.overview-box-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: start;
  gap: 10px;
  margin-bottom: 15px;
}
.overview-box-head h2 {
  margin: 0 0 4px;
  font-size: 18px;
}
.overview-box-head p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.overview-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}
.overview-filters input[type="date"] {
  width: 145px;
  min-height: 32px;
  padding: 5px 7px;
  font-size: 11px;
}
.overview-metric {
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 13px 15px;
  border: 1px solid #e6e8dd;
  border-radius: 9px;
  background: linear-gradient(135deg, #fff, #fbfbf7);
  box-shadow: 0 3px 9px #273c2509;
}
.overview-metric small {
  font-size: 11px;
  line-height: 1.3;
}
.overview-metric strong {
  color: #174b35;
  font-size: 25px;
  font-variant-numeric: tabular-nums;
}
.overview-article-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.overview-article-metrics .overview-metric {
  min-height: 82px;
  padding: 10px;
}
.overview-article-metrics .overview-metric strong {
  font-size: 21px;
}
.overview-history-note {
  margin: 13px 0 0;
  padding: 8px 10px;
  border-radius: 7px;
  background: #fff8e9;
  color: #77571f;
  font-size: 11px;
}
.overview-table {
  max-height: 350px;
  overflow: auto;
}
.overview-table table {
  min-width: 600px;
}
.overview-table th,
.overview-table td {
  font-size: 11px;
  padding: 9px 8px;
}
.overview-web-history {
  margin: 7px 0 0;
  padding-left: 16px;
  min-width: 180px;
  font-size: 11px;
}
.overview-window-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}
.overview-window-summary span {
  display: grid;
  gap: 3px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.overview-window-summary small {
  font-size: 10px;
}
.overview-window-summary strong {
  color: #17553a;
  font-size: 18px;
}
.overview-machine {
  margin-bottom: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.overview-machine > summary {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  cursor: pointer;
  background: #f9faf6;
  font-size: 12px;
}
.overview-machine-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}
.overview-machine-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}
.overview-machine-numbers b {
  color: #16533a;
}
.overview-id-table {
  max-height: 360px;
  overflow: auto;
}
.overview-id-table table {
  min-width: 750px;
}
.overview-id-table th,
.overview-id-table td {
  padding: 8px 6px;
  font-size: 10px;
}
.overview-state {
  font-weight: 700;
  white-space: nowrap;
}
.overview-state.running {
  color: #137a43;
}
.overview-state.quota {
  color: #a36b1a;
}
.overview-state.idle {
  color: #68776f;
}
.overview-count {
  min-width: 24px;
  min-height: 26px;
  padding: 0 3px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: #b9cfbd;
  text-underline-offset: 3px;
}
.overview-count:hover,
.overview-count:focus-visible {
  color: #a77b2d;
  text-decoration-color: currentColor;
}
.overview-machine-actions {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}
.overview-detail-list {
  display: grid;
  gap: 7px;
  max-height: min(60vh, 560px);
  overflow: auto;
  margin-bottom: 12px;
}
.overview-detail-row {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: left;
}
.overview-detail-row small {
  color: var(--muted);
}
@media (max-width: 1200px) {
  .overview-grid {
    grid-template-columns: 1fr;
  }
  .overview-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .overview-head {
    align-items: start;
    flex-direction: column;
  }
  .overview-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .overview-article-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .overview-box {
    padding: 14px;
  }
  .overview-filters {
    justify-content: flex-start;
  }
  .overview-machine > summary {
    display: block;
  }
  .overview-machine-numbers {
    margin-top: 7px;
  }
}

/* NexiQ visual system: the existing controls and page flows stay in place. */
.shell {
  grid-template-columns: 264px minmax(0, 1fr);
  background: radial-gradient(circle at 74% 0, #fffdf8 0, #f8f7f2 52%);
}
.sidebar {
  background: linear-gradient(172deg, #072d21 0%, #0b3829 58%, #062b20 100%);
  border-right: 1px solid #d2af7040;
  padding: 20px 13px 16px;
  gap: 10px;
}
.sidebar .brand {
  padding: 4px 17px 18px;
  margin-bottom: 5px;
  font-size: 30px;
  font-weight: 780;
  letter-spacing: -1.6px;
  color: #f9f6e9;
}
.sidebar .brand span {
  color: #dfb96e;
}
.sidebar .brand small {
  color: #e1c990;
  font-size: 10px;
  letter-spacing: 0.6px;
  text-transform: none;
}
.sidebar nav {
  gap: 5px;
}
.sidebar .nav-group-label {
  color: #a7c2ad;
  margin-top: 16px;
  margin-bottom: 4px;
}
.sidebar nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #e4eee6;
  font-size: 13px;
}
.sidebar nav button .nav-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  opacity: 0.85;
}
.sidebar nav button:hover {
  background: #ffffff18;
}
.sidebar nav button.active {
  border-color: #d9ad63;
  background: linear-gradient(105deg, #af8a3f66, #66744255);
  box-shadow:
    inset 3px 0 0 #efc77d,
    0 4px 13px #00000012;
  color: #fff9e8;
}
.sidebar nav button.active .nav-icon {
  color: #f4d397;
  opacity: 1;
}
.sidebar-footer {
  display: grid;
  gap: 5px;
  padding: 15px 14px;
  margin-top: auto;
  border: 1px solid #b6d2af3d;
  border-radius: 11px;
  background: #ffffff0d;
}
.sidebar-footer strong {
  color: #e8c176;
  font-size: 12px;
}
.sidebar-footer small {
  color: #bed1c2;
  font-size: 11px;
  line-height: 1.45;
}
.sidebar .account {
  margin-top: 0;
  border-top: 0;
  padding-top: 7px;
}
.sidebar .account button {
  border-color: #b6d2af4f;
}
.main {
  max-width: none;
  padding: 24px clamp(22px, 2.2vw, 40px) 56px;
}
.topbar {
  min-height: 70px;
  margin: -24px calc(0px - clamp(22px, 2.2vw, 40px)) 28px;
  padding: 15px clamp(22px, 2.2vw, 40px);
  background: #fffdfa;
  border-bottom: 1px solid #e6e3d9;
  box-shadow: 0 2px 9px #3f402308;
}
.workspace-label small {
  color: #ad8243;
  letter-spacing: 1.2px;
}
.workspace-label strong {
  color: #12382b;
  font-size: 15px;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}
.topbar-actions select {
  min-width: 210px;
  max-width: 280px;
  background: #fff;
}
.topbar-user {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.topbar-user > span:last-child {
  display: grid;
  gap: 2px;
}
.topbar-user strong {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.topbar-user small {
  font-size: 10px;
  letter-spacing: 0;
  text-transform: none;
}
.topbar-avatar {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: #d2aa68;
  color: #fff;
  font-size: 13px;
  font-weight: 750;
  flex: 0 0 35px;
}
.heading {
  margin-bottom: 22px;
}
.heading h1 {
  color: #10382a;
  font-size: clamp(28px, 2.2vw, 36px);
  font-weight: 780;
}
.card,
.metric {
  border-color: #e9e9e1;
  border-radius: 12px;
  background: #fff;
  box-shadow:
    0 7px 22px #344b330a,
    0 1px 3px #344b3307;
}
.metric {
  border-top: 1px solid #e9e9e1;
  border-left: 4px solid #d6ad6b;
}
.metric b {
  color: #153d2c;
}
.table-wrap table thead {
  background: #f8f8f4;
}
.card h2,
.card h3 {
  color: #173c2e;
}
.primary {
  background: #104c37;
  border-color: #104c37;
}
.primary:hover {
  background: #166248;
}
@media (max-width: 1000px) {
  .shell {
    grid-template-columns: 222px minmax(0, 1fr);
  }
  .topbar-user > span:last-child {
    display: none;
  }
}
@media (max-width: 700px) {
  .shell {
    display: block;
  }
  .sidebar {
    padding: 9px 14px 0;
  }
  .sidebar .brand {
    padding: 2px 0 8px;
    font-size: 24px;
  }
  .sidebar-footer {
    display: none;
  }
  .sidebar nav {
    gap: 4px;
  }
  .sidebar nav button {
    width: auto;
    min-height: 38px;
    gap: 7px;
    padding: 7px 10px;
  }
  .sidebar nav button .nav-icon {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
  }
  .sidebar nav button.active {
    box-shadow: inset 0 -3px 0 #efc77d;
  }
  .main {
    padding: 19px 16px 38px;
  }
  .topbar {
    margin: -19px -16px 22px;
    padding: 12px 16px;
    min-height: 58px;
  }
  .topbar-actions {
    gap: 7px;
  }
  .topbar-user {
    display: none;
  }
  .topbar-actions select {
    min-width: 0;
    max-width: 150px;
  }
}
.cta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}
.cta-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  max-height: 580px;
  overflow: auto;
}
.cta-item {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  padding: 12px;
  border: 1px solid #dfe6de;
  border-radius: 10px;
  overflow-wrap: anywhere;
}
.cta-item .row {
  flex-shrink: 0;
}
@media (max-width: 900px) {
  .cta-grid {
    grid-template-columns: 1fr;
  }
  .cta-item {
    flex-direction: column;
  }
}
