/* FucharMonk auth pages: sign in, sign up, confirm email, reset password */
:root {
  --bg: #FAF7F1; --card: #FFFFFF; --line: #E6DECF; --line2: #F1ECE2;
  --ink: #142235; --text: #2B3A4C; --muted: #6B7685; --faint: #9AA3AF;
  --blue: #1B75BB; --orange: #F7941D; --orange2: #FBB03B;
  --red: #E42528; --green: #1FA35C; --gold: #F5B70A;
  --font: "Plus Jakarta Sans", -apple-system, "Segoe UI", Inter, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }

.auth-wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }
@media (max-width: 960px) { .auth-wrap { grid-template-columns: minmax(0, 1fr); } }

/* ---------- brand side ---------- */
.auth-side {
  position: sticky; top: 0; height: 100vh; overflow: hidden; color: #fff;
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  padding: 36px clamp(36px, 4.5vw, 72px) 40px;
  background:
    radial-gradient(ellipse 70% 55% at 0% 0%, rgba(247,148,29,.38), transparent 60%),
    radial-gradient(ellipse 70% 70% at 100% 100%, rgba(27,117,187,.55), transparent 60%),
    linear-gradient(150deg, #0E1F33 0%, #12304D 100%);
}
.auth-side::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 80% 70% at 40% 40%, #000 25%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 40% 40%, #000 25%, transparent 75%);
}
.auth-side > * { position: relative; }
.side-brand { display: flex; align-items: center; gap: 11px; }
.side-brand img { width: 40px; height: 40px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255,255,255,.18); }
.side-brand b { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.side-brand b em { font-style: normal; color: var(--orange2); }
.side-brand small { display: block; font-size: 11.5px; font-weight: 600; color: rgba(255,255,255,.55); }
.side-copy h2 { font-size: clamp(30px, 3.2vw, 44px); font-weight: 800; letter-spacing: -.035em; line-height: 1.08; max-width: 480px; }
.side-copy h2 .hl { background: linear-gradient(95deg, #FFC874, var(--orange)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.side-copy ul { list-style: none; margin-top: 26px; display: grid; gap: 13px; }
.side-copy li { display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 600; color: rgba(255,255,255,.86); }
.side-copy li i { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; flex: none; background: rgba(31,163,92,.22); color: #6FE0A2; font-style: normal; font-size: 13px; font-weight: 800; }
.preview { max-width: 430px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); border-radius: 18px; padding: 16px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.preview-h { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 700; }
.preview-h .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(228,37,40,.2); color: #FF8A8C; font-weight: 800; }
.preview-h small { display: block; font-size: 11.5px; font-weight: 600; color: rgba(255,255,255,.55); }
.p-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 9px; padding: 10px 12px; border-radius: 11px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); font-size: 14px; font-weight: 700; }
.p-row s { color: #FF8A8C; text-decoration-thickness: 2px; }
.p-row u { color: #6FE0A2; text-decoration: none; }
.p-row .to { color: rgba(255,255,255,.4); margin: 0 6px; }
.p-row .ts { font-size: 11px; font-weight: 800; color: #9CCBF0; background: rgba(27,117,187,.3); padding: 3px 8px; border-radius: 999px; }
.side-note { font-size: 13px; color: rgba(255,255,255,.55); line-height: 1.6; max-width: 420px; }
.side-note a { color: rgba(255,255,255,.85); font-weight: 700; }
.side-note a:hover { color: #fff; }
@media (max-height: 760px) { .preview { display: none; } }

/* ---------- form side ---------- */
.auth-main { display: flex; flex-direction: column; min-height: 100vh; padding: 26px clamp(20px, 5vw, 64px) 24px; position: relative; }
.auth-main::before { content: ""; position: absolute; width: 420px; height: 420px; right: -200px; top: -200px; border-radius: 50%; background: rgba(247,148,29,.10); filter: blur(80px); pointer-events: none; }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: relative; z-index: 1; }
.auth-top .m-brand { display: none; align-items: center; gap: 10px; }
.auth-top .m-brand img { width: 34px; height: 34px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); }
.auth-top .m-brand b { font-size: 16.5px; font-weight: 800; color: var(--blue); letter-spacing: -.02em; }
.auth-top .m-brand b em { font-style: normal; color: var(--orange); }
@media (max-width: 960px) { .auth-top .m-brand { display: flex; } }
.back { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; color: var(--muted); padding: 8px 12px; border-radius: 10px; margin-left: auto; transition: background .15s, color .15s; }
.back:hover { background: rgba(20,34,53,.05); color: var(--ink); }
.auth-center { flex: 1; display: grid; place-items: center; padding: 28px 0; position: relative; z-index: 1; }
.auth-foot { text-align: center; font-size: 13px; color: var(--faint); position: relative; z-index: 1; }
.auth-foot a { color: var(--muted); font-weight: 600; }
.auth-foot a:hover { color: var(--orange); }

.card { width: min(440px, 100%); animation: rise .5s cubic-bezier(.2,.7,.2,1); }
@media (max-width: 960px) { .card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 30px clamp(20px, 5vw, 32px); box-shadow: 0 2px 6px rgba(20,34,53,.04), 0 20px 50px rgba(20,34,53,.09); } }
@keyframes rise { from { transform: translateY(12px); } }
.card.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }

h1 { font-size: clamp(28px, 3vw, 34px); font-weight: 800; letter-spacing: -.035em; color: var(--ink); line-height: 1.12; }
.lead { font-size: 15.5px; color: var(--muted); margin: 10px 0 26px; line-height: 1.55; }
.perks { display: flex; flex-wrap: wrap; gap: 8px; margin: -12px 0 22px; }
.perks span { font-size: 12.5px; font-weight: 700; color: #157A43; background: #E9F7EF; border-radius: 999px; padding: 5px 11px; }
.sent { font-size: 14px; color: var(--muted); margin: -12px 0 20px; line-height: 1.5; }
.sent b { color: var(--ink); word-break: break-all; }

label { display: block; font-size: 13.5px; font-weight: 700; color: var(--ink); margin: 18px 0 8px; }
label .opt { font-weight: 500; color: var(--faint); }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 14px; }
@media (max-width: 480px) { .row2 { grid-template-columns: minmax(0, 1fr); } }
.field { position: relative; }
.field .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 15px; opacity: .5; pointer-events: none; }
input {
  width: 100%; height: 50px; padding: 0 14px 0 42px; font: 500 15px var(--font); color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 12px; outline: none;
  transition: border-color .15s, box-shadow .15s;
  box-shadow: 0 1px 2px rgba(20,34,53,.04);
}
input::placeholder { color: #B3BAC4; font-weight: 400; }
input:hover { border-color: #D6CBB6; }
input:focus { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(247,148,29,.15); }
.field input[type="password"], .field input#p { padding-right: 48px; }
.code-in { height: 62px; padding: 0 10px !important; text-align: center; font-size: 28px !important; font-weight: 800 !important; letter-spacing: 12px; }
.eye { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: none; background: none; cursor: pointer; font-size: 15px; color: var(--muted); border-radius: 9px; display: flex; align-items: center; justify-content: center; }
.eye:hover { background: #FFF6EA; }
.caps { display: none; margin-top: 8px; font-size: 12.5px; font-weight: 600; color: #9A6D00; }
.caps.on { display: block; }

.agree { display: flex; gap: 10px; align-items: flex-start; margin-top: 20px; font-size: 13.5px; font-weight: 500; color: var(--muted); line-height: 1.5; cursor: pointer; }
.agree input { width: 18px; height: 18px; padding: 0; margin-top: 1px; accent-color: var(--orange); flex: none; box-shadow: none; }
.agree a { color: var(--blue); font-weight: 700; }
.agree a:hover { text-decoration: underline; }

button.submit {
  width: 100%; height: 52px; margin-top: 26px; font: 700 15.5px var(--font); color: #fff; border: 0; border-radius: 13px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(135deg, #F99B2A 0%, #F7941D 45%, #EE7F0B 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 10px 24px rgba(238,127,11,.32);
  transition: transform .15s, box-shadow .2s;
}
button.submit:hover { transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 14px 30px rgba(238,127,11,.42); }
button.submit:active { transform: translateY(0); }
button.submit:disabled { opacity: .7; cursor: default; transform: none; }
.spinner { display: none; width: 17px; height: 17px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .7s linear infinite; }
button.submit.busy .spinner { display: block; }
@keyframes spin { to { transform: rotate(1turn); } }

.error { margin-top: 14px; font-size: 14px; font-weight: 600; color: var(--red); text-align: center; min-height: 20px; }
.ok-msg { margin-top: 6px; font-size: 14px; font-weight: 600; color: var(--green); text-align: center; min-height: 20px; }
.switch { margin-top: 18px; text-align: center; font-size: 14.5px; color: var(--muted); }
.switch a, .linkbtn { color: var(--orange); font-weight: 700; }
.switch a:hover, .linkbtn:hover:not(:disabled) { text-decoration: underline; }
.linkbtn { background: none; border: none; font: inherit; cursor: pointer; padding: 0; color: var(--orange); font-weight: 700; }
.linkbtn:disabled { color: var(--faint); cursor: default; }
.divider { display: flex; align-items: center; gap: 12px; margin: 24px 0 0; font-size: 12.5px; font-weight: 600; color: var(--faint); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.step { display: none; } .step.on { display: block; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* placed last so it wins over the .auth-side rules above */
@media (max-width: 960px) { .auth-side { display: none; } }
