/* ==========================================================================
   Login - 60/40 Split Layout with Masonry Feature Cards
   Matches support.fastnetnow.net aesthetic: gold/blue, glassmorphism
   ========================================================================== */

/* ---------- Split Container ---------- */
/* login-split sits inside .main-content which already applies padding: var(--sp-xl).
   We negate only the horizontal padding so the split layout can reach the full
   content width, then re-apply consistent internal spacing via the panel padding
   rules below. Top/bottom margins stay 0 — negating them would pull the layout
   into the sticky header or below the footer. */
.login-split {
  display: flex;
  min-height: calc(100vh - var(--header-height) - var(--footer-height));
  gap: 32px;
  padding: var(--sp-xl);
  align-items: center;
}

/* ---------- Left Panel: Features (60%) ---------- */
/* Subtract half the gap from each panel so 60% + 40% + 32px gap = 100% */
.login-features {
  flex: 0 0 calc(60% - 16px);
  display: flex;
  flex-direction: column;
  gap: var(--sp-xl);
  padding: var(--sp-lg);
  min-width: 0;
}

.login-features__header {
  padding-bottom: var(--sp-md);
}

.login-features__logo {
  width: 72px;
  height: 72px;
  margin-bottom: var(--sp-md);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
  object-fit: contain;
}

.login-features__title {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.15;
}

.login-features__gold {
  color: #E8B84B;
  -webkit-text-fill-color: #E8B84B;
}

.login-features__tagline {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.82);
  margin-top: var(--sp-sm);
}

/* ---------- Masonry Grid (CSS Columns) ---------- */
/* CSS columns for true staggered masonry — second column starts offset
   for the visual stagger effect. break-inside: avoid prevents cards
   from splitting across columns. */
.login-masonry {
  columns: 2;
  column-gap: 14px;
  max-width: 600px;
}

/* ---------- Feature Cards ---------- */
.feature-card {
  break-inside: avoid;
  margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  padding: var(--sp-xl);
  box-shadow:
    0 0 22px rgba(232, 184, 75, 0.22),
    0 6px 24px rgba(0, 0, 0, 0.30);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

html.dark .feature-card {
  background: rgba(255, 255, 255, 0.10);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow:
    0 0 36px rgba(232, 184, 75, 0.45),
    0 16px 40px rgba(0, 0, 0, 0.35);
}

/* Stagger: push the first card in the second column down to visually
   offset the two columns. With 5 cards in a 2-column layout the browser
   places cards 1-3 in column 1 and cards 4-5 in column 2, so :nth-child(4)
   is the column-2 lead card. :nth-child(2) would only indent within column 1. */
.feature-card:nth-child(4) {
  margin-top: 36px;
}

.feature-card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(232, 184, 75, 0.2));
  padding: 8px;
  flex-shrink: 0;
}

.feature-card__icon svg {
  width: 28px;
  height: 28px;
  stroke: #E8B84B;
}

.feature-card__title {
  font-size: 15px;
  font-weight: 700;
  color: #E8B84B;
  letter-spacing: -0.01em;
  text-shadow: 0 0 12px rgba(232, 184, 75, 0.55);
  padding-bottom: var(--sp-xs);
  border-bottom: 2px solid rgba(232, 184, 75, 0.45);
}

.feature-card__desc {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.6;
}

/* ---------- Right Panel: Login (40%) ---------- */
.login-panel {
  flex: 0 0 calc(40% - 16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-xl);
}

.login-card {
  width: 100%;
  max-width: 440px;
  min-width: 320px;
}

/* Override glass-card padding and add gold glow.
   Background is always dark navy, so the card uses dark-glass treatment
   regardless of theme to guarantee text contrast (WCAG 2.2 SC 1.4.3). */
.login-card.glass-card {
  padding: 28px 32px;
  background: rgba(13, 27, 62, 0.65);
  backdrop-filter: blur(60px);
  -webkit-backdrop-filter: blur(60px);
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  box-shadow:
    0 0 40px rgba(232, 184, 75, 0.25),
    0 24px 72px rgba(0, 0, 0, 0.5),
    inset 0 2px 0 rgba(255, 255, 255, 0.12);
}

html.dark .login-card.glass-card {
  background: rgba(10, 15, 30, 0.70);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow:
    0 0 40px rgba(232, 184, 75, 0.25),
    0 24px 72px rgba(0, 0, 0, 0.6),
    inset 0 2px 0 rgba(255, 255, 255, 0.10);
}

.login-card__header {
  text-align: center;
  margin-bottom: var(--sp-xl);
}

.login-card__logo {
  width: 126px;
  height: 126px;
  margin-bottom: var(--sp-md);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
  object-fit: contain;
}

.login-card__title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 0 16px rgba(232, 184, 75, 0.35);
}

.login-card__subtitle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: var(--sp-xs);
}

/* Gold divider line */
.login-card__divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232, 184, 75, 0.5), transparent);
  margin: var(--sp-base) 0;
}

.login-card__form {
  margin-bottom: var(--sp-base);
}

/* Force light text on login card form elements (always on dark bg) */
.login-card .form-label {
  color: rgba(255, 255, 255, 0.85);
}

.login-card .form-input {
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

.login-card .form-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

/* Input focus: gold ring */
.login-card .form-input:focus {
  border-color: #E8B84B;
  box-shadow: 0 0 0 3px rgba(232, 184, 75, 0.22);
}

/* Error text — bright red readable on dark card */
.login-card .form-error {
  color: #f87171;
}

/* Gold gradient submit button */
.login-card .btn-primary {
  background: linear-gradient(135deg, #C9962D, #E8B84B);
  color: #0D1B3E;
  font-weight: 700;
  border: none;
  box-shadow: 0 4px 20px rgba(232, 184, 75, 0.40);
}

.login-card .btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(232, 184, 75, 0.55);
}

.login-card .btn-primary:disabled {
  opacity: 0.5;
  background: #C9962D;
}

/* Gold focus ring for keyboard users — overrides the global blue outline */
.login-card .btn-primary:focus-visible {
  outline: 2px solid #E8B84B;
  outline-offset: 2px;
}

.login-card .form-input:focus-visible {
  outline: 2px solid #E8B84B;
  outline-offset: 1px;
}

.login-card__footer a:focus-visible {
  outline: 2px solid #E8B84B;
  outline-offset: 2px;
}

.login-card__footer {
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

.login-card__footer a {
  color: #E8B84B;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}

.login-card__footer a:hover {
  color: #FFE082;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .login-features {
    flex: 0 0 calc(50% - 16px);
  }

  .login-panel {
    flex: 1;
  }

  .login-card.glass-card {
    max-width: 380px;
    padding: 22px 24px;
  }

  /* Single column masonry at tablet — two columns get too narrow */
  .login-masonry {
    columns: 1;
    max-width: 100%;
  }

  /* Remove stagger offset in single-column mode */
  .feature-card:nth-child(4) {
    margin-top: 0;
  }
}

@media (max-width: 768px) {
  .login-split {
    flex-direction: column;
    padding: var(--sp-base);
    gap: 0;
  }

  .login-features {
    display: none;
  }

  .login-panel {
    flex: 1;
    padding: var(--sp-base);
    min-height: calc(100vh - var(--header-height) - var(--footer-height));
  }

  .login-card {
    max-width: 100%;
    min-width: unset;
  }
}
