/* Login / register — samme stemning som home-shell (varm papir, teal-accent, hård skygge) */

.auth-body {
    margin: 0;
    min-height: 100vh;
}

.auth-page {
    --auth-page-bg: #cfc8bb;
    --auth-page-bg-accent: rgba(42, 77, 92, 0.07);
    --auth-brand-mark-bg: linear-gradient(135deg, #2a4d5c 0%, #1a3340 100%);
    --auth-brand-mark-fg: #e8f4f0;

    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: "Plus Jakarta Sans", system-ui, sans-serif;
    color: var(--auth-ink, #161412);
    background: var(--auth-page-bg);
    background-image:
        linear-gradient(145deg, #e3ddd2 0%, transparent 45%),
        linear-gradient(320deg, var(--auth-page-bg-accent) 0%, transparent 40%),
        linear-gradient(200deg, rgba(196, 92, 62, 0.05) 0%, transparent 35%);
}

.auth-page::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.28;
    z-index: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E");
}

.auth-topbar {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
    padding: 0.85rem 1.25rem;
    border-bottom: 3px solid #141210;
    background: rgba(247, 244, 237, 0.88);
    backdrop-filter: blur(8px);
}

.auth-topbar__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: "Syne", system-ui, sans-serif;
    font-weight: 800;
    font-size: 1.02rem;
    letter-spacing: -0.03em;
    color: #161412;
    text-decoration: none;
}

.auth-topbar__brand:hover {
    color: #2a4d5c;
}

.auth-topbar__mark {
    width: 1.85rem;
    height: 1.85rem;
    border: 2px solid #141210;
    border-radius: 4px;
    background-color: #f7f4ed;
    background-image: url("../brand/logo-mark.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 90% 90%;
    box-shadow: 3px 3px 0 #141210;
}

.auth-topbar__link {
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #161412;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    padding-bottom: 0.15rem;
}

.auth-topbar__link:hover {
    color: #2a4d5c;
    border-bottom-color: #c45c3e;
}

.auth-layout-root {
    --auth-ink: #161412;
    --auth-muted: #524a42;
    --auth-card: #f7f4ed;
    --auth-edge: #141210;
    --auth-accent: #2a4d5c;
    --auth-accent-hover: #1f3a46;
    --auth-warm: #c45c3e;
    --auth-input-bg: #fffcf7;
    --auth-input-border: #c9c2b5;
    --auth-code-bg: #e8e3d8;

    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.25rem, 4vw, 2.5rem);
    overflow-x: hidden;
}

.auth-layout-root > * {
    position: relative;
    z-index: 1;
}

.auth-card {
    width: 100%;
    max-width: 26.5rem;
    padding: clamp(1.65rem, 4vw, 2.2rem);
    border-radius: 4px;
    background: var(--auth-card);
    border: 2px solid var(--auth-edge);
    box-shadow: 5px 5px 0 rgba(20, 18, 16, 0.14);
    color: var(--auth-ink);
    animation: auth-card-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes auth-card-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.auth-brand__mark {
    width: 3rem;
    height: 3rem;
    border-radius: 4px;
    border: 2px solid var(--auth-edge);
    background: var(--auth-brand-mark-bg, linear-gradient(135deg, #2a4d5c 0%, #1a3340 100%));
    color: var(--auth-brand-mark-fg, #e8f4f0);
    display: grid;
    place-items: center;
    box-shadow: 4px 4px 0 var(--auth-edge);
    flex-shrink: 0;
    overflow: hidden;
}

.auth-brand__mark--client {
    background: var(--auth-brand-mark-bg);
    padding: 0.2rem;
}

.auth-brand__logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.auth-topbar__logo {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 4px;
    flex-shrink: 0;
}

.auth-brand__title {
    font-family: "Syne", "Plus Jakarta Sans", sans-serif;
    font-weight: 800;
    font-size: 1.28rem;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin: 0;
    color: var(--auth-ink);
}

.auth-brand__subtitle {
    margin: 0.2rem 0 0;
    font-size: 0.875rem;
    color: var(--auth-muted);
    font-weight: 500;
}

.auth-headline {
    font-family: "Syne", sans-serif;
    font-weight: 700;
    font-size: 1.45rem;
    letter-spacing: -0.02em;
    margin: 0 0 0.35rem;
    color: var(--auth-ink);
}

.auth-lead {
    margin: 0 0 1.35rem;
    font-size: 0.9375rem;
    color: var(--auth-muted);
    line-height: 1.55;
}

.auth-providers {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.auth-provider {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 0.95rem;
    border-radius: 4px;
    text-decoration: none;
    color: inherit;
    border: 2px solid var(--auth-edge);
    background: #fffcf7;
    box-shadow: 3px 3px 0 rgba(20, 18, 16, 0.1);
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.auth-provider:hover {
    transform: translate(1px, 1px);
    box-shadow: 2px 2px 0 rgba(20, 18, 16, 0.12);
    border-color: var(--auth-accent);
    color: inherit;
}

.auth-provider:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 rgba(20, 18, 16, 0.12);
}

.auth-provider__icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 4px;
    display: grid;
    place-items: center;
    background: var(--auth-code-bg);
    border: 1px solid var(--auth-input-border);
}

.auth-provider__body {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.auth-provider__name {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
}

.auth-provider__hint {
    display: block;
    font-size: 0.75rem;
    color: var(--auth-muted);
    margin-top: 0.1rem;
}

.auth-provider__arrow {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    opacity: 0.4;
    color: var(--auth-ink);
}

.auth-provider--microsoft {
    border-color: rgba(0, 120, 212, 0.45);
    background: linear-gradient(135deg, #f0f7fc 0%, #fffcf7 100%);
}

.auth-provider--microsoft:hover {
    border-color: #0078d4;
}

.auth-provider--google .auth-provider__icon {
    background: #fff;
}

.auth-provider--github .auth-provider__icon {
    background: #24292f;
}

.auth-provider--discord {
    border-color: rgba(88, 101, 242, 0.45);
    background: linear-gradient(135deg, #f4f5fe 0%, #fffcf7 100%);
}

.auth-provider--discord:hover {
    border-color: #5865f2;
}

.auth-provider--discord .auth-provider__icon {
    background: #5865f2;
    border-color: #4752c4;
}

.auth-provider--disabled {
    pointer-events: none;
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: 3px 3px 0 rgba(20, 18, 16, 0.08);
}

.auth-provider--disabled:hover {
    transform: none;
    border-color: var(--auth-edge);
    box-shadow: 3px 3px 0 rgba(20, 18, 16, 0.08);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.25rem 0;
    color: var(--auth-muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 2px;
    background: repeating-linear-gradient(
        90deg,
        var(--auth-edge) 0,
        var(--auth-edge) 5px,
        transparent 5px,
        transparent 10px
    );
    opacity: 0.2;
}

.auth-field {
    margin-bottom: 0.95rem;
}

.auth-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.4rem;
    color: var(--auth-muted);
}

.auth-input {
    display: block;
    width: 100%;
    padding: 0.65rem 0.85rem;
    font-size: 0.9375rem;
    border-radius: 4px;
    border: 2px solid var(--auth-input-border);
    background: var(--auth-input-bg);
    color: var(--auth-ink);
    font-family: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-input::placeholder {
    color: rgba(82, 74, 66, 0.45);
}

.auth-input:focus {
    outline: none;
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 3px rgba(42, 77, 92, 0.18);
}

.auth-submit {
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.75rem 1rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-family: inherit;
    border: 2px solid var(--auth-edge);
    border-radius: 4px;
    cursor: pointer;
    color: #fff;
    background: var(--auth-accent);
    box-shadow: 3px 3px 0 var(--auth-edge);
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.auth-submit:hover {
    background: var(--auth-accent-hover);
    transform: translate(1px, 1px);
    box-shadow: 2px 2px 0 var(--auth-edge);
}

.auth-submit:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 var(--auth-edge);
}

.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 1rem;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-decoration: none;
    border-radius: 4px;
    border: 2px solid var(--auth-edge);
    cursor: pointer;
    background: #fffcf7;
    color: var(--auth-ink);
    box-shadow: 3px 3px 0 rgba(20, 18, 16, 0.1);
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.auth-btn:hover {
    transform: translate(1px, 1px);
    box-shadow: 2px 2px 0 rgba(20, 18, 16, 0.12);
}

.auth-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 rgba(20, 18, 16, 0.12);
}

.auth-btn--primary {
    color: #fff;
    background: var(--auth-accent);
    border-color: var(--auth-edge);
}

.auth-btn--primary:hover {
    background: var(--auth-accent-hover);
}

.auth-btn--ghost {
    color: var(--auth-accent);
    background: #fffcf7;
    border-color: rgba(42, 77, 92, 0.45);
}

.auth-btn--ghost:hover {
    border-color: var(--auth-accent);
    background: rgba(42, 77, 92, 0.06);
}

.auth-btn--passkey {
    color: #fff;
    background: linear-gradient(135deg, #a8684a 0%, var(--auth-warm) 52%, #9a4528 100%);
    border-color: var(--auth-edge);
}

.auth-btn--passkey:hover {
    background: linear-gradient(135deg, #8a3d28 0%, #b35438 52%, #8a3d28 100%);
}

.auth-btn--block {
    width: 100%;
}

.auth-btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1.25rem;
}

.auth-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 0.85rem;
}

.auth-action {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    padding: 0.75rem 0.95rem;
    font-family: inherit;
    text-align: left;
    color: inherit;
    border-radius: 4px;
    border: 2px solid var(--auth-edge);
    background: #fffcf7;
    box-shadow: 3px 3px 0 rgba(20, 18, 16, 0.1);
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.auth-action:hover {
    transform: translate(1px, 1px);
    box-shadow: 2px 2px 0 rgba(20, 18, 16, 0.12);
    border-color: var(--auth-accent);
}

.auth-action:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 rgba(20, 18, 16, 0.12);
}

.auth-action--passkey {
    border-color: rgba(196, 92, 62, 0.5);
    background: linear-gradient(135deg, #fdf6f2 0%, #fffcf7 100%);
}

.auth-action--passkey:hover {
    border-color: var(--auth-warm);
}

.auth-action__icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 4px;
    display: grid;
    place-items: center;
    background: var(--auth-code-bg);
    border: 1px solid var(--auth-input-border);
    color: var(--auth-accent);
}

.auth-action--passkey .auth-action__icon {
    background: rgba(196, 92, 62, 0.12);
    border-color: rgba(196, 92, 62, 0.35);
    color: #8a3d28;
}

.auth-action__icon .security-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.auth-action__body {
    flex: 1;
    min-width: 0;
}

.auth-action__name {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--auth-ink);
}

.auth-action__hint {
    display: block;
    font-size: 0.75rem;
    color: var(--auth-muted);
    margin-top: 0.1rem;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 500;
}

.auth-action__arrow {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    opacity: 0.4;
    color: var(--auth-ink);
}

.auth-footer-link {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--auth-muted);
}

.auth-footer-link a {
    color: var(--auth-accent);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 2px solid transparent;
}

.auth-footer-link a:hover {
    border-bottom-color: var(--auth-warm);
}

.auth-alert {
    padding: 0.75rem 0.9rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    background: rgba(158, 43, 37, 0.1);
    border: 2px solid rgba(158, 43, 37, 0.35);
    color: #6f231f;
}

.auth-footer {
    position: relative;
    z-index: 2;
    padding: 0.85rem 1.25rem 1.15rem;
    border-top: 2px solid #141210;
    background: rgba(247, 244, 237, 0.88);
}

.auth-footer__attrib {
    margin: 0 auto;
    max-width: 32rem;
    text-align: center;
    font-size: 0.78rem;
    line-height: 1.45;
    color: #524a42;
}

.auth-footer__attrib a {
    color: #2a4d5c;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    margin-left: 0.15rem;
}

.auth-footer__attrib a:hover {
    border-bottom-color: #c45c3e;
}

/* ——— Konto-hub (LinkedAccounts ↔ Security) ——— */
.account-hub-page {
    max-width: 34rem;
}

.account-hub {
    margin-bottom: 1.35rem;
}

.account-hub__home {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.85rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--auth-muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    padding-bottom: 0.1rem;
    transition: color 0.12s ease, border-color 0.12s ease;
}

.account-hub__home:hover {
    color: var(--auth-accent);
    border-bottom-color: var(--auth-warm);
}

.account-hub__home .security-icon {
    width: 0.95rem;
    height: 0.95rem;
    opacity: 0.75;
}

.account-hub__tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.account-hub__tabs > li {
    margin: 0;
    min-width: 0;
}

.account-hub__tab {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    min-height: 6.5rem;
    padding: 0.85rem 0.9rem 0.95rem;
    text-decoration: none;
    color: inherit;
    border: 2px solid var(--auth-edge);
    border-radius: 4px;
    background: #fffcf7;
    box-shadow: 3px 3px 0 rgba(20, 18, 16, 0.1);
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.account-hub__tab:hover {
    transform: translate(1px, 1px);
    box-shadow: 2px 2px 0 rgba(20, 18, 16, 0.12);
    border-color: var(--auth-accent);
    color: inherit;
}

.account-hub__tab:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 rgba(20, 18, 16, 0.12);
}

.account-hub__tab.is-active {
    border-color: var(--auth-accent);
    background: linear-gradient(160deg, #f0f7fa 0%, #fffcf7 55%);
    box-shadow: 4px 4px 0 var(--auth-edge);
}

.account-hub__tab--security {
    border-color: rgba(196, 92, 62, 0.45);
    background: linear-gradient(155deg, #fdf6f2 0%, #fffcf7 48%, #f7f4ed 100%);
}

.account-hub__tab--security:hover {
    border-color: var(--auth-warm);
}

.account-hub__tab--security.is-active {
    border-color: var(--auth-warm);
    background: linear-gradient(155deg, #f5e8e2 0%, #fffcf7 40%, #f0f7fa 100%);
    box-shadow: 4px 4px 0 var(--auth-edge);
}

.account-hub__icon {
    width: 2.35rem;
    height: 2.35rem;
    display: grid;
    place-items: center;
    border-radius: 4px;
    background: var(--auth-code-bg);
    border: 1px solid var(--auth-input-border);
    color: var(--auth-accent);
}

.account-hub__icon .security-icon {
    width: 1.2rem;
    height: 1.2rem;
}

.account-hub__icon--shield {
    background: linear-gradient(145deg, #2a4d5c 0%, #1a3340 100%);
    border-color: var(--auth-edge);
    color: #e8f4f0;
    box-shadow: 2px 2px 0 rgba(20, 18, 16, 0.15);
}

.account-hub__icon--shield .security-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.account-hub__body {
    flex: 1;
    min-width: 0;
}

.account-hub__name {
    display: block;
    font-family: "Syne", system-ui, sans-serif;
    font-weight: 800;
    font-size: 0.88rem;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--auth-ink);
}

.account-hub__hint {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.68rem;
    font-weight: 500;
    line-height: 1.35;
    color: var(--auth-muted);
    text-transform: none;
    letter-spacing: normal;
}

.account-hub__badge {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    padding: 0.15rem 0.4rem;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    background: var(--auth-warm);
    border: 1px solid var(--auth-edge);
    border-radius: 3px;
    box-shadow: 2px 2px 0 rgba(20, 18, 16, 0.12);
}

.account-hub__tab--linked.is-active .account-hub__icon {
    background: rgba(42, 77, 92, 0.1);
    border-color: rgba(42, 77, 92, 0.35);
}

@media (max-width: 420px) {
    .account-hub__tabs {
        grid-template-columns: 1fr;
    }

    .account-hub__tab {
        min-height: 0;
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
        padding: 0.75rem 0.85rem;
    }

    .account-hub__badge {
        position: static;
        margin-left: auto;
        flex-shrink: 0;
    }
}

/* ——— Tilknyttede login (/Account/LinkedAccounts) ——— */
.linked-accounts {
    max-width: 34rem;
}

/* ——— Sikkerhed (/Account/Security) ——— */
.security-page {
    max-width: 34rem;
    padding: clamp(1.5rem, 4vw, 2.35rem);
}

.security-icon {
    width: 1.35rem;
    height: 1.35rem;
    display: block;
}

.security-icon--inline {
    width: 1rem;
    height: 1rem;
}

.security-hero {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.15rem;
}

.security-hero__mark {
    flex-shrink: 0;
    width: 3.25rem;
    height: 3.25rem;
    display: grid;
    place-items: center;
    border: 2px solid var(--auth-edge);
    border-radius: 4px;
    background: linear-gradient(145deg, #2a4d5c 0%, #1a3340 100%);
    color: #e8f4f0;
    box-shadow: 4px 4px 0 var(--auth-edge);
}

.security-hero__mark .security-icon {
    width: 1.75rem;
    height: 1.75rem;
}

.security-hero__title {
    font-family: "Syne", system-ui, sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.03em;
    margin: 0 0 0.35rem;
    line-height: 1.1;
}

.security-hero__lede {
    margin: 0;
    font-size: 0.9rem;
    color: var(--auth-muted);
    line-height: 1.55;
}

.security-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.8rem 0.95rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    border: 2px solid;
}

.security-alert--ok {
    background: rgba(42, 92, 69, 0.1);
    border-color: rgba(42, 92, 69, 0.4);
    color: #1f4a36;
}

.security-alert__icon {
    flex-shrink: 0;
    color: #2a6b4a;
}

.security-alert__icon .security-icon {
    width: 1.15rem;
    height: 1.15rem;
}

.security-panel {
    margin-top: 1.35rem;
    border: 2px solid var(--auth-edge);
    border-radius: 4px;
    background: #fffcf7;
    box-shadow: 3px 3px 0 rgba(20, 18, 16, 0.09);
    overflow: hidden;
}

.security-panel--passkey {
    margin-top: 1.1rem;
}

.security-panel__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    padding: 1rem 1.1rem;
    background: linear-gradient(180deg, rgba(42, 77, 92, 0.08) 0%, transparent 100%);
    border-bottom: 2px solid rgba(20, 18, 16, 0.08);
}

.security-panel__icon {
    flex-shrink: 0;
    width: 2.65rem;
    height: 2.65rem;
    display: grid;
    place-items: center;
    border: 2px solid var(--auth-edge);
    border-radius: 4px;
    box-shadow: 2px 2px 0 rgba(20, 18, 16, 0.1);
}

.security-panel__icon--totp {
    background: linear-gradient(135deg, #e8f0f4 0%, #f7f4ed 100%);
    color: var(--auth-accent);
}

.security-panel__icon--passkey {
    background: linear-gradient(135deg, #f0ebe3 0%, #f7f4ed 100%);
    color: #6b4f3a;
}

.security-panel__icon .security-icon {
    width: 1.4rem;
    height: 1.4rem;
}

.security-panel__titles {
    flex: 1;
    min-width: 10rem;
}

.security-panel__title {
    font-family: "Syne", system-ui, sans-serif;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
    margin: 0;
}

.security-panel__subtitle {
    margin: 0.15rem 0 0;
    font-size: 0.75rem;
    color: var(--auth-muted);
    font-weight: 500;
}

.security-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.6rem;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-radius: 999px;
    border: 2px solid;
    flex-shrink: 0;
}

.security-badge .security-icon {
    width: 0.85rem;
    height: 0.85rem;
}

.security-badge--on {
    background: rgba(42, 92, 69, 0.12);
    border-color: rgba(42, 92, 69, 0.45);
    color: #1f4a36;
}

.security-badge--setup {
    background: rgba(196, 92, 62, 0.12);
    border-color: rgba(196, 92, 62, 0.4);
    color: #8a3d28;
}

.security-badge--count {
    background: rgba(42, 77, 92, 0.1);
    border-color: rgba(42, 77, 92, 0.35);
    color: var(--auth-accent);
}

.security-panel__body {
    padding: 1.1rem 1.1rem 1.25rem;
}

.security-panel__text {
    margin: 0 0 1rem;
    font-size: 0.875rem;
    color: var(--auth-muted);
    line-height: 1.55;
}

.security-panel__text--muted {
    margin-top: 1rem;
    margin-bottom: 0;
    font-size: 0.82rem;
}

.security-totp-passkey-fallback {
    margin-top: 0.25rem;
}

.security-totp-passkey-fallback__title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0 0.5rem;
    font-family: "Syne", system-ui, sans-serif;
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--auth-ink);
}

.security-totp-passkey-fallback__title .security-icon {
    width: 1.1rem;
    height: 1.1rem;
    color: #6b4f3a;
}

.security-totp-passkey-fallback__text {
    margin-bottom: 0.85rem;
}

.security-divider {
    margin: 1.1rem 0;
}

.security-steps {
    list-style: none;
    margin: 0 0 1.1rem;
    padding: 0;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.security-steps__item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--auth-muted);
    padding: 0.4rem 0.65rem;
    border: 2px dashed var(--auth-input-border);
    border-radius: 4px;
    background: rgba(255, 252, 247, 0.8);
}

.security-steps__item--current {
    color: var(--auth-ink);
    border-style: solid;
    border-color: var(--auth-accent);
    background: rgba(42, 77, 92, 0.06);
}

.security-steps__num {
    width: 1.35rem;
    height: 1.35rem;
    display: grid;
    place-items: center;
    font-family: "Syne", sans-serif;
    font-weight: 800;
    font-size: 0.72rem;
    border-radius: 50%;
    background: var(--auth-accent);
    color: #f7f4ed;
}

.security-steps__item:not(.security-steps__item--current) .security-steps__num {
    background: var(--auth-input-border);
    color: var(--auth-muted);
}

.security-qr-panel {
    display: flex;
    justify-content: center;
    margin: 0 auto 1rem;
    padding: 1rem;
    max-width: 14.5rem;
    background: #fff;
    border: 2px solid var(--auth-edge);
    border-radius: 4px;
    box-shadow: 4px 4px 0 rgba(20, 18, 16, 0.12);
}

.security-qr-panel__img {
    display: block;
    width: 200px;
    height: 200px;
}

.security-secret {
    margin-bottom: 1.1rem;
}

.security-secret__label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--auth-muted);
    margin-bottom: 0.4rem;
}

.security-secret__row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: stretch;
}

.security-secret__code {
    flex: 1;
    min-width: 12rem;
    font-family: ui-monospace, "Cascadia Code", monospace;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.55rem 0.65rem;
    word-break: break-all;
    background: var(--auth-code-bg);
    border: 2px solid var(--auth-input-border);
    border-radius: 4px;
}

.security-secret__copy {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.75rem;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--auth-accent);
    background: #fffcf7;
    border: 2px solid var(--auth-accent);
    border-radius: 4px;
    box-shadow: 2px 2px 0 rgba(20, 18, 16, 0.1);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.security-secret__copy:hover {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0 rgba(20, 18, 16, 0.12);
}

.security-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 20rem;
}

.security-form--inline {
    margin-top: 0.75rem;
    max-width: none;
}

.security-input--code {
    font-family: ui-monospace, "Cascadia Code", monospace;
    font-size: 1.25rem;
    letter-spacing: 0.2em;
    text-align: center;
    max-width: 11rem;
}

.auth-btn .security-icon {
    width: 1.1rem;
    height: 1.1rem;
    display: inline-block;
    vertical-align: -0.2em;
    margin-right: 0.35rem;
}

.security-btn--danger,
.auth-btn--danger {
    color: #8a3d28;
    background: #f4ebe8;
    border-color: rgba(196, 92, 62, 0.55);
}

.security-btn--danger:hover,
.auth-btn--danger:hover {
    background: rgba(196, 92, 62, 0.12);
    border-color: var(--auth-warm);
}

.security-form .auth-btn {
    margin-top: 0.35rem;
    align-self: flex-start;
}

.security-form .auth-btn--block {
    align-self: stretch;
}

.security-empty {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0 0 1rem;
    padding: 0.85rem 1rem;
    font-size: 0.875rem;
    color: var(--auth-muted);
    border: 2px dashed var(--auth-input-border);
    border-radius: 4px;
    background: rgba(255, 252, 247, 0.65);
}

.security-empty .security-icon {
    flex-shrink: 0;
    opacity: 0.55;
}

.security-passkey-list {
    list-style: none;
    margin: 0 0 1.15rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.security-passkey-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 0.85rem;
    padding: 0.8rem 0.95rem;
    border: 2px solid var(--auth-edge);
    border-radius: 4px;
    background: #fff;
    box-shadow: 2px 2px 0 rgba(20, 18, 16, 0.07);
    border-left: 4px solid var(--auth-warm);
}

.security-passkey-item__icon {
    width: 2.35rem;
    height: 2.35rem;
    display: grid;
    place-items: center;
    border-radius: 4px;
    background: rgba(196, 92, 62, 0.1);
    color: #8a3d28;
    border: 1px solid rgba(196, 92, 62, 0.25);
}

.security-passkey-item__icon .security-icon {
    width: 1.2rem;
    height: 1.2rem;
}

.security-passkey-item__body {
    flex: 1;
    min-width: 8rem;
}

.security-passkey-item__name {
    display: block;
    font-weight: 700;
    font-size: 0.92rem;
}

.security-passkey-item__meta {
    display: block;
    font-size: 0.75rem;
    color: var(--auth-muted);
    margin-top: 0.12rem;
}

.security-passkey-item__remove {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.6rem;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #8a3d28;
    background: transparent;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
}

.security-passkey-item__remove:hover {
    border-color: rgba(196, 92, 62, 0.45);
    background: rgba(196, 92, 62, 0.06);
}

.security-passkey-item__remove .security-icon {
    width: 0.95rem;
    height: 0.95rem;
}

.security-add-passkey {
    padding: 1rem 1.05rem;
    border: 2px dashed var(--auth-input-border);
    border-radius: 4px;
    background: linear-gradient(180deg, rgba(42, 77, 92, 0.04) 0%, transparent 100%);
}

.security-add-passkey__title {
    font-family: "Syne", sans-serif;
    font-weight: 700;
    font-size: 0.88rem;
    margin: 0 0 0.65rem;
    letter-spacing: -0.01em;
}

.security-add-passkey .auth-input {
    max-width: 18rem;
    margin-bottom: 0.65rem;
}

@media (min-width: 520px) {
    .security-page {
        max-width: 38rem;
    }

    .security-panel__head {
        flex-wrap: nowrap;
    }

    .security-badge {
        margin-left: auto;
    }
}

.linked-accounts__title {
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
}

.linked-accounts__intro .linked-accounts__mono {
    font-family: ui-monospace, "Cascadia Code", monospace;
    font-size: 0.85em;
    font-weight: 600;
    background: var(--auth-code-bg);
    padding: 0.05rem 0.25rem;
    border-radius: 3px;
    border: 1px solid var(--auth-input-border);
}

.linked-section {
    margin-top: 1.5rem;
}

.linked-section--bordered {
    padding-top: 1.25rem;
    border-top: 2px dashed rgba(20, 18, 16, 0.15);
}

.linked-section__heading {
    font-family: "Syne", system-ui, sans-serif;
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: -0.02em;
    margin: 0 0 0.5rem;
    color: var(--auth-ink);
}

.linked-section__lede {
    margin: 0 0 1rem;
    font-size: 0.85rem;
    color: var(--auth-muted);
    line-height: 1.5;
}

.linked-section__muted {
    font-size: 0.875rem;
    color: var(--auth-muted);
    margin: 0;
}

.linked-section__footnote {
    margin: 1rem 0 0;
    font-size: 0.8rem;
    color: var(--auth-muted);
}

.linked-password-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 22rem;
    margin-top: 0.75rem;
}

.linked-password-form__submit {
    margin-top: 0.5rem;
    align-self: flex-start;
}

.linked-accounts-banner--ok {
    padding: 0.75rem 0.9rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    background: rgba(42, 92, 69, 0.1);
    border: 2px solid rgba(42, 92, 69, 0.35);
    color: #1f4a36;
}

.auth-provider--microsoft-edu {
    border-color: rgba(0, 120, 212, 0.35);
    background: linear-gradient(135deg, #e8f4fc 0%, #fffcf7 100%);
}

.auth-provider--microsoft-edu:hover {
    border-color: #106ebe;
}

.linked-accounts__provider-grid.auth-providers {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
}

@media (min-width: 520px) {
    .linked-accounts__provider-grid.auth-providers {
        grid-template-columns: 1fr 1fr;
    }

    .linked-accounts {
        max-width: 36rem;
    }
}

.linked-accounts-provider {
    min-height: 3.25rem;
}

.linked-empty {
    margin: 0;
    font-size: 0.9rem;
    color: var(--auth-muted);
    padding: 0.75rem 0.85rem;
    border: 2px dashed var(--auth-input-border);
    border-radius: 4px;
    background: rgba(255, 252, 247, 0.65);
}

.linked-connections {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.linked-conn-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 0.85rem;
    padding: 0.75rem 0.9rem;
    border: 2px solid var(--auth-edge);
    border-radius: 4px;
    background: #fffcf7;
    box-shadow: 2px 2px 0 rgba(20, 18, 16, 0.08);
    border-left-width: 4px;
}

.linked-conn-row--google {
    border-left-color: #4285f4;
}

.linked-conn-row--microsoft {
    border-left-color: #0078d4;
}

.linked-conn-row--microsoft-edu {
    border-left-color: #106ebe;
}

.linked-conn-row--github {
    border-left-color: #24292f;
}

.linked-conn-row--discord {
    border-left-color: #5865f2;
}

.linked-conn-row--neutral {
    border-left-color: var(--auth-accent);
}

.linked-conn-row__badge {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    display: grid;
    place-items: center;
    border-radius: 4px;
    background: var(--auth-code-bg);
    border: 1px solid var(--auth-input-border);
}

.linked-conn-row__badge svg {
    display: block;
}

.linked-conn-row--github .linked-conn-row__badge {
    background: #24292f;
}

.linked-conn-row--discord .linked-conn-row__badge {
    background: #5865f2;
    border-color: #4752c4;
}

.linked-conn-row--google .linked-conn-row__badge {
    background: #fff;
}

.linked-conn-row__body {
    flex: 1;
    min-width: 10rem;
}

.linked-conn-row__name {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--auth-ink);
}

.linked-conn-row__meta {
    display: block;
    font-size: 0.72rem;
    color: var(--auth-muted);
    margin-top: 0.15rem;
    line-height: 1.4;
}

.linked-conn-row__action {
    flex-shrink: 0;
}

.linked-conn-row__unlink {
    font-family: inherit;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    border: 2px solid var(--auth-edge);
    cursor: pointer;
    background: #f4ebe8;
    color: #8b2c26;
    box-shadow: 2px 2px 0 rgba(20, 18, 16, 0.12);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.linked-conn-row__unlink:hover {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0 rgba(20, 18, 16, 0.12);
}

.linked-conn-row__muted {
    font-size: 0.72rem;
    color: var(--auth-muted);
    max-width: 12rem;
    line-height: 1.35;
}

@media (prefers-reduced-motion: reduce) {
    .auth-card {
        animation: none;
    }

    .auth-provider:hover,
    .auth-submit:hover,
    .auth-btn:hover,
    .auth-action:hover,
    .account-hub__tab:hover,
    .linked-conn-row__unlink:hover {
        transform: none;
    }
}
