/* ============================================
   Variáveis e reset
   ============================================ */

:root {
  --bg: #0c0f14;
  --bg-elevated: #141922;
  --bg-card: #181d26;
  --border: rgba(255, 255, 255, 0.06);
  --border-focus: rgba(45, 212, 191, 0.5);
  --text: #e8eaed;
  --text-muted: #9aa0a6;
  --text-soft: #5f6368;
  --accent: #2dd4bf;
  --accent-dim: #14b8a6;
  --link: #5eead4;
  --link-hover: #2dd4bf;
  --email-bg: #0f1419;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

/* ============================================
   Layout da página (desktop-first)
   ============================================ */

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 2.5rem 2rem 4rem;
}

@media (min-width: 1024px) {
  .page {
    max-width: 1100px;
    padding: 3rem 3rem 5rem;
  }
}

@media (max-width: 640px) {
  .page {
    padding: 2rem 1.25rem 3rem;
  }
}

/* ============================================
   Header
   ============================================ */

.header {
  text-align: center;
  margin-bottom: 2rem;
}

.title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 0.75rem 0;
}

@media (min-width: 1024px) {
  .title {
    font-size: 2.25rem;
  }
}

.instance-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  letter-spacing: 0.02em;
}

/* ============================================
   Main e cards
   ============================================ */

.main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

@media (min-width: 768px) {
  .card {
    padding: 2rem 2.5rem;
  }
}

@media (min-width: 1024px) {
  .card {
    padding: 2.25rem 3rem;
  }
}

.card__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.card__icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--accent);
  background: rgba(45, 212, 191, 0.12);
  border-radius: var(--radius-sm);
}

.card__title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.01em;
}

@media (min-width: 1024px) {
  .card__title {
    font-size: 1.25rem;
  }
}

/* ============================================
   QR Code
   ============================================ */

.card--qr {
  text-align: center;
}

.status {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0 0 1rem 0;
}

.qr-frame {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 280px;
  min-height: 280px;
  padding: 1.25rem;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

@media (min-width: 768px) {
  .qr-frame {
    min-width: 320px;
    min-height: 320px;
    padding: 1.5rem;
  }
}

.qr-image {
  width: 256px;
  height: 256px;
  object-fit: contain;
  display: none;
}

@media (min-width: 768px) {
  .qr-image {
    width: 300px;
    height: 300px;
  }
}

.qr-image[src] {
  display: block;
}

/* ============================================
   Formulário
   ============================================ */

.label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.input {
  width: 100%;
  padding: 0.875rem 1rem;
  font-family: var(--font);
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input::placeholder {
  color: var(--text-soft);
}

.input:hover {
  border-color: rgba(255, 255, 255, 0.1);
}

.input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.15);
}

.input-row {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
  margin-bottom: 0.75rem;
}

.input-row .input {
  flex: 1;
  margin-bottom: 0;
}

.btn {
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn--primary {
  background: var(--accent);
  color: var(--bg);
}

.btn--primary:hover:not(:disabled) {
  background: var(--accent-dim);
}

.calendar-feedback {
  font-size: 0.875rem;
  margin: 0 0 1rem 0;
  min-height: 1.25em;
}

.calendar-feedback--success {
  color: var(--accent);
}

.calendar-feedback--error {
  color: #f87171;
}

.calendar-feedback--info {
  color: var(--text-muted);
}

/* ============================================
   Textos e passos
   ============================================ */

.intro {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0 0 1.25rem 0;
  line-height: 1.65;
}

.step-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin: 1rem 0 0.5rem 0;
}

.step-title:first-of-type {
  margin-top: 0;
}

.steps {
  margin: 0 0 1rem 0;
  padding-left: 1.375rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.7;
}

@media (min-width: 1024px) {
  .steps {
    font-size: 1rem;
    padding-left: 1.5rem;
  }
}

.steps li {
  margin-bottom: 0.5rem;
}

.steps li:last-child {
  margin-bottom: 0;
}

.steps strong {
  color: var(--text);
  font-weight: 500;
}

.steps code {
  font-size: 0.8125rem;
  padding: 0.15em 0.4em;
  background: var(--bg);
  border-radius: 4px;
  color: var(--accent);
  font-family: ui-monospace, monospace;
}

a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

a:hover {
  color: var(--link-hover);
  border-bottom-color: var(--link-hover);
}

/* ============================================
   E-mail em destaque
   ============================================ */

.email-box {
  padding: 1rem 1.25rem;
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 0.9375rem;
  color: var(--accent);
  background: var(--email-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin: 0.5rem 0 1rem 0;
  word-break: break-all;
  letter-spacing: 0.01em;
}

/* ============================================
   Imagens de instrução (maiores em desktop)
   ============================================ */

.instruction-image {
  width: 100%;
  max-width: 100%;
  min-height: 280px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-top: 1.25rem;
  display: block;
  background: var(--bg);
  object-fit: contain;
}

@media (min-width: 768px) {
  .instruction-image {
    min-height: 380px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (min-width: 1024px) {
  .instruction-image {
    min-height: 420px;
    max-width: 100%;
  }
}

/* ============================================
   Footer
   ============================================ */

.footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer p {
  font-size: 0.8125rem;
  color: var(--text-soft);
  margin: 0;
}
