/* =============================================================
   GoldStockEX — Authentication pages (login / register)
   White + red theme, self-contained. No gradients.
   ============================================================= */
:root {
  --bg:        #ffffff;
  --surface:   #ffffff;
  --line:      #e5e8ed;
  --line-soft: #eef1f5;
  --text:      #0e1422;
  --text-soft: #515c6b;
  --text-mute: #8a93a1;
  --red:       #e01429;
  --red-deep:  #b91020;
  --ink:       #0a0f1a;
  --radius:    12px;
  --radius-sm: 9px;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* , *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-deep); }
img { display: block; max-width: 100%; }

.auth { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 100dvh; }

/* ── Left: brand / media panel ── */
.auth__media {
  position: relative;
  background: var(--ink);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px 48px;
  color: #fff;
}
.auth__media img.bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 1; z-index: 0;
}
.auth__media::after {
  content: ""; position: absolute; inset: 0; background: var(--ink); opacity: .72; z-index: 1;
}
.auth__media > * { position: relative; z-index: 2; }
.auth__brand img { height: 34px; width: auto; }
.auth__pitch { max-width: 440px; }
.auth__pitch h2 {
  font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.5rem);
  line-height: 1.12; letter-spacing: -.03em; font-weight: 800; margin: 0 0 16px;
}
.auth__pitch h2 em { color: var(--red); font-style: normal; }
.auth__pitch p { color: rgba(255,255,255,.72); font-size: 15px; line-height: 1.6; margin: 0; }
.auth__list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 13px; }
.auth__list li { display: flex; align-items: center; gap: 11px; font-size: 14px; color: rgba(255,255,255,.85); }
.auth__list i { color: var(--red); font-size: 15px; width: 18px; text-align: center; }
.auth__legal { font-size: 12px; color: rgba(255,255,255,.45); }

/* ── Right: form panel ── */
.auth__panel { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth__card { width: 100%; max-width: 384px; }
.auth__head { margin-bottom: 26px; }
.auth__logo-sm { display: none; margin-bottom: 22px; }
.auth__logo-sm img { height: 34px; }
.auth__head h1 { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; margin: 0 0 6px; }
.auth__head p { color: var(--text-mute); font-size: 14px; margin: 0; }

.field { margin-bottom: 14px; }
.field label {
  display: block; font-size: 12px; font-weight: 600; color: var(--text-soft);
  margin-bottom: 7px; letter-spacing: .01em;
}
.input {
  position: relative; display: flex; align-items: center;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus-within { border-color: var(--red); box-shadow: 0 0 0 3px rgba(224,20,42,.10); }
.input i.lead { color: var(--text-mute); font-size: 14px; width: 42px; text-align: center; flex-shrink: 0; }
.input input {
  flex: 1; border: 0; outline: 0; background: transparent;
  padding: 13px 14px 13px 0; font-family: var(--sans); font-size: 14.5px; color: var(--text);
  min-width: 0;
}
.input input::placeholder { color: #aab2bf; }
.input .toggle {
  background: none; border: 0; color: var(--text-mute); cursor: pointer;
  padding: 0 14px; font-size: 14px; height: 100%;
}
.input .toggle:hover { color: var(--text); }

.row-between { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 20px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-soft); cursor: pointer; user-select: none; }
.check input { accent-color: var(--red); width: 15px; height: 15px; }
.row-between a { font-size: 13px; font-weight: 600; }

.btn-auth {
  width: 100%; border: 0; border-radius: var(--radius-sm);
  background: var(--red); color: #fff; font-family: var(--sans);
  font-size: 15px; font-weight: 700; padding: 14px; cursor: pointer;
  transition: background .15s, transform .15s; letter-spacing: .01em;
}
.btn-auth:hover { background: var(--red-deep); transform: translateY(-1px); }
.btn-auth:disabled { opacity: .65; cursor: default; transform: none; }

.auth__alt { text-align: center; font-size: 13.5px; color: var(--text-mute); margin-top: 22px; }
.auth__alt a { font-weight: 700; }

.fineprint { font-size: 11.5px; color: var(--text-mute); line-height: 1.55; margin-top: 16px; }
.fineprint a { font-weight: 600; }

.divider { display: flex; align-items: center; gap: 12px; margin: 4px 0 18px; color: var(--text-mute); font-size: 12px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ── Page loader ── */
.loader { position: fixed; inset: 0; background: #fff; display: flex; align-items: center; justify-content: center; gap: 7px; z-index: 50; transition: opacity .3s; }
.loader.hide { opacity: 0; pointer-events: none; }
.loader span { width: 9px; height: 9px; border-radius: 50%; background: var(--red); animation: ld 1s infinite ease-in-out; }
.loader span:nth-child(2) { animation-delay: .15s; }
.loader span:nth-child(3) { animation-delay: .3s; }
@keyframes ld { 0%,100% { opacity: .3; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }

/* ── Responsive ── */
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth__media { display: none; }
  .auth__logo-sm { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
