/* ═══════════════════════════════════════════════════════
   HJAT Gated Access — Frontend CSS
   Theme: Dark luxury with precise geometric accents
═══════════════════════════════════════════════════════ */

:root {
  --hjat-dark:      #0d0d14;
  --hjat-dark-2:    #13131f;
  --hjat-dark-3:    #1a1a2e;
  --hjat-accent:    #6366f1;
  --hjat-accent-2:  #818cf8;
  --hjat-gold:      #f59e0b;
  --hjat-success:   #16a34a;
  --hjat-danger:    #dc2626;
  --hjat-text:      #e8e8f0;
  --hjat-text-muted:#9898b8;
  --hjat-border:    rgba(255,255,255,.08);
  --hjat-glass:     rgba(255,255,255,.04);
  --hjat-radius:    14px;
  --hjat-font-head: 'Syne', sans-serif;
  --hjat-font-body: 'DM Sans', sans-serif;
}

/* ── Reset for gate page ── */
.hjat-gate-body,
.hjat-denied-body {
  margin: 0;
  padding: 0;
  background: var(--hjat-dark);
  color: var(--hjat-text);
  font-family: var(--hjat-font-body);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ═══════════════════
   GATE LAYOUT
═══════════════════ */
.hjat-gate-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

@media (max-width: 900px) {
  .hjat-gate-wrap {
    grid-template-columns: 1fr;
  }
  .hjat-gate-panel {
    display: none;
  }
}

/* ── Left Panel ── */
.hjat-gate-panel {
  position: relative;
  overflow: hidden;
  background: var(--hjat-dark-3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hjat-panel-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 20% 30%, rgba(99,102,241,.18) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 80% 80%, rgba(245,158,11,.08) 0%, transparent 70%);
}

.hjat-panel-content {
  position: relative;
  z-index: 2;
  padding: 48px;
  max-width: 420px;
}

.hjat-panel-logo img {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: contain;
  margin-bottom: 24px;
}

.hjat-panel-icon {
  width: 64px;
  height: 64px;
  background: rgba(99,102,241,.15);
  border: 1px solid rgba(99,102,241,.3);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.hjat-panel-icon svg {
  width: 32px;
  height: 32px;
  color: var(--hjat-accent-2);
}

.hjat-panel-title {
  font-family: var(--hjat-font-head);
  font-size: 36px;
  font-weight: 800;
  margin: 0 0 16px;
  line-height: 1.1;
  background: linear-gradient(135deg, #fff 40%, var(--hjat-accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hjat-panel-desc {
  color: var(--hjat-text-muted);
  font-size: 15px;
  line-height: 1.65;
  margin: 0 0 32px;
}

.hjat-panel-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hjat-panel-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #c4c4d8;
}

.hjat-panel-features li svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--hjat-accent);
}

/* Orbs */
.hjat-panel-orbs { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.hjat-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .25;
  animation: hjat-float 8s ease-in-out infinite;
}
.hjat-orb--1 { width: 280px; height: 280px; background: var(--hjat-accent); top: -80px; right: -80px; }
.hjat-orb--2 { width: 200px; height: 200px; background: var(--hjat-gold); bottom: 60px; left: -40px; animation-delay: 3s; }
.hjat-orb--3 { width: 160px; height: 160px; background: #a78bfa; bottom: 180px; right: 40px; animation-delay: 5s; }

@keyframes hjat-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-20px) scale(1.05); }
}

/* ── Right Form Panel ── */
.hjat-gate-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: var(--hjat-dark-2);
}

.hjat-gate-form-inner {
  width: 100%;
  max-width: 440px;
}

/* ═══════════════════
   NOTICE
═══════════════════ */
.hjat-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 20px;
}
.hjat-notice svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.hjat-notice--warning { background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.25); color: #fbbf24; }
.hjat-notice--error   { background: rgba(220,38,38,.12);  border: 1px solid rgba(220,38,38,.25);  color: #f87171; }
.hjat-notice--success { background: rgba(22,163,74,.12);  border: 1px solid rgba(22,163,74,.25);  color: #4ade80; }

/* ═══════════════════
   TABS
═══════════════════ */
.hjat-tabs {
  display: flex;
  background: var(--hjat-glass);
  border: 1px solid var(--hjat-border);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 28px;
  position: relative;
}

.hjat-tab {
  flex: 1;
  background: none;
  border: none;
  color: var(--hjat-text-muted);
  font-family: var(--hjat-font-body);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 0;
  border-radius: 9px;
  cursor: pointer;
  transition: color .2s;
  position: relative;
  z-index: 2;
}

.hjat-tab.is-active {
  color: #fff;
}

.hjat-tabs::before {
  content: '';
  position: absolute;
  top: 4px;
  bottom: 4px;
  width: calc(50% - 4px);
  background: var(--hjat-accent);
  border-radius: 9px;
  transition: transform .25s cubic-bezier(.4,0,.2,1);
  z-index: 1;
}

.hjat-tabs[data-active="register"]::before { transform: translateX(0); }
.hjat-tabs[data-active="login"]::before    { transform: translateX(calc(100% + 8px)); }

/* ═══════════════════
   TAB PANELS
═══════════════════ */
.hjat-tab-panel { display: none; }
.hjat-tab-panel.is-active { display: block; animation: hjat-fade-in .3s ease; }

@keyframes hjat-fade-in { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }

/* ═══════════════════
   FORM
═══════════════════ */
.hjat-form-header { margin-bottom: 24px; }
.hjat-form-header h2 {
  font-family: var(--hjat-font-head);
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 6px;
  color: #fff;
}
.hjat-form-header p { color: var(--hjat-text-muted); font-size: 14px; margin: 0; }

.hjat-field-group { display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }

.hjat-field label {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: #b0b0cc;
  margin-bottom: 6px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.hjat-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.hjat-input-icon {
  position: absolute;
  left: 14px;
  width: 16px;
  height: 16px;
  color: var(--hjat-text-muted);
  pointer-events: none;
}

.hjat-input-wrap input {
  width: 100%;
  background: var(--hjat-glass);
  border: 1px solid var(--hjat-border);
  border-radius: 10px;
  color: var(--hjat-text);
  font-family: var(--hjat-font-body);
  font-size: 14.5px;
  padding: 12px 14px 12px 40px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
}

.hjat-input-wrap input:focus {
  border-color: var(--hjat-accent);
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}

.hjat-input-wrap input::placeholder { color: rgba(152,152,184,.5); }

.hjat-toggle-pass {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--hjat-text-muted);
  padding: 4px;
  display: flex;
  align-items: center;
}
.hjat-toggle-pass svg { width: 16px; height: 16px; }
.hjat-toggle-pass:hover { color: var(--hjat-text); }

/* ═══════════════════
   BUTTON
═══════════════════ */
.hjat-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: var(--hjat-accent);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: var(--hjat-font-body);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 24px;
  cursor: pointer;
  transition: background .2s, transform .15s, box-shadow .2s;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(99,102,241,.3);
}
.hjat-btn svg { width: 18px; height: 18px; transition: transform .2s; }
.hjat-btn:hover { background: #4f52e6; box-shadow: 0 6px 28px rgba(99,102,241,.45); }
.hjat-btn:hover svg { transform: translateX(3px); }
.hjat-btn:active { transform: scale(.98); }
.hjat-btn:disabled, .hjat-btn.is-loading { opacity: .65; pointer-events: none; }

.hjat-btn--outline {
  background: transparent;
  border: 1px solid var(--hjat-border);
  box-shadow: none;
  color: var(--hjat-text-muted);
}
.hjat-btn--outline:hover { background: var(--hjat-glass); color: var(--hjat-text); box-shadow: none; }

/* ═══════════════════
   SWITCH NOTE
═══════════════════ */
.hjat-switch-note {
  text-align: center;
  font-size: 13px;
  color: var(--hjat-text-muted);
  margin: 14px 0 0;
}
.hjat-switch-note a { color: var(--hjat-accent-2); text-decoration: none; font-weight: 500; }
.hjat-switch-note a:hover { text-decoration: underline; }

/* ═══════════════════
   MESSAGE FEEDBACK
═══════════════════ */
#hjat-reg-msg, #hjat-login-msg {
  font-size: 14px;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  display: none;
}
#hjat-reg-msg.show-error,   #hjat-login-msg.show-error   { display: block; background: rgba(220,38,38,.12); color:#f87171; border:1px solid rgba(220,38,38,.25); }
#hjat-reg-msg.show-success, #hjat-login-msg.show-success { display: block; background: rgba(22,163,74,.12);  color:#4ade80; border:1px solid rgba(22,163,74,.25); }

/* ═══════════════════
   ACCESS DENIED
═══════════════════ */
.hjat-denied-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 24px;
  text-align: center;
}

.hjat-denied-icon {
  width: 80px;
  height: 80px;
  background: rgba(220,38,38,.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.hjat-denied-icon svg { width: 40px; height: 40px; color: #ef4444; }
.hjat-denied-wrap h1 { font-family: var(--hjat-font-head); font-size: 32px; font-weight: 800; margin: 0 0 12px; color: #fff; }
.hjat-denied-wrap p  { color: var(--hjat-text-muted); font-size: 16px; max-width: 380px; margin: 0 0 28px; line-height: 1.6; }
.hjat-denied-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.hjat-denied-actions .hjat-btn { width: auto; padding: 12px 24px; }

/* ═══════════════════
   LOGOUT BUTTON
═══════════════════ */
.hjat-logout-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  background: rgba(220,38,38,.12);
  border: 1px solid rgba(220,38,38,.25);
  color: #f87171;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background .2s;
}
.hjat-logout-btn:hover { background: rgba(220,38,38,.22); }
