/* Remote Help System, Aigner Immobilien */

@font-face {
    font-family: "Plus Jakarta Sans";
    src: url("fonts/plus-jakarta-sans-latin.woff2") format("woff2");
    font-weight: 200 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --brand: #003064;
    --brand-hover: #0b4382;
    --brand-soft: rgba(0, 48, 100, .07);
    --brand-ring: rgba(0, 48, 100, .22);

    --bg: #eef2f9;
    --glass: rgba(255, 255, 255, .72);
    --glass-edge: rgba(255, 255, 255, .9);
    --surface: rgba(255, 255, 255, .66);
    --surface-strong: rgba(255, 255, 255, .92);
    --line: rgba(15, 23, 42, .08);
    --line-strong: rgba(15, 23, 42, .14);

    --ink: #111827;
    --ink-muted: #4b5563;
    --ink-subtle: #6b7280;

    /* Farbtupfer, aufgenommen aus dem Blau und Violett des Hintergrunds */
    --tint-blue: #1268c4;   --tint-blue-soft: rgba(18, 104, 196, .10);
    --tint-violet: #6a4ad1; --tint-violet-soft: rgba(106, 74, 209, .10);
    --live: #12b76a;

    --ok-bg: #ecfdf3;    --ok-line: #abefc6;    --ok-ink: #05603a;
    --info-bg: #eff5ff;  --info-line: #c7d7fe;  --info-ink: #1d3a7a;
    --bad-bg: #fef3f2;   --bad-line: #fecdca;   --bad-ink: #912018;

    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 20px;
    --r-xl: 28px;

    --shadow-card: 0 1px 2px rgba(16, 24, 40, .04), 0 24px 64px rgba(60, 72, 120, .14);
    --shadow-lift: 0 1px 2px rgba(16, 24, 40, .04), 0 16px 36px rgba(60, 72, 120, .14);
    --ease: cubic-bezier(.16, 1, .3, 1);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--ink);
    background-color: var(--bg);
    background-image:
        radial-gradient(circle at 15% 15%, hsla(210, 80%, 80%, .38), transparent 45%),
        radial-gradient(circle at 85% 80%, hsla(280, 80%, 86%, .32), transparent 50%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); }

/* ---------- Karte ---------- */

.card {
    width: 100%;
    max-width: 880px;
    padding: 48px;
    background: var(--glass);
    border: 1px solid var(--glass-edge);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-card);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    backdrop-filter: blur(24px) saturate(160%);
    animation: rise .5s var(--ease) both;
}

.card--narrow { max-width: 440px; }

.brand {
    display: block;
    width: 100%;
    max-width: 300px;
    height: auto;
    margin: 0 auto 36px;
}

h1 {
    margin: 0 0 8px;
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.25;
}

.login-title { margin-bottom: 28px; }

.lead {
    max-width: 540px;
    margin: 0 auto 28px;
    text-align: center;
    color: var(--ink-muted);
    line-height: 1.6;
}

.version {
    margin: -12px 0 28px;
    text-align: center;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--ink-muted);
    font-size: .8125rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
/* Grüner Punkt: Downloads sind auf dem neuesten Stand */
.version .pill::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--live);
    box-shadow: 0 0 0 3px rgba(18, 183, 106, .18);
}

.icon {
    width: 18px;
    height: 18px;
    flex: none;
}

/* ---------- Knöpfe ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px 20px;
    border: 1px solid transparent;
    border-radius: var(--r-md);
    font: inherit;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s, border-color .15s, box-shadow .15s, transform .15s var(--ease);
}

.btn small { font-weight: 500; opacity: .75; }
.btn:active { transform: scale(.98); }
.btn:focus-visible { outline: 3px solid var(--brand-ring); outline-offset: 2px; }
.btn-block { width: 100%; }

.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); }

.btn-secondary {
    background: var(--surface-strong);
    border-color: var(--line-strong);
    color: var(--brand);
}
.btn-secondary:hover { background: #fff; border-color: rgba(0, 48, 100, .3); }

.btn:disabled,
.btn[aria-disabled="true"] {
    opacity: .45;
    cursor: not-allowed;
    transform: none;
}
.btn-primary:disabled:hover,
.btn-primary[aria-disabled="true"]:hover { background: var(--brand); }

.link-btn {
    padding: 8px 12px;
    margin: -8px -12px;
    border: 0;
    border-radius: var(--r-sm);
    background: none;
    font: inherit;
    font-weight: 600;
    color: var(--ink-muted);
    cursor: pointer;
    transition: color .15s, background-color .15s;
}
.link-btn:hover { color: var(--brand); background: var(--brand-soft); }
.link-btn:focus-visible { outline: 3px solid var(--brand-ring); outline-offset: 2px; }

/* ---------- Download-Kacheln ---------- */

.tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 28px 28px;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--glass-edge);
    border-radius: var(--r-lg);
    transition: transform .3s var(--ease), box-shadow .3s var(--ease), background-color .3s;
}
.tile:hover {
    transform: translateY(-4px);
    background: var(--surface-strong);
    box-shadow: var(--shadow-lift);
}

.tile-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin-bottom: 16px;
    border-radius: 16px;
    background: var(--brand-soft);
    color: var(--brand);
}
.tile-icon svg { width: 26px; height: 26px; }
.tile--windows .tile-icon { background: var(--tint-blue-soft); color: var(--tint-blue); }
.tile--mac .tile-icon { background: var(--tint-violet-soft); color: var(--tint-violet); }

.tile h2 {
    margin: 0 0 4px;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--brand);
}

.tile p {
    margin: 0 0 24px;
    color: var(--ink-muted);
    font-size: .9375rem;
}

.tile-actions {
    display: grid;
    gap: 10px;
    width: 100%;
    margin-top: auto;
}

.tile .tile-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px 6px;
    min-height: 20px;
    margin: 14px 0 0;
    font-size: .8125rem;
    color: var(--ink-subtle);
}
.tile-hint .icon { width: 15px; height: 15px; color: var(--live); }
.tile-hint a {
    font-weight: 600;
    color: var(--tint-violet);
    text-decoration: none;
    border-bottom: 1px solid rgba(106, 74, 209, .3);
}
.tile-hint a:hover { border-bottom-color: currentColor; }

/* ---------- Weg zur Anleitung ohne Download ---------- */

.guide-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 20px;
    padding: 20px 24px;
    border-radius: var(--r-lg);
    background: linear-gradient(100deg, var(--tint-blue-soft), var(--tint-violet-soft));
    border: 1px solid rgba(106, 74, 209, .1);
}
.guide-cta strong { display: block; }
.guide-cta span { color: var(--ink-muted); font-size: .9375rem; }

/* ---------- Fußzeile ---------- */

.card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    font-size: .875rem;
    color: var(--ink-subtle);
}
.card-foot form { margin: 0; }

/* ---------- Formular ---------- */

.field {
    display: block;
    margin-bottom: 16px;
}
.field > span {
    display: block;
    margin-bottom: 6px;
    font-size: .875rem;
    font-weight: 600;
    color: var(--ink-muted);
}

.input {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-md);
    background: var(--surface-strong);
    font: inherit;
    color: var(--ink);
    transition: border-color .15s, box-shadow .15s;
}
.input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-ring);
}
.input:disabled { background: rgba(255, 255, 255, .45); color: var(--ink-subtle); }

.form .btn { margin-top: 8px; }

/* ---------- Meldungen ---------- */

.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0 0 24px;
    padding: 14px 16px;
    border: 1px solid;
    border-radius: var(--r-md);
    font-size: .9375rem;
    line-height: 1.55;
}
.alert .icon { width: 20px; height: 20px; margin-top: 1px; }
.alert a { color: inherit; font-weight: 600; }

.alert--ok    { background: var(--ok-bg);   border-color: var(--ok-line);   color: var(--ok-ink); }
.alert--info  { background: var(--info-bg); border-color: var(--info-line); color: var(--info-ink); }
.alert--error { background: var(--bad-bg);  border-color: var(--bad-line);  color: var(--bad-ink); }

/* ---------- Anleitung ---------- */

.steps {
    max-width: 660px;
    margin: 12px auto 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.step {
    position: relative;
    padding: 0 0 40px 56px;
    counter-increment: step;
}
/* Verbindungslinie zwischen den Schritt-Nummern */
.step::after {
    content: "";
    position: absolute;
    left: 17px;
    top: 44px;
    bottom: 8px;
    width: 2px;
    border-radius: 2px;
    background: var(--line);
}
.step:last-child { padding-bottom: 0; }
.step:last-child::after { display: none; }

.step::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-weight: 700;
    font-size: .9375rem;
    font-variant-numeric: tabular-nums;
}
.step--done::before {
    content: "\2713";
    background: var(--ok-ink);
}

.step h2 {
    margin: 4px 0 8px;
    font-size: 1.1875rem;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--brand);
}
.step p {
    margin: 0 0 16px;
    color: var(--ink-muted);
    line-height: 1.65;
}
.step strong { color: var(--ink); font-weight: 600; }

.shot {
    display: block;
    max-width: 100%;
    height: auto;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: #fff;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .08);
}

.copy {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    padding: 6px 6px 6px 14px;
    background: var(--surface-strong);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-md);
}
.copy code {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    white-space: nowrap;
    font-family: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
    font-size: .9375rem;
    color: var(--ink);
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: none;
    min-height: 36px;
    padding: 6px 12px;
    border: 0;
    border-radius: var(--r-sm);
    background: var(--brand-soft);
    color: var(--brand);
    font: inherit;
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .15s, color .15s;
}
.copy-btn .icon { width: 16px; height: 16px; }
.copy-btn:hover { background: rgba(0, 48, 100, .13); }
.copy-btn:focus-visible { outline: 3px solid var(--brand-ring); outline-offset: 2px; }
.copy-btn.is-done { background: var(--ok-bg); color: var(--ok-ink); }

.steps + .alert { max-width: 660px; margin: 40px auto 0; }

.actions {
    margin-top: 32px;
    text-align: center;
}

/* ---------- Bewegung ---------- */

@keyframes rise {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
}

.shake { animation: shake .45s both; }
@keyframes shake {
    10%, 90% { transform: translateX(-1px); }
    20%, 80% { transform: translateX(2px); }
    30%, 50%, 70% { transform: translateX(-4px); }
    40%, 60% { transform: translateX(4px); }
}

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

/* ---------- Schmale Bildschirme ---------- */

@media (max-width: 600px) {
    body { padding: 16px; align-items: flex-start; }
    .card { padding: 32px 20px 24px; border-radius: var(--r-lg); }
    .brand { max-width: 240px; margin-bottom: 28px; }
    h1 { font-size: 1.4rem; }
    .tile { padding: 28px 20px 24px; }
    .guide-cta { padding: 18px; }
    .guide-cta .btn { width: 100%; }
    .step { padding-left: 0; }
    .step::before { position: static; margin-bottom: 12px; }
    .step::after { display: none; }
}
