/* auth.css */
.auth-layout {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  background: #fff;
  font-family: var(--sans);
}

.auth-hero {
  position: relative;
  background: #0e1f47;
  color: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: clamp(32px, 5vw, 64px);
}

.auth-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 10% 20%, rgba(20, 112, 224, 0.45) 0%, transparent 60%),
    radial-gradient(circle at 90% 80%, rgba(8, 127, 112, 0.5) 0%, transparent 60%),
    linear-gradient(135deg, #091530 0%, #0e1f47 100%);
}
.auth-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.06'/%3E%3C/svg%3E");
  pointer-events: none;
}

.auth-hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  width: max-content;
  transition: opacity 0.2s ease;
}
.auth-logo:hover {
  opacity: 0.9;
}
.auth-logo img {
  width: 46px;
  height: 46px;
}
.auth-logo-text {
  display: flex;
  flex-direction: column;
}
.auth-logo-text strong {
  font-family: var(--serif);
  font-weight: 800;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.02em;
}
.auth-logo-text span {
  font-size: 11px;
  opacity: 0.75;
  margin-top: 3px;
}

.auth-hero-text {
  margin: auto 0;
  max-width: 580px;
}
.auth-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 28px;
  color: #a4e5d6;
}
.auth-hero-text h1 {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 5vw, 4.25rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 24px;
  text-wrap: balance;
}
.auth-hero-text p {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  line-height: 1.5;
  color: #c4d7f5;
  max-width: 90%;
  text-wrap: balance;
  margin: 0;
}

.auth-hero-footer {
  display: flex;
  align-items: center;
  margin-top: auto;
}
.auth-hero-footer p {
  display: flex;
  flex-direction: column;
  font-size: 13.5px;
  line-height: 1.5;
  color: #fff;
  margin: 0;
}
.auth-hero-footer p b {
  font-weight: 600;
}
.auth-hero-footer p span {
  color: #94a9cc;
}

/* Right Side - Form */
.auth-form-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: clamp(32px, 5vw, 64px);
  background: #ffffff;
}
.auth-form-wrapper {
  width: 100%;
  max-width: 440px;
}
.mobile-only {
  display: none;
}

.auth-form-header {
  margin-bottom: 40px;
}
.auth-form-header h2 {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0e1f47;
  margin: 0 0 12px;
}
.auth-form-header p {
  font-size: 15.5px;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
}

.auth-form {
  display: grid;
  gap: 20px;
}
.auth-form.is-register {
  grid-template-columns: 1fr 1fr;
  gap: 20px 16px;
}
.auth-form.is-register .auth-field,
.auth-form.is-register .auth-error,
.auth-form.is-register .auth-button {
  grid-column: 1 / -1;
}
.auth-form.is-register .auth-field:nth-child(1),
.auth-form.is-register .auth-field:nth-child(2) {
  grid-column: span 1;
}

.auth-field {
  display: block;
  min-width: 0;
}
.auth-field label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 8px;
}
.auth-optional {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auth-input-box {
  position: relative;
}
.auth-input-box svg {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
  transition: color 0.2s ease;
}
.auth-input-box input {
  width: 100%;
  height: 54px;
  padding: 0 16px 0 46px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font-size: 15px;
  color: #0f172a;
  background: #f8fafc;
  transition: all 0.2s ease;
  outline: none;
}
.auth-input-box input::placeholder {
  color: #94a3b8;
}
.auth-input-box input:hover {
  border-color: #94a3b8;
}
.auth-input-box input:focus {
  background: #ffffff;
  border-color: #1470e0;
  box-shadow: 0 0 0 4px rgba(20, 112, 224, 0.15);
}
.auth-input-box input:focus + svg,
.auth-input-box:focus-within svg {
  color: #1470e0;
}
.auth-input-box input:user-invalid {
  border-color: #f87171;
}

.auth-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 56px;
  background: #1470e0;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(20, 112, 224, 0.25);
  margin-top: 6px;
  text-decoration: none;
}
.auth-button:hover {
  background: #115ebb;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(20, 112, 224, 0.35);
}
.auth-button:active {
  transform: translateY(0);
}
.auth-button.ghost {
  background: #f1f5f9;
  color: #334155;
  box-shadow: none;
}
.auth-button.ghost:hover {
  background: #e2e8f0;
}
.google-auth-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 52px;
  border: 1px solid #d7dee8;
  border-radius: 12px;
  background: #ffffff;
  color: #25324d;
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.google-auth-button:hover {
  border-color: #aab8cc;
  box-shadow: 0 5px 16px rgba(15, 31, 71, .1);
  transform: translateY(-1px);
}
.google-mark {
  display: inline-flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  flex: 0 0 20px;
}
.google-mark svg {
  display: block;
  width: 20px;
  height: 20px;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 2px;
  color: #8692a8;
  font-size: 12px;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  height: 1px;
  flex: 1;
  background: #e4e9f0;
}

.auth-error {
  margin: 0;
  font-size: 14px;
}
.auth-error:empty {
  display: none;
}
.auth-error:not(:empty) {
  padding: 12px 16px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: 10px;
}

.auth-footer {
  text-align: center;
  margin-top: 36px;
}
.auth-footer p {
  font-size: 14px;
  color: #64748b;
  margin: 0 0 12px;
}
.auth-footer a {
  color: #1470e0;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s ease;
}
.auth-footer a:hover {
  color: #0f52a8;
  text-decoration: underline;
}
.auth-privacy {
  font-size: 12px !important;
  color: #94a3b8 !important;
}

/* Standalone Pages (Verify / Unsubscribe) */
.auth-standalone {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  background: #0a1633;
}
.auth-standalone::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% -20%, rgba(20, 112, 224, 0.4) 0%, transparent 60%),
    linear-gradient(135deg, #091530 0%, #0e1f47 100%);
  z-index: 0;
}
.auth-standalone::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.06'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}
.auth-standalone-card {
  position: relative;
  z-index: 1;
  background: #ffffff;
  border-radius: 24px;
  padding: 48px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  text-align: center;
}
.auth-standalone-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.auth-standalone-icon.success {
  background: #ecfdf5;
  color: #059669;
}
.auth-standalone-icon.error {
  background: #fef2f2;
  color: #dc2626;
}
.auth-standalone-card h1 {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  margin: 0 0 12px;
}
.auth-standalone-card p {
  color: #64748b;
  font-size: 15.5px;
  line-height: 1.6;
  margin: 0 0 36px;
  text-wrap: balance;
}
.auth-standalone-card .auth-button {
  width: 100%;
}
.auth-forgot-link {
  display: block;
  margin: -2px 0 2px;
  color: #1470e0;
  font-size: 13px;
  font-weight: 600;
  text-align: right;
  text-decoration: none;
}
.auth-forgot-link:hover,
.auth-back-link:hover {
  text-decoration: underline;
}
.auth-provider-note {
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
  margin: 14px 0 18px;
  text-align: center;
}
.auth-provider-note a {
  color: #1470e0;
  font-weight: 600;
  text-decoration: none;
}
.auth-provider-note a:hover {
  text-decoration: underline;
}
.auth-recovery-card {
  max-width: 510px;
}
.auth-recovery-card .auth-standalone-icon {
  background: #eef4ff;
  color: #1470e0;
  font-size: 30px;
  font-weight: 700;
}
.auth-recovery-form {
  display: grid;
  gap: 16px;
  margin-top: 26px;
  text-align: left;
}
.auth-recovery-form .auth-field {
  display: grid;
  gap: 8px;
}
.auth-recovery-form .auth-field > span {
  color: #334155;
  font-size: 13px;
  font-weight: 600;
}
.auth-input {
  width: 100%;
  height: 54px;
  padding: 0 16px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  outline: none;
  background: #f8fafc;
  color: #0f172a;
  font-size: 15px;
  transition: all .2s ease;
}
.auth-input:hover {
  border-color: #94a3b8;
}
.auth-input:focus {
  border-color: #1470e0;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(20, 112, 224, .15);
}
.auth-recovery-form .auth-error {
  margin: 0;
}
.auth-back-link {
  display: inline-block;
  margin-top: 26px;
  color: #1470e0;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

/* Responsive */
@media (max-width: 900px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }
  .auth-hero {
    display: none;
  }
  .auth-form-container {
    padding: 40px 24px;
    align-items: center;
    justify-content: center;
    min-height: 100dvh;
  }
  .mobile-only {
    display: flex;
    margin-bottom: 48px;
  }
  .auth-logo-text {
    color: #0e1f47;
  }
  .auth-logo-text span {
    color: #64748b;
  }
}
@media (max-width: 600px) {
  .auth-form.is-register {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .auth-form.is-register .auth-field:nth-child(1),
  .auth-form.is-register .auth-field:nth-child(2) {
    grid-column: span 1;
  }
  .auth-form-container {
    padding: 24px 20px;
  }
  .auth-form-header h2 {
    font-size: 28px;
  }
  .auth-standalone-card {
    padding: 32px 24px;
  }
  .auth-standalone-card h1 {
    font-size: 26px;
  }
}
