:root {
  --bg: #f7fbfd;
  --panel: #ffffff;
  --text: #172033;
  --muted: #64748b;
  --line: #dbe7ee;
  --accent: #12a8b8;
  --accent-dark: #087887;
  --accent-soft: #e9fbfd;
  --navy: #111827;
  --danger: #b42318;
  --shadow: 0 18px 45px rgba(15, 56, 72, .08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(180deg, #ffffff 0%, var(--bg) 42%, #ffffff 100%);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 24px;
}

.hero,
.workspace {
  display: grid;
  gap: 20px;
}

.hero {
  grid-template-columns: 1fr auto;
  align-items: end;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(18, 168, 184, .16);
  padding-bottom: 22px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1.25;
}

h1 {
  max-width: 780px;
  color: var(--navy);
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 900;
}

h2 {
  font-size: 20px;
}

.lead {
  max-width: 720px;
  margin: 12px 0 0;
  color: #526176;
  font-size: 17px;
  line-height: 1.8;
}

.status-card,
.panel {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.status-card {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 190px;
  padding: 14px 16px;
  border-radius: 8px;
  color: var(--accent-dark);
  font-weight: 700;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.workspace {
  grid-template-columns: minmax(0, 1fr) 420px;
  align-items: start;
}

.panel {
  border-radius: 10px;
  padding: 22px;
}

.controls {
  display: grid;
  gap: 18px;
}

.type-fields {
  display: grid;
  gap: 16px;
}

.hidden {
  display: none;
}

.grid-2,
.grid-3 {
  display: grid;
  gap: 14px;
}

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

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

.design-block {
  display: grid;
  gap: 16px;
  border: 1px solid rgba(18, 168, 184, .22);
  border-radius: 10px;
  padding: 16px;
  background: linear-gradient(180deg, #ffffff 0%, var(--accent-soft) 100%);
}

.section-title {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: end;
  color: var(--accent-dark);
  font-weight: 800;
}

.section-title small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-align: right;
}

.design-group {
  display: grid;
  gap: 8px;
}

.swatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(46px, 46px));
  gap: 8px;
}

.swatch {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  min-height: 46px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 2px;
  background: #f8fafc;
  cursor: pointer;
}

.swatch:hover {
  border-color: var(--accent);
  background: #fff;
}

.swatch.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(18, 168, 184, .18);
}

.swatch canvas {
  width: 42px;
  height: 42px;
}

.field {
  display: grid;
  gap: 7px;
}

label,
.check {
  color: #303846;
  font-size: 14px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid #c8d8e2;
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  background: #fff;
  font: inherit;
  accent-color: var(--accent);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(18, 168, 184, .14);
  outline: 0;
}

textarea {
  resize: vertical;
}

input[type="color"] {
  padding: 4px;
}

input[type="range"] {
  padding-inline: 0;
}

.check {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 44px;
}

.check input {
  width: 18px;
  min-height: 18px;
}

.divider {
  height: 1px;
  background: var(--line);
}

.hint,
.direct-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.hint.warn {
  color: var(--danger);
  font-weight: 700;
}

.preview-panel {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 16px;
}

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

.badge {
  max-width: 150px;
  border: 1px solid rgba(18, 168, 184, .28);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.qr-stage {
  display: grid;
  place-items: center;
  min-height: 360px;
  border: 1px dashed #bdd8e5;
  border-radius: 8px;
  background: #fbfcfd;
  padding: 18px;
}

canvas {
  display: block;
  width: min(100%, 340px);
  height: auto;
  aspect-ratio: 1;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  color: #fff;
  background: var(--accent);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  background: var(--accent-dark);
}

button.secondary {
  border: 1px solid #b6cbd7;
  color: var(--text);
  background: #fff;
}

button.secondary:hover {
  background: var(--accent-soft);
}

.site-footer {
  border-top: 1px solid rgba(18, 168, 184, .18);
  background: #ffffff;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 28px;
  color: var(--muted);
  font-size: 13px;
}

.footer-inner strong {
  display: block;
  color: var(--navy);
  font-size: 18px;
  margin-bottom: 4px;
}

.rights {
  display: grid;
  gap: 4px;
  text-align: right;
}

.rights a {
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: none;
}

.rights a:hover {
  text-decoration: underline;
}

@media (max-width: 920px) {
  .hero,
  .workspace,
  .grid-2,
  .grid-3,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .preview-panel {
    position: static;
  }

  .rights {
    text-align: left;
  }
}

@media (max-width: 520px) {
  .shell {
    width: min(100% - 20px, 1180px);
    padding: 18px 0;
  }

  .panel {
    padding: 16px;
  }

  .actions {
    grid-template-columns: 1fr;
  }
}
