/* Shared invalid / expired / success link screens (update-data, 404, etc.) */
/* Same typography as layout.home (Cairo via arabic-typography.css) */
body:has(.ufu-page--standalone) {
  margin: 0;
  font-family: "Cairo", "Segoe UI", Tahoma, sans-serif;
  font-size: clamp(1.0625rem, 0.35vw + 1rem, 1.125rem);
  line-height: 1.7;
  color: #14221f;
  -webkit-font-smoothing: antialiased;
}

.ufu-page,
.ufu-page .ufu-state,
.ufu-page .ufu-state__badge,
.ufu-page .ufu-state__title,
.ufu-page .ufu-state__message,
.ufu-page .ufu-state__hint,
.ufu-page .ufu-state__btn {
  font-family: "Cairo", "Segoe UI", Tahoma, sans-serif;
}

.ufu-page {
  --ufu-primary: #0d9488;
  --ufu-primary-dark: #0f766e;
  --ufu-surface: #ffffff;
  --ufu-muted: #64748b;
  --ufu-border: #e2e8f0;
  min-height: 50vh;
  padding-top: max(7rem, calc(env(safe-area-inset-top, 0px) + 6.25rem));
  padding-bottom: clamp(2.5rem, 8vw, 4rem);
  background: linear-gradient(180deg, #f0fdfa 0%, #f1f5f9 42%, #f8fafc 100%);
}

.ufu-page--standalone {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: max(1.5rem, env(safe-area-inset-top, 0px));
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom, 0px));
}

.ufu-page--standalone .ufu-shell--state {
  width: 100%;
}

.ufu-page .ufu-shell--state {
  max-width: 28rem;
  margin: 0 auto;
  padding: 0 0.75rem;
}

.ufu-page .ufu-state {
  overflow: hidden;
  border-radius: 1.15rem;
  border: 1px solid var(--ufu-border);
  background: #fff;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.1);
  text-align: center;
}

.ufu-page .ufu-state__banner {
  height: 0.45rem;
}

.ufu-page .ufu-state--error .ufu-state__banner {
  background: linear-gradient(90deg, #f59e0b 0%, #ef4444 55%, #dc2626 100%);
}

.ufu-page .ufu-state--success .ufu-state__banner {
  background: linear-gradient(90deg, #34d399 0%, #10b981 55%, #059669 100%);
}

.ufu-page .ufu-state__body {
  padding: 2rem 1.5rem 1.75rem;
}

.ufu-page .ufu-state__badge {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #b45309;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.ufu-page .ufu-state__badge--success {
  color: #047857;
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.ufu-page .ufu-state__icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto 1.1rem;
  border-radius: 50%;
  background: linear-gradient(145deg, #fef2f2, #fff7ed);
  border: 2px solid #fecaca;
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.12);
}

.ufu-page .ufu-state__icon-wrap .bi {
  font-size: 2rem;
  line-height: 1;
  color: #dc2626;
}

.ufu-page .ufu-state__icon-wrap--success {
  background: linear-gradient(145deg, #ecfdf5, #f0fdfa);
  border-color: #a7f3d0;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.12);
}

.ufu-page .ufu-state__icon-wrap--success .bi {
  color: #059669;
}

.ufu-page .ufu-state__title {
  margin: 0 0 0.65rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.ufu-page .ufu-state__message {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  line-height: 1.65;
  color: #475569;
}

.ufu-page .ufu-state__hint {
  margin: 0 0 1.35rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.55rem;
  font-size: 0.84rem;
  line-height: 1.55;
  color: #64748b;
  background: #f8fafc;
  border: 1px dashed var(--ufu-border);
}

.ufu-page .ufu-state__hint strong {
  color: #0f766e;
  font-weight: 800;
}

.ufu-page .ufu-state__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

.ufu-page .ufu-state__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-width: min(100%, 16rem);
  min-height: 3.1rem;
  padding: 0.8rem 2rem;
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.2;
  color: #fff !important;
  text-decoration: none !important;
  background: linear-gradient(145deg, var(--ufu-primary), var(--ufu-primary-dark));
  border: none;
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(13, 148, 136, 0.38);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.ufu-page .ufu-state__btn .bi {
  font-size: 1.15rem;
}

.ufu-page .ufu-state__btn:hover,
.ufu-page .ufu-state__btn:focus-visible {
  color: #fff !important;
  background: linear-gradient(145deg, var(--ufu-primary-dark), #115e59);
  box-shadow: 0 10px 26px rgba(13, 148, 136, 0.45);
  transform: translateY(-1px);
}

.ufu-page .ufu-state__btn:focus-visible {
  outline: 3px solid rgba(13, 148, 136, 0.35);
  outline-offset: 3px;
}

.ufu-page .ufu-state__btn--secondary {
  color: #475569 !important;
  background: #f1f5f9;
  border: 1px solid var(--ufu-border);
  box-shadow: none;
}

.ufu-page .ufu-state__btn--secondary:hover,
.ufu-page .ufu-state__btn--secondary:focus-visible {
  color: #334155 !important;
  background: #e2e8f0;
  box-shadow: none;
  transform: translateY(-1px);
}
