/* Precisión Técnica — estilos del panel (/app). Misma paleta que la portada. */

:root {
  --navy: #0b1424;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-light: #93c5fd;
  --ink: #162033;
  --muted: #5b6678;
  --paper: #f5f7fb;
  --line: #e2e8f0;
  --field: #8190a5;
  --ok: #15803d;
  --err: #b42318;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
}
h1, h2 { margin: 0; font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: var(--blue-dark); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
[hidden] { display: none !important; }

.wrap-narrow { width: min(720px, calc(100% - 2rem)); margin-inline: auto; }

/* Barra superior */
.topbar { background: var(--navy); color: #fff; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.topbar :focus-visible { outline-color: var(--blue-light); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; font-weight: 800; letter-spacing: 0.2px; text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  font-size: 18px;
}
.bar-user { display: flex; align-items: center; gap: 0.25rem; min-width: 0; }
.bar-email {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #dbeafe;
  font-size: 0.9rem;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 10px;
  font: 800 1rem/1.2 var(--font);
  text-decoration: none;
  cursor: pointer;
}
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 10px 25px rgba(37, 99, 235, 0.22); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-primary[disabled],
.btn-primary[aria-disabled="true"] { background: #94a3b8; box-shadow: none; cursor: not-allowed; }
.btn-quiet {
  min-height: 40px;
  padding: 0 8px;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.bar .btn-quiet { color: #dbeafe; }

/* Estructura */
.app-main { padding-block: 28px 64px; }
.stack > * + * { margin-top: 1.25rem; }
.panel {
  padding: clamp(20px, 3vw, 28px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.panel-title { font-size: clamp(1.6rem, 3.4vw, 2rem); }
.panel-sub { font-size: 1.3rem; }
.panel-lede { margin-top: 0.6rem; color: var(--muted); }

/* Uso del cupo */
.usage { display: grid; gap: 0.6rem; }
.usage-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; }
.badge {
  display: inline-block;
  padding: 4px 12px;
  background: #eaf2ff;
  color: #1d4ed8;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
}
.meter { height: 0.6rem; overflow: hidden; background: #dbe4f0; border-radius: 999px; }
.meter-fill { width: 0; height: 100%; background: var(--blue); border-radius: 999px; transition: width 0.5s ease; }
.renewal { color: var(--muted); font-size: 0.92rem; }
@media (prefers-reduced-motion: reduce) { .meter-fill { transition: none; } }

/* Formularios */
.field { display: block; }
.field-label { display: block; margin-bottom: 0.4rem; font-weight: 700; }
.field-hint { display: block; margin-top: 0.35rem; color: var(--muted); font-size: 0.88rem; }
.field-foot { display: flex; justify-content: space-between; gap: 1rem; margin-top: 0.35rem; color: var(--muted); font-size: 0.88rem; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.input,
.textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  background: #fff;
  color: var(--ink);
  border: 1.5px solid var(--field);
  border-radius: 10px;
  font: inherit;
}
.textarea { min-height: 12rem; resize: vertical; line-height: 1.5; }
.input:focus,
.textarea:focus { border-color: var(--blue); outline: 3px solid rgba(37, 99, 235, 0.25); outline-offset: 0; }

/* Mensajes */
.msg {
  padding: 0.8rem 1rem;
  background: #f1f5f9;
  border-left: 4px solid var(--field);
  border-radius: 0 10px 10px 0;
  font-size: 0.95rem;
}
.msg-ok { border-color: var(--ok); }
.msg-err { border-color: var(--err); }

/* Planes */
.plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1.25rem; }
.plan { display: flex; flex-direction: column; gap: 0.35rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: 14px; }
.plan-name { font-size: 1.2rem; font-weight: 800; }
.plan-quota { color: var(--muted); }
.plan .btn { margin-top: 0.75rem; }
.price { font-size: 2rem; font-weight: 900; letter-spacing: -0.03em; color: var(--navy); }
.price-unit { font-size: 0.9rem; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.login-sent-email { font-weight: 700; overflow-wrap: anywhere; }

@media (max-width: 560px) {
  .plan-grid,
  .field-row { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .btn-quiet { width: auto; }
}
