/* E-Rechnung auth skin — aligned with Next.js login/register UI */

.erechnung-auth-alert {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 0.875rem;
  line-height: 1.5;
}

.erechnung-auth-alert--error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.erechnung-auth-alert--success {
  border-color: var(--erechnung-success-border, #fbcfe8);
  background: var(--erechnung-success-bg, #fdf2f8);
  color: var(--erechnung-success-fg, #831843);
}

.erechnung-auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  color: #0f172a;
}

.erechnung-auth-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  pointer-events: none;
}

.erechnung-auth-topbar > * {
  pointer-events: auto;
}

.erechnung-auth-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}

.erechnung-auth-back:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.erechnung-auth-lang {
  position: relative;
}

.erechnung-auth-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  border: none;
  background: transparent;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
}

.erechnung-auth-lang-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.erechnung-auth-lang-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 160px;
  padding: 0.25rem 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  list-style: none;
  margin: 0;
}

.erechnung-auth-lang.open .erechnung-auth-lang-menu {
  display: block;
}

.erechnung-auth-lang-menu a {
  display: block;
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  color: #334155;
  text-decoration: none;
}

.erechnung-auth-lang-menu a:hover,
.erechnung-auth-lang-menu a.active {
  background: #f8fafc;
  color: #0f172a;
}

.erechnung-auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 1.5rem 2rem;
}

.erechnung-auth-card {
  width: 100%;
  max-width: 28rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  padding: 1.5rem;
}

@media (min-width: 640px) {
  .erechnung-auth-card {
    padding: 1.75rem;
  }
}

.erechnung-auth-card h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  color: #0f172a;
}

.erechnung-auth-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: #64748b;
}

.erechnung-auth-form {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.erechnung-auth-field label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #475569;
}

.erechnung-auth-field input[type='text'],
.erechnung-auth-field input[type='email'],
.erechnung-auth-field input[type='password'] {
  width: 100%;
  height: 2.75rem;
  padding: 0 0.875rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  color: #0f172a;
  background: #fff;
  box-sizing: border-box;
}

.erechnung-auth-field input:focus {
  outline: none;
  border-color: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.25);
}

.erechnung-auth-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  /* justify-content: flex-end; */
  gap: 0.5rem;
  font-size: 0.875rem;
}

.erechnung-auth-row a {
  color: #0f172a;
  text-decoration: underline;
}

.erechnung-auth-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #475569;
}

.erechnung-auth-btn {
  width: 100%;
  height: 2.75rem;
  border: none;
  border-radius: 0.75rem;
  background: #0f172a;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.erechnung-auth-btn:hover {
  background: #1e293b;
}

.erechnung-auth-btn--secondary {
  background: #fff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
}

.erechnung-auth-btn--secondary:hover {
  background: #f8fafc;
}

.erechnung-auth-card--verify {
  text-align: center;
}

.erechnung-auth-card--verify h1,
.erechnung-auth-card--verify .erechnung-auth-subtitle {
  text-align: center;
}

.erechnung-auth-verify-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1.25rem;
  border-radius: 9999px;
  background: #f5f3ff;
  color: #7c3aed;
  display: flex;
  align-items: center;
  justify-content: center;
}

.erechnung-auth-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.erechnung-auth-change-email {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e2e8f0;
  text-align: left;
}

.erechnung-auth-footer {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: #475569;
}

.erechnung-auth-footer a {
  color: #0f172a;
  font-weight: 500;
  text-decoration: underline;
}

.erechnung-auth-divider {
  margin: 1.25rem 0;
  text-align: center;
  font-size: 0.875rem;
  color: #64748b;
  position: relative;
}

.erechnung-auth-divider::before,
.erechnung-auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 38%;
  height: 1px;
  background: #e2e8f0;
}

.erechnung-auth-divider::before {
  left: 0;
}

.erechnung-auth-divider::after {
  right: 0;
}

.erechnung-auth-social {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.erechnung-auth-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 2.75rem;
  padding: 0 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #fff;
  color: #0f172a;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s;
}

.erechnung-auth-social a:hover {
  background: #f8fafc;
}

.erechnung-auth-captcha {
  margin-top: 0.25rem;
}

.erechnung-auth-captcha .g-recaptcha {
  transform-origin: left top;
}

.erechnung-auth-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 480px) {
  .erechnung-auth-grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.erechnung-auth-demo {
  margin-top: 1.5rem;
  font-size: 0.75rem;
}

.erechnung-auth-demo table {
  width: 100%;
  border-collapse: collapse;
}

.erechnung-auth-demo th,
.erechnung-auth-demo td {
  border: 1px solid #e2e8f0;
  padding: 0.375rem 0.5rem;
  text-align: left;
}

/* Hide legacy login layout chrome */
.erechnung-auth-page .login-wrapper .bg,
.erechnung-auth-page .login-wrapper .col-lg-5 {
  display: none !important;
}

.erechnung-auth-body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  color: #0f172a;
}

.erechnung-auth-body .erechnung-site-footer {
  margin-top: auto;
  flex-shrink: 0;
}

/* Cookie banner sits outside .erechnung-auth-page — keep it above footer chrome */
.erechnung-auth-body .erechnung-cookie-banner {
  z-index: 10000;
}
