/*
 * FILE: tim/auth.css
 * AUTH PAGES THEME — Login, Register, Lupa Password
 * Berlaku untuk semua halaman di folder tim/
 */

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: #080B14;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  position: relative;
}

/* Grid background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* Red radial glow */
body::after {
  content: '';
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(139,0,0,0.15) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* ============================================================
   AUTH WRAPPER
   ============================================================ */
.auth-wrapper {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 440px;
  padding: 24px;
  animation: auth-fade-up 0.6s ease-out both;
}

@keyframes auth-fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   AUTH CARD
   ============================================================ */
.auth-card {
  background: #0F1523;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}

/* Top accent line */
.auth-card::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, #8B0000, rgba(139,0,0,0.2));
}

/* ============================================================
   AUTH HEADER
   ============================================================ */
.auth-header {
  padding: 32px 36px 24px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.auth-logo img {
  height: 32px;
  filter: brightness(1.2);
}

.auth-logo-text {
  font-family: 'Orbitron', monospace;
  font-size: 20px;
  font-weight: 900;
  color: #8B0000;
  letter-spacing: 3px;
}

.auth-title {
  font-family: 'Orbitron', monospace;
  font-size: 1.2rem;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.auth-subtitle {
  font-size: 13px;
  color: #8899AA;
  line-height: 1.6;
}

/* ============================================================
   AUTH BODY
   ============================================================ */
.auth-body {
  padding: 28px 36px 32px;
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #8899AA;
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  background: #161D2F !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 10px !important;
  color: #FFFFFF !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 14px !important;
  padding: 12px 16px !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
  outline: none !important;
  -webkit-appearance: none;
}

.form-control::placeholder {
  color: rgba(136,153,170,0.5) !important;
}

.form-control:focus {
  border-color: rgba(139,0,0,0.5) !important;
  box-shadow: 0 0 0 3px rgba(139,0,0,0.08) !important;
  background: #1a2236 !important;
}

/* Input with icon */
.input-group {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #8899AA;
  font-size: 14px;
  pointer-events: none;
  z-index: 1;
}

.input-group .form-control {
  padding-left: 40px !important;
}

/* Password toggle */
.input-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #8899AA;
  font-size: 14px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  z-index: 1;
  transition: color 0.2s;
}

.input-toggle:hover { color: #8B0000; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-auth {
  width: 100%;
  background: #8B0000;
  color: #FFFFFF;
  font-family: 'Orbitron', monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 14px 24px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  text-transform: uppercase;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.btn-auth:hover {
  background: #C8001A;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(139,0,0,0.35);
  color: #FFFFFF;
}

.btn-auth:active {
  transform: translateY(0);
}

.btn-auth-outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  color: #8899AA;
}

.btn-auth-outline:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.2);
  color: #FFFFFF;
  box-shadow: none;
  transform: translateY(-1px);
}

/* ============================================================
   ALERT / ERROR MESSAGES
   ============================================================ */
.auth-alert {
  background: rgba(139,0,0,0.1);
  border: 1px solid rgba(139,0,0,0.25);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  color: #CC4444;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Inter', sans-serif;
}

.auth-alert.success {
  background: rgba(0,230,118,0.08);
  border-color: rgba(0,230,118,0.2);
  color: #00E676;
}

.auth-alert i {
  flex-shrink: 0;
  font-size: 14px;
}

/* Bootstrap alert override */
.alert-danger {
  background: rgba(139,0,0,0.1) !important;
  border: 1px solid rgba(139,0,0,0.25) !important;
  border-radius: 10px !important;
  color: #CC4444 !important;
  font-size: 13px !important;
  font-family: 'Inter', sans-serif !important;
}

.alert-success {
  background: rgba(0,230,118,0.08) !important;
  border: 1px solid rgba(0,230,118,0.2) !important;
  border-radius: 10px !important;
  color: #00E676 !important;
  font-size: 13px !important;
}

/* ============================================================
   AUTH FOOTER (links)
   ============================================================ */
.auth-footer {
  padding: 20px 36px 28px;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.auth-footer p {
  font-size: 13px;
  color: #8899AA;
  margin: 0;
}

.auth-footer a {
  color: #8B0000;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.auth-footer a:hover { color: #AA2222; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.07);
}

.auth-divider span {
  font-size: 11px;
  color: #8899AA;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ============================================================
   VERIFY / SUCCESS STATE
   ============================================================ */
.auth-success-icon {
  width: 64px;
  height: 64px;
  background: rgba(0,230,118,0.1);
  border: 2px solid rgba(0,230,118,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 28px;
  color: #00E676;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Izinkan scroll vertikal saat konten lebih tinggi dari layar */
@media (max-width: 480px) {
  body {
    align-items: flex-start;
    padding: 0;
  }
  .auth-wrapper { padding: 16px; }
  .auth-header  { padding: 24px 20px 18px; }
  .auth-body    { padding: 20px 20px 24px; }
  .auth-footer  { padding: 14px 20px 22px; }
  .auth-title   { font-size: 1rem; }
  .auth-subtitle { font-size: 12px; }

  /* Cegah auto-zoom saat fokus input di iOS */
  .form-control { font-size: 16px !important; }

  /* Tombol lebih mudah ditekan */
  .btn-auth { min-height: 48px; font-size: 12px; letter-spacing: 1px; }

  /* Kurangi jarak antar field */
  .form-group { margin-bottom: 14px; }

  /* Footer link lebih mudah dibaca */
  .auth-footer p { font-size: 12px; }
}

/* HP sangat kecil (≤ 360px) */
@media (max-width: 360px) {
  .auth-wrapper { padding: 10px; }
  .auth-header  { padding: 20px 16px 16px; }
  .auth-body    { padding: 16px 16px 20px; }
  .auth-footer  { padding: 12px 16px 20px; }
  .auth-title   { font-size: 0.95rem; }
  .form-group   { margin-bottom: 12px; }
  .btn-auth     { min-height: 46px; }
}