/**
 * Login / Signup — aligns with FrenzyGo (Plus Jakarta, brand green).
 */
:root {
  --auth-brand: #2e9d4f;
  --auth-brand-hover: #248040;
  --auth-brand-soft: rgba(46, 157, 79, 0.12);
  --auth-ink: #0f172a;
  --auth-muted: #64748b;
  --auth-surface: #ffffff;
  --auth-border: rgba(15, 23, 42, 0.1);
  --auth-radius: 14px;
  --auth-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 20px 40px -12px rgba(15, 23, 42, 0.12);
}

.fg-auth {
  margin: 0;
  min-height: 100vh;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--auth-ink);
  background-color: #f0f4f8;
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -30%, rgba(46, 157, 79, 0.18), transparent 55%),
    radial-gradient(ellipse 80% 50% at 100% 100%, rgba(46, 157, 79, 0.08), transparent 45%),
    linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}

.fg-auth a {
  color: var(--auth-brand);
}

.fg-auth a:hover {
  color: var(--auth-brand-hover);
}

/* —— Top nav —— */
.fg-auth-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--auth-border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.fg-auth-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  max-width: 1120px;
  margin: 0 auto;
}

.fg-auth-nav__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--auth-ink);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.fg-auth-nav__brand img {
  height: 36px;
  width: auto;
  display: block;
}

.fg-auth-nav__links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.fg-auth-nav__links a {
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--auth-muted);
  transition: color 0.15s ease, background 0.15s ease;
}

.fg-auth-nav__links a:hover {
  color: var(--auth-ink);
  background: rgba(15, 23, 42, 0.05);
}

.fg-auth-nav__links a.fg-auth-nav__link--active {
  color: var(--auth-brand);
  background: var(--auth-brand-soft);
}

/* —— Main + card —— */
.fg-auth__main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem 3rem;
  min-height: calc(100vh - 64px);
}

.fg-auth__card {
  width: 100%;
  max-width: 440px;
  background: var(--auth-surface);
  border-radius: var(--auth-radius);
  box-shadow: var(--auth-shadow);
  border: 1px solid var(--auth-border);
  padding: 2rem 1.75rem 2.25rem;
  position: relative;
  overflow: hidden;
}

.fg-auth__card--wide {
  max-width: 500px;
}

.fg-auth__card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--auth-brand), #f59e0b);
}

.fg-auth__header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.fg-auth__mark {
  display: inline-flex;
  margin-bottom: 1rem;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

.fg-auth__mark img {
  width: 56px;
  height: 56px;
  object-fit: cover;
}

.fg-auth__title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 0.35rem;
  color: var(--auth-ink);
}

.fg-auth__subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: var(--auth-muted);
  line-height: 1.45;
}

/* —— Form fields (Semantic UI inside) —— */
.fg-auth-form .field {
  margin-bottom: 1rem;
}

.fg-auth-form .field:last-of-type {
  margin-bottom: 0;
}

.fg-auth .ui.input input,
.fg-auth select.ui.dropdown {
  border-radius: 10px !important;
  border: 1px solid var(--auth-border) !important;
  padding: 0.85rem 1rem 0.85rem 2.65rem !important;
  font-size: 1rem !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.fg-auth .ui.input input:focus,
.fg-auth select.ui.dropdown:focus {
  border-color: var(--auth-brand) !important;
  box-shadow: 0 0 0 3px var(--auth-brand-soft) !important;
}

.fg-auth .ui.selection.dropdown {
  min-height: 48px !important;
  border-radius: 10px !important;
  border: 1px solid var(--auth-border) !important;
}

.fg-auth .ui.left.icon.input > i.icon {
  left: 0.85rem;
  opacity: 0.45;
}

.fg-auth__row {
  display: flex;
  gap: 0.75rem;
}

.fg-auth__row .field {
  flex: 1;
  min-width: 0;
}

@media (max-width: 480px) {
  .fg-auth__row {
    flex-direction: column;
    gap: 0;
  }
}

.fg-auth__options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.25rem 0 1rem;
}

.fg-auth__options .ui.checkbox label {
  color: var(--auth-muted) !important;
  font-size: 0.9rem;
}

.fg-auth__forgot {
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--auth-brand);
}

.fg-auth__forgot:hover {
  text-decoration: underline;
}

.fg-auth__submit.ui.button {
  width: 100%;
  margin-top: 1rem !important;
  padding: 0.9rem 1rem !important;
  border-radius: 10px !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  background: linear-gradient(135deg, var(--auth-brand), var(--auth-brand-hover)) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(46, 157, 79, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fg-auth__submit.ui.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(46, 157, 79, 0.4);
}

.fg-auth__divider {
  text-align: center;
  margin: 1.5rem 0;
  position: relative;
}

.fg-auth__divider::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--auth-border);
}

.fg-auth__divider span {
  position: relative;
  background: var(--auth-surface);
  padding: 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--auth-muted);
}

.fg-auth__social .ui.button {
  width: 100%;
  border-radius: 10px !important;
  font-weight: 600 !important;
  border: 1px solid var(--auth-border) !important;
  background: #fff !important;
  color: var(--auth-ink) !important;
  padding: 0.85rem 1rem !important;
}

.fg-auth__social .ui.button:hover {
  border-color: rgba(66, 133, 244, 0.45) !important;
  background: #fafbff !important;
}

.fg-auth__switch {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--auth-border);
  font-size: 0.95rem;
  color: var(--auth-muted);
}

.fg-auth__switch a {
  font-weight: 700;
  margin-left: 0.25rem;
}

/* Messages */
.fg-auth-msg {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  line-height: 1.4;
}

.fg-auth-msg--error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.fg-auth-msg--success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.fg-auth-msg i.icon {
  flex-shrink: 0;
  margin-top: 0.1rem;
}

/* Password toggle */
.fg-auth-password-wrap {
  position: relative;
}

.fg-auth-password-wrap .ui.left.icon.input {
  width: 100%;
}

.fg-auth-password-wrap .ui.input input {
  padding-right: 2.75rem !important;
}

.fg-auth-toggle {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--auth-muted);
  padding: 0.35rem;
  border-radius: 6px;
  line-height: 1;
}

.fg-auth-toggle:hover {
  color: var(--auth-ink);
  background: rgba(15, 23, 42, 0.06);
}

/* Signup: password strength */
.fg-auth-strength {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--auth-muted);
}

.fg-auth-strength-bar {
  height: 4px;
  border-radius: 2px;
  background: #e2e8f0;
  margin-top: 0.35rem;
  overflow: hidden;
}

.fg-auth-strength-fill {
  height: 100%;
  transition: width 0.2s ease, background 0.2s ease;
  border-radius: 2px;
}

.fg-auth-strength-fill.strength-weak {
  background: #ef4444;
  width: 25%;
}
.fg-auth-strength-fill.strength-fair {
  background: #f59e0b;
  width: 50%;
}
.fg-auth-strength-fill.strength-good {
  background: #eab308;
  width: 75%;
}
.fg-auth-strength-fill.strength-strong {
  background: var(--auth-brand);
  width: 100%;
}

.fg-auth-terms {
  margin-top: 0.5rem;
  padding: 0.85rem 1rem;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid var(--auth-border);
  font-size: 0.88rem;
  color: var(--auth-muted);
  line-height: 1.45;
}

.fg-auth-terms .ui.checkbox label {
  color: var(--auth-muted) !important;
  font-size: 0.88rem !important;
}

.field-error.fg-auth-field-error {
  color: #b91c1c;
  font-size: 0.8rem;
  margin-top: 0.35rem;
  display: none;
}
