/* =========================================================
   auth.css — sign in / sign up (website style, RTL, px)
   ========================================================= */
.au { background: var(--cream); }
.au-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; padding: 16px; gap: 16px; }

/* ---------- Form side ---------- */
.au-panel { display: flex; flex-direction: column; padding: 12px 40px 20px; }
.au-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.au-back { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--ink-2); transition: color .25s; }
.au-back b { color: var(--purple); }
.au-back [data-lucide] { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.au-back:hover { color: var(--orange); }
.au-back:hover [data-lucide] { transform: translateX(4px); }

.au-form-wrap { width: 100%; max-width: 420px; margin: auto; padding: 32px 0; animation: auIn .7s var(--ease) both; }
.au-form-wrap--wide { max-width: 560px; }
.au-form-wrap h1 { font-size: 40px; font-weight: 800; line-height: 1.35; margin-bottom: 8px; }
.au .mark::after { animation: markDraw .9s var(--ease) .5s both; }
.au-sub { font-size: 15px; color: var(--ink-2); margin-bottom: 28px; }

.au-form { display: grid; gap: 18px; }
.au-field { display: grid; gap: 7px; }
.au-field__row { display: flex; justify-content: space-between; align-items: center; }
.au-field label { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.au-input { position: relative; display: flex; align-items: center; height: 52px; padding: 0 16px; background: #fff; border: 1.5px solid var(--line); border-radius: 16px; transition: border-color .25s, box-shadow .25s; }
.au-input:hover { border-color: #C9C9C9; }
.au-input:focus-within { border-color: var(--orange); box-shadow: 0 0 0 5px var(--orange-soft); }
.au-input > [data-lucide]:first-child { width: 18px; height: 18px; color: var(--ink-2); flex-shrink: 0; transition: color .25s; }
.au-input:focus-within > [data-lucide]:first-child { color: var(--orange); }
.au-input input, .au-input select { flex: 1; min-width: 0; height: 100%; padding: 0 12px; border: 0; outline: 0; background: transparent; font: inherit; font-size: 15px; color: var(--ink); }
.au-input input::placeholder { color: #A3A3A3; }
.au-input input[type="tel"] { direction: ltr; text-align: right; }
.au-input--select select { appearance: none; cursor: pointer; }
.au-input--select::after { content: ""; position: absolute; left: 18px; top: 50%; width: 8px; height: 8px; border-left: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: translateY(-70%) rotate(-45deg); pointer-events: none; }
.au-eye { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); cursor: pointer; }
.au-eye:hover { background: var(--cream); color: var(--purple); }
.au-eye [data-lucide] { width: 18px; height: 18px; }
.au-match { width: 18px; height: 18px; color: var(--purple); opacity: 0; transform: scale(.5); transition: all .3s var(--ease); }
.au-input.is-match .au-match { opacity: 1; transform: none; }
.au-input.is-match { border-color: var(--purple); }

.au-link { font-size: 13px; font-weight: 600; color: var(--purple); }
.au-link:hover { color: var(--orange); }
.au-error { font-size: 12.5px; color: #B3261E; }
.au-alert { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 14px; background: #F6E1E1; color: #8E1B16; font-size: 14px; }
.au-alert [data-lucide] { width: 18px; height: 18px; }

.au-check { position: relative; display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); cursor: pointer; user-select: none; }
.au-check input { position: absolute; opacity: 0; }
.au-check > span { width: 22px; height: 22px; flex-shrink: 0; border: 1.5px solid #BDBDBD; border-radius: 7px; background: #fff; transition: all .2s; display: grid; place-items: center; }
.au-check > span::after { content: ""; width: 10px; height: 6px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) scale(0); margin-top: -2px; transition: transform .25s var(--ease); }
.au-check input:checked + span { background: var(--purple); border-color: var(--purple); }
.au-check input:checked + span::after { transform: rotate(-45deg) scale(1); }
.au-check input:focus-visible + span { box-shadow: 0 0 0 4px var(--purple-soft); }

.au-submit { width: 100%; height: 54px; font-size: 16px; margin-top: 4px; }
.au-submit [data-lucide] { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.au-submit:hover [data-lucide] { transform: translateX(-5px); }

.au-divider { display: flex; align-items: center; gap: 14px; margin: 24px 0; font-size: 13px; color: var(--ink-2); }
.au-divider::before, .au-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.au-alt { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1.5px dashed #C9C9C9; border-radius: 18px; transition: all .3s var(--ease); }
.au-alt:hover { border-style: solid; border-color: var(--purple); background: #fff; transform: translateY(-2px); }
.au-alt__ico { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: var(--purple-soft); color: var(--purple); }
.au-alt > span:nth-child(2) { flex: 1; }
.au-alt strong { display: block; font-size: 14.5px; }
.au-alt small { font-size: 12.5px; color: var(--ink-2); }
.au-alt > [data-lucide]:last-child { color: var(--ink-2); transition: transform .3s var(--ease); }
.au-alt:hover > [data-lucide]:last-child { transform: translateX(-4px); color: var(--purple); }
.au-foot { font-size: 12px; color: var(--ink-2); text-align: center; }

/* Register groups */
.au-group { margin: 0; padding: 0; border: 0; display: grid; gap: 16px; min-width: 0; }
.au-group + .au-group { padding-top: 20px; border-top: 1px dashed var(--line); }
.au-group legend { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding: 0; font-family: var(--head); font-size: 15px; font-weight: 700; }
.au-group legend span { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; font-size: 13px; color: #fff; }
.au-group:nth-of-type(1) legend span { background: var(--orange); }
.au-group:nth-of-type(2) legend span { background: var(--purple); }
.au-group:nth-of-type(3) legend span { background: var(--yellow); }
.au-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.au-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.au-choice input { position: absolute; opacity: 0; }
.au-choice > span { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 16px; background: #fff; cursor: pointer; transition: all .25s; }
.au-choice [data-lucide] { width: 24px; height: 24px; margin-bottom: 6px; color: var(--ink-2); transition: color .25s, transform .4s var(--ease); }
.au-choice b { font-size: 14px; }
.au-choice small { font-size: 12px; color: var(--ink-2); }
.au-choice > span::after { content: ""; position: absolute; top: 14px; left: 14px; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #BDBDBD; transition: all .25s; }
.au-choice input:checked + span { border-color: var(--orange); background: #F9F1F3; box-shadow: 0 8px 20px rgba(92,11,31,.12); }
.au-choice input:checked + span [data-lucide] { color: var(--orange); transform: scale(1.1) rotate(-6deg); }
.au-choice input:checked + span::after { border: 5px solid var(--orange); }
.au-meter { display: grid; grid-template-columns: repeat(3, 1fr) auto; align-items: center; gap: 6px; }
.au-meter span { height: 5px; border-radius: 5px; background: var(--line); transition: background .3s; }
.au-meter small { font-size: 11.5px; color: var(--ink-2); margin-right: 6px; white-space: nowrap; }
.au-meter[data-level="1"] span:nth-child(-n+1) { background: #B3261E; }
.au-meter[data-level="2"] span:nth-child(-n+2) { background: var(--yellow); }
.au-meter[data-level="3"] span { background: var(--purple); }

/* ---------- Art side ---------- */
.au-art { position: sticky; top: 16px; height: calc(100vh - 32px); min-height: 560px; display: flex; flex-direction: column; justify-content: space-between; padding: 40px; overflow: hidden; border-radius: 32px; background: var(--paper); }
.au-art::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(#CFCFCF 1px, transparent 1px), linear-gradient(90deg, #CFCFCF 1px, transparent 1px); background-size: 44px 44px; -webkit-mask-image: radial-gradient(closest-side, #000 40%, transparent 100%); mask-image: radial-gradient(closest-side, #000 40%, transparent 100%); }
.au-art__stage { position: relative; flex: 1; max-width: 520px; width: 100%; margin: 0 auto; }
.au-art__lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.au-art__lines path { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-dasharray: 5 6; vector-effect: non-scaling-stroke; animation: dash 18s linear infinite; }
.au-tile { position: absolute; animation: auPop .8s var(--ease) both, bob 7s ease-in-out 1s infinite; }
.au-tile--a { right: 4%; top: 6%; width: 44%; animation-delay: .1s, 1s; }
.au-tile--b { left: 6%; top: 30%; width: 46%; animation-delay: .25s, -2s; }
.au-tile--c { right: 14%; top: 58%; width: 38%; animation-delay: .4s, -4s; }
.au-float { position: absolute; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: #fff; border-radius: 16px; box-shadow: 0 16px 34px rgba(14,26,38,.12); animation: auPop .7s var(--ease) both, bob 6s ease-in-out 1.2s infinite; }
.au-float strong { display: block; font-size: 13.5px; }
.au-float small { font-size: 12px; color: var(--ink-2); }
.au-float--1 { left: 0; top: 8%; animation-delay: .6s, -1s; }
.au-float--2 { left: 10%; bottom: 6%; animation-delay: .75s, -3s; }
.au-float__ico { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; color: #fff; }
.au-float__ico [data-lucide] { width: 18px; height: 18px; }
.au-float__ico--p { background: var(--purple); }
.au-float__ico--o { background: var(--orange); }
.au-art__text { position: relative; z-index: 1; }
.au-art__text h2 { font-size: 26px; font-weight: 700; line-height: 1.5; max-width: 440px; margin-bottom: 14px; }
.au-art__text ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.au-art__text li { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: #fff; font-size: 13px; font-weight: 600; }
.au-art__text li [data-lucide] { width: 16px; height: 16px; }
.au-art__text li:nth-child(1) [data-lucide] { color: var(--orange); }
.au-art__text li:nth-child(2) [data-lucide] { color: var(--purple); }
.au-art__text li:nth-child(3) [data-lucide] { color: var(--yellow); }

@keyframes auIn { from { opacity: 0; transform: translateY(18px); } }
@keyframes auPop { from { opacity: 0; scale: .8; } }
@keyframes markDraw { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@media (max-width: 980px) {
  .au-layout { grid-template-columns: 1fr; padding: 0; }
  .au-art { display: none; }
  .au-panel { padding: 8px 20px 20px; }
}
@media (max-width: 560px) {
  .au-form-wrap h1 { font-size: 32px; }
  .au-grid, .au-choices { grid-template-columns: 1fr; }
  .au-back { font-size: 12.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .au-form-wrap, .au-tile, .au-float, .au .mark::after { animation: none; }
}

/* Let fields shrink inside grids */
.au-panel, .au-field, .au-grid > *, .au-choices > * { min-width: 0; }
.au-input input, .au-input select { width: 100%; }
