/* Lumora — Error pages (404, 500, 403, maintenance, coming-soon) */

/* =========================================================
   PAGE SHELL
   ========================================================= */
.err-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-base);
  position: relative;
  overflow: hidden;
}

/* Ambient blobs */
.err-page::before,
.err-page::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0.35;
  z-index: 0;
}
.err-page::before {
  width: 600px; height: 600px;
  top: -200px; right: -200px;
  background: radial-gradient(circle, rgba(91,91,247,.5), transparent 70%);
}
.err-page::after {
  width: 500px; height: 500px;
  bottom: -200px; left: -100px;
  background: radial-gradient(circle, rgba(168,85,247,.4), transparent 70%);
}

/* Grid noise overlay */
.err-page__grid {
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='48'><path d='M0 47.5h48M47.5 0v48' stroke='rgba(91,91,247,0.06)'/></svg>");
  pointer-events: none;
  z-index: 0;
}

/* =========================================================
   TOP BAR (brand + nav links)
   ========================================================= */
.err-topbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.err-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.err-brand__mark {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand) 0%, #A855F7 100%);
  display: grid; place-items: center;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}
.err-brand:hover { color: var(--brand); text-decoration: none; }

.err-topbar__nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.err-topbar__nav a:not(.btn) {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: var(--r);
  transition: background .18s, color .18s;
}
.err-topbar__nav a:not(.btn):hover {
  color: var(--text);
  background: var(--surface-2);
}
.err-topbar__nav .btn {
  font-size: 14px;
}

/* =========================================================
   MAIN CONTENT AREA
   ========================================================= */
.err-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  position: relative;
  z-index: 1;
}

.err-body {
  text-align: center;
  max-width: 600px;
  animation: errFadeUp .5s ease both;
}
@keyframes errFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   BIG CODE NUMBER (404 / 500 / 403)
   ========================================================= */
.err-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(96px, 18vw, 180px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--brand) 0%, #A855F7 50%, #EC4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: var(--font-num);
  position: relative;
  user-select: none;
  margin-bottom: 8px;
}
/* soft glow behind number */
.err-code::after {
  content: attr(data-code);
  position: absolute;
  inset: 0;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  background: linear-gradient(135deg, var(--brand) 0%, #A855F7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: blur(40px);
  opacity: 0.35;
  pointer-events: none;
  z-index: -1;
}

/* =========================================================
   ILLUSTRATION ICON (maintenance / coming-soon)
   ========================================================= */
.err-illus {
  width: 140px; height: 140px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  margin-bottom: 24px;
  position: relative;
}
.err-illus--warn {
  background: radial-gradient(circle, rgba(245,158,11,.15), rgba(245,158,11,.04));
  color: var(--warn);
  border: 2px solid rgba(245,158,11,.2);
}
.err-illus--purple {
  background: radial-gradient(circle, rgba(91,91,247,.15), rgba(91,91,247,.04));
  color: var(--brand);
  border: 2px solid rgba(91,91,247,.2);
}
/* Pulse ring on icon */
.err-illus::before {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1px solid currentColor;
  opacity: 0.2;
  animation: errPulse 2.5s ease-in-out infinite;
}
.err-illus::after {
  content: "";
  position: absolute;
  inset: -24px;
  border-radius: 50%;
  border: 1px solid currentColor;
  opacity: 0.08;
  animation: errPulse 2.5s ease-in-out infinite .6s;
}
@keyframes errPulse {
  0%, 100% { transform: scale(1); opacity: 0.12; }
  50%       { transform: scale(1.06); opacity: 0.22; }
}

/* =========================================================
   TEXT
   ========================================================= */
.err-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  margin-bottom: 20px;
}
.err-badge--blue { background: rgba(91,91,247,.1); color: var(--brand); }
.err-badge--warn { background: rgba(245,158,11,.12); color: var(--warn); }
.err-badge--danger { background: rgba(239,68,68,.1); color: var(--danger); }
.err-badge--purple { background: rgba(168,85,247,.1); color: #A855F7; }

.err-title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 14px;
  line-height: 1.2;
}
.err-subtitle {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 36px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* =========================================================
   ACTION BUTTONS
   ========================================================= */
.err-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

/* =========================================================
   QUICK LINKS / SUGGESTIONS
   ========================================================= */
.err-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  max-width: 560px;
  margin: 0 auto;
}
.err-link-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: var(--text);
  transition: border-color .18s, box-shadow .18s, transform .18s;
  cursor: pointer;
}
.err-link-card:hover {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(91,91,247,.08), var(--shadow-pop);
  transform: translateY(-2px);
  color: var(--brand);
  text-decoration: none;
}
.err-link-card__icon {
  width: 44px; height: 44px;
  border-radius: var(--r);
  display: grid; place-items: center;
  font-size: 20px;
  background: var(--surface-2);
  transition: background .18s;
}
.err-link-card:hover .err-link-card__icon {
  background: rgba(91,91,247,.1);
}
.err-link-card__label {
  font-size: 13px;
  font-weight: 600;
}

/* =========================================================
   SEARCH BOX (404)
   ========================================================= */
.err-search {
  position: relative;
  max-width: 420px;
  margin: 0 auto 40px;
}
.err-search input {
  width: 100%;
  height: 48px;
  padding: 0 52px 0 18px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-family: var(--font-base);
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.err-search input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(91,91,247,.12);
}
.err-search input::placeholder { color: var(--text-muted); }
.err-search__btn {
  position: absolute;
  right: 6px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px;
  border-radius: var(--r-pill);
  border: none;
  background: var(--brand);
  color: #fff;
  display: grid; place-items: center;
  font-size: 14px;
  cursor: pointer;
  transition: background .18s;
}
.err-search__btn:hover { background: #4747e0; }

/* =========================================================
   STATUS DETAILS PANEL (500)
   ========================================================= */
.err-status-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  max-width: 480px;
  margin: 0 auto 40px;
  text-align: left;
}
.err-status-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.err-status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}
.err-status-dot--red  { background: var(--danger); box-shadow: 0 0 6px rgba(239,68,68,.5); }
.err-status-dot--yellow { background: var(--warn); box-shadow: 0 0 6px rgba(245,158,11,.5); }
.err-status-dot--green  { background: var(--brand-2); box-shadow: 0 0 6px rgba(34,197,94,.5); }
.err-status-panel__body { padding: 0; }
.err-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.err-status-row:last-child { border-bottom: none; }
.err-status-row__label { color: var(--text-muted); flex-shrink: 0; }
.err-status-row__val { font-weight: 500; font-family: var(--font-num); font-size: 12px; }
.err-status-row__badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--r-pill);
}
.err-status-row__badge--ok { background: rgba(34,197,94,.1); color: var(--brand-2); }
.err-status-row__badge--err { background: rgba(239,68,68,.1); color: var(--danger); }
.err-status-row__badge--warn { background: rgba(245,158,11,.1); color: var(--warn); }

/* Stack trace accordion (500) */
.err-trace {
  background: #0E1116;
  border: 1px solid #262E38;
  border-radius: var(--r-lg);
  overflow: hidden;
  max-width: 480px;
  margin: 0 auto 40px;
  text-align: left;
}
.err-trace__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  color: #9AA4B2;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid #262E38;
}
.err-trace__body {
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #E5E7EB;
  line-height: 1.8;
  max-height: 200px;
  overflow-y: auto;
}
.err-trace__body .line-num {
  display: inline-block;
  width: 28px;
  color: #4A5568;
  user-select: none;
}
.err-trace__body .line-err  { color: #F87171; }
.err-trace__body .line-warn { color: #FBBF24; }
.err-trace__body .line-dim  { color: #6B7280; }

/* Error ID copy widget */
.err-id {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 6px 14px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-bottom: 28px;
  cursor: pointer;
  transition: border-color .18s;
}
.err-id:hover { border-color: var(--brand); color: var(--brand); }
.err-id i { font-size: 11px; }

/* =========================================================
   LOCK / SHIELD WIDGET (403)
   ========================================================= */
.err-shield {
  position: relative;
  width: 160px; height: 160px;
  margin: 0 auto 32px;
}
.err-shield__bg {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, rgba(239,68,68,.18), rgba(239,68,68,.04));
  border: 2px solid rgba(239,68,68,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 72px;
  color: var(--danger);
  animation: errShieldShake 4s ease-in-out infinite;
}
@keyframes errShieldShake {
  0%, 85%, 100% { transform: rotate(0deg); }
  87% { transform: rotate(-4deg); }
  89% { transform: rotate(4deg); }
  91% { transform: rotate(-2deg); }
  93% { transform: rotate(2deg); }
  95% { transform: rotate(0deg); }
}
.err-shield__ring {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1px dashed rgba(239,68,68,.2);
  animation: errRingSpin 12s linear infinite;
}
@keyframes errRingSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.err-shield__dot {
  position: absolute;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 8px rgba(239,68,68,.6);
  top: 4px; left: 50%; transform: translateX(-50%);
}

/* Permission chips */
.err-perms {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 36px;
}
.err-perm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
}
.err-perm--locked {
  border-color: rgba(239,68,68,.3);
  background: rgba(239,68,68,.05);
  color: var(--danger);
}

/* =========================================================
   MAINTENANCE — progress & checklist
   ========================================================= */
.err-progress-wrap {
  max-width: 420px;
  margin: 0 auto 32px;
  text-align: left;
}
.err-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
}
.err-progress-label span:last-child { color: var(--brand); }
.err-progress-track {
  height: 8px;
  background: var(--surface-2);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.err-progress-fill {
  height: 100%;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--brand) 0%, #A855F7 100%);
  animation: errFillIn 1.4s cubic-bezier(.4,0,.2,1) both;
  animation-delay: .3s;
}
@keyframes errFillIn {
  from { width: 0 !important; }
}

.err-checklist {
  max-width: 380px;
  margin: 0 auto 40px;
  text-align: left;
}
.err-check-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.err-check-item:last-child { border-bottom: none; }
.err-check-icon {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 11px;
  flex-shrink: 0;
}
.err-check-icon--done { background: rgba(34,197,94,.12); color: var(--brand-2); }
.err-check-icon--active {
  background: rgba(91,91,247,.12); color: var(--brand);
  animation: errCheckSpin 1.4s linear infinite;
}
.err-check-icon--pending { background: var(--surface-2); color: var(--text-muted); }
@keyframes errCheckSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.err-check-label { flex: 1; color: var(--text); }
.err-check-label.dim { color: var(--text-muted); }
.err-check-status {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--r-pill);
}
.err-check-status--done { background: rgba(34,197,94,.1); color: var(--brand-2); }
.err-check-status--active { background: rgba(91,91,247,.1); color: var(--brand); }
.err-check-status--pending { background: var(--surface-2); color: var(--text-muted); }

/* =========================================================
   COMING SOON — countdown & subscribe
   ========================================================= */
.err-countdown {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.err-countdown-unit {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 24px;
  min-width: 90px;
  text-align: center;
  box-shadow: var(--shadow-1);
}
.err-countdown-val {
  font-size: 40px;
  font-weight: 700;
  font-family: var(--font-num);
  letter-spacing: -0.02em;
  color: var(--brand);
  line-height: 1;
  display: block;
}
.err-countdown-lbl {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 4px;
  display: block;
}

.err-subscribe {
  display: flex;
  gap: 8px;
  max-width: 420px;
  margin: 0 auto 40px;
  flex-wrap: wrap;
}
.err-subscribe input {
  flex: 1;
  min-width: 200px;
  height: 46px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font-base);
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.err-subscribe input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(91,91,247,.12);
}
.err-subscribe input::placeholder { color: var(--text-muted); }
.err-subscribe .btn {
  height: 46px;
  border-radius: var(--r-pill);
  white-space: nowrap;
}

/* Social links */
.err-socials {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 32px;
}
.err-social-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  display: grid; place-items: center;
  font-size: 16px;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: none;
  transition: border-color .18s, color .18s, transform .18s;
}
.err-social-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
  transform: translateY(-2px);
}

/* Feature teaser chips (coming-soon) */
.err-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
}
.err-feature-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}
.err-feature-chip i { color: var(--brand); font-size: 12px; }

/* =========================================================
   FOOTER
   ========================================================= */
.err-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 40px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  color: var(--text-muted);
}
.err-footer a { color: var(--text-muted); text-decoration: none; }
.err-footer a:hover { color: var(--brand); }
.err-footer__links { display: flex; gap: 20px; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 576px) {
  .err-topbar { padding: 14px 20px; }
  .err-topbar__nav a { padding: 6px 10px; font-size: 13px; }
  .err-footer { padding: 14px 20px; }
  .err-countdown-unit { min-width: 72px; padding: 16px 14px; }
  .err-countdown-val  { font-size: 30px; }
  .err-links { grid-template-columns: repeat(2, 1fr); }
}
