.ops-command-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 1px;
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid var(--suite-line);
  border-radius: 6px;
  background: var(--suite-line);
}

.ops-command-metric {
  min-width: 0;
  padding: 14px;
  background: var(--suite-surface);
}

.ops-command-metric span,
.ops-command-metric small {
  display: block;
  color: var(--suite-muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.ops-command-metric strong {
  display: block;
  margin: 4px 0 2px;
  color: var(--suite-ink);
  font-size: 1.55rem;
  line-height: 1;
}

.ops-command-metric[data-tone="critical"] {
  box-shadow: inset 0 3px 0 var(--suite-danger);
}

.ops-command-metric[data-tone="warning"] {
  box-shadow: inset 0 3px 0 var(--suite-warning);
}

.ops-command-metric[data-tone="active"] {
  box-shadow: inset 0 3px 0 var(--suite-accent);
}

.ops-command-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.3fr) minmax(280px, 0.85fr);
  gap: 20px;
}

.ops-command-section {
  min-width: 0;
}

.ops-command-section + .ops-command-section {
  padding-left: 20px;
  border-left: 1px solid var(--suite-line);
}

.ops-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px 160px;
  gap: 8px;
  margin-bottom: 10px;
}

.ops-toolbar input,
.ops-toolbar select {
  width: 100%;
}

.ops-exception-table td {
  vertical-align: top;
}

.ops-exception-title {
  display: grid;
  gap: 3px;
  min-width: 210px;
}

.ops-exception-title span,
.ops-exception-meta {
  color: var(--suite-muted);
  font-size: 0.74rem;
  line-height: 1.35;
}

.ops-severity {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid var(--suite-line);
  border-radius: 4px;
  background: var(--suite-surface-2);
  color: var(--suite-ink);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.ops-severity[data-severity="Critical"] {
  border-color: #d9a39d;
  background: #fae9e7;
  color: #8f2d23;
}

.ops-severity[data-severity="High"] {
  border-color: #ddc18f;
  background: #fff4dc;
  color: #7d520d;
}

.ops-severity[data-severity="Normal"] {
  border-color: #a9c6c8;
  background: #e9f4f4;
  color: #07585d;
}

.ops-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 150px;
}

.ops-row-actions .secondary-button,
.ops-row-actions .primary-button {
  min-height: 32px;
  padding: 6px 9px;
  font-size: 0.72rem;
}

.ops-upcoming-list {
  display: grid;
  gap: 0;
  border-block: 1px solid var(--suite-line);
}

.ops-upcoming-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 11px;
  padding: 12px 0;
  border-bottom: 1px solid var(--suite-line);
}

.ops-upcoming-item:last-child {
  border-bottom: 0;
}

.ops-upcoming-time {
  color: var(--suite-accent-dark);
  font-size: 0.72rem;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.ops-upcoming-time strong {
  display: block;
  font-size: 1rem;
}

.ops-upcoming-body {
  min-width: 0;
}

.ops-upcoming-body strong,
.ops-upcoming-body span {
  display: block;
}

.ops-upcoming-body span {
  margin-top: 3px;
  color: var(--suite-muted);
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}

.ops-input-unit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--suite-line-strong);
  border-radius: 4px;
  background: #ffffff;
}

.ops-input-unit input {
  border: 0 !important;
  border-radius: 0 !important;
}

.ops-input-unit > span {
  padding: 0 10px;
  color: var(--suite-muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.ops-register-form {
  padding: 16px;
}

.ops-register-entry {
  margin: 14px 0 18px;
  border: 1px solid var(--suite-line);
  border-left: 3px solid var(--suite-accent);
  border-radius: 5px;
  background: var(--suite-surface-2);
}

.ops-register-entry[hidden] {
  display: none !important;
}

.ops-status {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 3px 7px;
  border: 1px solid var(--suite-line);
  border-radius: 4px;
  background: var(--suite-surface-2);
  color: var(--suite-muted);
  font-size: 0.7rem;
  font-weight: 800;
}

.ops-status[data-tone="danger"] {
  border-color: #d9a39d;
  background: #fae9e7;
  color: #8f2d23;
}

.ops-status[data-tone="warning"] {
  border-color: #ddc18f;
  background: #fff4dc;
  color: #7d520d;
}

.ops-status[data-tone="success"] {
  border-color: #a7cbbb;
  background: #e9f5ef;
  color: #18543c;
}

.ops-empty-row td {
  padding: 26px 12px;
  color: var(--suite-muted);
  text-align: center;
}

.ops-restore-section {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--suite-line);
  border-radius: 6px;
  background: var(--suite-surface-2);
}

.ops-restore-form {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

@media (max-width: 1250px) {
  .ops-command-metrics {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }

  .ops-command-grid {
    grid-template-columns: 1fr;
  }

  .ops-command-section + .ops-command-section {
    padding-top: 18px;
    padding-left: 0;
    border-top: 1px solid var(--suite-line);
    border-left: 0;
  }
}

@media (max-width: 760px) {
  .ops-command-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ops-command-metric {
    padding: 12px 10px;
  }

  .ops-command-metric strong {
    font-size: 1.3rem;
  }

  .ops-toolbar {
    grid-template-columns: 1fr;
  }

  .ops-row-actions {
    min-width: 120px;
  }

  .ops-restore-section {
    padding: 12px;
  }

  .ops-register-form {
    padding: 12px;
  }
}

@media print {
  .ops-toolbar,
  .ops-row-actions,
  .ops-register-form,
  .ops-restore-form,
  #opsRefreshBtn {
    display: none !important;
  }
}
