/* ==========================================================================
   Error / Empty Pages (token-first, responsive)
   ========================================================================== */

.error-wrap{
  max-width: min(860px, calc(var(--container) - 2*var(--space-4)));
  margin: 0 auto;
  padding: clamp(var(--space-4), 4vw, var(--space-6)) clamp(var(--space-3), 3vw, var(--space-4));
}

.error-card{
  background: var(--surface, var(--bg));
  border: 1px solid var(--border, #e7ebf3);
  border-radius: var(--radius-md);
  padding: clamp(var(--space-2), 2.2vw, var(--space-4));
  box-shadow: var(--shadow-sm);
  color: var(--text);
}

.error-head{
  display:flex;
  gap: var(--space-2);
  align-items:flex-start;
  justify-content:space-between;
  flex-wrap:wrap;
}

.error-code{
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.error-title{
  margin: 6px 0;
  font-size: clamp(var(--text-xl), 2.6vw, var(--text-2xl));
  line-height: 1.12;
  font-family: var(--font-sans);
}

.error-message{
  margin: 0 0 var(--space-2);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text);
}

.error-hint{
  margin: 0 0 var(--space-2);
  font-size: var(--text-sm);
  line-height: 1.55;
  color: var(--muted);
}

.error-actions{
  display:flex;
  gap: var(--space-2);
  align-items:center;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.error-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  text-decoration:none;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 700;
  transition: transform .08s ease, box-shadow .08s ease;
}

.error-btn-primary{
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.error-divider{
  margin: var(--space-3) 0;
  border: none;
  border-top: 1px solid var(--border);
}

.error-footer{
  display:flex;
  gap: var(--space-2);
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
}

.error-meta{
  font-size: 12px;
  color: var(--muted);
}

.error-back{
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  font-family: var(--font-sans);
  color: var(--text);
}

/* Empty state helpers */
.error-kicker{
  display:inline-flex;
  align-items:center;
  gap: var(--space-1);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2, var(--bg));
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.error-subtitle{
  margin: 0 0 var(--space-2);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--muted);
}

.error-panel{
  margin-top: var(--space-2);
  padding: var(--space-2);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-2, var(--border));
  background: var(--surface-2, var(--bg));
}

.error-panel-title{
  margin: 0 0 var(--space-1);
  font-size: 13px;
  letter-spacing: .02em;
  color: var(--muted);
  font-weight: 800;
}

.error-list{
  margin: 0;
  padding-left: 18px;
}

.error-list li{ margin: 6px 0; }

.error-muted{
  color: var(--muted);
  font-size: 12px;
}

/* Micro-interactions */
.error-btn:hover{
  transform: translateY(-1px);
  box-shadow: var(--shadow-md, var(--shadow-sm));
}
.error-btn:active{
  transform: translateY(0);
  box-shadow: none;
}

/* Mobile tightening */
@media (max-width: 520px){
  .error-actions{ justify-content:flex-start; }
  .error-btn{ width: 100%; }
}
