/* ═══════════════════════════════════════════════════
   SmartLib — Login CSS
   Place at: /css/login.css
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

/* ── Reset ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-size: 16px; }

body {
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
  display: flex;
  background: #f5f5f0;
  overflow: hidden;
}

/* ── Split layout ──────────────────────────────── */
.split { display: flex; width: 100%; min-height: 100vh; }

/* ═══════════════════════════════════════════════════
   LEFT PANEL
   ═══════════════════════════════════════════════════ */
.panel-left {
  flex: 0 0 38%;
  position: relative;
  overflow: hidden;
  background: #060606;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2.5rem;
  transition: filter 0.4s ease;
}

/* Animated conic gradient */
.panel-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background: conic-gradient(
    from 0deg at 35% 45%,
    #000 0deg, #1c1c1c 55deg,
    #3a3a3a 90deg, #555 120deg,
    #222 185deg, #0d0d0d 240deg, #000 360deg
  );
  animation: conicSpin 14s linear infinite;
  transform-origin: 35% 45%;
}
@keyframes conicSpin {
  0%   { filter: brightness(1)   contrast(1.3); }
  25%  { filter: brightness(1.5) contrast(0.85); }
  50%  { filter: brightness(0.65) contrast(1.6); }
  75%  { filter: brightness(1.25) contrast(1.05); }
  100% { filter: brightness(1)   contrast(1.3); }
}

/* Light blobs */
.blob {
  position: absolute; border-radius: 50%;
  mix-blend-mode: screen; pointer-events: none;
  animation: blobDrift ease-in-out infinite alternate;
}
.blob-1 { width:450px; height:450px; top:-100px; left:-130px; background:radial-gradient(circle,rgba(255,255,255,.16) 0%,transparent 65%); animation-duration:6s; }
.blob-2 { width:320px; height:320px; top:38%; left:18%;   background:radial-gradient(circle,rgba(255,255,255,.11) 0%,transparent 65%); animation-duration:8s; animation-delay:-3.5s; }
.blob-3 { width:280px; height:280px; bottom:-70px; right:-50px; background:radial-gradient(circle,rgba(200,200,200,.13) 0%,transparent 65%); animation-duration:7s; animation-delay:-1.8s; }
@keyframes blobDrift {
  0%   { transform: scale(1)   translate(0,0); }
  100% { transform: scale(1.35) translate(22px,18px); }
}

/* Scanlines */
.panel-left::after {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(to bottom, transparent, transparent 3px, rgba(0,0,0,.07) 3px, rgba(0,0,0,.07) 4px);
  pointer-events: none;
}

/* Grain */
.grain {
  position: absolute; inset: 0; z-index: 1;
  opacity: .05; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px;
}

/* Arrow button */
.arrow-btn {
  position: absolute; top: 2rem; right: 2rem;
  width: 52px; height: 52px; border-radius: 50%;
  background: #c8ff00; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 10; box-shadow: 0 4px 20px rgba(200,255,0,.35);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1), box-shadow .3s;
  text-decoration: none;
}
.arrow-btn:hover { transform: scale(1.12) rotate(8deg); box-shadow: 0 6px 28px rgba(200,255,0,.55); }
.arrow-btn svg { width:22px; height:22px; stroke:#000; fill:none; stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round; }

/* Left text */
.left-content { position: relative; z-index: 5; }

.panel-badge {
  display: inline-flex; align-items: center; gap: .45rem;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14);
  border-radius: 20px; padding: .35rem .8rem;
  font-size: .67rem; font-weight: 500; color: rgba(255,255,255,.52);
  letter-spacing: .1em; text-transform: uppercase;
  margin-bottom: 1.1rem; backdrop-filter: blur(8px);
}
.badge-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #c8ff00;
  animation: dotPulse 2s ease-in-out infinite; flex-shrink: 0;
}
@keyframes dotPulse { 0%,100%{opacity:1;transform:scale(1);} 50%{opacity:.4;transform:scale(.6);} }

.big-text {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.1rem, 4.5vw, 3.3rem);
  font-weight: 800; line-height: 1.05;
  letter-spacing: -.02em; color: #fff;
  text-transform: uppercase; margin-bottom: .8rem;
}
.big-text .w1 { display: block; animation: colorCycle 5s ease-in-out infinite; }
.big-text .w2 { display: block; animation: colorCycle 5s ease-in-out infinite; animation-delay: -2.5s; }
@keyframes colorCycle {
  0%{color:#fff;} 20%{color:#aaa;} 40%{color:#555;} 60%{color:#ccc;} 80%{color:#888;} 100%{color:#fff;}
}

.cursor-blink {
  display: inline-block; width: 3px; height: .95em;
  background: #c8ff00; margin-left: 4px; vertical-align: middle;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%,100%{opacity:1;} 50%{opacity:0;} }

.left-sub { font-size: .8rem; font-weight: 300; color: rgba(255,255,255,.42); line-height: 1.7; max-width: 220px; margin-bottom: 1rem; }
.left-link { font-size: .74rem; font-weight: 500; color: rgba(255,255,255,.35); text-decoration: underline; text-underline-offset: 3px; background: none; border: none; cursor: pointer; font-family: 'DM Sans', sans-serif; padding: 0; transition: color .2s; }
.left-link:hover { color: #c8ff00; }

/* ═══════════════════════════════════════════════════
   RIGHT PANEL
   ═══════════════════════════════════════════════════ */
.panel-right {
  flex: 1; background: #fff;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 2.5rem 2rem; position: relative;
  overflow-y: auto;
}

.close-btn {
  position: absolute; top: 1.2rem; right: 1.4rem;
  width: 32px; height: 32px; border-radius: 50%;
  background: transparent; border: 1.5px solid rgba(0,0,0,.15);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: #666; font-size: .95rem; transition: all .2s;
  font-family: 'DM Sans', sans-serif; text-decoration: none;
}
.close-btn:hover { background: #f0f0f0; border-color: rgba(0,0,0,.25); color: #000; }

.form-box { width: 100%; max-width: 360px; }

/* Brand */
.brand { display: flex; align-items: center; gap: .45rem; justify-content: center; margin-bottom: 1.75rem; text-decoration: none; }
.brand-icon { width: 28px; height: 28px; background: #000; border-radius: 6px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.brand-icon svg { width: 15px; height: 15px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.brand-name { font-family: 'Syne', sans-serif; font-size: 1.18rem; font-weight: 700; color: #000; letter-spacing: .04em; }

/* Heading */
.form-heading { font-family: 'Syne', sans-serif; font-size: 1.7rem; font-weight: 700; color: #0a0a0a; text-align: center; margin-bottom: .3rem; letter-spacing: -.02em; }
.form-subtext { font-size: .82rem; color: #888; text-align: center; margin-bottom: 1.6rem; }
.form-subtext a { color: #000; font-weight: 500; text-decoration: underline; text-underline-offset: 2px; transition: color .2s; }
.form-subtext a:hover { color: #444; }

/* ── Server-side error flash ──────────────────── */
.flash-error {
  display: flex; align-items: center; gap: .5rem;
  background: #fff5f5; border: 1.5px solid rgba(220,60,60,.25);
  border-radius: 10px; padding: .65rem .9rem;
  font-size: .8rem; color: #c33; margin-bottom: 1rem;
  animation: flashIn .3s ease;
}
.flash-error svg { width:14px; height:14px; stroke:currentColor; fill:none; stroke-width:2; stroke-linecap:round; flex-shrink:0; }
@keyframes flashIn { from{opacity:0;transform:translateY(-6px);} to{opacity:1;transform:translateY(0);} }

/* ── Form groups ────────────────────────────── */
.form-group { margin-bottom: .88rem; }

.form-label { display: block; font-size: .69rem; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; color: #888; margin-bottom: .38rem; }

.input-wrap { position: relative; display: flex; align-items: center; }

.input-icon { position: absolute; left: .9rem; pointer-events: none; color: #c0c0c0; transition: color .2s; }
.input-icon svg { width:16px; height:16px; stroke:currentColor; fill:none; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; display:block; }

.form-input {
  width: 100%;
  padding: .76rem 2.75rem .76rem 2.55rem;
  font-family: 'DM Sans', sans-serif;
  font-size: .9rem; color: #0a0a0a;
  background: #f8f8f6; border: 1.5px solid #e8e8e4;
  border-radius: 10px; outline: none;
  transition: all .22s ease;
  -webkit-appearance: none; appearance: none;
}
.form-input::placeholder { color: #bbb; font-style: italic; font-size: .85rem; }
.form-input:focus { background: #fff; border-color: #000; box-shadow: 0 0 0 3px rgba(0,0,0,.06); }
.input-wrap:focus-within .input-icon { color: #555; }

/* Valid state */
.input-wrap.is-valid .form-input { border-color: #22c55e; background: #f0fff4; }
.input-wrap.is-valid .input-icon { color: #22c55e; }

/* Error state */
.input-wrap.has-error .form-input { border-color: #ef4444; background: #fff8f8; box-shadow: 0 0 0 3px rgba(239,68,68,.08); }
.input-wrap.has-error .input-icon { color: #ef4444; }

/* Inline validation icons inside input (right side) */
.input-status {
  position: absolute; right: 2.6rem;
  display: none; pointer-events: none;
}
.input-status svg { width:15px; height:15px; stroke:currentColor; fill:none; stroke-width:2; stroke-linecap:round; }
.input-wrap.is-valid  .input-status.ok  { display:flex; color:#22c55e; }
.input-wrap.has-error .input-status.err { display:flex; color:#ef4444; }

/* Field error text */
.field-error {
  display: flex; align-items: center; gap: .35rem;
  font-size: .72rem; color: #ef4444;
  margin-top: .32rem; font-weight: 500;
}
.field-error svg { width:12px; height:12px; stroke:currentColor; fill:none; stroke-width:2; stroke-linecap:round; flex-shrink:0; }

/* Password toggle */
.toggle-password { position: absolute; right: .85rem; background: none; border: none; cursor: pointer; color: #bbb; display: flex; align-items: center; padding: 0; transition: color .2s; }
.toggle-password:hover { color: #000; }
.toggle-password svg { width:16px; height:16px; stroke:currentColor; fill:none; stroke-width:1.8; stroke-linecap:round; }

/* Password strength bar */
.pw-strength { margin-top: .4rem; }
.pw-strength-bar { height: 3px; border-radius: 3px; background: #eee; overflow: hidden; }
.pw-strength-fill { height: 100%; border-radius: 3px; width: 0%; transition: width .3s ease, background .3s ease; }
.pw-strength-label { font-size: .68rem; color: #aaa; margin-top: .22rem; transition: color .2s; }

/* ── Options row ────────────────────────────── */
.options-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; margin: .35rem 0 1.1rem; }

.remember-wrap { display: flex; align-items: center; gap: .42rem; cursor: pointer; }
.remember-checkbox { -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border: 1.5px solid #ccc; border-radius: 4px; background: #fff; cursor: pointer; position: relative; transition: all .18s; flex-shrink: 0; }
.remember-checkbox:checked { background: #000; border-color: #000; }
.remember-checkbox:checked::after { content:''; position:absolute; top:1px; left:4px; width:5px; height:8px; border:1.5px solid #fff; border-top:none; border-left:none; transform:rotate(42deg); }
.remember-label { font-size: .77rem; color: #555; cursor: pointer; user-select: none; }

.forgot-link { font-size: .77rem; color: #555; text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgba(0,0,0,.2); background: none; border: none; cursor: pointer; font-family: 'DM Sans', sans-serif; transition: color .2s; }
.forgot-link:hover { color: #000; }

/* ── reCAPTCHA ────────────────────────────── */
.captcha-wrap { display: flex; justify-content: center; margin-bottom: 1rem; transform: scale(.92); transform-origin: center left; }
.captcha-error { font-size: .72rem; color: #ef4444; margin-top: -.6rem; margin-bottom: .6rem; display: none; align-items: center; gap: .3rem; }
.captcha-error.show { display: flex; }
.captcha-error svg { width:12px; height:12px; stroke:currentColor; fill:none; stroke-width:2; stroke-linecap:round; flex-shrink:0; }

/* ── Submit button ──────────────────────────── */
.btn-submit {
  width: 100%; padding: .88rem;
  font-family: 'Syne', sans-serif; font-size: .92rem; font-weight: 700;
  letter-spacing: .06em; color: #000; background: #c8ff00;
  border: none; border-radius: 10px; cursor: pointer;
  position: relative; overflow: hidden;
  box-shadow: 0 3px 16px rgba(200,255,0,.3);
  transition: all .25s ease; margin-bottom: 1.2rem;
}
.btn-submit::after { content:''; position:absolute; inset:0; background:linear-gradient(to right,transparent,rgba(255,255,255,.28),transparent); transform:translateX(-100%) skewX(-15deg); transition:transform .5s ease; }
.btn-submit:hover { background: #d4ff1a; box-shadow: 0 5px 22px rgba(200,255,0,.5); transform: translateY(-1px); }
.btn-submit:hover::after { transform: translateX(130%) skewX(-15deg); }
.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; background: #c8ff00; }
.btn-submit span { position: relative; z-index: 1; }

/* ── Divider ────────────────────────────────── */
.divider { display: flex; align-items: center; gap: .7rem; margin-bottom: 1rem; }
.divider-line { flex: 1; height: 1px; background: #ebebeb; }
.divider-rune { font-size: .68rem; color: #bbb; letter-spacing: .1em; font-family: 'DM Sans', sans-serif; white-space: nowrap; }

/* ── Social buttons ─────────────────────────── */
.socials { display: flex; gap: .6rem; margin-bottom: 1.5rem; }

.soc-btn {
  flex: 1; padding: .65rem .4rem;
  border: 1.5px solid #e8e8e4; border-radius: 10px;
  background: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: .4rem;
  font-family: 'DM Sans', sans-serif; font-size: .78rem; font-weight: 500; color: #333;
  transition: all .22s ease; text-decoration: none;
}
.soc-btn:hover { border-color: #000; background: #fafafa; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.soc-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ── Register row ───────────────────────────── */
.register-row { text-align: center; font-size: .82rem; color: #888; }
.register-row a { color: #000; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; transition: color .2s; }
.register-row a:hover { color: #444; }

/* ── Entrance fade-in ───────────────────────── */
.fade-in { opacity: 0; transform: translateY(12px); transition: opacity .45s ease, transform .45s ease; }
.fade-in.show { opacity: 1; transform: translateY(0); }

/* ── Quote strip ────────────────────────────── */
.quote-strip { position: fixed; bottom: 0; right: 0; left: 38%; z-index: 5; text-align: center; padding: .55rem 2rem; pointer-events: none; }
.quote-strip p { font-size: .68rem; font-style: italic; color: rgba(0,0,0,.22); letter-spacing: .02em; }

/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */
@media (max-width: 768px) {
  body { overflow: auto; }
  .split { flex-direction: column; }
  .panel-left { flex: none; height: 195px; padding: 1.5rem; justify-content: flex-end; }
  .big-text { font-size: 1.95rem; }
  .left-sub { display: none; }
  .arrow-btn { top: 1.2rem; right: 1.2rem; width: 44px; height: 44px; }
  .panel-right { flex: 1; padding: 2rem 1.5rem; justify-content: flex-start; }
  .close-btn { display: none; }
  .quote-strip { left: 0; }
  .captcha-wrap { transform: scale(.85); transform-origin: center; }
}
@media (max-width: 480px) {
  .panel-left { height: 165px; padding: 1.2rem; }
  .big-text { font-size: 1.6rem; }
  .panel-right { padding: 1.5rem 1.1rem; }
  .form-box { max-width: 100%; }
  .socials { gap: .45rem; }
  .soc-btn { font-size: .72rem; padding: .6rem .3rem; }
  .captcha-wrap { transform: scale(.78); transform-origin: left center; }
}
@media (min-width: 1200px) {
  .panel-left { flex: 0 0 42%; }
  .form-box { max-width: 380px; }
  .quote-strip { left: 42%; }
}
