/* Shared styles for the modern login / register pages */
:root { --primary: #B666C7; --primary-dark: #81488d; --primary-soft: #f6eaf9; --ink: #1c1226; --muted: #6b6475; --line: #e9dff0; }
*, *::before, *::after { box-sizing: border-box; }

body.au-body {
    margin: 0; min-height: 100vh; font-family: "Poppins", sans-serif; color: var(--ink); background: #fbf7fd; overflow-x: hidden;
}

/* ---------- animated background ---------- */
.au-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.au-bg::before { /* dotted grid */
    content: ""; position: absolute; inset: 0;
    background-image: radial-gradient(rgba(129, 72, 141, .16) 1.2px, transparent 1.2px); background-size: 26px 26px;
    -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
}
.au-orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; animation: au-drift 18s ease-in-out infinite alternate; }
.au-orb.o1 { width: 520px; height: 520px; left: -140px; top: -140px; background: #d9a1e6; }
.au-orb.o2 { width: 460px; height: 460px; right: -120px; top: 10%; background: #a98af0; animation-delay: -6s; }
.au-orb.o3 { width: 520px; height: 520px; left: 30%; bottom: -260px; background: #f3b3d9; animation-delay: -11s; }
@keyframes au-drift { to { transform: translate(60px, 40px) scale(1.12); } }

/* ---------- top bar ---------- */
.au-top { position: fixed; z-index: 5; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 22px clamp(18px, 4vw, 48px); }
.au-top a.back { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; font-weight: 500; text-decoration: none; padding: 9px 16px; border-radius: 999px; background: rgba(255, 255, 255, .7); border: 1px solid var(--line); backdrop-filter: blur(10px); transition: .2s; }
.au-top a.back:hover { color: var(--primary-dark); border-color: var(--primary); }

/* ---------- layout ---------- */
.au-wrap { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 96px 18px 56px; }
.au-card {
    position: relative; width: min(440px, 100%); background: rgba(255, 255, 255, .86); border: 1px solid rgba(255, 255, 255, .9); border-radius: 30px; padding: 40px 38px 32px;
    backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 40px 90px -30px rgba(94, 40, 112, .45), 0 10px 30px -12px rgba(94, 40, 112, .18);
    animation: au-rise .6s cubic-bezier(.2, .8, .2, 1) both;
}
.au-card.wide { width: min(640px, 100%); }
@keyframes au-rise { from { opacity: 0; transform: translateY(22px) scale(.98); } }

.au-badge { width: 64px; height: 64px; margin: -72px auto 18px; border-radius: 20px; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; box-shadow: 0 18px 34px -12px rgba(129, 72, 141, .8); }
.au-badge svg { width: 30px; height: 30px; }
.au-head { text-align: center; margin-bottom: 26px; }
.au-head h2 { font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 8px; }
.au-head p { color: var(--muted); margin: 0; line-height: 1.6; font-size: 15px; }

/* floating cards beside the form (desktop only) */
.au-float { position: absolute; z-index: 0; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 18px; background: rgba(255, 255, 255, .85); border: 1px solid var(--line); backdrop-filter: blur(12px); box-shadow: 0 24px 44px -20px rgba(94, 40, 112, .4); font-size: 13px; line-height: 1.35; animation: au-bob 6s ease-in-out infinite; }
.au-float i { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-dark); font-style: normal; font-size: 18px; }
.au-float b { display: block; font-size: 14px; }
.au-float span { color: var(--muted); }
.au-float.f1 { left: calc(50% - 440px - 40px); top: 28%; }
.au-float.f2 { right: calc(50% - 440px - 40px); top: 52%; animation-delay: -2.5s; }
.au-float.f3 { left: calc(50% - 400px - 40px); bottom: 14%; animation-delay: -4s; }
@keyframes au-bob { 50% { transform: translateY(-12px); } }
.au-card.wide ~ .au-float.f1 { left: calc(50% - 320px - 235px); }
.au-card.wide ~ .au-float.f2 { right: calc(50% - 320px - 235px); }
.au-card.wide ~ .au-float.f3 { left: calc(50% - 320px - 215px); }
@media (max-width: 1300px) { .au-float { display: none; } }

/* ---------- floating-label inputs ---------- */
.au-field { margin-bottom: 16px; }
.au-input { position: relative; }
.au-input > svg.lead { position: absolute; left: 16px; top: 50%; width: 19px; height: 19px; transform: translateY(-50%); color: #a79bb0; pointer-events: none; transition: color .2s; }
.au-input input, .au-input select {
    width: 100%; height: 58px; padding: 24px 16px 8px; border: 1.5px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, .9); font: inherit; font-size: 15px; color: var(--ink);
    transition: border-color .2s, box-shadow .2s, background .2s; appearance: none; -webkit-appearance: none;
}
.au-input.has-lead input { padding-left: 46px; }
.au-input.has-toggle input { padding-right: 52px; }
.au-input input::placeholder { color: transparent; }
.au-input input:focus, .au-input select:focus { outline: 0; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(182, 102, 199, .16); }
.au-input:focus-within > svg.lead { color: var(--primary-dark); }
.au-input input.is-invalid, .au-input select.is-invalid { border-color: #dc3545; }
.au-input label { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 15px; color: #9a8fa4; pointer-events: none; transition: all .18s ease; transform-origin: left; }
.au-input.has-lead label { left: 46px; }
.au-input input:focus ~ label, .au-input input:not(:placeholder-shown) ~ label, .au-input select ~ label {
    top: 11px; transform: none; font-size: 11.5px; font-weight: 500; color: var(--muted);
}
.au-input input:focus ~ label { color: var(--primary-dark); }
.au-input label em { color: #dc3545; font-style: normal; }
.au-input select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b6475' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; padding-right: 42px; cursor: pointer;
}
.au-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; padding: 8px; cursor: pointer; color: #a79bb0; border-radius: 10px; display: grid; }
.au-toggle:hover { color: var(--primary-dark); background: var(--primary-soft); }
.au-toggle svg { width: 19px; height: 19px; }
.au-field .text-danger { color: #dc3545; font-size: 13px; margin: 6px 0 0 4px; padding: 0; }
.au-field ul { list-style: none; padding: 0; }
.au-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.au-full { grid-column: 1 / -1; }

.au-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 2px 22px; font-size: 14px; }
.au-check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; color: var(--muted); }
.au-check input { width: 18px; height: 18px; accent-color: var(--primary-dark); margin: 0; cursor: pointer; }
.au-row a, .au-note a { color: var(--primary-dark); font-weight: 500; text-decoration: none; }
.au-row a:hover, .au-note a:hover { text-decoration: underline; }

/* ---------- buttons ---------- */
.au-submit, .au-btn {
    position: relative; overflow: hidden; border: 0; border-radius: 16px; cursor: pointer; font: inherit; font-weight: 600; font-size: 15.5px; padding: 16px 22px;
    transition: transform .2s, box-shadow .2s, opacity .2s;
}
.au-submit { width: 100%; color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); box-shadow: 0 14px 28px -12px rgba(129, 72, 141, .8); }
.au-submit::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%); transform: translateX(-120%); transition: transform .6s; }
.au-submit:hover { transform: translateY(-2px); box-shadow: 0 18px 32px -12px rgba(129, 72, 141, .9); }
.au-submit:hover::after { transform: translateX(120%); }
.au-submit:disabled { opacity: .75; cursor: progress; transform: none; }
.au-btn.ghost { background: #fff; color: var(--muted); border: 1.5px solid var(--line); }
.au-btn.ghost:hover { color: var(--primary-dark); border-color: var(--primary); }
.au-note { text-align: center; font-size: 13px; color: var(--muted); margin: 16px 0 0; line-height: 1.6; }
.au-switch { text-align: center; margin-top: 22px; padding-top: 20px; border-top: 1px dashed var(--line); font-size: 14px; color: var(--muted); }
.au-switch a { color: var(--primary-dark); font-weight: 600; text-decoration: none; }
.au-below { position: relative; z-index: 1; margin-top: 26px; text-align: center; font-size: 13px; color: var(--muted); }
.au-below a { color: var(--primary-dark); text-decoration: none; font-weight: 500; }
.au-card .alert { border-radius: 14px; font-size: 14px; }

/* ---------- password helpers ---------- */
.au-meter { display: flex; gap: 6px; margin: 10px 2px 0; }
.au-meter span { flex: 1; height: 5px; border-radius: 99px; background: var(--line); transition: background .25s; }
.au-meter-text, .au-match { font-size: 12.5px; color: var(--muted); margin: 6px 4px 0; min-height: 18px; }

/* ---------- register wizard ---------- */
.au-plan { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 auto 22px; padding: 8px 16px; width: max-content; max-width: 100%; border-radius: 999px; background: var(--primary-soft); color: var(--primary-dark); font-size: 13.5px; }
.au-plan b { font-weight: 600; }
.au-plan span { padding: 2px 10px; border-radius: 999px; background: #fff; font-size: 12px; font-weight: 500; }
.au-steps { display: flex; align-items: center; margin: 0 auto 30px; max-width: 460px; }
.au-steps .st { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 500; color: #a79bb0; position: relative; z-index: 1; min-width: 90px; text-align: center; }
.au-steps .st i { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 600; background: #fff; border: 2px solid var(--line); transition: all .3s; }
.au-steps .st i svg { width: 18px; height: 18px; }
.au-steps .st.active { color: var(--primary-dark); }
.au-steps .st.active i { border-color: var(--primary); color: var(--primary-dark); box-shadow: 0 0 0 5px rgba(182, 102, 199, .16); }
.au-steps .st.done { color: var(--primary-dark); }
.au-steps .st.done i { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); border-color: transparent; color: #fff; }
.au-steps .bar { flex: 1; height: 3px; background: var(--line); border-radius: 9px; margin: -22px -14px 0; position: relative; overflow: hidden; }
.au-steps .bar::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--primary), var(--primary-dark)); transform: scaleX(0); transform-origin: left; transition: transform .4s ease; }
.au-steps .bar.done::after { transform: scaleX(1); }
.au-step { display: none; animation: au-step .35s ease both; }
.au-step.active { display: block; }
@keyframes au-step { from { opacity: 0; transform: translateX(16px); } }
.au-step h3 { font-size: 17px; font-weight: 600; margin: 0 0 4px; }
.au-step > p { color: var(--muted); font-size: 14px; margin: 0 0 20px; }
.au-actions { display: flex; gap: 12px; margin-top: 8px; }
.au-actions .au-submit, .au-actions .au-btn.next { flex: 1; width: auto; }
.au-btn.next { color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); box-shadow: 0 14px 28px -12px rgba(129, 72, 141, .8); }
.au-btn.next:hover, .au-btn.ghost:hover { transform: translateY(-2px); }
[hidden] { display: none !important; }

@media (max-width: 640px) {
    .au-card { padding: 34px 22px 26px; border-radius: 26px; }
    .au-grid { grid-template-columns: 1fr; }
    .au-steps .st { min-width: 70px; font-size: 11.5px; }
    .au-wrap { padding-top: 88px; }
}
@media (prefers-reduced-motion: reduce) {
    .au-orb, .au-float, .au-card, .au-step { animation: none; }
    .au-submit, .au-btn, .au-meter span, .au-input label { transition: none; }
}
