﻿/* index.css */

/* ── Reset for auth page ──────────────────────────────────────────── */
.btn-submit .btn-loading { display: none; }
.btn-submit.loading .btn-text { display: none; }
.btn-submit.loading .btn-loading { display: inline-block; }

/* ── Brand panel overhaul ─────────────────────────────────────────── */
.brand-panel {
  position: relative;
  overflow: hidden;
  animation: none;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  align-items: stretch !important;
  gap: 0 !important;
}

/* All brand content sits above */
.brand-top, .brand-bottom {
  position: relative;
  z-index: 3;
  width: 100%;
}

/* Deep layered background: mesh gradient + noise grain */
.brand-panel-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 120% 80% at 10% 110%, rgba(200,98,42,0.55) 0%, transparent 55%),
    radial-gradient(ellipse 80%  90% at 90%  -10%, rgba(107,53,32,0.6)  0%, transparent 55%),
    radial-gradient(ellipse 60%  60% at 50%  50%,  rgba(61,32,16,0.2)   0%, transparent 70%),
    linear-gradient(160deg, #1e0c04 0%, #3D2010 45%, #5a2a14 100%);
  z-index: 0;
}

/* SVG-based grain overlay */
.brand-panel-grain {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.035;
  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)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  pointer-events: none;
}

/* Animated ring decorations */
.brand-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(200,98,42,0.18);
  z-index: 1;
  pointer-events: none;
}
.brand-ring-1 {
  width: 480px; height: 480px;
  top: -160px; right: -180px;
  animation: ringPulse 8s ease-in-out infinite;
}
.brand-ring-2 {
  width: 320px; height: 320px;
  top: -80px; right: -100px;
  border-color: rgba(200,98,42,0.12);
  animation: ringPulse 8s 1.5s ease-in-out infinite;
}
.brand-ring-3 {
  width: 220px; height: 220px;
  bottom: 60px; left: -80px;
  border-color: rgba(232,135,78,0.12);
  animation: ringPulse 10s 3s ease-in-out infinite;
}

@keyframes ringPulse {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%       { transform: scale(1.06); opacity: 0.5; }
}

/* Floating particles canvas */
#particles-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

/* ── Welcome Bonus Banner ─────────────────────────────────────────── */

.welcome-bonus {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(200, 98, 42, 0.12) 0%, rgba(232, 135, 78, 0.08) 100%);
  border: 1.5px solid rgba(200, 98, 42, 0.25);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 18px;
  animation: bonusPulse 2.5s ease-in-out infinite;
}

@keyframes bonusPulse {
  0%, 100% { border-color: rgba(200, 98, 42, 0.25); }
  50% { border-color: rgba(200, 98, 42, 0.5); }
}

.welcome-bonus-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.welcome-bonus-text {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.4;
}

.welcome-bonus-text strong {
  color: var(--cinna);
  font-weight: 700;
}

/* ── Password Strength Meter ──────────────────────────────────────── */

.password-strength {
  margin-top: 8px;
  animation: fadeIn 0.3s ease;
}

.strength-bar {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 4px;
}

.strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 4px;
  transition: width 0.35s ease, background 0.35s ease;
}

.strength-label {
  font-size: 11px;
  font-weight: 500;
  transition: color 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Logo animation ────────────────────────────────────────────────── */
.brand-icon {
  position: relative;
  overflow: hidden;
  cursor: default;
  animation: iconEntry 0.9s cubic-bezier(0.22,1,0.36,1) both;
  animation-delay: 0.1s;
}

/* Shimmer sweep on the logo */
.brand-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255,255,255,0.35) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  animation: shimmer 3.5s 1.2s ease-in-out infinite;
}

@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  30%, 100% { transform: translateX(200%); }
}

@keyframes iconEntry {
  from { transform: scale(0.7) rotate(-8deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg);   opacity: 1; }
}

/* ── Brand name stagger ───────────────────────────────────────────── */
.brand-name {
  animation: slideUp 0.8s 0.25s cubic-bezier(0.22,1,0.36,1) both;
}
.brand-tagline {
  animation: slideUp 0.8s 0.4s cubic-bezier(0.22,1,0.36,1) both;
}

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

/* ── Feature list staggered reveal ───────────────────────────────── */
.brand-features li {
  animation: featureIn 0.6s cubic-bezier(0.22,1,0.36,1) both;
  opacity: 0;
}
.brand-features li:nth-child(1) { animation-delay: 0.55s; }
.brand-features li:nth-child(2) { animation-delay: 0.70s; }
.brand-features li:nth-child(3) { animation-delay: 0.85s; }
.brand-features li:nth-child(4) { animation-delay: 1.00s; }
.brand-features li:nth-child(5) { animation-delay: 1.15s; }

@keyframes featureIn {
  from { transform: translateX(-16px); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}

/* Dot pulse on features */
.brand-features li::before {
  animation: dotPop 0.4s cubic-bezier(0.34,1.56,0.64,1) both;
  animation-delay: inherit;
}
@keyframes dotPop {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}

/* ── Mini card illustration in brand panel ───────────────────────── */
.brand-card-illustration {
  position: relative;
  z-index: 3;
  width: min(72%, 320px);
  margin: 0 auto;
  flex-shrink: 0;
  animation: cardFloat 6s ease-in-out infinite, cardEntry 1s 0.6s cubic-bezier(0.22,1,0.36,1) both;
}

@keyframes cardFloat {
  0%, 100% { transform: translateY(0)    rotate(-2.5deg); }
  50%       { transform: translateY(-12px) rotate(-1deg); }
}
@keyframes cardEntry {
  from { transform: translateY(30px) rotate(-2.5deg); opacity: 0; }
  to   { transform: translateY(0)    rotate(-2.5deg); opacity: 1; }
}

.mini-card {
  width: 100%;
  aspect-ratio: 1.586;
  border-radius: 14px;
  background: linear-gradient(135deg, #1a0a05 0%, #3D2010 45%, #6B3520 100%);
  padding: 18px 20px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow:
    0 24px 60px rgba(0,0,0,0.5),
    0 4px 16px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.08);
  position: relative;
  overflow: hidden;
}

.mini-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 20%, rgba(200,98,42,0.35) 0%, transparent 60%);
}

/* Animated shimmer on the mini card */
.mini-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255,255,255,0.07) 50%,
    transparent 65%
  );
  transform: translateX(-100%);
  animation: cardShimmer 4s 2s ease-in-out infinite;
}
@keyframes cardShimmer {
  0%   { transform: translateX(-100%); }
  35%, 100% { transform: translateX(220%); }
}

.mini-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative; z-index: 1;
}

.mini-chip {
  width: 26px; height: 19px;
  border-radius: 4px;
  background: linear-gradient(135deg, #d4a843 0%, #f0c85a 40%, #b8892f 100%);
}

.mini-brand {
  font-family: 'Playfair Display', serif;
  font-size: 11px;
  font-weight: 700;
  color: #f5d7b8;
  letter-spacing: -0.2px;
}
.mini-brand em { opacity: 0.7; }

.mini-num {
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(245,215,184,0.75);
  position: relative; z-index: 1;
}

.mini-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  position: relative; z-index: 1;
}

.mini-label { font-size: 6px; letter-spacing: 0.08em; color: rgba(245,215,184,0.45); text-transform: uppercase; margin-bottom: 2px; }
.mini-val   { font-size: 10px; color: #f5d7b8; letter-spacing: 0.03em; text-transform: uppercase; }
.mini-visa  { font-size: 9px; font-style: italic; font-weight: 700; color: rgba(245,215,184,0.6); }

/* ── Form panel animations ────────────────────────────────────────── */
.form-panel {
  animation: none;
}

.form-card {
  animation: formEntry 0.9s 0.15s cubic-bezier(0.22,1,0.36,1) both;
}

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

.form-header { animation: slideUp 0.7s 0.3s cubic-bezier(0.22,1,0.36,1) both; }
.tabs        { animation: slideUp 0.7s 0.4s cubic-bezier(0.22,1,0.36,1) both; }

/* Field focus glow — more vivid */
.field input:focus,
.field textarea:focus {
  border-color: var(--cinna);
  box-shadow: 0 0 0 4px rgba(200,98,42,0.13), 0 2px 8px rgba(200,98,42,0.08);
}

/* Submit button: shimmer + lift on hover */
.btn-submit {
  position: relative;
  overflow: hidden;
  transition: transform 0.2s cubic-bezier(0.22,1,0.36,1), background 0.2s, box-shadow 0.2s;
}
.btn-submit::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255,255,255,0.18) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  transition: transform 0s;
}
.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(200,98,42,0.35);
}
.btn-submit:hover::after {
  transform: translateX(200%);
  transition: transform 0.55s ease;
}
.btn-submit:active {
  transform: translateY(0) scale(0.99);
  box-shadow: none;
}

/* Tab active state: slide indicator */
.tabs { position: relative; }
.tab {
  transition: color 0.2s, background 0.25s cubic-bezier(0.22,1,0.36,1), box-shadow 0.2s;
  color: var(--text-muted);
}
.tab.active {
  background: var(--card-bg);
  color: var(--cinna-light);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transform: none;
}

/* Password toggle */
.input-group-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
}
.input-group-row input { flex: 1 !important; min-width: 0 !important; }

.password-toggle {
  background: none !important;
  border: 1.5px solid var(--border) !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  color: var(--muted);
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 12px !important;
  height: 42px !important;
  flex-shrink: 0 !important;
  transition: all 0.15s ease;
}
.password-toggle:hover {
  color: var(--text-primary);
  border-color: var(--cinna) !important;
  background-color: rgba(200,98,42,0.05) !important;
}
.password-toggle svg { width: 18px; height: 18px; pointer-events: none; }

/* ── Right panel background — subtle moving mesh ─────────────────── */
.form-panel {
  position: relative;
}
.form-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 40% at 80% 10%, rgba(200,98,42,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 40% 50% at 20% 90%, rgba(200,98,42,0.05) 0%, transparent 70%);
  animation: meshDrift 12s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}
.form-card { position: relative; z-index: 1; }

@keyframes meshDrift {
  from { opacity: 1; }
  to   { opacity: 0.4; }
}

/* ── Responsive ───────────────────────────────────────────────────── */
@media(max-width: 840px) {
  body.auth-body {
    flex-direction: column;
    overflow-y: auto;
  }
  .brand-panel {
    width: 100%;
    flex: none;
    padding: 40px 24px 32px;
    min-height: auto;
  }
  .brand-card-illustration {
    display: none;
  }
  .brand-bottom {
    display: none;
  }
  .form-panel {
    padding: 48px 24px 64px;
    align-items: flex-start;
  }
  .welcome-bonus {
    padding: 10px 14px;
  }
  .welcome-bonus-text {
    font-size: 12px;
  }
}

/* ── Additional small-screen tweaks ─────────────────────────────── */
@media(max-width: 480px) {
  .welcome-bonus {
    padding: 8px 12px;
    gap: 8px;
  }
  .welcome-bonus-icon {
    font-size: 16px;
  }
  .welcome-bonus-text {
    font-size: 11px;
  }
  .password-strength {
    margin-top: 6px;
  }
  .strength-label {
    font-size: 10px;
  }
}