*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  color: var(--text);
  background-color: var(--rv-color-primary);
  -webkit-font-smoothing: antialiased;
}

.auth-layout {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

.auth-brand-panel {
  flex: 1 1 46%;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1200px 600px at -10% 110%, rgba(94, 234, 212, 0.22), transparent 55%),
    radial-gradient(900px 480px at 110% -10%, rgba(240, 253, 250, 0.16), transparent 50%),
    linear-gradient(165deg, #115E59 0%, #0F766E 42%, #134E4A 100%);
  color: #F0FDFA;
  display: flex;
  flex-direction: column;
  padding: 48px 64px 56px;
}

.auth-brand-panel::after {
  content: "";
  position: absolute;
  inset: auto -80px -120px auto;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  border: 48px solid rgba(240, 253, 250, 0.06);
  pointer-events: none;
}

.auth-brand-panel .logo {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: #F0FDFA;
  letter-spacing: -0.04em;
}

.auth-brand-panel .logo img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
}

.auth-brand-panel .brand-content {
  position: relative;
  z-index: 1;
  margin: auto 0;
  max-width: 440px;
}

.auth-brand-panel .hero-text {
  font-family: var(--font-heading);
  font-size: 48px;
  font-weight: 700;
  line-height: 1.08;
  color: #F0FDFA;
  margin: 0 0 20px;
  letter-spacing: -0.045em;
}

.auth-brand-panel .sub-text {
  font-size: 17px;
  color: #CCFBF1;
  line-height: 1.6;
  margin: 0;
  max-width: 400px;
}

.auth-form-panel {
  flex: 1 1 54%;
  background-color: #FAFDFC;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
}

.login-form {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
}

.form-header {
  margin-bottom: 28px;
}

.form-header h2 {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text);
  letter-spacing: -0.03em;
}

.form-header p {
  font-size: 15px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 18px;
}

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.label-row label {
  margin-bottom: 0;
}

.forgot-link {
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.forgot-link:hover {
  text-decoration: underline;
}

input[type="email"],
input[type="password"] {
  width: 100%;
  height: 44px;
  border: 1px solid #D1E7E4;
  border-radius: 8px;
  padding: 0 14px;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  background-color: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="email"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.18);
}

input::placeholder {
  color: #9CA3AF;
}

button[type="submit"] {
  width: 100%;
  height: 44px;
  background-color: var(--primary);
  color: #F0FDFA;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--rv-motion-fast);
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

button[type="submit"]:hover {
  background-color: var(--primary-hover);
}

.form-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.form-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.form-footer a:hover {
  text-decoration: underline;
}

.flash {
  margin-bottom: 16px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
}

.flash-error {
  background: #fef2f2;
  color: #b91c1c;
}

.auth-local {
  margin-top: 8px;
  border-top: 1px solid #D1E7E4;
  padding-top: 18px;
}

.auth-local summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  list-style: none;
  margin-bottom: 16px;
}

.auth-local summary::-webkit-details-marker {
  display: none;
}

.auth-local summary:hover {
  color: var(--primary);
}

.rv-account-embed {
  margin: 0 0 8px;
  border-radius: 10px;
}

@media (max-width: 768px) {
  .auth-layout {
    flex-direction: column;
    min-height: 100vh;
  }

  .auth-brand-panel {
    padding: 28px 24px 32px;
    min-height: auto;
  }

  .auth-brand-panel .hero-text {
    font-size: 32px;
    letter-spacing: -0.03em;
  }

  .auth-brand-panel .brand-content {
    margin: 28px 0 8px;
  }

  .auth-form-panel {
    padding: 28px 20px 40px;
    align-items: stretch;
  }

  .login-form {
    width: 100%;
    max-width: 100%;
  }
}
