:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --panel: #ffffff;
  --ink: #17202a;
  --muted: #657080;
  --line: #d9dee8;
  --brand: #4157d8;
  --ok: #1f9d6a;
  --warn: #c98015;
}

* {
  box-sizing: border-box;
}

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

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(1.55rem, 4vw, 2.35rem);
  letter-spacing: 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--brand);
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.status-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 24px 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--ok);
  background: var(--panel);
}

.status-band div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-band p {
  margin: 0;
  color: var(--muted);
}

.save-confirmation {
  margin-bottom: 0;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--ok);
}

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

.module-card {
  min-height: 132px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.link-card {
  color: inherit;
  text-decoration: none;
}

.config-form {
  display: grid;
  gap: 18px;
  margin: 24px 0;
}

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

.field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  font: inherit;
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.wide {
  width: 100%;
}

.module-index {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #f2f4ff;
  color: var(--brand);
  font-weight: 800;
}

.module-card h2 {
  margin: 14px 0 6px;
  font-size: 1rem;
  letter-spacing: 0;
}

.module-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 680px) {
  .topbar,
  .status-band {
    align-items: flex-start;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }
}
