:root {
  color-scheme: light;
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #18221f;
  background: #f2f5f4;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: #f2f5f4;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 22px 14px 18px;
  color: #f6fbf9;
  background: #172620;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 28px;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 7px;
  color: #fff;
  background: #1677ff;
  font-size: 14px;
  font-weight: 800;
}

.brand strong,
.brand small,
.service-state strong,
.service-state small {
  display: block;
}

.brand strong {
  font-size: 14px;
}

.brand small {
  margin-top: 2px;
  color: #b8c8c2;
  font-size: 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 46px;
  padding: 0 12px;
  border-radius: 6px;
  color: #dfeae6;
  text-decoration: none;
  font-size: 14px;
}

.nav-item span {
  color: #82a199;
  font-size: 11px;
}

.nav-item.active {
  color: #fff;
  background: #0b8873;
  font-weight: 700;
}

.nav-item.active span {
  color: #baf0e6;
}

.service-state {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 18px 8px 0;
  border-top: 1px solid #31423c;
}

.state-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #35c79a;
  box-shadow: 0 0 0 3px rgb(53 199 154 / 14%);
}

.service-state strong {
  font-size: 13px;
}

.service-state small {
  margin-top: 2px;
  color: #a8bbb4;
  font-size: 11px;
}

main {
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 14px 28px;
  border-bottom: 1px solid #dbe3e0;
  background: #fff;
}

.topbar p,
.dialog-header p {
  margin: 0 0 3px;
  color: #62736d;
  font-size: 12px;
}

.topbar h1,
.dialog-header h2 {
  margin: 0;
  letter-spacing: 0;
}

.topbar h1 {
  font-size: 22px;
}

.secondary-button,
.detail-button,
.icon-button {
  border: 1px solid #c7d3cf;
  color: #1a2a25;
  background: #fff;
  font-weight: 700;
}

.secondary-button,
.detail-button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 5px;
}

.secondary-button:hover,
.detail-button:hover {
  border-color: #0b8873;
  color: #08715f;
}

.secondary-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.workspace {
  padding: 26px 28px 40px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.section-heading h2,
.group-heading h3 {
  margin: 0;
  letter-spacing: 0;
}

.section-heading h2 {
  font-size: 18px;
}

.section-heading p {
  margin: 6px 0 0;
  color: #6c7b76;
  font-size: 13px;
}

.search-field {
  display: grid;
  gap: 6px;
  width: min(280px, 100%);
  color: #5c6c66;
  font-size: 12px;
}

.search-field input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #c8d3cf;
  border-radius: 5px;
  outline: none;
  background: #fff;
}

.search-field input:focus {
  border-color: #0b8873;
  box-shadow: 0 0 0 3px rgb(11 136 115 / 12%);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
  border: 1px solid #d8e1de;
  border-radius: 7px;
  background: #fff;
}

.summary-grid > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  min-width: 0;
  padding: 18px 20px;
}

.summary-grid > div + div {
  border-left: 1px solid #e3e9e7;
}

.summary-grid span {
  color: #61716b;
  font-size: 13px;
}

.summary-grid strong {
  font-size: 24px;
}

.account-list {
  border: 1px solid #d8e1de;
  border-radius: 7px;
  background: #fff;
  overflow: hidden;
}

.account-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(480px, 2.4fr) auto;
  align-items: center;
  gap: 24px;
  min-height: 116px;
  padding: 20px;
}

.account-row + .account-row {
  border-top: 1px solid #e3e9e7;
}

.account-identity {
  min-width: 0;
}

.account-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-bottom: 8px;
  padding: 0 8px;
  border-radius: 4px;
  color: #08715f;
  background: #e7f7f2;
  font-size: 12px;
  font-weight: 700;
}

.account-status.offline {
  color: #8a4e20;
  background: #fff0df;
}

.account-identity strong,
.account-identity span {
  display: block;
}

.account-identity strong {
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-identity span {
  margin-top: 4px;
  color: #60716b;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}

.account-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(100px, 1fr));
  gap: 14px;
  margin: 0;
}

.account-metrics div {
  min-width: 0;
}

.account-metrics dt {
  margin-bottom: 4px;
  color: #73817d;
  font-size: 11px;
}

.account-metrics dd {
  margin: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-state,
.error-state {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-height: 180px;
  padding: 48px 20px;
  border: 1px dashed #c4d0cc;
  border-radius: 7px;
  color: #60716b;
  background: #fff;
  text-align: center;
}

.empty-state strong {
  color: #22322c;
}

.empty-state span {
  font-size: 13px;
}

.error-state {
  color: #9a2e2e;
  border-color: #e9b6b6;
  background: #fff7f7;
}

[hidden] {
  display: none !important;
}

.account-dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 32px));
  padding: 0;
  border: 0;
  border-radius: 7px;
  color: #18221f;
  background: #fff;
  box-shadow: 0 24px 70px rgb(17 35 29 / 26%);
}

.account-dialog::backdrop {
  background: rgb(17 29 25 / 54%);
}

.dialog-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid #dce4e1;
}

.dialog-header h2 {
  font-size: 20px;
}

.dialog-header span {
  display: block;
  margin-top: 5px;
  color: #65756f;
  font-size: 13px;
}

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  padding: 0;
  border-radius: 5px;
  font-size: 22px;
  line-height: 1;
}

.dialog-body {
  max-height: calc(100vh - 150px);
  padding: 20px 22px 24px;
  overflow-y: auto;
}

.account-detail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 24px;
  border: 1px solid #dce4e1;
  border-radius: 6px;
}

.detail-cell {
  padding: 14px;
}

.detail-cell + .detail-cell {
  border-left: 1px solid #e4eae8;
}

.detail-cell span,
.detail-cell strong {
  display: block;
}

.detail-cell span {
  margin-bottom: 5px;
  color: #6b7b75;
  font-size: 11px;
}

.detail-cell strong {
  font-size: 13px;
}

.group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.group-heading h3 {
  font-size: 15px;
}

.group-heading strong {
  color: #08715f;
  font-size: 13px;
}

.group-list {
  border: 1px solid #dce4e1;
  border-radius: 6px;
  overflow: hidden;
}

.group-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  padding: 15px 16px;
}

.group-row + .group-row {
  border-top: 1px solid #e4eae8;
}

.group-row strong,
.group-row span {
  display: block;
}

.group-row strong {
  font-size: 14px;
}

.group-row span {
  margin-top: 5px;
  color: #687872;
  font-size: 12px;
}

.group-order {
  align-self: center;
  color: #08715f;
  font-size: 12px;
  font-weight: 700;
}

.group-empty {
  padding: 28px 16px;
  color: #687872;
  text-align: center;
  font-size: 13px;
}

@media (max-width: 900px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: static;
    min-height: auto;
    padding: 16px;
  }

  .brand {
    padding: 0 4px 14px;
  }

  .sidebar nav {
    display: flex;
  }

  .nav-item {
    flex: 1;
    justify-content: center;
  }

  .nav-item span,
  .service-state {
    display: none;
  }

  .account-row {
    grid-template-columns: 1fr auto;
  }

  .account-metrics {
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    order: 3;
  }
}

@media (max-width: 640px) {
  .topbar {
    min-height: 68px;
    padding: 12px 16px;
  }

  .topbar h1 {
    font-size: 20px;
  }

  .workspace {
    padding: 20px 16px 32px;
  }

  .section-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
  }

  .search-field {
    width: 100%;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .summary-grid > div {
    padding: 14px 16px;
  }

  .summary-grid > div + div {
    border-top: 1px solid #e3e9e7;
    border-left: 0;
  }

  .account-row {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 18px 16px;
  }

  .account-metrics {
    grid-column: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    order: initial;
  }

  .detail-button {
    width: 100%;
  }

  .account-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  .dialog-header,
  .dialog-body {
    padding-right: 16px;
    padding-left: 16px;
  }

  .account-detail {
    grid-template-columns: 1fr;
  }

  .detail-cell + .detail-cell {
    border-top: 1px solid #e4eae8;
    border-left: 0;
  }
}

.sidebar nav {
  display: grid;
  gap: 5px;
}

.nav-item {
  width: 100%;
  border: 0;
  text-align: left;
}

.topbar-actions,
.dialog-actions {
  display: flex;
  gap: 10px;
}

.primary-button,
.danger-button {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 5px;
  color: #fff;
  background: #0b8873;
  font-weight: 700;
}

.primary-button:hover {
  background: #08715f;
}

.danger-button {
  background: #b64242;
}

.danger-button:hover {
  background: #923434;
}

.login-view {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: #edf2f0;
}

.login-card {
  display: grid;
  width: min(400px, 100%);
  gap: 16px;
  padding: 34px;
  border: 1px solid #d7e0dd;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 18px 45px rgb(23 38 32 / 12%);
}

.login-card > .brand-mark {
  width: 44px;
  height: 44px;
}

.login-card p,
.login-card h1 {
  margin: 0;
}

.login-card p {
  color: #687872;
  font-size: 13px;
}

.login-card h1 {
  margin-bottom: 8px;
  font-size: 23px;
}

label {
  display: grid;
  gap: 7px;
  color: #53645e;
  font-size: 12px;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid #c8d3cf;
  border-radius: 5px;
  outline: none;
  color: #18221f;
  background: #fff;
}

input,
select {
  min-height: 40px;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #0b8873;
  box-shadow: 0 0 0 3px rgb(11 136 115 / 12%);
}

.form-error {
  padding: 10px 12px;
  border-radius: 5px;
  color: #9a2e2e;
  background: #fff0f0;
  font-size: 13px;
}

.data-list,
.table-wrap,
.panel,
.scheme-card {
  border: 1px solid #d8e1de;
  border-radius: 7px;
  background: #fff;
}

.data-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.3fr) minmax(320px, 2fr) auto;
  align-items: center;
  gap: 20px;
  min-height: 80px;
  padding: 16px 18px;
}

.data-row + .data-row {
  border-top: 1px solid #e3e9e7;
}

.data-row h3,
.data-row p,
.scheme-card h3,
.scheme-card p,
.panel h2,
.panel p {
  margin: 0;
}

.data-row h3,
.scheme-card h3 {
  font-size: 14px;
}

.data-row p,
.scheme-card p,
.panel p {
  margin-top: 5px;
  color: #6a7974;
  font-size: 12px;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 8px;
}

.small-button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid #c7d3cf;
  border-radius: 5px;
  color: #263630;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}

.small-button.danger {
  color: #a03030;
  border-color: #e1bcbc;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.scheme-card {
  padding: 18px;
}

.scheme-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 15px 0;
}

.badge {
  padding: 4px 8px;
  border-radius: 999px;
  color: #08715f;
  background: #e7f7f2;
  font-size: 11px;
  font-weight: 700;
}

.badge.off {
  color: #717b77;
  background: #edf0ef;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid #e5eae8;
  text-align: left;
  white-space: nowrap;
}

th {
  color: #62736d;
  background: #f7f9f8;
  font-weight: 700;
}

.select-list {
  display: grid;
  max-height: 360px;
  border: 1px solid #dce4e1;
  border-radius: 6px;
  overflow-y: auto;
}

.select-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
}

.select-row + .select-row {
  border-top: 1px solid #e4eae8;
}

.select-row input {
  width: 18px;
  min-height: 18px;
}

.select-row strong,
.select-row span {
  display: block;
}

.select-row span {
  margin-top: 3px;
  color: #6a7974;
  font-size: 11px;
}

.dialog-actions {
  justify-content: space-between;
  margin-top: 20px;
}

.wide-dialog {
  width: min(900px, calc(100vw - 32px));
}

.stack-form {
  display: grid;
  gap: 15px;
}

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

.check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
}

.check-line input {
  width: 17px;
  min-height: 17px;
}

fieldset {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 14px;
  border: 1px solid #dce4e1;
  border-radius: 6px;
}

legend {
  padding: 0 6px;
  color: #263630;
  font-size: 13px;
  font-weight: 700;
}

.hint {
  margin: 0;
  color: #6a7974;
  font-size: 12px;
}

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

.panel {
  min-width: 0;
  padding: 18px;
}

.panel.wide {
  grid-column: 1 / -1;
}

.panel-header {
  margin-bottom: 16px;
}

.subheading {
  margin: 18px 0 8px;
  color: #344741;
  font-size: 13px;
}

.mini-list {
  display: grid;
  gap: 7px;
}

.mini-list > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 5px;
  color: #4e615a;
  background: #f4f7f6;
  font-size: 12px;
}

.mini-list > div span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-list > div strong {
  flex: 0 0 auto;
  color: #182a24;
}

.compact .data-row {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 64px;
  padding: 12px 0;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: 6px;
  color: #fff;
  background: #08715f;
  box-shadow: 0 12px 30px rgb(17 35 29 / 24%);
  font-size: 13px;
}

.toast.error {
  background: #a83d3d;
}

@media (max-width: 900px) {
  .sidebar nav {
    display: flex;
    overflow-x: auto;
  }

  .nav-item {
    min-width: 120px;
  }

  .system-grid {
    grid-template-columns: 1fr;
  }

  .panel.wide {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .topbar-actions {
    gap: 6px;
  }

  .data-row,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .row-actions {
    justify-content: start;
  }

  .dialog-actions {
    flex-direction: column-reverse;
  }

  .dialog-actions button {
    width: 100%;
  }
}

/* Current V1.0 management markup. Keep these rules last so legacy prototype
   selectors cannot alter the production layout. */
.nav-item {
  color: #dfeae6;
  background: transparent;
}

.nav-item:hover {
  color: #fff;
  background: rgb(255 255 255 / 7%);
}

.nav-item.active:hover {
  background: #0b8873;
}

.account-row {
  grid-template-columns: auto minmax(170px, 1fr) minmax(440px, 2.3fr) auto;
  min-height: 110px;
}

.account-row > dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 1fr));
  gap: 16px;
  min-width: 0;
  margin: 0;
}

.account-row dt {
  margin-bottom: 4px;
  color: #73817d;
  font-size: 11px;
}

.account-row dd {
  margin: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill.online {
  color: #08715f;
  background: #e7f7f2;
}

.status-pill.offline {
  color: #8a4e20;
  background: #fff0df;
}

.account-detail > div {
  min-width: 0;
  padding: 14px;
}

.account-detail > div + div {
  border-left: 1px solid #e4eae8;
}

.account-detail span,
.account-detail strong {
  display: block;
}

.account-detail span {
  margin-bottom: 5px;
  color: #6b7b75;
  font-size: 11px;
}

.account-detail strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 12px 14px;
  cursor: pointer;
}

.group-option + .group-option {
  border-top: 1px solid #e4eae8;
}

.group-option:hover {
  background: #f6faf8;
}

.group-option input {
  width: 18px;
  min-height: 18px;
}

.group-option strong,
.group-option small {
  display: block;
}

.group-option small {
  margin-top: 4px;
  color: #687872;
  font-weight: 400;
}

.group-option em {
  color: #08715f;
  font-size: 12px;
  font-style: normal;
}

.data-row {
  grid-template-columns: auto minmax(220px, 1.5fr) minmax(220px, 1fr) auto;
}

.data-row > div > strong,
.data-row > div > small {
  display: block;
}

.data-row > div > small {
  margin-top: 5px;
  color: #6a7974;
  font-size: 12px;
}

.row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  color: #53645e;
  font-size: 12px;
}

.danger-link {
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  color: #a03030;
  background: transparent;
  font-weight: 700;
}

.danger-link:hover {
  color: #7e2020;
  text-decoration: underline;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}

.platform-grid span {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 5px;
  color: #727d79;
  background: #f0f3f2;
  font-size: 11px;
}

.platform-grid span.configured {
  color: #08715f;
  background: #e7f7f2;
}

.platform-grid strong {
  font-size: 12px;
}

.scheme-card > small {
  display: block;
  margin-bottom: 14px;
  color: #687872;
}

td strong,
td small {
  display: block;
}

td small {
  margin-top: 3px;
  color: #73817d;
}

.compact .data-row {
  grid-template-columns: auto minmax(180px, 1fr) minmax(180px, auto) auto;
  padding: 12px;
}

.compact .installation-row {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 8px 12px;
}

.compact .installation-row .row-meta {
  grid-column: 2;
  min-width: 0;
}

.compact .installation-row .row-actions {
  grid-column: 1 / -1;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.compact .installation-row .row-actions button {
  min-width: 88px;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .account-row {
    grid-template-columns: auto minmax(160px, 1fr) auto;
  }

  .account-row > dl {
    grid-column: 2 / -1;
    grid-row: 2;
  }
}

@media (max-width: 900px) {
  .nav-item {
    color: #dfeae6;
  }

  .account-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .data-row,
  .compact .data-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .row-meta {
    grid-column: 2 / -1;
  }
}

@media (max-width: 640px) {
  .account-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .account-row > dl {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-row > button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .account-detail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-detail > div + div {
    border-left: 0;
  }

  .account-detail > div:nth-child(even) {
    border-left: 1px solid #e4eae8;
  }

  .account-detail > div:nth-child(n + 3) {
    border-top: 1px solid #e4eae8;
  }

  .data-row,
  .compact .data-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .row-meta,
  .row-actions {
    grid-column: 1 / -1;
  }

  .platform-grid {
    grid-template-columns: 1fr;
  }

  .group-option {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .group-option em {
    grid-column: 2;
  }
}

/* Management console layout hardening. */
.workspace {
  width: min(1500px, 100%);
  margin: 0 auto;
}

.group-option.locked {
  cursor: not-allowed;
  color: #66736e;
  background: #f4f6f5;
}

.group-option.locked:hover {
  background: #f4f6f5;
}

.group-option.locked em {
  max-width: 320px;
  color: #8a5c25;
  text-align: right;
}

.platform-fields-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.platform-fields-grid fieldset {
  align-content: start;
}

.field-help {
  color: #6a7974;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.5;
}

.record-filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr)) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #d8e1de;
  border-radius: 7px;
  background: #fff;
}

.records-table td:nth-child(3) {
  white-space: normal;
  min-width: 260px;
}

.records-table td:first-child small {
  max-width: 165px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.records-table details {
  margin-top: 7px;
}

.records-table summary {
  color: #08715f;
  cursor: pointer;
  font-weight: 700;
}

.task-timeline {
  display: grid;
  gap: 8px;
  min-width: 310px;
  margin: 10px 0 0;
  padding: 10px 10px 10px 28px;
  border-radius: 5px;
  background: #f4f7f6;
  white-space: normal;
}

.task-timeline li {
  padding-left: 3px;
}

.task-timeline time,
.task-timeline strong,
.task-timeline span {
  display: block;
  line-height: 1.5;
}

.task-timeline time,
.task-timeline span {
  color: #64756f;
  font-size: 11px;
}

.action-dialog {
  width: min(520px, calc(100vw - 32px));
}

.dialog-message {
  margin: 0;
  color: #43554e;
  font-size: 13px;
  line-height: 1.7;
}

.platform-grid small {
  line-height: 1.5;
}

@media (max-width: 1280px) {
  .record-filters {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .record-filters > button {
    width: 100%;
  }
}

@media (max-width: 900px) {
  .platform-fields-grid {
    grid-template-columns: 1fr;
  }

  .record-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .record-filters {
    grid-template-columns: 1fr;
  }

  .group-option.locked em {
    max-width: none;
    text-align: left;
  }
}
