:root {
  --primary: #1f3cad;          /* azul royal Top Transfer */
  --primary-hover: #182f8a;
  --primary-soft: #eef1fb;     /* fundo azul bem claro */
  --navy: #16235f;             /* azul escuro do logo */
  --bg: #f5f6fa;
  --surface: #ffffff;
  --border: #e3e6ee;
  --text: #1f2937;
  --text-muted: #6b7280;
  --warning: #b7791f;
  --error: #dc2626;
  --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --shadow: 0 1px 3px rgba(22, 35, 95, 0.06), 0 1px 2px rgba(22, 35, 95, 0.04);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

.app-wrapper {
  display: flex;
  flex-direction: column;
  max-width: 600px;
  margin: 0 auto;
  padding: 20px 16px;
  gap: 14px;
}

/* Brand header */
.brand {
  display: flex;
  align-items: center;
  padding: 2px 0 4px;
}
.brand-img {
  height: 34px;
  width: auto;
  display: block;
}

/* Alerts */
.alert {
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 12px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.alert-dev {
  background: var(--primary-soft);
  border: 1px solid #c9d2f3;
  color: var(--primary);
}
.alert-warning {
  background: #fdf6e7;
  border: 1px solid #f0dca6;
  color: var(--warning);
}
.alert-error {
  background: #fdeaea;
  border: 1px solid #f5c4c4;
  color: var(--error);
}

/* Contact header */
.contact-header {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow);
}
.contact-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}
.contact-info .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.contact-info h3 { font-size: 16px; font-weight: 700; color: var(--navy); }

/* Panels */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.panel-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* Form */
label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.field-group { display: flex; flex-direction: column; gap: 14px; }

select {
  width: 100%;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 11px 12px;
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(31, 60, 173, 0.1);
}

/* Modelo toggle — estilo segmentado igual ao checkout */
.toggle-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 2px solid var(--primary);
  border-radius: 10px;
  overflow: hidden;
}
.toggle-option {
  padding: 14px;
  text-align: center;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
  transition: all 0.2s;
  font-weight: 700;
  font-size: 15px;
}
.toggle-option .sub {
  display: block;
  font-size: 11px;
  font-weight: 400;
  opacity: 0.85;
  margin-top: 3px;
}
.toggle-option:first-child { border-right: 2px solid var(--primary); }
.toggle-option.active {
  background: #fff;
  color: var(--primary);
}
.toggle-option.active .sub { color: var(--text-muted); opacity: 1; }

/* Button */
.btn-primary {
  width: 100%;
  padding: 13px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

/* Copy feedback */
.copy-feedback {
  background: #e8f6ee;
  border: 1px solid #aee0c2;
  color: #1f8a4c;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  margin-top: 10px;
}

/* Spinner */
.spinner-wrap {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  height: 100vh; gap: 12px; color: var(--text-muted);
}
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }
