.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); padding: 18px; }
.card + .card { margin-top: 16px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow-soft); }
.stat-card__label { color: var(--color-muted); font-size: 13px; }
.stat-card__value { font-size: 30px; font-weight: 800; margin-top: 8px; }
.btn { border: 0; border-radius: var(--radius-md); padding: 10px 14px; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-accent { background: var(--color-accent); color: #06202A; }
.btn-ghost { background: transparent; border: 1px solid var(--color-border); color: var(--color-text); }
.badge { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #EEF2FF; color: #3730A3; }
.badge.success { background: #DEF7EC; color: #03543F; }
.badge.warning { background: #FEF3C7; color: #92400E; }
.badge.danger { background: #FDE8E8; color: #9B1C1C; }
.badge.muted { background: #F3F4F6; color: #4B5563; }
.progress { height: 10px; border-radius: 999px; background: #E5E7EB; overflow: hidden; }
.progress__bar { height: 100%; background: var(--color-accent); transition: width .25s ease; }
.toast-host { position: fixed; right: 18px; bottom: 18px; display: grid; gap: 10px; z-index: 99; }
.toast { background: #111827; color: #fff; padding: 12px 14px; border-radius: var(--radius-md); box-shadow: var(--shadow-soft); max-width: 360px; }
.progress{width:100%;height:14px;border-radius:999px;background:#e5e7eb;overflow:hidden;margin:14px 0}.progress>div{height:100%;background:var(--color-accent);transition:width .25s ease}.badge.success{background:#dcfce7;color:#166534}.badge.danger{background:#fee2e2;color:#991b1b}.mt-16{margin-top:16px}.stats-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px;margin:14px 0}.stat-card{background:#fff;border:1px solid var(--color-border);border-radius:var(--radius-md);padding:14px}.stat-card span{display:block;color:var(--color-muted);font-size:12px}.stat-card strong{font-size:22px}

/* Sprint 3: preflight, estimaciones y calibración */
.alert {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  background: #f8fafc;
  color: var(--color-text);
}
.alert.success { border-color: #9bd9b1; background: #f0fff4; }
.alert.warning { border-color: #f4d384; background: #fff9e8; }
.alert.danger { border-color: #f0a4a4; background: #fff1f2; }
.alert ul { margin: 8px 0 0 18px; }
details { border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 12px 14px; background: #fff; }
details summary { cursor: pointer; }

/* Sprint 4: seguridad, roles y administración */
.btn--primary, .btn-primary { background: var(--color-primary); color: #fff; }
.btn--sm { padding: 6px 9px; font-size: 12px; }
.alert--error, .alert.danger { border-color: #f0a4a4; background: #fff1f2; color:#7f1d1d; }
.alert--success, .alert.success { border-color: #9bd9b1; background: #f0fff4; color:#14532d; }
.grid-2 { display:grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap:16px; align-items:start; }
.form-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap:12px; align-items:end; }
.table-toolbar { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin-bottom:16px; }
.table-wrap { overflow:auto; }
.muted { color: var(--color-muted); }
pre { white-space: pre-wrap; word-break: break-word; background:#0f172a; color:#e5e7eb; border-radius:12px; padding:14px; max-height:520px; overflow:auto; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }
