/* Servl CRM – Anmeldeseite (eigenständig, gleiche Farben wie die App) */

:root {
  color-scheme: light dark;
  --bg: #f4f6f9;
  --surface: #ffffff;
  --border: #dfe4ec;
  --border-strong: #c9d0db;
  --text: #121a2b;
  --text-2: #4b556a;
  --text-3: #667085;
  --accent: #1b2f55;
  --accent-fill: #1b2f55;
  --accent-fill-hover: #13233f;
  --on-accent: #ffffff;
  --warn: #9a5d00;
  --warn-soft: #fdf1dc;
  --danger: #c4342b;
  --danger-soft: #fdebea;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 8px 24px -8px rgba(16, 24, 40, 0.18);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a101c;
    --surface: #111a2b;
    --border: #243150;
    --border-strong: #34446a;
    --text: #e8ecf4;
    --text-2: #a7b2c8;
    --text-3: #8593ae;
    --accent: #8fa8d8;
    --accent-fill: #2a4378;
    --accent-fill-hover: #34508e;
    --warn: #e0a03c;
    --warn-soft: #2d2412;
    --danger: #f0625a;
    --danger-soft: #34191a;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px -8px rgba(0, 0, 0, 0.6);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 14px/1.45 var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
[hidden] { display: none !important; }

.login {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 24px 16px;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-fill);
  color: var(--on-accent);
  font-weight: 750;
  font-size: 19px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 16px; }
.brand-text span { font-size: 12px; color: var(--text-3); font-weight: 500; }

.card {
  width: 100%;
  max-width: 380px;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
h1 { margin: 0; font-size: 21px; font-weight: 720; letter-spacing: -0.02em; }
.lead { margin: 6px 0 18px; color: var(--text-2); }
form { display: grid; gap: 14px; }

.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.field em { font-style: normal; font-weight: 500; color: var(--text-3); }
input {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 9px 11px;
  width: 100%;
  min-width: 0;
}
input:focus {
  outline: 3px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-color: var(--accent);
}

.btn {
  height: 40px;
  border-radius: 9px;
  border: 1px solid var(--accent-fill);
  background: var(--accent-fill);
  color: var(--on-accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover { background: var(--accent-fill-hover); border-color: var(--accent-fill-hover); }
.btn:disabled { opacity: 0.6; cursor: progress; }

.form-error, .notice {
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 550;
}
.form-error { background: var(--danger-soft); color: var(--danger); }
.notice { margin-bottom: 14px; background: var(--warn-soft); color: var(--warn); }

.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 84px; }
.pw-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  padding: 4px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.pw-toggle:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
