/* style.css – Login-Design im Look von energieausweis.css */

/* ---- Design-Tokens (identisch zur App) ---------------------------------- */
:root {
  --bg: #f5f3e7;
  --surface: #ffffff;
  --text: #0b1220;
  --muted: #5f6b7a;
  --accent: #708d23;
  --accent-contrast: #ffffff;
  --accent-soft: #eef3e0;
  --border: #d7e3eb;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 10px 24px rgba(16, 24, 40, 0.07);
  --ring: 0 0 0 3px rgba(112, 141, 35, 0.22);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141a22;
    --surface: #1a2430;
    --text: #e9eef5;
    --muted: #a8b3c2;
    --accent: #7fa12c;
    --accent-contrast: #0c121a;
    --accent-soft: #1e2617;
    --border: #2a3846;
    --shadow: none;
    --ring: 0 0 0 3px rgba(127, 161, 44, 0.28);
  }
}

/* ---- Base / Mobile-First ------------------------------------------------ */
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  background: var(--bg);
}
body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell,
    'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  line-height: 1.5;
}

/* Centering der Karte */
body {
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

/* Karte */
.card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}

.card h1 {
  margin: 0.25rem 0 1rem;
  font-size: 1.35rem;
  letter-spacing: 0.2px;
}

/* Fehlerbox */
.error {
  border: 1px solid #e7b7b7;
  background: #fff5f5;
  color: #8a1f1f;
  border-radius: 12px;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
}

/* Formular */
form {
  display: grid;
  gap: 0.75rem;
}

label {
  font-size: 0.95rem;
  color: var(--muted);
}

input[type='text'],
input[type='password'] {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease,
    background-color 0.15s ease;
}
input::placeholder {
  color: #98a3af;
}
input:focus {
  outline: none;
  border-color: #c7d2a6;
  box-shadow: var(--ring);
  background: #fbfcf7;
}

/* Button – wie in der App */
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid #6b8622;
  background: linear-gradient(180deg, #7ba628 0%, #6a8a22 100%);
  color: var(--accent-contrast);
  box-shadow: 0 8px 18px rgba(112, 141, 35, 0.25);
  transition: filter 0.2s ease, transform 0.02s ease-in-out,
    box-shadow 0.2s ease;
}
.btn:hover {
  filter: brightness(1.03);
}
.btn:focus {
  outline: none;
  box-shadow: var(--ring), 0 8px 18px rgba(112, 141, 35, 0.25);
}
.btn:active {
  transform: translateY(1px);
}

/* Kleiner Hilfetext / Linkbereich (falls wieder aktiviert) */
.small {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
}
.small a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px dashed var(--border);
}
.small a:hover {
  background: var(--accent-soft);
}

/* Minimal-Responsive: auf größeren Screens etwas mehr Luft */
@media (min-width: 40em) {
  .card {
    padding: 1.5rem;
  }
  .card h1 {
    font-size: 1.5rem;
  }
}
