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

:root {
  --bg: #0a0b0f;
  --surface: #111318;
  --surface2: #1a1d25;
  --border: #1e2230;
  --text: #e8eaf0;
  --text-muted: #6b7280;
  --accent: #6c63ff;
  --accent2: #ff6584;
  --credit: #10b981;
  --debit: #f43f5e;
  --radius: 14px;
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'DM Mono', monospace;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Background grid */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(108,99,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108,99,255,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

/* Glow orbs */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.orb-1 {
  width: 400px; height: 400px;
  background: rgba(108,99,255,0.12);
  top: -100px; right: -100px;
}
.orb-2 {
  width: 300px; height: 300px;
  background: rgba(255,101,132,0.08);
  bottom: -80px; left: -80px;
}

.login-wrapper {
  width: 100%;
  max-width: 420px;
  padding: 24px;
  position: relative;
  z-index: 1;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}
.brand-icon {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 22px; font-weight: 800;
  color: #fff;
}
.brand-name {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 800;
  color: var(--text);
}
.brand-tagline {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* Card */
.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.card-header { margin-bottom: 24px; }
.card-header h2 {
  font-family: var(--font-display);
  font-size: 24px; font-weight: 700;
  margin-bottom: 4px;
}
.card-header p { color: var(--text-muted); font-size: 14px; }

/* Alert */
.alert {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  line-height: 1.5;
}
.alert.hidden { display: none; }
.alert.error { background: rgba(244,63,94,0.12); border: 1px solid rgba(244,63,94,0.3); color: #f43f5e; }
.alert.success { background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.3); color: #10b981; }
.alert.warn { background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.3); color: #f59e0b; }

/* Form */
.field-group { margin-bottom: 16px; }
.field-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
input, select, textarea {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.2s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
}
input::placeholder { color: var(--text-muted); }

.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 42px; }
.eye-btn {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 0;
  display: flex; align-items: center;
}
.eye-btn:hover { color: var(--text); }

/* Buttons */
.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--accent), #8b83ff);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-family: var(--font-display);
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: opacity 0.2s, transform 0.1s;
  margin-top: 4px;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.link-btn {
  background: none; border: none;
  color: var(--accent); font-size: 13px;
  cursor: pointer; padding: 0;
  font-family: var(--font-body);
  text-decoration: underline;
}
.link-btn.small { font-size: 12px; }

.divider {
  text-align: center;
  position: relative;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 12px;
}
.divider::before {
  content: '';
  position: absolute;
  top: 50%; left: 0; right: 0;
  height: 1px;
  background: var(--border);
}
.divider span {
  position: relative;
  background: var(--surface);
  padding: 0 12px;
}

.switch-mode {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.forgot-wrap { text-align: center; margin-top: 10px; }

/* Spinner */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.hidden { display: none !important; }
@keyframes spin { to { transform: rotate(360deg); } }

.footer-note {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 20px;
  font-family: var(--font-mono);
}
