:root {
  --brand-primary: #2563eb;
  --brand-primary-dark: #1d4ed8;
  --brand-surface: #f8fafc;
  --brand-ink: #0f172a;
}

html {
  scroll-behavior: smooth;
}

.app-body {
  background: linear-gradient(165deg, #eff6ff 0%, #f8fafc 45%, #ffffff 100%);
  color: var(--brand-ink);
}

html.dark .app-body {
  background: linear-gradient(165deg, #0f172a 0%, #1e293b 55%, #0f172a 100%);
  color: #f8fafc;
}

.glass-panel {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 1rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

html.dark .glass-panel {
  background: rgba(15, 23, 42, 0.75);
  border-color: rgba(71, 85, 105, 0.55);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.app-brand-mark {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, var(--brand-primary), #38bdf8);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.nav-link,
.footer-link {
  color: #475569;
  text-decoration: none;
  border-radius: 0.5rem;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-link:hover,
.footer-link:hover {
  color: var(--brand-primary);
  background: rgba(37, 99, 235, 0.08);
}

html.dark .nav-link,
html.dark .footer-link {
  color: #cbd5e1;
}

.lang-pill {
  color: #64748b;
  text-decoration: none;
  border: 1px solid transparent;
}

.lang-pill--active {
  color: var(--brand-primary);
  border-color: rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.1);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  padding: 0.625rem 1.25rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  padding: 0.625rem 1.25rem;
  font-weight: 600;
  color: #334155;
  background: #fff;
  border: 1px solid #e2e8f0;
}

html.dark .btn-secondary {
  color: #e2e8f0;
  background: #1e293b;
  border-color: #334155;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
}

html.dark .form-label {
  color: #e2e8f0;
}

.form-input {
  border-radius: 0.625rem;
  border: 1px solid #cbd5e1;
  padding: 0.625rem 0.75rem;
  font-size: 1rem;
  background: #fff;
  color: #0f172a;
}

.form-input:focus {
  outline: 2px solid rgba(37, 99, 235, 0.35);
  border-color: var(--brand-primary);
}

html.dark .form-input {
  background: #0f172a;
  border-color: #475569;
  color: #f8fafc;
}

.alert-success {
  border-left: 4px solid #16a34a;
  color: #166534;
}

html.dark .alert-success {
  color: #86efac;
}

.app-main {
  width: 100%;
  overflow-x: hidden;
}

.trust-page {
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.trust-page-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0d9488;
}

.trust-page-title {
  margin-top: 0.75rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

html.dark .trust-page-title {
  color: #f8fafc;
}

.trust-page-body {
  margin-top: 1rem;
  font-size: 1rem;
  line-height: 1.65;
  color: #475569;
}

html.dark .trust-page-body {
  color: #cbd5e1;
}

.app-footer {
  background: rgba(255, 255, 255, 0.88);
}

html.dark .app-footer {
  background: rgba(15, 23, 42, 0.88);
}

.error-page {
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
}

.error-page-code {
  font-size: clamp(3rem, 10vw, 4.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}

.error-page-title {
  margin-top: 1rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
}

html.dark .error-page-title {
  color: #f8fafc;
}

.error-page-body {
  margin-top: 0.5rem;
  font-size: 1rem;
  line-height: 1.6;
  color: #64748b;
}

html.dark .error-page-body {
  color: #cbd5e1;
}

.error-page-code--info {
  color: #2563eb;
}

.error-page-code--warn {
  color: #d97706;
}

.error-page-code--danger {
  color: #dc2626;
}

.support-widget {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 50;
}

.support-fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  width: 3.25rem;
  height: 3.25rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
  border: none;
  cursor: pointer;
}

.support-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.75rem);
  width: min(22rem, calc(100vw - 2rem));
  padding: 1rem;
}

.support-panel.hidden,
.support-panel[hidden] {
  display: none;
}

.support-close {
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
}

.support-toast {
  margin-top: 0.5rem;
}

.support-toast.is-success {
  color: #15803d;
}

.support-toast.is-error {
  color: #b91c1c;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .btn-primary {
    transition: none;
  }

  .btn-primary:hover {
    transform: none;
  }
}
