@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  --fg-bg: #07101d;
  --fg-panel: #121c2b;
  --fg-panel-2: #182438;
  --fg-border: rgba(255, 255, 255, 0.08);
  --fg-border-strong: rgba(214, 163, 81, 0.36);
  --fg-text: #f4f7fb;
  --fg-muted: #9ca8bb;
  --fg-soft: #c2cad8;
  --fg-gold: #d6a351;
  --fg-gold-hover: #e5b768;
  --fg-danger: #e96b6b;
  --fg-success: #38d38c;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--fg-text);
  background: var(--fg-bg);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--fg-gold);
  text-decoration: none;
  transition: color 160ms ease;
}

a:hover {
  color: var(--fg-gold-hover);
}

button,
input {
  font: inherit;
}

.fg-auth-page {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 42px 18px;
  overflow: hidden;
}

.fg-auth-bg,
.fg-auth-bg::after,
.fg-auth-bg img {
  position: absolute;
  inset: 0;
}

.fg-auth-bg {
  z-index: 0;
  pointer-events: none;
}

.fg-auth-bg::after {
  content: "";
  background:
    radial-gradient(circle at 72% 16%, rgba(214, 163, 81, 0.12), transparent 32%),
    linear-gradient(90deg, rgba(7, 16, 29, 0.96) 0%, rgba(7, 16, 29, 0.86) 42%, rgba(7, 16, 29, 0.94) 100%);
}

.fg-auth-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  filter: saturate(0.75);
}

.fg-auth-card {
  position: relative;
  z-index: 1;
  width: min(100%, 462px);
  padding: 34px;
  border: 1px solid var(--fg-border);
  border-radius: 16px;
  background: rgba(18, 28, 43, 0.94);
  backdrop-filter: blur(18px);
}

.fg-auth-brand {
  display: inline-flex;
  align-items: center;
  margin-bottom: 28px;
}

.fg-auth-brand img {
  width: 174px;
  max-width: 100%;
  height: auto;
}

.fg-auth-eyebrow {
  margin: 0 0 8px;
  color: var(--fg-gold);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fg-auth-title {
  margin: 0;
  font-size: clamp(1.85rem, 5vw, 2.35rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: 0;
}

.fg-auth-copy {
  margin: 10px 0 26px;
  color: var(--fg-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.fg-auth-form {
  display: grid;
  gap: 14px;
}

.fg-auth-field {
  position: relative;
  display: block;
}

.fg-auth-field span {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 20px;
  height: 20px;
  color: var(--fg-gold);
  transform: translateY(-50%);
  pointer-events: none;
}

.fg-auth-field svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.fg-auth-field input {
  width: 100%;
  height: 54px;
  padding: 0 16px 0 48px;
  border: 1px solid var(--fg-border);
  border-radius: 10px;
  outline: 0;
  color: var(--fg-text);
  background: var(--fg-panel-2);
  transition: border-color 160ms ease, background-color 160ms ease;
}

.fg-auth-field input::placeholder {
  color: #7f8aa0;
}

.fg-auth-field input:focus {
  border-color: var(--fg-border-strong);
  background: #1b293d;
}

.fg-auth-check {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--fg-soft);
  font-size: 0.91rem;
  line-height: 1.35;
}

.fg-auth-check input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin: 0;
  accent-color: var(--fg-gold);
}

.fg-auth-captcha {
  min-height: 78px;
  display: flex;
  align-items: center;
}

.fg-auth-error {
  min-height: 0;
  color: var(--fg-danger);
  font-size: 0.88rem;
  line-height: 1.4;
}

.fg-auth-submit,
.fg-auth-secondary {
  width: 100%;
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 10px;
  color: #111827;
  font-weight: 800;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.fg-auth-submit {
  background: var(--fg-gold);
}

.fg-auth-submit:hover {
  background: var(--fg-gold-hover);
  transform: translateY(-1px);
}

.fg-auth-submit:disabled,
.fg-auth-secondary:disabled {
  cursor: wait;
  opacity: 0.78;
  transform: none;
}

.fg-auth-secondary {
  margin-top: 14px;
  color: var(--fg-text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--fg-border);
}

.fg-auth-secondary:hover {
  color: var(--fg-text);
  background: rgba(255, 255, 255, 0.09);
}

.fg-auth-secondary svg {
  width: 22px;
  height: 22px;
  fill: #d6a351;
}

.fg-auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 20px 0 6px;
  color: #768196;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.fg-auth-divider::before,
.fg-auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--fg-border);
}

.fg-auth-links {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 20px;
  color: var(--fg-muted);
  font-size: 0.9rem;
}

.fg-auth-links.center {
  justify-content: center;
  text-align: center;
}

.fg-auth-success {
  padding: 18px;
  border: 1px solid rgba(56, 211, 140, 0.2);
  border-radius: 12px;
  color: #c9f4df;
  background: rgba(56, 211, 140, 0.08);
  line-height: 1.55;
}

.fg-auth-success strong {
  display: block;
  margin-bottom: 8px;
  color: var(--fg-success);
}

.fg-auth-qr {
  display: flex;
  justify-content: center;
  padding: 16px;
  border: 1px solid var(--fg-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.fg-auth-qr img {
  width: min(100%, 220px);
  height: auto;
  border-radius: 8px;
}

.fg-auth-loader {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(17, 24, 39, 0.26);
  border-top-color: #111827;
  border-radius: 50%;
  animation: fg-auth-spin 700ms linear infinite;
}

@keyframes fg-auth-spin {
  to {
    transform: rotate(360deg);
  }
}

.toast {
  box-shadow: none !important;
}

.swal2-popup {
  border: 1px solid var(--fg-border) !important;
  border-radius: 14px !important;
  color: var(--fg-text) !important;
  background: var(--fg-panel) !important;
  box-shadow: none !important;
}

.swal2-title {
  color: var(--fg-text) !important;
}

.swal2-html-container {
  color: var(--fg-muted) !important;
}

.swal2-confirm {
  border: 0 !important;
  border-radius: 8px !important;
  color: #111827 !important;
  background: var(--fg-gold) !important;
  box-shadow: none !important;
}

.swal2-cancel {
  border: 0 !important;
  border-radius: 8px !important;
  color: var(--fg-text) !important;
  background: #2a3b53 !important;
  box-shadow: none !important;
}

@media (max-width: 520px) {
  .fg-auth-page {
    align-items: start;
    padding: 24px 12px;
  }

  .fg-auth-card {
    padding: 24px 18px;
    border-radius: 14px;
  }

  .fg-auth-brand {
    margin-bottom: 24px;
  }

  .fg-auth-brand img {
    width: 152px;
  }

  .fg-auth-links {
    flex-direction: column;
    text-align: center;
  }

  .fg-auth-captcha {
    overflow-x: auto;
  }
}
