*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; overflow: hidden; }

:root {
  --bg:        #080B10;
  --surface:   #0F1420;
  --surface-2: #161D2C;
  --border:    rgba(255,255,255,0.07);
  --border-2:  rgba(255,255,255,0.14);
  --blue:      #4296E0;
  --blue-glow: rgba(66,150,224,0.25);
  --gold:      #C8972A;
  --text-1:    #F0F4F8;
  --text-2:    #8B95A8;
  --text-3:    #4A5568;
  --red:       #e74c3c;
  --radius:    16px;
  --font:      'DM Sans', sans-serif;
  --mono:      'DM Mono', monospace;
}

html, body {
  width: 100%; min-height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-1);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* ── BACKGROUND ── */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(66,150,224,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 10% 80%, rgba(200,151,42,0.07) 0%, transparent 55%);
  pointer-events: none;
}

/* Dot grid */
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 0;
  background-image: radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

/* ── LAYOUT ── */
.page {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* ── LEFT PANEL ── */
.left-panel {
  display: flex; flex-direction: column;
  justify-content: center; align-items: flex-start;
  padding: 60px 56px;
  border-right: 1px solid var(--border);
  position: relative; overflow: hidden;
}

.left-panel::before {
  content: '';
  position: absolute; top: -100px; left: -100px;
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(66,150,224,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.brand-icon {
  font-size: 52px; margin-bottom: 24px;
  opacity: 0; animation: fade-up 0.6s ease 0.1s forwards;
}

.brand-name {
  font-family: 'Cinzel', serif;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
  background: linear-gradient(135deg, #F0F4F8 0%, var(--blue) 60%, rgba(66,150,224,0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1; margin-bottom: 8px;
  opacity: 0; animation: fade-up 0.6s ease 0.2s forwards;
}

.brand-year {
  font-family: 'Cinzel', serif;
  font-size: 14px; font-weight: 600;
  letter-spacing: 0.5em; color: var(--gold);
  opacity: 0; animation: fade-up 0.6s ease 0.3s forwards;
  margin-bottom: 40px;
}

.brand-divider {
  width: 48px; height: 2px;
  background: linear-gradient(90deg, var(--blue), transparent);
  margin-bottom: 28px;
  opacity: 0; animation: fade-up 0.6s ease 0.4s forwards;
}

.brand-desc {
  font-size: 14px; color: var(--text-2);
  line-height: 1.7; max-width: 320px;
  opacity: 0; animation: fade-up 0.6s ease 0.5s forwards;
}

/* Floating stat cards */
#stat-cards-cont {
    position: relative;
    width: 90%;
    height: auto;
    margin-top: 30px;
    justify-content: center;
    align-items: center;
    display: flex;
}
.stat-cards {
  display: flex; 
  gap: 20px; 
  /* margin-top: 48px;  */
  flex-wrap: wrap;
  opacity: 0; animation: fade-up 0.6s ease 0.6s forwards;
}
.stat-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 18px;
}
.stat-num {
  font-family: var(--mono);
  font-size: 22px; font-weight: 700;
  color: var(--blue); line-height: 1;
}
.stat-lbl {
  font-size: 11px; color: var(--text-3);
  margin-top: 3px; text-transform: uppercase; letter-spacing: 0.06em;
}

/* ── RIGHT PANEL (Login Form) ── */
.right-panel {
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  /* padding: 60px 48px; */
}

.login-box {
  width: 100%; max-width: 380px;
  opacity: 0; animation: fade-up 0.7s ease 0.2s forwards;
}

.login-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 14px; border-radius: 99px;
  background: rgba(66,150,224,0.1);
  border: 1px solid rgba(66,150,224,0.2);
  color: var(--blue); font-size: 12px; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  margin-bottom: 20px;
}
.login-badge-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--blue);
}

.login-title {
  font-family: 'Cinzel', serif;
  font-size: 28px; font-weight: 900;
  color: var(--text-1); line-height: 1.2;
  margin-bottom: 6px;
}
.login-sub {
  font-size: 14px; color: var(--text-2);
  margin-bottom: 36px; line-height: 1.5;
}

/* Form */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-3); margin-bottom: 7px;
}
.input-wrap { position: relative; }
.input-icon {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--text-3);
  pointer-events: none;
}
.form-input {
  width: 100%; height: 50px;
  background: var(--surface-2);
  border: 1.5px solid var(--border-2);
  border-radius: 12px;
  padding: 0 44px 0 42px;
  font-family: var(--font); font-size: 15px; color: var(--text-1);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  -webkit-text-fill-color: var(--text-1);
}
.form-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-glow);
  background: var(--surface);
}
.form-input::placeholder { color: var(--text-3); -webkit-text-fill-color: var(--text-3); }

/* Password toggle */
.toggle-pw {
  position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--text-3); padding: 4px;
  transition: color 0.15s;
}
.toggle-pw:hover { color: var(--text-2); }
.toggle-pw svg { width: 16px; height: 16px; display: block; }

/* Error */
.form-error {
  font-size: 12px; color: var(--red);
  margin-top: 6px; font-weight: 500;
  min-height: 18px; display: none;
}
.form-error.show { display: block; }

#logasadmin{
    position: relative;
    margin-top: 48px;
    animation: fade-up 0.6s ease 0.1s forwards;
}

/* Submit */
.submit-btn {
  width: 100%; height: 52px; margin-top: 8px;
  background: linear-gradient(135deg, var(--blue) 0%, #2B7DD4 100%);
  border: none; border-radius: 12px;
  color: #fff; font-family: var(--font);
  font-size: 16px; font-weight: 700;
  cursor: pointer; position: relative; overflow: hidden;
  transition: transform 0.15s ease, filter 0.15s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.submit-btn svg { width: 18px; height: 18px; }
.submit-btn:active { transform: scale(0.98); filter: brightness(0.95); }
.submit-btn::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 60%);
  pointer-events: none;
}

/* Loading state */
.submit-btn.loading .btn-text { opacity: 0; }
.submit-btn.loading .btn-spinner { display: block; }
.btn-spinner {
  display: none;
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
  position: absolute;
}
@keyframes spin { to { transform: rotate(360deg); } }

#back-btn{
    position: relative;
    width: 100%;
    height: auto;
    justify-content: center;
    align-items: center;
    display: flex;
    animation: fade-up 0.6s ease 0.1s forwards;
}
.back-link {
  display: block; text-align: center;
  margin-top: 20px; font-size: 13px; color: var(--text-3);
  text-decoration: none; transition: color 0.15s;
}
.back-link:hover { color: var(--text-2); }

#login-panel {
    position: relative;
    width: 100%;
    height: 30%;
    scroll-margin-top: 80px;
}

/* ── ANIMATIONS ── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── MOBILE ── */
@media (max-width: 768px) {
  .page { grid-template-columns: 1fr; }

  #left-panel-cont {
    position: relative;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    display: flex;
  }

  .right-panel {
    padding: 40px 24px;
    min-height: 120vh;
  }
}

/* Server error */
.server-error {
  background: rgba(231,76,60,0.08);
  border: 1px solid rgba(231,76,60,0.2);
  border-radius: 10px; padding: 11px 14px;
  font-size: 13px; color: var(--red); font-weight: 500;
  margin-bottom: 20px; display: none;
  animation: shake 0.4s ease;
}
.server-error.show { display: flex; align-items: center; gap: 8px; }
.server-error svg { width: 15px; height: 15px; flex-shrink: 0; }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}