/* ==========================================================================
   AMCALC auth.css — die Auth-Bühne (Login / Registrierung / Dev-Gate)
   Aufbauend auf main.css (Tokens, Fonts, Cursor) + motion.css (Keyframes).
   Governance: keine echten Geschäftszahlen auf öffentlichen Seiten.
   ========================================================================== */

body.auth-body {
    min-height: 100vh; margin: 0; overflow-x: hidden;
    display: flex; align-items: center; justify-content: center;
    padding: 40px 20px;
    background:
        radial-gradient(900px 480px at 50% -10%, rgba(82, 232, 90, 0.05), transparent 60%),
        radial-gradient(700px 420px at 85% 108%, rgba(255, 201, 51, 0.05), transparent 60%),
        linear-gradient(var(--border-color) 1px, transparent 1px) 0 0 / 100% 56px,
        linear-gradient(90deg, var(--border-color) 1px, transparent 1px) 0 0 / 56px 100%,
        var(--bg-dark);
}
.auth-stage {
    display: grid; grid-template-columns: 1.15fr 1fr;
    gap: clamp(40px, 6vw, 90px); align-items: center; width: min(1120px, 100%);
}
@media (max-width: 980px) { .auth-stage { grid-template-columns: 1fr; } .auth-hero { display: none; } }

/* ── Hero: die Marken-Show ── */
.aw-word { font-size: clamp(3.25rem, 6.5vw, 4.5rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1; }
.aw-word .l { display: inline-block; animation: lRise 550ms var(--ease-pop) both; animation-delay: calc(var(--i) * 55ms); }
.aw-word .l.g { color: var(--accent-primary-text); }
.aw-word .l.au { color: var(--accent-gold-text); }
@keyframes lRise { 0% { transform: translateY(26px) rotate(3deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.aw-swoosh {
    height: 3px; width: 200px; background: var(--grad-swoosh); border-radius: 2px;
    margin: 18px 0 26px; transform-origin: left; animation: swooshX 700ms var(--ease-out) 350ms both;
}
@keyframes swooshX { from { transform: scaleX(0); } }
.auth-tag { margin: 0 0 4px; font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 600; letter-spacing: -0.02em; color: var(--text-primary); animation: pwEnter 400ms var(--ease-out) 300ms both; }
.grad-text { background: var(--grad-swoosh); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-tagsub { margin: 0 0 26px; color: var(--text-secondary); animation: pwEnter 400ms var(--ease-out) 380ms both; }
.auth-feats { display: flex; flex-direction: column; gap: 14px; }
.auth-feat { display: flex; gap: 12px; align-items: flex-start; animation: pwEnter 400ms var(--ease-out) both; animation-delay: calc(500ms + var(--i) * 110ms); }
.auth-feat svg {
    width: 18px; height: 18px; margin-top: 2px; flex: none;
    stroke: var(--accent-primary-text); stroke-width: 1.75; fill: none; stroke-linecap: round; stroke-linejoin: round;
    stroke-dasharray: 100; animation: authDraw 600ms var(--ease-out) both; animation-delay: calc(540ms + var(--i) * 110ms);
}
@keyframes authDraw { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
.auth-feat b { display: block; font-size: 0.875rem; color: var(--text-primary); }
.auth-feat span { color: var(--text-muted); font-size: 0.75rem; }

/* ── Karte ── */
.auth-card {
    width: min(420px, 100%); margin: 0 auto;
    background:
        radial-gradient(560px 200px at 88% -30%, rgba(255, 201, 51, 0.09), transparent 60%),
        radial-gradient(420px 180px at 2% -20%, rgba(82, 232, 90, 0.07), transparent 60%),
        var(--bg-card);
    border: 1px solid var(--border-color); border-radius: 12px;
    padding: 34px 34px 28px; position: relative;
    box-shadow: var(--card-inner-highlight);
    animation: authIn 340ms var(--ease-pop);
}
@keyframes authIn { from { opacity: 0; transform: translateY(10px) scale(0.985); } }
.auth-card.shake { animation: authShake 320ms var(--ease-io); }
@keyframes authShake { 20% { transform: translateX(-6px); } 45% { transform: translateX(5px); } 70% { transform: translateX(-3px); } 90% { transform: translateX(2px); } }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.auth-brand .mark {
    width: 34px; height: 34px; border-radius: 8px; flex: none;
    background: var(--grad-swoosh); color: var(--accent-primary-ink);
    display: grid; place-items: center; font-weight: 700; font-size: 1rem;
}
.auth-brand .wordmark { font-size: 1.375rem; font-weight: 600; letter-spacing: -0.02em; color: var(--accent-primary-text); }
.auth-brand .wordmark em { font-style: normal; color: var(--accent-gold-text); }
.auth-card h1 { margin: 0 0 4px; font-size: 1.125rem; font-weight: 600; color: var(--text-primary); }
.auth-card .sub { margin: 0 0 20px; color: var(--text-secondary); font-size: 0.8125rem; }

.auth-field { margin-bottom: 14px; }
.auth-field > label { display: block; font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 6px; }
.in-ico { position: relative; }
.in-ico svg.fi {
    position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
    width: 14px; height: 14px; pointer-events: none;
    stroke: var(--text-muted); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round;
    transition: stroke var(--t-fast) var(--ease-io);
}
.in-ico:focus-within svg.fi { stroke: var(--accent-primary); }
/* input.auth-input: gleiche Spezifität wie main.css input[type="password"] (0,1,1),
   aber später geladen -> das linke Icon-Padding (34px) gewinnt, sonst läuft der Text
   unter das Schloss-/Feld-Icon. */
input.auth-input {
    width: 100%; height: 38px; padding: 0 12px 0 34px; box-sizing: border-box;
    background: var(--bg-input); color: var(--text-primary);
    border: 1px solid var(--border-color); border-radius: 6px; font: inherit; font-size: 0.875rem;
    transition: border-color var(--t-fast) var(--ease-io), box-shadow var(--t-fast) var(--ease-io);
}
.auth-input::placeholder { color: var(--text-muted); }
.auth-input:focus { outline: none; border-color: var(--accent-primary); box-shadow: 0 0 0 3px var(--focus-ring); }
.auth-row { display: flex; justify-content: space-between; align-items: center; margin: 2px 0 18px; font-size: 0.78rem; }
.auth-row label { display: flex; gap: 7px; align-items: center; color: var(--text-secondary); cursor: pointer; }
.auth-row input[type="checkbox"], .auth-note input[type="checkbox"] { accent-color: var(--accent-primary); width: 15px; height: 15px; }
.auth-row a, .auth-alt a, .auth-note a { color: var(--accent-primary-text); text-decoration: none; font-weight: 500; }
.auth-row a:hover, .auth-alt a:hover { text-decoration: underline; text-underline-offset: 3px; }

.auth-btn {
    width: 100%; height: 38px; border: 0; border-radius: 6px; cursor: pointer;
    background: var(--accent-primary); color: var(--accent-primary-ink);
    font: inherit; font-size: 0.875rem; font-weight: 600;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
    position: relative; overflow: hidden;
    transition: background var(--t-fast) var(--ease-io), transform var(--t-press) var(--ease-io);
}
.auth-btn:hover { background: var(--accent-primary-hover); }
.auth-btn:active { transform: scale(0.98); }
.auth-btn::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.35) 50%, transparent 65%);
    transform: translateX(-130%); transition: transform 500ms var(--ease-io);
}
.auth-btn:hover::after { transform: translateX(130%); }
.auth-btn:disabled { opacity: 0.6; cursor: wait; }

.auth-error, .auth-success {
    border-radius: 8px; padding: 10px 12px; font-size: 0.8125rem; margin-bottom: 14px; line-height: 1.5;
}
.auth-error {
    border: 1px solid color-mix(in srgb, var(--accent-red-text) 35%, transparent);
    background: var(--tint-danger); color: var(--accent-red-text);
}
.auth-success {
    border: 1px solid color-mix(in srgb, var(--accent-green-text) 30%, transparent);
    background: var(--tint-success); color: var(--accent-green-text);
}
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0 14px; color: var(--text-muted); font-size: 0.75rem; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--table-row-separator); }
.auth-alt { text-align: center; font-size: 0.8125rem; color: var(--text-secondary); }

/* ── Passwort-Checkliste (Registrierung) ── */
.pw-meter { display: flex; gap: 4px; margin-top: 8px; }
.pw-meter i { height: 3px; flex: 1; border-radius: 2px; background: var(--border-strong); transition: background var(--t-fast) var(--ease-io); }
.pw-meter i.on { background: var(--accent-primary); }
.pw-checklist { margin: 8px 0 0; padding: 0; list-style: none; font-size: 0.6875rem; color: var(--text-muted); display: grid; grid-template-columns: 1fr 1fr; gap: 3px 10px; }
.pw-checklist li::before { content: "○ "; }
.pw-checklist li.ok { color: var(--accent-green-text); }
.pw-checklist li.ok::before { content: "✓ "; }
.auth-note { display: flex; gap: 8px; align-items: flex-start; font-size: 0.75rem; color: var(--text-muted); margin: 4px 0 16px; cursor: pointer; }

/* ── Dev-Gate ── */
.gate-card { text-align: center; }
.gate-badge {
    display: inline-flex; align-items: center; gap: 7px; margin: 0 auto 14px;
    height: 22px; padding: 0 10px; border-radius: 4px; font-size: 0.6875rem; font-weight: 500;
    color: var(--accent-green-text); background: var(--tint-success);
    border: 1px solid color-mix(in srgb, var(--accent-green-text) 25%, transparent);
}
.gate-badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: gatePulse 2s var(--ease-io) infinite; }
@keyframes gatePulse { 50% { opacity: 0.35; } }
.gate-term {
    margin: 18px 0 0; padding: 10px 12px; text-align: left;
    background: var(--bg-input); border: 1px solid var(--border-color); border-radius: 8px;
    font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-secondary);
    white-space: normal; overflow-wrap: anywhere; line-height: 1.6;
}
.type-cursor { display: inline-block; width: 7px; height: 13px; background: var(--accent-primary); vertical-align: -2px; margin-left: 2px; animation: blinkCur 1s steps(1) infinite; }
@keyframes blinkCur { 50% { opacity: 0; } }

/* ── Fuß ── */
.auth-foot {
    position: fixed; bottom: 14px; left: 0; right: 0; text-align: center;
    color: var(--text-muted); font-size: 0.6875rem;
}
.auth-foot a { color: var(--text-muted); text-decoration: none; margin: 0 6px; }
.auth-foot a:hover { color: var(--text-secondary); }
