@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

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

:root {
  --oxi-dark: #080c16;
  --oxi-navy: #0f1729;
  --oxi-surface: #151d2e;
  --oxi-blue: #014872;
  --oxi-blue-light: #0369a1;
  --oxi-lime: #96BD0D;
  --oxi-lime-dim: rgba(150,189,13,.15);
  --oxi-white: #f8fafc;
  --oxi-gray: #94a3b8;
  --oxi-gray-dim: #475569;
  --oxi-red: #ef4444;
  --oxi-green: #10b981;
  --oxi-amber: #f59e0b;
  --radius: 12px;
  --transition: .25s cubic-bezier(.4,0,.2,1);
}

html, body {
  height: 100%;
  font-family: 'Outfit', system-ui, sans-serif;
  background: var(--oxi-dark);
  color: var(--oxi-white);
  -webkit-font-smoothing: antialiased;
}

/* ─── layout ─── */
.page {
  display: flex;
  min-height: 100vh;
}

/* ─── left brand panel ─── */
.brand-panel {
  flex: 0 0 55%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 3rem;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 80%, rgba(150,189,13,.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(1,72,114,.08) 0%, transparent 50%),
    var(--oxi-dark);
}

.brand-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(150,189,13,.08) 1px, transparent 1px);
  background-size: 32px 32px;
  animation: gridDrift 20s linear infinite;
  pointer-events: none;
}

@keyframes gridDrift {
  0%   { transform: translate(0, 0); }
  100% { transform: translate(32px, 32px); }
}

.brand-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 420px;
  animation: fadeSlideRight .7s ease-out both;
}

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

.brand-logo {
  width: 200px;
  margin-bottom: 2.5rem;
  filter: drop-shadow(0 0 40px rgba(150,189,13,.15));
  transition: filter var(--transition);
}

.brand-logo:hover {
  filter: drop-shadow(0 0 60px rgba(150,189,13,.3));
}

.brand-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: .08em;
  color: var(--oxi-gray);
  margin-bottom: 1.5rem;
}

.brand-badges {
  display: flex;
  gap: .6rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: .7rem;
  font-weight: 500;
  padding: .3rem .7rem;
  border-radius: 20px;
  letter-spacing: .05em;
}

.badge--version {
  border: 1px solid var(--oxi-gray-dim);
  color: var(--oxi-gray);
}

.badge--runtime {
  border: 1px solid rgba(150,189,13,.3);
  color: var(--oxi-lime);
  background: var(--oxi-lime-dim);
}

.badge--env {
  border: 1px solid rgba(245,158,11,.3);
  color: var(--oxi-amber);
  background: rgba(245,158,11,.1);
}

.brand-stats {
  display: flex;
  flex-direction: column;
  gap: .8rem;
}

.stat-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-size: .85rem;
  color: var(--oxi-gray-dim);
}

.stat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--oxi-green);
  box-shadow: 0 0 6px var(--oxi-green);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .4; }
}

.stat-row span { color: var(--oxi-gray); }

/* ─── right login panel ─── */
.login-panel {
  flex: 0 0 45%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 3rem;
  background: var(--oxi-navy);
  border-left: 1px solid rgba(148,163,184,.06);
  animation: fadeSlideLeft .7s ease-out .15s both;
}

@keyframes fadeSlideLeft {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

.login-card {
  width: 100%;
  max-width: 380px;
}

.login-heading {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: .4rem;
}

.login-sub {
  font-size: .85rem;
  color: var(--oxi-gray-dim);
  margin-bottom: 2.2rem;
  line-height: 1.5;
}

/* ─── form fields ─── */
.field {
  position: relative;
  margin-bottom: 1.4rem;
}

.field input {
  width: 100%;
  padding: .85rem 1rem;
  padding-left: 2.8rem;
  font-family: 'Outfit', sans-serif;
  font-size: .9rem;
  color: var(--oxi-white);
  background: var(--oxi-surface);
  border: 1px solid rgba(148,163,184,.1);
  border-radius: var(--radius);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.field input::placeholder {
  color: var(--oxi-gray-dim);
}

.field input:focus {
  border-color: var(--oxi-lime);
  box-shadow: 0 0 0 3px var(--oxi-lime-dim);
}

.field-icon {
  position: absolute;
  left: .9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--oxi-gray-dim);
  pointer-events: none;
  transition: color var(--transition);
}

.field input:focus ~ .field-icon { color: var(--oxi-lime); }

/* ─── button ─── */
.btn-login {
  width: 100%;
  padding: .85rem;
  margin-top: .6rem;
  font-family: 'Outfit', sans-serif;
  font-size: .95rem;
  font-weight: 600;
  color: var(--oxi-dark);
  background: var(--oxi-lime);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-login:hover:not(:disabled) {
  background: #a8d40f;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(150,189,13,.3);
}

.btn-login:active:not(:disabled) {
  transform: translateY(0);
}

.btn-login:disabled {
  opacity: .7;
  cursor: not-allowed;
}

.btn-login .spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--oxi-dark);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  margin: 0 auto;
}

.btn-login.loading .btn-text { display: none; }
.btn-login.loading .spinner { display: block; }

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── error message ─── */
.error-msg {
  margin-top: .8rem;
  padding: .6rem .8rem;
  font-size: .8rem;
  color: var(--oxi-red);
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.15);
  border-radius: 8px;
  display: none;
  animation: shake .4s ease-in-out;
}

.error-msg.visible { display: block; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}

/* ─── success state ─── */
.login-card.success .login-form { display: none; }
.success-msg {
  display: none;
  text-align: center;
  padding: 2rem 0;
  animation: fadeIn .4s ease-out;
}

.login-card.success .success-msg { display: block; }

.success-check {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(16,185,129,.1);
  border: 2px solid var(--oxi-green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.success-check svg { color: var(--oxi-green); }

.success-text {
  font-size: .95rem;
  color: var(--oxi-gray);
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(.95); }
  to   { opacity: 1; transform: scale(1); }
}

/* ─── footer ─── */
.login-footer {
  margin-top: 2.5rem;
  text-align: center;
}

.login-footer a {
  font-size: .75rem;
  color: var(--oxi-gray-dim);
  text-decoration: none;
  transition: color var(--transition);
}

.login-footer a:hover { color: var(--oxi-lime); }

/* ─── responsive ─── */
@media (max-width: 768px) {
  .page { flex-direction: column; }

  .brand-panel {
    flex: none;
    padding: 2rem 1.5rem;
  }

  .brand-content { max-width: 100%; }
  .brand-logo { width: 140px; margin-bottom: 1.2rem; }
  .brand-title { font-size: .9rem; margin-bottom: 1rem; }
  .brand-stats { display: none; }

  .login-panel {
    flex: 1;
    border-left: none;
    border-top: 1px solid rgba(148,163,184,.06);
    padding: 2rem 1.5rem;
  }
}
