/**
 * GradualPlus — auth pages (login, forgot, reset)
 * Uses gp-frontend theme tokens (gp-theme-light / gp-theme-dark)
 */

html.gp-public body.gp-auth-body {
  margin: 0;
  min-height: 100vh;
  background: var(--gp-fe-bg);
  background-attachment: fixed;
  color: var(--gp-fe-text);
  font-family: var(--gp-font, 'Inter', system-ui, sans-serif);
  -webkit-font-smoothing: antialiased;
}

.gp-login {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.gp-login__panel {
  flex: 1 1 50%;
  min-width: 0;
}

/* ── Form panel ── */
.gp-login__panel--form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  background: var(--gp-fe-bg);
}

.gp-login__form-wrap {
  width: 100%;
  max-width: 400px;
}

.gp-login__form-brand {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-bottom: 28px;
  text-align: center;
}

html.gp-public .gp-login__form-brand.gp-brand {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.gp-login__form-brand-logo {
  display: block;
  height: 104px;
  width: auto;
  max-width: 480px;
  margin: 0 auto;
  object-fit: contain;
}

html.gp-public .gp-login__form-brand .gp-brand__light,
html.gp-public .gp-login__form-brand .gp-brand__dark {
  display: none;
  margin: 0 auto;
  max-height: none;
}

html.gp-public .gp-login__form-brand.gp-brand img {
  max-height: none;
}

html.gp-public .gp-login__form-brand .gp-brand__light {
  display: block;
}

html.gp-public.gp-theme-dark .gp-login__form-brand .gp-brand__light {
  display: none;
}

html.gp-public.gp-theme-dark .gp-login__form-brand .gp-brand__dark {
  display: block;
}

.gp-login__header {
  margin-bottom: 32px;
  text-align: center;
}

.gp-login__header h1 {
  margin: 0 0 8px;
  font-size: clamp(1.75rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--gp-fe-text);
}

.gp-login__header h1 em {
  font-style: normal;
  background: var(--gp-gradient, linear-gradient(135deg, #22d3ee, #3b82f6));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gp-login__header p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--gp-fe-text-muted);
}

.gp-login__alert {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 20px;
  border: 1px solid transparent;
}

.gp-login__alert--success {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.28);
  color: #15803d;
}

html.gp-public.gp-theme-dark .gp-login__alert--success {
  color: #86efac;
}

.gp-login__alert--danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.28);
  color: #b91c1c;
}

html.gp-public.gp-theme-dark .gp-login__alert--danger {
  color: #fca5a5;
}

.gp-login__field {
  margin-bottom: 20px;
}

.gp-login__field label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gp-fe-text-muted);
}

.gp-login__input-wrap {
  position: relative;
}

.gp-login__input-wrap input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--gp-fe-card-border);
  background: var(--gp-fe-input-bg);
  color: var(--gp-fe-text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}

.gp-login__input-wrap input::placeholder {
  color: var(--gp-fe-text-soft);
}

.gp-login__input-wrap input:focus {
  border-color: var(--gp-accent, #22d3ee);
  box-shadow: 0 0 0 3px var(--gp-accent-soft, rgba(34, 211, 238, 0.12));
}

.gp-login__input-wrap--password input {
  padding-right: 72px;
}

.gp-login__toggle-password {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--gp-fe-text-soft);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: color 0.15s;
}

.gp-login__toggle-password:hover {
  color: var(--gp-accent, #22d3ee);
}

.gp-login__field-error {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #dc2626;
}

html.gp-public.gp-theme-dark .gp-login__field-error {
  color: #f87171;
}

.gp-login__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.gp-login__checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--gp-fe-text-muted);
  user-select: none;
}

.gp-login__checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--gp-accent, #22d3ee);
  cursor: pointer;
}

.gp-login__link {
  font-size: 13px;
  font-weight: 500;
  color: var(--gp-accent-strong, #0891b2);
  text-decoration: none;
  transition: color 0.15s;
}

html.gp-public.gp-theme-dark .gp-login__link {
  color: var(--gp-accent, #22d3ee);
}

.gp-login__link:hover {
  color: var(--gp-accent, #22d3ee);
  text-decoration: none;
}

.gp-login__submit {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 12px;
  background: var(--gp-gradient, linear-gradient(135deg, #22d3ee 0%, #0891b2 100%));
  color: #0f172a;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.15s, opacity 0.15s;
  box-shadow: 0 8px 24px rgba(34, 211, 238, 0.22);
}

.gp-login__submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(34, 211, 238, 0.3);
}

.gp-login__submit:active {
  transform: translateY(0);
}

.gp-login__footer {
  margin-top: 28px;
  text-align: center;
  font-size: 12px;
  color: var(--gp-fe-text-soft);
  line-height: 1.5;
}

.gp-login__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gp-fe-text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.gp-login__back:hover {
  color: var(--gp-accent, #22d3ee);
  text-decoration: none;
}

/* ── Showcase panel ── */
.gp-login__panel--showcase {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  background:
    radial-gradient(ellipse 70% 50% at 80% 10%, rgba(34, 211, 238, 0.1), transparent),
    radial-gradient(ellipse 50% 40% at 20% 90%, rgba(59, 130, 246, 0.08), transparent),
    var(--gp-fe-section-alt, #0f172a);
  border-left: 1px solid var(--gp-fe-card-border);
  overflow: hidden;
}

html.gp-public.gp-theme-light .gp-login__panel--showcase {
  background:
    radial-gradient(ellipse 70% 50% at 80% 10%, rgba(34, 211, 238, 0.08), transparent),
    radial-gradient(ellipse 50% 40% at 20% 90%, rgba(59, 130, 246, 0.05), transparent),
    var(--gp-fe-section-alt, #f1f5f9);
}

.gp-login__panel--showcase::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2394a3b8' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.6;
  pointer-events: none;
}

.gp-login__showcase-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.gp-login__hero-card {
  padding: 28px;
  border-radius: 20px;
  background: var(--gp-fe-card);
  border: 1px solid var(--gp-fe-card-border);
  box-shadow: var(--gp-fe-shadow);
}

.gp-login__hero-visual {
  position: relative;
  height: 140px;
  margin-bottom: 24px;
  border-radius: 14px;
  background: var(--gp-accent-soft, rgba(34, 211, 238, 0.08));
  border: 1px solid var(--gp-fe-card-border);
  overflow: hidden;
}

.gp-login__hero-metric {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--gp-fe-card);
  border: 1px solid var(--gp-fe-card-border);
  font-size: 11px;
  color: var(--gp-fe-text-muted);
}

.gp-login__hero-metric strong {
  display: block;
  margin-top: 2px;
  font-size: 18px;
  color: var(--gp-accent, #22d3ee);
}

.gp-login__hero-chart {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 56px;
}

.gp-login__hero-chart span {
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.55), rgba(34, 211, 238, 0.15));
}

.gp-login__hero-chart span:nth-child(1) { height: 35%; }
.gp-login__hero-chart span:nth-child(2) { height: 55%; }
.gp-login__hero-chart span:nth-child(3) { height: 45%; }
.gp-login__hero-chart span:nth-child(4) { height: 75%; }
.gp-login__hero-chart span:nth-child(5) { height: 60%; }

.gp-login__hero-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gp-accent-soft);
  color: var(--gp-accent, #22d3ee);
  font-size: 14px;
}

.gp-login__hero-title {
  margin: 0 0 20px;
  font-size: clamp(1.5rem, 2.5vw, 1.85rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--gp-fe-text);
}

.gp-login__hero-title em {
  font-style: normal;
  background: var(--gp-gradient, linear-gradient(135deg, #22d3ee, #3b82f6));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gp-login__feature-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.gp-login__feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 8px;
  border-radius: 12px;
  background: var(--gp-fe-input-bg);
  border: 1px solid var(--gp-fe-card-border);
  text-align: center;
  font-size: 11px;
  font-weight: 500;
  color: var(--gp-fe-text-muted);
}

.gp-login__feature i {
  font-size: 16px;
  color: var(--gp-accent, #22d3ee);
}

/* ── Showcase slider ── */
.gp-login__slider {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gp-login__slider-viewport {
  display: grid;
  grid-template-areas: 'stack';
}

.gp-login__slide {
  grid-area: stack;
  opacity: 0;
  visibility: hidden;
  transform: translateX(18px);
  transition:
    opacity 0.55s ease,
    transform 0.55s ease,
    visibility 0s linear 0.55s;
  pointer-events: none;
}

.gp-login__slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  transition:
    opacity 0.55s ease,
    transform 0.55s ease,
    visibility 0s linear 0s;
  pointer-events: auto;
}

.gp-login__slide.is-exiting {
  opacity: 0;
  transform: translateX(-18px);
}

.gp-login__slider-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.gp-login__slider-arrow {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gp-fe-card-border);
  border-radius: 10px;
  background: var(--gp-fe-input-bg);
  color: var(--gp-fe-text-muted);
  font-size: 11px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.gp-login__slider-arrow:hover {
  background: var(--gp-accent-soft);
  border-color: rgba(34, 211, 238, 0.28);
  color: var(--gp-accent, #22d3ee);
}

.gp-login__slider-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gp-login__slider-dot {
  position: relative;
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: var(--gp-fe-card-border);
  cursor: pointer;
  overflow: hidden;
  transition: width 0.25s ease, background 0.2s;
}

.gp-login__slider-dot.is-active {
  width: 28px;
  background: rgba(34, 211, 238, 0.22);
}

.gp-login__slider-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--gp-accent, #22d3ee);
  transform: scaleX(0);
  transform-origin: left center;
}

.gp-login__slider-dot.is-active::after {
  animation: gp-login-dot-progress 5.5s linear forwards;
}

@keyframes gp-login-dot-progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* Hero visual variants */
.gp-login__hero-fees {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gp-login__hero-fees-ring {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: conic-gradient(var(--gp-accent, #22d3ee) 0 94%, rgba(34, 211, 238, 0.12) 94% 100%);
  mask: radial-gradient(farthest-side, transparent calc(100% - 10px), #000 calc(100% - 9px));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 10px), #000 calc(100% - 9px));
}

.gp-login__hero-fees-value {
  position: absolute;
  font-size: 20px;
  font-weight: 700;
  color: var(--gp-fe-text);
}

.gp-login__hero-ai {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: var(--gp-accent, #22d3ee);
}

.gp-login__hero-ai-ring {
  position: absolute;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 1px solid rgba(34, 211, 238, 0.35);
  animation: gp-login-ai-pulse 2.4s ease-out infinite;
}

.gp-login__hero-ai-ring--2 {
  width: 96px;
  height: 96px;
  animation-delay: 0.8s;
}

@keyframes gp-login-ai-pulse {
  0% { transform: scale(0.85); opacity: 0.7; }
  100% { transform: scale(1.15); opacity: 0; }
}

.gp-login__hero-exams {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.gp-login__hero-exams span {
  height: 48px;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.45), rgba(59, 130, 246, 0.12));
}

.gp-login__hero-exams span:nth-child(1) { height: 32px; align-self: end; }
.gp-login__hero-exams span:nth-child(2) { height: 44px; align-self: end; }
.gp-login__hero-exams span:nth-child(3) { height: 28px; align-self: end; }
.gp-login__hero-exams span:nth-child(4) { height: 52px; align-self: end; }
.gp-login__hero-exams span:nth-child(5) { height: 38px; align-self: end; }
.gp-login__hero-exams span:nth-child(6) { height: 46px; align-self: end; }

.gp-login__hero-branches {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.gp-login__hero-node {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--gp-fe-card);
  border: 1px solid var(--gp-fe-card-border);
  color: var(--gp-accent, #22d3ee);
  font-size: 16px;
  box-shadow: var(--gp-fe-shadow);
}

.gp-login__hero-node--main {
  width: 56px;
  height: 56px;
  font-size: 20px;
  background: var(--gp-accent-soft);
  border-color: rgba(34, 211, 238, 0.28);
}

.gp-login__slide.is-active .gp-login__hero-chart span,
.gp-login__slide.is-active .gp-login__hero-exams span {
  animation: gp-login-bar-rise 0.7s ease backwards;
}

.gp-login__slide.is-active .gp-login__hero-chart span:nth-child(1),
.gp-login__slide.is-active .gp-login__hero-exams span:nth-child(1) { animation-delay: 0.05s; }
.gp-login__slide.is-active .gp-login__hero-chart span:nth-child(2),
.gp-login__slide.is-active .gp-login__hero-exams span:nth-child(3) { animation-delay: 0.12s; }
.gp-login__slide.is-active .gp-login__hero-chart span:nth-child(3),
.gp-login__slide.is-active .gp-login__hero-exams span:nth-child(2) { animation-delay: 0.19s; }
.gp-login__slide.is-active .gp-login__hero-chart span:nth-child(4),
.gp-login__slide.is-active .gp-login__hero-exams span:nth-child(5) { animation-delay: 0.26s; }
.gp-login__slide.is-active .gp-login__hero-chart span:nth-child(5),
.gp-login__slide.is-active .gp-login__hero-exams span:nth-child(4) { animation-delay: 0.33s; }
.gp-login__slide.is-active .gp-login__hero-exams span:nth-child(6) { animation-delay: 0.4s; }

@keyframes gp-login-bar-rise {
  from { transform: scaleY(0); transform-origin: bottom; opacity: 0.4; }
  to { transform: scaleY(1); opacity: 1; }
}

.gp-login__slide.is-active .gp-login__hero-fees-ring {
  animation: gp-login-ring-fill 1s ease forwards;
}

@keyframes gp-login-ring-fill {
  from { filter: brightness(0.85); transform: rotate(-90deg) scale(0.92); }
  to { filter: brightness(1); transform: rotate(-90deg) scale(1); }
}

.gp-login__slide.is-active .gp-login__feature {
  animation: gp-login-feature-in 0.45s ease backwards;
}

.gp-login__slide.is-active .gp-login__feature:nth-child(1) { animation-delay: 0.15s; }
.gp-login__slide.is-active .gp-login__feature:nth-child(2) { animation-delay: 0.22s; }
.gp-login__slide.is-active .gp-login__feature:nth-child(3) { animation-delay: 0.29s; }

@keyframes gp-login-feature-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .gp-login__slide,
  .gp-login__slide.is-active,
  .gp-login__slide.is-exiting {
    transform: none;
    transition: opacity 0.2s ease;
  }

  .gp-login__slider-dot.is-active::after,
  .gp-login__hero-ai-ring,
  .gp-login__slide.is-active .gp-login__hero-chart span,
  .gp-login__slide.is-active .gp-login__hero-exams span,
  .gp-login__slide.is-active .gp-login__hero-fees-ring,
  .gp-login__slide.is-active .gp-login__feature {
    animation: none;
  }
}

.gp-login__address {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--gp-fe-text-soft);
}

.gp-login__social {
  display: flex;
  gap: 10px;
}

.gp-login__social a {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--gp-fe-input-bg);
  border: 1px solid var(--gp-fe-card-border);
  color: var(--gp-fe-text-muted);
  font-size: 14px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.gp-login__social a:hover {
  background: var(--gp-accent-soft);
  border-color: rgba(34, 211, 238, 0.28);
  color: var(--gp-accent, #22d3ee);
}

.gp-login__stats {
  margin: 0;
  font-size: 12px;
  color: var(--gp-fe-text-soft);
}

/* ── Responsive ── */
@media (max-width: 991px) {
  .gp-login {
    flex-direction: column;
  }

  .gp-login__panel--showcase {
    display: none;
  }

  .gp-login__form-brand-logo {
    height: 88px;
    max-width: 360px;
  }

  .gp-login__panel--form {
    min-height: 100vh;
    padding: 32px 24px;
  }
}

@media (max-width: 480px) {
  .gp-login__row {
    flex-direction: column;
    align-items: flex-start;
  }
}
