:root {
  color-scheme: dark;
  --bg: #060608;
  --panel: rgba(255, 255, 255, 0.04);
  --surface: rgba(255, 255, 255, 0.06);
  --border: rgba(242, 178, 51, 0.18);
  --text: #f3f1ef;
  --hint: #b9b6c5;
  --accent: #f2b233;
  --accent-soft: rgba(242, 178, 51, 0.16);
  --danger: #ff6b6b;
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, rgba(242, 178, 51, 0.08), transparent 30%), var(--bg);
  color: var(--text);
}

body {
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
}

.studio-shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.studio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.5rem;
}

.studio-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 1rem;
}

.studio-brand {
  font-size: 1rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

.studio-main {
  display: grid;
  gap: 1.5rem;
}

.studio-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.studio-card-header h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.8rem);
  letter-spacing: -0.03em;
}

.studio-lead {
  margin: 1rem 0 0;
  max-width: 46rem;
  color: var(--hint);
}

.studio-status {
  margin-top: 1.75rem;
  min-height: 2.6rem;
  padding: 0.85rem 1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.studio-status[data-status="pending"] {
  color: #f9f2c7;
}

.studio-status[data-status="approved"] {
  color: #b6f7b1;
}

.studio-status[data-status="expired"],
.studio-status[data-status="rejected"],
.studio-status[data-status="error"] {
  color: var(--danger);
}

.studio-qr-panel {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.75rem;
}

.studio-loading-panel {
  display: grid;
  justify-items: center;
  gap: 1rem;
  margin-top: 1.75rem;
  padding: 2rem 1rem;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(242, 178, 51, 0.14);
  color: var(--hint);
}

.studio-loading-panel p {
  margin: 0;
}

.studio-spinner {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 4px solid rgba(242, 178, 51, 0.16);
  border-top-color: var(--accent);
  animation: studio-spin 0.8s linear infinite;
}

.studio-qr-copy {
  display: grid;
  gap: 0.45rem;
}

.studio-qr-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.studio-qr-caption {
  margin: 0;
  color: var(--hint);
}

.studio-qr-frame {
  width: min(100%, 320px);
  aspect-ratio: 1 / 1;
  border-radius: 28px;
  background: #0c0c0c;
  padding: 1rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(242, 178, 51, 0.14);
}

#qrCanvas {
  width: 100%;
  height: auto;
  display: block;
}

.studio-request-meta {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

.studio-request-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--hint);
  font-size: 0.95rem;
}

.studio-request-row span:last-child {
  color: var(--text);
  word-break: break-all;
}

.studio-instructions {
  margin-top: 1.75rem;
  padding: 1.25rem 1rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--hint);
}

.studio-actions,
.studio-connected-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

.button {
  border: none;
  border-radius: 999px;
  padding: 0.95rem 1.4rem;
  font-weight: 700;
  color: #050505;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

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

.button-primary {
  background: linear-gradient(135deg, #f2b233, #f0a528);
  color: #080808;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.button-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text);
}

.studio-note {
  margin-top: 1.75rem;
  color: var(--hint);
  font-size: 0.95rem;
}

.studio-connected {
  margin-top: 2rem;
  padding: 1.75rem;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.studio-connected-badge {
  display: inline-flex;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: rgba(42, 137, 94, 0.18);
  color: #b6f7b1;
  font-weight: 700;
}

.studio-connected-box {
  margin-top: 1.25rem;
  padding: 1rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.studio-connected-label {
  margin: 0 0 0.45rem;
  color: var(--hint);
  font-size: 0.95rem;
}

.studio-session-id {
  margin: 0;
  color: var(--text);
  word-break: break-all;
}

.hidden {
  display: none !important;
}

@keyframes studio-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 720px) {
  .studio-shell {
    padding: 1.25rem;
  }

  .studio-card {
    padding: 1.5rem;
  }

  .studio-qr-frame {
    width: 100%;
    padding: 0.85rem;
  }

  .studio-request-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
