/* =====================================================
   FundoAnalytics — login.css
   Design: Split-screen · Dark luxury · Gold accent
   ===================================================== */

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

:root {
  --gold:       #C9A84C;
  --gold-lt:    #E8C97A;
  --gold-dk:    #9A7530;
  --gold-glow:  rgba(201,168,76,0.25);
  --ink:        #0D0F14;
  --ink-2:      #12151C;
  --ink-3:      #1A1E2A;
  --ink-4:      #222838;
  --slate:      #8892A4;
  --slate-lt:   #AAB4C8;
  --white:      #F0F2F7;
  --border:     rgba(201,168,76,0.15);
  --border-lt:  rgba(201,168,76,0.3);
  --success:    #3ECF8E;
  --danger:     #F4645F;
  --radius:     14px;
  --transition: 0.26s cubic-bezier(0.4,0,0.2,1);
  --shadow-deep: 0 32px 80px rgba(0,0,0,0.6);
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  background: var(--ink);
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
}

/* ── Background ── */
.bg-scene {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
}
.bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(201,168,76,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,168,76,0.03) 1px, transparent 1px);
  background-size: 52px 52px;
}
.orb {
  position: absolute; border-radius: 50%; filter: blur(100px);
  opacity: 0.13; pointer-events: none;
  animation: float 12s ease-in-out infinite;
}
.orb1 { width: 700px; height: 700px; background: var(--gold); top: -300px; right: -100px; animation-delay: 0s; }
.orb2 { width: 500px; height: 500px; background: #2D4FD6; bottom: -200px; left: -100px; animation-delay: -4s; }
.orb3 { width: 350px; height: 350px; background: #3ECF8E; top: 50%; left: 35%; animation-delay: -8s; opacity: 0.07; }

/* ── Particles (JS generated) ── */
.particles { position: absolute; inset: 0; overflow: hidden; }
.particle {
  position: absolute;
  width: 2px; height: 2px;
  background: var(--gold);
  border-radius: 50%;
  animation: rise linear infinite;
  opacity: 0;
}

/* ── Split Layout ── */
.split-layout {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 100vh;
  overflow: hidden;
}

/* ── Brand Panel (left) ── */
.brand-panel {
  background: linear-gradient(160deg, rgba(201,168,76,0.05) 0%, transparent 60%),
              var(--ink-2);
  border-right: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  padding: 48px;
  position: relative;
  overflow: hidden;
  animation: slideRight 0.8s cubic-bezier(0.16,1,0.3,1) both;
}
.brand-panel::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border: 1px solid rgba(201,168,76,0.07);
  border-radius: 50%;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.brand-panel::after {
  content: '';
  position: absolute;
  width: 900px; height: 900px;
  border: 1px solid rgba(201,168,76,0.04);
  border-radius: 50%;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.brand-content { position: relative; z-index: 1; max-width: 420px; }

.brand-logo {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 40px;
}
.logo-gem {
  font-size: 30px;
  color: var(--gold);
  filter: drop-shadow(0 0 16px var(--gold-glow));
  animation: pulse-gem 3s ease-in-out infinite;
}
.logo-name {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold-lt), var(--gold), var(--gold-dk));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-headline {
  font-family: 'Playfair Display', serif;
  font-size: 42px;
  font-weight: 700;
  line-height: 1.18;
  color: var(--white);
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}
.brand-headline em {
  font-style: italic;
  background: linear-gradient(90deg, var(--gold-lt), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-sub {
  color: var(--slate-lt);
  font-size: 14px;
  line-height: 1.65;
  margin-bottom: 36px;
  font-weight: 300;
}

.brand-features {
  display: flex; flex-direction: column; gap: 14px;
  margin-bottom: 40px;
}
.feat {
  display: flex; align-items: center; gap: 14px;
  color: var(--slate-lt);
  font-size: 13px;
}
.feat-icon { font-size: 18px; width: 24px; text-align: center; }

.brand-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(201,168,76,0.07);
  border: 1px solid var(--border-lt);
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.5px;
  padding: 8px 16px;
  border-radius: 100px;
  font-weight: 500;
}
.badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px rgba(62,207,142,0.8);
  animation: blink 2s ease-in-out infinite;
}

/* ── Form Panel (right) ── */
.form-panel {
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
  overflow-y: auto;
  animation: slideLeft 0.8s cubic-bezier(0.16,1,0.3,1) both;
}

.form-wrap {
  width: 100%; max-width: 400px;
}

.mobile-logo {
  display: none;
  align-items: center; gap: 10px;
  margin-bottom: 32px;
}

.form-header { margin-bottom: 32px; }
.form-title {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 6px;
}
.form-subtitle { color: var(--slate); font-size: 14px; font-weight: 300; }

/* ── Alerts ── */
.alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 20px;
  animation: shake 0.4s ease;
}
.alert-error {
  background: rgba(244,100,95,0.1);
  border: 1px solid rgba(244,100,95,0.3);
  color: #F4645F;
}
.alert-success {
  background: rgba(62,207,142,0.1);
  border: 1px solid rgba(62,207,142,0.3);
  color: var(--success);
}
.alert-icon { font-size: 15px; flex-shrink: 0; margin-top: 1px; }

/* ── Form Fields ── */
.field-group { margin-bottom: 20px; }
.field-label {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px;
  font-weight: 500;
  color: var(--slate-lt);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.forgot-link {
  font-size: 12px;
  color: var(--gold);
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  transition: color var(--transition);
}
.forgot-link:hover { color: var(--gold-lt); }

.field-wrap {
  position: relative;
  display: flex; align-items: center;
}
.field-icon {
  position: absolute; left: 14px;
  color: var(--slate);
  pointer-events: none;
  display: flex; align-items: center;
  transition: color var(--transition);
}
.field-input {
  width: 100%;
  background: var(--ink-3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 44px;
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  outline: none;
}
.field-input::placeholder { color: var(--slate); font-weight: 300; }
.field-input:focus {
  border-color: var(--gold);
  background: var(--ink-4);
  box-shadow: 0 0 0 4px rgba(201,168,76,0.1);
}
.field-input:focus + .field-icon,
.field-wrap:focus-within .field-icon { color: var(--gold); }

.toggle-pw {
  position: absolute; right: 12px;
  background: none; border: none; cursor: pointer;
  color: var(--slate);
  display: flex; align-items: center; justify-content: center;
  padding: 6px;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
}
.toggle-pw:hover { color: var(--gold-lt); background: rgba(255,255,255,0.05); }

/* ── Checkbox ── */
.field-row { margin-bottom: 24px; }
.checkbox-label {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--slate-lt);
  user-select: none;
}
.checkbox-label input { display: none; }
.checkbox-custom {
  width: 18px; height: 18px;
  border: 1.5px solid var(--border-lt);
  border-radius: 5px;
  background: var(--ink-3);
  flex-shrink: 0;
  position: relative;
  transition: var(--transition);
}
.checkbox-label input:checked + .checkbox-custom {
  background: var(--gold);
  border-color: var(--gold);
}
.checkbox-label input:checked + .checkbox-custom::after {
  content: '✓';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  color: var(--ink);
  font-weight: 700;
}

/* ── Login Button ── */
.btn-login {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(135deg, var(--gold-dk), var(--gold), var(--gold-lt));
  color: var(--ink);
  border: none;
  border-radius: var(--radius);
  padding: 15px 28px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 6px 28px rgba(201,168,76,0.28);
  position: relative; overflow: hidden;
}
.btn-login::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.12);
  opacity: 0;
  transition: var(--transition);
}
.btn-login:hover::before { opacity: 1; }
.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(201,168,76,0.4);
}
.btn-login:active { transform: translateY(0); }
.btn-login:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn-spinner {
  width: 18px; height: 18px;
  border: 2.5px solid rgba(13,15,20,0.3);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.btn-arrow { transition: var(--transition); }
.btn-login:hover:not(:disabled) .btn-arrow { transform: translateX(4px); }

/* ── Footer do form ── */
.form-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 13px;
  color: var(--slate);
}
.link-gold {
  color: var(--gold);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition);
}
.link-gold:hover { color: var(--gold-lt); }

/* ── Demo Box ── */
.demo-box {
  margin-top: 28px;
  background: rgba(201,168,76,0.05);
  border: 1px dashed rgba(201,168,76,0.25);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.demo-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.6px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.demo-creds {
  display: flex; flex-direction: column; gap: 6px;
}
.demo-creds span {
  font-size: 12px;
  color: var(--slate-lt);
  font-family: 'Courier New', monospace;
}
.demo-creds strong { color: var(--white); }

/* ── Animations ── */
@keyframes slideRight {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideLeft {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-30px) scale(1.05); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}
@keyframes pulse-gem {
  0%, 100% { filter: drop-shadow(0 0 16px rgba(201,168,76,0.3)); }
  50%       { filter: drop-shadow(0 0 32px rgba(201,168,76,0.7)); }
}
@keyframes rise {
  0%   { transform: translateY(100vh) scale(0); opacity: 0; }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.3; }
  100% { transform: translateY(-20px) scale(1); opacity: 0; }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  html, body { overflow: auto; }
  .split-layout { grid-template-columns: 1fr; height: auto; }
  .brand-panel { display: none; }
  .form-panel { padding: 32px 24px; min-height: 100vh; }
  .mobile-logo { display: flex; }
}
