/* ═══════════════════════════════════════════════════════════
   auth.css — self-contained login page styles
   No external dependencies. Every selector prefixed with .auth-*
   ═══════════════════════════════════════════════════════════ */

/* Reset within the auth page only */
.auth-body,
.auth-body *,
.auth-body *::before,
.auth-body *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Page shell ──────────────────────────────────────────── */
.auth-body {
  min-height: 100vh;
  min-height: 100dvh;
  background: #0B0E11;
  color: #E6EAF2;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow-x: hidden;
}

/* ── Background decorations ──────────────────────────────── */
.auth-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.auth-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
}

.auth-glow-1 {
  width: 500px;
  height: 500px;
  background: #00E08A;
  top: -180px;
  left: -140px;
  opacity: 0.14;
}

.auth-glow-2 {
  width: 420px;
  height: 420px;
  background: #4d7cff;
  bottom: -160px;
  right: -120px;
  opacity: 0.10;
}

.auth-chart {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50%;
  opacity: 0.7;
}

/* ── Centered shell ──────────────────────────────────────── */
.auth-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Brand mark above card ───────────────────────────────── */
.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #00E08A 0%, #00a86a 100%);
  color: #001a10;
  border-radius: 9px;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(0, 224, 138, 0.28);
}

.auth-wordmark {
  font-weight: 800;
  letter-spacing: 2.4px;
  font-size: 13px;
  color: #E6EAF2;
}

/* ── Login card ──────────────────────────────────────────── */
.auth-card {
  width: 100%;
  padding: 30px 26px 22px;
  background: rgba(21, 26, 33, 0.9);
  border: 1px solid #232A36;
  border-radius: 16px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
}

.auth-title {
  font-size: 21px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.3px;
  color: #E6EAF2;
}

.auth-sub {
  font-size: 13px;
  color: #7A869A;
  margin-bottom: 22px;
}

/* ── Fields ──────────────────────────────────────────────── */
.auth-field {
  display: block;
  margin-bottom: 14px;
}

.auth-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #7A869A;
  margin-bottom: 6px;
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  left: 13px;
  color: #4A5568;
  display: flex;
  pointer-events: none;
  transition: color 0.15s ease;
}

.auth-input-wrap:focus-within .auth-input-icon {
  color: #00E08A;
}

.auth-input-wrap input {
  width: 100%;
  padding: 12px 42px 12px 40px;
  background: #0B0E11;
  color: #E6EAF2;
  border: 1px solid #232A36;
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
}

.auth-input-wrap input::placeholder {
  color: #4A5568;
  opacity: 1;
}

.auth-input-wrap input:focus {
  border-color: #00E08A;
  background: #0e1218;
  box-shadow: 0 0 0 3px rgba(0, 224, 138, 0.12);
}

.auth-input-wrap input::-ms-reveal,
.auth-input-wrap input::-ms-clear {
  display: none;
}

/* Password visibility toggle */
.auth-eye {
  position: absolute;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  border-radius: 7px;
  color: #7A869A;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.auth-eye:hover {
  color: #E6EAF2;
  background: rgba(255, 255, 255, 0.04);
}

.auth-eye:focus {
  outline: none;
  color: #00E08A;
}

/* ── Submit button ───────────────────────────────────────── */
.auth-btn {
  width: 100%;
  height: 46px;
  margin-top: 6px;
  padding: 0 18px;
  background: linear-gradient(135deg, #00E08A 0%, #00b872 100%);
  color: #001a10;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: filter 0.15s, box-shadow 0.2s, transform 0.08s;
  box-shadow: 0 4px 18px rgba(0, 224, 138, 0.25);
  -webkit-tap-highlight-color: transparent;
}

.auth-btn:hover:not(:disabled) {
  filter: brightness(1.06);
  box-shadow: 0 6px 24px rgba(0, 224, 138, 0.4);
}

.auth-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.auth-btn:disabled {
  cursor: not-allowed;
  filter: grayscale(0.15) brightness(0.9);
}

.auth-btn:focus-visible {
  outline: 2px solid #00E08A;
  outline-offset: 2px;
}

.auth-btn-spinner {
  display: flex;
  align-items: center;
}

/* ── Error banner ────────────────────────────────────────── */
.auth-error {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 77, 77, 0.10);
  border: 1px solid rgba(255, 77, 77, 0.35);
  color: #FF8A8A;
  font-size: 13px;
  line-height: 1.4;
  padding: 10px 12px;
  border-radius: 9px;
  margin-bottom: 16px;
}

/* ── Footer ──────────────────────────────────────────────── */
.auth-foot {
  margin-top: 18px;
  text-align: center;
  font-size: 11px;
  color: #4A5568;
  letter-spacing: 0.4px;
}

/* ═══════════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════════ */

/* Small phones (iPhone SE 375px, older Android) */
@media (max-width: 400px) {
  .auth-body { padding: 14px; }
  .auth-shell { max-width: 100%; }
  .auth-card { padding: 26px 20px 20px; border-radius: 14px; }
  .auth-title { font-size: 19px; }
  .auth-brand { margin-bottom: 18px; }
  .auth-wordmark { font-size: 12px; letter-spacing: 2px; }
}

/* Short viewports — start at top, not center (avoids top clipping) */
@media (max-height: 700px) and (max-width: 500px) {
  .auth-body { align-items: flex-start; padding-top: 24px; }
}

/* Landscape phone */
@media (max-height: 500px) and (orientation: landscape) {
  .auth-body { padding: 10px; }
  .auth-brand { margin-bottom: 10px; }
  .auth-card { padding: 18px 22px 14px; }
  .auth-title { font-size: 17px; margin-bottom: 2px; }
  .auth-sub { margin-bottom: 12px; }
  .auth-field { margin-bottom: 10px; }
  .auth-btn { height: 42px; }
}

/* Tablet and up */
@media (min-width: 768px) {
  .auth-shell { max-width: 420px; }
  .auth-card { padding: 36px 32px 26px; }
  .auth-title { font-size: 23px; }
}

/* Very large screens */
@media (min-width: 1200px) {
  .auth-shell { max-width: 440px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .auth-body *,
  .auth-body *::before,
  .auth-body *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}