/* ============================================================
   dashboard.css — grilla del dashboard, charts, login/guest
   ============================================================ */

/* ---- Grilla de gráficos ---- */
.chart-grid {
  display: grid; gap: var(--sp-4);
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  margin-bottom: var(--sp-6);
}
.chart-card { display: flex; flex-direction: column; }
.chart-card__canvas-wrap {
  position: relative; flex: 1 1 auto;
  min-height: 260px; padding: var(--sp-5);
}
.chart-card__canvas-wrap canvas { max-height: 300px; }

/* tabla alternativa para a11y de los charts (oculta visualmente) */
.chart-a11y-table caption { text-align: left; }

/* ---- Sección alertas ---- */
.section { margin-bottom: var(--sp-6); }
.section__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3); margin-bottom: var(--sp-4);
}
.section__head h2 { font-size: var(--fs-18); }

/* ---- Skeleton específico dashboard ---- */
.metric.is-skeleton { gap: var(--sp-3); }
.skeleton--metric-value { height: 32px; width: 60%; }
.skeleton--line { height: 14px; width: 100%; }
.skeleton--chart { height: 240px; width: 100%; }

/* ============================================================
   Guest / Login
   ============================================================ */
.guest-shell {
  min-height: 100dvh;
  display: grid; place-items: center;
  padding: var(--sp-5);
  background:
    radial-gradient(1200px 600px at 100% -10%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, color-mix(in srgb, var(--secondary) 12%, transparent), transparent 55%),
    var(--bg);
}
.guest-card {
  width: 100%; max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-6);
}
.guest-brand {
  display: flex; flex-direction: column; align-items: center;
  gap: var(--sp-3); margin-bottom: var(--sp-6); text-align: center;
}
.guest-brand img { width: 56px; height: 56px; border-radius: var(--radius); }
.guest-brand__name { font-size: var(--fs-24); font-weight: 700; letter-spacing: -.02em; }
.guest-brand__tag { font-size: var(--fs-14); color: var(--text-muted); }
.guest-foot { margin-top: var(--sp-5); text-align: center; font-size: var(--fs-12); color: var(--text-subtle); }

/* password reveal */
.input-affix { position: relative; }
.input-affix .input { padding-right: 44px; }
.input-affix__btn {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  display: grid; place-items: center; color: var(--text-subtle);
}
.input-affix__btn:hover { background: var(--surface-2); color: var(--text); }
.input-affix__btn svg { width: 18px; height: 18px; stroke: currentColor; }

/* ============================================================
   Branding preview
   ============================================================ */
.branding-layout {
  display: grid; gap: var(--sp-5);
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: start;
}
@media (max-width: 900px){ .branding-layout { grid-template-columns: 1fr; } }

.preview-pane { position: sticky; top: var(--sp-5); }
.preview-frame {
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: var(--bg);
}
.preview-topbar {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.preview-logo { width: 32px; height: 32px; border-radius: var(--radius-sm); }
.preview-body { padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3); }
.preview-swatches { display: flex; gap: var(--sp-2); }
.preview-swatch { width: 38px; height: 38px; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.logo-drop {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3); border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm); background: var(--surface-2);
}
.logo-drop img { width: 48px; height: 48px; border-radius: var(--radius-sm); object-fit: contain; background: var(--surface); }
