/* Portal del firmante — /mis-documentos */
.sp-body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: #0f172a;
  background: #f1f5f9;
}
.sp-header {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.75rem 1rem;
}
.sp-header-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sp-brand { font-weight: 700; font-size: 1.1rem; }
.sp-lang a { margin-left: 0.5rem; color: #2563eb; text-decoration: none; }
.sp-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
}
.sp-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}
.sp-lead { color: #475569; margin-top: 0; }
.sp-form { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1rem; }
.sp-label { font-weight: 600; font-size: 0.9rem; }
.sp-input {
  font-size: 1rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  width: 100%;
  box-sizing: border-box;
}
.sp-input-otp { letter-spacing: 0.35em; font-size: 1.25rem; text-align: center; }
.sp-btn {
  display: inline-block;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.sp-btn-primary { background: #2563eb; color: #fff; }
.sp-btn-secondary { background: #e2e8f0; color: #0f172a; }
.sp-btn-ghost { background: transparent; color: #2563eb; border: 1px solid #cbd5e1; }
.sp-alert { padding: 0.75rem; border-radius: 8px; margin: 1rem 0; }
.sp-alert-error { background: #fef2f2; color: #991b1b; }
.sp-alert-info { background: #eff6ff; color: #1e40af; }
.sp-hint, .sp-meta { font-size: 0.875rem; color: #64748b; }
.sp-dashboard-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.sp-stats { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0; }
.sp-stat { background: #fff; padding: 0.35rem 0.75rem; border-radius: 999px; font-size: 0.85rem; border: 1px solid #e2e8f0; }
.sp-stat-pending { border-color: #fbbf24; background: #fffbeb; }
.sp-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.sp-filters .sp-input { flex: 1; min-width: 140px; width: auto; }
.sp-doc-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.sp-doc-item {
  background: #fff;
  border-radius: 10px;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
}
.sp-doc-meta { font-size: 0.85rem; color: #64748b; display: flex; flex-direction: column; gap: 0.15rem; margin-top: 0.35rem; }
.sp-doc-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.sp-badge { font-size: 0.75rem; padding: 0.15rem 0.5rem; border-radius: 999px; background: #e2e8f0; margin-left: 0.35rem; }
.sp-block-title { font-size: 1.1rem; margin: 1.5rem 0 0.75rem; }
.sp-session-idle { font-size: 0.85rem; color: #b45309; margin: 0.25rem 0 0; }
.sp-badge-ok { background: #dcfce7; color: #166534; }
.sp-badge-firmada { background: #dcfce7; color: #166534; }
.sp-badge-pendiente, .sp-badge-abierta, .sp-badge-en_progreso { background: #fef3c7; color: #92400e; }
.sp-pagination { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 1.25rem; }
.sp-page-link { padding: 0.35rem 0.65rem; border-radius: 6px; background: #fff; border: 1px solid #cbd5e1; text-decoration: none; color: #0f172a; }
.sp-page-link.is-active { background: #2563eb; color: #fff; border-color: #2563eb; }
.sp-activity { margin-top: 2rem; }
.sp-activity-list { font-size: 0.875rem; color: #475569; padding-left: 1.1rem; }
.sp-footer { text-align: center; font-size: 0.8rem; color: #94a3b8; padding: 2rem 1rem; }
.sp-alt-auth { margin-top: 1.25rem; text-align: center; font-size: 0.9rem; }
.sp-alt-auth a { color: #2563eb; font-weight: 600; }
.sp-dashboard-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.sp-empty { color: #64748b; }
.sp-hint-inline { font-size: 0.8rem; color: #64748b; max-width: 12rem; }
@media (max-width: 480px) {
  .sp-doc-item { flex-direction: column; }
  .sp-doc-actions { width: 100%; }
  .sp-doc-actions .sp-btn { flex: 1; }
}
