/* Konto-Seiten (Anmelden, Registrieren, Kennwort, Konto verwalten) – Gelb wie das Menü.
   Global, weil sich ~30 Identity-Seiten dieselben Bausteine teilen. Präfix ac-. */

:root {
    --ac-ground: #f6f5f2;
    --ac-surface: #ffffff;
    --ac-border: #e6e2d6;
    --ac-divider: #efece4;
    --ac-text: #1d1d1f;
    --ac-text-2: #4a4a4f;
    --ac-muted: #77746b;
    --ac-yellow: #ffd84d;
    --ac-yellow-hover: #ffc928;
    --ac-yellow-soft: #fff6d1;
    --ac-gold: #8a6d00;
    --ac-ok: #1e7e34;
    --ac-ok-soft: #e9f6ec;
    --ac-err: #c5221f;
    --ac-err-soft: #fdecea;
    --ac-info-soft: #fff8e0;
    --ac-focus: 0 0 0 3px rgba(255, 201, 40, .45);
}

/* ======================================================================
   Öffentliche Seiten: AuthLayout (zweigeteilt – Marke links, Formular rechts)
   ====================================================================== */

.ac-auth {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(380px, 46%) 1fr;
    background: var(--ac-ground);
    color: var(--ac-text);
}

.ac-brand {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 40px 48px;
    background:
        radial-gradient(circle at 85% 12%, rgba(255, 255, 255, .55) 0 90px, transparent 91px),
        radial-gradient(circle at 8% 92%, rgba(255, 201, 40, .45) 0 140px, transparent 141px),
        linear-gradient(160deg, #fff7d6 0%, #ffe68a 55%, #ffd84d 100%);
    color: #2b2a26;
}

.ac-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
}

.ac-logo img { width: 42px; height: 42px; }
.ac-logo b { display: block; font-size: 20px; line-height: 1.1; letter-spacing: -.2px; }
.ac-logo small { display: block; font-size: 12.5px; color: #6b5f3a; }
.ac-logo:hover { color: inherit; }

.ac-brand-copy { margin-top: auto; max-width: 440px; }

.ac-brand-copy h2 {
    margin: 0 0 12px 0;
    font-size: 34px;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -.6px;
}

.ac-brand-copy p { margin: 0; font-size: 16px; line-height: 1.55; color: #5a5235; }

.ac-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    max-width: 460px;
}

.ac-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .62);
    box-shadow: 0 1px 0 rgba(120, 90, 0, .08);
    font-size: 14px;
    font-weight: 600;
}

.ac-features svg,
.ac-icon svg,
.ac-btn svg,
.ac-mnav svg,
.ac-row-icon svg,
.ac-alert svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.ac-features svg { width: 18px; height: 18px; color: #8a6d00; }

.ac-brand-foot { font-size: 12px; color: #7a6c3c; margin-top: auto; }

.ac-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.ac-card {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ac-card.is-wide { max-width: 520px; }

/* Kopf einer Formularseite */
.ac-head { display: flex; flex-direction: column; gap: 8px; }

.ac-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--ac-yellow-soft);
    color: var(--ac-gold);
    margin-bottom: 6px;
}

.ac-icon svg { width: 24px; height: 24px; }
.ac-icon.is-ok { background: var(--ac-ok-soft); color: var(--ac-ok); }
.ac-icon.is-err { background: var(--ac-err-soft); color: var(--ac-err); }
.ac-icon.is-wait { background: #eef3fb; color: #1b5fa8; }

.ac-head h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -.4px;
}

.ac-lead { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ac-text-2); }
.ac-lead b { color: var(--ac-text); }

.ac-text { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--ac-text-2); }

/* Formulare */
.ac-form { display: flex; flex-direction: column; gap: 14px; margin: 0; }

.ac-row2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.ac-field { display: flex; flex-direction: column; gap: 6px; }

.ac-field > label,
.ac-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ac-text-2);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
}

.ac-field > label a { font-weight: 500; }

.ac-input {
    height: 46px;
    width: 100%;
    box-sizing: border-box;
    padding: 0 14px;
    border: 1px solid #dcd8cc;
    border-radius: 11px;
    background: #fff;
    font: inherit;
    font-size: 15.5px;
    color: var(--ac-text);
    transition: border-color .12s, box-shadow .12s;
}

.ac-input:hover { border-color: #ccc6b5; }

.ac-input:focus {
    outline: 0;
    border-color: #e0b100;
    box-shadow: var(--ac-focus);
}

.ac-input:disabled { background: #f4f2ec; color: var(--ac-muted); }

.ac-input.invalid { border-color: var(--ac-err); }
.ac-input.invalid:focus { box-shadow: 0 0 0 3px rgba(197, 34, 31, .15); }

.ac-input.is-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: 3px;
    font-size: 18px;
    text-align: center;
}

.ac-hint { font-size: 12.5px; color: var(--ac-muted); line-height: 1.45; }

.validation-message,
.ac-err {
    font-size: 12.5px;
    color: var(--ac-err);
}

.ac-check {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--ac-text-2);
    cursor: pointer;
    margin: 0;
}

.ac-check input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #e0b100;
    flex-shrink: 0;
}

/* Knöpfe */
.ac-btn {
    height: 46px;
    padding: 0 18px;
    border-radius: 11px;
    border: 1px solid transparent;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background .12s, border-color .12s, box-shadow .12s;
}

.ac-btn svg { width: 18px; height: 18px; }
.ac-btn:focus-visible { outline: 0; box-shadow: var(--ac-focus); }
.ac-btn.is-block { width: 100%; }
.ac-btn.is-small { height: 38px; padding: 0 14px; font-size: 14px; border-radius: 10px; }

.ac-btn.is-primary { background: var(--ac-yellow); color: #1d1d1f; box-shadow: 0 1px 0 rgba(120, 90, 0, .18); }
.ac-btn.is-primary:hover { background: var(--ac-yellow-hover); color: #1d1d1f; }

.ac-btn.is-secondary { background: #fff; border-color: #dcd8cc; color: var(--ac-text); }
.ac-btn.is-secondary:hover { background: #faf8f2; color: var(--ac-text); }

.ac-btn.is-danger { background: var(--ac-err); color: #fff; }
.ac-btn.is-danger:hover { background: #a91c19; color: #fff; }

.ac-btn.is-ghost-danger { background: #fff; border-color: #f1c4c1; color: var(--ac-err); }
.ac-btn.is-ghost-danger:hover { background: var(--ac-err-soft); color: var(--ac-err); }

.ac-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* Links */
.ac-card a:not(.ac-btn),
.ac-manage a:not(.ac-btn):not(.ac-mnav-link) {
    color: var(--ac-gold);
    font-weight: 600;
    text-decoration: none;
}

.ac-card a:not(.ac-btn):hover,
.ac-manage a:not(.ac-btn):not(.ac-mnav-link):hover { text-decoration: underline; }

.ac-foot {
    padding-top: 16px;
    border-top: 1px solid var(--ac-divider);
    font-size: 14px;
    color: var(--ac-text-2);
    text-align: center;
}

.ac-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12.5px;
    color: var(--ac-muted);
}

.ac-divider::before,
.ac-divider::after { content: ""; flex: 1; height: 1px; background: var(--ac-divider); }

/* Hinweise */
.ac-alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.45;
    border: 1px solid transparent;
}

.ac-alert svg { width: 18px; height: 18px; margin-top: 1px; }
.ac-alert p { margin: 0; }
.ac-alert p + p { margin-top: 6px; }
.ac-alert.is-ok { background: var(--ac-ok-soft); border-color: #cbe8d2; color: #145523; }
.ac-alert.is-err { background: var(--ac-err-soft); border-color: #f4c7c4; color: #8c1d1a; }
.ac-alert.is-info { background: var(--ac-info-soft); border-color: #f3e3a6; color: #6b5100; }
.ac-alert.is-warn { background: #fff4e5; border-color: #f6d7a7; color: #7a4500; }

/* Schritte (z.B. Ablauf nach der Registrierung) */
.ac-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }

.ac-steps li { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; line-height: 1.45; color: var(--ac-text-2); }

.ac-steps li > span:first-child {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    background: #efece4;
    color: var(--ac-muted);
}

.ac-steps li.is-done > span:first-child { background: var(--ac-ok-soft); color: var(--ac-ok); }
.ac-steps li.is-now > span:first-child { background: var(--ac-yellow); color: #1d1d1f; }
.ac-steps b { color: var(--ac-text); display: block; }

/* Wiederherstellungscodes */
.ac-codes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 14px;
    border-radius: 12px;
    background: #fbfaf6;
    border: 1px dashed #dcd5bd;
}

.ac-codes code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 15px;
    color: var(--ac-text);
    background: #fff;
    border: 1px solid var(--ac-divider);
    border-radius: 8px;
    padding: 6px 10px;
    text-align: center;
}

.ac-key {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 15px;
    letter-spacing: 1px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fbfaf6;
    border: 1px solid var(--ac-divider);
    word-break: break-all;
    user-select: all;
}

/* ======================================================================
   Konto verwalten: ManageLayout (innerhalb des normalen Layouts mit Menü)
   ====================================================================== */

.ac-manage {
    color: var(--ac-text);
    background: var(--ac-ground);
    margin: -1.1rem -1.5rem 0 -2rem;
    padding: 24px 32px 40px 32px;
    min-height: calc(100vh - 3.5rem);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ac-mhead { display: flex; align-items: center; gap: 14px; }

.ac-mav {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--ac-yellow);
    color: #1d1d1f;
    font-size: 18px;
    font-weight: 800;
}

.ac-mhead h1 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -.3px; }
.ac-mhead p { margin: 2px 0 0 0; font-size: 14px; color: var(--ac-muted); }

.ac-mgrid {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.ac-mnav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px;
    background: var(--ac-surface);
    border: 1px solid var(--ac-border);
    border-radius: 14px;
    position: sticky;
    top: calc(3.5rem + 16px);
}

.ac-mnav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    color: var(--ac-text-2);
    font-size: 14.5px;
    font-weight: 500;
    text-decoration: none;
}

.ac-mnav-link svg { width: 18px; height: 18px; color: var(--ac-muted); }
.ac-mnav-link:hover { background: #f7f5ee; color: var(--ac-text); }
.ac-mnav-link.active { background: var(--ac-yellow-soft); color: #1d1d1f; font-weight: 700; }
.ac-mnav-link.active svg { color: var(--ac-gold); }

.ac-mcard {
    background: var(--ac-surface);
    border: 1px solid var(--ac-border);
    border-radius: 16px;
    padding: 24px 26px 26px 26px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

.ac-section-head h2 { margin: 0; font-size: 20px; font-weight: 700; }
.ac-section-head p { margin: 4px 0 0 0; font-size: 14px; line-height: 1.5; color: var(--ac-muted); }

.ac-mcard .ac-form { max-width: 520px; }

.ac-sub {
    margin: 6px 0 0 0;
    padding-top: 16px;
    border-top: 1px solid var(--ac-divider);
    font-size: 15px;
    font-weight: 700;
}

/* Zeilen mit Status (z.B. 2FA, Anmeldedienste) */
.ac-rows { display: flex; flex-direction: column; border: 1px solid var(--ac-divider); border-radius: 12px; overflow: hidden; }

.ac-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #fff;
}

.ac-row + .ac-row { border-top: 1px solid var(--ac-divider); }

.ac-row-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f4f2ec;
    color: var(--ac-muted);
}

.ac-row-icon svg { width: 20px; height: 20px; }
.ac-row-icon.is-on { background: var(--ac-ok-soft); color: var(--ac-ok); }

.ac-row-text { flex: 1; min-width: 0; }
.ac-row-text b { display: block; font-size: 14.5px; }
.ac-row-text small { display: block; font-size: 13px; color: var(--ac-muted); line-height: 1.4; }

.ac-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: #efece4;
    color: var(--ac-muted);
    white-space: nowrap;
}

.ac-pill.is-ok { background: var(--ac-ok-soft); color: var(--ac-ok); }

.ac-danger-zone {
    border: 1px solid #f4c7c4;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #fffafa;
}

.ac-danger-zone h3 { margin: 0; font-size: 15px; font-weight: 700; color: #8c1d1a; }

/* Schritte zum Einrichten der Authenticator-App */
.ac-numbered { margin: 0; padding: 0; list-style: none; counter-reset: ac; display: flex; flex-direction: column; gap: 18px; }

.ac-numbered > li {
    counter-increment: ac;
    position: relative;
    padding-left: 40px;
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--ac-text-2);
}

.ac-numbered > li::before {
    content: counter(ac);
    position: absolute;
    left: 0;
    top: -1px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--ac-yellow);
    color: #1d1d1f;
    font-weight: 800;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ac-numbered p { margin: 0 0 8px 0; }

/* ======================================================================
   Schmal / Handy
   ====================================================================== */

@media (max-width: 899.98px) {
    .ac-auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }

    .ac-brand { padding: 18px 20px; gap: 0; background: linear-gradient(160deg, #fff7d6 0%, #ffe68a 100%); }
    .ac-brand-copy,
    .ac-features,
    .ac-brand-foot { display: none; }

    .ac-main { align-items: flex-start; padding: 28px 20px 40px 20px; }
}

@media (max-width: 991.98px) {
    .ac-manage { padding: 16px 16px 32px 16px; gap: 14px; }
    .ac-mgrid { grid-template-columns: 1fr; gap: 14px; }

    .ac-mnav {
        position: static;
        flex-direction: row;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .ac-mnav-link { white-space: nowrap; flex-shrink: 0; }
    .ac-mcard { padding: 18px 16px 20px 16px; }
    .ac-mhead h1 { font-size: 24px; }
}

@media (max-width: 640.98px) {
    /* MainLayout: article hat hier px-4 (1.5rem) statt 2rem links */
    .ac-manage { margin-left: -1.5rem; }
    .ac-row2 { grid-template-columns: 1fr; }
    .ac-row { flex-wrap: wrap; }
    .ac-codes { grid-template-columns: 1fr; }
}
