/* -------------------------------------------------
   Estilos globales
------------------------------------------------- */

:root {
  --color-bg: #f6f7f9;
  --color-surface: #ffffff;
  --color-border: rgba(0, 0, 0, 0.08);
  --color-text: #1c1c1c;
  --color-muted: #4d4d4d;
  --color-primary: #0b5ed7;
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.08);
  --radius: 16px;
  --max-width: 420px;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu,
    "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text);
  background-color: var(--color-bg);
  text-rendering: optimizeLegibility;
}

/* -------------------------------------------------
   Layout principal
------------------------------------------------- */

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
}

.card {
  width: min(100%, var(--max-width));
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.25rem 1.75rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.card__header {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

/* -------------------------------------------------
   Marca / logo de texto
------------------------------------------------- */

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand__logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0b5ed7 0%, #1c8cff 100%);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.brand__name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-text);
}

.brand__tagline {
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* -------------------------------------------------
   Tipografía
------------------------------------------------- */

.title {
  margin: 0;
  font-size: 1.75rem;
  letter-spacing: -0.02em;
}

.lead {
  color: var(--color-muted);
  margin: 0;
  font-size: 1rem;
}

/* -------------------------------------------------
   Widget + mensajes
------------------------------------------------- */

.widget-area {
  display: grid;
  place-items: center;
  padding: 0.5rem 0;
}

.widget-placeholder {
  width: 250px;
  max-width: 100%;
  min-height: 70px;
  display: grid;
  place-items: center;
}

.support-text {
  font-size: 0.9rem;
  color: var(--color-muted);
  text-align: center;
}

.error-message {
  background: rgba(220, 53, 69, 0.12);
  border: 1px solid rgba(220, 53, 69, 0.35);
  color: #b02a37;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.35;
  display: none;
}

.error-message[hidden] {
  display: none;
}

.error-message:not([hidden]) {
  display: block;
}

/* -------------------------------------------------
   Responsive
------------------------------------------------- */

@media (max-width: 380px) {
  .card {
    padding: 1.8rem 1.2rem 1.6rem;
  }

  .title {
    font-size: 1.5rem;
  }

  .brand__logo {
    width: 40px;
    height: 40px;
  }
}
