/**
 * Avrio Login — Gold & Jewelry Brand
 * Bright, delightful, luxurious
 */

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

:root {
  --avrio-bg: #fdf9f3;
  --avrio-bg-warm: #faf5ed;
  --avrio-card: #ffffff;
  --avrio-brand-bg: linear-gradient(165deg, #fffef9 0%, #fef8ee 40%, #fdf3e3 100%);
  --avrio-gold: #c9a227;
  --avrio-gold-light: #d4af37;
  --avrio-gold-bright: #e8c755;
  --avrio-gold-pale: #f5e6c8;
  --avrio-champagne: #f5e6d3;
  --avrio-cream: #fdf8f2;
  --avrio-text: #2c2825;
  --avrio-text-soft: #5c5650;
  --avrio-muted: #8a837a;
  --avrio-border: rgba(201, 162, 39, 0.35);
  --avrio-glow: rgba(212, 175, 55, 0.25);
  --avrio-shadow: rgba(201, 162, 39, 0.08);
  --avrio-rose: #c99090;
}

@keyframes avrio-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.03); }
}

@keyframes avrio-float-slow {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(4px, -6px); }
  66% { transform: translate(-3px, 4px); }
}

@keyframes avrio-fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes avrio-shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes avrio-sparkle {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 0.9; transform: scale(1); }
}

@keyframes avrio-glow-soft {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

@keyframes avrio-shine-sweep {
  0% { left: -100%; }
  100% { left: 100%; }
}

@keyframes avrio-soft-pulse {
  0%, 100% { box-shadow: 0 20px 60px var(--avrio-shadow), 0 0 0 1px rgba(201, 162, 39, 0.12); }
  50% { box-shadow: 0 24px 70px rgba(201, 162, 39, 0.12), 0 0 0 1px rgba(201, 162, 39, 0.18); }
}

body {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  background: var(--avrio-bg);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow-x: hidden;
}

/* Warm gradient background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 120% 80% at 10% 10%, rgba(253, 243, 227, 0.9) 0%, transparent 50%),
    radial-gradient(ellipse 100% 100% at 90% 90%, rgba(245, 230, 200, 0.7) 0%, transparent 50%),
    radial-gradient(ellipse 80% 60% at 50% 110%, rgba(232, 199, 85, 0.15) 0%, transparent 45%),
    linear-gradient(180deg, var(--avrio-bg) 0%, var(--avrio-bg-warm) 100%);
  z-index: 0;
  pointer-events: none;
}

/* Soft moving gold orb */
body::after {
  content: '';
  position: fixed;
  top: 15%;
  right: 10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(232, 199, 85, 0.2) 0%, rgba(212, 175, 55, 0.08) 40%, transparent 70%);
  border-radius: 50%;
  animation: avrio-float 18s ease-in-out infinite;
  z-index: 0;
  pointer-events: none;
}

/* Sparkle dots in background */
.avrio-sparkles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.avrio-sparkle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--avrio-gold);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--avrio-gold-light);
  animation: avrio-sparkle 3s ease-in-out infinite;
}

.avrio-sparkle:nth-child(1) { top: 18%; left: 12%; animation-delay: 0s; }
.avrio-sparkle:nth-child(2) { top: 25%; right: 18%; animation-delay: 0.5s; }
.avrio-sparkle:nth-child(3) { top: 60%; left: 8%; animation-delay: 1s; }
.avrio-sparkle:nth-child(4) { top: 75%; right: 12%; animation-delay: 1.5s; }
.avrio-sparkle:nth-child(5) { top: 35%; left: 25%; animation-delay: 2s; }
.avrio-sparkle:nth-child(6) { top: 80%; left: 30%; animation-delay: 0.8s; }
.avrio-sparkle:nth-child(7) { top: 12%; left: 45%; animation-delay: 1.2s; }
.avrio-sparkle:nth-child(8) { top: 50%; right: 25%; animation-delay: 1.8s; }
.avrio-sparkle:nth-child(9) { top: 88%; left: 55%; animation-delay: 0.3s; }
.avrio-sparkle:nth-child(10) { top: 22%; right: 35%; animation-delay: 2.2s; }

/* Delicate facet pattern */
.avrio-facet-pattern {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(135deg, rgba(201, 162, 39, 0.04) 1px, transparent 1px),
    linear-gradient(225deg, rgba(201, 162, 39, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.8;
  z-index: 0;
  pointer-events: none;
}

.login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1100px;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  background: var(--avrio-card);
  border-radius: 28px;
  overflow: hidden;
  min-height: 620px;
  box-shadow:
    0 25px 80px rgba(0, 0, 0, 0.06),
    0 0 0 1px rgba(201, 162, 39, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  animation: avrio-soft-pulse 5s ease-in-out infinite;
}

/* —— Brand (left) —— */
.brand-section {
  padding: 56px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: var(--avrio-brand-bg);
}

.brand-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse 100% 80% at 20% 30%, rgba(232, 199, 85, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 80% 100% at 80% 70%, rgba(245, 230, 200, 0.5) 0%, transparent 50%);
  z-index: 0;
}

.brand-section::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.4) 0%, transparent 8%);
  animation: avrio-float-slow 20s linear infinite;
  z-index: 0;
}

.brand-content {
  position: relative;
  z-index: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.avrio-logo {
  display: block;
  max-width: 200px;
  width: 100%;
  height: auto;
  margin-bottom: 32px;
  filter: drop-shadow(0 2px 8px rgba(201, 162, 39, 0.15));
}

.avrio-logo-placeholder {
  width: 88px;
  height: 88px;
  border: 2px solid var(--avrio-gold);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  color: var(--avrio-gold);
  margin-bottom: 28px;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 16px var(--avrio-shadow);
}

.brand-title {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-size: 64px;
  font-weight: 600;
  color: var(--avrio-text);
  letter-spacing: 0.02em;
  line-height: 1.1;
  margin-bottom: 0;
  animation: avrio-fade-up 0.7s ease-out;
}

.brand-title .highlight {
  color: var(--avrio-gold);
  font-weight: 700;
  position: relative;
  display: inline-block;
  text-shadow: 0 0 30px rgba(201, 162, 39, 0.2);
}

.brand-title .highlight::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--avrio-gold), var(--avrio-gold-bright));
  border-radius: 1px;
  opacity: 0.7;
}

/* —— Form (right) —— */
.form-section {
  padding: 56px 52px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(180deg, #ffffff 0%, #fefcf8 100%);
  border-left: 1px solid rgba(201, 162, 39, 0.15);
  position: relative;
}

.form-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse 80% 80% at 100% 20%, rgba(253, 248, 242, 0.8) 0%, transparent 50%);
  pointer-events: none;
}

.form-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.form-header {
  margin-bottom: 36px;
}

.form-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px;
  font-weight: 600;
  color: var(--avrio-text);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.form-subtitle {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 15px;
  color: var(--avrio-muted);
  font-weight: 400;
}

.input-group {
  margin-bottom: 24px;
}

.input-group label {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--avrio-text-soft);
  margin-bottom: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.input-wrapper {
  position: relative;
  border-radius: 16px;
  transition: transform 0.2s ease, box-shadow 0.25s ease;
}

.input-wrapper:focus-within {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--avrio-shadow);
}

.input-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 2px;
  background: linear-gradient(135deg, var(--avrio-border), transparent 50%, var(--avrio-gold-pale), transparent 50%, var(--avrio-border));
  background-size: 200% 200%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.9;
  transition: opacity 0.25s ease;
}

.input-wrapper:focus-within::after {
  opacity: 1;
  background: linear-gradient(135deg, var(--avrio-gold), var(--avrio-gold-bright));
}

.form-input {
  width: 100%;
  padding: 16px 20px;
  background: rgba(253, 249, 243, 0.9);
  border: 1px solid rgba(201, 162, 39, 0.2);
  border-radius: 16px;
  color: var(--avrio-text);
  font-size: 16px;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  outline: none;
}

.form-input::placeholder {
  color: var(--avrio-muted);
}

.form-input:focus {
  border-color: var(--avrio-gold);
  background: #ffffff;
  box-shadow: 0 0 0 4px var(--avrio-glow);
}

.form-input.is-invalid {
  border-color: #d87878;
  box-shadow: 0 0 0 2px rgba(216, 120, 120, 0.2);
}

.invalid-feedback {
  color: #c65c5c;
  font-size: 13px;
  margin-top: 8px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
}

.remember-me-group {
  margin-bottom: 28px;
}

.remember-me-group label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--avrio-text-soft);
  cursor: pointer;
  user-select: none;
}

.remember-me-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--avrio-gold);
  cursor: pointer;
}

.submit-btn {
  width: 100%;
  padding: 18px 24px;
  background: linear-gradient(135deg, var(--avrio-gold) 0%, var(--avrio-gold-light) 45%, var(--avrio-gold-bright) 100%);
  color: #1a1712;
  border: none;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 6px 24px rgba(201, 162, 39, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.submit-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  animation: avrio-shine-sweep 2.5s ease-in-out infinite;
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(201, 162, 39, 0.4);
  filter: brightness(1.08);
}

.submit-btn:hover::before {
  animation: avrio-shine-sweep 0.8s ease-in-out;
}

.submit-btn:active {
  transform: translateY(-1px);
}

/* Decorative corner — light theme */
.brand-section .corner-ornament {
  position: absolute;
  bottom: 24px;
  right: 24px;
  width: 80px;
  height: 80px;
  border-right: 2px solid var(--avrio-border);
  border-bottom: 2px solid var(--avrio-border);
  border-radius: 0 0 12px 0;
  opacity: 0.6;
}

/* Responsive */
@media (max-width: 900px) {
  .login-container {
    grid-template-columns: 1fr;
    max-width: 480px;
    min-height: auto;
  }

  .brand-section {
    padding: 40px 32px;
    min-height: 240px;
  }

  .brand-title {
    font-size: 44px;
  }

  .avrio-logo {
    max-width: 160px;
  }

  .form-section {
    padding: 40px 32px;
    border-left: none;
    border-top: 1px solid rgba(201, 162, 39, 0.15);
  }

  .brand-section .corner-ornament {
    display: none;
  }
}

@media (max-width: 480px) {
  body {
    padding: 16px;
  }

  .brand-title {
    font-size: 36px;
  }

  .avrio-logo {
    max-width: 140px;
  }

  .form-title {
    font-size: 26px;
  }

  .brand-section,
  .form-section {
    padding: 28px 20px;
  }

  .avrio-sparkle {
    width: 3px;
    height: 3px;
  }
}
