:root {
  --navy: #163461;
  --ink: #25344d;
  --muted: #66758b;
  --line: #d8e0ea;
  --panel: #f5f7fb;
  --field: #ffffff;
  --gold: #f5b51b;
  --blue: #2f7fc6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: #eef3f8;
  font-family: Inter, Arial, Helvetica, sans-serif;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 24px;
  color: white;
  background: var(--navy);
}

.topbar img {
  width: 132px;
  max-height: 42px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.topbar h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0;
}

.topbar p {
  margin: 4px 0 0;
  color: #dce6f5;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(360px, 470px) 1fr;
  gap: 18px;
  height: calc(100vh - 78px);
  padding: 18px;
}

.form-panel,
.preview-panel {
  min-height: 0;
  border: 1px solid var(--line);
  background: white;
}

.form-panel {
  overflow: auto;
  padding: 18px 18px 92px;
}

.form-panel section {
  padding: 0 0 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

h2 {
  margin: 0 0 12px;
  color: var(--navy);
  font-size: 16px;
  letter-spacing: 0;
}

.section-title-row,
.room-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.small-button,
.icon-button {
  padding: 7px 10px;
  font-size: 12px;
}

.icon-button {
  width: 32px;
  height: 32px;
  padding: 0;
  color: #7b2636;
}

.rooms-list {
  display: grid;
  gap: 12px;
}

.room-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.room-card-header {
  margin-bottom: 10px;
  color: var(--navy);
}

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

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 11px;
  color: var(--ink);
  background: var(--field);
  font: inherit;
  font-weight: 500;
}

textarea {
  resize: vertical;
}

button {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 14px;
  color: var(--navy);
  background: #f7f9fc;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  border-color: #b6c5d8;
}

button.primary {
  color: white;
  border-color: var(--navy);
  background: var(--navy);
}

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

.inline-action {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.message {
  min-height: 18px;
  margin: -4px 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.message.warn {
  color: #9a6300;
}

.actions {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 12px;
  background: white;
}

.preview-panel {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.preview-header h2 {
  margin: 0;
}

#preview-status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: white;
}

@media (max-width: 980px) {
  .workspace {
    grid-template-columns: 1fr;
    height: auto;
  }

  .preview-panel {
    height: 78vh;
  }
}

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

  .two,
  .inline-action {
    grid-template-columns: 1fr;
  }
}
