/* Lizenzmanager Setup – Dark Premium No-Scroll Variante */
:root {
    color-scheme: dark;
    --bg: #060914;
    --bg-2: #0A1022;
    --surface: rgba(15, 23, 42, 0.92);
    --surface-strong: rgba(15, 23, 42, 0.96);
    --surface-soft: rgba(30, 41, 59, 0.62);
    --line: rgba(148, 163, 184, 0.18);
    --line-strong: rgba(165, 180, 252, 0.35);
    --text: #F8FAFC;
    --muted: #94A3B8;
    --muted-2: #64748B;
    --primary: #6366F1;
    --primary-2: #8B5CF6;
    --primary-3: #A5B4FC;
    --success: #10B981;
    --success-soft: rgba(16, 185, 129, 0.12);
    --danger: #EF4444;
    --danger-soft: rgba(239, 68, 68, 0.12);
    --warning: #F59E0B;
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 28px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    --font-mono: "SF Mono", Monaco, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html {
    min-height: 100%;
    scroll-behavior: smooth;
    text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: var(--font-sans);
    color: var(--text);
    background:
        radial-gradient(circle at 15% 10%, rgba(99, 102, 241, 0.22), transparent 34rem),
        radial-gradient(circle at 85% 20%, rgba(139, 92, 246, 0.18), transparent 30rem),
        linear-gradient(135deg, var(--bg), var(--bg-2));
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
    overflow-x: hidden;
}

button,
input,
select,
textarea { font: inherit; }

button { cursor: pointer; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.field-no-caption {
    gap: 0;
}

::selection {
    background: rgba(165, 180, 252, 0.35);
    color: var(--text);
}

#matrix-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    opacity: 0.08;
    pointer-events: none;
}

.setup-shell,
.auth-shell {
    position: relative;
    z-index: 1;
}

.auth-shell {
    width: min(100% - 2rem, 900px);
    min-height: 100vh;
    margin: 0 auto;
    display: grid;
    place-items: center;
    padding: clamp(1rem, 4vw, 2rem) 0;
}

.auth-card {
    width: 100%;
    padding: clamp(2rem, 7vw, 4rem);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.82));
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px);
    text-align: center;
}

.brand-mark {
    width: 74px;
    height: 74px;
    margin: 0 auto 1.45rem;
    display: grid;
    place-items: center;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.22), rgba(139, 92, 246, 0.18));
    border: 1px solid var(--line-strong);
    box-shadow: 0 18px 40px rgba(99, 102, 241, 0.22);
    font-size: 2.2rem;
}

.eyebrow {
    margin: 0 0 0.45rem;
    color: var(--primary-3);
    text-transform: uppercase;
    letter-spacing: 0.13em;
    font-size: 0.75rem;
    font-weight: 800;
}

h1,
h2,
h3,
p { margin-top: 0; }

.auth-card h1,
.progress-copy h1,
.section-head h2 {
    margin-bottom: 0.65rem;
    line-height: 1.08;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, #FFFFFF, #C7D2FE 70%, #A5B4FC);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.auth-card h1 { font-size: clamp(2rem, 6vw, 3.45rem); }

.lead,
.section-head p,
.progress-copy p,
.microcopy,
.field small,
.toggle-card small,
.step-item small {
    color: var(--muted);
}

.lead {
    max-width: 48ch;
    margin: 0 auto 2rem;
    font-size: 1.05rem;
}

.lead-key {
    max-width: none;
}

.lead-key .lead-line {
    display: block;
    white-space: nowrap;
}

.lead-key .lead-line:last-child {
    font-size: clamp(0.62rem, 2.2vw, 1.05rem);
    letter-spacing: -0.012em;
}

.microcopy {
    margin: 1.35rem 0 0;
    font-size: 0.9rem;
}

.setup-shell {
    width: min(100% - 1.5rem, 1320px);
    min-height: 100vh;
    margin: 0 auto;
    padding: clamp(1rem, 2.5vw, 2rem) 0 clamp(2rem, 5vw, 4rem);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    color: var(--text);
    text-decoration: none;
}

.brand-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: rgba(99, 102, 241, 0.16);
    border: 1px solid var(--line);
}

.brand strong,
.brand small {
    display: block;
}

.brand strong { font-size: 1rem; }
.brand small { color: var(--muted); font-size: 0.82rem; }

.step-pill {
    padding: 0.55rem 0.95rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.66);
    color: var(--primary-3);
    font-weight: 800;
    font-size: 0.86rem;
    white-space: nowrap;
}

.setup-card {
    min-height: auto;
    display: grid;
    grid-template-columns: minmax(280px, 380px) 1fr;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px);
    overflow: visible;
}

.setup-progress {
    padding: clamp(1.25rem, 3vw, 2rem);
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.62)),
        radial-gradient(circle at top left, rgba(99, 102, 241, 0.22), transparent 24rem);
    border-right: 1px solid var(--line);
}

.progress-copy h1 {
    margin-top: 0;
    font-size: clamp(1.8rem, 4vw, 2.4rem);
}

.meter {
    height: 8px;
    overflow: hidden;
    margin: 1.4rem 0 1.25rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
}

.meter span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), var(--primary-2));
    box-shadow: 0 0 24px rgba(99, 102, 241, 0.55);
    transition: width 0.45s ease;
}

.steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.65rem;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.78rem;
    border: 1px solid transparent;
    border-radius: 16px;
    color: inherit;
    text-decoration: none;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.step-item b,
.step-item small { display: block; }
.step-item b { font-size: 0.92rem; }
.step-item small { font-size: 0.78rem; }

.step-item.is-active {
    border-color: var(--line-strong);
    background: rgba(99, 102, 241, 0.12);
}

.step-item.is-done {
    background: rgba(16, 185, 129, 0.08);
}

.step-item.is-done:hover {
    transform: translateY(-1px);
    border-color: rgba(16, 185, 129, 0.28);
}

.step-item.is-future { opacity: 0.46; }

.step-num {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--line);
    color: var(--muted);
    font-weight: 900;
}

.is-active .step-num {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.45);
}

.is-done .step-num {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--success), #059669);
}

.setup-content {
    padding: clamp(1.25rem, 4vw, 3rem);
    overflow: visible;
}

.section-head {
    max-width: 760px;
    margin-bottom: 1.5rem;
}

.section-head h2 {
    font-size: clamp(1.7rem, 4vw, 2.55rem);
}

.section-head p { margin-bottom: 0; }

.stack { display: grid; gap: 1.15rem; }

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.field {
    display: grid;
    gap: 0.45rem;
    align-content: start;
    align-self: start;
}

.field-centered { text-align: center; }
.field-full { grid-column: 1 / -1; }

.field span:first-child {
    color: #CBD5E1;
    font-size: 0.88rem;
    font-weight: 800;
}

.field em {
    color: #FCA5A5;
    font-style: normal;
}

.field input,
.field select {
    width: 100%;
    min-height: 48px;
    padding: 0.85rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(15, 23, 42, 0.62);
    color: var(--text);
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.field input::placeholder { color: var(--muted-2); }

.field input:focus,
.field select:focus {
    border-color: var(--line-strong);
    background: rgba(15, 23, 42, 0.9);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.14);
}

.field small {
    font-size: 0.78rem;
}

[data-format-key] {
    text-align: center;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-family: var(--font-mono);
    font-weight: 800;
}

.password-wrap {
    position: relative;
    display: block;
}

.password-wrap input { padding-right: 3.1rem; }

.password-toggle {
    position: absolute;
    top: 50%;
    right: 0.35rem;
    width: 40px;
    height: 40px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    display: grid;
    place-items: center;
}

.password-toggle:hover {
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary-3);
}

.password-toggle svg {
    width: 20px;
    height: 20px;
}


.password-strength {
    display: grid;
    gap: 0.5rem;
    margin-top: 0.65rem;
    width: 100%;
}

.password-strength-track {
    display: block;
    width: 100%;
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.48) inset;
}

.password-strength-track span {
    display: block;
    width: 0;
    min-width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--muted-2);
    transition: width 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.password-strength[data-strength-level="empty"] .password-strength-track span {
    background: transparent;
    box-shadow: none;
}

.password-strength[data-strength-level="weak"] .password-strength-track span {
    background: #ef4444;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.38);
}

.password-strength[data-strength-level="medium"] .password-strength-track span {
    background: #f59e0b;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.34);
}

.password-strength[data-strength-level="good"] .password-strength-track span {
    background: #84cc16;
    box-shadow: 0 0 16px rgba(132, 204, 22, 0.32);
}

.password-strength[data-strength-level="strong"] .password-strength-track span {
    background: #22c55e;
    box-shadow: 0 0 16px rgba(34, 197, 94, 0.36);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.2rem;
}

.btn {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.25rem;
    border: 1px solid transparent;
    border-radius: 14px;
    font-weight: 850;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    flex: 1;
    min-width: 180px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 14px 28px rgba(99, 102, 241, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.btn-primary:hover {
    box-shadow: 0 18px 38px rgba(99, 102, 241, 0.42), 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}

.btn-secondary {
    flex: 1;
    min-width: 180px;
    color: #DDE6F3;
    background: rgba(15, 23, 42, 0.66);
    border-color: var(--line);
}

.btn-secondary:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--line-strong);
}

.btn-wide { width: 100%; }

.alert {
    margin-bottom: 1rem;
    padding: 0.95rem 1rem;
    border-radius: 14px;
    border: 1px solid var(--line);
    font-weight: 700;
}

.alert-error {
    color: #FCA5A5;
    background: var(--danger-soft);
    border-color: rgba(239, 68, 68, 0.34);
}

.alert-success {
    color: #86EFAC;
    background: var(--success-soft);
    border-color: rgba(16, 185, 129, 0.34);
}

.alert-info {
    color: #BFDBFE;
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(96, 165, 250, 0.28);
}

.requirement-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.requirement {
    position: relative;
    min-height: 170px;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.55);
    overflow: hidden;
}

.requirement::before {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 3px;
    background: var(--danger);
}

.requirement.is-ok::before { background: var(--success); }

.requirement-type {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.requirement h3 {
    margin: 0.55rem 0 0.35rem;
    font-size: 1.03rem;
}

.requirement p {
    margin-bottom: 1.1rem;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.82rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.28rem 0.68rem;
    border: 1px solid rgba(239, 68, 68, 0.28);
    background: rgba(239, 68, 68, 0.12);
    color: #FCA5A5;
    font-size: 0.78rem;
    font-weight: 900;
}

.is-ok .status-badge {
    border-color: rgba(16, 185, 129, 0.28);
    background: rgba(16, 185, 129, 0.12);
    color: #86EFAC;
}

.toggle-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.55);
    transition: border-color 0.18s ease, background 0.18s ease;
}

.toggle-card:hover {
    border-color: var(--line-strong);
    background: rgba(99, 102, 241, 0.08);
}

.toggle-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.switch {
    width: 46px;
    height: 28px;
    flex: 0 0 46px;
    position: relative;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.22);
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.switch::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #CBD5E1;
    transition: transform 0.2s ease;
}

.toggle-card input:checked + .switch {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.32);
}

.toggle-card input:checked + .switch::after { transform: translateX(18px); }

.toggle-card b { display: block; }
.toggle-card small { display: block; margin-top: 0.15rem; }

.summary-card {
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.55);
}

.summary-card dl {
    margin: 0;
    display: grid;
    gap: 0.1rem;
}

.summary-card dl > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px dashed rgba(148, 163, 184, 0.22);
}

.summary-card dl > div:last-child { border-bottom: 0; }
.summary-card dt { color: var(--muted); font-weight: 750; }
.summary-card dd { margin: 0; font-weight: 850; text-align: right; word-break: break-word; }

@media (min-width: 1024px) {
    body { overflow-y: auto; }
    .setup-card { align-items: stretch; }
    .setup-progress { position: sticky; top: 1.25rem; align-self: start; }
}

@media (max-width: 980px) {
    body { overflow: auto; }
    .setup-card { grid-template-columns: 1fr; overflow: hidden; }
    .setup-progress { position: static; }
    .setup-progress { border-right: 0; border-bottom: 1px solid var(--line); }
    .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .step-item { align-items: flex-start; }
    .requirement-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
    .auth-shell { width: 100%; padding-inline: 0.5rem; }
    .auth-card { padding-inline: 0.75rem; }
    .lead-key { line-height: 1.45; }
    .setup-shell { width: min(100% - 1rem, 1320px); }
    .topbar { align-items: flex-start; }
    .brand small { display: none; }
    .setup-card,
    .auth-card { border-radius: 22px; }
    .steps { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.35rem; }
    .step-item { padding: 0.45rem; justify-content: center; }
    .step-item span:last-child { display: none; }
    .form-grid,
    .requirement-grid { grid-template-columns: 1fr; }
    .actions { flex-direction: column-reverse; }
    .btn { width: 100%; }
    .summary-card dl > div { display: grid; }
    .summary-card dd { text-align: left; }
}


/* Keine internen Scrollbereiche: Die Seite scrollt nur über den Browser-Viewport. */
.setup-card,
.setup-progress,
.setup-content,
.card,
.card-body {
    max-height: none !important;
}

.setup-content {
    overflow: visible !important;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }

    #matrix-canvas { display: none; }
}
