/* Rostify – Anmeldeseite login.rostify.app (Layout 2026, design_handoff_polish_v5 Richtung 1f).
   Eigenständig: der Login-Server hat keine tokens.css. Die Schriften kommen aus
   /css/rs/fonts.css (self-hosted, gleiche Dateien wie in der App). Diese Datei trägt die
   gebrauchten Tokens selbst und danach den Auth-Stil, angepasst an die Anmeldung
   (drei Felder, dynamischer Firmenblock statt Schrittanzeige). */

:root {
  --rs-teal-tint:   #E7EFEF;
  --rs-teal-strong: #295154;
  --rs-teal-deep:   #23403F;
  --rs-teal-soft:   #8AB6BA;
  --rs-ink:         #12292B;
  --rs-ink-2:       #3E4B49;
  --rs-muted:       #5F6B69;
  --rs-muted-2:     #6C7A78;
  --rs-muted-3:     #8A9391;
  --rs-line:        #E3E6E6;
  --rs-line-soft:   #EDEDF1;
  --rs-bg-2:        #FAFAFC;
  --rs-white:       #FFFFFF;
  --rs-pink-fg:     #B4527A;
  --rs-pink-line:   #E8A0BC;
  --rs-warn-bg:     #FBF1DC;
  --rs-warn-fg:     #8A6A22;
  --rs-font-display: 'Familjen Grotesk', system-ui, sans-serif;
  --rs-font-sans:    'IBM Plex Sans', system-ui, sans-serif;
  --rs-font-mono:    'IBM Plex Mono', ui-monospace, monospace;
  --rs-r-ctl:  9px;
  --rs-r-row:  12px;
  --rs-r-chip: 6px;
}

/* ─ Grundgerüst ───────────────────────────────────────────────────────────── */
body.rs-auth {
	position: static; margin: 0; padding: 0;
	width: 100%; height: auto; min-height: 100vh;
	background: var(--rs-white);
	font-family: var(--rs-font-sans); font-size: 14px; line-height: 1.5;
	color: var(--rs-ink); -webkit-font-smoothing: antialiased;
}
.rs-auth-split { display: flex; min-height: max(600px, 100vh); }   /* waechst mit dem Inhalt, nie fest */
.rs-auth-split, .rs-auth-split *, .rs-auth-split *::before, .rs-auth-split *::after { box-sizing: border-box; }

/* ─ Linke Bahn: Aussage auf tiefem Teal ───────────────────────────────────── */
.rs-auth-stage {
	position: relative; flex: 1 1 58%; min-width: 0; overflow: hidden;
	background: var(--rs-teal-strong); color: var(--rs-white);
	display: flex; flex-direction: column; justify-content: space-between;
	padding: 36px 48px 40px;
}
.rs-auth-grid {
	position: absolute; inset: 0 -40px -40px 0;
	display: grid; grid-template-columns: repeat(auto-fill, 40px); grid-auto-rows: 40px; gap: 1px;
	pointer-events: none;
	-webkit-mask-image: linear-gradient(212deg, rgba(0,0,0,.95), rgba(0,0,0,.35) 38%, rgba(0,0,0,0) 66%);
	        mask-image: linear-gradient(212deg, rgba(0,0,0,.95), rgba(0,0,0,.35) 38%, rgba(0,0,0,0) 66%);
}
.rs-auth-cell {
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	border-radius: var(--rs-r-chip); background: rgba(255,255,255,.12); overflow: hidden;
}
.rs-auth-cell.is-void { background: rgba(255,255,255,.05); }
.rs-auth-cell b {
	display: block; width: 100%; padding: 4px 0 2px;
	font-family: var(--rs-font-mono); font-weight: 600; font-size: 11.5px; line-height: 13px;
	text-align: center; color: rgba(255,255,255,.62); background: rgba(255,255,255,.07);
}
.rs-auth-cell i {
	display: block; width: 100%; padding: 2px 0 4px;
	font-family: var(--rs-font-mono); font-weight: 500; font-size: 9.5px; line-height: 11px;
	font-style: normal; text-align: center; color: rgba(255,255,255,.38);
}
.rs-auth-logo { position: relative; align-self: flex-start; width: 152px; height: auto; }
.rs-auth-claim { position: relative; max-width: 480px; }
.rs-auth-eyebrow {
	font-family: var(--rs-font-mono); font-weight: 500; font-size: 10.5px; letter-spacing: 1.4px;
	text-transform: uppercase; color: rgba(255,255,255,.70); margin-bottom: 18px;
}
.rs-auth-claim h1 {
	margin: 0 0 18px; padding: 0;
	font-family: var(--rs-font-display); font-weight: 600; font-size: 44px; line-height: 1.06;
	letter-spacing: -1px; color: var(--rs-white);
}
.rs-auth-claim p { margin: 0; font-size: 15px; line-height: 1.55; color: rgba(255,255,255,.80); max-width: 430px; }

/* ─ Rechte Bahn: volle weiße Fläche ───────────────────────────────────────── */
.rs-auth-panel { flex: 0 0 clamp(420px, 36%, 600px); min-width: 0; background: var(--rs-white); display: flex; align-items: center; padding: 38px 40px; }
.rs-auth-form { width: 100%; max-width: 360px; margin: 0 auto; }
.rs-auth-eyebrow-dark {
	font-family: var(--rs-font-mono); font-weight: 500; font-size: 10.5px; letter-spacing: 1.4px;
	text-transform: uppercase; color: var(--rs-muted-2); margin-bottom: 10px;
}
.rs-auth-title {
	margin: 0 0 22px; padding: 0;
	font-family: var(--rs-font-display); font-weight: 600; font-size: 27px; line-height: 1.15;
	letter-spacing: -.5px; color: var(--rs-ink);
}

/* ─ Dynamischer Firmenblock (getCdata) ────────────────────────────────────── */
.rs-login-org {
	display: none; align-items: center; gap: 12px;
	margin: 0 0 20px; padding: 12px 14px;
	border: 1px solid var(--rs-line-soft); 
	border-radius: var(--rs-r-row); background: var(--rs-bg-2);
}
.rs-login-org.is-on { display: flex; }
.rs-login-org-logo { flex: none; display: flex; align-items: center; }
.rs-login-org-logo:empty { display: none; }
/* Kundenlogos reichen von 3,6:1 bis quadratisch – Hoehe deckeln, Breite begrenzen */
.rs-login-org-logo img { display: block; max-height: 34px; max-width: 120px; width: auto; height: auto; object-fit: contain; }
.rs-login-org-name { font-family: var(--rs-font-display); font-weight: 600; font-size: 16px; color: var(--rs-ink); line-height: 1.2; }
.rs-login-org-name:empty::before { content: ""; }

/* ─ Felder ────────────────────────────────────────────────────────────────── */
.rs-auth-fi { margin-bottom: 16px; }
.rs-auth-fi > label {
	display: block; padding: 0; margin: 0 0 7px;
	font-family: var(--rs-font-mono); font-weight: 500; font-size: 10.5px; letter-spacing: 1.4px;
	text-transform: uppercase; color: var(--rs-muted-2);
}
.rs-auth-ctl { position: relative; display: flex; align-items: center; }
.rs-auth-in {
	width: 100%; height: 46px; box-sizing: border-box; padding: 0 14px 0 13px;
	border: 1px solid var(--rs-line); border-left: 3px solid var(--rs-teal-strong);
	border-radius: var(--rs-r-ctl); background: var(--rs-white);
	font-family: var(--rs-font-mono); font-weight: 500; font-size: 14.5px; color: var(--rs-ink);
	transition: border-color .15s ease, box-shadow .15s ease;
}
.rs-auth-in::placeholder { color: var(--rs-muted-3); font-weight: 400; }
.rs-auth-in:focus { outline: none; border-color: var(--rs-teal-strong); box-shadow: 0 0 0 3px rgba(62,118,124,.16); }
.rs-auth-ctl.has-eye .rs-auth-in { padding-right: 44px; }
.rs-auth-eye {
	position: absolute; right: 6px; width: 34px; height: 34px;
	display: flex; align-items: center; justify-content: center;
	border: 0; border-radius: 7px; background: none; cursor: pointer; color: var(--rs-muted-2); font-size: 15px;
}
.rs-auth-eye:hover { background: var(--rs-teal-tint); color: var(--rs-teal-deep); }
.rs-auth-eye:focus-visible { outline: 2px solid var(--rs-teal-strong); outline-offset: 1px; }

/* ─ Aktion ────────────────────────────────────────────────────────────────── */
.rs-auth-btn {
	display: flex; align-items: center; justify-content: center; gap: 10px;
	width: 100%; height: 52px; box-sizing: border-box;
	border: 1px solid var(--rs-ink); border-radius: var(--rs-r-ctl);
	background: var(--rs-ink); color: var(--rs-white);
	font-family: var(--rs-font-sans); font-weight: 600; font-size: 15px; cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease;
}
.rs-auth-btn:hover { background: #23302E; border-color: #23302E; }
.rs-auth-btn:focus-visible { outline: 2px solid var(--rs-teal-strong); outline-offset: 2px; }

/* ─ Fuß / Reset-Link ──────────────────────────────────────────────────────── */
.rs-auth-foot {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--rs-line-soft);
	font-size: 13px; color: var(--rs-muted-3); min-height: 20px;
}
.rs-auth-foot a { color: var(--rs-teal-strong); text-decoration: none; font-weight: 500; }
.rs-auth-foot a:hover { text-decoration: underline; }
#forgotpwd { padding: 0; }
#forgotpwd:empty { display: none; }

/* ─ Statusmeldung (Fehler aus ?error=) ────────────────────────────────────── */
.rs-auth-msg { margin: 0 0 20px; padding: 12px 14px; border-radius: var(--rs-r-row); font-size: 13px; line-height: 1.45; }
.rs-auth-msg.is-bad  { background: #FBE7EF; color: var(--rs-pink-fg); }
.rs-auth-msg.is-warn { background: var(--rs-warn-bg); color: var(--rs-warn-fg); }
.rs-auth-copy { margin: 16px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--rs-muted-3); text-align: center; }
.rs-auth-copy a { color: var(--rs-muted-2); text-decoration: none; }
.rs-auth-copy a:hover { text-decoration: underline; }

/* ─ Sprachumschalter (oben rechts in der weissen Bahn) ────────────────────── */
.rs-auth-panel { position: relative; }
.rs-auth-lang {
	position: absolute; top: 20px; right: 40px;
	display: flex; align-items: center; gap: 2px;
	font-family: var(--rs-font-mono); font-weight: 500; font-size: 10.5px; letter-spacing: 1.2px;
}
.rs-auth-lang a {
	padding: 4px 7px 3px;
	border-radius: var(--rs-r-chip);
	color: var(--rs-muted-3); text-decoration: none;
	transition: background-color .15s ease, color .15s ease;
}
.rs-auth-lang a:hover { background: var(--rs-bg-2); color: var(--rs-ink-2); }
.rs-auth-lang a.is-on { background: var(--rs-teal-tint); color: var(--rs-teal-deep); }
.rs-auth-lang a:focus-visible { outline: 2px solid var(--rs-teal-strong); outline-offset: 1px; }
@media (max-width: 899px) { .rs-auth-lang { top: 14px; right: 24px; } }
@media (prefers-reduced-motion: reduce) { .rs-auth-lang a { transition: none; } }

/* ─ Schmale Fenster ───────────────────────────────────────────────────────── */
@media (max-width: 899px) {
	.rs-auth-split { flex-direction: column; min-height: 100vh; }
	.rs-auth-stage { flex: none; padding: 26px 24px 30px; }
	.rs-auth-claim h1 { font-size: 30px; margin-bottom: 10px; }
	.rs-auth-claim p { font-size: 14px; }
	.rs-auth-eyebrow { margin-bottom: 12px; }
	.rs-auth-logo { width: 128px; margin-bottom: 26px; }
	.rs-auth-panel { flex: 1 1 auto; padding: 32px 24px 44px; align-items: flex-start; }
	.rs-auth-grid { inset: 0 -40px -20px 0; }
}
@media (max-width: 479px) { .rs-auth-claim p { display: none; } }
@media (prefers-reduced-motion: reduce) { .rs-auth-in, .rs-auth-btn { transition: none; } }
