/* Auto-extracted from public/login.html (inline styles) */

* {
  box-sizing: border-box;
  font-family: var(--font-family-base);
}

[data-auth="ready"] body { visibility: visible; } body { visibility: hidden; }


/* === Variablen wie in profil.html === */
:root{
  --tb-green: #365945;
  --topbar-max-width: 400px;
  --topbar-padding-x: 20px;
}

/* === Layout-Anpassungen für Loginseite === */
body {
  margin: 0;
  background: #f5f5f5;
  display: flex;
  flex-direction: column;      /* Topbar oben, Inhalt darunter */
  min-height: 100vh;
  align-items: center;         /* horizontal mittig */
  padding: 0;                  /* Padding jetzt im <main> */
}

main{
  width:100%;
  flex:1;
  display:flex;
  align-items:center;          /* vertikal zentrieren */
  justify-content:center;      /* horizontal zentrieren */
  padding: 1rem;
}

.container {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
}

h1 {
  text-align: center;
  color: #365945;
  margin-bottom: 8px;
  font-size: 1.5rem;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: #333;
}

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 10px;
  margin-bottom: 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  color: #333;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus{
  box-shadow:0 0 0 1000px #fff inset;
  -webkit-box-shadow:0 0 0 1000px #fff inset;
  -webkit-text-fill-color:#333;
}

input::placeholder {
  color: #666;
  opacity: 1;
}

/* Passwortfeld mit Toggle */
.password-field { position: relative; display: grid; }
.password-field input { margin-bottom: 0; padding-right: 44px; }

.pw-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  color: #64748b;
  transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;             /* Nur fürs Icon */
  align-items: center;
  justify-content: center;
  width: auto;               /* Keine volle Breite */
  height: auto;
}

.pw-toggle:hover,
.pw-toggle:focus-visible {
  color: #64748b;
  background-color: var(--tb-focus-ring-gap);
  box-shadow: inset 0 0 0 1px #E5E7EB;
}

.pw-toggle:focus-visible {
  outline: 2px solid #E5E7EB;
  outline-offset: 2px;
}

.pw-toggle svg {
  width: 22px;
  height: 22px;
  pointer-events: none;      /* Nur Button reagiert */
}

.options {
  display: flex;
  justify-content: space-between; /* links/rechtsbündig */
  align-items: center;            /* exakt gleiche Höhe/Mitte */
  margin: 8px 0 16px;             /* sitzt sauber zwischen Feld & Button */
  font-size: 0.95rem;
  min-height: 44px;               /* optische Höhe ~ Eingabefeld */
}

.options label {
  display: inline-flex;      /* Checkbox & Text auf einer Linie */
  align-items: center;
  gap: 0.5rem;
  margin: 0;                 /* keine Zusatzverschiebung */
  font-weight: 400;
}

.options input[type="checkbox"]{
  accent-color: var(--tb-green);
  -webkit-appearance:none;
  appearance:none;
  width:16px;
  height:16px;
  margin:0;
  border:2px solid rgba(54,89,69,.4);
  border-radius:5px;
  display:grid;
  place-items:center;
  background:#fff;
  cursor:pointer;
  flex:0 0 auto;
}

.options input[type="checkbox"]::after{
  content:'';
  width:8px;
  height:8px;
  border-radius:2px;
  background:var(--tb-green);
  transform:scale(0);
  transition:transform .18s ease;
}

.options input[type="checkbox"]:checked{
  border-color:var(--tb-green);
  background:rgba(54,89,69,.12);
}

.options input[type="checkbox"]:checked::after{
  transform:scale(1);
}

.options input[type="checkbox"]:focus-visible{
  outline:2px solid rgba(54, 89, 69, 0.45);
  outline-offset:2px;
}

.options a {
  color: #365945;
  text-decoration: none;
  font-size: 0.95rem;
  line-height: 1;           /* verhindert optisches „Absacken“ */
  transition: opacity 0.2s ease;
}
.options a:hover { text-decoration: underline; }
.options a[aria-disabled="true"] {
  opacity: 0.55;
  pointer-events: none;
  text-decoration: none;
  cursor: default;
}

.status-tray {
  display: none;
  margin: 0 0 16px;
  padding: 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  line-height: 1.5;
  background: rgba(54, 89, 69, 0.08);
  color: #365945;
}
.status-tray[data-visible="true"] {
  display: block;
}
.status-tray.status-success {
  background: rgba(54, 89, 69, 0.12);
  color: #365945;
}
.status-tray.status-error {
  background: rgba(163, 21, 21, 0.12);
  color: #410000;
}

button {
  width: 100%;
  padding: 0.75rem;
  background-color: var(--tb-green);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}

button:hover {
  background-color: var(--tb-green-hover);
}

button:active {
  background-color: var(--tb-green-active);
}

button:focus-visible {
  background-color: var(--tb-green-hover);
  outline: 2px solid rgba(54, 89, 69, 0.35);
  outline-offset: 2px;
}

.toggle {
  margin-top: 1.5rem;
  text-align: center;
  color: #365945;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
}

#errorMsg {
  display: none;
  color: #000;
  font-style: italic;
  font-size: 0.9rem;
  margin-top: 4px;
  margin-bottom: 16px;
}
