/* ========================================================
   VAM BIKE — AUTHENTICATION GATE & LOGIN/REGISTER MODAL
   ======================================================== */

.auth-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: rgba(10, 14, 20, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.auth-gate-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Splash Branding Header */
.auth-brand-header {
  margin-bottom: 24px;
  text-align: center;
}

.auth-brand-title {
  font-size: 38px;
  font-weight: 900;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-brand-vam {
  color: #00ff88;
  text-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
}

.auth-brand-bike {
  color: #ffffff;
  text-shadow: 0 0 16px rgba(255, 255, 255, 0.4);
}

.auth-brand-subtitle {
  font-size: 11px;
  color: #8b949e;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 6px;
  font-weight: 600;
}

/* Auth Card */
.auth-card {
  width: 100%;
  max-width: 420px;
  background: rgba(18, 24, 32, 0.95);
  border: 1px solid rgba(0, 242, 254, 0.3);
  border-radius: 24px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.85), 0 0 30px rgba(0, 242, 254, 0.15);
  overflow: hidden;
  animation: fadeIn 0.3s ease;
}

/* Tabs */
.auth-tabs {
  display: flex;
  background: #0d1218;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-tab {
  flex: 1;
  padding: 14px 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #8b949e;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  user-select: none;
}

.auth-tab.active {
  color: var(--neon-cyan);
  border-bottom-color: var(--neon-cyan);
  background: rgba(0, 242, 254, 0.06);
}

/* Form Container */
.auth-form {
  padding: 24px;
}

.auth-error-banner {
  background: rgba(255, 51, 102, 0.15);
  border: 1px solid var(--neon-alert-red);
  color: #ff3366;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 16px;
  display: none;
}

.auth-field {
  margin-bottom: 16px;
}

.auth-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #8b949e;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.auth-input {
  width: 100%;
  background: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
}

.auth-input:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 14px rgba(0, 242, 254, 0.35);
}

.auth-btn-submit {
  width: 100%;
  background: linear-gradient(135deg, #00f2fe 0%, #00ff88 100%);
  color: #0a0e14;
  border: none;
  padding: 14px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 242, 254, 0.4);
  transition: all 0.2s ease;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-btn-submit:active {
  transform: scale(0.98);
}

.auth-btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Master Demo Fast Login Pill */
.auth-demo-box {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.auth-demo-btn {
  background: rgba(255, 204, 0, 0.12);
  border: 1px solid #ffcc00;
  color: #ffcc00;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.auth-demo-btn:hover {
  background: rgba(255, 204, 0, 0.25);
  box-shadow: 0 0 12px rgba(255, 204, 0, 0.4);
}

/* ========================================================
   AUTH SERVER CONFIGURATOR & HEALTH CHECKER (HYBRID / DEV)
   ======================================================== */
.auth-server-box {
  margin-top: 16px;
  padding: 12px 14px;
  background: rgba(13, 18, 24, 0.95);
  border: 1px solid rgba(0, 242, 254, 0.2);
  border-radius: 14px;
  text-align: left;
}

.auth-server-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #8b949e;
}

.auth-server-indicator {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ffcc00;
  box-shadow: 0 0 8px rgba(255, 204, 0, 0.6);
  display: inline-block;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.auth-server-indicator.online {
  background: #00ff88;
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.8);
}

.auth-server-indicator.offline {
  background: #ff3366;
  box-shadow: 0 0 10px rgba(255, 51, 102, 0.8);
}

.auth-server-title {
  flex: 1;
}

.auth-server-btn-toggle {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-server-btn-toggle:hover {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
}

.auth-server-current-url {
  font-family: monospace;
  font-size: 11.5px;
  color: #00f2fe;
  word-break: break-all;
  margin-top: 4px;
}

.auth-server-drawer {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  animation: fadeIn 0.2s ease;
}

.auth-server-drawer-help {
  font-size: 11px;
  color: #8b949e;
  margin-bottom: 8px;
}

.auth-server-chips {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.auth-server-chip {
  background: #161b22;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #c9d1d9;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 11px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}

.auth-server-chip:hover,
.auth-server-chip.active {
  border-color: #00ff88;
  color: #00ff88;
  background: rgba(0, 255, 136, 0.08);
}

.auth-server-custom-row {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.auth-input-compact {
  padding: 6px 10px !important;
  font-size: 12px !important;
  flex: 1;
}

.auth-btn-action {
  background: var(--neon-cyan);
  color: #0a0e14;
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.auth-server-test-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-btn-ping {
  background: rgba(0, 242, 254, 0.15);
  border: 1px solid var(--neon-cyan);
  color: var(--neon-cyan);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.auth-btn-ping:hover {
  background: rgba(0, 242, 254, 0.3);
}

.auth-ping-status {
  font-size: 11px;
  color: #8b949e;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
