:root {
  color-scheme: dark;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #0f172a;
  color: #e2e8f0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px;
}

header {
  margin-bottom: 24px;
}

h1 {
  margin: 0 0 8px;
  font-size: 2rem;
}

p {
  margin: 0;
  color: #cbd5e1;
}

.status-card,
.qr-card,
.summary-card,
.actions-card,
.log-card {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 18px;
}

.status-card div,
.actions-card {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.qr-wrapper {
  display: grid;
  justify-items: center;
}

.qr-wrapper img {
  width: 380px;
  max-width: 90vw;
  height: auto;
  border: 8px solid #ffffff;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.qr-fallback {
  margin-top: 14px;
  color: #94a3b8;
  font-size: 0.94rem;
}

.qr-help {
  margin-top: 10px;
  max-width: 520px;
  text-align: center;
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.5;
}
.qr-help strong { color: #e2e8f0; }

/* Estado de conexión exitosa */
.connected-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 32px 20px;
  text-align: center;
}
.connected-box h3 {
  margin: 6px 0 0;
  font-size: 1.6rem;
  color: #4ade80;
}
.connected-box p {
  max-width: 460px;
  color: #cbd5e1;
}
.check-circle {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
  color: #ffffff;
  font-size: 3.2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px rgba(34, 197, 94, 0.55);
  animation: pop 0.4s ease-out;
}
@keyframes pop {
  0%   { transform: scale(0.4); opacity: 0; }
  60%  { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); }
}
[hidden] { display: none !important; }

pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  background: #0f172a;
  color: #e2e8f0;
}

button {
  border: none;
  border-radius: 14px;
  padding: 14px 20px;
  font-size: 1rem;
  background: #2563eb;
  color: white;
  cursor: pointer;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.send-result {
  width: 100%;
  margin-top: 12px;
  color: #cbd5e1;
}
