/* ═══════════════════════════════════════════════════════════════
   BiomedCraft Hub — auth.css
   Strict 100vh full-screen split, dark glassmorphism UI
   ═══════════════════════════════════════════════════════════════ */

/* ── Reset & Root ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

/* ── Page Shell — locked to exactly the viewport ────────────── */
html,
.auth-page {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.auth-page {
  width: 100%;
  height: 100vh;
  background: var(--bg-primary);
  font-family: 'Inter', 'Sora', sans-serif;
  color: var(--text-primary);
  overflow: hidden;
}

/* ── Two-Panel Container — fills viewport exactly ────────────── */
.auth-container {
  display: flex;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

/* ════════════════════════════════════════════════════════════════
   LEFT PANEL — Hero / Branding
   ════════════════════════════════════════════════════════════════ */
.auth-left {
  position: relative;
  flex: 0 0 50%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2.2rem 3rem;
  overflow: hidden;
  z-index: 0;

  background-image:
    linear-gradient(135deg,
      rgba(2, 2, 26, 0.92) 0%,
      rgba(13, 31, 65, 0.78) 50%,
      rgba(2, 2, 26, 0.88) 100%),
    url('https://images.unsplash.com/photo-1576091160550-2173dba999ef?auto=format&fit=crop&w=1400&q=80');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Decorative vertical accent line */
.auth-left::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 1px; height: 100%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--accent) 30%,
    var(--cyan) 70%,
    transparent 100%
  );
  opacity: 0.35;
}

/* Grain overlay */
.auth-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  pointer-events: none;
  z-index: 1;
}

.auth-left > * { position: relative; z-index: 2; }

/* ── Brand Logo ─────────────────────────────────────────────── */
.auth-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  margin-bottom: 2rem;
  align-self: flex-start;
}

.auth-brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--btn-bg), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #fff;
  box-shadow: 0 0 16px var(--accent-glow);
  flex-shrink: 0;
}

.auth-brand-name {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.auth-brand-name span { color: var(--accent); }

/* ── Hero Headline ──────────────────────────────────────────── */
.auth-headline {
  font-family: 'Sora', sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem); 
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin: 0 0 1rem 0;
}

.auth-headline span {
  color: transparent;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  display: inline-block;
}

/* ── Tagline ────────────────────────────────────────────────── */
.auth-tagline {
  font-size: 0.97rem;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 360px;
  margin: 0 0 1.8rem 0;
}

/* ── Stats Row ──────────────────────────────────────────────── */
.auth-stats {
  display: flex;
  gap: 1.8rem;
  margin-bottom: 1.8rem;
}

.auth-stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.auth-stat-val {
  font-family: 'Sora', sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  text-shadow: 0 0 20px var(--accent-glow);
}

.auth-stat-lbl {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ── Left Panel Footer Links ─────────────────────────────────── */
.auth-left-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.auth-left-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--glass);
  backdrop-filter: blur(8px);
  transition: color 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.auth-left-links a:hover {
  color: var(--accent);
  border-color: var(--border-hover);
  background: var(--accent-dim);
  box-shadow: 0 0 12px var(--accent-glow-lg);
}

.auth-left-links a i { font-size: 0.78rem; opacity: 0.8; }

/* ════════════════════════════════════════════════════════════════
   RIGHT PANEL — Form
   ════════════════════════════════════════════════════════════════ */
.auth-right {
  flex: 0 0 50%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 2rem;
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

/* Subtle radial glow */
.auth-right::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 480px; height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow-lg) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Auth Card (Glassmorphism) ───────────────────────────────── */
.auth-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 420px;
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
  scrollbar-width: none;
  background: rgba(17, 34, 64, 0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 1.8rem 2rem 1.6rem;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(2, 184, 240, 0.06) inset,
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
  animation: cardReveal 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-card::-webkit-scrollbar { display: none; }

@keyframes cardReveal {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Mobile Logo (hidden on desktop) ───────────────────────── */
.auth-logo-mobile {
  display: none;
  align-items: center;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text-primary);
  text-decoration: none;
  margin-bottom: 1.2rem;
}

.auth-logo-mobile i  { color: var(--accent); }
.auth-logo-mobile span { color: var(--accent); }

/* ── Tabs ───────────────────────────────────────────────────── */
.auth-tabs {
  display: flex;
  margin-bottom: 1.1rem;
  background: rgba(2, 2, 26, 0.5);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
}

.auth-tab {
  flex: 1;
  text-align: center;
  padding: 0.46rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 7px;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}

.auth-tab.active {
  background: linear-gradient(135deg, var(--btn-bg), var(--accent));
  color: #fff;
  box-shadow: 0 2px 12px var(--accent-glow);
}

.auth-tab:not(.active):hover {
  color: var(--text-primary);
  background: var(--glass-hover);
}

/* ── Form Heading ───────────────────────────────────────────── */
.form-heading {
  font-family: 'Sora', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 1rem 0;
  letter-spacing: -0.02em;
}

/* ── Google Button ──────────────────────────────────────────── */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.6rem 1.2rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, transform 0.18s, box-shadow 0.2s;
}

.btn-google:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-google svg { flex-shrink: 0; }

/* ── Divider ────────────────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.85rem 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-divider span {
  font-size: 0.73rem;
  color: var(--text-muted);
  white-space: nowrap;
  letter-spacing: 0.04em;
}

/* ── Alert / Message Banners ─────────────────────────────────── */
.auth-msg {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 0.85rem;
}

.auth-msg i {
  flex-shrink: 0;
  margin-top: 1px;
  font-size: 0.9rem;
}

.auth-msg-error {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: #fca5a5;
}

.auth-msg-success {
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.3);
  color: #86efac;
}

/* ── Form Groups ────────────────────────────────────────────── */
.form-group {
  margin-bottom: 0.8rem;
}

.form-group label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
  letter-spacing: 0.02em;
}

/* ── Forgot Password Link ───────────────────────────────────── */
.forgot-link {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.forgot-link:hover { opacity: 1; text-decoration: underline; }

/* ── Inputs ─────────────────────────────────────────────────── */
.form-group input[type="email"],
.form-group input[type="text"],
.form-group input[type="password"] {
  width: 100%;
  padding: 0.58rem 0.9rem;
  background: rgba(5, 21, 36, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  box-sizing: border-box;
 
}

.form-group input::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

.form-group input:focus {
  border-color: var(--accent);
  background: rgba(2, 184, 240, 0.04);
  box-shadow: 0 0 0 3px var(--accent-mid), 0 0 18px var(--accent-glow-lg);
}

/* ── Password Toggle Wrapper ─────────────────────────────────── */
.input-with-toggle {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-toggle input { padding-right: 2.6rem !important; width: 100%; }

.pwd-toggle {
  position: absolute;
  right: 0.8rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  font-size: 0.88rem;
  line-height: 1;
}

.pwd-toggle:hover { color: var(--accent); }

/* ── Field Hint ─────────────────────────────────────────────── */
.field-hint {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.28rem 0 0;
  font-size: 0.73rem;
  color: var(--text-muted);
}

.field-hint i {
  font-size: 0.7rem;
  color: var(--accent);
  opacity: 0.6;
}

/* ── Primary Auth Button ─────────────────────────────────────── */
.btn-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.65rem 1.4rem;
  margin-top: 0.35rem;
  background: linear-gradient(135deg, var(--btn-bg) 0%, var(--accent) 100%);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  font-family: 'Sora', sans-serif;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 4px 20px var(--accent-glow);
  transition: transform 0.18s, box-shadow 0.2s, filter 0.2s;
  position: relative;
  overflow: hidden;
}

.btn-auth::after {
  content: '';
  position: absolute;
  top: -50%; left: -60%;
  width: 40%; height: 200%;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255,255,255,0.18) 50%,
    transparent 70%
  );
  transform: skewX(-20deg);
  transition: left 0.5s ease;
}

.btn-auth:hover::after { left: 130%; }

.btn-auth:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--accent-glow), 0 0 0 1px var(--border-hover);
  filter: brightness(1.08);
}

.btn-auth:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 10px var(--accent-glow);
}

.btn-auth:disabled { opacity: 0.65; cursor: not-allowed; }

/* ── Button Spinner ─────────────────────────────────────────── */
.btn-spinner {
  position: absolute;
  font-size: 1rem;
  color: #fff;
}

/* ── Footer Note ────────────────────────────────────────────── */
.auth-footer-note {
  margin: 0.85rem 0 0;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.auth-footer-note a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s;
}

.auth-footer-note a:hover { opacity: 0.8; text-decoration: underline; }

/* ── Terms Note ─────────────────────────────────────────────── */
.auth-terms {
  margin: 0.5rem 0 0;
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.auth-terms a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--border);
  transition: color 0.2s;
}

.auth-terms a:hover { color: var(--accent); }

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE — Tablet
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .auth-left  { flex: 0 0 42%; padding: 2rem 2.2rem; }
  .auth-right { flex: 0 0 58%; }

  .auth-headline { font-size: clamp(2rem, 3.5vw, 3rem); }
  .auth-stats    { gap: 1.2rem; margin-bottom: 1.4rem; }
  .auth-tagline  { margin-bottom: 1.4rem; }
  .auth-brand    { margin-bottom: 1.6rem; }
}

@media (max-width: 820px) {
  .auth-left  { flex: 0 0 38%; padding: 1.6rem 1.8rem; }
  .auth-right { flex: 0 0 62%; padding: 1rem 1.2rem; }

  .auth-brand    { margin-bottom: 1.2rem; }
  .auth-tagline  { font-size: 0.88rem; margin-bottom: 1rem; }
  .auth-stats    { gap: 0.9rem; margin-bottom: 1rem; }
  .auth-stat-val { font-size: 1.35rem; }

  .auth-card { padding: 1.4rem 1.5rem 1.2rem; }
  .form-heading { font-size: 1.2rem; }
}

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE — Mobile
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .auth-container { flex-direction: column; }
  .auth-left { display: none; }

  .auth-right {
    flex: 1;
    width: 100%;
    height: 100vh;
    padding: 1.2rem 1rem;
    overflow-y: auto;
    background:
      radial-gradient(ellipse at 60% 10%, rgba(2,184,240,0.08) 0%, transparent 60%),
      var(--bg-primary);
  }

  .auth-card {
    max-width: 100%;
    max-height: none;
    overflow-y: visible;
    padding: 1.6rem 1.4rem 1.4rem;
    border-radius: var(--radius-md);
  }

  .auth-logo-mobile { display: flex; }
  .form-heading { font-size: 1.2rem; }
}

@media (max-width: 380px) {
  .auth-card { padding: 1.3rem 1.1rem; }
}

/* ════════════════════════════════════════════════════════════════
   SCROLLBAR — themed
   ════════════════════════════════════════════════════════════════ */
::-webkit-scrollbar        { width: 5px; }
::-webkit-scrollbar-track  { background: var(--bg-primary); }
::-webkit-scrollbar-thumb  { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ── Autofill — suppress browser yellow flash ───────────────── */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px rgba(5, 21, 36, 0.95) inset !important;
  -webkit-text-fill-color: var(--text-primary) !important;
  caret-color: var(--text-primary);
  border-color: var(--border) !important;
  transition: background-color 9999s ease-in-out 0s;
}


