:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --line: #d9dee7;
  --text: #17202f;
  --muted: #657084;
  --brand: #0f766e;
  --brand-strong: #115e59;
  --soft: #eef6f5;
  --ok: #16803c;
  --warn: #9a6c00;
  --error: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.app-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 24px;
  display: grid;
  gap: 18px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 32px;
  line-height: 1.1;
}

h2 {
  font-size: 18px;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 12px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--warn);
  flex: 0 0 auto;
}

.status-item.is-ok .status-dot {
  background: var(--ok);
}

.status-item strong,
.status-item span {
  display: block;
}

.status-item span {
  color: var(--muted);
  font-size: 13px;
}

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

.main-column,
.side-column {
  display: grid;
  align-content: start;
  gap: 18px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

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

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

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
}

input:focus,
select:focus {
  outline: 2px solid rgba(15, 118, 110, 0.16);
  border-color: rgba(15, 118, 110, 0.45);
}

button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  padding: 8px 13px;
  background: var(--brand);
  color: #ffffff;
  cursor: pointer;
  white-space: nowrap;
}

button:hover {
  background: var(--brand-strong);
}

button.secondary {
  background: #edf0f4;
  color: var(--text);
}

button.secondary:hover {
  background: #dfe4ec;
}

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

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 11px 9px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 13px;
}

td.actions-cell {
  white-space: normal;
}

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

.details-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.details-list div {
  display: grid;
  gap: 4px;
}

.details-list dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.details-list dd {
  margin: 0;
}

.muted {
  color: var(--muted);
}

.notice {
  min-width: 240px;
  max-width: 420px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 14px;
}

.notice.hidden {
  display: none;
}

.notice.info {
  background: #eef4ff;
  color: #163a8a;
  border-color: #cddafc;
}

.notice.success {
  background: #edfdf3;
  color: var(--ok);
  border-color: #b7ebc8;
}

.notice.error {
  background: #fff1f0;
  color: var(--error);
  border-color: #f5c2c7;
}

@media (max-width: 1000px) {
  .layout,
  .status-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
  }
}
