.dashboard-page {
  background:
    linear-gradient(180deg, rgba(199, 234, 216, 0.34), transparent 360px),
    var(--paper);
}

.hub-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  gap: clamp(24px, 5vw, 64px);
  align-items: end;
  padding: clamp(36px, 7vw, 72px) clamp(18px, 5vw, 64px) 28px;
}

.hub-hero h1 {
  margin: 0;
  max-width: 980px;
  font-size: clamp(2.6rem, 7vw, 5.8rem);
  line-height: 1;
  letter-spacing: 0;
}

.status-panel,
.input-panel,
.output-panel {
  border: 1px solid rgba(22, 24, 23, 0.1);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 20px 56px rgba(26, 31, 28, 0.09);
}

.status-panel {
  display: grid;
  gap: 10px;
  padding: 22px;
  border-radius: 8px;
}

.status-panel strong {
  font-size: 1.45rem;
}

.status-label,
#saved-label {
  color: var(--muted);
  font-weight: 800;
}

.hub-layout {
  display: grid;
  grid-template-columns: minmax(310px, 430px) minmax(0, 1fr);
  gap: 22px;
  padding: 0 clamp(18px, 5vw, 64px) 64px;
}

.input-panel,
.output-panel {
  border-radius: 8px;
  padding: clamp(18px, 3vw, 28px);
}

.input-panel {
  position: sticky;
  top: 88px;
  align-self: start;
  display: grid;
  gap: 16px;
}

.panel-heading h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.05;
}

label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
  font-weight: 600;
  letter-spacing: 0;
}

textarea {
  resize: vertical;
  line-height: 1.45;
}

input:focus,
textarea:focus,
.tab:focus {
  outline: 3px solid rgba(39, 105, 83, 0.24);
  border-color: var(--green);
}

.hub-actions,
.toolbar,
.tabs,
.summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.output-panel {
  min-height: 760px;
}

.summary-strip {
  margin: 18px 0;
}

.summary-strip span {
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbf8;
  color: #3f4b45;
  font-weight: 800;
}

.toolbar {
  justify-content: flex-end;
  margin-bottom: 18px;
}

.tabs {
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.tab {
  cursor: pointer;
  border: 0;
  border-bottom: 4px solid transparent;
  background: transparent;
  padding: 12px 10px;
  color: var(--muted);
  font: inherit;
  font-weight: 900;
}

.tab.active {
  color: var(--green);
  border-bottom-color: var(--green);
}

.tab-output {
  display: grid;
  gap: 14px;
}

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

.output-card h3 {
  margin: 0 0 10px;
  font-size: 1.22rem;
}

.output-card p {
  margin: 0 0 12px;
  color: #3d4842;
  line-height: 1.55;
}

.output-card pre {
  overflow-x: auto;
  white-space: pre-wrap;
  margin: 12px 0 0;
  border: 1px solid #e7e3d7;
  border-radius: 8px;
  padding: 14px;
  background: #fffaf0;
  color: #202722;
  font: 0.92rem/1.45 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.pill-row span {
  padding: 7px 9px;
  border-radius: 8px;
  background: #eef7f1;
  color: var(--green);
  font-weight: 900;
  font-size: 0.88rem;
}

.empty-state {
  min-height: 420px;
  display: grid;
  place-items: center;
  border: 1px dashed #cdd5cd;
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  padding: 24px;
}

@media (max-width: 980px) {
  .hub-hero,
  .hub-layout {
    grid-template-columns: 1fr;
  }

  .input-panel {
    position: static;
  }
}

@media (max-width: 680px) {
  .toolbar {
    justify-content: flex-start;
  }

  .hub-actions .button,
  .toolbar .button {
    width: 100%;
  }
}
