:root {
  color-scheme: light;
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #eef2f6;
  --ink: #18212f;
  --muted: #667085;
  --line: #d7dde6;
  --brand: #008b7a;
  --brand-dark: #00675f;
  --brand-soft: #f1f8f7;
  --blue: #2563eb;
  --red: #dc2626;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
  --soft-shadow: 0 14px 36px rgba(20, 32, 45, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: linear-gradient(135deg, #08111d 0%, #101b2b 58%, #052f2c 100%);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.qr-app {
  width: min(100%, 1080px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.brand-band {
  min-height: 156px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 26px 30px;
  background: #0b1220;
  border-bottom: 1px solid rgba(20, 184, 166, 0.28);
  color: #ffffff;
}

.brand-logo {
  width: 172px;
  max-width: min(172px, 52vw);
  height: auto;
  display: block;
  object-fit: contain;
}

.brand-copy {
  min-width: 0;
  text-align: right;
}

.brand-copy span {
  display: block;
  color: #aeb9c8;
  font-size: 0.88rem;
  font-weight: 700;
}

.brand-copy strong {
  display: block;
  margin-top: 4px;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  letter-spacing: 0;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.84fr);
  gap: 28px;
  padding: clamp(22px, 4vw, 34px);
  background: var(--bg);
}

.generator-panel,
.preview-panel {
  min-width: 0;
}

.generator-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(30px, 7vw, 86px);
  padding: 4px 0;
}

.hero-copy {
  max-width: 650px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 16px;
  font-size: clamp(2.25rem, 5vw, 4.25rem);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1.45rem;
  letter-spacing: 0;
}

.lede {
  max-width: 590px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.08rem);
  line-height: 1.6;
}

.url-form {
  display: grid;
  gap: 9px;
}

label {
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.input-row,
.action-row,
.preview-header {
  display: flex;
  align-items: center;
}

.input-row {
  min-height: 54px;
  gap: 10px;
}

input {
  width: 100%;
  min-width: 0;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 13px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(0, 139, 122, 0.14);
}

.primary-button,
.secondary-button,
.ghost-button {
  min-height: 40px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    opacity 160ms ease;
}

.primary-button {
  min-height: 54px;
  padding: 9px 17px;
  color: #ffffff;
  border: 1px solid var(--brand);
  background: var(--brand);
}

.primary-button:hover,
.primary-button:focus-visible {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}

.secondary-button {
  flex: 1 1 145px;
  padding: 9px 13px;
  color: var(--ink);
  border: 1px solid var(--line);
  background: var(--surface);
}

.secondary-button:hover,
.secondary-button:focus-visible {
  border-color: #aeb9c8;
  background: #ffffff;
}

.ghost-button {
  flex: 0 0 auto;
  padding: 9px 13px;
  color: #465467;
  border: 1px solid transparent;
  background: transparent;
}

.ghost-button:hover,
.ghost-button:focus-visible {
  border-color: var(--line);
  background: #ffffff;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.button-icon {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.button-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.form-message {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.form-message.is-error {
  color: var(--red);
}

.form-message.is-success {
  color: var(--brand-dark);
}

.preview-panel {
  display: grid;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--soft-shadow);
}

.preview-header {
  justify-content: space-between;
  gap: 16px;
}

.status-pill {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #b9e2dc;
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.qr-frame {
  display: grid;
  place-items: center;
  padding: clamp(14px, 4vw, 24px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(45deg, rgba(0, 139, 122, 0.08) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(0, 139, 122, 0.08) 25%, transparent 25%),
    #f8fafc;
  background-size: 18px 18px;
}

.qr-surface {
  width: clamp(220px, 42vw, 316px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 1px solid #e3e8ef;
  border-radius: var(--radius);
  background: #ffffff;
}

.qr-surface canvas,
.qr-surface img {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.qr-surface canvas {
  image-rendering: pixelated;
}

.qr-placeholder {
  width: min(100%, 250px);
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  opacity: 0.86;
}

.qr-placeholder span {
  border-radius: 6px;
  background: #d7dde6;
}

.qr-placeholder span:nth-child(1),
.qr-placeholder span:nth-child(4),
.qr-placeholder span:nth-child(6),
.qr-placeholder span:nth-child(11),
.qr-placeholder span:nth-child(13),
.qr-placeholder span:nth-child(16) {
  background: var(--ink);
}

.qr-placeholder span:nth-child(3),
.qr-placeholder span:nth-child(9),
.qr-placeholder span:nth-child(14) {
  background: var(--brand);
}

.qr-placeholder span:nth-child(8),
.qr-placeholder span:nth-child(15) {
  background: var(--blue);
}

.qr-meta {
  min-height: 24px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.action-row {
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 860px) {
  .auth-screen {
    padding: 16px;
  }

  .brand-band {
    min-height: auto;
  }

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

  .generator-panel {
    gap: 28px;
  }

  .input-row {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-button {
    width: 100%;
  }

  .qr-surface {
    width: min(100%, 316px);
  }
}

@media (max-width: 520px) {
  .auth-screen {
    padding: 10px;
  }

  .brand-band {
    flex-direction: column;
    justify-content: center;
    padding: 26px 20px 24px;
    text-align: center;
  }

  .brand-copy {
    text-align: center;
  }

  .workspace {
    padding: 20px;
  }

  .preview-panel {
    padding: 16px;
  }

  .preview-header {
    align-items: stretch;
    flex-direction: column;
  }

  .status-pill {
    width: 100%;
    justify-content: center;
  }

  h1 {
    font-size: 2.1rem;
  }

  .qr-surface {
    padding: 14px;
  }

  .secondary-button,
  .ghost-button {
    width: 100%;
    flex-basis: 100%;
  }
}
