/* ============================================================
   BếpBooks Portal — Auth screen styles (preserved from previous frontend)
   Loaded alongside the portal React app. Only styles the login form.
   ============================================================ */

:root {
  --bg: #f1f5f9;
  --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --card: #ffffff;
  --card-glass: rgba(255, 255, 255, 0.85);
  --card-hover: #fafbfc;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);
  --border-subtle: rgba(0, 0, 0, 0.04);
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #94a3b8;
  --text-4: #cbd5e1;
  --emerald: #10b981;
  --emerald-deep: #047857;
  --emerald-soft: rgba(16, 185, 129, 0.1);
  --emerald-glow: rgba(16, 185, 129, 0.2);
  --indigo: #6366f1;
  --indigo-soft: rgba(99, 102, 241, 0.1);
  --violet: #8b5cf6;
  --violet-soft: rgba(139, 92, 246, 0.1);
  --red: #ef4444;
  --red-deep: #dc2626;
  --red-soft: rgba(239, 68, 68, 0.1);
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.1);
  --sky: #0ea5e9;
  --sky-soft: rgba(14, 165, 233, 0.1);
  --radius: 16px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.1), 0 8px 24px rgba(0,0,0,0.06);
  --shadow-xl: 0 25px 50px -12px rgba(0,0,0,0.15), 0 12px 24px rgba(0,0,0,0.08);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html, body {
  height: 100%;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--indigo-soft); color: var(--text); }
.i { width: 18px; height: 18px; flex: none; }
.i-sm { width: 14px; height: 14px; }

@keyframes rise-in {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes rotate-slow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes rot { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-group > * { animation: none; }
}

/* AUTH SCREEN — Image background with smooth blur and frosted glass card */
.auth-screen {
  min-height: 100vh; position: relative; display: flex;
  align-items: center; justify-content: center; padding: 24px;
  overflow: hidden; background: #0b1220;
}
.auth-bg {
  position: absolute; inset: -24px;
  background: url('login-bg.png') center center / cover no-repeat;
  filter: blur(14px) saturate(1.05);
  transform: scale(1.05);
}
.auth-bg-orb {
  position: absolute; border-radius: 50%; filter: blur(90px);
  opacity: 0.12; animation: float 25s ease-in-out infinite;
  mix-blend-mode: soft-light;
}
.auth-bg-orb-1 { width: 420px; height: 420px; background: #b45309; top: -120px; left: -120px; }
.auth-bg-orb-2 { width: 320px; height: 320px; background: #78350f; bottom: -60px; right: -60px; animation-delay: -8s; }
.auth-bg-orb-3 { width: 280px; height: 280px; background: #f59e0b; top: 50%; left: 60%; animation-delay: -16s; }
.auth-veil { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(30,15,5,0.46) 0%, rgba(15,10,5,0.30) 100%); }
.auth-center {
  position: relative; z-index: 1; width: 100%; max-width: 460px;
  display: flex; flex-direction: column; align-items: center; gap: 24px;
}
.auth-card {
  position: relative; width: 100%;
  background: rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(44px) saturate(1.6);
  backdrop-filter: blur(44px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-xl);
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  padding: 44px 40px 36px; animation: rise-in 0.7s var(--ease-out) both; overflow: hidden;
}
.auth-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.05) 50%, transparent 100%);
  border-radius: var(--radius-xl); pointer-events: none;
}
.auth-card::after {
  content: ''; position: absolute; top: 0; left: 10%; right: 10%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  pointer-events: none;
}
.auth-brand { display: flex; align-items: center; gap: 16px; margin-bottom: 4px; position: relative; z-index: 1; }
.brand-mark {
  position: relative; width: 56px; height: 56px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.3);
  box-shadow: 0 8px 24px -6px rgba(0,0,0,0.15);
}
.brand-emoji { font-size: 26px; }
.brand-glow {
  position: absolute; inset: -4px; border-radius: 22px;
  background: conic-gradient(from 0deg, rgba(255,255,255,0.4), rgba(255,255,255,0.1), rgba(255,255,255,0.4));
  opacity: 0.5; filter: blur(8px); animation: rotate-slow 10s linear infinite; z-index: -1;
}
.auth-brand-text { display: flex; flex-direction: column; gap: 3px; }
.auth-title { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; color: #fff; }
.auth-title-badge { font-size: 10px; font-weight: 700; letter-spacing: 0.18em; color: rgba(255,255,255,0.7); text-transform: uppercase; }
.auth-tagline { font-size: 13px; color: rgba(255,255,255,0.7); font-weight: 500; margin-bottom: 28px; padding-left: 72px; position: relative; z-index: 1; }

.seg {
  display: flex; gap: 4px; padding: 5px; margin-bottom: 28px;
  background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-sm); position: relative; z-index: 1;
}
.seg-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  border: none; background: transparent; cursor: pointer; font-family: var(--font);
  font-weight: 600; font-size: 13px; color: rgba(255,255,255,0.7);
  padding: 11px 16px; border-radius: var(--radius-xs); transition: all 0.3s var(--ease-out);
}
.seg-btn:hover { color: #fff; background: rgba(255,255,255,0.1); }
.seg-btn.active { background: rgba(255,255,255,0.25); color: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.seg-icon { width: 16px; height: 16px; }

.form { display: flex; flex-direction: column; gap: 18px; position: relative; z-index: 1; }
.fld { display: flex; flex-direction: column; gap: 8px; }
.fld-label { font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.85); letter-spacing: 0.08em; text-transform: uppercase; }
.fld-label .hint { font-weight: 500; color: rgba(255,255,255,0.5); text-transform: none; letter-spacing: normal; }
.fld-input { position: relative; display: flex; align-items: center; }
.fld-icon { position: absolute; left: 16px; width: 18px; height: 18px; color: rgba(255,255,255,0.5); pointer-events: none; transition: color 0.2s; z-index: 1; }
.fld-input input, .fld-input select {
  font-family: var(--font); font-size: 14px; color: #fff;
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-sm); padding: 14px 16px 14px 46px; outline: none;
  width: 100%; height: 50px; transition: all 0.25s var(--ease-out);
  appearance: none; -webkit-appearance: none;
}
.fld-input select { cursor: pointer; padding-right: 40px; }
.fld-input input::placeholder { color: rgba(255,255,255,0.45); }
.fld-input input:focus, .fld-input select:focus {
  border-color: rgba(255,255,255,0.5); background: rgba(255,255,255,0.2);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.15);
}
.fld-input:focus-within .fld-icon { color: rgba(255,255,255,0.8); }
.fld-eye { position: absolute; right: 12px; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; background: transparent; border: none; border-radius: var(--radius-xs); cursor: pointer; color: rgba(255,255,255,0.5); transition: all 0.18s; }
.fld-eye:hover { color: #fff; background: rgba(255,255,255,0.15); }
.fld-eye .i { width: 18px; height: 18px; }
.fld-caret { position: absolute; right: 16px; width: 16px; height: 16px; color: rgba(255,255,255,0.5); pointer-events: none; }
.auth-error { min-height: 20px; margin-top: 14px; font-size: 13px; font-weight: 600; color: #fca5a5; position: relative; z-index: 1; }
.auth-foot { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 24px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.15); font-size: 12px; color: rgba(255,255,255,0.5); font-weight: 500; position: relative; z-index: 1; }
.auth-foot-icon { display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; color: rgba(255,255,255,0.7); }
.auth-features { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; animation: rise-in 0.7s var(--ease-out) 0.2s both; }
.auth-feature { display: flex; align-items: center; gap: 6px; padding: 8px 14px; background: rgba(255,255,255,0.12); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.2); border-radius: 100px; font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.8); }
.auth-feature svg { width: 14px; height: 14px; color: rgba(255,255,255,0.8); }
.auth-feature b { color: #fff; }

/* LIQUID METAL BUTTON */
.btn-liquid {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font); font-weight: 600; font-size: 14px; letter-spacing: -0.01em; color: #f8fafc;
  border: none; cursor: pointer; padding: 13px 22px; border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #2a2a2e 0%, #1a1a1e 50%, #0f0f12 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,0.12) inset, 0 -1px 1px rgba(0,0,0,0.5) inset, 0 12px 24px -8px rgba(0,0,0,0.35), 0 4px 8px -2px rgba(0,0,0,0.2);
  transition: transform 0.14s var(--ease-out), box-shadow 0.22s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.btn-liquid::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(120px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.1) 35%, transparent 65%);
  opacity: 0; transition: opacity 0.3s;
}
.btn-liquid::after {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 45%; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.03) 60%, transparent 100%);
  transition: opacity 0.15s;
}
.btn-liquid:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255,255,255,0.15) inset, 0 -1px 1px rgba(0,0,0,0.5) inset, 0 20px 40px -10px rgba(0,0,0,0.4), 0 8px 16px -4px rgba(0,0,0,0.25); }
.btn-liquid:hover::before { opacity: 1; }
.btn-liquid:active { transform: translateY(1px) scale(0.98); }
.btn-liquid:active::after { opacity: 0.3; }
.btn-liquid:disabled { opacity: 0.5; cursor: default; transform: none; }
.btn-liquid .i { transition: transform 0.3s var(--ease-spring); position: relative; z-index: 1; }
.btn-liquid span { position: relative; z-index: 1; }
.btn-liquid:hover .i-arrow { transform: translateX(4px); }
.btn-liquid:hover .i-download { transform: translateY(3px); }
.btn-liquid:hover .i-plus { transform: rotate(90deg) scale(1.1); }
.btn-liquid:active .i { transform: scale(0.9); }
.btn-liquid-block { width: 100%; padding: 14px 22px; font-size: 15px; }
.btn-spin { width: 16px; height: 16px; border-radius: 50%; flex: none; border: 2px solid rgba(255,255,255,0.2); border-top-color: #fff; animation: rot 0.7s linear infinite; }

@media (max-width: 480px) {
  .auth-card { padding: 28px 24px; }
  .auth-features { flex-direction: column; width: 100%; }
  .auth-feature { width: 100%; justify-content: center; }
}
