/* ============================================================
   Office XXL – Anmelden, Registrieren, Passwort vergessen/zurücksetzen
   Neues Design, Oktober 2026 (passt zur Startseite, Schriften vom eigenen Server)
   ============================================================ */

@font-face { font-family: 'Inter'; src: url('../fonts/inter-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url('../fonts/instrument-serif-latin-400-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --ink: #0b1020; --ink-3: #222b49; --paper: #f6f4ef; --muted: #545d72; --dim: #8a91a3;
    --line: rgba(11, 16, 32, 0.09); --line-2: rgba(11, 16, 32, 0.17);
    --accent: #2747e6; --ok: #0c8a5c; --danger: #c2261d;
    --grad: linear-gradient(115deg, #22d3ee 0%, #8b5cf6 52%, #f43f5e 100%);
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

html { -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh; min-height: 100dvh;
    background: var(--paper); color: var(--ink);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: calc(28px + env(safe-area-inset-top)) 18px calc(28px + env(safe-area-inset-bottom));
    position: relative; overflow-x: hidden;
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
}
body::before { content: ''; position: fixed; inset: 0; background-image: radial-gradient(rgba(11, 16, 32, 0.12) 1px, transparent 1.4px); background-size: 26px 26px; -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 0%, transparent 75%); mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 0%, transparent 75%); pointer-events: none; z-index: 0; }
body::after { content: ''; position: fixed; width: 640px; height: 640px; right: -220px; top: -260px; border-radius: 50%; background: var(--grad); opacity: 0.13; filter: blur(90px); pointer-events: none; z-index: 0; }
.bg-orb { display: none; }

.login-container, .register-container { position: relative; z-index: 1; width: 100%; max-width: 440px; animation: karte 0.7s var(--ease) both; }
.register-container { max-width: 520px; }
@keyframes karte { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.login-card, .register-card {
    position: relative; background: #fff; border: 1px solid var(--line); border-radius: 24px;
    padding: 34px 34px 30px; box-shadow: 0 2px 6px rgba(11, 16, 32, 0.05), 0 24px 60px rgba(11, 16, 32, 0.11);
}
.login-card::before, .register-card::before { content: ''; position: absolute; left: 34px; right: 34px; top: 0; height: 3px; border-radius: 0 0 3px 3px; background: var(--grad); }

.back-link { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 18px -8px; padding: 6px 10px 6px 6px; border-radius: 10px; color: var(--muted); font-size: 13.5px; font-weight: 500; text-decoration: none; transition: color 0.2s, background-color 0.2s; }
.back-link:hover { color: var(--ink); background: rgba(11, 16, 32, 0.05); }
.back-link svg { transition: transform 0.25s var(--ease); }
.back-link:hover svg { transform: translateX(-3px); }

.logo { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 22px !important; }
.logo img { max-width: 100%; }
/* das mitgelieferte quadratische Logo wirkt als App-Kachel; ein selbst hochgeladenes Logo bleibt unverändert */
.logo img[src$="assets/img/logo.png"] { border-radius: 22%; box-shadow: 0 10px 26px rgba(11, 16, 32, 0.20); }
.logo-icon { font-size: 28px; }
.logo-text { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; }
.logo-accent { color: var(--accent); }

h1 { font-size: 27px; line-height: 1.15; font-weight: 700; letter-spacing: -0.035em; margin-bottom: 6px; text-align: center; }
.subtitle { font-size: 15px; color: var(--muted); margin-bottom: 26px; text-align: center; }

.form-group { margin-bottom: 16px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-3); margin-bottom: 6px; }

input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="number"] {
    width: 100%; min-height: 50px; padding: 12px 15px; background: #fbfaf7; border: 1px solid var(--line-2); border-radius: 13px;
    color: var(--ink); font-family: inherit; font-size: 16px; font-weight: 500; line-height: 1.3; outline: none; -webkit-appearance: none; appearance: none;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}
input::placeholder { color: #a3a9b8; font-weight: 400; }
input[type="text"]:hover, input[type="email"]:hover, input[type="password"]:hover { border-color: rgba(11, 16, 32, 0.3); }
input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, input[type="tel"]:focus, input[type="number"]:focus { background: #fff; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(39, 71, 230, 0.13); }
input[type="checkbox"] { accent-color: var(--ink); }

.password-container { position: relative; }
.password-container input { padding-right: 48px; }
.password-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; display: grid; place-items: center; background: none; border: none; border-radius: 10px; color: var(--dim); cursor: pointer; transition: color 0.2s, background-color 0.2s; -webkit-tap-highlight-color: transparent; }
.password-toggle:hover { color: var(--ink); background: rgba(11, 16, 32, 0.05); }

.merken { display: flex; align-items: center; gap: 10px; margin: 2px 0 4px; font-size: 14.5px; font-weight: 500; color: var(--ink-3); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.merken input { width: 20px; height: 20px; flex: none; }
.merken small { color: var(--dim); font-size: 13px; font-weight: 400; }

.error-msg { background: rgba(194, 38, 29, 0.07); border: 1px solid rgba(194, 38, 29, 0.22); color: var(--danger); padding: 12px 15px; border-radius: 13px; font-size: 14px; line-height: 1.5; margin-bottom: 18px; animation: wackeln 0.45s var(--ease); }
@keyframes wackeln { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 60% { transform: translateX(4px); } }
.success-msg { border-radius: 13px !important; }
.trial-info { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 14px; margin-bottom: 20px; border-radius: 13px; background: rgba(12, 138, 92, 0.09); border: 1px solid rgba(12, 138, 92, 0.2); color: var(--ok); font-size: 14px; font-weight: 600; text-align: center; }

.btn-submit {
    width: 100%; min-height: 52px; padding: 14px; margin-top: 10px; background: var(--ink); color: #fff; border: none; border-radius: 14px;
    font-family: inherit; font-size: 16px; font-weight: 650; line-height: 1.2; letter-spacing: -0.005em; cursor: pointer;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 8px 22px rgba(11, 16, 32, 0.20);
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.2s; -webkit-tap-highlight-color: transparent;
}
.btn-submit:hover { background: var(--ink-3); transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 14px 30px rgba(11, 16, 32, 0.26); }
.btn-submit:active { transform: translateY(1px) scale(0.99); }
.btn-submit.laedt { pointer-events: none; opacity: 0.85; }
.btn-submit.laedt::after { content: ''; display: inline-block; width: 15px; height: 15px; margin-left: 10px; vertical-align: -2px; border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; border-radius: 50%; animation: dreh 0.7s linear infinite; }
@keyframes dreh { to { transform: rotate(360deg); } }

.register-link, .login-link { text-align: center; margin-top: 22px; font-size: 14.5px; color: var(--muted); }
.register-link a, .login-link a:not(.btn-submit) { color: var(--ink); font-weight: 650; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; transition: text-decoration-color 0.2s; }
.register-link a:hover, .login-link a:not(.btn-submit):hover { text-decoration-color: var(--ink); }
a { color: var(--accent); }

/* Hinweis „als App aufs Handy“ */
.app-tipp { position: relative; z-index: 1; width: 100%; max-width: 440px; margin-top: 14px; display: none; align-items: center; gap: 13px; padding: 13px 15px; background: rgba(255, 255, 255, 0.82); border: 1px solid var(--line); border-radius: 18px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: karte 0.7s 0.15s var(--ease) both; }
.app-tipp.zeigen { display: flex; }
.app-tipp img { width: 44px; height: 44px; border-radius: 11px; flex: none; box-shadow: 0 4px 12px rgba(11, 16, 32, 0.18); }
.app-tipp b { display: block; font-size: 14.5px; font-weight: 700; letter-spacing: -0.01em; }
.app-tipp span { display: block; font-size: 13px; line-height: 1.45; color: var(--muted); }
.app-tipp span svg { vertical-align: -4px; margin: 0 1px; color: var(--accent); }
.app-tipp-knopf { margin-left: auto; flex: none; padding: 10px 14px; border-radius: 11px; border: none; background: var(--ink); color: #fff; font-family: inherit; font-size: 13.5px; font-weight: 650; line-height: 1; cursor: pointer; }
.app-tipp-zu { flex: none; margin-left: auto; width: 34px; height: 34px; border-radius: 50%; border: none; background: rgba(11, 16, 32, 0.06); color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; }
.app-tipp-knopf + .app-tipp-zu { margin-left: 0; }

/* läuft die Seite als App vom Home-Bildschirm, gibt es keinen Weg „zurück zur Startseite“ */
html.oxxl-app .back-link { display: none; }

@media (max-width: 520px) {
    body { justify-content: flex-start; padding-top: calc(26px + env(safe-area-inset-top)); }
    html.oxxl-app body { justify-content: center; }
    .login-card, .register-card { padding: 28px 22px 24px; border-radius: 22px; }
    .login-card::before, .register-card::before { left: 22px; right: 22px; }
    h1 { font-size: 25px; }
    .row { grid-template-columns: 1fr; gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
}
