/* ============================================================
   Make It Happen - Auth Pages Styling (Black & Gold)
   ============================================================ */

html.auth-page {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
}

:root {
  --auth-bg: #0a0a0a;
  --card-bg: rgba(255, 255, 255, 0.96);
  --text-primary: #0a0a0a;
  --text-secondary: #666;
  --border-color: rgba(212,168,67,0.2);
  --shadow: 0 20px 60px rgba(0,0,0,0.2);
  --input-bg: #faf9f6;
  --input-border: #e5e0d5;
}

html.auth-page body.auth-body,
body.auth-body,
.auth-body {
  min-height: 100vh !important;
  min-height: 100dvh !important;
  width: 100% !important;
  background: var(--auth-bg, #0a0a0a) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 24px 16px !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  margin: 0 !important;
  box-sizing: border-box !important;
}

.auth-body #jms-loader,
#jms-loader {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #0a0a0a 100%) !important;
  z-index: 99999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-direction: column !important;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

#jms-loader.hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

#jms-loader .loader-logo {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #d4a843 0%, #f0d78c 50%, #b8922e 100%);
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(212,168,67,0.3);
}

#jms-loader .loader-text {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
  margin-bottom: 24px;
}

#jms-loader .loader-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(212,168,67,0.2);
  border-top-color: #d4a843;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.auth-body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: radial-gradient(circle at 30% 50%, rgba(212,168,67,0.08) 0%, transparent 50%),
              radial-gradient(circle at 70% 30%, rgba(212,168,67,0.05) 0%, transparent 50%);
  animation: authBgFloat 20s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}
@keyframes authBgFloat {
  0%, 100% { transform: translate(0,0); }
  50% { transform: translate(10px,-8px); }
}

.auth-container {
  width: 100%;
  max-width: 440px;
  margin: auto !important;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.auth-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 40px 36px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  animation: cardSlideUp 0.6s ease-out;
}
@keyframes cardSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-header { text-align: center; margin-bottom: 28px; }
.auth-logo {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, #d4a843 0%, #f0d78c 50%, #b8922e 100%);
  border-radius: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(212,168,67,0.4);
}
.auth-logo i { font-size: 28px; color: #0a0a0a; }
.auth-header h1 { font-size: 20px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.auth-header p { font-size: 13px; color: var(--text-secondary); }
.brand-title {
  font-size: 32px;
  font-weight: 900;
  color: #0a0a0a;
  letter-spacing: 1px;
  margin-bottom: 0;
  line-height: 1.2;
  text-transform: uppercase;
  background: linear-gradient(135deg, #d4a843 0%, #b8922e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.brand-subtitle {
  font-size: 13px;
  font-weight: 500;
  color: #888;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
  margin-top: 2px;
}

.auth-form .form-label { font-weight: 600; font-size: 12px; color: #555; margin-bottom: 5px; }
.auth-form .input-group {
  border-radius: 12px; overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: box-shadow 0.3s;
}
.auth-form .input-group:focus-within { box-shadow: 0 0 0 3px rgba(212,168,67,0.2); }
.auth-form .input-group-text {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-right: none;
  color: #888;
  font-size: 14px;
  padding: 10px 12px;
}
.auth-form .form-control {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  padding: 10px 14px;
  font-size: 14px;
  transition: all 0.3s;
  height: auto;
}
.auth-form .form-control:focus {
  background: #fff;
  box-shadow: none;
  border-color: #d4a843;
}
.auth-form .form-check-label { font-size: 13px; }

.toggle-password { cursor: pointer; transition: background 0.2s; }
.toggle-password:hover { background: #e9ecef; }

.btn-auth {
  background: linear-gradient(135deg, #d4a843 0%, #b8922e 100%);
  border: none;
  border-radius: 14px;
  padding: 13px;
  font-size: 15px;
  font-weight: 700;
  color: #000;
  letter-spacing: 0.3px;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(212,168,67,0.4);
}
.btn-auth:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(212,168,67,0.6);
  background: linear-gradient(135deg, #f0d78c 0%, #d4a843 100%);
}
.btn-auth:active { transform: translateY(0); }

.auth-footer { text-align: center; margin-top: 20px; font-size: 13px; color: var(--text-secondary); }
.auth-footer a { color: #b8922e; font-weight: 600; text-decoration: none; }
.auth-copyright { text-align: center; margin-top: 18px; font-size: 11px; color: rgba(255,255,255,0.4); }

.alert { border-radius: 14px; border: none; font-size: 12px; padding: 10px 14px; margin-bottom: 16px; }

@media (max-width: 576px) {
  .auth-body { padding: 10px; }
  .auth-card { padding: 22px 16px; border-radius: 18px; }
  .auth-header { margin-bottom: 20px; }
  .auth-header h1 { font-size: 17px; }
  .auth-header p { font-size: 12px; }
  .brand-title { font-size: 26px; }
  .brand-subtitle { font-size: 11px; letter-spacing: 1.5px; }
  .auth-logo { width: 48px; height: 48px; border-radius: 14px; margin-bottom: 10px; }
  .auth-logo i { font-size: 22px; }
  .auth-form .form-control { padding: 10px 12px; font-size: 13px; }
  .auth-form .input-group-text { font-size: 12px; padding: 10px; }
  .btn-auth { padding: 11px; font-size: 14px; }
  .auth-form .form-label { font-size: 11px; margin-bottom: 4px; }
  .auth-footer { margin-top: 16px; font-size: 12px; }
  .auth-form .mb-3 { margin-bottom: 12px !important; }
  .auth-form .mb-4 { margin-bottom: 16px !important; }
}