:root {
  --bg: #f4f7f6;
  --surface: #ffffff;
  --surface-2: #eef5f3;
  --text: #172033;
  --muted: #657283;
  --line: #dbe3e1;
  --primary: #0f766e;
  --accent: #2563eb;
  --danger: #b42318;
  --shadow: 0 18px 55px rgba(23, 32, 51, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea,
select {
  font: inherit;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 250px;
  padding: 22px 16px;
  background: #10231f;
  color: #f8fbfa;
}

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

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 8px;
  background: #b7eadf;
  color: #10231f;
  font-weight: 800;
}

.brand small {
  display: block;
  color: #9bb5ae;
  margin-top: 2px;
}

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

.sidebar a {
  color: #dbe7e3;
  text-decoration: none;
  padding: 11px 12px;
  border-radius: 7px;
}

.sidebar a.active,
.sidebar a:hover {
  background: rgba(255, 255, 255, 0.11);
  color: #ffffff;
}

.shell {
  margin-left: 250px;
  padding: 28px;
}

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

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
  line-height: 1.15;
}

h2 {
  font-size: 16px;
}

.topbar p,
.muted {
  color: var(--muted);
}

.topbar-actions,
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.button {
  border: 0;
  border-radius: 7px;
  min-height: 38px;
  padding: 0 14px;
  background: var(--primary);
  color: #ffffff;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.button.secondary {
  color: var(--text);
  background: var(--surface-2);
}

.button.danger {
  background: var(--danger);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.metrics,
.grid,
.plans {
  display: grid;
  gap: 16px;
}

.metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
}

.grid.two {
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr);
  margin-bottom: 16px;
}

.panel,
.metric,
.plan {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 18px;
}

.alert {
  margin: 16px 0;
  padding: 12px 14px;
  border: 1px solid #f6c76f;
  border-radius: 8px;
  background: #fff7e6;
  color: #724b00;
}

.metric {
  padding: 16px;
}

.metric span {
  color: var(--muted);
  display: block;
  margin-bottom: 8px;
}

.metric strong {
  font-size: 26px;
}

.panel-heading {
  margin-bottom: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: #334155;
  margin-bottom: 12px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--text);
  padding: 9px 10px;
}

textarea {
  resize: vertical;
  min-height: 190px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

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

.checkbox input {
  width: auto;
}

.table-wrap {
  overflow: auto;
}

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

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  margin: 0 4px 4px 0;
  border-radius: 999px;
  background: #e8f3ff;
  color: #174ea6;
  font-size: 12px;
}

.checklist {
  margin: 0;
  padding-left: 22px;
}

.checklist li {
  margin: 8px 0;
}

.checklist .done {
  color: var(--primary);
}

.list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  background: var(--surface-2);
  border-radius: 7px;
}

.preflight {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.preflight li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px;
  border-radius: 7px;
  background: var(--surface-2);
}

.preflight strong {
  color: var(--primary);
}

.preflight .missing strong {
  color: var(--danger);
}

.plans {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.plan {
  padding: 18px;
  display: grid;
  gap: 12px;
}

.plan strong {
  font-size: 22px;
}

.plan ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.narrow {
  max-width: 620px;
}

.narrow + .narrow {
  margin-top: 16px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  background: #172033;
  color: #ffffff;
  padding: 12px 14px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

@media (max-width: 900px) {
  .sidebar {
    position: static;
    width: auto;
  }

  .shell {
    margin-left: 0;
    padding: 18px;
  }

  .topbar,
  .grid.two {
    grid-template-columns: 1fr;
    display: grid;
  }

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

@media (max-width: 560px) {
  .metrics,
  .form-row {
    grid-template-columns: 1fr;
  }
}
