/* Account pages + sign-in (2 Dec 2026): two-factor set-up and sign-in, recovery codes, password, sign out.
   Dark glass on navy, as the sign-in screen, with an ambient glow behind and a gradient edge on the card.
   Used by Areas/Identity/Pages/_AccountLayout.cshtml and Login.cshtml (the ambient background and card edge). */

:root {
    --acct-navy: #0A1628;
    --acct-blue: #1A56DB;
    --acct-cyan: #00D4FF;
    --acct-text: rgba(255,255,255,0.75);
    --acct-dim: rgba(255,255,255,0.42);
    --acct-line: rgba(255,255,255,0.12);
    --acct-well: rgba(255,255,255,0.06);
    --acct-grad: linear-gradient(135deg, #1A56DB, #00D4FF);
}

/* ── AMBIENT BACKGROUND: two slow glows and a faint dot grid fading out from the centre ── */
.acct-ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; background: var(--acct-navy); }
.acct-ambient::before, .acct-ambient::after {
    content: ""; position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; filter: blur(40px); opacity: 0.55;
}
.acct-ambient::before { background: radial-gradient(circle, rgba(26,86,219,0.45) 0%, transparent 60%); top: -30vmax; left: -20vmax; animation: acct-drift-a 28s ease-in-out infinite alternate; }
.acct-ambient::after { background: radial-gradient(circle, rgba(0,212,255,0.22) 0%, transparent 60%); bottom: -35vmax; right: -25vmax; animation: acct-drift-b 34s ease-in-out infinite alternate; }
.acct-ambient-grid {
    position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.07) 1px, transparent 1px);
    background-size: 22px 22px;
    -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 45%, #000 0%, transparent 75%);
    mask-image: radial-gradient(ellipse 60% 55% at 50% 45%, #000 0%, transparent 75%);
}
@keyframes acct-drift-a { to { transform: translate(12vmax, 8vmax) scale(1.1); } }
@keyframes acct-drift-b { to { transform: translate(-10vmax, -6vmax) scale(1.08); } }

/* ── PAGE ── */
body.acct {
    font-family: 'Open Sans', sans-serif; background: var(--acct-navy); color: var(--acct-text);
    min-height: 100vh; display: flex; align-items: center; align-items: safe center; justify-content: center; padding: 2rem 1rem; margin: 0;
}
.acct-wrap { position: relative; z-index: 1; width: 100%; max-width: 440px; display: flex; flex-direction: column; align-items: center; gap: 1.75rem; animation: acct-rise 0.5s cubic-bezier(.2,.8,.2,1) both; }
@keyframes acct-rise { from { opacity: 0; transform: translateY(12px); } }

.acct-wrap .logo { display: flex; flex-direction: column; align-items: center; text-align: center; }
.acct-wrap .logo img { display: block; width: 260px; max-width: 75vw; height: auto; }
.acct-wrap .logo-rule { width: 48px; height: 2.5px; border-radius: 2px; background: linear-gradient(90deg, var(--acct-blue), var(--acct-cyan)); margin: 10px auto 8px; }
.acct-wrap .logo-sub { font-size: 0.6rem; letter-spacing: 0.26em; color: rgba(255,255,255,0.3); text-transform: uppercase; }

/* ── CARD: glass with a gradient edge (shared with the sign-in card) ── */
.acct-card, .login-card {
    position: relative; width: 100%;
    background:
        linear-gradient(rgba(14,28,52,0.82), rgba(10,22,40,0.82)) padding-box,
        linear-gradient(140deg, rgba(26,86,219,0.6), rgba(0,212,255,0.18) 45%, rgba(255,255,255,0.06)) border-box !important;
    border: 1px solid transparent !important;
    border-radius: 18px !important;
    box-shadow: 0 30px 80px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.05);
    backdrop-filter: blur(14px);
}
.acct-card { padding: 2rem; font-size: 0.85rem; line-height: 1.55; }

/* The icon at the top of each card */
.acct-icon {
    width: 52px; height: 52px; border-radius: 14px; margin-bottom: 1.1rem;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(140deg, rgba(26,86,219,0.35), rgba(0,212,255,0.12));
    border: 1px solid rgba(0,212,255,0.25);
    box-shadow: 0 0 24px rgba(0,212,255,0.15);
    color: var(--acct-cyan);
}
.acct-icon svg { width: 26px; height: 26px; }
.acct-icon.is-success { background: linear-gradient(140deg, rgba(16,185,129,0.35), rgba(52,211,153,0.12)); border-color: rgba(52,211,153,0.35); color: #34D399; box-shadow: 0 0 24px rgba(52,211,153,0.18); }
.acct-icon.is-warning { background: linear-gradient(140deg, rgba(245,158,11,0.3), rgba(251,191,36,0.1)); border-color: rgba(251,191,36,0.35); color: #FBBF24; box-shadow: none; }

.acct-card h1 { font-family: 'Archivo', sans-serif; font-size: 1.3rem; font-weight: 800; letter-spacing: -0.01em; color: #fff; margin: 0 0 0.35rem; }
.acct-card h4 { font-family: 'Archivo', sans-serif; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--acct-dim); margin: 1.6rem 0 0.45rem; }
.acct-card p { margin-bottom: 0.9rem; }
.acct-card strong { color: #fff; font-weight: 600; }
.acct-card .acct-lead { font-size: 0.85rem; color: var(--acct-dim); margin-bottom: 1.5rem; }
.acct-card .acct-lead strong { color: rgba(255,255,255,0.85); }
.acct-card a { color: var(--acct-cyan); text-decoration: none; }
.acct-card a:hover { text-decoration: underline; }
.acct-card .acct-note { font-size: 0.76rem; color: var(--acct-dim); }
.acct-card .acct-on { color: #34D399; }

/* A setting row on the two-factor overview */
.acct-rows { border-top: 1px solid rgba(255,255,255,0.07); margin-top: 0.5rem; }
.acct-row { display: flex; align-items: center; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid rgba(255,255,255,0.07); }
.acct-row-text { flex: 1; min-width: 0; }
.acct-row-title { color: #fff; font-weight: 600; font-size: 0.85rem; }
.acct-row-sub { color: var(--acct-dim); font-size: 0.76rem; }
.acct-pill { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.7rem; font-weight: 600; padding: 0.2rem 0.6rem; border-radius: 99px; background: rgba(52,211,153,0.12); color: #34D399; border: 1px solid rgba(52,211,153,0.3); }
.acct-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }

/* ── GUIDED SET-UP: progress bar + one step at a time (all steps show if script is off) ── */
.acct-progress { display: flex; gap: 6px; margin: 0 0 0.6rem; }
.acct-progress span { flex: 1; height: 4px; border-radius: 4px; background: rgba(255,255,255,0.1); overflow: hidden; position: relative; }
.acct-progress span::after { content: ""; position: absolute; inset: 0; background: var(--acct-grad); transform: scaleX(0); transform-origin: left; transition: transform 0.45s cubic-bezier(.2,.8,.2,1); }
.acct-progress span.is-done::after { transform: scaleX(1); }
.acct-progress-label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--acct-cyan); margin-bottom: 1rem; }
.acct-wizard.is-live .acct-step { display: none; }
.acct-wizard.is-live .acct-step.is-current { display: block; animation: acct-step-in 0.35s cubic-bezier(.2,.8,.2,1) both; }
@keyframes acct-step-in { from { opacity: 0; transform: translateX(14px); } }
.acct-wizard:not(.is-live) .acct-step + .acct-step { margin-top: 1.75rem; padding-top: 1.75rem; border-top: 1px solid rgba(255,255,255,0.07); }
.acct-wizard:not(.is-live) .acct-step-nav, .acct-wizard:not(.is-live) .acct-progress, .acct-wizard:not(.is-live) .acct-progress-label { display: none; }
.acct-step h2 { font-family: 'Archivo', sans-serif; font-size: 1.2rem; font-weight: 800; color: #fff; margin: 0 0 0.35rem; }
.acct-step-nav { display: flex; gap: 0.5rem; margin-top: 1.5rem; }
.acct-step-nav .btn-primary { flex: 1; }

/* App choices */
.acct-apps { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-top: 1rem; }
.acct-app { display: flex; align-items: center; gap: 0.6rem; padding: 0.75rem; border-radius: 12px; background: var(--acct-well); border: 1px solid var(--acct-line); color: #fff; font-size: 0.78rem; font-weight: 600; line-height: 1.25; }
.acct-app small { display: block; font-weight: 400; color: var(--acct-dim); font-size: 0.7rem; }
.acct-app-mark { width: 30px; height: 30px; border-radius: 8px; flex: none; display: flex; align-items: center; justify-content: center; }
.acct-app-mark svg { width: 18px; height: 18px; }

/* QR on a white tile with a soft glow (phones need the contrast); key in a well with a copy button */
.acct-qr { display: flex; justify-content: center; margin: 1.25rem 0 1rem; }
.acct-qr-tile { position: relative; padding: 10px; background: #fff; border-radius: 16px; box-shadow: 0 0 0 6px rgba(0,212,255,0.08), 0 0 40px rgba(0,212,255,0.25); }
.acct-qr-tile svg { display: block; width: 184px; height: 184px; }
.acct-qr-tile::before, .acct-qr-tile::after { content: ""; position: absolute; width: 22px; height: 22px; border: 2.5px solid var(--acct-cyan); }
.acct-qr-tile::before { top: -9px; left: -9px; border-right: 0; border-bottom: 0; border-radius: 8px 0 0 0; }
.acct-qr-tile::after { bottom: -9px; right: -9px; border-left: 0; border-top: 0; border-radius: 0 0 8px 0; }
.acct-disclose { text-align: center; }
.acct-disclose summary { list-style: none; cursor: pointer; color: var(--acct-cyan); font-size: 0.78rem; display: inline-block; }
.acct-disclose summary::-webkit-details-marker { display: none; }
.acct-disclose[open] summary { color: var(--acct-dim); }
.acct-key-row { display: flex; gap: 0.5rem; align-items: stretch; margin-top: 0.75rem; text-align: left; }
.acct-key {
    flex: 1; display: block; font-family: Consolas, 'Courier New', monospace; font-size: 0.88rem; letter-spacing: 0.06em;
    background: var(--acct-well); border: 1px solid var(--acct-line); border-radius: 10px; padding: 0.6rem 0.75rem;
    color: var(--acct-cyan); word-break: break-all; user-select: all;
}

/* ── CODE BOXES: six slots that mirror one real input (so paste and phone autofill still work) ── */
.acct-otp { position: relative; margin: 0.25rem 0 0; }
.acct-otp input.acct-code-input {
    position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; z-index: 2; cursor: text;
    font-size: 16px; /* no zoom on phones */ caret-color: transparent; color: transparent; border: 0; background: none;
}
.acct-otp-slots { display: grid; grid-template-columns: repeat(3, 1fr) 0.35rem repeat(3, 1fr); gap: 0.5rem; }
.acct-otp-slot:nth-child(4) { grid-column: 5; }
.acct-otp-slots .gap { display: none; }
.acct-otp-slot {
    height: 58px; border-radius: 12px; background: var(--acct-well); border: 1px solid var(--acct-line);
    display: flex; align-items: center; justify-content: center;
    font-family: 'Archivo', sans-serif; font-size: 1.6rem; font-weight: 700; color: #fff;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s, transform 0.15s;
}
.acct-otp-slot.is-filled { background: rgba(26,86,219,0.14); border-color: rgba(0,212,255,0.35); }
.acct-otp.is-focused .acct-otp-slot.is-active { border-color: var(--acct-cyan); box-shadow: 0 0 0 3px rgba(0,212,255,0.18); }
.acct-otp.is-focused .acct-otp-slot.is-active::after { content: ""; width: 2px; height: 26px; background: var(--acct-cyan); animation: acct-caret 1s steps(1) infinite; }
@keyframes acct-caret { 50% { opacity: 0; } }
.acct-otp.is-error .acct-otp-slot { border-color: rgba(248,113,113,0.6); background: rgba(248,113,113,0.08); }
.acct-otp.is-shake .acct-otp-slots { animation: acct-shake 0.4s; }
@keyframes acct-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.acct-otp.is-busy .acct-otp-slot { opacity: 0.6; }
/* Script off: the real input shows as an ordinary code box */
.acct-otp:not(.is-live) input.acct-code-input { position: static; opacity: 1; height: auto; color: #fff; caret-color: auto; font-family: Consolas, monospace; font-size: 1.5rem; letter-spacing: 0.4em; text-align: center; padding: 0.55rem; border: 1px solid var(--acct-line); background: var(--acct-well); border-radius: 10px; }
.acct-otp:not(.is-live) .acct-otp-slots { display: none; }

/* The 30-second ring: when the code in the app changes */
.acct-timer { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-top: 0.9rem; font-size: 0.74rem; color: var(--acct-dim); }
.acct-timer svg { width: 18px; height: 18px; transform: rotate(-90deg); }
.acct-timer circle { fill: none; stroke-width: 3; }
.acct-timer .track { stroke: rgba(255,255,255,0.1); }
.acct-timer .bar { stroke: var(--acct-cyan); stroke-linecap: round; transition: stroke-dashoffset 1s linear, stroke 0.3s; }
.acct-timer.is-low .bar { stroke: #FBBF24; }

/* Recovery codes */
.acct-codes { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin: 1.25rem 0 0.9rem; counter-reset: code; }
.acct-codes code {
    position: relative; font-family: Consolas, 'Courier New', monospace; font-size: 0.92rem; letter-spacing: 0.08em; text-align: center;
    background: var(--acct-well); border: 1px solid var(--acct-line); border-radius: 10px; padding: 0.55rem 0.5rem; color: #fff; counter-increment: code;
}
.acct-codes code::before { content: counter(code); position: absolute; left: 0.55rem; top: 50%; transform: translateY(-50%); font-size: 0.62rem; color: var(--acct-dim); letter-spacing: 0; }
.acct-code-tools { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; }
.acct-code-tools .btn { flex: 1; }
.acct-confirm { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.75rem 0.85rem; border-radius: 10px; background: var(--acct-well); border: 1px solid var(--acct-line); margin-bottom: 1rem; cursor: pointer; }
.acct-confirm input { margin-top: 0.2rem; }
.acct-confirm span { font-size: 0.8rem; color: rgba(255,255,255,0.8); }

/* ── FORMS ── */
.acct-card .form-label, .acct-card label { font-size: 0.78rem; font-weight: 500; color: rgba(255,255,255,0.62); margin-bottom: 0.3rem; }
.acct-card .form-control {
    background: var(--acct-well); border: 1px solid var(--acct-line); border-radius: 10px;
    color: #fff; font-size: 0.88rem; padding: 0.65rem 0.85rem; transition: all 0.2s;
}
.acct-card .form-control::placeholder { color: rgba(255,255,255,0.25); }
.acct-card .form-control:focus { background: rgba(255,255,255,0.08); border-color: var(--acct-blue); box-shadow: 0 0 0 3px rgba(26,86,219,0.22); color: #fff; outline: none; }
.acct-card .form-check-input { background-color: var(--acct-well); border-color: rgba(255,255,255,0.25); }
.acct-card .form-check-input:checked { background-color: var(--acct-blue); border-color: var(--acct-blue); }
.acct-card .form-check-input:focus { box-shadow: 0 0 0 3px rgba(26,86,219,0.25); }
.acct-card .form-check-label { font-size: 0.8rem; color: rgba(255,255,255,0.6); font-weight: 400; }
.acct-card .text-danger { color: #f87171 !important; font-size: 0.78rem; display: block; margin-top: 0.35rem; }
.acct-card .text-danger:empty { display: none; }
.acct-card .validation-summary-valid { display: none; }

/* ── BUTTONS: the sign-in gradient for the main action, a quiet outline for the rest ── */
.acct-card .btn { border-radius: 10px; font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 0.85rem; letter-spacing: 0.02em; padding: 0.65rem 1.1rem; display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; }
.acct-card .btn svg { width: 16px; height: 16px; }
.acct-card .btn-lg { padding: 0.75rem; font-size: 0.92rem; }
.acct-card .btn-primary { position: relative; overflow: hidden; background: var(--acct-grad); border: none; color: #fff; box-shadow: 0 8px 24px rgba(26,86,219,0.35); transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s; }
.acct-card .btn-primary:hover, .acct-card .btn-primary:focus-visible { color: #fff; background: var(--acct-grad); transform: translateY(-1px); box-shadow: 0 12px 30px rgba(0,212,255,0.3); }
.acct-card .btn-primary:active { transform: translateY(0); }
.acct-card .btn-primary:disabled { opacity: 0.35; box-shadow: none; transform: none; }
.acct-card .btn-primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.25) 50%, transparent 70%); transform: translateX(-100%); }
.acct-card .btn-primary:hover::after { transform: translateX(100%); transition: transform 0.7s; }
.acct-card .btn-outline-secondary { background: transparent; border: 1px solid rgba(255,255,255,0.18); color: rgba(255,255,255,0.85); }
.acct-card .btn-outline-secondary:hover { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.32); color: #fff; }
.acct-card .btn-outline-secondary.is-done { border-color: rgba(52,211,153,0.5); color: #34D399; }
.acct-card .btn-danger { background: transparent; border: 1px solid rgba(248,113,113,0.45); color: #f87171; }
.acct-card .btn-danger:hover { background: rgba(248,113,113,0.1); color: #fca5a5; }
.acct-card .btn-sm { padding: 0.45rem 0.8rem; font-size: 0.78rem; }
.acct-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ── MESSAGES ── */
.acct-card .alert { border-radius: 10px; font-size: 0.8rem; padding: 0.65rem 0.85rem; display: flex; gap: 0.55rem; align-items: flex-start; }
.acct-card .alert strong { color: inherit; }
.acct-card .alert-danger { background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.3); color: #fca5a5; }
.acct-card .alert-warning { background: rgba(251,191,36,0.08); border: 1px solid rgba(251,191,36,0.3); color: #fcd34d; }
.acct-card .alert-success, .acct-card .alert-info { background: rgba(52,211,153,0.08); border: 1px solid rgba(52,211,153,0.3); color: #6ee7b7; }
.acct-card .alert-dismissible { padding-right: 2.5rem; }
.acct-card .btn-close { filter: invert(1); opacity: 0.5; padding: 0.9rem; }

.acct-foot { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 0.6rem; font-size: 0.72rem; }
.acct-foot a { color: rgba(255,255,255,0.55); text-decoration: none; font-size: 0.8rem; display: inline-flex; align-items: center; gap: 0.35rem; }
.acct-foot a:hover { color: #fff; }
.acct-foot span { color: rgba(255,255,255,0.22); }

@media (max-width: 420px) {
    .acct-card { padding: 1.5rem 1.25rem; }
    .acct-otp-slot { height: 50px; font-size: 1.35rem; }
}

@media (prefers-reduced-motion: reduce) {
    .acct-ambient::before, .acct-ambient::after, .acct-wrap, .acct-step, .acct-otp-slots { animation: none !important; }
    .acct-card .btn-primary::after { display: none; }
}

@media print {
    body.acct { background: #fff; color: #000; display: block; }
    .acct-ambient, .acct-foot, .acct-wrap .logo, .acct-code-tools, .acct-confirm, .acct-card .btn, .acct-icon, .acct-card .alert { display: none !important; }
    .acct-card { background: none !important; border: 0 !important; box-shadow: none; }
    .acct-card h1, .acct-codes code { color: #000; }
    .acct-codes code { border: 1px solid #999; background: none; }
}
