/* Login and privacy pages (login.html, datenschutz.html). Colours come from base.css. */

a {
  color: var(--ink);
  font-weight: 600;
  text-underline-offset: 3px;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
  min-height: 100vh;
  min-height: 100dvh;
}

/* Left side (dark, like the sidebar) */

.auth-intro {
  background: var(--nav);
  color: var(--on-dark);
  padding: 36px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
}

.auth-intro .logo {
  padding: 0;
}

/* Big text on the left: looks like a heading, but the page heading (h1) is the form title */
.auth-intro .auth-headline {
  color: var(--on-dark);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 14px;
  max-width: 440px;
}

.auth-intro p {
  color: var(--on-dark-muted);
  line-height: 1.6;
  max-width: 440px;
  margin: 0;
}

.auth-points {
  list-style: none;
  padding: 0;
  margin: 30px 0 0;
  display: grid;
  gap: 14px;
}

.auth-points li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--on-dark-soft);
  font-size: 14px;
}

.auth-points span {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--nav-hover);
}

.auth-intro .auth-foot {
  font-size: 12px;
  color: var(--on-dark-faint);
}

/* Right side (form) */

.auth-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 32px 24px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 30px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 26px;
  background: var(--soft);
  border-radius: 12px;
}

.auth-tab {
  min-height: 40px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--muted);
  font-weight: 650;
}

.auth-tab:hover:not(:disabled) {
  transform: none;
  color: var(--ink);
}

.auth-tab.active {
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow-tab);
}

.auth-card h1 {
  margin: 0;
  font-size: 24px;
}

.auth-subtitle {
  margin: 6px 0 22px;
}

#authForm {
  display: grid;
  gap: 16px;
}

#authForm .field {
  min-width: 0;
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 96px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  min-height: 34px;
  padding: 0 11px;
  border: 0;
  border-radius: 7px;
  background: var(--soft);
  color: var(--label);
  font-size: 13px;
  font-weight: 600;
}

.password-toggle:hover:not(:disabled) {
  transform: translateY(-50%);
  color: var(--ink);
}

/* Password rules: bar and checklist */
.pw-meter {
  margin-top: 8px;
}

.pw-meter-bar {
  height: 6px;
  border-radius: 99px;
  background: var(--soft);
  overflow: hidden;
}

.pw-meter-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 99px;
  background: var(--orange);
  transition: width 0.15s ease, background 0.15s ease;
}

.pw-meter-bar span.ok {
  background: var(--green);
}

.pw-rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px 12px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}

.pw-rules li {
  display: flex;
  gap: 6px;
}

.pw-rules li::before {
  content: "○";
  flex: none;
  width: 1em;
  text-align: center;
}

.pw-rules li.met {
  color: var(--ink);
}

.pw-rules li.met::before {
  content: "✓";
  color: var(--green);
  font-weight: 700;
}

@media (max-width: 420px) {
  .pw-rules {
    grid-template-columns: 1fr;
  }
}

/* Label on the left, "Forgot password?" on the right */
.label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.link-button {
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--label);
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-button:hover:not(:disabled) {
  transform: none;
  color: var(--ink);
}

.auth-back {
  justify-self: center;
}

.auth-resend {
  width: 100%;
}

.auth-error,
.auth-notice {
  margin: 0;
  padding: 11px 13px;
  border-radius: 9px;
  font-size: 14px;
  line-height: 1.45;
}

.auth-error {
  background: var(--error-soft);
  color: var(--red);
}

.auth-notice {
  margin-bottom: 18px;
  background: var(--good-soft);
  color: var(--green);
}

.auth-submit {
  width: 100%;
  margin-top: 4px;
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  margin: 0;
  font-size: 13px;
}

.auth-links a {
  color: var(--muted);
}

/* Links to the legal pages at the end of the privacy policy, imprint, terms and contact page */
.legal-page .legal-links {
  margin-top: 28px;
}

/* Registration: accept the terms and the privacy policy */
.terms-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.45;
  cursor: pointer;
}

.terms-check input {
  flex: none;
  width: 24px;
  height: 24px;
  min-height: 0;
  margin: 1px 0 0;
  padding: 0;
  accent-color: var(--brand);
}

.terms-check a {
  color: var(--ink);
  font-weight: 600;
}

/* Privacy policy */

.legal-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 24px 64px;
}

.legal-page .back {
  display: inline-block;
  margin-bottom: 22px;
  font-size: 14px;
}

.legal-page h1 {
  margin: 0 0 6px;
  font-size: 30px;
}

.legal-page .card {
  margin-top: 16px;
  line-height: 1.65;
  font-size: 15px;
}

.legal-page h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.legal-page p,
.legal-page ul {
  margin: 0 0 10px;
}

.legal-page li {
  margin-bottom: 4px;
}

/* Phone */

@media (max-width: 860px) {
  .auth-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .auth-intro {
    padding: 20px;
    gap: 0;
  }

  .auth-intro .logo {
    font-size: 19px;
  }

  .auth-intro-text,
  .auth-intro .auth-foot {
    display: none;
  }

  .auth-panel {
    justify-content: flex-start;
    padding: 24px 16px 40px;
  }

  .auth-card {
    padding: 22px;
    border-radius: 18px;
  }

  .legal-page {
    padding: 24px 16px 48px;
  }
}

/* The logo on the login page links to the landing page */
.auth-logo {
  color: var(--on-dark);
  text-decoration: none;
}

/* Language and light switch top right */
.auth-panel .page-tools {
  align-self: flex-end;
}

.legal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.legal-top .back {
  margin-bottom: 0;
}

/* The login card fades in */
@media (prefers-reduced-motion: no-preference) {
  .auth-card {
    animation: auth-in 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .auth-card [data-show] {
    animation: auth-fade 0.25s ease both;
  }

  @keyframes auth-in {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
  }

  @keyframes auth-fade {
    from { opacity: 0; }
    to { opacity: 1; }
  }
}

/* Phones: "Forgot password?" gets a tap area of about 44px, same look */
@media (max-width: 760px) {
  .link-button {
    padding: 14px 6px;
    margin: -14px -6px;
  }
}

/* Confirming the account deletion from the email link (login.html?delete=…) */
.delete-confirm {
  display: grid;
  gap: 14px;
  margin-top: 8px;
}

.delete-confirm .note {
  margin: 0;
}

.danger-fill {
  width: 100%;
  background: var(--red);
  color: var(--on-dark);
}

.primary.danger-fill:hover:not(:disabled) {
  background: color-mix(in srgb, var(--red) 85%, #000);
}

.delete-confirm .auth-back {
  justify-self: center;
}

/* Pop-up "Du hast dein Konto gelöscht" (after ?deleted) */
.deleted-dialog {
  text-align: center;
}

.deleted-dialog .dialog-buttons {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.deleted-dialog .primary,
.deleted-dialog .secondary {
  display: block;
  text-align: center;
  text-decoration: none;
}

.deleted-dialog .link-button {
  align-self: center;
  margin-top: 4px;
}
