/*
 * veyra-auth.css — v2.0
 * Premium SaaS Lab · Login page design system
 * Prefix: va-
 */

/* ── Variables ─────────────────────────────────────────────────────────── */
:root {
  --va-primary:       #9ace25;
  --va-primary-light: #b0e03d;
  --va-primary-dark:  #7dad1a;
  --va-primary-50:    #f4fbe8;
  --va-primary-100:   #e6f5c7;
  --va-accent:        #9ace25;
  --va-emerald:       #9ace25;
  --va-danger:        #ef4444;
  --va-text:          #0f172a;
  --va-muted:         #64748b;
  --va-dimmed:        #94a3b8;
  --va-border:        #e2e8f0;
  --va-bg:            #f8fafc;
  --va-white:         #ffffff;

  /* sidebar palette */
  --va-sb-from:       #1a2e06;
  --va-sb-mid:        #2a4510;
  --va-sb-to:         #355418;
  --va-sb-accent:     #9ace25;
  --va-sb-cyan:       #b8e35e;
  --va-sb-emerald:    #9ace25;

  --va-radius:        0.75rem;
  --va-radius-lg:     1.25rem;
  --va-shadow:        0 2px 4px rgba(0,0,0,.04), 0 8px 32px rgba(0,0,0,.08);
  --va-shadow-lg:     0 4px 8px rgba(0,0,0,.06), 0 16px 48px rgba(0,0,0,.12);
  --va-font:          'Plus Jakarta Sans', 'Segoe UI', sans-serif;
  --va-mono:          'DM Mono', 'Fira Code', monospace;
  --va-transition:    all .2s ease;
}

/* ── Page body ─────────────────────────────────────────────────────────── */
.va-auth-body {
  background: linear-gradient(160deg, #f4fbe8 0%, #f7fdf0 45%, #fafff5 100%);
  font-family: var(--va-font);
  min-height: 100vh;
}

/* ── Wrap ──────────────────────────────────────────────────────────────── */
.va-wrap {
  font-family: var(--va-font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 1.5rem 1rem;
}

/* dot grid overlay */
.va-wrap::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(154,206,37,.07) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

/* soft orbs */
.va-wrap::after {
  content: '';
  position: fixed;
  top: -120px;
  right: -80px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(154,206,37,.07) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

/* ── Main Card ─────────────────────────────────────────────────────────── */
.va-card {
  position: relative;
  z-index: 1;
  display: flex;
  border-radius: var(--va-radius-lg);
  overflow: hidden;
  box-shadow: var(--va-shadow-lg);
  background: var(--va-white);
  max-width: 980px;
  width: 100%;
  min-height: 600px;
}

/* ── Sidebar ───────────────────────────────────────────────────────────── */
.va-sidebar {
  position: relative;
  width: 44%;
  background: linear-gradient(155deg, var(--va-sb-from) 0%, var(--va-sb-mid) 50%, var(--va-sb-to) 100%);
  display: flex;
  flex-direction: column;
  padding: 2.5rem 2rem;
  overflow: hidden;
  color: #fff;
}

/* subtle inner glow blobs */
  .va-sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 85%, rgba(154,206,37,.18) 0%, transparent 55%),
    radial-gradient(ellipse at 82% 15%, rgba(154,206,37,.12) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* fine dot texture */
.va-sidebar::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
  z-index: 0;
}

.va-sidebar-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* ── Sidebar Brand ──────────────────────────────────────────────────────── */
.va-sidebar-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 2rem;
}

.va-sidebar-logo {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(8px);
  border-radius: .75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.15);
  flex-shrink: 0;
}

.va-sidebar-logo i {
  font-size: 1.25rem;
  color: var(--va-sb-cyan);
}

.va-sidebar-wordmark {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -.03em;
  color: #fff;
  line-height: 1;
}

.va-sidebar-tagline {
  font-size: .65rem;
  font-weight: 500;
  color: rgba(255,255,255,.45);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ── Sidebar Illustration ───────────────────────────────────────────────── */
.va-lab-art-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .5rem 0;
}

.va-lab-art {
  width: 220px;
  height: 220px;
  filter: drop-shadow(0 0 18px rgba(154,206,37,.35));
}

/* atom animations */
.va-atom {
  transform-box: fill-box;
  transform-origin: center;
  animation: va-atom-pulse 2s ease-in-out infinite;
}
.va-atom-center {
  transform-box: fill-box;
  transform-origin: center;
  animation: va-atom-pulse 2.5s ease-in-out infinite;
}
.va-a1 { animation-delay: 0s;    animation-duration: 2.2s; }
.va-a2 { animation-delay: .35s;  animation-duration: 1.9s; }
.va-a3 { animation-delay: .7s;   animation-duration: 2.4s; }
.va-a4 { animation-delay: 1.05s; animation-duration: 2.1s; }
.va-a5 { animation-delay: .5s;   animation-duration: 2.3s; }
.va-a6 { animation-delay: .9s;   animation-duration: 1.8s; }

.va-float {
  transform-box: fill-box;
  transform-origin: center;
  animation: va-float 3s ease-in-out infinite;
}
.va-f1 { animation-duration: 3.2s; animation-delay: 0s; }
.va-f2 { animation-duration: 2.7s; animation-delay: .6s; }
.va-f3 { animation-duration: 3.6s; animation-delay: 1.1s; }
.va-f4 { animation-duration: 2.9s; animation-delay: .4s; }

@keyframes va-atom-pulse {
  0%, 100% { opacity: .55; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.22); }
}
@keyframes va-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-7px); }
}

/* ── Sidebar Features ───────────────────────────────────────────────────── */
.va-sidebar-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.va-sidebar-features li {
  display: flex;
  align-items: flex-start;
  gap: .625rem;
  padding: .4rem 0;
  font-size: .78rem;
  color: rgba(255,255,255,.8);
  line-height: 1.5;
}

.va-feat-dot {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: .05rem;
}

.va-feat-dot i { font-size: .875rem; }

.va-feat-dot-indigo { background: rgba(154,206,37,.25); color: var(--va-sb-accent); }
.va-feat-dot-cyan   { background: rgba(6,182,212,.2);   color: var(--va-sb-cyan); }
.va-feat-dot-emerald{ background: rgba(16,185,129,.2);  color: var(--va-sb-emerald); }
.va-feat-dot-green  { background: rgba(74,222,128,.2);  color: var(--va-sb-accent); }

/* ── Sidebar Badges ─────────────────────────────────────────────────────── */
.va-sidebar-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .375rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.08);
}

.va-sb-badge {
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: rgba(255,255,255,.5);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px;
  padding: 3px 9px;
}

/* ── Form Panel ─────────────────────────────────────────────────────────── */
.va-form-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 3rem 2.5rem;
  background: var(--va-white);
  position: relative;
  overflow: hidden;
}

/* subtle dot grid on form side */
.va-form-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(154,206,37,.04) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

/* ── Background molecular art ───────────────────────────────────────────── */
.va-form-bg-art {
  position: absolute;
  bottom: -80px;
  right: -80px;
  width: 420px;
  height: 420px;
  opacity: .13;
  pointer-events: none;
  z-index: 0;
}

.va-form-bg-art-2 {
  position: absolute;
  top: -50px;
  left: -50px;
  width: 220px;
  height: 220px;
  opacity: .08;
  pointer-events: none;
  z-index: 0;
  transform: rotate(25deg);
}

/* mobile brand (hidden on desktop) */
.va-mobile-brand {
  display: none;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1.75rem;
  position: relative;
  z-index: 1;
}

.va-mobile-brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--va-primary) 0%, var(--va-primary-light) 100%);
  border-radius: .625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
}

.va-mobile-brand-text {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--va-text);
  letter-spacing: -.02em;
}

/* ── Form Header ────────────────────────────────────────────────────────── */
.va-form-header {
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.va-form-eyebrow {
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--va-primary);
  background: var(--va-primary-50);
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: .625rem;
  border: 1px solid var(--va-primary-100);
}

.va-form-greeting {
  font-size: 1.625rem;
  font-weight: 800;
  color: var(--va-text);
  margin: 0 0 .375rem;
  letter-spacing: -.03em;
  line-height: 1.2;
}

.va-form-subtitle {
  font-size: .875rem;
  color: var(--va-muted);
  margin: 0;
}

/* ── Error Banner ───────────────────────────────────────────────────────── */
.va-error-banner {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-left: 3px solid var(--va-danger);
  border-radius: var(--va-radius);
  padding: .875rem 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: .625rem;
  position: relative;
  z-index: 1;
}

.va-error-banner > i {
  color: var(--va-danger);
  font-size: 1.125rem;
  flex-shrink: 0;
  margin-top: .0625rem;
}

.va-error-banner-title {
  font-size: .8125rem;
  font-weight: 700;
  color: #991b1b;
  margin-bottom: .25rem;
}

.va-error-banner ul {
  margin: 0;
  padding-left: 1rem;
  font-size: .75rem;
  color: #b91c1c;
  line-height: 1.7;
}

/* ── Form ───────────────────────────────────────────────────────────────── */
.va-form {
  position: relative;
  z-index: 1;
}

/* ── Input Groups ───────────────────────────────────────────────────────── */
.va-input-group {
  margin-bottom: 1.125rem;
}

.va-input-group label {
  display: block;
  font-size: .75rem;
  font-weight: 700;
  color: var(--va-text);
  margin-bottom: .35rem;
  letter-spacing: .01em;
}

/* wrapper — relative context for the icon */
.va-input-wrapper {
  position: relative;
}

/* fixed-position icon: aligns to center of the 2.75rem input, not the whole wrapper */
.va-input-icon {
  position: absolute;
  left: .875rem;
  top: 1.375rem; /* half of 2.75rem */
  transform: translateY(-50%);
  color: var(--va-dimmed);
  font-size: 1.0625rem;
  z-index: 2;
  pointer-events: none;
  transition: color .18s ease;
}

/* color the icon when any input inside the wrapper is focused */
.va-input-wrapper:focus-within .va-input-icon {
  color: var(--va-primary);
}

/* Yii2 field wrapper — flatten it */
.va-input-wrapper > div {
  margin: 0 !important;
}

.va-input-wrapper .form-group,
.va-input-wrapper [class*="field-loginform"] {
  margin: 0 !important;
  padding: 0 !important;
}

.va-input-wrapper .help-block { display: none; }

/* the actual input */
.va-input-wrapper .form-control {
  width: 100%;
  height: 2.75rem;
  padding: 0 .875rem 0 2.75rem;
  font-size: .875rem;
  font-family: var(--va-font);
  color: var(--va-text);
  background: var(--va-bg);
  border: 1.5px solid var(--va-border);
  border-radius: var(--va-radius);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
  outline: none;
  appearance: none;
  display: block;
}

.va-input-wrapper .form-control::placeholder { color: var(--va-dimmed); }

.va-input-wrapper .form-control:focus {
  border-color: var(--va-primary);
  background: var(--va-white);
  box-shadow: 0 0 0 3.5px rgba(154,206,37,.25);
}

/* DM Mono for lab code field */
.va-field-mono .form-control {
  font-family: var(--va-mono) !important;
  letter-spacing: .04em;
}

/* validation states */
.va-input-wrapper .form-control.is-invalid {
  border-color: var(--va-danger);
}
.va-input-wrapper .form-control.is-invalid:focus {
  box-shadow: 0 0 0 3.5px rgba(239,68,68,.11);
}

/* password toggle button */
.va-password-toggle {
  position: absolute;
  right: .5rem;
  top: 1.375rem;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--va-dimmed);
  font-size: 1.0625rem;
  padding: .25rem .375rem;
  cursor: pointer;
  z-index: 3;
  transition: color .18s ease;
  line-height: 1;
}

.va-password-toggle:hover { color: var(--va-primary); }

.va-input-wrapper .va-password-input { padding-right: 2.5rem; }

/* error message */
.va-input-error {
  font-size: .72rem;
  color: var(--va-danger);
  margin-top: .25rem;
  padding-left: .125rem;
  line-height: 1.4;
}

/* ── Remember me row ────────────────────────────────────────────────────── */
.va-form-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.375rem;
  position: relative;
  z-index: 1;
}

.va-form-meta .form-check { margin: 0; }

.va-form-meta .form-check-input {
  border-color: var(--va-border);
  cursor: pointer;
  width: 1rem;
  height: 1rem;
}

.va-form-meta .form-check-input:checked {
  background-color: var(--va-primary);
  border-color: var(--va-primary);
}

.va-form-meta .form-check-label {
  font-size: .8125rem;
  color: var(--va-muted);
  cursor: pointer;
  padding-left: .25rem;
}

/* ── Submit Button ──────────────────────────────────────────────────────── */
.va-btn-submit {
  width: 100%;
  height: 2.875rem;
  border: none;
  border-radius: var(--va-radius);
  background: linear-gradient(135deg, #7dad1a 0%, #9ace25 50%, #7dad1a 100%);
  background-size: 200% 100%;
  background-position: 0% 0%;
  color: #fff;
  font-size: .9375rem;
  font-weight: 700;
  font-family: var(--va-font);
  letter-spacing: .01em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  transition: background-position .35s ease, box-shadow .2s ease, transform .15s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(154,206,37,.35);
}
.va-btn-submit:hover {
  background-position: 100% 0%;
  box-shadow: 0 4px 20px rgba(154,206,37,.5);
  transform: translateY(-1px);
}
.va-btn-submit:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(154,206,37,.35);
}

.va-btn-submit:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* shimmer scan on hover */
.va-btn-submit::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 55%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.18) 50%, transparent 100%);
  transform: skewX(-20deg);
  transition: none;
}

.va-btn-submit:hover::before {
  transition: left .5s ease;
  left: 160%;
}

.va-btn-text,
.va-btn-submit i,
.va-btn-submit span {
  position: relative;
  z-index: 1;
}

/* spinner */
.va-spinner {
  width: 1.125rem;
  height: 1.125rem;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: va-spin .65s linear infinite;
  position: relative;
  z-index: 1;
  display: none;
}

.va-btn-submit.va-loading .va-spinner { display: block; }
.va-btn-submit.va-loading .va-btn-text { display: none; }

@keyframes va-spin { to { transform: rotate(360deg); } }

/* ── Trust Row ──────────────────────────────────────────────────────────── */
.va-trust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--va-border);
  position: relative;
  z-index: 1;
}

.va-trust-item {
  display: flex;
  align-items: center;
  gap: .3rem;
  font-size: .69rem;
  font-weight: 600;
  color: var(--va-dimmed);
  letter-spacing: .02em;
}

.va-trust-item i {
  font-size: .875rem;
  color: var(--va-primary);
}

/* ── Page Footer ────────────────────────────────────────────────────────── */
.va-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: .875rem 1rem 0;
  font-size: .72rem;
  color: var(--va-dimmed);
}

/* ── Entrance Animations ────────────────────────────────────────────────── */
@keyframes va-slideUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.va-animate {
  animation: va-slideUp .45s ease both;
}
.va-animate-delay-1 { animation-delay: .08s; }
.va-animate-delay-2 { animation-delay: .15s; }
.va-animate-delay-3 { animation-delay: .22s; }
.va-animate-delay-4 { animation-delay: .30s; }
.va-animate-delay-5 { animation-delay: .38s; }
.va-animate-delay-6 { animation-delay: .46s; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 767.98px) {
  .va-card {
    flex-direction: column;
    max-width: 440px;
    min-height: auto;
    border-radius: 1rem;
  }
  .va-sidebar { display: none; }
  .va-mobile-brand { display: flex; }
  .va-form-panel { padding: 2rem 1.5rem; }
  .va-form-greeting { font-size: 1.5rem; }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .va-sidebar { width: 42%; padding: 2rem 1.5rem; }
  .va-form-panel { padding: 2.5rem 2rem; }
  .va-lab-art { width: 180px; height: 180px; }
}
