
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink:      #05090F;
  --ink2:     #0B1220;
  --ink3:     #111D30;
  --panel:    #0D1624;
  --orange:   #F97316;
  --orange2:  #FB923C;
  --orange-g: rgba(249,115,22,0.15);
  --orange-b: rgba(249,115,22,0.3);
  --blue:     #3B82F6;
  --blue-g:   rgba(59,130,246,0.12);
  --border:   rgba(255,255,255,0.07);
  --border2:  rgba(255,255,255,0.12);
  --muted:    #6B7A96;
  --soft:     #A8B4CC;
  --white:    #F8FAFC;
  --text:     #CBD5E1;
  --error:    #F87171;
  --success:  #34D399;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--ink);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ───── LAYOUT ───── */
.auth-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* ───── LEFT PANEL ───── */
.panel-left {
  background: var(--panel);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px;
  overflow: hidden;
}

/* Mesh background */
.panel-left::before {
  content: '';
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 70% 60% at 20% 20%, rgba(249,115,22,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 80%, rgba(59,130,246,0.1) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 50% 50%, rgba(249,115,22,0.04) 0%, transparent 70%);
}

/* Grid lines */
.panel-left::after {
  content: '';
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
}

.panel-left > * { position: relative; z-index: 1; }

/* Logo */
.logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.logo-mark {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--orange), #FB923C);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem; font-weight: 800;
  color: #000;
  box-shadow: 0 4px 20px rgba(249,115,22,0.4);
}
.logo-text {
  font-family: 'Syne', sans-serif;
  font-size: 1.5rem; font-weight: 800;
  color: var(--white);
  letter-spacing: -0.03em;
}

/* Center content */
.panel-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 0;
}

.panel-headline {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.04em;
  color: var(--white);
  margin-bottom: 16px;
}
.panel-headline em {
  font-style: normal;
  background: linear-gradient(135deg, var(--orange), #FCD34D);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.panel-desc {
  font-size: .95rem;
  line-height: 1.75;
  color: var(--muted);
  max-width: 340px;
  margin-bottom: 40px;
}

/* Feature badges */
.feature-pills {
  display: flex; flex-direction: column; gap: 12px;
}
.feature-pill {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: .85rem; color: var(--soft);
  animation: slideRight .6s ease both;
}
.feature-pill:nth-child(2) { animation-delay: .1s; }
.feature-pill:nth-child(3) { animation-delay: .2s; }

.fp-icon {
  width: 32px; height: 32px; flex-shrink: 0;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem;
}
.fp-icon.orange { background: rgba(249,115,22,0.15); }
.fp-icon.blue   { background: rgba(59,130,246,0.12); }
.fp-icon.green  { background: rgba(52,211,153,0.12); }

/* SVG Illustration */
.illus-wrap {
  margin: 32px 0;
  display: flex; justify-content: center;
}

/* Panel footer */
.panel-footer-text {
  font-size: .78rem;
  color: var(--muted);
  text-align: center;
}
.panel-footer-text a {
  color: var(--orange);
  text-decoration: none;
}

/* ───── RIGHT PANEL ───── */
.panel-right {
  background: var(--ink2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 5%;
  position: relative;
}

.panel-right::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 60% at 50% 0%, rgba(249,115,22,0.05) 0%, transparent 70%);
  pointer-events: none;
}

/* Card */
.auth-card {
  width: 100%;
  max-width: 440px;
  position: relative; z-index: 1;
  animation: fadeUp .6s ease both;
}

.card-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(249,115,22,0.1);
  border: 1px solid rgba(249,115,22,0.25);
  border-radius: 50px;
  padding: 5px 12px;
  font-size: .72rem; font-weight: 600;
  color: var(--orange);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.card-eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--orange);
  border-radius: 50%;
  animation: blink 2s infinite;
}
@keyframes blink {
  0%,100% { opacity: 1; }
  50% { opacity: .3; }
}

.card-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 8px;
}

.card-sub {
  font-size: .9rem;
  color: var(--muted);
  margin-bottom: 36px;
  line-height: 1.6;
}

/* ───── FORM ───── */
.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-label {
  display: block;
  font-size: .8rem; font-weight: 600;
  color: var(--soft);
  margin-bottom: 8px;
  letter-spacing: .02em;
}
.form-label span { color: var(--orange); }

.input-wrap {
  position: relative;
}

.input-icon {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 1rem;
  pointer-events: none;
  transition: color .2s;
  display: flex; align-items: center;
}

.form-input {
  width: 100%;
  background: var(--ink3);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 14px 14px 14px 44px;
  font-family: 'DM Sans', sans-serif;
  font-size: .95rem;
  color: var(--white);
  outline: none;
  transition: border-color .25s, background .25s, box-shadow .25s;
  -webkit-appearance: none;
}
.form-input::placeholder { color: var(--muted); font-size: .88rem; }

.form-input:focus {
  border-color: var(--orange);
  background: rgba(249,115,22,0.04);
  box-shadow: 0 0 0 3px rgba(249,115,22,0.1);
}
.form-input:focus ~ .input-icon,
.input-wrap:focus-within .input-icon { color: var(--orange); }

.form-input.has-right { padding-right: 48px; }

.input-right-btn {
  position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: .85rem;
  padding: 4px;
  transition: color .2s;
  display: flex; align-items: center;
  line-height: 1;
}
.input-right-btn:hover { color: var(--orange); }

/* Error state */
.form-input.error {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(248,113,113,0.1);
}
.form-error {
  font-size: .75rem; color: var(--error);
  margin-top: 6px;
  display: none; align-items: center; gap: 4px;
}
.form-error.show { display: flex; }
.form-error::before { content: '⚠'; font-size: .7rem; }

/* Row helpers */
.form-row {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

/* Checkbox */
.check-wrap {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer;
}
.check-input { display: none; }
.check-box {
  width: 18px; height: 18px;
  border: 1.5px solid var(--border2);
  border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all .2s;
  background: var(--ink3);
}
.check-input:checked + .check-box {
  background: var(--orange);
  border-color: var(--orange);
}
.check-box::after {
  content: '';
  width: 9px; height: 6px;
  border-bottom: 2px solid #000;
  border-left: 2px solid #000;
  transform: rotate(-45deg) translate(0px, -1px);
  opacity: 0;
  transition: opacity .2s;
}
.check-input:checked + .check-box::after { opacity: 1; }
.check-label {
  font-size: .83rem; color: var(--soft);
  user-select: none;
}

.forgot-link {
  font-size: .83rem; color: var(--orange);
  text-decoration: none;
  font-weight: 500;
  transition: opacity .2s;
}
.forgot-link:hover { opacity: .7; }

/* Submit button */
.btn-submit {
  width: 100%;
  background: linear-gradient(135deg, var(--orange), #FB923C);
  color: #000;
  font-family: 'Syne', sans-serif;
  font-size: 1rem; font-weight: 700;
  border: none; border-radius: 12px;
  padding: 15px;
  cursor: pointer;
  transition: all .25s;
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  letter-spacing: .01em;
}
.btn-submit::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #FB923C, var(--orange));
  opacity: 0; transition: opacity .25s;
}
.btn-submit:hover::before { opacity: 1; }
.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(249,115,22,0.45);
}
.btn-submit:active { transform: translateY(0); }
.btn-submit > * { position: relative; z-index: 1; }

/* Loading spinner */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(0,0,0,0.2);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: none;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn-submit.loading .btn-text { display: none; }
.btn-submit.loading .spinner { display: block; }

/* Divider */
.divider {
  display: flex; align-items: center; gap: 12px;
  margin: 24px 0;
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px;
  background: var(--border);
}
.divider span {
  font-size: .75rem; color: var(--muted);
  white-space: nowrap; letter-spacing: .06em;
}

/* Secure badge */
.secure-badge {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 20px;
  font-size: .75rem; color: var(--muted);
}
.secure-badge::before { content: '🔒'; font-size: .8rem; }

/* Register link */
.reg-link-row {
  text-align: center;
  margin-top: 24px;
  font-size: .88rem; color: var(--muted);
}
.reg-link-row a {
  color: var(--orange); text-decoration: none;
  font-weight: 600;
  transition: opacity .2s;
}
.reg-link-row a:hover { opacity: .75; }

/* ───── ANIMATIONS ───── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideRight {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ───── MOBILE NAV (shown on mobile only) ───── */
.mobile-logo-bar {
  display: none;
  align-items: center; justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--ink2);
  position: sticky; top: 0; z-index: 50;
}

/* ───── RESPONSIVE ───── */
@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .panel-left { display: none; }
  .mobile-logo-bar { display: flex; }
  .panel-right { padding: 40px 24px 60px; align-items: flex-start; }
  .auth-card { max-width: 100%; }
}

/* Input autofill override */
input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--ink3) inset;
  -webkit-text-fill-color: var(--white);
  caret-color: var(--white);
}